|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
public interface Permission
| Field Summary | |
|---|---|
static int |
DEFAULT_PERM
|
static String |
GROUP_STRING
|
static String |
OTHER_STRING
|
static int |
READ
|
static Permission |
SYSTEM_DEFAULT
|
static int |
UPDATE
|
static String |
USER_STRING
|
static int |
WRITE
|
| Method Summary | |
|---|---|
int |
getGroupPermissions()
|
String |
getOwner()
Gets the user who owns this resource |
String |
getOwnerGroup()
Gets the group |
int |
getPermissions()
Get the permissions |
int |
getPublicPermissions()
Get the active permissions for others |
int |
getUserPermissions()
Get the active permissions for the owner |
void |
read(DataInput istream)
Read the Permission from an input stream |
void |
setGroup(String group)
Set the owner group |
void |
setGroupPermissions(int perm)
Sets permissions for group |
void |
setOwner(String user)
Set the owner |
void |
setOwner(User user)
Set the owner passed as User object |
void |
setPermissions(int perm)
Set permissions |
void |
setPermissions(String str)
Set permissions using a string. |
void |
setPublicPermissions(int perm)
Set permissions for others |
void |
setUserPermissions(int perm)
Set permissions for the owner |
String |
toString()
Format permissions |
boolean |
validate(User user,
int perm)
Check if user has the requested permissions for this resource. |
| Field Detail |
|---|
static final int DEFAULT_PERM
static final Permission SYSTEM_DEFAULT
static final int READ
static final int WRITE
static final int UPDATE
static final String USER_STRING
static final String GROUP_STRING
static final String OTHER_STRING
| Method Detail |
|---|
int getGroupPermissions()
String getOwner()
String getOwnerGroup()
int getPermissions()
int getPublicPermissions()
int getUserPermissions()
void read(DataInput istream)
throws IOException
istream - Description of the Parameter
IOException - Description of the Exceptionvoid setGroup(String group)
group - The new group valuevoid setGroupPermissions(int perm)
perm - The new groupPermissions valuevoid setOwner(User user)
user - The new owner valuevoid setOwner(String user)
user - The new owner value
void setPermissions(String str)
throws SyntaxException
str - The new permissions
SyntaxException - Description of the Exceptionvoid setPermissions(int perm)
perm - The new permissions valuevoid setPublicPermissions(int perm)
perm - The new publicPermissions valuevoid setUserPermissions(int perm)
perm - The new userPermissions valueString toString()
toString in class Object
boolean validate(User user,
int perm)
user - The userperm - The requested permissions
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||