public class SomeSchemaElement extends Object implements SchemaElement
Allows to share the methods getOID(), getNameOrOID(), getNames() and a setter on extra properties.
Constructor and Description |
---|
SomeSchemaElement(AttributeType attributeType)
Builds SomeSchemaElement.
|
SomeSchemaElement(ObjectClass objectClass)
Builds SomeSchemaElement.
|
Modifier and Type | Method and Description |
---|---|
static AttributeType |
changeSuperiorType(AttributeType attributeType,
AttributeType newSuperiorType)
Returns a copy of the provided attribute type, changing the superior attribute type.
|
String |
getAttributeName()
Returns the attribute name of the wrapped element.
|
AttributeType |
getAttributeType()
Returns the wrapped schema element as an attribute type.
|
String |
getDefinitionWithFileName()
Retrieves the definition string used to create this attribute
type and including the X-SCHEMA-FILE extension.
|
String |
getDescription()
Returns the description of this schema element, or the empty string if it does not have a description.
|
Map<String,List<String>> |
getExtraProperties()
Returns an unmodifiable map containing all of the extra properties associated with this schema element.
|
String |
getNameOrOID()
Returns the name or OID of the wrapped element.
|
Iterable<String> |
getNames()
Returns the names of the wrapped element.
|
ObjectClass |
getObjectClass()
Returns the wrapped schema element as an object class.
|
String |
getOID()
Returns the OID of the wrapped element.
|
String |
getOrigin()
Returns the origin of the provided schema element.
|
String |
getSchemaFile()
Returns the name of the schema file that contains the definition of the wrapped element.
|
boolean |
isAttributeType()
Returns whether the wrapped element is an attribute type.
|
void |
setExtraPropertyMultipleValues(ServerContext serverContext,
String property,
List<String> values)
Sets a multi-valued extra property on the wrapped element.
|
void |
setExtraPropertySingleValue(ServerContext serverContext,
String property,
String value)
Sets a single-valued extra property on the wrapped element.
|
String |
toString() |
public SomeSchemaElement(ObjectClass objectClass)
objectClass
- the common schema element to wrappublic SomeSchemaElement(AttributeType attributeType)
attributeType
- the attribute type element to wrappublic ObjectClass getObjectClass()
public AttributeType getAttributeType()
public boolean isAttributeType()
true
when the wrapped element is an attribute type, false
otherwisepublic String getOID()
public String getNameOrOID()
public Iterable<String> getNames()
public String getDescription()
SchemaElement
getDescription
in interface SchemaElement
public Map<String,List<String>> getExtraProperties()
SchemaElement
getExtraProperties
in interface SchemaElement
public String getDefinitionWithFileName()
public String getSchemaFile()
public String getOrigin()
public String getAttributeName()
This corresponds to the attribute name in the schema entry that corresponds to the provided schema element.
public void setExtraPropertySingleValue(ServerContext serverContext, String property, String value)
serverContext
- the server contextproperty
- the property to setvalue
- the value to setpublic void setExtraPropertyMultipleValues(ServerContext serverContext, String property, List<String> values)
serverContext
- the server contextproperty
- the property to setvalues
- the values to setpublic static AttributeType changeSuperiorType(AttributeType attributeType, AttributeType newSuperiorType)
attributeType
- the attribute type for which a modified copy must be builtnewSuperiorType
- the new superior attribute type to set, null
means remove the superior typeCopyright 2010-2017 ForgeRock AS.