public final class CommonSchemaElements extends Object
Note that setSchemaFile()
method works ONLY for non-SDK classes, because SDK schema
elements are immutable, so modifying the map for extra properties has no effect on the actual
element.
Modifier and Type | Method and Description |
---|---|
static void |
checkSafeProperties(Map<String,List<String>> extraProperties)
Check if the extra schema properties contain safe filenames.
|
static String |
getDefinitionWithFileName(SchemaElement elem)
Retrieves the definition string used to create this attribute
type and including the X-SCHEMA-FILE extension.
|
static String |
getSchemaFile(SchemaElement elem)
Retrieves the name of the schema file that contains the
definition for this schema definition.
|
static String |
getSingleValueProperty(SchemaElement elem,
String propertyName)
Retrieves the name of a single value property for this schema element.
|
static void |
setSchemaFile(SchemaElement elem,
String schemaFile)
Specifies the name of the schema file that contains the
definition for this schema element.
|
public static void checkSafeProperties(Map<String,List<String>> extraProperties) throws DirectoryException
extraProperties
- The schema properties to check.DirectoryException
- If a provided value was unsafe.public static String getSchemaFile(SchemaElement elem)
elem
- The element where to get the schema file fromnull
if it
is not known or if it is not stored in any schema file.public static String getSingleValueProperty(SchemaElement elem, String propertyName)
elem
- The element where to get the single value property frompropertyName
- The name of the property to getnull
if it
is this property is not set.public static void setSchemaFile(SchemaElement elem, String schemaFile)
null
,
then any existing schema file definition will be removed.elem
- The element where to set the schema fileschemaFile
- The name of the schema file that contains the
definition for this schema element.public static String getDefinitionWithFileName(SchemaElement elem)
elem
- The element where to get definition fromCopyright 2010-2017 ForgeRock AS.