Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.view
Interface ISystemRemoteElementAdapter

All Superinterfaces:
IRemoteObjectIdentifier
All Known Implementing Classes:
SystemViewRemoteFileAdapter, SystemViewRemoteOutputAdapter, SystemViewRemoteSearchResultAdapter, SystemViewRemoteSearchResultSetAdapter, SystemViewScratchpadAdapter

public interface ISystemRemoteElementAdapter
extends IRemoteObjectIdentifier

This is an interface that only remote system objects supply adapters for.

This interface is designed to allow remote property pages to be registered against specific remote system objects of specific name, type or subtype.


Field Summary
static String copyright
           
 
Fields inherited from interface com.ibm.etools.systems.subsystems.IRemoteObjectIdentifier
Copyright
 
Method Summary
 boolean canEdit(Object object)
          Indicates whether the specified object can be edited or not.
 String getAbsoluteName(Object element)
          Return the fully qualified name of this remote object.
 String getAbsoluteParentName(Object element)
          Return fully qualified name that uniquely identifies this remote object's remote parent within its subsystem.
 ISystemEditableRemoteObject getEditableRemoteObject(Object object)
          Return the remote edit wrapper for this object.
 String getFilterStringFor(Object object)
          Return a filter string that corresponds to this object.
 String getName(Object element)
          Return the name of this object, which may be different than the display text ({#link #getText(Object)}.
 Object getRemoteParent(Shell shell, Object element)
          Given a remote object, returns it remote parent object.
 String[] getRemoteParentNamesInUse(Shell shell, Object element)
          Given a remote object, return the unqualified names of the objects contained in that parent.
 String getRemoteSourceType(Object element)
          Return the source type of the selected object.
 String getRemoteSubSubType(Object element)
          Return a value for the sub-subtype property for this object.
 String getRemoteSubType(Object element)
          Return a value for the subtype property for this object.
 String getRemoteType(Object element)
          Return a value for the type property for this object The value must not be translated, so that property pages registered via xml can subset by it.
 String getRemoteTypeCategory(Object element)
          Return a value for the type category property for this object The value must not be translated, so that property pages registered via xml can subset by it.
 SubSystem getSubSystem(Object element)
          Return the subsystem that is responsible for getting this remote object.
 String getSubSystemFactoryId(Object element)
          Return the subsystem factory id that owns this remote object The value must not be translated, so that property pages registered via xml can subset by it.
 boolean refreshRemoteObject(Object oldElement, Object newElement)
          Short answer: treat this like clone(), and just copy any important instance variables Imagine the same remote resource is shown multiple times in the same tree view.... say because multiple filters resolve to it, or there are two connections to the same host.
 boolean supportsUserDefinedActions(Object object)
          Returns whether user defined actions should be shown for the object.
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Method Detail

getName

public String getName(Object element)
Return the name of this object, which may be different than the display text ({#link #getText(Object)}.


getAbsoluteName

public String getAbsoluteName(Object element)
Return the fully qualified name of this remote object. Unlike getName, this should include the full path to the name. This should be enough information to uniquely identify this object within its subsystem.

Specified by:
getAbsoluteName in interface IRemoteObjectIdentifier

getAbsoluteParentName

public String getAbsoluteParentName(Object element)
Return fully qualified name that uniquely identifies this remote object's remote parent within its subsystem. This is used when deleting a remote resource for example, all occurrences of its parent are found and refreshed in the RSE views.


getSubSystem

public SubSystem getSubSystem(Object element)
Return the subsystem that is responsible for getting this remote object. When used together with getAbsoluteName, allows for unique identification of this object.


getSubSystemFactoryId

public String getSubSystemFactoryId(Object element)
Return the subsystem factory id that owns this remote object The value must not be translated, so that property pages registered via xml can subset by it.


getRemoteTypeCategory

public String getRemoteTypeCategory(Object element)
Return a value for the type category property for this object The value must not be translated, so that property pages registered via xml can subset by it.


getRemoteType

public String getRemoteType(Object element)
Return a value for the type property for this object The value must not be translated, so that property pages registered via xml can subset by it.


getRemoteSubType

public String getRemoteSubType(Object element)
Return a value for the subtype property for this object. Not all object types support a subtype, so returning null is ok. The value must not be translated, so that property pages registered via xml can subset by it.


getRemoteSubSubType

public String getRemoteSubSubType(Object element)
Return a value for the sub-subtype property for this object. Not all object types support a sub-subtype, so returning null is ok. The value must not be translated, so that property pages registered via xml can subset by it.


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.


refreshRemoteObject

public boolean refreshRemoteObject(Object oldElement,
                                   Object newElement)

Short answer: treat this like clone(), and just copy any important instance variables

Imagine the same remote resource is shown multiple times in the same tree view.... say because multiple filters resolve to it, or there are two connections to the same host. Typically it is a different object in memory within the tree, but it refers to the same remote resource.
Now imagine one of the references is selected by the user and renamed via the rename action. This might only update the selected reference. What about the other objects which refer to the same remote resource... they need to update their in-memory "name" variable too.
That is what this method. Every reference to the same remote resource is found (they have the same absolute name and come from a system with the same hostname) and this method is called on those other references. This is your opportunity to copy the attributes from the new element to the old element.

Some view has updated the name or properties of this remote object. As a result, the remote object's contents need to be refreshed. You are given the old remote object that has old data, and you are given the new remote object that has the new data. For example, on a rename the old object still has the old name attribute while the new object has the new new attribute. You can copy the new name into the old object. Similar for any properties you allow the user to edit via the property sheet.

This is called by viewers like SystemView in response to rename and property change events.

Parameters:
oldElement - the element that was found in the tree
newElement - the updated element that was passed in the REFRESH_REMOTE event
Returns:
true if you want the viewer that called this to refresh the children of this object, such as is needed on a rename of a folder, say, if the child object cache the parent folder name or an absolute file name.

getEditableRemoteObject

public ISystemEditableRemoteObject getEditableRemoteObject(Object object)
Return the remote edit wrapper for this object.

Parameters:
object - the object to edit
Returns:
the editor wrapper for this object

canEdit

public boolean canEdit(Object object)
Indicates whether the specified object can be edited or not.

Parameters:
object - the object to edit
Returns:
true if the object can be edited.

getFilterStringFor

public String getFilterStringFor(Object object)
Return a filter string that corresponds to this object.

Parameters:
object - the object to obtain a filter string for
Returns:
the corresponding filter string if applicable

getRemoteParent

public Object getRemoteParent(Shell shell,
                              Object element)
                       throws Exception
Given a remote object, returns it remote parent object. Eg, given a file, return the folder it is contained in.

Throws:
Exception

getRemoteParentNamesInUse

public String[] getRemoteParentNamesInUse(Shell shell,
                                          Object element)
                                   throws Exception
Given a remote object, return the unqualified names of the objects contained in that parent. This is used for testing for uniqueness on a rename operation, for example. Sometimes, it is not enough to just enumerate all the objects in the parent for this purpose, because duplicate names are allowed if the types are different, such as on iSeries. In this case return only the names which should be used to do name-uniqueness validation on a rename operation.

Throws:
Exception

supportsUserDefinedActions

public boolean supportsUserDefinedActions(Object object)
Returns whether user defined actions should be shown for the object.

Parameters:
object - the object.
Returns:
true if the object supports user defined actions, false otherwise.

Remote Systems
v6.4.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.