public class SomeSchemaElement extends Object implements SchemaFileElement
In absence of a common interface, this class allows to process all elements in the same way,
and to provide useful server-oriented methods like getSchemaFile() or
getOrigin().
| Constructor and Description |
|---|
SomeSchemaElement(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
Builds SomeSchemaElement.
|
SomeSchemaElement(ObjectClass objectClass)
Builds SomeSchemaElement.
|
| Modifier and Type | Method and Description |
|---|---|
static org.forgerock.opendj.ldap.schema.AttributeType |
changeSuperiorType(org.forgerock.opendj.ldap.schema.AttributeType attributeType,
org.forgerock.opendj.ldap.schema.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.
|
org.forgerock.opendj.ldap.schema.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.
|
Map<String,List<String>> |
getExtraProperties()
Retrieves the "extra" properties for this schema definition.
|
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.
|
boolean |
isObjectClass()
Returns whether the wrapped element is an object class.
|
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.
|
void |
setSchemaFile(ServerContext serverContext,
String schemaFile)
Sets the name of the schema file that contains the definition of the wrapped element.
|
String |
toString() |
public SomeSchemaElement(ObjectClass objectClass)
objectClass - the common schema element to wrappublic SomeSchemaElement(org.forgerock.opendj.ldap.schema.AttributeType attributeType)
attributeType - the attribute type element to wrappublic ObjectClass getObjectClass()
public org.forgerock.opendj.ldap.schema.AttributeType getAttributeType()
public boolean isAttributeType()
true when the wrapped element is an attribute type, false otherwisepublic boolean isObjectClass()
true when the wrapped element is an object class, false otherwisepublic String getOID()
public String getNameOrOID()
public Iterable<String> getNames()
public Map<String,List<String>> getExtraProperties()
SchemaFileElementFIXME Contrary to the SDK, this method returns a modifiable Map.
getExtraProperties in interface SchemaFileElementpublic String getDefinitionWithFileName()
public String getSchemaFile()
public void setSchemaFile(ServerContext serverContext, String schemaFile)
serverContext - the server contextschemaFile - the name of the schema file that contains the definition of the wrapped element.public String getOrigin()
public String getAttributeName()
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 org.forgerock.opendj.ldap.schema.AttributeType changeSuperiorType(org.forgerock.opendj.ldap.schema.AttributeType attributeType, org.forgerock.opendj.ldap.schema.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-2018 ForgeRock AS. All Rights Reserved.