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

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
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>>
Direct Known Subclasses:
GroupDataConnector, MemberDataConnector, StemDataConnector

public abstract class BaseGrouperDataConnector
extends edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.dataConnector.BaseDataConnector
implements SourceDataConnector


Field Summary
static String GROUP_TYPE_ATTR
          the name of the attribute whose values are GroupTypes
static String PARENT_STEM_NAME_ATTR
          the name of the attribute whose value is the name of the parent stem
 
Constructor Summary
BaseGrouperDataConnector()
          Constructor.
 
Method Summary
protected  Set<String> getAllAttributeDefNames()
          Return all attribute definition names.
protected  Set<String> getAttributeDefNames()
          Returns the possibly empty set of attribute definition names defined in the attribute resolver configuration.
 edu.internet2.middleware.grouper.GrouperSession getGrouperSession()
          Start a new session if necessary, otherwise reuse existing session.
 GroupQueryFilter getGroupQueryFilter()
          Get the filter which determines the groups which will be considered by this data connector.
 Set<edu.internet2.middleware.grouper.Group> getGroups(Date lastModifyTime)
          Query for all groups matching the group query filter.
 List<GroupsField> getGroupsFields()
          The representation of the attributes which return groups.
 List<MembersField> getMembersFields()
          The representation of the attributes which return members.
 List<PrivilegeField> getPrivilegeFields()
          The representation of the attributes which return privileges.
 List<AttributeIdentifier> getSubjectAttributeIdentifiers()
          The AttributeIdentifiers for subject attributes.
 AttributeIdentifier getSubjectIdentifier()
          Get the subject and source identifier used to start GrouperSessions.
 void initialize()
          Make sure that the attributes to return as specified in the data connector configuration are valid, and initialize the necessary objects.
 void setFieldIdentifiers(List<AttributeIdentifier> fieldIdentifiers)
          Set the identifiers of the attributes to return.
 void setGroupQueryFilter(GroupQueryFilter groupQueryFilter)
          Set the group query filter
 void setSubjectIdentifier(AttributeIdentifier subjectIdentifier)
          Set the subject and source identifier used to start GrouperSessions.
 
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.grouper.shibboleth.dataConnector.SourceDataConnector
getAllIdentifiers, getAllIdentifiers
 
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, resolve, validate
 

Field Detail

GROUP_TYPE_ATTR

public static final String GROUP_TYPE_ATTR
the name of the attribute whose values are GroupTypes

See Also:
Constant Field Values

PARENT_STEM_NAME_ATTR

public static final String PARENT_STEM_NAME_ATTR
the name of the attribute whose value is the name of the parent stem

See Also:
Constant Field Values
Constructor Detail

BaseGrouperDataConnector

public BaseGrouperDataConnector()
Constructor.

Method Detail

initialize

public void initialize()
                throws edu.internet2.middleware.grouper.exception.GrouperException
Make sure that the attributes to return as specified in the data connector configuration are valid, and initialize the necessary objects.

Throws:
edu.internet2.middleware.grouper.exception.GrouperException

getGrouperSession

public edu.internet2.middleware.grouper.GrouperSession getGrouperSession()
                                                                  throws edu.internet2.middleware.subject.SubjectNotFoundException
Start a new session if necessary, otherwise reuse existing session. The session is started using the Subject identified by the configured subject identifier. This session is not added to the threadlocal.

Returns:
the GrouperSession
Throws:
edu.internet2.middleware.subject.SubjectNotFoundException - if the Subject identified by the subjectId cannot be found

getGroupQueryFilter

public GroupQueryFilter getGroupQueryFilter()
Get the filter which determines the groups which will be considered by this data connector.

Returns:
the GroupQueryFilter or null if all groups should be considered

setGroupQueryFilter

public void setGroupQueryFilter(GroupQueryFilter groupQueryFilter)
Set the group query filter

Parameters:
groupQueryFilter - the GroupQueryFilter

setFieldIdentifiers

public void setFieldIdentifiers(List<AttributeIdentifier> fieldIdentifiers)
Set the identifiers of the attributes to return.

Parameters:
fieldIdentifiers -

getGroupsFields

public List<GroupsField> getGroupsFields()
The representation of the attributes which return groups.

Returns:
the groups fields

getMembersFields

public List<MembersField> getMembersFields()
The representation of the attributes which return members.

Returns:
the members fields

getPrivilegeFields

public List<PrivilegeField> getPrivilegeFields()
The representation of the attributes which return privileges.

Returns:
the privileges fields

getSubjectAttributeIdentifiers

public List<AttributeIdentifier> getSubjectAttributeIdentifiers()
The AttributeIdentifiers for subject attributes.

Returns:
the attribute identifiers

getSubjectIdentifier

public AttributeIdentifier getSubjectIdentifier()
Get the subject and source identifier used to start GrouperSessions.

Returns:
Returns the source and subject identifier.

setSubjectIdentifier

public void setSubjectIdentifier(AttributeIdentifier subjectIdentifier)
Set the subject and source identifier used to start GrouperSessions.

Parameters:
subjectIdentifier - The source and subject identifier to set.

getGroups

public Set<edu.internet2.middleware.grouper.Group> getGroups(Date lastModifyTime)
Query for all groups matching the group query filter. If no group query filter has been configured, then return all groups.

Returns:
the groups returned from the group query filter or all groups

getAttributeDefNames

protected Set<String> getAttributeDefNames()
Returns the possibly empty set of attribute definition names defined in the attribute resolver configuration.

Returns:
the possibly empty set of attribute definition names

getAllAttributeDefNames

protected Set<String> getAllAttributeDefNames()
Return all attribute definition names.

Returns:
all attribute definition names.


Copyright © 2011 Internet2. All Rights Reserved.