|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.groups.ReferenceComponentGroupService
org.jasig.portal.groups.ReferenceCompositeGroupService
org.jasig.portal.groups.ReferenceIndividualGroupService
public class ReferenceIndividualGroupService
Reference individual, or leaf, group service.
| Field Summary | |
|---|---|
protected IEntitySearcher |
entitySearcher
|
protected IEntityGroupStore |
groupFactory
|
protected ComponentGroupServiceDescriptor |
serviceDescriptor
|
| Fields inherited from class org.jasig.portal.groups.ReferenceCompositeGroupService |
|---|
defaultService, entityFactory |
| Fields inherited from class org.jasig.portal.groups.ReferenceComponentGroupService |
|---|
componentServices, serviceName |
| Constructor Summary | |
|---|---|
ReferenceIndividualGroupService()
ReferenceGroupsService constructor. |
|
ReferenceIndividualGroupService(ComponentGroupServiceDescriptor svcDescriptor)
ReferenceGroupsService constructor. |
|
| Method Summary | |
|---|---|
protected boolean |
cacheInUse()
Answers if IGroupMembers are being cached. |
boolean |
contains(IEntityGroup group,
IGroupMember member)
Answers if group contains member. |
void |
deleteGroup(IEntityGroup group)
Removes the IEntityGroup from the cache and the store. |
void |
deleteGroup(ILockableEntityGroup group)
Removes the ILockableEntityGroup from the cache and the store,
including both parent and child memberships. |
Iterator |
findContainingGroups(IGroupMember gm)
Returns and caches the containing groups for the IGroupMember |
IEntityGroup |
findGroup(CompositeEntityIdentifier ent)
Returns a pre-existing IEntityGroup or null if it
does not exist. |
IEntityGroup |
findGroup(String key)
Returns a pre-existing IEntityGroup or null if it
does not exist. |
protected IEntityGroup |
findGroupWithCache(CompositeEntityIdentifier ent)
Returns a pre-existing IEntityGroup or null if it
does not exist. |
protected IEntityGroup |
findGroupWithCache(String key)
Returns a pre-existing IEntityGroup or null if it
does not exist. |
ILockableEntityGroup |
findGroupWithLock(String key,
String owner)
Returns a pre-existing ILockableEntityGroup or null if the
group is not found. |
ILockableEntityGroup |
findGroupWithLock(String key,
String owner,
int secs)
Returns a pre-existing ILockableEntityGroup or null if the
group is not found. |
protected Iterator |
findLocalMemberGroups(IEntityGroup eg)
Returns and caches the member groups for the IEntityGroup |
Iterator |
findMemberEntities(IEntityGroup group)
Finds the IEntities that are members of group. |
Iterator |
findMemberGroups(IEntityGroup eg)
Returns member groups for the IEntityGroup. |
Iterator |
findMembers(IEntityGroup eg)
Returns and members for the IEntityGroup. |
IEntity |
getEntity(String key,
Class type)
Returns an IEntity representing a portal entity. |
IEntityStore |
getEntityFactory()
Returns an IEntity representing a portal entity. |
protected IEntityGroup |
getGroupFromCache(String key)
Returns a cached IEntityGroup or null if it has not been cached. |
IGroupMember |
getGroupMember(EntityIdentifier underlyingEntityIdentifier)
Returns an IGroupMember representing either a group or a
portal entity, based on the EntityIdentifier, which
refers to the UNDERLYING entity for the IGroupMember. |
IGroupMember |
getGroupMember(String key,
Class type)
Returns an IGroupMember representing either a group or a
portal entity. |
IEntityGroupStore |
getGroupStore()
Returns the implementation of IEntityGroupStore whose class name
was retrieved by the PropertiesManager (see initialize()). |
protected ComponentGroupServiceDescriptor |
getServiceDescriptor()
|
boolean |
isEditable()
Answers if this service is updateable by the portal. |
boolean |
isEditable(IEntityGroup group)
Answers if the group can be updated or deleted in the store. |
protected boolean |
isForeign(IGroupMember member)
A foreign member is a group from a different service. |
protected boolean |
isInternallyManaged()
Answers if this service is managed by the portal and is therefore updatable. |
boolean |
isLeafService()
Answers if this service is a leaf in the composite; a service that actually operates on groups. |
IEntityGroup |
newGroup(Class type)
Returns a new IEntityGroup for the given Class with an unused
key. |
protected IEntityGroup |
primFindGroup(String localKey)
Returns a pre-existing IEntityGroup or null if it
does not exist. |
protected IEntity |
primGetEntity(String key,
Class type)
Returns an IEntity representing a portal entity. |
EntityIdentifier[] |
searchForEntities(String query,
int method,
Class type)
Find EntityIdentifiers for entities whose name matches the query string according to the specified method and is of the specified type |
EntityIdentifier[] |
searchForEntities(String query,
int method,
Class type,
IEntityGroup ancestor)
Find EntityIdentifiers for entities whose name matches the query string according to the specified method, is of the specified type and descends from the specified group |
EntityIdentifier[] |
searchForGroups(String query,
int method,
Class leaftype)
Find EntityIdentifiers for groups whose name matches the query string according to the specified method and matches the provided leaf type |
EntityIdentifier[] |
searchForGroups(String query,
int method,
Class leaftype,
IEntityGroup ancestor)
Find EntityIdentifiers for groups whose name matches the query string according to the specified method, has the provided leaf type and descends from the specified group |
protected void |
synchronizeGroupMembersOnDelete(IEntityGroup group)
Remove the back pointers of the group members of the deleted group. |
protected void |
synchronizeGroupMembersOnUpdate(IEntityGroup group)
Adjust the back pointers of the updated group members to either add or remove the parent group. |
protected void |
throwExceptionIfNotInternallyManaged()
|
void |
updateGroup(IEntityGroup group)
Update the store and the updated members. |
void |
updateGroup(ILockableEntityGroup group)
Updates the ILockableEntityGroup in the cache and the store. |
void |
updateGroup(ILockableEntityGroup group,
boolean renewLock)
Updates the ILockableEntityGroup in the store and removes
it from the cache. |
void |
updateGroupMembers(IEntityGroup group)
Update the store and the updated members. |
void |
updateGroupMembers(ILockableEntityGroup group)
Updates the ILockableEntityGroup in the cache and the store. |
void |
updateGroupMembers(ILockableEntityGroup group,
boolean renewLock)
Updates the ILockableEntityGroup in the store and removes
it from the cache. |
| Methods inherited from class org.jasig.portal.groups.ReferenceCompositeGroupService |
|---|
cacheAdd, cacheRemove, cacheUpdate, getComponentService, getComponentService, getDefaultService, getEntity, getEntityFromCache, initializeComponentServices, newCompositeEntityIdentifier, newGroup, setComponentServices |
| Methods inherited from class org.jasig.portal.groups.ReferenceComponentGroupService |
|---|
getComponentServices, getServiceName, setServiceName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jasig.portal.groups.ICompositeGroupService |
|---|
getEntity, newGroup |
| Methods inherited from interface org.jasig.portal.groups.IComponentGroupService |
|---|
getComponentServices, getServiceName, setServiceName |
| Field Detail |
|---|
protected ComponentGroupServiceDescriptor serviceDescriptor
protected IEntityGroupStore groupFactory
protected IEntitySearcher entitySearcher
| Constructor Detail |
|---|
public ReferenceIndividualGroupService()
throws GroupsException
GroupsException
public ReferenceIndividualGroupService(ComponentGroupServiceDescriptor svcDescriptor)
throws GroupsException
GroupsException| Method Detail |
|---|
protected boolean cacheInUse()
IGroupMembers are being cached.
public void deleteGroup(IEntityGroup group)
throws GroupsException
IEntityGroup from the cache and the store.
deleteGroup in interface IGroupServicedeleteGroup in interface IIndividualGroupServicegroup - IEntityGroup
GroupsException
public void deleteGroup(ILockableEntityGroup group)
throws GroupsException
ILockableEntityGroup from the cache and the store,
including both parent and child memberships.
deleteGroup in interface ILockableGroupServicegroup - ILockableEntityGroup
GroupsException
public Iterator findContainingGroups(IGroupMember gm)
throws GroupsException
IGroupMember
findContainingGroups in interface ICompositeGroupServicefindContainingGroups in interface IGroupServicefindContainingGroups in class ReferenceCompositeGroupServicegm - IGroupMember
GroupsException
public IEntityGroup findGroup(String key)
throws GroupsException
IEntityGroup or null if it
does not exist.
findGroup in interface ICompositeGroupServicefindGroup in interface IGroupServicefindGroup in class ReferenceCompositeGroupServiceGroupsException
public IEntityGroup findGroup(CompositeEntityIdentifier ent)
throws GroupsException
IEntityGroup or null if it
does not exist.
findGroup in interface IIndividualGroupServiceent - CompositeEntityIdentifier
GroupsException
protected IEntityGroup findGroupWithCache(String key)
throws GroupsException
IEntityGroup or null if it
does not exist.
GroupsException
protected IEntityGroup findGroupWithCache(CompositeEntityIdentifier ent)
throws GroupsException
IEntityGroup or null if it
does not exist.
GroupsException
public ILockableEntityGroup findGroupWithLock(String key,
String owner)
throws GroupsException
ILockableEntityGroup or null if the
group is not found.
findGroupWithLock in interface ICompositeGroupServicefindGroupWithLock in interface ILockableGroupServicefindGroupWithLock in class ReferenceCompositeGroupServicekey - String - the group key.owner - String - the lock owner.
GroupsException
public ILockableEntityGroup findGroupWithLock(String key,
String owner,
int secs)
throws GroupsException
ILockableEntityGroup or null if the
group is not found.
findGroupWithLock in interface ILockableGroupServicekey - String - the group key.owner - String - the lock owner.secs - int - the duration of the lock in seconds.
GroupsException
protected Iterator findLocalMemberGroups(IEntityGroup eg)
throws GroupsException
IEntityGroup
eg - IEntityGroup
GroupsException
public Iterator findMemberEntities(IEntityGroup group)
throws GroupsException
IEntities that are members of group.
GroupsException
public Iterator findMemberGroups(IEntityGroup eg)
throws GroupsException
IEntityGroup. First get the
member groups that are local to this service. Then retrieve the keys of
all of the member groups and ask the GroupService to find the groups
we do not yet have.
findMemberGroups in interface IGroupServiceeg - IEntityGroup
GroupsException
public Iterator findMembers(IEntityGroup eg)
throws GroupsException
IEntityGroup.
findMembers in interface IIndividualGroupServiceeg - IEntityGroup
GroupsException
public IEntity getEntity(String key,
Class type)
throws GroupsException
IEntity representing a portal entity. This does
not guarantee that the underlying entity actually exists.
getEntity in interface ICompositeGroupServicegetEntity in interface IGroupServicegetEntity in class ReferenceCompositeGroupServiceGroupsExceptionpublic IEntityStore getEntityFactory()
IEntity representing a portal entity. This does
not guarantee that the entity actually exists.
protected IEntityGroup getGroupFromCache(String key)
throws CachingException
IEntityGroup or null if it has not been cached.
CachingException
public IGroupMember getGroupMember(String key,
Class type)
throws GroupsException
IGroupMember representing either a group or a
portal entity. If the parm type is the group type,
the IGroupMember is an IEntityGroup else it is
an IEntity.
getGroupMember in interface ICompositeGroupServicegetGroupMember in interface IGroupServicegetGroupMember in class ReferenceCompositeGroupServiceGroupsException
public IGroupMember getGroupMember(EntityIdentifier underlyingEntityIdentifier)
throws GroupsException
IGroupMember representing either a group or a
portal entity, based on the EntityIdentifier, which
refers to the UNDERLYING entity for the IGroupMember.
getGroupMember in interface ICompositeGroupServicegetGroupMember in interface IGroupServicegetGroupMember in class ReferenceCompositeGroupServiceGroupsException
public IEntityGroupStore getGroupStore()
throws GroupsException
IEntityGroupStore whose class name
was retrieved by the PropertiesManager (see initialize()).
getGroupStore in interface IGroupServiceGroupsExceptionprotected ComponentGroupServiceDescriptor getServiceDescriptor()
public boolean isEditable(IEntityGroup group)
throws GroupsException
isEditable in interface IIndividualGroupServicegroup - IEntityGroup
GroupsExceptionprotected boolean isInternallyManaged()
public boolean isLeafService()
isLeafService in interface IComponentGroupServiceisLeafService in class ReferenceComponentGroupServicepublic boolean isEditable()
isEditable in interface IIndividualGroupService
public IEntityGroup newGroup(Class type)
throws GroupsException
IEntityGroup for the given Class with an unused
key.
newGroup in interface IGroupServicenewGroup in interface IIndividualGroupServiceGroupsException
protected IEntityGroup primFindGroup(String localKey)
throws GroupsException
IEntityGroup or null if it
does not exist.
primFindGroup in class ReferenceCompositeGroupServiceGroupsException
public EntityIdentifier[] searchForEntities(String query,
int method,
Class type)
throws GroupsException
ReferenceCompositeGroupService
searchForEntities in interface ICompositeGroupServicesearchForEntities in interface IGroupServicesearchForEntities in class ReferenceCompositeGroupServiceGroupsException
public EntityIdentifier[] searchForEntities(String query,
int method,
Class type,
IEntityGroup ancestor)
throws GroupsException
ReferenceCompositeGroupService
searchForEntities in interface ICompositeGroupServicesearchForEntities in interface IGroupServicesearchForEntities in class ReferenceCompositeGroupServiceGroupsException
public EntityIdentifier[] searchForGroups(String query,
int method,
Class leaftype)
throws GroupsException
ReferenceCompositeGroupService
searchForGroups in interface ICompositeGroupServicesearchForGroups in interface IGroupServicesearchForGroups in class ReferenceCompositeGroupServiceGroupsException
public EntityIdentifier[] searchForGroups(String query,
int method,
Class leaftype,
IEntityGroup ancestor)
throws GroupsException
ReferenceCompositeGroupService
searchForGroups in interface ICompositeGroupServicesearchForGroups in interface IGroupServicesearchForGroups in class ReferenceCompositeGroupServiceGroupsException
protected void throwExceptionIfNotInternallyManaged()
throws GroupsException
GroupsException
public void updateGroup(IEntityGroup group)
throws GroupsException
updateGroup in interface IGroupServiceupdateGroup in interface IIndividualGroupServicegroup - IEntityGroup
GroupsException
public void updateGroup(ILockableEntityGroup group)
throws GroupsException
ILockableEntityGroup in the cache and the store.
updateGroup in interface ILockableGroupServicegroup - ILockableEntityGroup
GroupsException
public void updateGroup(ILockableEntityGroup group,
boolean renewLock)
throws GroupsException
ILockableEntityGroup in the store and removes
it from the cache.
updateGroup in interface ILockableGroupServicegroup - ILockableEntityGroup
GroupsException
public void updateGroupMembers(IEntityGroup group)
throws GroupsException
updateGroupMembers in interface IGroupServiceupdateGroupMembers in interface IIndividualGroupServicegroup - IEntityGroup
GroupsException
public void updateGroupMembers(ILockableEntityGroup group)
throws GroupsException
ILockableEntityGroup in the cache and the store.
updateGroupMembers in interface ILockableGroupServicegroup - ILockableEntityGroup
GroupsException
public void updateGroupMembers(ILockableEntityGroup group,
boolean renewLock)
throws GroupsException
ILockableEntityGroup in the store and removes
it from the cache.
updateGroupMembers in interface ILockableGroupServicegroup - ILockableEntityGroup
GroupsException
protected IEntity primGetEntity(String key,
Class type)
throws GroupsException
IEntity representing a portal entity. This does
not guarantee that the underlying entity actually exists.
GroupsException
protected void synchronizeGroupMembersOnDelete(IEntityGroup group)
throws GroupsException
group - ILockableEntityGroup
GroupsException
protected void synchronizeGroupMembersOnUpdate(IEntityGroup group)
throws GroupsException
group - ILockableEntityGroup
GroupsException
public boolean contains(IEntityGroup group,
IGroupMember member)
throws GroupsException
group contains member.
If the group belongs to another service and the present service is
not editable, simply return false.
contains in interface IIndividualGroupServicegroup - org.jasig.portal.groups.IEntityGroupmember - org.jasig.portal.groups.IGroupMember
GroupsExceptionprotected boolean isForeign(IGroupMember member)
member - IGroupMember
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||