Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jdaemon.util.data.jndi
Class DirectoryDataRepresentation  view DirectoryDataRepresentation download DirectoryDataRepresentation.java

java.lang.Object
  extended byorg.jdaemon.util.data.jndi.DirectoryDataRepresentation
All Implemented Interfaces:
org.jdaemon.util.data.DataRepresentation

public class DirectoryDataRepresentation
extends java.lang.Object
implements org.jdaemon.util.data.DataRepresentation

DataRepresentation implementation for JNDI directories ****NOT FINISHED****

Version:

Field Summary
private  javax.naming.directory.DirContext directory
           
 
Constructor Summary
DirectoryDataRepresentation(javax.naming.directory.DirContext directory)
          Creates new DataRepresentation
 
Method Summary
 java.lang.String getAttribute(java.lang.Object key)
          Get attribute from directory Returns null if no attribute exists with the given key
 java.util.Iterator getAttributeKeys()
          Return all the valid keys for attributes of this representation
 org.jdaemon.util.data.DataRepresentation getElement(java.lang.Object key)
          Get sub-element from directory returns null if no subdirectory exists with the given key
 java.util.Iterator getElementKeys()
          Return all the valid keys for sub-elements of this representation
 java.lang.String getElementType()
          Get element type from directory Returns the value of the objectClass attribute within the underlying JNDI directory.
 org.jdaemon.util.data.DataRepresentation newElement(java.lang.String type)
          Create a new, empty element (not a member of this or any parent representation)
 void setAttribute(java.lang.Object key, java.lang.String value)
          Set an attriubute of this representation
 void setElement(java.lang.Object key, org.jdaemon.util.data.DataRepresentation other)
          Add an element to this representation with the given key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directory

private javax.naming.directory.DirContext directory
Constructor Detail

DirectoryDataRepresentation

public DirectoryDataRepresentation(javax.naming.directory.DirContext directory)
Creates new DataRepresentation

Method Detail

getElementType

public java.lang.String getElementType()
                                throws org.jdaemon.util.data.ReadError
Get element type from directory Returns the value of the objectClass attribute within the underlying JNDI directory. Returns null if no objectClass attribute exists.

Specified by:
getElementType in interface org.jdaemon.util.data.DataRepresentation

getElement

public org.jdaemon.util.data.DataRepresentation getElement(java.lang.Object key)
                                                    throws org.jdaemon.util.data.ReadError
Get sub-element from directory returns null if no subdirectory exists with the given key

Specified by:
getElement in interface org.jdaemon.util.data.DataRepresentation

getAttribute

public java.lang.String getAttribute(java.lang.Object key)
                              throws org.jdaemon.util.data.ReadError
Get attribute from directory Returns null if no attribute exists with the given key

Specified by:
getAttribute in interface org.jdaemon.util.data.DataRepresentation

getElementKeys

public java.util.Iterator getElementKeys()
                                  throws org.jdaemon.util.data.ReadError
Return all the valid keys for sub-elements of this representation

Specified by:
getElementKeys in interface org.jdaemon.util.data.DataRepresentation

getAttributeKeys

public java.util.Iterator getAttributeKeys()
                                    throws org.jdaemon.util.data.ReadError
Return all the valid keys for attributes of this representation

Specified by:
getAttributeKeys in interface org.jdaemon.util.data.DataRepresentation

setAttribute

public void setAttribute(java.lang.Object key,
                         java.lang.String value)
                  throws org.jdaemon.util.data.WriteError
Set an attriubute of this representation

Specified by:
setAttribute in interface org.jdaemon.util.data.DataRepresentation

setElement

public void setElement(java.lang.Object key,
                       org.jdaemon.util.data.DataRepresentation other)
                throws org.jdaemon.util.data.WriteError,
                       org.jdaemon.util.data.ReadError
Add an element to this representation with the given key

Specified by:
setElement in interface org.jdaemon.util.data.DataRepresentation

newElement

public org.jdaemon.util.data.DataRepresentation newElement(java.lang.String type)
Create a new, empty element (not a member of this or any parent representation)

Specified by:
newElement in interface org.jdaemon.util.data.DataRepresentation