edu.internet2.middleware.grouper.shibboleth.dataConnector.field
Class PrivilegeField

java.lang.Object
  extended by edu.internet2.middleware.grouper.shibboleth.dataConnector.field.BaseField
      extended by edu.internet2.middleware.grouper.shibboleth.dataConnector.field.PrivilegeField

public class PrivilegeField
extends BaseField


Field Summary
 
Fields inherited from class edu.internet2.middleware.grouper.shibboleth.dataConnector.field.BaseField
DELIMITER
 
Constructor Summary
PrivilegeField(String id, edu.internet2.middleware.grouper.privs.AccessResolver accessResolver)
          Construct a representation of an Privilege attribute.
 
Method Summary
 Set<edu.internet2.middleware.subject.Subject> filterInternalSubjects(Set<edu.internet2.middleware.subject.Subject> subjects)
          Remove GrouperAll and GrouperSystem from the returned subjects.
 edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute<edu.internet2.middleware.subject.Subject> getAttribute(edu.internet2.middleware.grouper.Group group)
          Get the resultant attribute whose values are the Subjects with the privilege for the given Group.
 edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute<edu.internet2.middleware.grouper.Group> getAttribute(edu.internet2.middleware.subject.Subject subject)
          Get the resultant attribute whose values are the Groups to which the Subject has the privilege.
 
Methods inherited from class edu.internet2.middleware.grouper.shibboleth.dataConnector.field.BaseField
getFirstIdElement, getId, getIdElements, getSecondIdElement, getThirdIdElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrivilegeField

public PrivilegeField(String id,
                      edu.internet2.middleware.grouper.privs.AccessResolver accessResolver)
               throws edu.internet2.middleware.grouper.exception.GrouperException
Construct a representation of an Privilege attribute.

Parameters:
id - the identifier
accessResolver - the access resolver
Throws:
edu.internet2.middleware.grouper.exception.GrouperException
See Also:
edu.internet2.middleware.grouper.shibboleth.dataConnector.field.BaseField#constructor(String id)
Method Detail

getAttribute

public edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute<edu.internet2.middleware.subject.Subject> getAttribute(edu.internet2.middleware.grouper.Group group)
Get the resultant attribute whose values are the Subjects with the privilege for the given Group. Does not include the GrouperAll or GrouperSystem subjects.

Parameters:
group - the group
Returns:
the attribute consisting of Subjects or null if there are no subjects with the privilege

getAttribute

public edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute<edu.internet2.middleware.grouper.Group> getAttribute(edu.internet2.middleware.subject.Subject subject)
Get the resultant attribute whose values are the Groups to which the Subject has the privilege.

Parameters:
subject - the subject
Returns:
the attribute consisting of Groups or null if there are no groups to which the subject has the privilege

filterInternalSubjects

public Set<edu.internet2.middleware.subject.Subject> filterInternalSubjects(Set<edu.internet2.middleware.subject.Subject> subjects)
Remove GrouperAll and GrouperSystem from the returned subjects.

Parameters:
subjects -
Returns:
the filtered set of subjects


Copyright © 2011 Internet2. All Rights Reserved.