@Entity public class SubjectImpl extends Object implements Subject
Subject
-implementationConstructor and Description |
---|
SubjectImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List<Role> |
getApplicationroles(Application application) |
String |
getAuthName()
Returns the username of this
Account , e.g. |
@Size(max=8192,message="{validation.string.max}") String |
getDescription()
Returns the description.
|
String |
getDigest()
Returns the salted digest for this
AuthSubject . |
@Pattern(regexp="^([a-zA-Z0-9_\\.-])+@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,}$",message="{validation.email}") String |
getEmail()
Returns the email for this
Account , e.g. |
List<Group> |
getGroups()
|
Integer |
getId()
Returns the id.
|
@NotNull(message="{validation.notNull}") @Size(min=2,max=3,message="{validation.string.min.max}") String |
getLanguage()
Returns the language tag for this
Account in the IETF BCP
47 notation: <lang>-<country> .Examples: en en-US de de-CH |
@NotNull(message="{validation.notNull}") @Pattern(regexp="^([a-zA-Z0-9_\\.-])+(@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,})?$",message="{validation.username}") @Size(max=64,message="{validation.string.max}") String |
getName()
Returns the name.
|
@NotNull(message="{validation.notNull}") @Size(max=64,message="{validation.string.max}") String |
getRealname()
Returns the real name of this
Account , e.g. |
String |
getSalt()
Returns the salt for this
AuthSubject . |
String |
getTimeZone()
Returns the timezone for this
Account , e.g. |
String |
getTypeName() |
UserType |
getUserType()
Returns the
UserType . |
Date |
getVersion() |
boolean |
hasApplication(Application application)
|
int |
hashCode() |
boolean |
isAuthenticated()
Checks whether this
Subject is authenticated. |
boolean |
isAuthorized(Authorizable<?> authorizable)
Checks whether this
Subject has authorization for the given Authorizable . |
void |
setAuthenticated(boolean authenticated) |
void |
setDescription(String description) |
void |
setDigest(String digest)
Sets the salted digest for this
AuthSubject . |
void |
setEmail(String email) |
void |
setGroups(List<Group> groups) |
void |
setId(Integer id) |
void |
setLanguage(String language) |
void |
setName(String name) |
void |
setRealname(String username) |
void |
setSalt(String salt)
Sets the salt for this
AuthSubject . |
void |
setTimeZone(String timeZone) |
void |
setTypeName(String typeName) |
void |
setUserType(UserType userType) |
void |
setVersion(Date version) |
String |
toString() |
@NotNull(message="{validation.notNull}") @Pattern(regexp="^([a-zA-Z0-9_\\.-])+(@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,})?$", message="{validation.username}") @Size(max=64, message="{validation.string.max}") public @NotNull(message="{validation.notNull}") @Pattern(regexp="^([a-zA-Z0-9_\\.-])+(@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,})?$",message="{validation.username}") @Size(max=64,message="{validation.string.max}") String getName()
Nameable
public void setName(String name)
@Size(max=8192, message="{validation.string.max}") public @Size(max=8192,message="{validation.string.max}") String getDescription()
Nameable
getDescription
in interface Nameable
public void setDescription(String description)
public Integer getId()
Identifiable
getId
in interface Identifiable<Integer>
public void setId(Integer id)
public Date getVersion()
public void setVersion(Date version)
@NotNull(message="{validation.notNull}") @Size(min=2, max=3, message="{validation.string.min.max}") public @NotNull(message="{validation.notNull}") @Size(min=2,max=3,message="{validation.string.min.max}") String getLanguage()
Account
Account
in the IETF BCP
47 notation: <lang>-<country>
.getLanguage
in interface Account
Locale.forLanguageTag(String)
public void setLanguage(String language)
@NotNull(message="{validation.notNull}") @Size(max=64, message="{validation.string.max}") public @NotNull(message="{validation.notNull}") @Size(max=64,message="{validation.string.max}") String getRealname()
Account
Account
, e.g. 'appNG Administrator'.getRealname
in interface Account
public void setRealname(String username)
@Pattern(regexp="^([a-zA-Z0-9_\\.-])+@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,}$", message="{validation.email}") public @Pattern(regexp="^([a-zA-Z0-9_\\.-])+@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]){2,}$",message="{validation.email}") String getEmail()
Account
Account
, e.g. 'admin@example.com'.public void setEmail(String email)
public String getDigest()
AuthSubject
AuthSubject
.getDigest
in interface AuthSubject
public void setDigest(String digest)
AuthSubject
AuthSubject
.setDigest
in interface AuthSubject
digest
- the digestpublic String getSalt()
AuthSubject
AuthSubject
.getSalt
in interface AuthSubject
public void setSalt(String salt)
AuthSubject
AuthSubject
.setSalt
in interface AuthSubject
salt
- the saltpublic UserType getUserType()
Subject
UserType
.getUserType
in interface Subject
UserType
public void setUserType(UserType userType)
public boolean isAuthenticated()
Subject
Subject
is authenticated.isAuthenticated
in interface Subject
true
if this Subject
is authenticated, false
otherwisepublic void setAuthenticated(boolean authenticated)
public boolean hasApplication(Application application)
Subject
hasApplication
in interface Subject
application
- the Application
true
if this Subject
owns at least one Role
of the the given Application
, false
otherwisepublic List<Role> getApplicationroles(Application application)
public boolean isAuthorized(Authorizable<?> authorizable)
Subject
Subject
has authorization for the given Authorizable
.isAuthorized
in interface Subject
authorizable
- the Authorizable
true
if this Subject
has authorization for the given Authorizable
, false
otherwisepublic String getTimeZone()
Account
Account
, e.g. 'Europe/Berlin'.getTimeZone
in interface Account
public void setTimeZone(String timeZone)
public String getAuthName()
Account
Account
, e.g. 'admin'.getAuthName
in interface Account
public String getTypeName()
public void setTypeName(String typeName)
Copyright © 2011–2017 aiticon GmbH. All rights reserved.