public class RemoteCredentialsServiceImpl extends Object implements RemoteCredentialsService
RemoteCredentialsService
Constructor and Description |
---|
RemoteCredentialsServiceImpl() |
Modifier and Type | Method and Description |
---|---|
BaseCredentialsInfo |
createPersonCredentials(String remoteSystem,
BaseCredentialsInfo credentials)
Stores a new
BaseCredentialsInfo for the current user |
BaseCredentialsInfo |
createSharedCredentials(String remoteSystem,
BaseCredentialsInfo credentials)
Stores a new
BaseCredentialsInfo for shared use. |
void |
deleteCredentials(BaseCredentialsInfo credentialsInfo)
Deletes an existing
BaseCredentialsInfo from the repository |
protected Map<org.alfresco.service.namespace.QName,RemoteCredentialsInfoFactory> |
getCredentialsFactories()
Provides a read only copy of the credentials factories, useful in unit tests
|
BaseCredentialsInfo |
getPersonCredentials(String remoteSystem)
Fetches the credentials for the current user for the specified
System.
|
protected org.alfresco.service.cmr.repository.NodeRef |
getSharedContainerNodeRef(boolean required)
Gets the NodeRef of the holder of shared credentials remote systems.
|
protected static String |
getSharedCredentialsSystemContainerName()
Unit testing use only!
|
protected static org.alfresco.service.namespace.QName |
getSharedCredentialsSystemContainerQName() |
org.alfresco.query.PagingResults<? extends BaseCredentialsInfo> |
listAllCredentials(String remoteSystem,
org.alfresco.service.namespace.QName credentialsType,
org.alfresco.query.PagingRequest paging)
Lists all Credentials that the user has access to
for the given Remote System
|
org.alfresco.query.PagingResults<String> |
listAllRemoteSystems(org.alfresco.query.PagingRequest paging)
Lists all the Remote Systems for which the user has credentials,
either personal ones or shared ones
|
org.alfresco.query.PagingResults<? extends BaseCredentialsInfo> |
listPersonCredentials(String remoteSystem,
org.alfresco.service.namespace.QName credentialsType,
org.alfresco.query.PagingRequest paging)
Lists all Credentials for the current user for the given Remote System
|
org.alfresco.query.PagingResults<String> |
listPersonRemoteSystems(org.alfresco.query.PagingRequest paging)
Lists all Remote Systems for which credentials are
stored for the current user
|
org.alfresco.query.PagingResults<? extends BaseCredentialsInfo> |
listSharedCredentials(String remoteSystem,
org.alfresco.service.namespace.QName credentialsType,
org.alfresco.query.PagingRequest paging)
Lists all Credentials that are shared with the current user for
the given Remote System
|
org.alfresco.query.PagingResults<String> |
listSharedRemoteSystems(org.alfresco.query.PagingRequest paging)
Lists all Remote Systems for which the user has access
to shared credentials
|
void |
registerCredentialsFactory(org.alfresco.service.namespace.QName credentialsType,
RemoteCredentialsInfoFactory factory)
Registers a new Factory to produce
BaseCredentialsInfo objects
for a given data type. |
void |
setCredentialsFactories(Map<String,RemoteCredentialsInfoFactory> factories)
Registers a number of new factories
|
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) |
void |
setRepositoryHelper(Repository repositoryHelper) |
protected static void |
setSharedCredentialsSystemContainerName(String container)
Unit testing use only! Used to avoid tests affecting the real system container
|
BaseCredentialsInfo |
updateCredentials(BaseCredentialsInfo credentials)
Updates an existing
BaseCredentialsInfo . |
BaseCredentialsInfo |
updateCredentialsAuthenticationSucceeded(boolean succeeded,
BaseCredentialsInfo credentials)
Records if the most recent Authentication attempt with a given
set of credentials worked or not.
|
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setRepositoryHelper(Repository repositoryHelper)
public void setCredentialsFactories(Map<String,RemoteCredentialsInfoFactory> factories)
public void registerCredentialsFactory(org.alfresco.service.namespace.QName credentialsType, RemoteCredentialsInfoFactory factory)
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.credentialsType
- The object typefactory
- The Factory to use to create this type withprotected Map<org.alfresco.service.namespace.QName,RemoteCredentialsInfoFactory> getCredentialsFactories()
protected org.alfresco.service.cmr.repository.NodeRef getSharedContainerNodeRef(boolean required)
public void deleteCredentials(BaseCredentialsInfo credentialsInfo)
RemoteCredentialsService
BaseCredentialsInfo
from the repositorydeleteCredentials
in interface RemoteCredentialsService
public BaseCredentialsInfo createPersonCredentials(String remoteSystem, BaseCredentialsInfo credentials)
RemoteCredentialsService
BaseCredentialsInfo
for the current usercreatePersonCredentials
in interface RemoteCredentialsService
public BaseCredentialsInfo createSharedCredentials(String remoteSystem, BaseCredentialsInfo credentials)
RemoteCredentialsService
BaseCredentialsInfo
for shared use.
Permissions should then be set to control access to these.createSharedCredentials
in interface RemoteCredentialsService
public BaseCredentialsInfo getPersonCredentials(String remoteSystem)
RemoteCredentialsService
getPersonCredentials
in interface RemoteCredentialsService
public BaseCredentialsInfo updateCredentials(BaseCredentialsInfo credentials)
RemoteCredentialsService
BaseCredentialsInfo
. The type
must not change.updateCredentials
in interface RemoteCredentialsService
public BaseCredentialsInfo updateCredentialsAuthenticationSucceeded(boolean succeeded, BaseCredentialsInfo credentials)
RemoteCredentialsService
updateCredentialsAuthenticationSucceeded
in interface RemoteCredentialsService
public org.alfresco.query.PagingResults<String> listAllRemoteSystems(org.alfresco.query.PagingRequest paging)
RemoteCredentialsService
listAllRemoteSystems
in interface RemoteCredentialsService
public org.alfresco.query.PagingResults<String> listPersonRemoteSystems(org.alfresco.query.PagingRequest paging)
RemoteCredentialsService
listPersonRemoteSystems
in interface RemoteCredentialsService
public org.alfresco.query.PagingResults<String> listSharedRemoteSystems(org.alfresco.query.PagingRequest paging)
RemoteCredentialsService
listSharedRemoteSystems
in interface RemoteCredentialsService
public org.alfresco.query.PagingResults<? extends BaseCredentialsInfo> listSharedCredentials(String remoteSystem, org.alfresco.service.namespace.QName credentialsType, org.alfresco.query.PagingRequest paging)
RemoteCredentialsService
listSharedCredentials
in interface RemoteCredentialsService
remoteSystem
- The Remote System to return credentials forcredentialsType
- Optional type (including child subtypes) of the credentials to filter bypublic org.alfresco.query.PagingResults<? extends BaseCredentialsInfo> listPersonCredentials(String remoteSystem, org.alfresco.service.namespace.QName credentialsType, org.alfresco.query.PagingRequest paging)
RemoteCredentialsService
listPersonCredentials
in interface RemoteCredentialsService
remoteSystem
- The Remote System to return credentials forcredentialsType
- Optional type (including child subtypes) of the credentials to filter bypublic org.alfresco.query.PagingResults<? extends BaseCredentialsInfo> listAllCredentials(String remoteSystem, org.alfresco.service.namespace.QName credentialsType, org.alfresco.query.PagingRequest paging)
RemoteCredentialsService
listAllCredentials
in interface RemoteCredentialsService
remoteSystem
- The Remote System to return credentials forcredentialsType
- Optional type (including child subtypes) of the credentials to filter byprotected static String getSharedCredentialsSystemContainerName()
protected static org.alfresco.service.namespace.QName getSharedCredentialsSystemContainerQName()
protected static void setSharedCredentialsSystemContainerName(String container)
Copyright © 2005–2017 Alfresco Software. All rights reserved.