com.mindoo.remote.api.com.ibm.rcp.topology
Interface IRemoteTopologyHandler

All Superinterfaces:
IRemoteEclipseWrapper

public interface IRemoteTopologyHandler
extends IRemoteEclipseWrapper

Remote API Wrapper for the com.ibm.rcp.topology.TopologyHandler (Online documentation)

Original documentation:
This is the interface for any implementations of a TopologyHandler to be used in a client environment. The TopologyHandler is used to project the contents of a WebSphere Portal application down to the client.
The TopologyHandler is registered as an OSGi service and the other interfaces referenced by this interface can be retrieved via the service object which is returned from the OSGi service registry.
The Topology Handler works in conjunction with the Composite Application Infrastructure in order to render applications from the ibm-composite.xml within the platform.


Method Summary
 IRemotePage findPage(java.lang.String application, java.util.Map criteria)
          Finds a page withing the specified application which contains the preferences specified by the criteria map.
 java.lang.String[] getApplicationGUIDs()
          This method is used to retrieve the list of GUIDs for all applications which have been projected to the client.
 IRemoteNavigation getApplicationNavigationTree(java.lang.String application)
          This method returns the root navigation tree for the application specified in the application parameter.
 IRemoteComponentData getComponentData(java.lang.String id)
          Component data is arbitrary data which is associated with component instances contained in the component tree.
 IRemoteNavigation getNavigation(java.lang.String id)
          This method is used to return a specific INavigation object referenced by its ID.
 java.util.Map load()
          This method iterates through each application in the store and laods the topology xml into memory.
 void loadTopology(java.lang.String appId)
          Loads the topology xml into memory and creates a client instance of the topology.
 void modifyComponent(java.util.Map<java.lang.Object,java.lang.Object> atts, java.lang.String component)
          Experimental API for allowing runtime modification of existing components.
 void modifyNavigation(java.util.Map<java.lang.Object,java.lang.Object> attributes, java.lang.String id)
          Experimental API for allowing runtime modification of existing pages and labels.
 
Methods inherited from interface com.mindoo.remote.api.IRemoteEclipseWrapper
_internalGetId, equalWrappedObjects
 

Method Detail

loadTopology

void loadTopology(java.lang.String appId)
                  throws RemoteEclipseAPIException
Loads the topology xml into memory and creates a client instance of the topology. This generates all extensions and model elements given from the xml. The app id is used to find the topology file located in the store matching the id of the application. If the file is not found in the store an exception is thrown.

Parameters:
appId - The unique identifier of the application topology to load.
Throws:
RemoteEclipseAPIException

load

java.util.Map load()
                   throws RemoteEclipseAPIException
This method iterates through each application in the store and laods the topology xml into memory. This creates the topology model and generates any extensions we have. Implicitly this method will call loadTopology(String guid) for each application guid which is found in the store. The Map that is returned is a collection of application topologies which failed to load. The key is the GUID for the application and the value is the Exception thrown for the failure.

Returns:
Map the map of applications which failed to load and their exceptions.
Throws:
RemoteEclipseAPIException

getApplicationNavigationTree

IRemoteNavigation getApplicationNavigationTree(java.lang.String application)
                                               throws RemoteEclipseAPIException
This method returns the root navigation tree for the application specified in the application parameter. If no application is found in the store this method will return null.

Parameters:
application - The unique identifier for the application
Returns:
The IRemoteNavigation composite object for this application.
Throws:
RemoteEclipseAPIException

getNavigation

IRemoteNavigation getNavigation(java.lang.String id)
                                throws RemoteEclipseAPIException
This method is used to return a specific INavigation object referenced by its ID. An INavigation object will either by an ILabel or an IPage object.

Parameters:
id - The unique id of the INavigation object
Returns:
The IRemoteNavigation object which has the specified ID.
Throws:
RemoteEclipseAPIException

getApplicationGUIDs

java.lang.String[] getApplicationGUIDs()
                                       throws RemoteEclipseAPIException
This method is used to retrieve the list of GUIDs for all applications which have been projected to the client. This list does not necessarily match what the CAI catalog contains.
Application GUIDs returned from this method are all applications which have been loaded via the CAI mechanism and have been stored by the Topology Handler.

Returns:
A String array containing the GUIDs for the applications.
Throws:
RemoteEclipseAPIException

modifyNavigation

void modifyNavigation(java.util.Map<java.lang.Object,java.lang.Object> attributes,
                      java.lang.String id)
                      throws RemoteEclipseAPIException
Experimental API for allowing runtime modification of existing pages and labels. Preferences can be changed and can optionally be persisted back to the original composite application xml file.

Parameters:
attributes - Any new attributes to be added or overridden.
id - The unique id of the navigation element to be modified.
Throws:
RemoteEclipseAPIException

modifyComponent

void modifyComponent(java.util.Map<java.lang.Object,java.lang.Object> atts,
                     java.lang.String component)
                     throws RemoteEclipseAPIException
Experimental API for allowing runtime modification of existing components.

Parameters:
atts - The map of attributes to override or add to the existing component to be modified.
component - The unique identifier of the component to be modified.
Throws:
RemoteEclipseAPIException

getComponentData

IRemoteComponentData getComponentData(java.lang.String id)
                                      throws RemoteEclipseAPIException
Component data is arbitrary data which is associated with component instances contained in the component tree. Clients can reference a component data element by supplying the secondary id for the component. This ID must not contain any dots ('.') due to restrictions on how Eclipse extension IDs must be formatted. In order to properly find the extension replace the dots in the id with the underscore ('_') character.

String id = getViewSite( ).getSecondaryId( );
id = id.replace('.', '_');
IRemoteComponentData cd = handler.getComponentData(id);
...
String[] title = cd.getPreference("com.ibm.rcp.title");

Parameters:
id - The compound id of the component whose data to access.
Returns:
The component data object for the component or null if not found
Throws:
RemoteEclipseAPIException

findPage

IRemotePage findPage(java.lang.String application,
                     java.util.Map criteria)
                     throws RemoteEclipseAPIException
Finds a page withing the specified application which contains the preferences specified by the criteria map. If no such page is found, then null is returned.

Parameters:
application - The GUID of the composite application
criteria - The HashMap of preferences to be matched with the page desired
Returns:
The page object meeting the criteria or null if none are found
Throws:
RemoteEclipseAPIException