|
RSE Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISystemRemoteElementAdapter
This is an interface that only remote system objects supply adapters for.
This interface is designed to support integration of remote objects into RSE's subsystems, filters and queries.
Method Summary | |
---|---|
boolean |
canEdit(Object object)
Indicates whether the specified object can be edited or not. |
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. |
Object |
getRemoteParent(Object element,
IProgressMonitor monitor)
Given a remote object, returns it remote parent object. |
String[] |
getRemoteParentNamesInUse(Object element,
IProgressMonitor monitor)
Given a remote object, return the unqualified names of the objects contained in that parent. |
boolean |
refreshRemoteObject(Object oldElement,
Object newElement)
Update a visible remote object with fresh data from a new object. |
Methods inherited from interface org.eclipse.rse.core.subsystems.ISystemRemoteObjectMatchProvider |
---|
getName, getRemoteSourceType, getRemoteSubSubType, getRemoteSubType, getRemoteType, getRemoteTypeCategory, getSubSystem, getSubSystemConfigurationId, getText |
Methods inherited from interface org.eclipse.rse.core.subsystems.IRemoteObjectIdentifier |
---|
getAbsoluteName |
Method Detail |
---|
String getAbsoluteParentName(Object element)
This is used when deleting a remote resource for example, all occurrences of its parent are found and refreshed in the RSE views.
Note that when using filters, there is no unique parent since the same object may be found in multiple contexts, below multiple filters. Still, returning the parent absolute name here may help finding potentially affected parents more easily.
null
if the
parent can not be determined or is not unique.IRemoteObjectIdentifier.getAbsoluteName(Object)
boolean refreshRemoteObject(Object oldElement, Object newElement)
Short answer: treat this like clone(), and just copy any important instance variables. This allows keeping TreeItem references intact but refreshing the data shown, such that selections and expand state in the tree remain intact.
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.
oldElement
- the element that was found in the treenewElement
- the updated element that was passed in the REFRESH_REMOTE event
ISystemEditableRemoteObject getEditableRemoteObject(Object object)
object
- the object to edit
boolean canEdit(Object object)
object
- the object to edit
String getFilterStringFor(Object object)
object
- the object to obtain a filter string for
Object getRemoteParent(Object element, IProgressMonitor monitor) throws Exception
For instance, given a file, return the folder it is contained in.
Not all subsystems support a unique parent-child relationship.
Therefore, it is acceptable to return null
.
element
- The element for which to get the parentmonitor
- Optional progress monitor for long-running operation.
May be null
.
null
if not applicable.
Exception
getAbsoluteParentName(Object)
String[] getRemoteParentNamesInUse(Object element, IProgressMonitor monitor) throws Exception
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.
element
- The element for which to get names in usemonitor
- Optional progress monitor for long-running operation.
May be null
.
null
if not applicable or
no such names were found.
Exception
|
RSE Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |