public class RepositoryAuthenticationDao extends java.lang.Object implements MutableAuthenticationDao, org.springframework.beans.factory.InitializingBean, NodeServicePolicies.OnUpdatePropertiesPolicy, NodeServicePolicies.BeforeDeleteNodePolicy
Policy.Arg| Modifier and Type | Field and Description |
|---|---|
protected AuthorityService |
authorityService |
protected org.alfresco.service.namespace.NamespacePrefixResolver |
namespacePrefixResolver |
protected org.alfresco.service.cmr.repository.NodeService |
nodeService |
protected net.sf.acegisecurity.providers.encoding.PasswordEncoder |
passwordEncoder |
protected PolicyComponent |
policyComponent |
protected net.sf.acegisecurity.providers.encoding.PasswordEncoder |
sha256PasswordEncoder |
protected org.alfresco.repo.tenant.TenantService |
tenantService |
ARG_0, ARG_1, ARG_2, QNAMEQNAME| Constructor and Description |
|---|
RepositoryAuthenticationDao() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Called before a node is deleted.
|
void |
createUser(java.lang.String caseSensitiveUserName,
char[] rawPassword)
Create a user with the given userName and password
|
void |
deleteUser(java.lang.String userName)
Delete a user.
|
boolean |
getAccountExpires(java.lang.String userName)
Does the account expire?
|
java.util.Date |
getAccountExpiryDate(java.lang.String userName)
Get the date when this account expires.
|
boolean |
getAccountHasExpired(java.lang.String userName)
Has the account expired?
|
boolean |
getAccountlocked(java.lang.String userName)
Is the account locked?
|
boolean |
getCredentialsExpire(java.lang.String userName)
Do the credentials for the user expire?
|
protected boolean |
getCredentialsExpire(java.lang.String userName,
java.util.Map properties) |
java.util.Date |
getCredentialsExpiryDate(java.lang.String userName)
Get the date when the credentials/password expire.
|
boolean |
getCredentialsHaveExpired(java.lang.String userName)
Have the credentials for the user expired?
|
protected boolean |
getCredentialsHaveExpired(java.lang.String userName,
java.util.Map properties,
java.lang.Boolean isAdminAuthority) |
boolean |
getEnabled(java.lang.String userName)
Getter for user enabled
|
protected boolean |
getEnabled(java.lang.String userName,
java.util.Map properties,
java.lang.Boolean isAdminAuthority) |
protected boolean |
getHasExpired(java.lang.String userName,
java.util.Map properties,
java.lang.Boolean isAdminAuthority) |
boolean |
getLocked(java.lang.String userName)
Check if the account is locked
|
protected boolean |
getLocked(java.lang.String userName,
java.util.Map properties,
java.lang.Boolean isAdminAuthority) |
java.lang.String |
getMD4HashedPassword(java.lang.String userName)
Get the MD4 password hash
|
java.lang.Object |
getSalt(net.sf.acegisecurity.UserDetails userDetails) |
org.alfresco.service.cmr.repository.NodeRef |
getUserOrNull(java.lang.String caseSensitiveSearchUserName) |
protected java.util.Map |
getUserProperties(java.lang.String userName) |
net.sf.acegisecurity.UserDetails |
loadUserByUsername(java.lang.String incomingUserName) |
void |
onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
Called after a node's properties have been changed.
|
void |
onUpdateUserProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Map before,
java.util.Map after) |
void |
setAccountExpires(java.lang.String userName,
boolean expires)
Set if the account should expire
|
void |
setAccountExpiryDate(java.lang.String userName,
java.util.Date exipryDate)
Set the date on which the account expires
|
void |
setAuthenticationCache(org.alfresco.repo.cache.SimpleCache authenticationCache) |
void |
setAuthorityService(AuthorityService authorityService) |
void |
setCredentialsExpire(java.lang.String userName,
boolean expires)
Set if the password expires.
|
void |
setCredentialsExpiryDate(java.lang.String userName,
java.util.Date exipryDate)
Set the date when credentials expire.
|
void |
setEnabled(java.lang.String userName,
boolean enabled)
Enable/disable a user.
|
void |
setLocked(java.lang.String userName,
boolean locked)
Set if the account is locked.
|
void |
setNamespaceService(org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPasswordEncoder(net.sf.acegisecurity.providers.encoding.PasswordEncoder passwordEncoder) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setSha256PasswordEncoder(net.sf.acegisecurity.providers.encoding.PasswordEncoder passwordEncoder) |
void |
setSingletonCache(org.alfresco.repo.cache.SimpleCache singletonCache) |
void |
setTenantService(org.alfresco.repo.tenant.TenantService tenantService) |
void |
setTransactionService(TransactionService transactionService) |
void |
updateUser(java.lang.String userName,
char[] rawPassword)
Update a user's password.
|
boolean |
userExists(java.lang.String userName)
Check is a user exists.
|
protected AuthorityService authorityService
protected org.alfresco.service.cmr.repository.NodeService nodeService
protected org.alfresco.repo.tenant.TenantService tenantService
protected org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver
protected net.sf.acegisecurity.providers.encoding.PasswordEncoder passwordEncoder
protected net.sf.acegisecurity.providers.encoding.PasswordEncoder sha256PasswordEncoder
protected PolicyComponent policyComponent
public void setNamespaceService(org.alfresco.service.namespace.NamespacePrefixResolver namespacePrefixResolver)
public void setAuthorityService(AuthorityService authorityService)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
public void setSingletonCache(org.alfresco.repo.cache.SimpleCache singletonCache)
public void setPasswordEncoder(net.sf.acegisecurity.providers.encoding.PasswordEncoder passwordEncoder)
public void setSha256PasswordEncoder(net.sf.acegisecurity.providers.encoding.PasswordEncoder passwordEncoder)
public void setPolicyComponent(PolicyComponent policyComponent)
public void setAuthenticationCache(org.alfresco.repo.cache.SimpleCache authenticationCache)
public void setTransactionService(TransactionService transactionService)
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic net.sf.acegisecurity.UserDetails loadUserByUsername(java.lang.String incomingUserName)
throws net.sf.acegisecurity.providers.dao.UsernameNotFoundException,
org.springframework.dao.DataAccessException
loadUserByUsername in interface net.sf.acegisecurity.providers.dao.AuthenticationDaonet.sf.acegisecurity.providers.dao.UsernameNotFoundExceptionorg.springframework.dao.DataAccessExceptionpublic org.alfresco.service.cmr.repository.NodeRef getUserOrNull(java.lang.String caseSensitiveSearchUserName)
caseSensitiveSearchUserName - case sensitive user namepublic void createUser(java.lang.String caseSensitiveUserName,
char[] rawPassword)
throws org.alfresco.repo.security.authentication.AuthenticationException
MutableAuthenticationDaocreateUser in interface MutableAuthenticationDaoorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void updateUser(java.lang.String userName,
char[] rawPassword)
throws org.alfresco.repo.security.authentication.AuthenticationException
MutableAuthenticationDaoupdateUser in interface MutableAuthenticationDaoorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic void deleteUser(java.lang.String userName)
throws org.alfresco.repo.security.authentication.AuthenticationException
MutableAuthenticationDaodeleteUser in interface MutableAuthenticationDaoorg.alfresco.repo.security.authentication.AuthenticationExceptionpublic java.lang.Object getSalt(net.sf.acegisecurity.UserDetails userDetails)
getSalt in interface net.sf.acegisecurity.providers.dao.SaltSourcepublic boolean userExists(java.lang.String userName)
MutableAuthenticationDaouserExists in interface MutableAuthenticationDaoprotected java.util.Map getUserProperties(java.lang.String userName)
public boolean getAccountExpires(java.lang.String userName)
MutableAuthenticationDaogetAccountExpires in interface MutableAuthenticationDaopublic java.util.Date getAccountExpiryDate(java.lang.String userName)
MutableAuthenticationDaogetAccountExpiryDate in interface MutableAuthenticationDaopublic boolean getAccountHasExpired(java.lang.String userName)
MutableAuthenticationDaogetAccountHasExpired in interface MutableAuthenticationDaoprotected boolean getHasExpired(java.lang.String userName,
java.util.Map properties,
java.lang.Boolean isAdminAuthority)
userName - the usernameproperties - user properties or null to fetch thempublic boolean getLocked(java.lang.String userName)
MutableAuthenticationDaogetLocked in interface MutableAuthenticationDaouserName - the usernamepublic boolean getAccountlocked(java.lang.String userName)
MutableAuthenticationDaogetAccountlocked in interface MutableAuthenticationDaoprotected boolean getLocked(java.lang.String userName,
java.util.Map properties,
java.lang.Boolean isAdminAuthority)
userName - the usernameproperties - user properties or null to fetch thempublic boolean getCredentialsExpire(java.lang.String userName)
MutableAuthenticationDaogetCredentialsExpire in interface MutableAuthenticationDaoprotected boolean getCredentialsExpire(java.lang.String userName,
java.util.Map properties)
userName - the usernameproperties - user properties or null to fetch thempublic java.util.Date getCredentialsExpiryDate(java.lang.String userName)
MutableAuthenticationDaogetCredentialsExpiryDate in interface MutableAuthenticationDaopublic boolean getCredentialsHaveExpired(java.lang.String userName)
MutableAuthenticationDaogetCredentialsHaveExpired in interface MutableAuthenticationDaoprotected boolean getCredentialsHaveExpired(java.lang.String userName,
java.util.Map properties,
java.lang.Boolean isAdminAuthority)
userName - the username (never nullproperties - the properties associated with the user or null to get themisAdminAuthority - is admin authoritypublic boolean getEnabled(java.lang.String userName)
MutableAuthenticationDaogetEnabled in interface MutableAuthenticationDaoprotected boolean getEnabled(java.lang.String userName,
java.util.Map properties,
java.lang.Boolean isAdminAuthority)
userName - the usernameproperties - the user's properties or nullpublic void setAccountExpires(java.lang.String userName,
boolean expires)
MutableAuthenticationDaosetAccountExpires in interface MutableAuthenticationDaopublic void setAccountExpiryDate(java.lang.String userName,
java.util.Date exipryDate)
MutableAuthenticationDaosetAccountExpiryDate in interface MutableAuthenticationDaopublic void setCredentialsExpire(java.lang.String userName,
boolean expires)
MutableAuthenticationDaosetCredentialsExpire in interface MutableAuthenticationDaopublic void setCredentialsExpiryDate(java.lang.String userName,
java.util.Date exipryDate)
MutableAuthenticationDaosetCredentialsExpiryDate in interface MutableAuthenticationDaopublic void setEnabled(java.lang.String userName,
boolean enabled)
MutableAuthenticationDaosetEnabled in interface MutableAuthenticationDaopublic void setLocked(java.lang.String userName,
boolean locked)
MutableAuthenticationDaosetLocked in interface MutableAuthenticationDaopublic java.lang.String getMD4HashedPassword(java.lang.String userName)
MutableAuthenticationDaogetMD4HashedPassword in interface MutableAuthenticationDaopublic void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
NodeServicePolicies.OnUpdatePropertiesPolicyonUpdateProperties in interface NodeServicePolicies.OnUpdatePropertiesPolicynodeRef - reference to the updated nodebefore - the node's properties before the changeafter - the node's properties after the changepublic void onUpdateUserProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
public void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
NodeServicePolicies.BeforeDeleteNodePolicybeforeDeleteNode in interface NodeServicePolicies.BeforeDeleteNodePolicynodeRef - the node referenceCopyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.