public final class SchemaUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Set<String> |
getOptions(String attributeId)
Get the options from the attributeType.
|
static Entry |
getTargetEntry(List<? extends Modification> mods,
Entry entry)
Gets the target entry as it would look after a modification operation
were performed on it.
|
static StringBuffer |
render(AttributeType[] ats)
Renders a list of attributeTypes for things like the must or may list of
objectClasses using the ( oid $ oid ) format.
|
static String |
render(LoadableSchemaObject description)
Returns a String description of a schema.
|
static StringBuffer |
render(Map<String,List<String>> extensions)
Renders the schema extensions into a new StringBuffer.
|
static StringBuffer |
render(ObjectClass[] ocs)
Renders a list of object classes for things like a list of superior
objectClasses using the ( oid $ oid ) format.
|
static StringBuffer |
render(StringBuffer buf,
AttributeType[] ats)
Renders a list of attributeTypes for things like the must or may list of
objectClasses using the ( oid $ oid ) format into an existing buffer.
|
static StringBuffer |
render(StringBuffer buf,
List<String> qdescrs)
Renders qdescrs into an existing buffer.
|
static StringBuffer |
render(StringBuffer buf,
ObjectClass[] ocs)
Renders a list of object classes for things like a list of superior
objectClasses using the ( oid $ oid ) format into an existing buffer.
|
static String |
stripOptions(String attributeId)
Remove the options from the attributeType, and returns the ID.
|
static byte[] |
uuidToBytes(UUID uuid)
Transform an UUID in a byte array
|
public static Entry getTargetEntry(List<? extends Modification> mods, Entry entry) throws LdapException
mods
- the modifications performed on the entryentry
- the source entry that is modifiedLdapException
- if there are problems accessing attributespublic static StringBuffer render(StringBuffer buf, List<String> qdescrs)
buf
- the string buffer to render the quoted description strs intoqdescrs
- the quoted description strings to renderpublic static StringBuffer render(ObjectClass[] ocs)
ocs
- the objectClasses to listpublic static StringBuffer render(StringBuffer buf, ObjectClass[] ocs)
buf
- the string buffer to render the list of objectClasses intoocs
- the objectClasses to listpublic static StringBuffer render(AttributeType[] ats)
ats
- the attributeTypes to listpublic static StringBuffer render(StringBuffer buf, AttributeType[] ats)
buf
- the string buffer to render the list of attributeTypes intoats
- the attributeTypes to listpublic static StringBuffer render(Map<String,List<String>> extensions)
extensions
- the schema extensions map with key and valuespublic static String render(LoadableSchemaObject description)
description
- The description to transform to a Stringpublic static String stripOptions(String attributeId)
public static Set<String> getOptions(String attributeId)
public static byte[] uuidToBytes(UUID uuid)
uuid
- The UUID to transformCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.