edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition
Class PrescopedAttributeDefinition

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.AbstractResolutionPlugIn<BaseAttribute>
      extended by edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.BaseAttributeDefinition
          extended by edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.PrescopedAttributeDefinition
All Implemented Interfaces:
AttributeDefinition, ResolutionPlugIn<BaseAttribute>

public class PrescopedAttributeDefinition
extends BaseAttributeDefinition

An attribute definition that creates ScopedAttributeValues by taking a source attribute value splitting it at a delimiter. The first atom becomes the attribute value and the second value becomes the scope.


Field Summary
private  org.slf4j.Logger log
          Class logger.
private  String scopeDelimiter
          Delimiter between value and scope.
 
Constructor Summary
PrescopedAttributeDefinition(String delimiter)
          Constructor.
 
Method Summary
 BaseAttribute<ScopedAttributeValue> doResolve(ShibbolethResolutionContext resolutionContext)
          Creates and populates the values for the resolved attribute.
 String getScopeDelimited()
          Get delimiter between value and scope.
 void validate()
          Validate the internal state of this plug-in.
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.BaseAttributeDefinition
getAttributeEncoders, getDisplayDescriptions, getDisplayNames, getSourceAttributeID, getValuesFromAllDependencies, isDependencyOnly, resolve, setDependencyOnly, setSourceAttributeID
 
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.ResolutionPlugIn
getDependencyIds, getId
 

Field Detail

log

private final org.slf4j.Logger log
Class logger.


scopeDelimiter

private String scopeDelimiter
Delimiter between value and scope.

Constructor Detail

PrescopedAttributeDefinition

public PrescopedAttributeDefinition(String delimiter)
Constructor.

Parameters:
delimiter - scope of the attribute
Method Detail

doResolve

public BaseAttribute<ScopedAttributeValue> doResolve(ShibbolethResolutionContext resolutionContext)
                                              throws AttributeResolutionException
Creates and populates the values for the resolved attribute. Implementations should *not* set, or otherwise manage, the attribute encoders for the resolved attribute.

Specified by:
doResolve in class BaseAttributeDefinition
Parameters:
resolutionContext - current attribute resolution context
Returns:
resolved attribute
Throws:
AttributeResolutionException - thrown if there is a problem resolving and creating the attribute

getScopeDelimited

public String getScopeDelimited()
Get delimiter between value and scope.

Returns:
delimiter between value and scope

validate

public void validate()
              throws AttributeResolutionException
Validate the internal state of this plug-in. This process may not rely on information from any dependency.

Throws:
AttributeResolutionException - if the plug-in has an invalid internal state


Copyright © 1999-2012. All Rights Reserved.