|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.dataobjects.BaseDataObject
com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
com.jcorporate.expresso.core.dbobj.DBObject
com.jcorporate.expresso.services.dbobj.RowGroupPerms
storage for read/write permissions for a group, concerning a given row in the database this object and its table are a complement to the RowPermissions object and table. RowGroupPerms holds group permissions.
this object and its table should be manipulated only through RowSecuredDBObject
RowSecuredDBObject,
RowPermissions,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class com.jcorporate.expresso.core.dbobj.DBObject |
DBObject.FieldError, DBObject.FieldUpdate |
| Field Summary | |
static String |
GROUP
field name for the group about which "group privilege settings" (read/write) apply |
static String |
GROUP_PERMISSIONS_TABLE_NAME
|
static String |
PERMISSIONS
field name for bits that make up permissions; perms stored in this table, ROW_GRP_PERMS, have bits for owner and other which are unused. |
static String |
ROW_KEY
field name for primary key of row |
static String |
TABLE_NAME
field name for name of table |
| Fields inherited from class com.jcorporate.expresso.core.dbobj.DBObject |
ATTRIBUTE_ERROR, ATTRIBUTE_ERROR_MESSAGE, ATTRIBUTE_PAGE_LIMIT, BIG_DECIMAL_ZERO, EMAIL_MASK, EVENT_ADD, EVENT_DELETE, EVENT_UPDATE, FLOAT_MASK, INT_MASK, IS_CHECK_RELATIONAL_INTEGRITY, UPDATE_CHANGED_ONLY, WHERE_KEYWORD |
| Fields inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject |
anyFieldsDistinct, anyFieldsToRetrieve, appendCustomWhere, caseSensitiveQuery, customWhereClause, dbKey, distinctFields, localConnection, LONGBINARY_READ_DEFAULT_SIZE, maxRecords, myClassName, myUpdates, offsetRecord, recordSet, retrieveFields, sMetadataMap, sortKeys |
| Fields inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject |
currentStatus, globalMask |
| Fields inherited from interface com.jcorporate.expresso.core.dataobjects.DataObject |
STATUS_CURRENT, STATUS_DELETED, STATUS_NEW, STATUS_UPDATED |
| Constructor Summary | |
RowGroupPerms()
default constructor |
|
RowGroupPerms(RowGroupPerms model)
convenience copy constructor |
|
RowGroupPerms(String table,
String rowKey)
convenience constructor which sets table, key |
|
RowGroupPerms(String table,
String rowKey,
String grp)
convenience constructor which sets table, key, group |
|
| Method Summary | |
boolean |
canGroupAdministrate()
|
boolean |
canGroupRead()
|
boolean |
canGroupWrite()
|
String |
group()
get group name |
void |
group(String group)
Set group; will throw run-time exception if the entire key for this row, which includes tablename, row key, and group name, is longer than permitted maximum for the host database. |
String |
key()
|
void |
key(String key)
set the row key |
int |
permissions()
set permissions; not protected by test |
void |
permissions(int perm)
set permissions |
void |
setDefaultPermissions()
set group group is "Everybody" just sets fields--does not save; caller must call update() |
protected void |
setupFields()
override in subclesses, and be sure to call this as first line of override |
String |
table()
accessor for table name |
void |
table(String targetTable)
set the target table |
| Methods inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject |
getGlobalMask, getStatus, isGlobalMasked, setFieldsWithDefaults, setGlobalMask, setStatus |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String GROUP_PERMISSIONS_TABLE_NAME
public static final String TABLE_NAME
public static final String ROW_KEY
public static final String GROUP
public static final String PERMISSIONS
| Constructor Detail |
public RowGroupPerms()
throws DBException
public RowGroupPerms(String table,
String rowKey)
throws DBException
table - tablenamerowKey - pipe-delimited concatenation of all necessary values for keys
public RowGroupPerms(String table,
String rowKey,
String grp)
throws DBException
table - tablenamerowKey - pipe-delimited concatenation of all necessary values for keysgrp - name of group
public RowGroupPerms(RowGroupPerms model)
throws DBException
model - an object from which all attributes will be copies (table, group, perms)| Method Detail |
public boolean canGroupAdministrate()
throws DBException
DBException
public boolean canGroupRead()
throws DBException
DBException
public boolean canGroupWrite()
throws DBException
DBException
protected void setupFields()
throws DBException
setupFields in class DBObjectDBException - upon error
public String group()
throws DBException
DBException
public void group(String group)
throws DBException
group - the group string?
DBException - upon error
public void setDefaultPermissions()
throws DBException
DBException - upon error
public void permissions(int perm)
throws DBException
perm - Permissions code
DBException - upon error
public int permissions()
throws DBException
DBException - upon error
public String table()
throws DBException
DBException
public void table(String targetTable)
throws DBException
DBException
public String key()
throws DBException
DBException
public void key(String key)
throws DBException
DBException
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||