Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.ui.view
Interface ISystemRemoteElementAdapter

All Superinterfaces:
IRemoteObjectIdentifier, ISystemRemoteObjectMatchProvider
All Known Implementing Classes:
SystemViewRemoteOutputAdapter

public interface ISystemRemoteElementAdapter
extends ISystemRemoteObjectMatchProvider

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

getAbsoluteParentName


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.

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.

Returns:
a String uniquely identifying the parent of this remote object, if it is known and exists. May also return null if the parent can not be determined or is not unique.
See Also:
IRemoteObjectIdentifier.getAbsoluteName(Object)

refreshRemoteObject

boolean refreshRemoteObject(
Object oldElement,
                            
Object newElement)
Update a visible remote object with fresh data from a new object.

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.

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


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

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


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


Object getRemoteParent(
Object element,
                       
IProgressMonitor monitor)
                       throws 
Exception
Given a remote object, returns it remote parent object.

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.

Parameters:
element - The element for which to get the parent
monitor - Optional progress monitor for long-running operation. May be null.
Returns:
the parent element, or null if not applicable.
Throws:
Exception
See Also:
getAbsoluteParentName(Object)

getRemoteParentNamesInUse


String[] getRemoteParentNamesInUse(
Object element,
                                   
IProgressMonitor monitor)
                                   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.

Parameters:
element - The element for which to get names in use
monitor - Optional progress monitor for long-running operation. May be null.
Returns:
a list of unqualified names contained in this folder to check for uniqueness, or null if not applicable or no such names were found.
Throws:
Exception

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire