|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cmu.jspsurveymanager.data.Survey.Permission
public class Survey.Permission
A utility class used to determine and set permissions relating to specific Admins and surveys.
Field Summary | |
---|---|
static int |
DATA
Data access permission constant |
static int |
DELETE
Delete survey permission constant |
static char |
DENIED
Character that represents a denied permission. |
static int |
EDIT
Edit permission constant |
static int |
GRANT
Grant permission constant |
static char |
GRANTED
Character that represents a granted permission. |
static int |
STATUS
Status change permission constant |
static int |
USERS
User management permission constant |
Method Summary | |
---|---|
Admin[] |
adminsWithPermission()
|
void |
clear(Admin admin)
Method clearPermissions |
boolean |
get(Admin admin,
int perm)
Queries a permission for this survey for a particular user. |
void |
set(Admin admin)
Sets ALL permission values for this survey for a particular user. |
void |
set(Admin admin,
int perm,
char granted)
Sets a permission value for this survey for a particular user. |
void |
set(int admin,
int perm,
char granted)
Sets a permission value for this survey for a particular user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int GRANT
public static final int STATUS
public static final int EDIT
public static final int USERS
public static final int DATA
public static final int DELETE
public static final char GRANTED
public static final char DENIED
Method Detail |
---|
public boolean get(Admin admin, int perm)
admin
- the admin whose permissions are being checkedperm
- a constant representing a particular permission
public void set(Admin admin, int perm, char granted)
admin
- the admin whose permission is being setperm
- a constant representing a particular permissiongranted
- a boolean: true to grant and false to denypublic void set(int admin, int perm, char granted)
admin
- the ID of the admin whose permission is being setperm
- a constant representing a particular permissiongranted
- a boolean: true to grant and false to denypublic void set(Admin admin)
admin
- the ID of the admin whose permission is being setpublic void clear(Admin admin)
admin
- The Admin to clear permissions for.public Admin[] adminsWithPermission()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |