Serializable, Cloneable, Comparable<Entity>, Entitypublic class Permission extends AbstractEntity
The permission type tells what kind of action the user is allowed perform.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Permission.PermissionPropertiesComparator |
AbstractEntity.CreateDateComparator, AbstractEntity.IdComparator, AbstractEntity.LastModifiedDateComparator| Modifier and Type | Field | Description |
|---|---|---|
static Permission.PermissionPropertiesComparator |
PERMISSION_PROPERTIES_COMPARATOR |
Comparator for comparing the main properties type, user, project
|
CREATE_DATE_COMPARATOR, ID_COMPARATOR, LAST_MODIFIED_DATE_COMPARATOR| Constructor | Description |
|---|---|
Permission() |
Default constructor (required by Hibernate).
|
Permission(PermissionType type,
User user) |
Grants permissions on all projects to the given user.
|
Permission(PermissionType type,
User user,
Project project) |
Grants permissions on all projects to the given user.
|
| Modifier and Type | Method | Description |
|---|---|---|
PermissionType |
getPermissionType() |
|
Project |
getProject() |
|
User |
getUser() |
|
void |
setPermissionType(PermissionType type) |
|
void |
setProject(Project project) |
May be null to indicate a permission on all projects.
|
void |
setUser(User user) |
|
String |
toString() |
clone, compareTo, equals, getCreateDate, getId, getLastModifiedDate, hashCode, isNew, setCreateDate, setId, setLastModifiedDatepublic static final Permission.PermissionPropertiesComparator PERMISSION_PROPERTIES_COMPARATOR
public Permission()
PENDING: should be private so that it can only be used by
Hibernate, to ensure that the fields which form an instance's identity
are always initialized/never null.
public Permission(PermissionType type, User user)
type - permission typeuser - granteepublic Permission(PermissionType type, User user, Project project)
type - permission typeuser - granteeproject - on which permission is granted, or null for all
projectspublic PermissionType getPermissionType()
public void setPermissionType(PermissionType type)
public User getUser()
public void setUser(User user)
public Project getProject()
public void setProject(Project project)
Copyright © 2002–2022 itracker. All rights reserved.