edu.internet2.middleware.grouper.shibboleth.dataConnector
Class MemberDataConnector

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.AbstractResolutionPlugIn<Map<String,edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute>>
      extended by edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.dataConnector.BaseDataConnector
          extended by edu.internet2.middleware.grouper.shibboleth.dataConnector.BaseGrouperDataConnector
              extended by edu.internet2.middleware.grouper.shibboleth.dataConnector.MemberDataConnector
All Implemented Interfaces:
SourceDataConnector, edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.dataConnector.DataConnector, edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.ResolutionPlugIn<Map<String,edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute>>

public class MemberDataConnector
extends BaseGrouperDataConnector

A DataConnector which returns Members. The attributes of the returned members may be limited in order to avoid unnecessary queries to the Grouper database.


Field Summary
static String ID_ATTRIBUTE_NAME
          the name of the attribute representing a subject's id
 
Fields inherited from class edu.internet2.middleware.grouper.shibboleth.dataConnector.BaseGrouperDataConnector
GROUP_TYPE_ATTR, PARENT_STEM_NAME_ATTR
 
Constructor Summary
MemberDataConnector()
           
 
Method Summary
 Set<String> getAllIdentifiers()
          Return the identifiers of all objects.
 Set<String> getAllIdentifiers(Date updatedSince)
          Return the identifiers of all objects updated after the given time.
 Set<Member> getMembers(Group group)
          Get the members of a group using this object's grouper session callback.
 Set<SourceIdentifier> getSourceIdentifiers()
          Get the ids of Sources for which Members will be returned.
 void initialize()
          If SourceIdentifiers are not null, verify that the Sources with the defined identifiers exist.
 Map<String,edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute> resolve(edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.ShibbolethResolutionContext resolutionContext)
          
 void setSourceIdentifiers(Set<SourceIdentifier> sourceIdentifiers)
          Set the Source ids for which Members will be returned.
 void validate()
           
 
Methods inherited from class edu.internet2.middleware.grouper.shibboleth.dataConnector.BaseGrouperDataConnector
getAllAttributeDefNames, getAttributeDefNames, getGrouperSession, getGroupQueryFilter, getGroups, getGroupsFields, getMembersFields, getPrivilegeFields, getSubjectAttributeIdentifiers, getSubjectIdentifier, setFieldIdentifiers, setGroupQueryFilter, setSubjectIdentifier
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.dataConnector.BaseDataConnector
getFailoverDependencyId, setFailoverDependencyIds
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.AbstractResolutionPlugIn
getDependencyIds, getId, getValuesFromAllDependencies, getValuesFromAttributeDependency, getValuesFromConnectorDependency, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.dataConnector.DataConnector
getFailoverDependencyId
 
Methods inherited from interface edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.ResolutionPlugIn
getDependencyIds, getId
 

Field Detail

ID_ATTRIBUTE_NAME

public static final String ID_ATTRIBUTE_NAME
the name of the attribute representing a subject's id

See Also:
Constant Field Values
Constructor Detail

MemberDataConnector

public MemberDataConnector()
Method Detail

getSourceIdentifiers

public Set<SourceIdentifier> getSourceIdentifiers()
Get the ids of Sources for which Members will be returned.

Returns:
the set of source ids or null

setSourceIdentifiers

public void setSourceIdentifiers(Set<SourceIdentifier> sourceIdentifiers)
Set the Source ids for which Members will be returned.

Parameters:
sourceIdentifiers -

initialize

public void initialize()
If SourceIdentifiers are not null, verify that the Sources with the defined identifiers exist.

Overrides:
initialize in class BaseGrouperDataConnector
See Also:
BaseGrouperDataConnector.initialize()

resolve

public Map<String,edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute> resolve(edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.ShibbolethResolutionContext resolutionContext)
                                                                                       throws edu.internet2.middleware.shibboleth.common.attribute.resolver.AttributeResolutionException

Throws:
edu.internet2.middleware.shibboleth.common.attribute.resolver.AttributeResolutionException

validate

public void validate()
              throws edu.internet2.middleware.shibboleth.common.attribute.resolver.AttributeResolutionException
Throws:
edu.internet2.middleware.shibboleth.common.attribute.resolver.AttributeResolutionException

getAllIdentifiers

public Set<String> getAllIdentifiers()
Return the identifiers of all objects. The identifiers are destined for provisioning, consequently, the order returned should accommodate that need. The identifiers of Members which are also Groups are omitted. This data connector considers only Member objects.

Returns:
the possibly empty but never null set of identifiers

getAllIdentifiers

public Set<String> getAllIdentifiers(Date updatedSince)
Return the identifiers of all objects updated after the given time. see getAllIdentifers(). see getAllIdentifiers()

Parameters:
updatedSince - the Date the returned identifiers were modified after
Returns:
the possibly empty but never null set of identifiers updated since the given time

getMembers

public Set<Member> getMembers(Group group)
Get the members of a group using this object's grouper session callback.

Parameters:
group - the Group
Returns:
the Set of Members


Copyright © 2012 Internet2. All Rights Reserved.