|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.shimhost.SchemaDef
public class SchemaDef
Class encapsulating a DirXML <schema-def> schema definition.
Nested Class Summary | |
---|---|
static class |
SchemaDef.AttrDef
Class encapsulating a DirXML <attr-def> schema definition. |
static class |
SchemaDef.ClassDef
Class encapsulating a DirXML <class-def> schema definition. |
Field Summary | |
---|---|
static String |
ATTR_APPLICATION_NAME
Name of the XML 'application-name' attribute. |
static String |
ATTR_ASN1ID
Name of the XML 'asn1id' attribute. |
static String |
ATTR_ATTR_NAME
Name of the XML 'attr-name' attribute. |
static String |
ATTR_CASE_SENSITIVE
Name of the XML 'case-sensitive' attribute. |
static String |
ATTR_CLASS_NAME
Name of the XML 'class-name' attribute. |
static String |
ATTR_CONTAINER
Name of the XML 'container' attribute. |
static String |
ATTR_DN_DELIMS
Name of the XML 'dn-delims' attribute. |
static String |
ATTR_DN_FORMAT
Name of the XML 'dn-format' attribute. |
static String |
ATTR_HIERARCHICAL
Name of the XML 'hierarchical' attribute. |
static String |
ATTR_MULTI_VALUED
Name of the XML 'multi-valued' attribute. |
static String |
ATTR_NAMING
Name of the XML 'naming' attribute. |
static String |
ATTR_READ_ONLY
Name of the XML 'read-only' attribute. |
static String |
ATTR_REQUIRED
Name of the XML 'required' attribute. |
static String |
ATTR_TYPE
Name of the XML 'type' attribute. |
static int |
ATTR_TYPE_CLASSNAME
Constant representing the "className" value for the <attr-def> XML attribute "type". |
static int |
ATTR_TYPE_COUNTER
Constant representing the "counter" value for the <attr-def> XML attribute "type". |
static int |
ATTR_TYPE_DN
Constant representing the "dn" value for the <attr-def> XML attribute "type". |
static int |
ATTR_TYPE_INT
Constant representing the "int" value for the <attr-def> XML attribute "type". |
static int |
ATTR_TYPE_INTERVAL
Constant representing the "interval" value for the <attr-def> XML attribute "type". |
static int |
ATTR_TYPE_OCTET
Constant representing the "octet" value for the <attr-def> XML attribute "type". |
static int |
ATTR_TYPE_STATE
Constant representing the "state" value for the <attr-def> XML attribute "type". |
static int |
ATTR_TYPE_STRING
Constant representing the "string" value for the <attr-def> XML attribute "type". |
static int |
ATTR_TYPE_STRUCTURED
Constant representing the "structured" value for the <attr-def> XML attribute "type". |
static int |
ATTR_TYPE_TELENUMBER
Constant representing the "teleNumber" value for the <attr-def> XML attribute "type". |
static int |
ATTR_TYPE_TIME
Constant representing the "time" value for the <attr-def> XML attribute "type". |
static int |
DN_FORMAT_DOT
Constant representing the "dot" value for the <schema-def> XML attribute "dn-format". |
static int |
DN_FORMAT_LDAP
Constant representing the "slash" value for the <schema-def> XML attribute "dn-format". |
static int |
DN_FORMAT_QUALIFIED_DOT
Constant representing the "qualified-dot" value for the <schema-def> XML attribute "dn-format". |
static int |
DN_FORMAT_QUALIFIED_SLASH
Constant representing the "qualified-slash" value for the <schema-def> XML attribute "dn-format". |
static int |
DN_FORMAT_SLASH
Constant representing the "slash" value for the <schema-def> XML attribute "dn-format". |
static String |
TAG_ATTR_DEF
Tag name of the <attr-def> element. |
static String |
TAG_CLASS_DEF
Tag name of the <class-def> element. |
static String |
TAG_SCHEMA_DEF
Tag name of the <schema-def> element. |
static String |
VAL_CLASSNAME
"className" |
static String |
VAL_COUNTER
"counter" |
static String |
VAL_DN
"dn" |
static String |
VAL_DOT
"dot" |
static String |
VAL_FALSE
"false" |
static String |
VAL_INT
"int" |
static String |
VAL_INTERVAL
"interval" |
static String |
VAL_LDAP
"ldap" |
static String |
VAL_OCTET
"octet" |
static String |
VAL_QUALIFIED_DOT
"qualified-dot" |
static String |
VAL_QUALIFIED_SLASH
"qualified-slash" |
static String |
VAL_SLASH
"slash" |
static String |
VAL_STATE
"state" |
static String |
VAL_STRING
"string" |
static String |
VAL_STRUCTURED
"structured" |
static String |
VAL_TELENUMBER
"teleNumber" |
static String |
VAL_TIME
"time" |
static String |
VAL_TRUE
"true" |
Constructor Summary | |
---|---|
SchemaDef()
Construct a new, empty SchemaDef instance. |
|
SchemaDef(Element schemaDef)
Construct a SchemaDef instance based on an XML representation. |
|
SchemaDef(SchemaDef source)
Copy constructor. |
Method Summary | |
---|---|
String |
getApplicationName()
Get the value for the "application-name" attribute. |
SchemaDef.ClassDef |
getClassDef(String className)
Get a ClassDef instance from this SchemaDef instance
based on class name. |
String |
getDNDelims()
Get the value for the "dn-delims" attribute. |
int |
getDNFormat()
Get the value for the "dn-delims" attribute. |
static int |
getDNFormatFromString(String dnFormatString)
Get the integer value corresponding to a "dn-format" string value. |
static String |
getDNFormatString(int dnFormat)
Get the string corresponding to a "dn-format" integer value. |
boolean |
getHierarchical()
Get the value for the "hierarchical" attribute. |
boolean |
hasBeenModified()
Return true if this instance has been modified. |
Iterator |
iterator()
Return an Iterator that will iterate over the ClassDef instances
in this SchemaDef instance. |
SchemaDef.ClassDef |
newClass(String className)
Add a new ClassDef instance. |
boolean |
removeClass(String className)
Remove a ClassDef from this instance based on name. |
void |
resetModified()
Reset the modified flag for this instance such that hasBeenModified()
will return false . |
void |
setApplicationName(String newName)
Set the value for the "application-name" attribute. |
void |
setDNDelims(String newDelims)
Set the value for the "dn-delims" attribute. |
void |
setDNFormat(int format)
Set the value for the "dn-delims" attribute. |
void |
setHierarchical(boolean value)
Set the value for the "hierarchical" attribute. |
Element |
toXML(Node parent)
Create an XML representation for this instance under the passed Node . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TAG_SCHEMA_DEF
public static final String TAG_CLASS_DEF
public static final String TAG_ATTR_DEF
public static final String ATTR_APPLICATION_NAME
public static final String ATTR_DN_DELIMS
public static final String ATTR_DN_FORMAT
public static final String ATTR_HIERARCHICAL
public static final String ATTR_ASN1ID
public static final String ATTR_CLASS_NAME
public static final String ATTR_CONTAINER
public static final String ATTR_ATTR_NAME
public static final String ATTR_CASE_SENSITIVE
public static final String ATTR_MULTI_VALUED
public static final String ATTR_NAMING
public static final String ATTR_READ_ONLY
public static final String ATTR_REQUIRED
public static final String ATTR_TYPE
public static final String VAL_TRUE
public static final String VAL_FALSE
public static final String VAL_DOT
public static final String VAL_QUALIFIED_DOT
public static final String VAL_SLASH
public static final String VAL_QUALIFIED_SLASH
public static final String VAL_LDAP
public static final String VAL_STRING
public static final String VAL_TELENUMBER
public static final String VAL_INT
public static final String VAL_STATE
public static final String VAL_COUNTER
public static final String VAL_DN
public static final String VAL_INTERVAL
public static final String VAL_OCTET
public static final String VAL_TIME
public static final String VAL_STRUCTURED
public static final String VAL_CLASSNAME
public static final int ATTR_TYPE_STRING
AttrDef.getType()
and AttrDef.setType()
.
SchemaDef.AttrDef.getType()
,
SchemaDef.AttrDef.setType(int)
,
Constant Field Valuespublic static final int ATTR_TYPE_TELENUMBER
AttrDef.getType()
and AttrDef.setType()
.
SchemaDef.AttrDef.getType()
,
SchemaDef.AttrDef.setType(int)
,
Constant Field Valuespublic static final int ATTR_TYPE_INT
AttrDef.getType()
and AttrDef.setType()
.
SchemaDef.AttrDef.getType()
,
SchemaDef.AttrDef.setType(int)
,
Constant Field Valuespublic static final int ATTR_TYPE_STATE
AttrDef.getType()
and AttrDef.setType()
.
SchemaDef.AttrDef.getType()
,
SchemaDef.AttrDef.setType(int)
,
Constant Field Valuespublic static final int ATTR_TYPE_COUNTER
AttrDef.getType()
and AttrDef.setType()
.
SchemaDef.AttrDef.getType()
,
SchemaDef.AttrDef.setType(int)
,
Constant Field Valuespublic static final int ATTR_TYPE_DN
AttrDef.getType()
and AttrDef.setType()
.
SchemaDef.AttrDef.getType()
,
SchemaDef.AttrDef.setType(int)
,
Constant Field Valuespublic static final int ATTR_TYPE_INTERVAL
AttrDef.getType()
and AttrDef.setType()
.
SchemaDef.AttrDef.getType()
,
SchemaDef.AttrDef.setType(int)
,
Constant Field Valuespublic static final int ATTR_TYPE_OCTET
AttrDef.getType()
and AttrDef.setType()
.
SchemaDef.AttrDef.getType()
,
SchemaDef.AttrDef.setType(int)
,
Constant Field Valuespublic static final int ATTR_TYPE_TIME
AttrDef.getType()
and AttrDef.setType()
.
SchemaDef.AttrDef.getType()
,
SchemaDef.AttrDef.setType(int)
,
Constant Field Valuespublic static final int ATTR_TYPE_STRUCTURED
AttrDef.getType()
and AttrDef.setType()
.
SchemaDef.AttrDef.getType()
,
SchemaDef.AttrDef.setType(int)
,
Constant Field Valuespublic static final int ATTR_TYPE_CLASSNAME
AttrDef.getType()
and AttrDef.setType()
.
SchemaDef.AttrDef.getType()
,
SchemaDef.AttrDef.setType(int)
,
Constant Field Valuespublic static final int DN_FORMAT_DOT
SchemaDef.getDNFormat()
and SchemaDef.setDNFormat()
.
getDNFormat()
,
setDNFormat(int)
,
Constant Field Valuespublic static final int DN_FORMAT_QUALIFIED_DOT
SchemaDef.getDNFormat()
and SchemaDef.setDNFormat()
.
getDNFormat()
,
setDNFormat(int)
,
Constant Field Valuespublic static final int DN_FORMAT_SLASH
SchemaDef.getDNFormat()
and SchemaDef.setDNFormat()
.
getDNFormat()
,
setDNFormat(int)
,
Constant Field Valuespublic static final int DN_FORMAT_QUALIFIED_SLASH
SchemaDef.getDNFormat()
and SchemaDef.setDNFormat()
.
getDNFormat()
,
setDNFormat(int)
,
Constant Field Valuespublic static final int DN_FORMAT_LDAP
SchemaDef.getDNFormat()
and SchemaDef.setDNFormat()
.
getDNFormat()
,
setDNFormat(int)
,
Constant Field ValuesConstructor Detail |
---|
public SchemaDef()
SchemaDef
instance.
public SchemaDef(Element schemaDef) throws XMLException
SchemaDef
instance based on an XML representation.
schemaDef
- the <schema-def> element
XMLException
- thrown if there is an error in the XML representationpublic SchemaDef(SchemaDef source)
source
- the SchemaDef
instance to copyMethod Detail |
---|
public String getApplicationName()
null
public void setApplicationName(String newName)
newName
- new value for "application-name" (may be null
)public String getDNDelims()
null
public void setDNDelims(String newDelims)
newDelims
- new value for "dn-delims" (may be null
)public int getDNFormat()
DN_FORMAT_DOT
, DN_FORMAT_QUALIFIED_DOT
, etc.public void setDNFormat(int format) throws IllegalArgumentException
format
- one of DN_FORMAT_DOT
, DN_FORMAT_QUALIFIED_DOT
, etc.
IllegalArgumentException
- thrown if format
parameter is incorrectpublic boolean getHierarchical()
true
or false
public void setHierarchical(boolean value)
value
- true
or false
public SchemaDef.ClassDef getClassDef(String className)
ClassDef
instance from this SchemaDef
instance
based on class name.
className
- the name of the class
null
or a ClassDef
instancepublic SchemaDef.ClassDef newClass(String className) throws IllegalStateException
ClassDef
instance.
className
- name of new class
ClassDef
instance
IllegalStateException
- thrown if a ClassDef
already exists with
the passed namepublic boolean removeClass(String className)
className
- name of class to be removed
ClassDef
was removedpublic static int getDNFormatFromString(String dnFormatString) throws IllegalArgumentException
dnFormatString
- "dot", "qualified-dot", "slash", "qualified-slash", "ldap"
IllegalArgumentException
- thrown if dnFormatString
is not a valid valuepublic static String getDNFormatString(int dnFormat) throws IllegalArgumentException
dnFormat
- DN_FORMAT_DOT, DN_FORMAT_QUALIFIED_DOT, etc.
IllegalArgumentException
- thrown if dnFormat
is not a valid valuepublic Iterator iterator()
Iterator
that will iterate over the ClassDef
instances
in this SchemaDef
instance.
Iterator
whose next() method returns ClassDef
instancespublic boolean hasBeenModified()
true
if this instance has been modified.
The instance is considered to have been modified if a change was made
that affects the persistent representation since:
resetModified()
was last called
hasBeenModified
in interface ConfigElement
true
or false
resetModified()
public void resetModified()
hasBeenModified()
will return false
.
resetModified
in interface ConfigElement
hasBeenModified()
public Element toXML(Node parent)
Node
.
Note that the act of creating an XML representation does not reset this instance's
modified flag. It must be reset by calling resetModified()
.
toXML
in interface ConfigElement
parent
- Node
under which to construct XML representation.
Element
hasBeenModified()
,
resetModified()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |