|
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.core.dbobj.SecuredDBObject
com.jcorporate.expresso.services.dbobj.SecurityDBObject
com.jcorporate.expresso.services.dbobj.UserGroup
UserGroup is a grouping of a number of users for security purposes. UserGroups are equivalent to 'roles' in other terminology.
| Nested Class Summary |
| Nested classes inherited from class com.jcorporate.expresso.core.dbobj.DBObject |
DBObject.FieldError, DBObject.FieldUpdate |
| Field Summary | |
static String |
ADMIN_GROUP
|
static String |
ALL_USERS_GROUP
used as default group for all users who register and their reg domain has no other group set |
static String |
DEMO_GROUP
|
static int |
GROUP_DESCRIP_MAX_LEN
|
static String |
GROUP_DESCRIPTION
|
static String |
GROUP_NAME_FIELD
|
static int |
GROUP_NAME_MAX_LEN
|
static String |
NOT_REG_USERS_GROUP
|
static String |
TABLE_NAME
|
static String |
UNKNOWN_USERS_GROUP
groups created as part of DBTool.setupSecurity bootstrap |
| Fields inherited from class com.jcorporate.expresso.services.dbobj.SecurityDBObject |
SECURITY_CONTEXT, SECURITY_OBJECTS |
| Fields inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject |
ADD, ALL_FUNCTIONS, CACHE_NAME, CACHE_TTY, DELETE, SEARCH, SYSTEM_ACCOUNT, SYSTEM_ACCOUNT_NAME, UPDATE |
| 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 | |
UserGroup()
construct object with superuser privileges |
|
UserGroup(ControllerRequest request)
For using DBObjects within Controllers. |
|
UserGroup(DBConnection localConnection)
constructor for db transactions; object will have superuser privileges unless you separately call setRequestingUid() |
|
UserGroup(int uid)
Initializes the usergroup with the permissions of the given user. |
|
| Method Summary | |
protected void |
checkAllReferredToBy()
Check referential integrity of objects referring to this object |
void |
delete()
Extend the super.delete() method to first delete the GroupMembers elements that refer to the group being deleted |
static List |
getAllGroups()
convenience method |
static UserGroup |
getGroup(String groupname)
|
String |
getGroupDescription()
convenience method |
String |
getGroupName()
convenience method |
Vector |
getValues()
Gets the valid values, specifically it returns a map of GroupNames to GroupDescriptions |
void |
populateDefaultValues()
Populates the default user groups. |
void |
setGroupName(String groupName)
convenience method |
protected void |
setupFields()
Method to set up the fields for this database object. |
| Methods inherited from class com.jcorporate.expresso.services.dbobj.SecurityDBObject |
overrideDataContext, setDataContext, setDBName |
| Methods inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject |
add, canRequesterAdd, canRequesterDelete, canRequesterRead, canRequesterUpdate, checkAllowed, copyAttributes, count, createSecurityCache, deleteAll, find, getRequestingUid, getString, getString, getString, getString, getString, getString, getSystemUid, instantiate, isAllowed, retrieve, search, searchAndRetrieveList, searchAndRetrieveList, setRequestingUid, update |
| 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_NAME_FIELD
public static final String GROUP_DESCRIPTION
public static final int GROUP_NAME_MAX_LEN
public static final int GROUP_DESCRIP_MAX_LEN
public static final String TABLE_NAME
public static final String ALL_USERS_GROUP
SimpleRegistration,
Constant Field Valuespublic static final String DEMO_GROUP
public static final String UNKNOWN_USERS_GROUP
public static final String NOT_REG_USERS_GROUP
public static final String ADMIN_GROUP
| Constructor Detail |
public UserGroup()
throws DBException
SecuredDBObject
public UserGroup(int uid)
throws DBException
uid - the User's uid
DBException - upon instantion error
public UserGroup(ControllerRequest request)
throws DBException
request - - The controller request handed to you by the framework.
public UserGroup(DBConnection localConnection)
throws DBException
localConnection - the connection which should be used, typically because of an ongoing transaction| Method Detail |
protected void checkAllReferredToBy()
throws DBException
checkAllReferredToBy in class DBObjectDBException - If the integrity cannot be verified
public void delete()
throws DBException
delete in interface DataObjectdelete in class SecuredDBObjectDBException - if delete is not allowed for the current user
protected void setupFields()
throws DBException
DBObject
setupFields in class DBObjectDBException - If there is an error setting up the fields
as requested. For example, if a field allowing null is requested
as part of the keySecuredDBObject
public Vector getValues()
throws DBException
getValues in interface LookupInterfacegetValues in class DBObjectDBException - upon error.DBObject.getValidValues(java.lang.String)
public void populateDefaultValues()
throws DBException
populateDefaultValues in class DBObjectDBException - Upon add error, never if it isn't overridden.
public String getGroupName()
throws DBException
DBException - upon error
public void setGroupName(String groupName)
throws DBException
groupName - the new gropu name
DBException - upon error
public static UserGroup getGroup(String groupname)
throws DBException
groupname - the new group name
DBException - upon error
public String getGroupDescription()
throws DBException
DBException - upon error
public static List getAllGroups()
throws DBException
DBException - upon error
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||