com.softwareag.cis.plugin.extpt.util
Class AbstractTopic

java.lang.Object
  extended by com.softwareag.cis.plugin.extpt.util.AbstractExtensionImplementation
      extended by com.softwareag.cis.plugin.extpt.util.AbstractTopic
All Implemented Interfaces:
Topic, com.softwareag.cis.plugin.interfaces.Component, ExtensionImplementation
Direct Known Subclasses:
PlugInTopic

public abstract class AbstractTopic
extends AbstractExtensionImplementation
implements Topic

This is a basic implementation of the Topic interface providing implementation of some interface methods as well as some convenience methods.


Field Summary
 
Fields inherited from class com.softwareag.cis.plugin.extpt.util.AbstractExtensionImplementation
rcs_id
 
Fields inherited from interface com.softwareag.cis.plugin.extpt.Topic
rcs_id
 
Constructor Summary
AbstractTopic()
           
 
Method Summary
 boolean createWorkplaceTopic()
          Create the WorkplaceTopic object for this topic
 java.util.List getCommands()
          Used for drop down menu for topic.
 com.softwareag.cis.server.util.TREECollection getContextMenu()
          Obtain a context menu when selecting right mouse button in free area of workplace topic
 java.lang.String getId()
           
 java.util.Locale getLocale()
           
 java.lang.String getPageAdapterClass()
          Get the adapter class of page to be opened
 java.lang.String getPageURL()
          Get page URL for topic
 Perspective getPerspective()
          Get perspective this topic is part of
 com.softwareag.cis.server.util.TREECollection getTree()
          Obtain tree for this topic
 com.softwareag.cis.plugin.tree.TreeCommandContext getTreeCommandContext()
           
 com.softwareag.cis.workplace.MFWorkplaceAdapter getWorkplaceAdapter()
           
 WorkplaceContext getWorkplaceContext()
          Get WorkplaceContext for this object
 com.softwareag.cis.workplace.MFWorkplaceTopic getWorkplaceTopic()
          Obtain the WorkplaceTopic object for this topic
 boolean isEnabled()
           
 boolean isVisible()
           
 void reactOnPopupMenuClosedByUser()
          React on closing context menu opened within topic
 void reactOnSwitchSelectedTopic(Topic oldTopic, Topic newTopic)
          React on topic change - override in subclass if required
 void reactOnSwitchSelectedTopicWithTopicCommand(Topic oldTopic, Topic newTopic, Command topicCommand)
          React on topic change
 void setEnabled(boolean enabled)
           
 void setTreeCommandContext(com.softwareag.cis.plugin.tree.TreeCommandContext treeCommandContext)
          Set the command context of the current topic
 void setVisible(boolean visible)
           
 void setWorkplaceContext(WorkplaceContext wc)
          Initialize this topic - the WorkplaceContext is passed for potential callbacks
 java.lang.String toString()
           
 
Methods inherited from class com.softwareag.cis.plugin.extpt.util.AbstractExtensionImplementation
getExtension, getPlugIn, popContextClassLoader, pushContextClassLoader, setExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.softwareag.cis.plugin.extpt.Topic
getImageURL, getTitle
 
Methods inherited from interface com.softwareag.cis.plugin.registry.ExtensionImplementation
getExtension, getPlugIn, popContextClassLoader, pushContextClassLoader, setExtension
 

Constructor Detail

AbstractTopic

public AbstractTopic()
Method Detail

getId

public java.lang.String getId()
Specified by:
getId in interface com.softwareag.cis.plugin.interfaces.Component

setWorkplaceContext

public void setWorkplaceContext(WorkplaceContext wc)
Description copied from interface: Topic
Initialize this topic - the WorkplaceContext is passed for potential callbacks

Specified by:
setWorkplaceContext in interface Topic

setTreeCommandContext

public void setTreeCommandContext(com.softwareag.cis.plugin.tree.TreeCommandContext treeCommandContext)
Set the command context of the current topic

Parameters:
treeCommandContext - - the command context of the current topic

getTreeCommandContext

public com.softwareag.cis.plugin.tree.TreeCommandContext getTreeCommandContext()
Returns:
TreeCommandContext of the current topic

getWorkplaceTopic

public com.softwareag.cis.workplace.MFWorkplaceTopic getWorkplaceTopic()
Description copied from interface: Topic
Obtain the WorkplaceTopic object for this topic

Specified by:
getWorkplaceTopic in interface Topic
Returns:
the WorkplaceTopic

createWorkplaceTopic

public boolean createWorkplaceTopic()
                             throws java.lang.Exception
Description copied from interface: Topic
Create the WorkplaceTopic object for this topic

Specified by:
createWorkplaceTopic in interface Topic
Returns:
true if the tree has been newly created, false if the tree has been reused from a previous WorkplaceTopic created for a extension implementing this interface
Throws:
java.lang.Exception

isVisible

public boolean isVisible()
Specified by:
isVisible in interface com.softwareag.cis.plugin.interfaces.Component

setVisible

public void setVisible(boolean visible)
Specified by:
setVisible in interface com.softwareag.cis.plugin.interfaces.Component

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface com.softwareag.cis.plugin.interfaces.Component

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface com.softwareag.cis.plugin.interfaces.Component

getPerspective

public Perspective getPerspective()
Get perspective this topic is part of

Specified by:
getPerspective in interface Topic
Returns:
the Perspective

getTree

public com.softwareag.cis.server.util.TREECollection getTree()
Obtain tree for this topic


getWorkplaceContext

public WorkplaceContext getWorkplaceContext()
Get WorkplaceContext for this object

Returns:
the WorkplaceContext

getWorkplaceAdapter

public com.softwareag.cis.workplace.MFWorkplaceAdapter getWorkplaceAdapter()
Returns:
the workplace adapter

getLocale

public java.util.Locale getLocale()
Returns:
the Locale to be used for rendering

reactOnSwitchSelectedTopic

public void reactOnSwitchSelectedTopic(Topic oldTopic,
                                       Topic newTopic)
React on topic change - override in subclass if required

Specified by:
reactOnSwitchSelectedTopic in interface Topic

reactOnSwitchSelectedTopicWithTopicCommand

public void reactOnSwitchSelectedTopicWithTopicCommand(Topic oldTopic,
                                                       Topic newTopic,
                                                       Command topicCommand)
React on topic change

Specified by:
reactOnSwitchSelectedTopicWithTopicCommand in interface Topic

reactOnPopupMenuClosedByUser

public void reactOnPopupMenuClosedByUser()
React on closing context menu opened within topic

Specified by:
reactOnPopupMenuClosedByUser in interface Topic

getContextMenu

public com.softwareag.cis.server.util.TREECollection getContextMenu()
Obtain a context menu when selecting right mouse button in free area of workplace topic

Specified by:
getContextMenu in interface Topic
Returns:
the TREECollection describing the context menu or null if no context menu is to be shown

getCommands

public java.util.List getCommands()
Description copied from interface: Topic
Used for drop down menu for topic.

Specified by:
getCommands in interface Topic

getPageURL

public java.lang.String getPageURL()
Get page URL for topic

Specified by:
getPageURL in interface Topic
Returns:
the URL or null, if no page to be provided

getPageAdapterClass

public java.lang.String getPageAdapterClass()
Description copied from interface: Topic
Get the adapter class of page to be opened

Specified by:
getPageAdapterClass in interface Topic
Returns:
adapter class name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object