|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.epicentric.entity.implementations.generic.EntityWrapper
|
+--com.epicentric.entity.implementations.generic.ParentEntityWrapper
|
+--com.epicentric.entity.implementations.generic.ParentAndChildEntityWrapper
|
+--com.epicentric.user.UserGroup
Object representation of a Vignette Portal user group. This class uses the Entity Management Subsystem to allow flexibility
in the user group definition. A user group's attributes, such as its property set and allowable
parent/child relationships, are specified through descriptors in the entity management configuration file
(config/entity_management.xml by default). At startup, this configuration information is loaded into an
EntityType object, which is accessible through the UserGroup.getEntityType()
method.
Users in Vignette Portal also utilize the Entity Management Subsystem. An Entity parent/child relationship is
used to represent user group membership. The following provides an example of how to get a set of all
users that are immediate members of a group:
User groups can be retrieved through the
EntityType userEntityType = UserManager.getInstance().getUserEntityType();
try
{
Set users = userGroup.getChildren(userEntityType, false);
}
catch (EntityPersistenceException exception)
{
// handle exception
}
UserGroupManager or the
UIDRegistry.
| Field Summary | |
static String |
TITLE_PROPERTY_ID
ID for the 'title' user group property. |
| Fields inherited from class com.epicentric.entity.implementations.generic.EntityWrapper |
wrappedEntity |
| Method Summary | |
void |
addChild(ChildEntity entityToAdd)
Makes the supplied child entity a child of this user group. |
void |
addParent(ParentEntity entityToAdd)
Makes the supplied parent entity a parent of this user group. |
boolean |
canAddChild(ChildEntity childEntity)
Determines if the supplied child entity can be made a child of this user group. |
boolean |
canAddParent(ParentEntity parentEntity)
Determines if the supplied parent entity can be made a parent of this user group. |
boolean |
canRemoveChild(ChildEntity childEntity)
Determines if the supplied child entity can be removed as a child of this user group. |
boolean |
canRemoveParent(ParentEntity parentEntity)
Determines if the supplied parent entity can be removed as a parent of this user group. |
void |
delete()
Deletes the user group from the persistence store. |
boolean |
equals(Object obj)
|
Set |
getChildren(EntityType entityType,
boolean recursive)
Gets a Set of all children of this user group. |
EntityType |
getEntityType()
Get the entity type of this entity. |
Set |
getParents(EntityType entityType,
boolean recursive)
Gets a Set of all parents of this user group. |
Object |
getProperty(String propertyID)
Gets the value of a particular property for this user group. |
String |
getUID()
Gets the unique identifier for this user group. |
String |
getUIDType()
Gets the user group UID type. |
boolean |
hasChild(ChildEntity childEntity,
boolean recursive)
Determines if this user group has a particular child entity as a child. |
int |
hashCode()
|
boolean |
hasParent(ParentEntity parentEntity,
boolean recursive)
Determines if this user group has a particular parent entity as a parent. |
boolean |
isSystemPrincipal()
Determines whether this user group is internal (not visible outside the system). |
void |
removeChild(ChildEntity entityToRemove)
Removes the supplied child entity as a child of this user group. |
void |
removeParent(ParentEntity entityToRemove)
Removes the specified parent entity as a parent of this user group. |
void |
save()
Saves the user group to the persistence store. |
void |
setProperty(String propertyID,
Object value)
Sets the value of a particular property for this user group. |
| Methods inherited from class com.epicentric.entity.implementations.generic.EntityWrapper |
getPropertyDescriptor, getPropertyIDs, getPropertyIDs, propertyDescriptorIterator, propertyDescriptorIterator |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.epicentric.authorization.Permissionable |
getAuthorizationSpace, hasEndUserPermissions |
| Methods inherited from interface com.epicentric.authorization.Permissionable |
getAuthorizationSpace, hasEndUserPermissions |
| Methods inherited from interface com.epicentric.authorization.Principal |
getAllChildPrincipals, getAllParentPrincipals, getChildPrincipals, getParentPrincipals |
| Field Detail |
public static final String TITLE_PROPERTY_ID
| Method Detail |
public String getUID()
getUID in interface EntitygetUID in class com.epicentric.entity.implementations.generic.EntityWrapperpublic Object getProperty(String propertyID)
getProperty in interface EntitygetProperty in class com.epicentric.entity.implementations.generic.EntityWrapperpropertyID - ID of the property for which to return a value
public void setProperty(String propertyID,
Object value)
throws UniquePropertyValueConflictException,
EntityPersistenceException
setProperty in interface EntitysetProperty in class com.epicentric.entity.implementations.generic.EntityWrapperpropertyID - ID of the property for which to set the new valuevalue - Value to be set for propertyID. The data type of the object specified should
match the data type of the property being set.
public void save()
throws EntityPersistenceException
save in interface Entitysave in class com.epicentric.entity.implementations.generic.EntityWrapper
public void delete()
throws EntityPersistenceException,
EntityTypeNotDeletableException
delete in interface Entitydelete in class com.epicentric.entity.implementations.generic.EntityWrapper
public Set getParents(EntityType entityType,
boolean recursive)
throws EntityPersistenceException
getParents in interface ChildEntitygetParents in class com.epicentric.entity.implementations.generic.ParentAndChildEntityWrapperentityType - Type of parents to returnrecursive - If "true", this method recursively returns all parents.
If "false", this method returns only immediate parents.entityType exist.
public boolean hasParent(ParentEntity parentEntity,
boolean recursive)
throws EntityPersistenceException
hasParent in interface ChildEntityhasParent in class com.epicentric.entity.implementations.generic.ParentAndChildEntityWrapperparentEntity - Parent entity to testrecursive - If "true", all ancestors of this user group are searched for
parentEntity.
If "false", only the set of immediate parents is searched for
parentEntity.
public void addParent(ParentEntity entityToAdd)
throws EntityPersistenceException
addParent in interface ChildEntityaddParent in class com.epicentric.entity.implementations.generic.ParentAndChildEntityWrapperentityToAdd - Parent entity to be addedpublic boolean canAddParent(ParentEntity parentEntity)
canAddParent in interface ChildEntitycanAddParent in class com.epicentric.entity.implementations.generic.ParentAndChildEntityWrapper
public void removeParent(ParentEntity entityToRemove)
throws EntityPersistenceException
removeParent in interface ChildEntityremoveParent in class com.epicentric.entity.implementations.generic.ParentAndChildEntityWrapperentityToRemove - Parent entity to be removedpublic boolean canRemoveParent(ParentEntity parentEntity)
canRemoveParent in interface ChildEntitycanRemoveParent in class com.epicentric.entity.implementations.generic.ParentAndChildEntityWrapper
public Set getChildren(EntityType entityType,
boolean recursive)
throws EntityPersistenceException
getChildren in interface ParentEntitygetChildren in class com.epicentric.entity.implementations.generic.ParentEntityWrapperentityType - Type of children to return.recursive - If "true", this method recursively returns all children.
If "false", this method returns only immediate children.entityType exist.
public boolean hasChild(ChildEntity childEntity,
boolean recursive)
throws EntityPersistenceException
hasChild in interface ParentEntityhasChild in class com.epicentric.entity.implementations.generic.ParentEntityWrapperchildEntity - Child entity to testrecursive - If "true", all ancestors of this user group are searched for
childEntity.
If "false", only the set of immediate parents is searched for
childEntity.childEntity as a child; false otherwise
public void addChild(ChildEntity entityToAdd)
throws EntityPersistenceException
addChild in interface ParentEntityaddChild in class com.epicentric.entity.implementations.generic.ParentEntityWrapperentityToAdd - Child entity to be addedpublic boolean canAddChild(ChildEntity childEntity)
canAddChild in interface ParentEntitycanAddChild in class com.epicentric.entity.implementations.generic.ParentEntityWrapper
public void removeChild(ChildEntity entityToRemove)
throws EntityPersistenceException
removeChild in interface ParentEntityremoveChild in class com.epicentric.entity.implementations.generic.ParentEntityWrapperentityToRemove - Child entity to be removedpublic boolean canRemoveChild(ChildEntity childEntity)
canRemoveChild in interface ParentEntitycanRemoveChild in class com.epicentric.entity.implementations.generic.ParentEntityWrapperpublic boolean isSystemPrincipal()
isSystemPrincipal in interface com.epicentric.authorization.Principalcom.epicentric.authorization.Principalpublic boolean equals(Object obj)
equals in class com.epicentric.entity.implementations.generic.EntityWrapperpublic int hashCode()
hashCode in class com.epicentric.entity.implementations.generic.EntityWrapperpublic EntityType getEntityType()
EntitygetEntityType in interface EntitygetEntityType in class com.epicentric.entity.implementations.generic.EntityWrappercom.epicentric.entity.Entitypublic String getUIDType()
getUIDType in interface EntitygetUIDType in class com.epicentric.entity.implementations.generic.EntityWrapper
|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||