Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.nds.dirxml.shimhost
Class NamedPasswords.NamedPassword

    java.lang.Object
      com.novell.nds.dirxml.shimhost.Password
          com.novell.nds.dirxml.shimhost.NamedPasswords.NamedPassword

All Implemented Interfaces:
  ConfigElement

Enclosing class:
  NamedPasswords

    public class NamedPasswords.NamedPassword

extends Password

Class encapsulating a named password. Contains the key (name), description, and actual password data.

Field Summary

Fields inherited from class com.novell.nds.dirxml.shimhost.Password
`modified, TAG_PASSWORD, ZERO_CHAR`

Method Summary
`String` | `getDescription()` Get the description of this password
`String` | `getKey()` Get the key (name) of this password
`char[]` | `getPasswordValue()` Return the password characters.
`boolean` | `isPasswordEmpty()`
`void` | `setDescription(String newDesc)` Set the description for this password
`void` | `setPasswordValue(char[] pwdChars)` Set the password characters.
`Element` | `toXML(Node parent)` Construct an XML representation of this instance.

Methods inherited from class com.novell.nds.dirxml.shimhost.Password
`clear, clearPassword, finalize, getPassword, getPassword, getTagName, hasBeenModified, isEmpty, isEmpty, isEncrypted, resetModified, setEncrypted, setPassword, setPassword, setPassword, setTagName, setUnencrypted`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getPasswordValue

    public char[] getPasswordValue()
                            throws CipherException,
                                   IllegalStateException

  Return the password characters. If the enclosing `NamedPasswords` instance has a config password set (`setConfigPassword()`) then this will return the clear-text password even if the password value is encrypted.

  Returns:
    copy of password characters
  Throws:
    `CipherException` - if an error occurs decrypting password
    `IllegalStateException` - if the password is encrypted and no config password has been set.

### isPasswordEmpty

    public boolean isPasswordEmpty()
                            throws CipherException,
                                   IllegalStateException

  Throws:
    `CipherException`
    `IllegalStateException`

### setPasswordValue

    public void setPasswordValue(char[] pwdChars)
                          throws CipherException

  Set the password characters. If the enclosing `NamedPasswords` instance has a config password set (`setConfigPassword()`) then this set an encrypted password.

  Parameters:
    `pwdChars` - password characters
  Throws:
    `CipherException` - if an error occurs encrypted the password characters

### toXML

    public Element toXML(Node parent)

  Construct an XML representation of this instance.

  Note that the act of creating an XML representation does not reset this instance's modified flag. It must be reset by calling `resetModified()`.

  Specified by:
    `toXML` in interface `ConfigElement`
  Overrides:
    `toXML` in class `Password`
  Parameters:
    `parent` - `Node` under which to build representation
  Returns:
    constructed <>named-password> `Element`
  See Also:
    `Password.hasBeenModified()`, `Password.resetModified()`

### getKey

    public String getKey()

  Get the key (name) of this password

  Returns:
    name

### getDescription

    public String getDescription()

  Get the description of this password

  Returns:
    description

### setDescription

    public void setDescription(String newDesc)

  Set the description for this password

  Parameters:
    `newDesc` - description

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD