Class RemoteCredentialsServiceImpl

    • Constructor Detail

      • RemoteCredentialsServiceImpl

        public RemoteCredentialsServiceImpl()
    • Method Detail

      • setNodeService

        public void setNodeService​(org.alfresco.service.cmr.repository.NodeService nodeService)
      • setNamespaceService

        public void setNamespaceService​(org.alfresco.service.namespace.NamespaceService namespaceService)
      • setPermissionService

        public void setPermissionService​(org.alfresco.service.cmr.security.PermissionService permissionService)
      • setDictionaryService

        public void setDictionaryService​(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      • setRepositoryHelper

        public void setRepositoryHelper​(Repository repositoryHelper)
      • registerCredentialsFactory

        public void registerCredentialsFactory​(org.alfresco.service.namespace.QName credentialsType,
                                               RemoteCredentialsInfoFactory factory)
        Registers a new Factory to produce BaseCredentialsInfo objects for a given data type. This provides an alternative to setCredentialsFactories(Map) to allow the registering of a new type without overriding all of them.
        Parameters:
        credentialsType - The object type
        factory - The Factory to use to create this type with
      • getCredentialsFactories

        protected Map<org.alfresco.service.namespace.QName,​RemoteCredentialsInfoFactory> getCredentialsFactories()
        Provides a read only copy of the credentials factories, useful in unit tests
      • getSharedContainerNodeRef

        protected org.alfresco.service.cmr.repository.NodeRef getSharedContainerNodeRef​(boolean required)
        Gets the NodeRef of the holder of shared credentials remote systems. This is stored under system Protected, so that unit tests can make use of it
      • getPersonCredentials

        public BaseCredentialsInfo getPersonCredentials​(String remoteSystem)
        Description copied from interface: RemoteCredentialsService
        Fetches the credentials for the current user for the specified System. If multiple credentials exist, the first is returned, so this should only be used for systems where a user is restricted to only one set of credentials per system.
        Specified by:
        getPersonCredentials in interface RemoteCredentialsService
        Returns:
        The Credentials, or Null if none exist for the current user
      • listAllRemoteSystems

        public org.alfresco.query.PagingResults<String> listAllRemoteSystems​(org.alfresco.query.PagingRequest paging)
        Description copied from interface: RemoteCredentialsService
        Lists all the Remote Systems for which the user has credentials, either personal ones or shared ones
        Specified by:
        listAllRemoteSystems in interface RemoteCredentialsService
      • listSharedCredentials

        public org.alfresco.query.PagingResults<? extends BaseCredentialsInfo> listSharedCredentials​(String remoteSystem,
                                                                                                     org.alfresco.service.namespace.QName credentialsType,
                                                                                                     org.alfresco.query.PagingRequest paging)
        Description copied from interface: RemoteCredentialsService
        Lists all Credentials that are shared with the current user for the given Remote System
        Specified by:
        listSharedCredentials in interface RemoteCredentialsService
        Parameters:
        remoteSystem - The Remote System to return credentials for
        credentialsType - Optional type (including child subtypes) of the credentials to filter by
      • listPersonCredentials

        public org.alfresco.query.PagingResults<? extends BaseCredentialsInfo> listPersonCredentials​(String remoteSystem,
                                                                                                     org.alfresco.service.namespace.QName credentialsType,
                                                                                                     org.alfresco.query.PagingRequest paging)
        Description copied from interface: RemoteCredentialsService
        Lists all Credentials for the current user for the given Remote System
        Specified by:
        listPersonCredentials in interface RemoteCredentialsService
        Parameters:
        remoteSystem - The Remote System to return credentials for
        credentialsType - Optional type (including child subtypes) of the credentials to filter by
      • listAllCredentials

        public org.alfresco.query.PagingResults<? extends BaseCredentialsInfo> listAllCredentials​(String remoteSystem,
                                                                                                  org.alfresco.service.namespace.QName credentialsType,
                                                                                                  org.alfresco.query.PagingRequest paging)
        Description copied from interface: RemoteCredentialsService
        Lists all Credentials that the user has access to for the given Remote System
        Specified by:
        listAllCredentials in interface RemoteCredentialsService
        Parameters:
        remoteSystem - The Remote System to return credentials for
        credentialsType - Optional type (including child subtypes) of the credentials to filter by
      • getSharedCredentialsSystemContainerName

        protected static String getSharedCredentialsSystemContainerName()
        Unit testing use only!
      • getSharedCredentialsSystemContainerQName

        protected static org.alfresco.service.namespace.QName getSharedCredentialsSystemContainerQName()
      • setSharedCredentialsSystemContainerName

        protected static void setSharedCredentialsSystemContainerName​(String container)
        Unit testing use only! Used to avoid tests affecting the real system container