Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.subsystems.qsys.api
Class IBMiAbsoluteName

java.lang.Object
  extended by com.ibm.etools.iseries.subsystems.qsys.api.IBMiAbsoluteName

public class IBMiAbsoluteName
extends Object

Throughout the iSeries support, we often have to turn remote objects into absolute names, and decompose absolute names into constituent parts.

This is needed by the remote systems framework, which needs to be able to uniquely identify a remote object within a connection (well, subsystem) since its binary address within a particular view can change on a refresh.

We found ourselves redundantly writing such code in many places, causing a maintenance problem if we chose to change the format of a particular object's absolute name.


Field Summary
static String copyright
           
static int OBJTYPE_FLD
           
static int OBJTYPE_LIB
           
static int OBJTYPE_MBR
           
static int OBJTYPE_MSGD
           
static int OBJTYPE_OBJ
           
static int OBJTYPE_RCD
           
static int OBJTYPE_UNKNOWN
           
 
Constructor Summary
IBMiAbsoluteName(String absoluteName)
          Constructor that takes a fully formed absolute name
 
Method Summary
static String getAbsoluteFieldName(String libraryName, String fileName, String recordName, String fieldName, String hostname)
          Static helper method to return the absolute name of a record in a file.
static String getAbsoluteLibraryName(String libraryName, String hostname)
          For when we don't care about library subtype; when it's not being tracked as part of a library list.
static String getAbsoluteLibraryName(String libraryName, String subType, String hostname)
          For when we do care about library subtype; because we may be tracking it in the library list.
static String getAbsoluteMemberName(String libraryName, String fileName, String memberName, String hostname)
          Static helper method to return the absolute name of a member in a file.
static String getAbsoluteMessageIDName(String libraryName, String fileName, String messageID, String hostname)
          Static helper method to return the absolute name of a message in a message file.
static String getAbsoluteObjectName(String libraryName, String objectName, String objectType, String hostname)
          Static helper method to return the absolute name of an object in a library.
static String getAbsoluteRecordName(String libraryName, String fileName, String recordName, String hostname)
          Static helper method to return the absolute name of a record in a file.
 String getFieldName()
          Return the field name part of this absolute name, or null if this is not deducible or applicable
 String getLibraryName()
          Return the qualifying library name part of this absolute name.
 String getMemberName()
          Return the member name part of this absolute name, or null if this is not deducible or not applicable.
 String getMemberType()
          Return the member type part of this absolute name, or null if this is not deducible or not applicable.
 String getObjectAbsoluteName()
          Rather than just returning the raw name of the object, this returns the absolute name of the object.
 String getObjectAttr()
          Return the object type part of this absolute name, or "*" if this is not deducible
 String getObjectName()
          Return the object name part of this absolute name (For Library-type objects, return the Library Name.)
 int getObjectNameType()
          Non-static method to return the type of object represented by this absolute name.
static int getObjectNameType(String remoteObjectAbsoluteName)
          Static method to return the type of object represented by the given absolute name.
 String getObjectType()
          Return the object type part of this absolute name, or null if this is not deducible
 String getRecordName()
          Return the field name part of this absolute name, or null if this is not deducible or applicable
 String toString()
          Return this absolute name as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

copyright

public static String copyright

OBJTYPE_UNKNOWN

public static final int OBJTYPE_UNKNOWN
See Also:
Constant Field Values

OBJTYPE_FLD

public static final int OBJTYPE_FLD
See Also:
Constant Field Values

OBJTYPE_RCD

public static final int OBJTYPE_RCD
See Also:
Constant Field Values

OBJTYPE_MBR

public static final int OBJTYPE_MBR
See Also:
Constant Field Values

OBJTYPE_OBJ

public static final int OBJTYPE_OBJ
See Also:
Constant Field Values

OBJTYPE_LIB

public static final int OBJTYPE_LIB
See Also:
Constant Field Values

OBJTYPE_MSGD

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

IBMiAbsoluteName

public IBMiAbsoluteName(String absoluteName)
Constructor that takes a fully formed absolute name

Method Detail

toString

public String toString()
Return this absolute name as a string

Overrides:
toString in class Object

getObjectNameType

public static int getObjectNameType(String remoteObjectAbsoluteName)
Static method to return the type of object represented by the given absolute name. This returns one of our OBJTYPE_xxx constants defined this class.


getAbsoluteLibraryName

public static String getAbsoluteLibraryName(String libraryName,
                                            String hostname)
For when we don't care about library subtype; when it's not being tracked as part of a library list.


getAbsoluteLibraryName

public static String getAbsoluteLibraryName(String libraryName,
                                            String subType,
                                            String hostname)
For when we do care about library subtype; because we may be tracking it in the library list.

Parameters:
libraryName -
subType -
Returns:

getAbsoluteObjectName

public static String getAbsoluteObjectName(String libraryName,
                                           String objectName,
                                           String objectType,
                                           String hostname)
Static helper method to return the absolute name of an object in a library. This returns libraryName/objectName OBJTYPE(objectType)


getAbsoluteMemberName

public static String getAbsoluteMemberName(String libraryName,
                                           String fileName,
                                           String memberName,
                                           String hostname)
Static helper method to return the absolute name of a member in a file. This returns libraryName/fileName(memberName)


getAbsoluteRecordName

public static String getAbsoluteRecordName(String libraryName,
                                           String fileName,
                                           String recordName,
                                           String hostname)
Static helper method to return the absolute name of a record in a file. This returns libraryName/fileName RCDNAME(recordName)


getAbsoluteFieldName

public static String getAbsoluteFieldName(String libraryName,
                                          String fileName,
                                          String recordName,
                                          String fieldName,
                                          String hostname)
Static helper method to return the absolute name of a record in a file. This returns libraryName/fileName RCDNAME(recordName) FLDNAME(fieldName)


getAbsoluteMessageIDName

public static String getAbsoluteMessageIDName(String libraryName,
                                              String fileName,
                                              String messageID,
                                              String hostname)
Static helper method to return the absolute name of a message in a message file. This returns libraryName/fileName MSGID(messageID)


getObjectNameType

public int getObjectNameType()
Non-static method to return the type of object represented by this absolute name. This returns one of our OBJTYPE_xxx constants defined this class.


getLibraryName

public String getLibraryName()
Return the qualifying library name part of this absolute name. (For Library-type objects, return "QSYS". Even though the QSYS qualifier is not stored as part of the absolute name.)


getObjectName

public String getObjectName()
Return the object name part of this absolute name (For Library-type objects, return the Library Name.)


getObjectAbsoluteName

public String getObjectAbsoluteName()
Rather than just returning the raw name of the object, this returns the absolute name of the object. For all but objects, this is for the parent lib/obj container. For a field or record or member, this returns "lib/file OBJTYPE(*FILE)" for the file containing this field or record or member. For a message description it returns "lib/file OBJTYPE(*MSGD)"

For objects, we can simply return the original absolute name. For libraries, we return "libName OBJTYPE(*LIB)" so be careful!


getObjectType

public String getObjectType()
Return the object type part of this absolute name, or null if this is not deducible


getObjectAttr

public String getObjectAttr()
Return the object type part of this absolute name, or "*" if this is not deducible


getMemberName

public String getMemberName()
Return the member name part of this absolute name, or null if this is not deducible or not applicable.


getMemberType

public String getMemberType()
Return the member type part of this absolute name, or null if this is not deducible or not applicable. While the member absolute name does not require it, it is possible that it has optionally been added, with this syntax: lib/file(mbr) MBRTYPE(type).

Returns:
member type if part of absolute name, else "*"

getRecordName

public String getRecordName()
Return the field name part of this absolute name, or null if this is not deducible or applicable


getFieldName

public String getFieldName()
Return the field name part of this absolute name, or null if this is not deducible or applicable


Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.