org.jasig.portal.groups.smartldap
Class SmartLdapGroupStore

java.lang.Object
  extended by org.jasig.portal.groups.smartldap.SmartLdapGroupStore
All Implemented Interfaces:
IEntityGroupStore, IGroupConstants

public final class SmartLdapGroupStore
extends Object
implements IEntityGroupStore


Nested Class Summary
static class SmartLdapGroupStore.Factory
           
 
Field Summary
static String ROOT_DESC
           
static IEntityGroup ROOT_GROUP
           
static String ROOT_KEY
           
static String UNSUPPORTED_MESSAGE
           
 
Fields inherited from interface org.jasig.portal.groups.IGroupConstants
CHANNEL_CATEGORIES, CONTAINS, ENDS_WITH, EVERYONE, IS, NODE_SEPARATOR, PORTAL_ADMINISTRATORS, STARTS_WITH
 
Method Summary
 boolean contains(IEntityGroup group, IGroupMember member)
          Answers if group contains member.
 void delete(IEntityGroup group)
          Delete this IEntityGroup from the data store.
 IEntityGroup find(String key)
          Returns an instance of the IEntityGroup from the data store.
 Iterator findContainingGroups(IGroupMember gm)
          Returns an Iterator over the Collection of IEntityGroups that the IGroupMember belongs to.
 Iterator findEntitiesForGroup(IEntityGroup group)
          Returns an Iterator over the Collection of IEntities that are members of this IEntityGroup.
 ILockableEntityGroup findLockable(String key)
          Returns an instance of the ILockableEntityGroup from the data store.
 String[] findMemberGroupKeys(IEntityGroup group)
          Returns a String[] containing the keys of IEntityGroups that are members of this IEntityGroup.
 Iterator findMemberGroups(IEntityGroup group)
          Returns an Iterator over the Collection of IEntityGroups that are members of this IEntityGroup.
 IEntityGroup newInstance(Class entityType)
           
 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
 void update(IEntityGroup group)
          Adds or updates the IEntityGroup AND ITS MEMBERSHIPS to the data store, as appropriate.
 void updateMembers(IEntityGroup group)
          Commits the group memberships of the IEntityGroup to the data store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNSUPPORTED_MESSAGE

public static final String UNSUPPORTED_MESSAGE
See Also:
Constant Field Values

ROOT_KEY

public static final String ROOT_KEY
See Also:
Constant Field Values

ROOT_DESC

public static final String ROOT_DESC
See Also:
Constant Field Values

ROOT_GROUP

public static final IEntityGroup ROOT_GROUP
Method Detail

contains

public boolean contains(IEntityGroup group,
                        IGroupMember member)
                 throws GroupsException
Description copied from interface: IEntityGroupStore
Answers if group contains member.

Specified by:
contains in interface IEntityGroupStore
Parameters:
group - org.jasig.portal.groups.IEntityGroup
member - org.jasig.portal.groups.IGroupMember
Returns:
boolean
Throws:
GroupsException

delete

public void delete(IEntityGroup group)
            throws GroupsException
Description copied from interface: IEntityGroupStore
Delete this IEntityGroup from the data store.

Specified by:
delete in interface IEntityGroupStore
Parameters:
group - org.jasig.portal.groups.IEntityGroup
Throws:
GroupsException

find

public IEntityGroup find(String key)
                  throws GroupsException
Returns an instance of the IEntityGroup from the data store.

Specified by:
find in interface IEntityGroupStore
Parameters:
key - java.lang.String
Returns:
org.jasig.portal.groups.IEntityGroup
Throws:
GroupsException

findContainingGroups

public Iterator findContainingGroups(IGroupMember gm)
                              throws GroupsException
Returns an Iterator over the Collection of IEntityGroups that the IGroupMember belongs to.

Specified by:
findContainingGroups in interface IEntityGroupStore
Parameters:
gm - org.jasig.portal.groups.IEntityGroup
Returns:
java.util.Iterator
Throws:
GroupsException

findEntitiesForGroup

public Iterator findEntitiesForGroup(IEntityGroup group)
                              throws GroupsException
Returns an Iterator over the Collection of IEntities that are members of this IEntityGroup.

Specified by:
findEntitiesForGroup in interface IEntityGroupStore
Parameters:
group - org.jasig.portal.groups.IEntityGroup
Returns:
java.util.Iterator
Throws:
GroupsException

findLockable

public ILockableEntityGroup findLockable(String key)
                                  throws GroupsException
Description copied from interface: IEntityGroupStore
Returns an instance of the ILockableEntityGroup from the data store.

Specified by:
findLockable in interface IEntityGroupStore
Parameters:
key - java.lang.String
Returns:
org.jasig.portal.groups.IEntityGroup
Throws:
GroupsException

findMemberGroupKeys

public String[] findMemberGroupKeys(IEntityGroup group)
                             throws GroupsException
Returns a String[] containing the keys of IEntityGroups that are members of this IEntityGroup. In a composite group system, a group may contain a member group from a different service. This is called a foreign membership, and is only possible in an internally-managed service. A group store in such a service can return the key of a foreign member group, but not the group itself, which can only be returned by its local store.

Specified by:
findMemberGroupKeys in interface IEntityGroupStore
Parameters:
group - org.jasig.portal.groups.IEntityGroup
Returns:
String[]
Throws:
GroupsException

findMemberGroups

public Iterator findMemberGroups(IEntityGroup group)
                          throws GroupsException
Returns an Iterator over the Collection of IEntityGroups that are members of this IEntityGroup.

Specified by:
findMemberGroups in interface IEntityGroupStore
Parameters:
group - org.jasig.portal.groups.IEntityGroup
Returns:
java.util.Iterator
Throws:
GroupsException

newInstance

public IEntityGroup newInstance(Class entityType)
                         throws GroupsException
Specified by:
newInstance in interface IEntityGroupStore
Returns:
org.jasig.portal.groups.IEntityGroup
Throws:
GroupsException

searchForGroups

public EntityIdentifier[] searchForGroups(String query,
                                          int method,
                                          Class leaftype)
                                   throws GroupsException
Description copied from interface: IEntityGroupStore
Find EntityIdentifiers for groups whose name matches the query string according to the specified method and matches the provided leaf type

Specified by:
searchForGroups in interface IEntityGroupStore
Throws:
GroupsException

update

public void update(IEntityGroup group)
            throws GroupsException
Description copied from interface: IEntityGroupStore
Adds or updates the IEntityGroup AND ITS MEMBERSHIPS to the data store, as appropriate.

Specified by:
update in interface IEntityGroupStore
Parameters:
group - org.jasig.portal.groups.IEntityGroup
Throws:
GroupsException

updateMembers

public void updateMembers(IEntityGroup group)
                   throws GroupsException
Description copied from interface: IEntityGroupStore
Commits the group memberships of the IEntityGroup to the data store.

Specified by:
updateMembers in interface IEntityGroupStore
Parameters:
group - org.jasig.portal.groups.IEntityGroup
Throws:
GroupsException


Copyright © 2010 Jasig. All Rights Reserved.