Class JPAUser
- java.lang.Object
-
- org.apache.syncope.core.persistence.jpa.entity.AbstractEntity
-
- org.apache.syncope.core.persistence.jpa.entity.AbstractGeneratedKeyEntity
-
- org.apache.syncope.core.persistence.jpa.entity.AbstractAny<P>
-
- org.apache.syncope.core.persistence.jpa.entity.AbstractGroupableRelatable<User,UMembership,UPlainAttr,AnyObject,URelationship>
-
- org.apache.syncope.core.persistence.jpa.entity.user.JPAUser
-
- All Implemented Interfaces:
Serializable
,Any<UPlainAttr>
,Attributable<UPlainAttr>
,Entity
,GroupableRelatable<User,UMembership,UPlainAttr,AnyObject,URelationship>
,Account
,User
- Direct Known Subclasses:
JPAJSONUser
@Entity public class JPAUser extends AbstractGroupableRelatable<User,UMembership,UPlainAttr,AnyObject,URelationship> implements User
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.syncope.core.persistence.jpa.entity.AbstractEntity
LOG
-
Fields inherited from interface org.apache.syncope.core.persistence.api.entity.Entity
EMAIL_PATTERN, ID_PATTERN, ID_REGEX
-
-
Constructor Summary
Constructors Constructor Description JPAUser()
-
Method Summary
-
Methods inherited from class org.apache.syncope.core.persistence.jpa.entity.AbstractGroupableRelatable
getMembership, getPlainAttr, getPlainAttr, getPlainAttrs, getPlainAttrs, getPlainAttrs, getRelationships, getRelationships, remove
-
Methods inherited from class org.apache.syncope.core.persistence.jpa.entity.AbstractAny
getCreationContext, getCreationDate, getCreator, getLastChangeContext, getLastChangeDate, getLastModifier, getRealm, setCreationContext, setCreationDate, setCreator, setLastChangeContext, setLastChangeDate, setLastModifier, setRealm
-
Methods inherited from class org.apache.syncope.core.persistence.jpa.entity.AbstractGeneratedKeyEntity
getKey, setKey
-
Methods inherited from class org.apache.syncope.core.persistence.jpa.entity.AbstractEntity
checkImplementationType, checkType, equals, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.syncope.core.persistence.api.entity.Any
getCreationContext, getCreationDate, getCreator, getLastChangeContext, getLastChangeDate, getLastModifier, getRealm, setCreationContext, setCreationDate, setCreator, setLastChangeContext, setLastChangeDate, setLastModifier, setRealm
-
Methods inherited from interface org.apache.syncope.core.persistence.api.entity.Attributable
getPlainAttr, getPlainAttrs, remove
-
Methods inherited from interface org.apache.syncope.core.persistence.api.entity.GroupableRelatable
getMembership, getPlainAttr, getPlainAttrs, getPlainAttrs, getRelationships, getRelationships
-
-
-
-
Field Detail
-
TABLE
public static final String TABLE
- See Also:
- Constant Field Values
-
ENCRYPTOR
protected static final Encryptor ENCRYPTOR
-
TYPEREF
protected static final TypeReference<List<String>> TYPEREF
-
password
protected String password
-
plainAttrs
@Valid protected @Valid List<JPAUPlainAttr> plainAttrs
-
status
protected String status
-
token
protected String token
-
tokenExpireTime
protected OffsetDateTime tokenExpireTime
-
cipherAlgorithm
protected CipherAlgorithm cipherAlgorithm
-
passwordHistory
protected String passwordHistory
-
failedLogins
protected Integer failedLogins
Subsequent failed logins.
-
username
@NotNull(message="Blank username") protected @NotNull(message="Blank username") String username
Username/Login.
-
lastLoginDate
protected OffsetDateTime lastLoginDate
Last successful login date.
-
changePwdDate
protected OffsetDateTime changePwdDate
Change password date.
-
suspended
protected Boolean suspended
-
mustChangePassword
protected Boolean mustChangePassword
-
resources
protected List<JPAExternalResource> resources
Provisioning external resources.
-
auxClasses
protected List<JPAAnyTypeClass> auxClasses
-
relationships
@Valid protected @Valid List<JPAURelationship> relationships
-
memberships
@Valid protected @Valid List<JPAUMembership> memberships
-
securityQuestion
protected JPASecurityQuestion securityQuestion
-
securityAnswer
protected String securityAnswer
-
linkedAccounts
@Valid protected @Valid List<JPALinkedAccount> linkedAccounts
-
-
Method Detail
-
getType
public AnyType getType()
- Specified by:
getType
in interfaceAny<UPlainAttr>
-
setType
public void setType(AnyType type)
- Specified by:
setType
in interfaceAny<UPlainAttr>
-
add
public boolean add(ExternalResource resource)
- Specified by:
add
in interfaceAny<UPlainAttr>
-
getResources
public List<? extends ExternalResource> getResources()
- Specified by:
getResources
in interfaceAny<UPlainAttr>
-
getPassword
public String getPassword()
- Specified by:
getPassword
in interfaceAccount
-
setEncodedPassword
public void setEncodedPassword(String password, CipherAlgorithm cipherAlgorithm)
- Specified by:
setEncodedPassword
in interfaceAccount
-
setPassword
public void setPassword(String password)
- Specified by:
setPassword
in interfaceAccount
-
getCipherAlgorithm
public CipherAlgorithm getCipherAlgorithm()
- Specified by:
getCipherAlgorithm
in interfaceAccount
-
setCipherAlgorithm
public void setCipherAlgorithm(CipherAlgorithm cipherAlgorithm)
- Specified by:
setCipherAlgorithm
in interfaceAccount
-
canDecodeSecrets
public boolean canDecodeSecrets()
- Specified by:
canDecodeSecrets
in interfaceAccount
-
add
public boolean add(UPlainAttr attr)
- Specified by:
add
in interfaceAttributable<UPlainAttr>
-
internalGetPlainAttrs
protected List<? extends UPlainAttr> internalGetPlainAttrs()
- Specified by:
internalGetPlainAttrs
in classAbstractGroupableRelatable<User,UMembership,UPlainAttr,AnyObject,URelationship>
-
getStatus
public String getStatus()
- Specified by:
getStatus
in interfaceAny<UPlainAttr>
- Overrides:
getStatus
in classAbstractAny<UPlainAttr>
-
setStatus
public void setStatus(String status)
- Specified by:
setStatus
in interfaceAny<UPlainAttr>
- Overrides:
setStatus
in classAbstractAny<UPlainAttr>
-
generateToken
public void generateToken(int tokenLength, int tokenExpireTime)
- Specified by:
generateToken
in interfaceUser
-
removeToken
public void removeToken()
- Specified by:
removeToken
in interfaceUser
-
getTokenExpireTime
public OffsetDateTime getTokenExpireTime()
- Specified by:
getTokenExpireTime
in interfaceUser
-
checkToken
public boolean checkToken(String token)
- Specified by:
checkToken
in interfaceUser
-
hasTokenExpired
public boolean hasTokenExpired()
- Specified by:
hasTokenExpired
in interfaceUser
-
addToPasswordHistory
public void addToPasswordHistory(String password)
- Specified by:
addToPasswordHistory
in interfaceUser
-
removeOldestEntriesFromPasswordHistory
public void removeOldestEntriesFromPasswordHistory(int n)
- Specified by:
removeOldestEntriesFromPasswordHistory
in interfaceUser
-
getPasswordHistory
public List<String> getPasswordHistory()
- Specified by:
getPasswordHistory
in interfaceUser
-
getChangePwdDate
public OffsetDateTime getChangePwdDate()
- Specified by:
getChangePwdDate
in interfaceUser
-
setChangePwdDate
public void setChangePwdDate(OffsetDateTime changePwdDate)
- Specified by:
setChangePwdDate
in interfaceUser
-
getFailedLogins
public Integer getFailedLogins()
- Specified by:
getFailedLogins
in interfaceUser
-
setFailedLogins
public void setFailedLogins(Integer failedLogins)
- Specified by:
setFailedLogins
in interfaceUser
-
getLastLoginDate
public OffsetDateTime getLastLoginDate()
- Specified by:
getLastLoginDate
in interfaceUser
-
setLastLoginDate
public void setLastLoginDate(OffsetDateTime lastLoginDate)
- Specified by:
setLastLoginDate
in interfaceUser
-
getUsername
public String getUsername()
- Specified by:
getUsername
in interfaceAccount
-
setUsername
public void setUsername(String username)
- Specified by:
setUsername
in interfaceAccount
-
setSuspended
public void setSuspended(Boolean suspended)
- Specified by:
setSuspended
in interfaceAccount
-
isSuspended
public Boolean isSuspended()
- Specified by:
isSuspended
in interfaceAccount
-
setMustChangePassword
public void setMustChangePassword(boolean mustChangePassword)
- Specified by:
setMustChangePassword
in interfaceUser
-
isMustChangePassword
public boolean isMustChangePassword()
- Specified by:
isMustChangePassword
in interfaceUser
-
getSecurityQuestion
public SecurityQuestion getSecurityQuestion()
- Specified by:
getSecurityQuestion
in interfaceUser
-
setSecurityQuestion
public void setSecurityQuestion(SecurityQuestion securityQuestion)
- Specified by:
setSecurityQuestion
in interfaceUser
-
getSecurityAnswer
public String getSecurityAnswer()
- Specified by:
getSecurityAnswer
in interfaceUser
-
setSecurityAnswer
public void setSecurityAnswer(String securityAnswer)
- Specified by:
setSecurityAnswer
in interfaceUser
-
add
public boolean add(AnyTypeClass auxClass)
- Specified by:
add
in interfaceAny<UPlainAttr>
-
getAuxClasses
public List<? extends AnyTypeClass> getAuxClasses()
- Specified by:
getAuxClasses
in interfaceAny<UPlainAttr>
-
add
public boolean add(URelationship relationship)
- Specified by:
add
in interfaceGroupableRelatable<User,UMembership,UPlainAttr,AnyObject,URelationship>
-
getRelationship
public Optional<? extends URelationship> getRelationship(RelationshipType relationshipType, String otherEndKey)
- Specified by:
getRelationship
in interfaceGroupableRelatable<User,UMembership,UPlainAttr,AnyObject,URelationship>
-
getRelationships
public List<? extends URelationship> getRelationships()
- Specified by:
getRelationships
in interfaceGroupableRelatable<User,UMembership,UPlainAttr,AnyObject,URelationship>
-
add
public boolean add(UMembership membership)
- Specified by:
add
in interfaceGroupableRelatable<User,UMembership,UPlainAttr,AnyObject,URelationship>
-
remove
public boolean remove(UMembership membership)
- Specified by:
remove
in interfaceGroupableRelatable<User,UMembership,UPlainAttr,AnyObject,URelationship>
-
getMemberships
public List<? extends UMembership> getMemberships()
- Specified by:
getMemberships
in interfaceGroupableRelatable<User,UMembership,UPlainAttr,AnyObject,URelationship>
-
add
public boolean add(LinkedAccount account)
-
getLinkedAccount
public Optional<? extends LinkedAccount> getLinkedAccount(String resource, String connObjectKeyValue)
- Specified by:
getLinkedAccount
in interfaceUser
-
getLinkedAccounts
public List<? extends LinkedAccount> getLinkedAccounts(String resource)
- Specified by:
getLinkedAccounts
in interfaceUser
-
getLinkedAccounts
public List<? extends LinkedAccount> getLinkedAccounts()
- Specified by:
getLinkedAccounts
in interfaceUser
-
-