public class TemplateAttributeDefinition extends BaseAttributeDefinition
AttributeDefinition
that constructs its values based on the values of its dependencies using the Velocity
Template Language. Dependencies may have multiple values, however multiples dependencies must have the same number of
values. In the case of multi-valued dependencies, the template will be evaluated multiples times, iterating over each
dependency.コンストラクタと説明 |
---|
TemplateAttributeDefinition(org.apache.velocity.app.VelocityEngine newVelocityEngine)
Constructor.
|
修飾子とタイプ | メソッドと説明 |
---|---|
protected BaseAttribute |
doResolve(ShibbolethResolutionContext resolutionContext)
Creates and populates the values for the resolved attribute.
|
String |
getAttributeTemplate()
Get the attribute template.
|
List<String> |
getSourceAttributes()
Get the source attribute IDs.
|
void |
initialize()
Initialize the attribute definition and prepare it for use.
|
protected void |
registerTemplate()
Registers the template with template engine.
|
void |
setAttributeTemplate(String newAttributeTemplate)
Set the attribute template.
|
void |
setSourceAttributes(List<String> newSourceAttributes)
Set the source attribute IDs.
|
void |
validate()
Validate the internal state of this plug-in.
|
getAttributeEncoders, getDisplayDescriptions, getDisplayNames, getSourceAttributeID, getValuesFromAllDependencies, isDependencyOnly, resolve, setDependencyOnly, setSourceAttributeID
getDependencyIds, getId, getValuesFromAllDependencies, getValuesFromAttributeDependency, getValuesFromConnectorDependency, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDependencyIds, getId
public TemplateAttributeDefinition(org.apache.velocity.app.VelocityEngine newVelocityEngine)
newVelocityEngine
- velocity engine used to parse template.protected BaseAttribute doResolve(ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException
doResolve
クラス内 BaseAttributeDefinition
resolutionContext
- current attribute resolution contextAttributeResolutionException
- thrown if there is a problem resolving and creating the attributepublic void initialize() throws Exception
Exception
- if unable to initialize attribute definitionprotected void registerTemplate()
public void validate() throws AttributeResolutionException
AttributeResolutionException
- if the plug-in has an invalid internal statepublic String getAttributeTemplate()
public void setAttributeTemplate(String newAttributeTemplate)
newAttributeTemplate
- the attribute templatepublic List<String> getSourceAttributes()
Copyright © 2012. All Rights Reserved.