com.tivoli.twg.dmi
Class DMIInterface

java.lang.Object
  extended bycom.tivoli.twg.dmi.DMIInterface
All Implemented Interfaces:
iDMIInterface

public class DMIInterface
extends java.lang.Object
implements iDMIInterface

This class implements the iDMIInterface interface for interacting with a DMI V2.0 Service Provider. This particular implementation is designed for use within Tivoli ITD.

See Also:
iDMIInterface, iDMIResponse

Field Summary
static int REQUEST_MODE_FIRST
           
static int REQUEST_MODE_NEXT
           
static int REQUEST_MODE_UNIQUE
           
static int SETMODE_RELEASE
           
static int SETMODE_RESERVE
           
static int SETMODE_SET
           
 
Constructor Summary
DMIInterface(long MOID, iDMIResponse Owner)
          Constructor: Create an instance of the DMIInterface for interacting with a particular client.
 
Method Summary
protected  void CallBack(iDMIResponse Owner, com.tivoli.twg.dmi.DMICommand cmd, java.lang.Object[] DataStore)
          Internal function used to handle the asynchronous responses received from the client
 void cleanUp()
           
 boolean DmiGetAttribute(iDMIResponse Owner, int CompID, int GroupID, int AttribID, DMIAttributeValue[] KeyList)
          This method will get the value for a single attribute as described in the DMI V2.0 specification.
 boolean DmiGetMultiple(iDMIResponse Owner, DMI_MultiRow[] Rows)
          This method will get the values for multiple attributes as described in the DMI V2.0 specification, as well as allow the listing of rows contained in tabluar groups.
 boolean DmiListAttributes(iDMIResponse Owner, boolean Next, int MaxCount, boolean GetPragma, boolean GetDescription, int CompID, int GroupID, int AttribID)
          This method will perform the attribute listing functions as described in the DMI V2.0 specification.
 boolean DmiListClassNames(iDMIResponse Owner, int MaxCount, int CompID)
          This method will list the Class Names contained by the given component as described in the DMI V2.0 specification.
 boolean DmiListComponents(iDMIResponse Owner, boolean Next, int MaxCount, boolean GetPragma, boolean GetDescription, int CompID)
          This method will perform the component listing functions as described in the DMI V2.0 specification.
 boolean DmiListComponentsByClass(iDMIResponse Owner, boolean Next, int MaxCount, boolean GetPragma, boolean GetDescription, int CompID, java.lang.String ClassName, DMIAttributeValue[] KeyList)
          This method will perform the component listing functions as described in the DMI V2.0 specification.
 boolean DmiListGroups(iDMIResponse Owner, boolean Next, int MaxCount, boolean GetPragma, boolean GetDescription, int CompID, int GroupID)
          This method will perform the group listing functions as described in the DMI V2.0 specification.
 boolean DmiListLanguages(iDMIResponse Owner, int MaxCount, int CompID)
          This method will list the Languages supported by the given component as described in the DMI V2.0 specification.
 boolean DmiSetAttribute(iDMIResponse Owner, int CompID, int GroupID, DMIAttributeValue[] KeyList, int SetMode, DMIAttributeValue Value)
          This method will set the value for a single attribute as described in the DMI V2.0 specification.
 boolean DmiSetMultiple(iDMIResponse Owner, int SetMode, DMI_MultiRow[] Rows)
          This method will set the values for multiple attributes as described in the DMI V2.0 specification.
protected  void finalize()
          private finalizer
 java.lang.String GetDescription()
          This method will return the Description of the DMI Provider on the client.
 java.lang.String GetFileTypeAsString(int x)
          This method will translate the file type id to the keyword string defined for it in the specification.
 int[] GetFileTypes()
          This method will return the FileTypes supported by DMI Provider on the client.
 java.lang.String GetSpecLevel()
          This method will return the Specification Level of the DMI Provider on the client.
 boolean isRegistered()
          This method is used to determine if the instance of iDMIInterface is "registered" with the client SP.
 void OverRideLocale(java.util.Locale Loc)
          This method will allow the user to override the Default locale used when asking the client SP for translatable strings.
 void ResetLocal()
          This method will allow the user to reset the Locale that is being used to query the client SP for translatable strings, to the default for the JVM that this instance of the interface is running in.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SETMODE_SET

public static final int SETMODE_SET
See Also:
Constant Field Values

SETMODE_RESERVE

public static final int SETMODE_RESERVE
See Also:
Constant Field Values

SETMODE_RELEASE

public static final int SETMODE_RELEASE
See Also:
Constant Field Values

REQUEST_MODE_UNIQUE

public static final int REQUEST_MODE_UNIQUE
See Also:
Constant Field Values

REQUEST_MODE_FIRST

public static final int REQUEST_MODE_FIRST
See Also:
Constant Field Values

REQUEST_MODE_NEXT

public static final int REQUEST_MODE_NEXT
See Also:
Constant Field Values
Constructor Detail

DMIInterface

public DMIInterface(long MOID,
                    iDMIResponse Owner)
Constructor: Create an instance of the DMIInterface for interacting with a particular client.

Method Detail

cleanUp

public void cleanUp()

GetSpecLevel

public java.lang.String GetSpecLevel()
Description copied from interface: iDMIInterface
This method will return the Specification Level of the DMI Provider on the client.

Specified by:
GetSpecLevel in interface iDMIInterface
Returns:
String - Specification level as returned by the SP

NOTE: this method does NOT have an asyncronous response.

See Also:
iDMIInterface

GetDescription

public java.lang.String GetDescription()
Description copied from interface: iDMIInterface
This method will return the Description of the DMI Provider on the client.

Specified by:
GetDescription in interface iDMIInterface
Returns:
String - Description as returned by the SP

NOTE: this method does NOT have an asyncronous response.

See Also:
iDMIInterface

GetFileTypes

public int[] GetFileTypes()
Description copied from interface: iDMIInterface
This method will return the FileTypes supported by DMI Provider on the client.

Specified by:
GetFileTypes in interface iDMIInterface
Returns:
int[] - Array of File Types supported on the Client SP

NOTE: this method does NOT have an asyncronous response.

See Also:
iDMIInterface

isRegistered

public boolean isRegistered()
Description copied from interface: iDMIInterface
This method is used to determine if the instance of iDMIInterface is "registered" with the client SP.

Specified by:
isRegistered in interface iDMIInterface
Returns:
boolean - true if registered

NOTE: this method does NOT have an asyncronous response.


OverRideLocale

public void OverRideLocale(java.util.Locale Loc)
Description copied from interface: iDMIInterface
This method will allow the user to override the Default locale used when asking the client SP for translatable strings. By default, the interface implementation should use the Default local for the JVM that it is running in.

Specified by:
OverRideLocale in interface iDMIInterface
See Also:
iDMIInterface

ResetLocal

public void ResetLocal()
Description copied from interface: iDMIInterface
This method will allow the user to reset the Locale that is being used to query the client SP for translatable strings, to the default for the JVM that this instance of the interface is running in.

NOTE: this method does NOT have an asyncronous response.

Specified by:
ResetLocal in interface iDMIInterface
See Also:
iDMIInterface

GetFileTypeAsString

public java.lang.String GetFileTypeAsString(int x)
Description copied from interface: iDMIInterface
This method will translate the file type id to the keyword string defined for it in the specification.

Specified by:
GetFileTypeAsString in interface iDMIInterface
Returns:
String

NOTE: this method does NOT have an asyncronous response.

See Also:
iDMIInterface

finalize

protected void finalize()
                 throws java.lang.Throwable
private finalizer

Throws:
java.lang.Throwable

DmiListComponents

public boolean DmiListComponents(iDMIResponse Owner,
                                 boolean Next,
                                 int MaxCount,
                                 boolean GetPragma,
                                 boolean GetDescription,
                                 int CompID)
Description copied from interface: iDMIInterface
This method will perform the component listing functions as described in the DMI V2.0 specification.

Specified by:
DmiListComponents in interface iDMIInterface
Returns:
boolean - success or failure of this request NOTE: The caller can consider the operation complete if it returns false, or when it receives a callback at the iDMIResponse method: Owner.DMIListComponent()
See Also:
iDMIInterface

DmiListGroups

public boolean DmiListGroups(iDMIResponse Owner,
                             boolean Next,
                             int MaxCount,
                             boolean GetPragma,
                             boolean GetDescription,
                             int CompID,
                             int GroupID)
Description copied from interface: iDMIInterface
This method will perform the group listing functions as described in the DMI V2.0 specification.

Specified by:
DmiListGroups in interface iDMIInterface
Returns:
boolean - success or failure of this request NOTE: The caller can consider the operation complete if it returns false, or when it receives a callback at the iDMIResponse method: Owner.DMIListGroup()
See Also:
iDMIInterface

DmiListAttributes

public boolean DmiListAttributes(iDMIResponse Owner,
                                 boolean Next,
                                 int MaxCount,
                                 boolean GetPragma,
                                 boolean GetDescription,
                                 int CompID,
                                 int GroupID,
                                 int AttribID)
Description copied from interface: iDMIInterface
This method will perform the attribute listing functions as described in the DMI V2.0 specification.

Specified by:
DmiListAttributes in interface iDMIInterface
Returns:
boolean - success or failure of this request NOTE: The caller can consider the operation complete if it returns false, or when it receives a callback at the iDMIResponse method: Owner.DMIListAttribute()
See Also:
iDMIInterface

DmiListLanguages

public boolean DmiListLanguages(iDMIResponse Owner,
                                int MaxCount,
                                int CompID)
Description copied from interface: iDMIInterface
This method will list the Languages supported by the given component as described in the DMI V2.0 specification.

Specified by:
DmiListLanguages in interface iDMIInterface
Returns:
boolean - success or failure of this request NOTE: The caller can consider the operation complete if it returns false, or when it receives a callback at the iDMIResponse method: Owner.DMIListLanguage()
See Also:
iDMIInterface

DmiListClassNames

public boolean DmiListClassNames(iDMIResponse Owner,
                                 int MaxCount,
                                 int CompID)
Description copied from interface: iDMIInterface
This method will list the Class Names contained by the given component as described in the DMI V2.0 specification.

Specified by:
DmiListClassNames in interface iDMIInterface
Returns:
boolean - success or failure of this request NOTE: The caller can consider the operation complete if it returns false, or when it receives a callback at the iDMIResponse method: Owner.DMIListClasses()
See Also:
iDMIInterface

DmiListComponentsByClass

public boolean DmiListComponentsByClass(iDMIResponse Owner,
                                        boolean Next,
                                        int MaxCount,
                                        boolean GetPragma,
                                        boolean GetDescription,
                                        int CompID,
                                        java.lang.String ClassName,
                                        DMIAttributeValue[] KeyList)
Description copied from interface: iDMIInterface
This method will perform the component listing functions as described in the DMI V2.0 specification. The method additionally allows for filtering based on Group ClassName, and row key list.

Specified by:
DmiListComponentsByClass in interface iDMIInterface
Returns:
boolean - success or failure of this request NOTE: The caller can consider the operation complete if it returns false, or when it receives a callback at the iDMIResponse method: Owner.DMIListComponent()
See Also:
iDMIInterface

DmiGetAttribute

public boolean DmiGetAttribute(iDMIResponse Owner,
                               int CompID,
                               int GroupID,
                               int AttribID,
                               DMIAttributeValue[] KeyList)
Description copied from interface: iDMIInterface
This method will get the value for a single attribute as described in the DMI V2.0 specification.

Specified by:
DmiGetAttribute in interface iDMIInterface
Returns:
boolean - success or failure of this request NOTE: The caller can consider the operation complete if it returns false, or when it receives a callback at the iDMIResponse method: Owner.DMIGetResponse()
See Also:
iDMIInterface

DmiSetAttribute

public boolean DmiSetAttribute(iDMIResponse Owner,
                               int CompID,
                               int GroupID,
                               DMIAttributeValue[] KeyList,
                               int SetMode,
                               DMIAttributeValue Value)
Description copied from interface: iDMIInterface
This method will set the value for a single attribute as described in the DMI V2.0 specification.

Specified by:
DmiSetAttribute in interface iDMIInterface
Returns:
boolean - success or failure of this request NOTE: The caller can consider the operation complete if it returns false, or when it receives a callback at the iDMIResponse method: Owner.DMISetResponse()
See Also:
iDMIInterface

DmiGetMultiple

public boolean DmiGetMultiple(iDMIResponse Owner,
                              DMI_MultiRow[] Rows)
Description copied from interface: iDMIInterface
This method will get the values for multiple attributes as described in the DMI V2.0 specification, as well as allow the listing of rows contained in tabluar groups.

Specified by:
DmiGetMultiple in interface iDMIInterface
Returns:
boolean - success or failure of this request NOTE: The caller can consider the operation complete if it returns false, or when it receives a callback at the iDMIResponse method: Owner.DMIGetResponse()
See Also:
iDMIInterface

DmiSetMultiple

public boolean DmiSetMultiple(iDMIResponse Owner,
                              int SetMode,
                              DMI_MultiRow[] Rows)
Description copied from interface: iDMIInterface
This method will set the values for multiple attributes as described in the DMI V2.0 specification.

Specified by:
DmiSetMultiple in interface iDMIInterface
Returns:
boolean - success or failure of this request NOTE: The caller can consider the operation complete if it returns false, or when it receives a callback at the iDMIResponse method: Owner.DMISetResponse()
See Also:
iDMIInterface

CallBack

protected void CallBack(iDMIResponse Owner,
                        com.tivoli.twg.dmi.DMICommand cmd,
                        java.lang.Object[] DataStore)
Internal function used to handle the asynchronous responses received from the client