Package de.dlr.proseo.usermgr.model
Class User
java.lang.Object
de.dlr.proseo.usermgr.model.User
- All Implemented Interfaces:
org.springframework.data.domain.Persistable<String>
@Entity(name="users")
public class User
extends Object
implements org.springframework.data.domain.Persistable<String>
A prosEO user (actually the user's credentials).
- Author:
- Dr. Thomas Bassler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the user's set of authoritiesIndicates whether the user account is enabled; an account is always disabled, if its expiration date is in the pastGets the expiration date of the accountGets the group memberships for this usergetId()Gets the encrypted passwordGets the expiration date of the passwordgetQuota()Gets the data download quotaGets the user nameinthashCode()booleanisNew()(package private) voidSwitch "isNew" flag to indicate an existing entity after a repository call to save(…) or an instance creation by the persistence provider.voidsetAuthorities(Set<Authority> authorities) Sets the user's set of authoritiesvoidsetEnabled(Boolean enabled) Sets the enabling status of the user accountvoidsetExpirationDate(Date expirationDate) Sets the account expiration datevoidsetGroupMemberships(Set<GroupMember> groupMemberships) Sets the group memberships for this uservoidsetPassword(String password) Sets the encrypted passwordvoidsetPasswordExpirationDate(Date passwordExpirationDate) Sets the password expiration datevoidGets the data download quotavoidsetUsername(String username) Sets the user name
-
Constructor Details
-
User
public User()
-
-
Method Details
-
getUsername
Gets the user name- Returns:
- the user name
-
setUsername
Sets the user name- Parameters:
username- the user name to set
-
getPassword
Gets the encrypted password- Returns:
- the password
-
setPassword
Sets the encrypted password- Parameters:
password- the password to set
-
getEnabled
Indicates whether the user account is enabled; an account is always disabled, if its expiration date is in the past- Returns:
- true, if the user account is enabled, false otherwise
-
setEnabled
Sets the enabling status of the user account- Parameters:
enabled- the status to set
-
getExpirationDate
Gets the expiration date of the account- Returns:
- the expirationDate
-
setExpirationDate
Sets the account expiration date- Parameters:
expirationDate- the expiration date to set
-
getPasswordExpirationDate
Gets the expiration date of the password- Returns:
- the password expiration date
-
setPasswordExpirationDate
Sets the password expiration date- Parameters:
passwordExpirationDate- the password expiration date to set
-
getQuota
Gets the data download quota- Returns:
- a Quota object
-
setQuota
Gets the data download quota- Parameters:
quota- the Quota object to set
-
getAuthorities
Gets the user's set of authorities- Returns:
- a set of authorities
-
setAuthorities
Sets the user's set of authorities- Parameters:
authorities- the authorities to set
-
getGroupMemberships
Gets the group memberships for this user- Returns:
- the groupMemberships
-
setGroupMemberships
Sets the group memberships for this user- Parameters:
groupMemberships- the groupMemberships to set
-
hashCode
public int hashCode() -
equals
-
getId
- Specified by:
getIdin interfaceorg.springframework.data.domain.Persistable<String>
-
isNew
public boolean isNew()- Specified by:
isNewin interfaceorg.springframework.data.domain.Persistable<String>
-
markNotNew
void markNotNew()Switch "isNew" flag to indicate an existing entity after a repository call to save(…) or an instance creation by the persistence provider. (cf. https://docs.spring.io/spring-data/jpa/docs/2.2.5.RELEASE/reference/html/#reference)
-