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

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

public abstract class AbstractPerspective
extends AbstractExtensionImplementation
implements Perspective


Field Summary
static java.lang.String rcs_id
           
 
Constructor Summary
AbstractPerspective()
           
 
Method Summary
 void addTopic(Topic topic)
          Add topic to the current perspective
 boolean containsTopic(Topic topic)
          Test whether given topic belongs to this perspective
 java.lang.String getId()
           
 Topic getSelectedTopic()
          Get the currently selected topic
 java.lang.String getSingleClickMethodName()
          returns the method name that should be called in case the perspective has no topic and should some event should be fired on Perspective selection.
 java.util.List getTopics()
          Get all topics
 boolean hasTopicTree()
          A topic may provide for a tree (eg. for adavanced navigation).
 boolean isEnabled()
           
 boolean isSingeClickable()
          return false by Default, because perspective should contains topic
 boolean isVisible()
           
 boolean isVisible(WorkplaceContext wc)
          Check whether given perspective should be visible within the passed WorkplaceContext.
 void reactOnSwitchSelectedPerspective(Perspective oldPerspective, Perspective newPerspective)
          Notify perspective about change of visible perspective - override in subclass if required
 boolean requiresInitialCallReactOnSwitchSelectedPerspective(ApplicationContext ac)
          By default method reactOnSwitchSelectedPerspective is called on user selection only.
 void setEnabled(boolean enabled)
           
 void setSelectedTopic(Topic topic)
          Set the currently selected topic
 void setVisible(boolean visible)
           
 boolean supportsViews()
          Check whether this Perspective supports a view selection list box
 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.Perspective
getImageURL, getLogoImageURL, getTitle, getToolbar, getView, getViewLabel, getViewValues, getWorkplaceDefaultLayout, setView, setWorkplaceContext
 
Methods inherited from interface com.softwareag.cis.plugin.registry.ExtensionImplementation
getExtension, getPlugIn, popContextClassLoader, pushContextClassLoader, setExtension
 

Field Detail

rcs_id

public static final java.lang.String rcs_id
See Also:
Constant Field Values
Constructor Detail

AbstractPerspective

public AbstractPerspective()
Method Detail

toString

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

getId

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

addTopic

public final void addTopic(Topic topic)
Add topic to the current perspective

Specified by:
addTopic in interface Perspective
Parameters:
topic - - topic to be added

getTopics

public final java.util.List getTopics()
Get all topics

Specified by:
getTopics in interface Perspective
Returns:
List - list of all topics

containsTopic

public final boolean containsTopic(Topic topic)
Description copied from interface: Perspective
Test whether given topic belongs to this perspective

Specified by:
containsTopic in interface Perspective
Parameters:
topic - - check if such topic exists in the current perspective
Returns:
true - if contains topic

isVisible

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

isVisible

public boolean isVisible(WorkplaceContext wc)
Description copied from interface: Perspective
Check whether given perspective should be visible within the passed WorkplaceContext.

Specified by:
isVisible in interface Perspective
Parameters:
wc - The WorkplaceContext.
Returns:
true if the perspective should be visible.
See Also:
Component.isVisible()

setVisible

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

isEnabled

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

setEnabled

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

setSelectedTopic

public void setSelectedTopic(Topic topic)
Set the currently selected topic

Specified by:
setSelectedTopic in interface Perspective
Parameters:
topic - - the topic to be marked as selected

getSelectedTopic

public Topic getSelectedTopic()
Get the currently selected topic

Specified by:
getSelectedTopic in interface Perspective
Returns:
Topic

reactOnSwitchSelectedPerspective

public void reactOnSwitchSelectedPerspective(Perspective oldPerspective,
                                             Perspective newPerspective)
Notify perspective about change of visible perspective - override in subclass if required

Specified by:
reactOnSwitchSelectedPerspective in interface Perspective
Parameters:
oldPerspective - the perspective which was visible before, null if none
newPerspective - the perspective to become visible

supportsViews

public boolean supportsViews()
Check whether this Perspective supports a view selection list box

Specified by:
supportsViews in interface Perspective

isSingeClickable

public boolean isSingeClickable()
return false by Default, because perspective should contains topic

Specified by:
isSingeClickable in interface Perspective
Returns:
true if it is single clickable

getSingleClickMethodName

public java.lang.String getSingleClickMethodName()
returns the method name that should be called in case the perspective has no topic and should some event should be fired on Perspective selection.

Specified by:
getSingleClickMethodName in interface Perspective
Returns:
the method name that should be called if the perspective is singleClickable; Note The implementationa of this method should be in DLHeaderAdapter class.

hasTopicTree

public boolean hasTopicTree()
A topic may provide for a tree (eg. for adavanced navigation).

Specified by:
hasTopicTree in interface Perspective
Returns:
true if topic provides for a tree false otherwise

requiresInitialCallReactOnSwitchSelectedPerspective

public boolean requiresInitialCallReactOnSwitchSelectedPerspective(ApplicationContext ac)
By default method reactOnSwitchSelectedPerspective is called on user selection only. Use this method to indicate that your perspective needs to have that notification callback also on user login

Specified by:
requiresInitialCallReactOnSwitchSelectedPerspective in interface Perspective
Parameters:
ac - ApplicationContext instance
Returns:
true to be called with reactOnSwitchSelectedPerspective on user login otherwise false