|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.nds.dirxml.shimhost.NamedPasswords
public class NamedPasswords
Class encapsulating named password behavior for hosting shims. This primarily exists to support named password references in shim configuration parameters.
Nested Class Summary | |
---|---|
class |
NamedPasswords.NamedPassword
Class encapsulating a named password. |
Field Summary | |
---|---|
static String |
ATTR_SECURE
Name for XML attribute 'secure'. |
static String |
TAG_DESCRIPTION
Tag name for XML element 'description'. |
static String |
TAG_KEY
Tag name for XML element 'key'. |
static String |
TAG_NAMED_PASSWORD
Tag name for XML element 'named-password'. |
static String |
TAG_NAMED_PASSWORDS
Tag name for XML element 'named-passwords'. |
static String |
TAG_PASSWORD
Tag name for XML element 'password'. |
static String |
VAL_FALSE
"false" |
static String |
VAL_TRUE
"true" |
Constructor Summary | |
---|---|
NamedPasswords()
Construct an empty NamedPasswords instance. |
|
NamedPasswords(Element namedPasswords,
boolean secure)
Construct a NamedPasswords instance from an XML representation. |
Method Summary | |
---|---|
NamedPasswords.NamedPassword |
getNamedPassword(String key)
Get a NamedPassword object by name. |
boolean |
hasBeenModified()
Return true if this instance has been modified. |
Iterator |
iterator()
Return an Iterator that will return all the NamedPassword
objects in this instance. |
NamedPasswords.NamedPassword |
newNamedPassword(String key)
Create a new named password entry if one doesn't already exist with the passed name. |
NamedPasswords.NamedPassword |
removeNamedPassword(String key)
Remote named password entry if it exists in this instance. |
void |
resetModified()
Reset the modified flag for this instance such that hasBeenModified()
will return false . |
void |
setConfigPassword(char[] configPassword)
Set a password for use by contained NamedPassword instance for
setting and returning clear-text passwords. |
Element |
toXML(Node parent)
Construct an XML representation of this instance. |
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_NAMED_PASSWORDS
public static final String TAG_NAMED_PASSWORD
public static final String TAG_KEY
public static final String TAG_DESCRIPTION
public static final String TAG_PASSWORD
public static final String ATTR_SECURE
public static final String VAL_TRUE
public static final String VAL_FALSE
Constructor Detail |
---|
public NamedPasswords()
NamedPasswords
instance.
public NamedPasswords(Element namedPasswords, boolean secure) throws XMLException
NamedPasswords
instance from an XML representation.
namedPasswords
- <named-passwords> element containing the
XML representation.secure
- true
if enclosing XML specifies passwords are encrypted
XMLException
- if the XML representation is incorrectMethod Detail |
---|
public void setConfigPassword(char[] configPassword)
NamedPassword
instance for
setting and returning clear-text passwords.
configPassword
- password characters or null
public 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()
,
toXML(org.w3c.dom.Node)
public void resetModified()
hasBeenModified()
will return false
.
resetModified
in interface ConfigElement
hasBeenModified()
public Element toXML(Node parent)
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 build the XML representation
hasBeenModified()
,
resetModified()
public Iterator iterator()
Iterator
that will return all the NamedPassword
objects in this instance.
Iterator
public NamedPasswords.NamedPassword getNamedPassword(String key)
NamedPassword
object by name.
key
- name of password
NamedPassword
object or null
public NamedPasswords.NamedPassword newNamedPassword(String key) throws IllegalArgumentException
key
- name of named password
NamedPassword
instance
IllegalArgumentException
- if key
is null
or emptypublic NamedPasswords.NamedPassword removeNamedPassword(String key)
key
- name of named password
NamedPassword
instance, or null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |