Class Permission
- java.lang.Object
-
- com.openindex.openestate.tool.utils.Permission
-
- All Implemented Interfaces:
Serializable
public class Permission extends Object implements Serializable
Permission.- Author:
- Andreas Rudolph
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
GROUP_DELETE
static int
GROUP_READ
static int
GROUP_WRITE
static int
OTHER_DELETE
static int
OTHER_READ
static int
OTHER_WRITE
static int
USER_DELETE
static int
USER_READ
static int
USER_WRITE
-
Constructor Summary
Constructors Constructor Description Permission(int value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canDelete(DbUser user, long ownerUserId, long ownerGroupId)
boolean
canDeleteByGroup()
boolean
canDeleteByOther()
boolean
canDeleteByUser()
boolean
canRead(DbUser user, long ownerUserId, long ownerGroupId)
boolean
canReadByGroup()
boolean
canReadByOther()
boolean
canReadByUser()
boolean
canWrite(DbUser user, long ownerUserId, long ownerGroupId)
boolean
canWriteByGroup()
boolean
canWriteByOther()
boolean
canWriteByUser()
int
getValue()
boolean
hasFlag(int flag)
void
putFlag(int flag)
void
removeFlag(int flag)
void
setValue(int value)
-
-
-
Field Detail
-
USER_READ
public static final int USER_READ
- See Also:
- Constant Field Values
-
USER_WRITE
public static final int USER_WRITE
- See Also:
- Constant Field Values
-
USER_DELETE
public static final int USER_DELETE
- See Also:
- Constant Field Values
-
GROUP_READ
public static final int GROUP_READ
- See Also:
- Constant Field Values
-
GROUP_WRITE
public static final int GROUP_WRITE
- See Also:
- Constant Field Values
-
GROUP_DELETE
public static final int GROUP_DELETE
- See Also:
- Constant Field Values
-
OTHER_READ
public static final int OTHER_READ
- See Also:
- Constant Field Values
-
OTHER_WRITE
public static final int OTHER_WRITE
- See Also:
- Constant Field Values
-
OTHER_DELETE
public static final int OTHER_DELETE
- See Also:
- Constant Field Values
-
-
Method Detail
-
canDelete
public final boolean canDelete(DbUser user, long ownerUserId, long ownerGroupId)
-
canDeleteByGroup
public final boolean canDeleteByGroup()
-
canDeleteByOther
public final boolean canDeleteByOther()
-
canDeleteByUser
public final boolean canDeleteByUser()
-
canRead
public final boolean canRead(DbUser user, long ownerUserId, long ownerGroupId)
-
canReadByGroup
public final boolean canReadByGroup()
-
canReadByOther
public final boolean canReadByOther()
-
canReadByUser
public final boolean canReadByUser()
-
canWrite
public final boolean canWrite(DbUser user, long ownerUserId, long ownerGroupId)
-
canWriteByGroup
public final boolean canWriteByGroup()
-
canWriteByOther
public final boolean canWriteByOther()
-
canWriteByUser
public final boolean canWriteByUser()
-
getValue
public final int getValue()
-
hasFlag
public final boolean hasFlag(int flag)
-
putFlag
public final void putFlag(int flag)
-
removeFlag
public final void removeFlag(int flag)
-
setValue
public final void setValue(int value)
-
-