iSeries Remote Systems
v6.0.1

com.ibm.etools.iseries.core.ui.view
Class ISeriesMessageDescriptionAdapter

java.lang.Object
  extended bycom.ibm.etools.systems.core.ui.view.AbstractSystemViewAdapter
      extended bycom.ibm.etools.iseries.core.ui.view.ISeriesBaseAdapter
          extended bycom.ibm.etools.iseries.core.ui.view.ISeriesMessageDescriptionAdapter
All Implemented Interfaces:
IActionFilter, IBasicPropertyConstants, IDeferredWorkbenchAdapter, IPropertySource, com.ibm.etools.systems.subsystems.IRemoteObjectIdentifier, com.ibm.etools.systems.core.ui.view.ISystemDragDropAdapter, com.ibm.etools.systems.core.ui.view.ISystemPropertyConstants, com.ibm.etools.systems.core.ui.view.ISystemRemoteElementAdapter, com.ibm.etools.systems.core.ui.view.ISystemViewActionFilter, com.ibm.etools.systems.core.ui.view.ISystemViewElementAdapter, IWorkbenchAdapter

public class ISeriesMessageDescriptionAdapter
extends ISeriesBaseAdapter

Adapter for contents of an ISeries message file. This adapts a single message description within such a file.


Field Summary
static String Copyright
           
 
Fields inherited from class com.ibm.etools.iseries.core.ui.view.ISeriesBaseAdapter
copyright
 
Fields inherited from class com.ibm.etools.systems.core.ui.view.AbstractSystemViewAdapter
_lastResults, _lastSelected, canceledObject, EMPTY_STRING_LIST, emptyList, errorObject, filterString, MEMENTO_DELIM, MSG_SUB_PREFIX, MSG_SUB1, MSG_SUB2, msgList, nullObject, propertySourceInput, shell, viewer
 
Fields inherited from interface com.ibm.etools.systems.core.ui.view.ISystemViewElementAdapter
noActions
 
Fields inherited from interface com.ibm.etools.systems.core.ui.view.ISystemPropertyConstants
P_ARCHIVE_COMMENT, P_ARCHIVE_EXPANDEDSIZE, P_CCSID, P_COMMAND, P_COMMENT, P_COMPILETYPE_TYPES, P_DEFAULTUSERID, P_DESCRIPTION, P_ENVLIST, P_ERROR, P_ERROR_FILENAME, P_ERROR_LINENO, P_FILE_CANONICAL_PATH, P_FILE_CLASSIFICATION, P_FILE_HIDDEN, P_FILE_LASTMODIFIED, P_FILE_PATH, P_FILE_READABLE, P_FILE_READONLY, P_FILE_SIZE, P_FILE_WRITABLE, P_FILTER, P_FILTERS, P_FILTERSTRING, P_FILTERSTRINGS, P_FILTERSTRINGS_COUNT, P_HAS_CHILDREN, P_HOSTNAME, P_IS_ACTIVE, P_IS_CONNECTED, P_IS_CONNECTION_PRIVATE, P_NBRCHILDREN, P_NEWNAME, P_OK, P_ORIGIN, P_PARENT_FILTER, P_PARENT_FILTERPOOL, P_PASSWORD, P_PORT, P_PREFIX, P_PROFILE, P_RELATED_CONNECTION, P_SEARCH_LINE, P_SHELL_CONTEXT, P_SHELL_STATUS, P_SYSTEMTYPE, P_TYPE, P_USERACTION_DOMAIN, P_USERID, P_VENDOR, P_VIRTUAL_COMMENT, P_VIRTUAL_COMPRESSEDSIZE, P_VIRTUAL_COMPRESSIONMETHOD, P_VIRTUAL_COMPRESSIONRATIO, P_VRM
 
Fields inherited from interface org.eclipse.jface.viewers.IBasicPropertyConstants
P_CHILDREN, P_IMAGE, P_PARENT, P_TEXT
 
Constructor Summary
ISeriesMessageDescriptionAdapter()
           
 
Method Summary
 void addActions(com.ibm.etools.systems.core.ui.SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
           
 boolean canDelete(Object element)
           
 boolean canRename(Object element)
          Disable rename
protected  PropertyDescriptor createPropertyDescriptor(String propertyKey, String rootForLabelAndDescription)
          Create and return a simple string readonly property descriptor
 boolean doDelete(Shell shell, Object element)
           
 String getAbsoluteName(Object element)
          Return fully qualified name that uniquely identifies this object within its subsystem.
 String getAbsoluteParentName(Object element)
           
 Object[] getChildren(Object element)
          Return the children of this object.
 String getDescription(Object element)
          Get the description for the selected iSeries object.
 ImageDescriptor getImageDescriptor(Object element)
          Returns an image descriptor for the image.
 Object getParent(Object o)
           
 IPropertyDescriptor[] getPropertyDescriptors()
          Returns the current collection of property descriptors for message description objects.
 Object getPropertyValue(Object property)
          Returns the current value for the named property.
 Object getRemoteParent(Shell shell, Object element)
           
 String[] getRemoteParentNamesInUse(Shell shell, Object element)
           
 String getRemoteSourceType(Object element)
          Return the source type of the selected object.
 String getRemoteSubType(Object element)
          Return the subtype of this element.
 String getRemoteType(Object element)
          Return the untranslated type property for this object: "MESSAGE"
 String getRemoteTypeCategory(Object element)
           
 com.ibm.etools.systems.subsystems.SubSystem getSubSystem(Object element)
           
 String getSubSystemFactoryId(Object element)
          Return the subsystem factory id that owns this remote object
 String getText(Object element)
           
 String getType(Object element)
           
 IPropertyDescriptor[] getUniquePropertyDescriptors()
           
 boolean hasChildren(Object element)
           
protected  IPropertyDescriptor[] internalGetPropertyDescriptors()
          Return our unique property descriptors.
 Object internalGetPropertyValue(Object key)
          Return our unique property values.
 boolean refreshRemoteObject(Object oldElement, Object newElement)
           
 boolean showDelete(Object element)
           
 boolean showRefresh(Object element)
          Disable refresh
 boolean showRename(Object element)
          Disable rename
 
Methods inherited from class com.ibm.etools.iseries.core.ui.view.ISeriesBaseAdapter
canEdit, getEditableRemoteObject, getFilterStringFor, getRemoteSubSubType, getStatusLineText, supportsUserDefinedActions
 
Methods inherited from class com.ibm.etools.systems.core.ui.view.AbstractSystemViewAdapter
addCommonRemoteActions, addDynamicPopupMenuActions, canDrag, canDrop, checkForNull, createSimplePropertyDescriptor, createSimplePropertyDescriptor, doDrag, doDrop, doDrop, doRename, fetchDeferredChildren, getAdapter, getCancelledMessageObject, getCanonicalNewName, getChildren, getChildrenUsingExpandToFilter, getCurrentTreeView, getDefaultDescriptors, getEditableValue, getEmptyMessageObject, getFailedMessageObject, getFilterString, getFirstSelection, getInput, getInputMementoHandle, getLabel, getMementoHandle, getMementoHandleKey, getName, getNameValidator, getPropertyValue, getRemoteAdapter, getRule, getShell, getSystemFetchOperation, getSystemTree, getTranslatedFalse, getTranslatedNo, getTranslatedNotApplicable, getTranslatedNotAvailable, getTranslatedTrue, getTranslatedYes, getViewer, handleDoubleClick, initMsgObjects, isContainer, isPromptable, isPropertySet, namesAreEqual, resetPropertyValue, saveExpansionState, selectionChanged, setFilterString, setInput, setPropertySourceInput, setPropertyValue, setShell, setViewer, showGenericShowInTableAction, showOpenViewActions, sub, supportsDeferredQueries, testAttribute, validateDrop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.etools.systems.core.ui.view.ISystemRemoteElementAdapter
getName
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values
Constructor Detail

ISeriesMessageDescriptionAdapter

public ISeriesMessageDescriptionAdapter()
Method Detail

getImageDescriptor

public ImageDescriptor getImageDescriptor(Object element)
Returns an image descriptor for the image. More efficient than getting the image.

Parameters:
element - The element for which an image is desired

getType

public String getType(Object element)
See Also:
AbstractSystemViewAdapter#getType(Object)

getText

public String getText(Object element)
See Also:
AbstractSystemViewAdapter#getText(Object)

hasChildren

public boolean hasChildren(Object element)
See Also:
AbstractSystemViewAdapter#hasChildren(Object)

getChildren

public Object[] getChildren(Object element)
Return the children of this object. Return null if children not supported.


addActions

public void addActions(com.ibm.etools.systems.core.ui.SystemMenuManager menu,
                       IStructuredSelection selection,
                       Shell shell,
                       String menuGroup)

getUniquePropertyDescriptors

public IPropertyDescriptor[] getUniquePropertyDescriptors()

getPropertyDescriptors

public IPropertyDescriptor[] getPropertyDescriptors()
Returns the current collection of property descriptors for message description objects. We override this versus using the inherited behavior, as we don't want the usual default properties.

Returns:
an array containing all descriptors.

createPropertyDescriptor

protected PropertyDescriptor createPropertyDescriptor(String propertyKey,
                                                      String rootForLabelAndDescription)
Create and return a simple string readonly property descriptor


internalGetPropertyDescriptors

protected IPropertyDescriptor[] internalGetPropertyDescriptors()
Return our unique property descriptors. Since we override getPropertyDescriptors, we return null from here as its not used.


getPropertyValue

public Object getPropertyValue(Object property)
Returns the current value for the named property. The parent handles P_TEXT and P_TYPE only, and we augment that here. We override this versus using the inherited behavior, as we don't want the usual default properties.

Parameters:
property - the name of the property as named by its property descriptor
Returns:
the current value of the property

internalGetPropertyValue

public Object internalGetPropertyValue(Object key)
Return our unique property values. Since we override getPropertyDescriptors, we return null from here as its not used.


getAbsoluteName

public String getAbsoluteName(Object element)
Return fully qualified name that uniquely identifies this object within its subsystem. We return lib/msgf MSGID(id)


getRemoteType

public String getRemoteType(Object element)
Return the untranslated type property for this object: "MESSAGE"

Specified by:
getRemoteType in interface com.ibm.etools.systems.core.ui.view.ISystemRemoteElementAdapter
Overrides:
getRemoteType in class ISeriesBaseAdapter

getRemoteSubType

public String getRemoteSubType(Object element)
Return the subtype of this element. This is the only method in ISystemRemoteElement not already in ISystemViewElement

We return com.ibm.etools.iseries.core.IISeriesRemoteTypes.SUBTYPE_MESSAGE_DESCRIPTION ("MSGD") here to allow actions and such to be mapped to messages.

Specified by:
getRemoteSubType in interface com.ibm.etools.systems.core.ui.view.ISystemRemoteElementAdapter
Overrides:
getRemoteSubType in class ISeriesBaseAdapter

getRemoteSourceType

public String getRemoteSourceType(Object element)
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.


getSubSystemFactoryId

public String getSubSystemFactoryId(Object element)
Return the subsystem factory id that owns this remote object

Specified by:
getSubSystemFactoryId in interface com.ibm.etools.systems.core.ui.view.ISystemRemoteElementAdapter
Overrides:
getSubSystemFactoryId in class ISeriesBaseAdapter

getSubSystem

public com.ibm.etools.systems.subsystems.SubSystem getSubSystem(Object element)
See Also:
ISystemRemoteElementAdapter#getSubSystem(Object)

showDelete

public boolean showDelete(Object element)
See Also:
ISystemViewElementAdapter.showDelete(Object)

canDelete

public boolean canDelete(Object element)
See Also:
ISystemViewElementAdapter.canDelete(Object)

doDelete

public boolean doDelete(Shell shell,
                        Object element)
                 throws Exception
Throws:
Exception
See Also:
ISystemViewElementAdapter.doDelete(Shell, Object)

showRename

public boolean showRename(Object element)
Disable rename


canRename

public boolean canRename(Object element)
Disable rename


showRefresh

public boolean showRefresh(Object element)
Disable refresh


getAbsoluteParentName

public String getAbsoluteParentName(Object element)
See Also:
ISystemRemoteElementAdapter.getAbsoluteParentName(Object)

getRemoteParent

public Object getRemoteParent(Shell shell,
                              Object element)
                       throws Exception
Throws:
Exception
See Also:
ISystemRemoteElementAdapter.getRemoteParent(Shell, Object)

getRemoteParentNamesInUse

public String[] getRemoteParentNamesInUse(Shell shell,
                                          Object element)
                                   throws Exception
Throws:
Exception
See Also:
ISystemRemoteElementAdapter.getRemoteParentNamesInUse(Shell, Object)

getParent

public Object getParent(Object o)
See Also:
IWorkbenchAdapter.getParent(Object)

getDescription

public String getDescription(Object element)
Description copied from class: ISeriesBaseAdapter
Get the description for the selected iSeries object. Used in ISeriesBaseAdapter to show information for selected object, in status line.

Specified by:
getDescription in class ISeriesBaseAdapter
See Also:
ISeriesBaseAdapter.getDescription(Object)

refreshRemoteObject

public boolean refreshRemoteObject(Object oldElement,
                                   Object newElement)
See Also:
ISystemRemoteElementAdapter.refreshRemoteObject(Object, Object)

getRemoteTypeCategory

public String getRemoteTypeCategory(Object element)
See Also:
ISystemRemoteElementAdapter.getRemoteTypeCategory(Object)

iSeries Remote Systems
v6.0.1

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.