com.arjuna.ats.arjuna.gandiva.nameservice
Class NameServiceImple

java.lang.Object
  extended bycom.arjuna.ats.arjuna.gandiva.nameservice.NameServiceImple
All Implemented Interfaces:
java.lang.Cloneable

public abstract class NameServiceImple
extends java.lang.Object
implements java.lang.Cloneable

NameService implementations are typically used by ObjectName to store and retrieve object data in a manner specific to the NameService. So, for example, one such implementation may use a database, whereas another may use a remote property service. These details are hidden by the implementation. All NameService implementations must derive from this base class and provide implementations of the abstract methods.

Since:
JTS 1.0.
Version:
$Id: NameServiceImple.java 2342 2006-03-30 13:06:17Z nmcl $
Author:
Mark Little (mark@arjuna.com)

Constructor Summary
NameServiceImple()
           
 
Method Summary
abstract  int attributeType(java.lang.String objName, java.lang.String attrName)
          Return the type of the attribute.
 ClassName className()
           
abstract  java.lang.Object clone()
           
abstract  java.lang.String firstAttributeName(java.lang.String objName)
          Return the first attribute.
abstract  ClassName getClassNameAttribute(java.lang.String objName, java.lang.String attrName)
          Return the named ClassName attribute.
abstract  long getLongAttribute(java.lang.String objName, java.lang.String attrName)
          Return the named long attribute.
abstract  ObjectName getObjectNameAttribute(java.lang.String objName, java.lang.String attrName)
          Return the named ObjectName attribute.
abstract  java.lang.String getStringAttribute(java.lang.String objName, java.lang.String attrName)
          Return the named String attribute.
abstract  Uid getUidAttribute(java.lang.String objName, java.lang.String attrName)
          Return the named Uid attribute.
static ClassName name()
           
abstract  java.lang.String nextAttributeName(java.lang.String objName, java.lang.String attrName)
          Return the next attribute.
abstract  java.lang.String removeAttribute(java.lang.String objName, java.lang.String attrName)
          Remove the specified attribute and return a potentially modified ObjectName identity.
abstract  java.lang.String setClassNameAttribute(java.lang.String objName, java.lang.String attrName, ClassName value)
          Set the named ClassName attribute.
abstract  java.lang.String setLongAttribute(java.lang.String objName, java.lang.String attrName, long value)
          Set the named long attribute.
abstract  java.lang.String setObjectNameAttribute(java.lang.String objName, java.lang.String attrName, ObjectName value)
          Set the named ObjectName attribute.
abstract  java.lang.String setStringAttribute(java.lang.String objName, java.lang.String attrName, java.lang.String value)
          Set the named String attribute.
abstract  java.lang.String setUidAttribute(java.lang.String objName, java.lang.String attrName, Uid value)
          Set the named Uid attribute.
abstract  java.lang.String uniqueAttributeName(java.lang.String objName)
          Return a unique (within the scope of this implementation) attribute name.
abstract  ObjectName uniqueObjectName()
          Return a unique (within the scope of this implementation) ObjectName, which uses this NameService.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameServiceImple

public NameServiceImple()
Method Detail

attributeType

public abstract int attributeType(java.lang.String objName,
                                  java.lang.String attrName)
                           throws java.io.IOException
Return the type of the attribute. The ObjectName identity is given to allow implementation specific lookups.

Throws:
java.io.IOException

firstAttributeName

public abstract java.lang.String firstAttributeName(java.lang.String objName)
                                             throws java.io.IOException
Return the first attribute. The ObjectName identity is given to allow implementation specific lookups.

Throws:
java.io.IOException

nextAttributeName

public abstract java.lang.String nextAttributeName(java.lang.String objName,
                                                   java.lang.String attrName)
                                            throws java.io.IOException
Return the next attribute. The ObjectName identity is given to allow implementation specific lookups.

Throws:
java.io.IOException

getLongAttribute

public abstract long getLongAttribute(java.lang.String objName,
                                      java.lang.String attrName)
                               throws java.io.IOException
Return the named long attribute. The ObjectName identity is given to allow implementation specific lookups. If the specified attribute is not of the correct type then an IOException will be thrown.

Throws:
java.io.IOException

getStringAttribute

public abstract java.lang.String getStringAttribute(java.lang.String objName,
                                                    java.lang.String attrName)
                                             throws java.io.IOException
Return the named String attribute. The ObjectName identity is given to allow implementation specific lookups. If the specified attribute is not of the correct type then an IOException will be thrown.

Throws:
java.io.IOException

getObjectNameAttribute

public abstract ObjectName getObjectNameAttribute(java.lang.String objName,
                                                  java.lang.String attrName)
                                           throws java.io.IOException
Return the named ObjectName attribute. The ObjectName identity is given to allow implementation specific lookups. If the specified attribute is not of the correct type then an IOException will be thrown.

Throws:
java.io.IOException

getClassNameAttribute

public abstract ClassName getClassNameAttribute(java.lang.String objName,
                                                java.lang.String attrName)
                                         throws java.io.IOException
Return the named ClassName attribute. The ObjectName identity is given to allow implementation specific lookups. If the specified attribute is not of the correct type then an IOException will be thrown.

Throws:
java.io.IOException

getUidAttribute

public abstract Uid getUidAttribute(java.lang.String objName,
                                    java.lang.String attrName)
                             throws java.io.IOException
Return the named Uid attribute. The ObjectName identity is given to allow implementation specific lookups. If the specified attribute is not of the correct type then an IOException will be thrown.

Throws:
java.io.IOException

setLongAttribute

public abstract java.lang.String setLongAttribute(java.lang.String objName,
                                                  java.lang.String attrName,
                                                  long value)
                                           throws java.io.IOException
Set the named long attribute. The ObjectName identity is given to allow implementation specific lookups. A potentially modified ObjectName identity is returned.

Throws:
java.io.IOException

setStringAttribute

public abstract java.lang.String setStringAttribute(java.lang.String objName,
                                                    java.lang.String attrName,
                                                    java.lang.String value)
                                             throws java.io.IOException
Set the named String attribute. The ObjectName identity is given to allow implementation specific lookups. A potentially modified ObjectName identity is returned.

Throws:
java.io.IOException

setObjectNameAttribute

public abstract java.lang.String setObjectNameAttribute(java.lang.String objName,
                                                        java.lang.String attrName,
                                                        ObjectName value)
                                                 throws java.io.IOException
Set the named ObjectName attribute. The ObjectName identity is given to allow implementation specific lookups. A potentially modified ObjectName identity is returned.

Throws:
java.io.IOException

setClassNameAttribute

public abstract java.lang.String setClassNameAttribute(java.lang.String objName,
                                                       java.lang.String attrName,
                                                       ClassName value)
                                                throws java.io.IOException
Set the named ClassName attribute. The ObjectName identity is given to allow implementation specific lookups. A potentially modified ObjectName identity is returned.

Throws:
java.io.IOException

setUidAttribute

public abstract java.lang.String setUidAttribute(java.lang.String objName,
                                                 java.lang.String attrName,
                                                 Uid value)
                                          throws java.io.IOException
Set the named Uid attribute. The ObjectName identity is given to allow implementation specific lookups. A potentially modified ObjectName identity is returned.

Throws:
java.io.IOException

removeAttribute

public abstract java.lang.String removeAttribute(java.lang.String objName,
                                                 java.lang.String attrName)
                                          throws java.io.IOException
Remove the specified attribute and return a potentially modified ObjectName identity.

Throws:
java.io.IOException

uniqueAttributeName

public abstract java.lang.String uniqueAttributeName(java.lang.String objName)
                                              throws java.io.IOException
Return a unique (within the scope of this implementation) attribute name.

Throws:
java.io.IOException

uniqueObjectName

public abstract ObjectName uniqueObjectName()
                                     throws java.io.IOException
Return a unique (within the scope of this implementation) ObjectName, which uses this NameService.

Throws:
java.io.IOException

clone

public abstract java.lang.Object clone()

className

public ClassName className()

name

public static ClassName name()