public class CreationTemplate extends Template
Template
,
SearchTemplate
,
Serialized FormConstructor and Description |
---|
CreationTemplate()
Default constructor for deserialization
|
CreationTemplate(String name,
AttrSet required,
AttrSet optional)
Creates a template with required and optional attributes.
|
CreationTemplate(String name,
AttrSet required,
AttrSet optional,
ArrayList classes)
Creates a template with required and optional attributes.
|
CreationTemplate(String name,
AttrSet required,
AttrSet optional,
Class cls)
Creates a template with required and optional attributes.
|
Modifier and Type | Method and Description |
---|---|
void |
addOptionalAttribute(Attr attr)
Adds the attribute to the optional attributes.
|
void |
addRequiredAttribute(Attr attr)
Adds the attribute to the required attributes.
|
void |
addValidation(String attrName,
String validatorClass,
String rule)
Adds the validator and the rule for the attribute name.
|
Object |
clone()
Returns a copy of the template.
|
Attr |
getAttribute(String attributeName)
Gets the value of a given attribute in the template.
|
Enumeration |
getAttributes()
Gets enumeration of attributes for object creation.
|
ArrayList |
getCreationClasses()
Get the classes that the CreationTemplate is associated with.
|
String |
getNamingAttribute()
Gets the naming attribute.
|
String[] |
getOptionalAttributeNames()
Gets a list of optional attribute names defined in the object.
|
AttrSet |
getOptionalAttributeSet()
Gets the optional attributes for object creation.
|
String[] |
getRequiredAttributeNames()
Gets a list of required attribute names defined in the object.
|
AttrSet |
getRequiredAttributeSet()
Gets the required attributes for object creation.
|
String[] |
getValidatedAttributeNames()
Gets a list of attribute names registered for validation.
|
Enumeration |
getValidation(String attrName)
Gets enumeration of ValidationElement for the attribute name
|
void |
removeValidation(String attrName)
Removes all validations from the attribute.
|
void |
setCreationClasses(ArrayList classes)
Set the class that the CreationTemplate is associated with.
|
void |
setOptionalAttributeSet(AttrSet attrSet)
Sets the optional attributes.
|
void |
setRequiredAttributeSet(AttrSet attrSet)
Sets the required attributes.
|
String |
toString()
Render the object.
|
public CreationTemplate()
public CreationTemplate(String name, AttrSet required, AttrSet optional, ArrayList classes)
name
- Template namerequired
- Set of required attributesoptional
- Set of optional attributesclasses
- Array of classes that this CreationTemplate is associated with
for object creationpublic CreationTemplate(String name, AttrSet required, AttrSet optional, Class cls)
name
- Template namerequired
- Set of required attributesoptional
- Set of optional attributescls
- Class that this CreationTemplate is associated with for object
creationpublic Attr getAttribute(String attributeName)
attributeName
- Name of attribute for which to return valuesnull
if
attributeName is null
, or the attribute is not
found.public String[] getRequiredAttributeNames()
public String[] getOptionalAttributeNames()
public AttrSet getRequiredAttributeSet()
public AttrSet getOptionalAttributeSet()
public ArrayList getCreationClasses()
public Enumeration getValidation(String attrName)
attrName
- Attribute namepublic String[] getValidatedAttributeNames()
public Enumeration getAttributes()
public void setRequiredAttributeSet(AttrSet attrSet)
attrSet
- set of required attributespublic void setOptionalAttributeSet(AttrSet attrSet)
attrSet
- set of optional attributespublic void setCreationClasses(ArrayList classes)
classes
- Classes associated with this templatepublic void addRequiredAttribute(Attr attr)
attr
- The attribute to be addedpublic void addOptionalAttribute(Attr attr)
attr
- The attribute to be addedpublic void addValidation(String attrName, String validatorClass, String rule)
attrName
- Attribute name to validate.validatorClass
- Validator class name used for validation.rule
- The optional rule used by the validator.public void removeValidation(String attrName)
attrName
- attribute name of the validations to be removedpublic String getNamingAttribute()
public Object clone()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.