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 intGROUP_DELETEstatic intGROUP_READstatic intGROUP_WRITEstatic intOTHER_DELETEstatic intOTHER_READstatic intOTHER_WRITEstatic intUSER_DELETEstatic intUSER_READstatic intUSER_WRITE
-
Constructor Summary
Constructors Constructor Description Permission(int value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanDelete(DbUser user, long ownerUserId, long ownerGroupId)booleancanDeleteByGroup()booleancanDeleteByOther()booleancanDeleteByUser()booleancanRead(DbUser user, long ownerUserId, long ownerGroupId)booleancanReadByGroup()booleancanReadByOther()booleancanReadByUser()booleancanWrite(DbUser user, long ownerUserId, long ownerGroupId)booleancanWriteByGroup()booleancanWriteByOther()booleancanWriteByUser()intgetValue()booleanhasFlag(int flag)voidputFlag(int flag)voidremoveFlag(int flag)voidsetValue(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)
-
-