iSeries Remote Systems
v6.0.0

com.ibm.etools.iseries.core.descriptors
Class ISeriesDataElementDescriptorType

java.lang.Object
  extended bycom.ibm.etools.iseries.core.descriptors.ISeriesDataElementDescriptorType
All Implemented Interfaces:
IISeriesDataElementDescriptorTypes, ISeriesDataStoreConstants
Direct Known Subclasses:
ISeriesDescriptorTypeLibrary, ISeriesDescriptorTypeMbrDta, ISeriesDescriptorTypeMessageDescription, ISeriesDescriptorTypeObject, ISeriesDescriptorTypeProcedure, ISeriesDescriptorTypeProgramModule

public abstract class ISeriesDataElementDescriptorType
extends Object
implements IISeriesDataElementDescriptorTypes, ISeriesDataStoreConstants

This class encapsulates a data element descriptor type, which really is just an integer. However, for each type, there is a fair amount of behaviour that needs to be defined. Previously, we had switch statements scattered throughout the code base, and we had to careful find and edit each one every time a new data element type descriptor constant was defined. Now we put all the functionality that all those switch statements were doing here into this one class.

Well, actually we define the methods in this class, but we use subclasses, one per different type, to implement each one. We create a singleton constant object for each subclass, and re-use that singleton when needed.

This is the factory design pattern, and so we also have a static method for deciding on the appropriate subclass to use, and return the appropriate singleton for that subclass.


Field Summary
protected  ISeriesChangeObjAction changeObjAction
           
static String Copyright
           
protected  ISeriesSaveRestoreAction restoreAction
           
protected  ISeriesSaveRestoreAction saveAction
           
 
Fields inherited from interface com.ibm.etools.iseries.core.descriptors.IISeriesDataElementDescriptorTypes
DSPF_FILE_TYPE, DTA_FILE_TYPE, FILE_TYPE, LF_FILE_TYPE, LIB_TYPE, MBR_TYPE, MESSAGE_DESCRIPTION_TYPE, MODULE_TYPE, MSG_FILE_TYPE, OBJ_TYPE, PGM_MODULE_TYPE, PGM_TYPE, PROCEDURE_TYPE, QRYDFN_TYPE, SAVF_FILE_TYPE, SRC_FILE_TYPE, SRC_MBR_TYPE, SRVPGM_TYPE, UNKNOWN_TYPE
 
Fields inherited from interface com.ibm.etools.iseries.core.dstore.common.ISeriesDataStoreConstants
ABSTRACT_FILTER_DESCRIPTOR, ABSTRACT_NATIVE_FSO_DESCRIPTOR, API_ERROR, API_ERROR_DESCRIPTOR, API_OK, API_PTF_MISSING, API_RESULT_DESCRIPTOR, API_RETURN_CODE, AUTHORITY_LIST_NODE, AUTHORITY_NODE, BATCHCOMMAND_DESCRIPTOR, C_GET_EDIT_CCSID, C_LDA_READ, C_LDA_WRITE, C_USER_PREFERENCES_DIRECTORY, CCSID_DESCRIPTOR, CDRA_INFO, CHECK_AUTHORITY_COMMAND, CLEAR_LOCAL_CACHE, CMD_DEBUG_RELEASE_APPLICATION, CMD_DEBUG_SPAWN_AND_HOLD, CMD_GET_DEBUG_ROUTER_PORT, CMD_IJOB_ASSOCIATE, CMD_IJOB_RELEASE, CMD_IJOB_RUNPGM, CMD_MULTI_SPAWNFAIL, CMD_MULTI_SPAWNSUCC, CMD_RUNBATCHCOMMAND, CMD_RUNBATCHCOMMAND_NOHELP, CMD_RUNCOMMAND, CMD_RUNCOMMAND_MULTITHREADED, CMD_RUNCOMMAND_MULTITHREADED_NOHELP, CMD_RUNCOMMAND_NOHELP, COMM_SERVER_INFORMATION, COMMAND_DESCRIPTOR, COMMAND_FILTER_DESCRIPTOR, COMMAND_MINER, COMMAND_MINER_ROOT_ELEMENT, COMMAND_QUERY_DB_FIELDS, COMMAND_QUERY_DB_KEYS, COMMAND_QUERY_DSPF_ALL, COMMAND_QUERY_MODULE_LIST, COMMAND_QUERY_PROCEDURE_LIST, copyright, CREATE_EDIT_MASK, CURRENT_WORKING_DIR, CURRENT_WORKING_DIR_DESCRIPTOR, DBFIELD_ALIAS, DBFIELD_ALLOC_LENGTH, DBFIELD_ALWNUL, DBFIELD_CCSID_SPECIFIED, DBFIELD_COLHEAD1, DBFIELD_COLHEAD2, DBFIELD_COLHEAD3, DBFIELD_DATA_CCSID, DBFIELD_DATTIMFMT, DBFIELD_DATTIMSEP, DBFIELD_DBCS_ALTTYPE, DBFIELD_DBCS_COLHEAD, DBFIELD_DBCS_TEXTDESC, DBFIELD_DBCS_VALCHECK, DBFIELD_DECPOS, DBFIELD_DESCRIPTION, DBFIELD_DIGITS, DBFIELD_DISPLAY_LEN_FLAG, DBFIELD_DISPLAY_LENGTH, DBFIELD_DTFLAGS, DBFIELD_EDITCODE, DBFIELD_EDITCODE_SYMBOL, DBFIELD_EDITWORD, DBFIELD_ENCODING_SCHEME, DBFIELD_GENERIC_KEY_COUNT, DBFIELD_INBUF, DBFIELD_INTNAME, DBFIELD_KEYFIELD_ATTRS, DBFIELD_LENGTH, DBFIELD_MAXKEYLEN, DBFIELD_MIN_DISPLAY_LEN_FLAG, DBFIELD_NUMDBCS, DBFIELD_OPERATOR, DBFIELD_OUTBUF, DBFIELD_REF_FIELD, DBFIELD_REFSHIFT, DBFIELD_SST_END, DBFIELD_SST_START, DBFIELD_TYPE, DBFIELD_UCS2_CONVERT_FLAG, DBFIELD_USAGE, DBFIELD_VARLENGTH, DEBUG_HELD_JOB_DESCRIPTOR, DOWNLOAD_RESULT_AS400_SECURITY_EXCEPTION, DSPFFD_INBUF, DSPFFD_OUTBUF, EDCODE_CURSYM, EDCODE_DATESEP, EDCODE_DECSEP, EDCODE_JOBDESC, EDCODE_JOBDESCLIB, EDCODE_SYSDATE, EDCODE_TIMESEP, EDCODE_USERID, EDIT_CODE_DESCRIPTOR, EDIT_CODE_INFORMATION, EDIT_CODE_QUERY, EDIT_DESCRIPTION, EDIT_MASK_DESCRIPTOR, EDIT_MASK_INFO, EDTD_DECCHAR, EDTD_FILLCHAR, EDTD_FLOATSTR, EDTD_FRACTION_MASK, EDTD_INTMASK, EDTD_LEFTCHAR, EDTD_NEGCHAR, EDTD_POSCHAR, EDTD_RIGHTCHAR, EDTD_ZEROVAL, EDTM_RECLEN, ENVVAR_DESCRIPTOR, ENVVAR_INFO, ERROR_DESCRIPTOR, EVENTSFILE_DESCRIPTOR, FIELD_DESCRIPTOR, FIELD_LIST_NODE, FIELD_PROPERTIES_NODE, FILE_ACCPATHTYPE, FILE_ALTSEQ, FILE_BASEDONCOUNT, FILE_BASEDONFILES, FILE_DESCRIPTOR, FILE_DYNSEL, FILE_IGCFIELD, FILE_IGCLITERAL, FILE_JFILE, FILE_KEYACCESS, FILE_LANGID, FILE_OVERRIDE_INFO, FILE_OVERRIDE_SOURCE_DESCRIPTOR, FILE_OVERRIDE_TARGET_DESCRIPTOR, FILE_PROPERTIES_NODE, FILE_SELECTOMITLF, FILE_SRCFILE, IFS_FILE_FILTER_OBJECT, IFS_FILESYSTEM_MINER, IFS_FILTER_DESCRIPTOR, IFS_FOLDER_FILTER_OBJECT, IJOB_DATAQ_DESCRIPTOR, ISERIES_PROGRAM_DESCRIPTOR, JOB_DESCRIPTOR, JOB_FILTER_DESCRIPTOR, JOB_MINER, JOB_MINER_LOG_ELEMENT, JOB_MINER_ROOT_ELEMENT, JOB_PROPERTY_DESCRIPTOR, JOB_PROPERTY1_ELEMENT, JOB_PROPERTY2_ELEMENT, JOB_PROPERTY3_ELEMENT, JOB_PROPERTYINT_ELEMENT, JOBCMD_CHGJOB, JOBCMD_DSPJOBLOG, JOBCMD_ENDJOB, JOBCMD_ENDJOB_IMMED, JOBCMD_HOLDJOB, JOBCMD_QRYJOB_ALL_PROPERTIES, JOBCMD_QRYJOB_PROPERTY, JOBCMD_QRYJOB_PROPERTYP2, JOBCMD_QRYJOB_PROPERTYP3, JOBCMD_QRYJOB_PROPERTYPINT, JOBCMD_RELEASEJOB, JOBFILTERCMD_QUERY, JOBNAME_DESCRIPTOR, JOBPROP_ACCTCODE, JOBPROP_ACTIVESTATUS, JOBPROP_AUXIO, JOBPROP_BREAKMSGHDL, JOBPROP_CCSID, JOBPROP_CNTRYID, JOBPROP_CTLDENDREQ, JOBPROP_CURRSYSPOOL, JOBPROP_CURRUSER, JOBPROP_DATE_ENTERED, JOBPROP_DATE_STARTED, JOBPROP_DATEFMT, JOBPROP_DATESEP, JOBPROP_DBCSCAP, JOBPROP_DECFMT, JOBPROP_DESCRIPTION, JOBPROP_DEVRCYACT, JOBPROP_DFTCCSID, JOBPROP_ENDSEV, JOBPROP_INQMSGRPLY, JOBPROP_ITRANS, JOBPROP_KEEPDDMACT, JOBPROP_LANGID, JOBPROP_LOGCLP, JOBPROP_LOGLVL, JOBPROP_LOGSEV, JOBPROP_LOGTXT, JOBPROP_MAXCPU, JOBPROP_MAXTMPSTOR, JOBPROP_MSGQACT, JOBPROP_MSGQMAX, JOBPROP_OUTQ, JOBPROP_OUTQ_PTY, JOBPROP_PGMRC, JOBPROP_PRODRC, JOBPROP_PRTDEV, JOBPROP_PRTKEYFMT, JOBPROP_PRTTXT, JOBPROP_PURGE, JOBPROP_ROUTING, JOBPROP_RUNPTY, JOBPROP_SORTTAB, JOBPROP_SPECENV, JOBPROP_STATUSMSGHDL, JOBPROP_SUBMITNAME, JOBPROP_SUBMITNUMBER, JOBPROP_SUBMITUSER, JOBPROP_SUBSYSTEM, JOBPROP_SUBTYPE, JOBPROP_SWITCHES, JOBPROP_SYSPOOL, JOBPROP_THREADS, JOBPROP_TIMESEP, JOBPROP_TIMESLICE, JOBPROP_TIMESLICEPOOL, JOBPROP_TOTRESPTIME, JOBPROP_TYPE, JOBPROP_USEDCPU, JOBPROP_USEDTMPSTOR, JOBPROP_USERRC, JOBPROP_WAITTIME, KEYFIELD_LIST_NODE, KEYWORD_DESCRIPTOR, LDA_READ_EXCEPTION_DESCRIPTOR, LDA_READ_LIBRARY_NAME_DESCRIPTOR, LDA_READ_MEMBER_NAME_DESCRIPTOR, LDA_READ_NO_OUTPUT_DESCRIPTOR, LDA_WRITE_CCSID_DESCRIPTOR, LDA_WRITE_EXCEPTION_DESCRIPTOR, LDA_WRITE_LENGTH_DESCRIPTOR, LIB_FILTER_DESCRIPTOR, LIB_FILTER_STR_DESCRIPTOR, LIBRARY_DESCRIPTOR, LIBRARY_PROPERTIES_NODE, LIST_OBJ_LOCKS_COMMAND, MBR_FILTER_DESCRIPTOR, MBR_FILTER_STR_DESCRIPTOR, MEMBER_CHANGE_TIMESTAMP, MEMBER_CREATION_TIMESTAMP, MEMBER_DESCRIPTOR, MEMBER_NUMBER_OF_DELETED, MEMBER_NUMBER_OF_RECORDS, MEMBER_PROPERTIES_NODE, MEMBER_RESTOTE_TIMESTAMP, MEMBER_SAVE_TIMESTAMP, MESSAGE_DESCRIPTOR, MESSAGE_FILE_DESCRIPTOR, MESSAGED_DESCRIPTOR, MODULE_DESCRIPTOR, MODULE_INTERNAL_DESCRIPTOR, MODULE_LANGID, MODULE_LIST_NODE, MODULE_PROPERTIES_NODE, MSGD_STRUCTURE_NODE, NATIVE_FILESYSTEM_MINER, NETINT_DESCRIPTOR, NETINT_LIST_NODE, NETINT_QUERY, NETWORK_ERROR_DESCRIPTOR, OBJ_FILTER_DESCRIPTOR, OBJ_FILTER_STR_DESCRIPTOR, OBJECT_DESCRIPTOR, OBJECT_PROPERTIES_NODE, PGM_DEBUGGABLE, PGM_OPM, PROCEDURE_DESCRIPTOR, PROCEDURE_LIST_NODE, PROGRAM_DESCRIPTOR, PROPERTY_DESCRIPTOR, QSYS_DESCRIPTOR, QUERY_CURRENT_WORKING_DIR, QUERY_DEVICE_RECORDS, QUERY_ENCODING_SCHEME, QUERY_ENV_VAR, QUERY_FIELD_LIST, QUERY_FILE_PROPERTIES, QUERY_MEMBER_PROPERTIES, QUERY_MESSAGE_DESCRIPTORS_COMMAND, QUERY_RECORD_LIST, QUERY_RECORD_PROPERTIES, RECORD_BUFFER_SIZE, RECORD_CCSID, RECORD_DESC, RECORD_DESCRIPTOR, RECORD_DEVICE_PROPERTIES, RECORD_FLDCNT, RECORD_HAS_SEP_IND_AREA, RECORD_HAS_START_LINE_NUM, RECORD_ISDBCS, RECORD_LEVELID, RECORD_LIST_NODE, RECORD_LOWEST_RESP_IND, RECORD_PROPERTIES_NODE, RECORD_RECLEN, RECORD_STANDARD_PROPERTIES, RECORD_TYPE, RELATIVE_FILTER_DESCRIPTOR, RESULT_MESSAGES_ELEMENT, RETRIEVE_FILE_OVERRIDE_COMMAND, SERVICE_PROGRAM_DESCRIPTOR, SORT_SEQ_TABLE, SORT_SEQ_TABLE_INFO, SPECIAL_FILTER_DESCRIPTOR, SQL_COLERROR, SQL_COLFIRSTBYTE, SQL_COLLASTBYTE, SQL_DESCRIPTOR, SQL_MSGFILE, SQL_MSGID, SQL_MSGLIB, SQL_MSGREPLACELEN, SQL_MSGREPLACETEXT, SQL_NUMSTMT, SQL_RECERORR, SQL_RECFIRSTBYTE, SQL_RECLASTBYTE, SQL_RETINFOLEN, SQL_STATE, SQL_SYNTAX_CHECK, SQL_SYNTAX_CHECK_INFO, SST_BYTESAVAIL, SST_BYTESRETURN, SST_COUNTRYID, SST_JOBCCSID, SST_LANGID, SST_QUERY, SST_SSTLIB, SST_SSTNAME, SST_SUBSITUTION, SST_TABLE, SST_TABLECCSID, SST_TABLELIB, SST_TABLENAME, SST_WEIGHT, STRUCTURE_NODE_DESCRIPTOR, SYSTEM_INFORMATION, SYSTEM_PROPERTY_DESCRIPTOR, SYSTEM_QIGC, SYSTEM_VRM, TABLE_DESCRIPTOR
 
Constructor Summary
ISeriesDataElementDescriptorType(int type)
          Constructor.
 
Method Summary
abstract  void addActions(com.ibm.etools.systems.dstore.core.model.DataElement deElement, com.ibm.etools.systems.core.ui.SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup, Viewer viewer)
          Called by SystemView viewer when user right clicks.
abstract  String getAbsoluteName(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the fully qualified name, versus just the root name.
abstract  String getAbsoluteParentName(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the fully qualified name of the given element's parent.
 String getCanonicalNewName(com.ibm.etools.systems.dstore.core.model.DataElement deElement, String newName)
          Return the canonical (unique) new name given the new name root.
protected  IAction getChangeAction(Shell shell)
          Return the common Change action.
abstract  String getChangeCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the iSeries command string needed to change this object.
abstract  String getChangeTextCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement, String newDescription)
          Return the iSeries command string needed to change the text of this object on the iSeries.
 String getChangeTypeCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement, String newType)
          Return the iSeries command string needed to change the type of this object on the iSeries.
protected  IAction getClipboardCopyAction(Shell shell)
          Get the common clipboard copy action
protected  IAction getClipboardPasteAction(Shell shell)
          Get the common clipboard paste action
 String getCopyCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the iSeries command string needed to copy this object.
abstract  String getDeleteCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the iSeries command string needed to delete this object.
static int getDescriptorType(com.ibm.etools.systems.dstore.core.model.DataElement element)
          Return a constant indicating the type of descriptor this data element has.
static ISeriesDataElementDescriptorType getDescriptorTypeObject(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Static factory method to return the appropriate object for the given DataElement.
abstract  String getFilterStringForChildren(com.ibm.etools.systems.dstore.core.model.DataElement deElement, com.ibm.etools.systems.core.ui.view.ISystemViewInputProvider inputProvider)
          For expandable types, returns the filter string to resolve to the get the children.
abstract  ImageDescriptor getImage(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the image for the given object.
 String getMergeCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the iSeries command string needed to merge this object.
abstract  com.ibm.etools.systems.core.ui.validators.ISystemValidator getNameValidator(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the name validator for objects of this type.
 String getParent(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the parent container for the given element.
abstract  IAction[] getPDMActions(Shell shell, Viewer viewer)
          Return the array of actions to show in the PDM cascading menu.
 String getRemoteSourceType(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the source type of the selected object.
 String getRemoteSubType(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the untranslated subtype of this element.
abstract  String getRemoteTypeCategory(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the untranslated type category property for this object.
abstract  String getRenameCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement, String newName)
          Return the iSeries command string needed to rename this object.
protected  IAction getRestoreAction(Shell shell)
          Return the common Restore action.
 String getRestoreCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the iSeries command string needed to restore this object.
protected  IAction getSaveAction(Shell shell)
          Return the common Save action.
 String getSaveCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the iSeries command string needed to save this object.
protected  Separator getSeparator()
          Return a separator for use in a popup menu
protected  IAction getShowInTableAction(Shell shell)
          Return the show in table action.
abstract  String getStatusLineText(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the text to display on the status line, for the given object.
 int getTableViewID(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return the type of table view to show for this object if "Show In Table" is selected.
 int getType()
          Hopefully not needed, but in case it is, this return the integer value
 boolean isCachable(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return true if this is a file and the file type supports caching.
 boolean isDataFile()
          Return true if this is an iSeries database file object, of type *FILE and attribute PF or LF or DDMF.
 boolean isDataMember()
          Return true if this is an iSeries data member.
 boolean isDeviceFile(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
          Return true if this is an iSeries device file object (dspf or prtf)
 boolean isDisplayFile()
          Return true if this is an iSeries display file object
abstract  boolean isExpandable(com.ibm.etools.systems.dstore.core.model.DataElement deElement, com.ibm.etools.systems.core.ui.view.ISystemViewInputProvider inputProvider)
          Return true if this type can be expanded to show children
 boolean isFile()
          Return true if this is an iSeries file object, of type *FILE.
 boolean isLibrary()
          Return true if this is an iSeries library.
 boolean isLogicalFile()
          Return true if this is an iSeries logical file object.
 boolean isMember()
          Return true if this is an iSeries data member or source member.
 boolean isMemberFile()
          Return true if this is an iSeries file object which has members.
 boolean isMessageDescription()
          Return true if this is an iSeries message description in a message file.
 boolean isMessageFile()
          Return true if this is an iSeries message file object.
 boolean isModule()
          Return true if this is an iSeries module
 boolean isObject()
          Return true if this is an iSeries object, with a type and attribute.
 boolean isPFDataFile()
          Return true if this is an iSeries database file object, of type *FILE and attribute PF-DTA
 boolean isProcedure()
          Return true if this is a procedure inside of a program or service program object.
 boolean isProgram()
          Return true if this is an iSeries program
 boolean isProgramModule()
          Return true if this is an iSeries program module (module within a program or service program)
 boolean isQueryDefinition()
          Return true if this is an iSeries query definition *QRYDFN
 boolean isServiceProgram()
          Return true if this is an iSeries service program
 boolean isSourceFile()
          Return true if this is an iSeries database source file object.
 boolean isSourceMember()
          Return true if this is an iSeries source member.
 boolean showRefresh(com.ibm.etools.systems.dstore.core.model.DataElement deElement, com.ibm.etools.systems.core.ui.view.ISystemViewInputProvider inputProvider)
          Return true if objects of this type should show the refresh action in their popup.
protected static String toUpperCase(String name)
          Uppercase the given name, but only if it is not quoted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

changeObjAction

protected ISeriesChangeObjAction changeObjAction

saveAction

protected ISeriesSaveRestoreAction saveAction

restoreAction

protected ISeriesSaveRestoreAction restoreAction
Constructor Detail

ISeriesDataElementDescriptorType

public ISeriesDataElementDescriptorType(int type)
Constructor. Requires the integer defining the descriptor type.

Method Detail

getDescriptorTypeObject

public static ISeriesDataElementDescriptorType getDescriptorTypeObject(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Static factory method to return the appropriate object for the given DataElement.

Parameters:
deElement - - the data element whose descriptor type object we want

getDescriptorType

public static int getDescriptorType(com.ibm.etools.systems.dstore.core.model.DataElement element)
Return a constant indicating the type of descriptor this data element has. Returns a constant from IISeriesDataElementDescriptorTypes

See Also:
#getDescriptorTypeObject(Object)

getType

public int getType()
Hopefully not needed, but in case it is, this return the integer value


isLibrary

public boolean isLibrary()
Return true if this is an iSeries library.


isObject

public boolean isObject()
Return true if this is an iSeries object, with a type and attribute. Many types are really specializations of these, eg *PGM and *SRVPGM. Note we return false for libraries.


isFile

public boolean isFile()
Return true if this is an iSeries file object, of type *FILE.


isDataFile

public boolean isDataFile()
Return true if this is an iSeries database file object, of type *FILE and attribute PF or LF or DDMF.


isPFDataFile

public boolean isPFDataFile()
Return true if this is an iSeries database file object, of type *FILE and attribute PF-DTA


isSourceFile

public boolean isSourceFile()
Return true if this is an iSeries database source file object.


isMemberFile

public boolean isMemberFile()
Return true if this is an iSeries file object which has members. So, this excludes LF files and device files.


isLogicalFile

public boolean isLogicalFile()
Return true if this is an iSeries logical file object.


isDisplayFile

public boolean isDisplayFile()
Return true if this is an iSeries display file object


isDeviceFile

public boolean isDeviceFile(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return true if this is an iSeries device file object (dspf or prtf)


isMessageFile

public boolean isMessageFile()
Return true if this is an iSeries message file object.


isSourceMember

public boolean isSourceMember()
Return true if this is an iSeries source member.


isDataMember

public boolean isDataMember()
Return true if this is an iSeries data member.


isMember

public boolean isMember()
Return true if this is an iSeries data member or source member.


isProgram

public boolean isProgram()
Return true if this is an iSeries program


isServiceProgram

public boolean isServiceProgram()
Return true if this is an iSeries service program


isModule

public boolean isModule()
Return true if this is an iSeries module


isQueryDefinition

public boolean isQueryDefinition()
Return true if this is an iSeries query definition *QRYDFN


isProgramModule

public boolean isProgramModule()
Return true if this is an iSeries program module (module within a program or service program)


isProcedure

public boolean isProcedure()
Return true if this is a procedure inside of a program or service program object.


isMessageDescription

public boolean isMessageDescription()
Return true if this is an iSeries message description in a message file.


isCachable

public boolean isCachable(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return true if this is a file and the file type supports caching. If so, the caching action is added to the popup. Returns true for DTA, LF, DSPF, PRTF or DDM files.


addActions

public abstract void addActions(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                                com.ibm.etools.systems.core.ui.SystemMenuManager menu,
                                IStructuredSelection selection,
                                Shell shell,
                                String menuGroup,
                                Viewer viewer)
Called by SystemView viewer when user right clicks. Used to populate menu with any actions unique to the selected object.

Parameters:
deElement - The last selected data element
menu - The context menu to which we can add actions using either add or appendToGroup
shell - The parent shell of the SystemView viewer, for anchoring dialogs
menuGroup - The default menu group (GROUP_ADAPTERS) we should use for appendToGroup, unless we wish to add our actions to one of the other groups in ISystemContextMenuConstants.
viewer - The viewer in which the user right-clicked

getPDMActions

public abstract IAction[] getPDMActions(Shell shell,
                                        Viewer viewer)
Return the array of actions to show in the PDM cascading menu. Currently only shown in the PDM Table viewer


isExpandable

public abstract boolean isExpandable(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                                     com.ibm.etools.systems.core.ui.view.ISystemViewInputProvider inputProvider)
Return true if this type can be expanded to show children


getFilterStringForChildren

public abstract String getFilterStringForChildren(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                                                  com.ibm.etools.systems.core.ui.view.ISystemViewInputProvider inputProvider)
For expandable types, returns the filter string to resolve to the get the children. Returns null if the expansion is done the usual way, which is by calling the file subsystem and asking it to provide the children of this, via getDataElementChildren.


showRefresh

public boolean showRefresh(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                           com.ibm.etools.systems.core.ui.view.ISystemViewInputProvider inputProvider)
Return true if objects of this type should show the refresh action in their popup. By default, returns isExpandable(deElement)


getNameValidator

public abstract com.ibm.etools.systems.core.ui.validators.ISystemValidator getNameValidator(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the name validator for objects of this type.


getCanonicalNewName

public String getCanonicalNewName(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                                  String newName)
Return the canonical (unique) new name given the new name root. EG, for objects, we have to append the type, because two objects can have the same name if their type is different. Otherwise, the given name uppercased is simply returned.


getAbsoluteName

public abstract String getAbsoluteName(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the fully qualified name, versus just the root name. EG, for objects, we return "lib/name OBJTYPE(type)", and for members we return "lib/file(mbr)". It uniquely identifies the object within its subsystem.


getAbsoluteParentName

public abstract String getAbsoluteParentName(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the fully qualified name of the given element's parent. EG, for objects, we return "lib", and for members we return "lib/file OBJTYPE(*FILE)". It uniquely identifies the object's parent within its subsystem.

See Also:
getParent(DataElement)

getImage

public abstract ImageDescriptor getImage(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the image for the given object.


getStatusLineText

public abstract String getStatusLineText(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the text to display on the status line, for the given object.


getRemoteTypeCategory

public abstract String getRemoteTypeCategory(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the untranslated type category property for this object.

See Also:
com.ibm.etool.iseries.core.IISeriesRemoteTypes

getRemoteSubType

public String getRemoteSubType(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the untranslated subtype of this element. For objects, this is the attribute.


getRemoteSourceType

public String getRemoteSourceType(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the source type of the selected object. Typically, this only makes sense for compilable source members. For non-compilable remote objects, this typically just returns null.

For src members, this is the member type. For others, it is null.


getTableViewID

public int getTableViewID(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the type of table view to show for this object if "Show In Table" is selected.

Returns:
one of the TABLE_VIEW_XXX constants in IISeriesNFSConstants, or -1

getParent

public String getParent(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the parent container for the given element. Eg, given a member, returns the file, given a file or other object, returns the library.

This is similar to getAbsoluteParentName(DataElement), but it doesn't have to be unique, just the qualified parent name. For example, for most objects, this returns "lib/obj" while getAbsoluteParentName returns "lib/obj OBJTYPE(type)" in order to make the name unique.


getDeleteCommand

public abstract String getDeleteCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the iSeries command string needed to delete this object. Will be a DLTxxxYYY command. Add a question mark in front to prompt it. Returns null if no command is applicable.


getRenameCommand

public abstract String getRenameCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                                        String newName)
Return the iSeries command string needed to rename this object. Will be a RNMxxxYYY command. Add a question mark in front to prompt it. Returns null if no command is applicable.


getChangeCommand

public abstract String getChangeCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the iSeries command string needed to change this object. Will be a CHGxxxYYY command. Add a question mark in front to prompt it. Returns null if no command is applicable.


getChangeTypeCommand

public String getChangeTypeCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                                   String newType)
Return the iSeries command string needed to change the type of this object on the iSeries. Only applicable for libraries and members. Always returns the command with a question mark in front, for prompting. Returns null if no command is applicable.


getChangeTextCommand

public abstract String getChangeTextCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement,
                                            String newDescription)
Return the iSeries command string needed to change the text of this object on the iSeries. Returns null if no command is applicable.


getRestoreCommand

public String getRestoreCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the iSeries command string needed to restore this object. Will be a RSTxxxYYY command, with a question mark in front to prompt it. Returns null if no command is applicable. Only applies to libraries and objects.


getSaveCommand

public String getSaveCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the iSeries command string needed to save this object. Will be a SAVxxxYYY command, with a question mark in front to prompt it. Returns null if no command is applicable. Only applies to libs, objs and members.


getMergeCommand

public String getMergeCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the iSeries command string needed to merge this object. At this point, only applicable for members, and returns MRGSRC, or null for non-members.


getCopyCommand

public String getCopyCommand(com.ibm.etools.systems.dstore.core.model.DataElement deElement)
Return the iSeries command string needed to copy this object. Will be a CPYxxxYYY command, with a question mark in front to prompt it. Returns null if no command is applicable.


toUpperCase

protected static String toUpperCase(String name)
Uppercase the given name, but only if it is not quoted.


getSeparator

protected Separator getSeparator()
Return a separator for use in a popup menu


getShowInTableAction

protected IAction getShowInTableAction(Shell shell)
Return the show in table action. To save memory we only ever instantiate it once, and we re-use it. This is the generic Show In Table action.


getChangeAction

protected IAction getChangeAction(Shell shell)
Return the common Change action. To save memory we only ever instantiate it once, and we re-use it.


getSaveAction

protected IAction getSaveAction(Shell shell)
Return the common Save action. To save memory we only ever instantiate it once, and we re-use it.


getRestoreAction

protected IAction getRestoreAction(Shell shell)
Return the common Restore action. To save memory we only ever instantiate it once, and we re-use it.


getClipboardCopyAction

protected IAction getClipboardCopyAction(Shell shell)
Get the common clipboard copy action


getClipboardPasteAction

protected IAction getClipboardPasteAction(Shell shell)
Get the common clipboard paste action


iSeries Remote Systems
v6.0.0

Copyright © 2005 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.