public class UserIdentificationImpl extends UserIdentification
ASC_ORDER, DESC_ORDER, SORT_BY_CONNECTION, SORT_BY_HOST, SORT_BY_LASTSUBMIT, SORT_BY_NAME, SORT_BY_SUBMIT, toRemove
Constructor and Description |
---|
UserIdentificationImpl(String username,
String tenant,
String domain)
Constructor of user identification using user name.
|
UserIdentificationImpl(String username,
Subject subject)
Constructor of user identification using user name and admin property.
|
Modifier and Type | Method and Description |
---|---|
void |
addSubmit()
Add one to the submit number
|
void |
cancelSession()
Cancel the current session of the user
|
boolean |
checkPermission(Permission permission,
String errorMessage)
Checks if user has the specified permission.
|
boolean |
equals(Object obj) |
long |
getConnectionTime()
Get the time of the connection of this user.
|
String |
getDomain()
Return the domain name associated with the current user, or null if no domain is associated
|
Set<String> |
getGroups()
To get the groups associated with this user name
|
String |
getHostName()
Get the host name of this user.
|
long |
getLastSubmitTime()
Get the last time this user has submit a job.
|
Set<JobPriority> |
getPriorityPermission() |
TimerTask |
getSession()
Get the session for this user (timer task)
|
Subject |
getSubject()
Gets user's subject retrieved from JAAS authentication
|
int |
getSubmitNumber()
Get the number of submit for this user.
|
String |
getTenant()
Return the tenant associated with the current user, or null if no tenant is associated
|
HashSet<SchedulerEvent> |
getUserEvents()
Returns the userEvents.
|
String |
getUsername()
To get the user name
|
int |
hashCode() |
boolean |
isAllJobPlannerPermission()
Check if the user has all job planner permission
|
boolean |
isAllTenantPermission() |
boolean |
isCanCreateAssociationPermission()
Check if the user can create a job-planner association
|
boolean |
isHandleOnlyMyJobsPermission()
Check if the user has permission to handle only its jobs
|
boolean |
isMyEventsOnly()
Get the myEventsOnly.
|
boolean |
isNotificationAdminPermission()
Check if the user has all Notification Service permissions;
|
boolean |
isOtherUsersJobReadPermission()
Check if the user has permission to read other users' jobs
|
boolean |
isPcaAdminPermission()
Check if the user has all Service Automation permissions
|
boolean |
isRMCoreAllPermission()
Check if the user has all Resource Manager permissions
|
boolean |
isSchedulerAdminPermission()
Check if the user has all Scheduler permissions
|
void |
setHostName(String hostName)
Sets the hostName to the given hostName value.
|
void |
setMyEventsOnly(boolean myEventsOnly)
Set the myEventsOnly value to the given myEventsOnly value.
|
void |
setSession(TimerTask session)
Set the session value to the given session value
If the user has already a session active, it will be cancelled and replaced by the new one.
|
void |
setToRemove()
Set this user to be removed by update method.
|
void |
setUserEvents(SchedulerEvent[] events)
Sets the userEvents to the given userEvents value.
|
String |
toString() |
compareTo, isToRemove, setSortingBy, setSortingOrder
public UserIdentificationImpl(String username, String tenant, String domain)
username
- the user name.tenant
- user tenantpublic void setToRemove()
public String getUsername()
UserIdentification
getUsername
in class UserIdentification
UserIdentification.getUsername()
public Set<String> getGroups()
UserIdentification
getGroups
in class UserIdentification
public String getTenant()
UserIdentification
getTenant
in class UserIdentification
public String getDomain()
UserIdentification
getDomain
in class UserIdentification
public boolean isAllTenantPermission()
isAllTenantPermission
in class UserIdentification
public Set<JobPriority> getPriorityPermission()
public boolean isAllJobPlannerPermission()
UserIdentification
isAllJobPlannerPermission
in class UserIdentification
public boolean isCanCreateAssociationPermission()
UserIdentification
isCanCreateAssociationPermission
in class UserIdentification
public boolean isPcaAdminPermission()
UserIdentification
isPcaAdminPermission
in class UserIdentification
public boolean isNotificationAdminPermission()
UserIdentification
isNotificationAdminPermission
in class UserIdentification
public boolean isRMCoreAllPermission()
UserIdentification
isRMCoreAllPermission
in class UserIdentification
public boolean isSchedulerAdminPermission()
UserIdentification
isSchedulerAdminPermission
in class UserIdentification
public boolean isHandleOnlyMyJobsPermission()
UserIdentification
isHandleOnlyMyJobsPermission
in class UserIdentification
public boolean isOtherUsersJobReadPermission()
UserIdentification
isOtherUsersJobReadPermission
in class UserIdentification
public void addSubmit()
public int getSubmitNumber()
UserIdentification
getSubmitNumber
in class UserIdentification
UserIdentification.getSubmitNumber()
public HashSet<SchedulerEvent> getUserEvents()
public void setHostName(String hostName)
hostName
- the hostName to set.public void setUserEvents(SchedulerEvent[] events)
events
- the userEvents to set.public long getConnectionTime()
UserIdentification
getConnectionTime
in class UserIdentification
UserIdentification.getConnectionTime()
public String getHostName()
UserIdentification
getHostName
in class UserIdentification
UserIdentification.getHostName()
public long getLastSubmitTime()
UserIdentification
getLastSubmitTime
in class UserIdentification
UserIdentification.getLastSubmitTime()
public boolean isMyEventsOnly()
UserIdentification
isMyEventsOnly
in class UserIdentification
UserIdentification.isMyEventsOnly()
public void setMyEventsOnly(boolean myEventsOnly)
myEventsOnly
- the myEventsOnly to set.public TimerTask getSession()
UserIdentification
getSession
in class UserIdentification
UserIdentification.getSession()
public void cancelSession()
public void setSession(TimerTask session)
session
- the session to setpublic boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public boolean checkPermission(Permission permission, String errorMessage) throws PermissionException
SecurityException
otherwise with specified error messagePermissionException
public Subject getSubject()