org.safs.jvmagent
Interface LocalSubItemsAgent

All Known Implementing Classes:
AServerImpl, ComponentAgent, ComponentAgent, ContainerAgent, ContainerAgent, FrameAgent, FrameAgent, JCheckBoxAgent, JCheckBoxAgent, JChildlessAgent, JComboBoxAgent, JComboBoxAgent, JComponentAgent, JComponentAgent, JFrameAgent, JFrameAgent, JLabelAgent, JLabelAgent, JListAgent, JListAgent, JMenuAgent, JMenuAgent, JMenuBarAgent, JMenuBarAgent, JScrollBarAgent, JScrollBarAgent, JScrollPaneAgent, JScrollPaneAgent, JTableAgent, JTableAgent, JTableHeaderAgent, JTableHeaderAgent, JTextAreaAgent, JTextAreaAgent, JTextFieldAgent, JTextFieldAgent, JTreeAgent, JTreeAgent, ObjectAgent, ObjectAgent, ServerImpl, WindowAgent, WindowAgent

public interface LocalSubItemsAgent

Defines the interface necessary to extract items out of referenced objects by some qualifying factor like index or text. This interface represents the server-side of the implementation and is intended to match the remote SubItemsAgent interface.

Since:
Apr 7, 2005
See Also:
SubItemsAgent

Method Summary
 java.lang.Object getMatchingPathObject(java.lang.Object object, java.lang.String path)
          Return the subitem at the specified string path from the given object.
 java.lang.Object getSubItemAtIndex(java.lang.Object object, int index)
          Return the subitem at the specified index from the given object.
 boolean isMatchingPath(java.lang.Object object, java.lang.String path)
          Determine if the object contains a subitem/object identified by the provided Path.
 

Method Detail

getSubItemAtIndex

java.lang.Object getSubItemAtIndex(java.lang.Object object,
                                   int index)
                                   throws java.lang.Exception
Return the subitem at the specified index from the given object. This may be a ComboBox item, a List item, or a Tree node, etc... The returned item may be a component object or perhaps a String representing the text of the item. The return type is object specific.

Parameters:
object - reference from which to locate the subitem.
index - of the subitem to retrieve.
Returns:
subitem object or String
Throws:
an - Exception if the subitem index is invalid or subitem is unobtainable.
java.lang.Exception

getMatchingPathObject

java.lang.Object getMatchingPathObject(java.lang.Object object,
                                       java.lang.String path)
                                       throws java.lang.Exception
Return the subitem at the specified string path from the given object. This is a hierarchical path of parent->child relationships separated by "->". The returned item may be a component object or perhaps a String representing the text of the item. The return type is object specific. This is often used to identify items in Menus and Trees.

Ex:

File->Exit
Root->Branch->Leaf

Parameters:
object -
path - to desired subitem using item->subitem->subitem format.
Returns:
subitem object or String
Throws:
java.lang.Exception

isMatchingPath

boolean isMatchingPath(java.lang.Object object,
                       java.lang.String path)
                       throws java.lang.Exception
Determine if the object contains a subitem/object identified by the provided Path. Path is hierarchical information showing parent->child relationships separated by '->'. This is often used in Menus and Trees.

Ex:

File->Exit
Root->Branch->Leaf

Parameters:
object--Object - proxy for the object to be evaluated.
path - information to locate another object or subitem relative to object. this is usually something like a menuitem or tree node where supported.
Returns:
true if the child sub-object was found relative to object.
Throws:
java.lang.Exception