|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.core.ui.view.AbstractSystemViewAdapter
com.ibm.etools.systems.core.ui.view.SystemViewRemoteSearchResultSetAdapter
Adapter for a search result set.
Field Summary | |
---|---|
static String |
Copyright
|
Fields inherited from class com.ibm.etools.systems.core.ui.view.AbstractSystemViewAdapter |
---|
_lastResults, _lastSelected, canceledObject, copyright, 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.ISystemRemoteElementAdapter |
---|
copyright |
Fields inherited from interface com.ibm.etools.systems.core.ui.view.ISystemViewElementAdapter |
---|
noActions |
Constructor Summary | |
---|---|
SystemViewRemoteSearchResultSetAdapter()
|
Method Summary | |
---|---|
void |
addActions(SystemMenuManager menu,
IStructuredSelection selection,
Shell shell,
String menuGroup)
No actions are provided on a search results container |
boolean |
canDelete(Object element)
Overridable by subclasses, and usually is. |
boolean |
canEdit(Object obj)
Returns false |
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. |
Object[] |
getChildren(Object element)
Returns the search results for the given search handle |
ISystemEditableRemoteObject |
getEditableRemoteObject(Object obj)
Returns null since a search results container can't be edited |
String |
getFilterStringFor(Object object)
Return a filter string that corresponds to this object. |
ImageDescriptor |
getImageDescriptor(Object element)
Returns the associated icon for a search handle |
Object |
getParent(Object element)
Returns null since a search handle has no parent |
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)
Returns the associated file subsystem for this search operation |
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. |
String |
getText(Object element)
Returns the display text for a search handle. |
String |
getType(Object element)
Returns the type property of a search. |
boolean |
handleDoubleClick(Object element)
Returns false since a search handle can't be edited |
boolean |
hasChildren(Object element)
Returns true if it has children, otherwise returns false . |
protected IPropertyDescriptor[] |
internalGetPropertyDescriptors()
Return our unique property descriptors |
protected Object |
internalGetPropertyValue(Object key)
Return our unique property values |
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 |
remove(Object element,
Object child)
Remove a child from the element. |
boolean |
removeAllChildren(Object element)
Remove all children from the element. |
boolean |
showDelete(Object element)
Overridable by subclasses, but usually is not. |
boolean |
supportsUserDefinedActions(Object object)
Returns false . |
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 |
public static final String Copyright
Constructor Detail |
public SystemViewRemoteSearchResultSetAdapter()
Method Detail |
public void addActions(SystemMenuManager menu, IStructuredSelection selection, Shell shell, String menuGroup)
addActions
in interface ISystemViewElementAdapter
addActions
in class AbstractSystemViewAdapter
menu
- the popup menu you can contribute toselection
- the current selection in the calling tree or table viewshell
- the shell of the calling tree or table viewmenuGroup
- the default menu group to place actions into if you don't care where they. Pass this to the SystemMenuManager add
method.ISystemViewElementAdapter.addActions(SystemMenuManager, IStructuredSelection, Shell, String)
public boolean canEdit(Object obj)
canEdit
in interface ISystemRemoteElementAdapter
canEdit
in class AbstractSystemViewAdapter
obj
- the object to edit
public ISystemEditableRemoteObject getEditableRemoteObject(Object obj)
getEditableRemoteObject
in interface ISystemRemoteElementAdapter
getEditableRemoteObject
in class AbstractSystemViewAdapter
obj
- the object to edit
public ImageDescriptor getImageDescriptor(Object element)
getImageDescriptor
in interface ISystemViewElementAdapter
getImageDescriptor
in class AbstractSystemViewAdapter
element
- The element for which an image is desiredpublic Object getParent(Object element)
getParent
in interface ISystemViewElementAdapter
getParent
in class AbstractSystemViewAdapter
public String getText(Object element)
getText
in interface ISystemViewElementAdapter
getText
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.getName(Object)
,
AbstractSystemViewAdapter.getAbsoluteName(Object)
public String getType(Object element)
getType
in interface ISystemViewElementAdapter
getType
in class AbstractSystemViewAdapter
public Object[] getChildren(Object element)
getChildren
in interface ISystemViewElementAdapter
getChildren
in class AbstractSystemViewAdapter
public boolean hasChildren(Object element)
true
if it has children, otherwise returns false
.
hasChildren
in interface ISystemViewElementAdapter
hasChildren
in class AbstractSystemViewAdapter
public boolean handleDoubleClick(Object element)
handleDoubleClick
in interface ISystemViewElementAdapter
handleDoubleClick
in class AbstractSystemViewAdapter
public SubSystem getSubSystem(Object element)
getSubSystem
in interface ISystemRemoteElementAdapter
getSubSystem
in class AbstractSystemViewAdapter
public String getAbsoluteName(Object element)
ISystemRemoteElementAdapter
getAbsoluteName
in interface ISystemRemoteElementAdapter
getAbsoluteName
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.getText(Object)
,
AbstractSystemViewAdapter.getName(Object)
public String getAbsoluteParentName(Object element)
ISystemRemoteElementAdapter
getAbsoluteParentName
in interface ISystemRemoteElementAdapter
public String getSubSystemFactoryId(Object element)
ISystemRemoteElementAdapter
getSubSystemFactoryId
in interface ISystemRemoteElementAdapter
public String getRemoteTypeCategory(Object element)
ISystemRemoteElementAdapter
getRemoteTypeCategory
in interface ISystemRemoteElementAdapter
public String getRemoteType(Object element)
ISystemRemoteElementAdapter
getRemoteType
in interface ISystemRemoteElementAdapter
public String getRemoteSubType(Object element)
ISystemRemoteElementAdapter
getRemoteSubType
in interface ISystemRemoteElementAdapter
public String getRemoteSubSubType(Object element)
ISystemRemoteElementAdapter
getRemoteSubSubType
in interface ISystemRemoteElementAdapter
getRemoteSubSubType
in class AbstractSystemViewAdapter
public String getRemoteSourceType(Object element)
getRemoteSourceType
in interface ISystemRemoteElementAdapter
getRemoteSourceType
in class AbstractSystemViewAdapter
public boolean refreshRemoteObject(Object oldElement, Object newElement)
ISystemRemoteElementAdapter
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.
refreshRemoteObject
in interface ISystemRemoteElementAdapter
oldElement
- the element that was found in the treenewElement
- the updated element that was passed in the REFRESH_REMOTE event
public Object getRemoteParent(Shell shell, Object element) throws Exception
getRemoteParent
in interface ISystemRemoteElementAdapter
Exception
public String[] getRemoteParentNamesInUse(Shell shell, Object element) throws Exception
getRemoteParentNamesInUse
in interface ISystemRemoteElementAdapter
Exception
protected IPropertyDescriptor[] internalGetPropertyDescriptors()
internalGetPropertyDescriptors
in class AbstractSystemViewAdapter
AbstractSystemViewAdapter.createSimplePropertyDescriptor(String,ResourceBundle,String)
protected Object internalGetPropertyValue(Object key)
internalGetPropertyValue
in class AbstractSystemViewAdapter
key
- the name of the property as named by its property descriptor
public String getFilterStringFor(Object object)
getFilterStringFor
in interface ISystemRemoteElementAdapter
getFilterStringFor
in class AbstractSystemViewAdapter
object
- the object to obtain a filter string for
public boolean canDelete(Object element)
AbstractSystemViewAdapter
By default, returns false. Override if your object is deletable.
canDelete
in interface ISystemViewElementAdapter
canDelete
in class AbstractSystemViewAdapter
ISystemViewElementAdapter.canDelete(java.lang.Object)
public boolean showDelete(Object element)
AbstractSystemViewAdapter
By default, returns true.
showDelete
in interface ISystemViewElementAdapter
showDelete
in class AbstractSystemViewAdapter
ISystemViewElementAdapter.showDelete(java.lang.Object)
public boolean remove(Object element, Object child)
ISystemRemoveElementAdapter
remove
in interface ISystemRemoveElementAdapter
element
- the element.child
- the child to remove. Does not have to be an immediate child
of the element.
true
if the child has been removed, false
otherwise.ISystemRemoveElementAdapter.remove(java.lang.Object, java.lang.Object)
public boolean removeAllChildren(Object element)
ISystemRemoveElementAdapter
removeAllChildren
in interface ISystemRemoveElementAdapter
element
- the element.
true
if the children have been removed, false
otherwise.ISystemRemoveElementAdapter.removeAllChildren(java.lang.Object)
public boolean supportsUserDefinedActions(Object object)
false
.
supportsUserDefinedActions
in interface ISystemRemoteElementAdapter
object
- the object.
true
if the object supports user defined actions, false
otherwise.ISystemRemoteElementAdapter.supportsUserDefinedActions(java.lang.Object)
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |