org.jaffa.presentation.portlet.component
Interface IComponent

All Known Subinterfaces:
ICreateComponent, IDeleteComponent, IMaintComponent, IUpdateComponent
All Known Implementing Classes:
Component, CreateComponent, DeleteComponent, MaintComponent, MaintComponent2, UpdateComponent

public interface IComponent

All the components implement this interface


Method Summary
 void addFormKeyChangeListener(FormKeyChangeListener listener)
          Registers listener so that it will receive FormKeyChangeEvents.
 FormKey display()
          Returns a FormKey, which has the componentId & the formName to which control should be passed
 ComponentDefinition getComponentDefinition()
          Returns the ComponentDefinition based on which this Component was created
 String getComponentId()
          Returns the Id for the component
 FormKey getContainerFormKey()
          Getter for property containerFormKey.
 FormKeyChangeListener[] getFormKeyChangeListeners()
          Returns an array of all the FormKeyChangeListeners registered on this component.
 FormKey getReturnToFormKey()
          Getter for property returnToFormKey.
 String getToken()
          Getter for property token.
 UserSession getUserSession()
          Returns the UserSession, under which the Component was created
 boolean isActive()
          Returns a true if the component is still active.
 void quit()
          This will kill all the Forms Finally de-register itself from the UserSession
 FormKey quitAndReturnToCallingScreen()
          This should invoke the quit() method, and then return the FormKey for the calling screen.
 void removeFormKeyChangeListener(FormKeyChangeListener listener)
          Unregisters listener so that it will no longer receive FormKeyChangeEvents.
 void setContainerFormKey(FormKey containerFormKey)
          Setter for property containerFormKey.
 void setReturnToFormKey(FormKey returnToFormKey)
          Setter for property returnToFormKey.
 void setToken(String token)
          Setter for property token.
 

Method Detail

display

public FormKey display()
                throws FrameworkException,
                       ApplicationExceptions
Returns a FormKey, which has the componentId & the formName to which control should be passed

Returns:
the FormKey object
Throws:
FrameworkException - if any framework error occurs.
ApplicationExceptions - if any application error occurs.

quit

public void quit()
This will kill all the Forms Finally de-register itself from the UserSession


quitAndReturnToCallingScreen

public FormKey quitAndReturnToCallingScreen()
This should invoke the quit() method, and then return the FormKey for the calling screen. The FormKey should have been set by a call to setReturnToFormKey().

Returns:
The FormKey for the caling screen. A null will be returned, if no calling screen was specified.

getComponentId

public String getComponentId()
Returns the Id for the component

Returns:
The componentId

getComponentDefinition

public ComponentDefinition getComponentDefinition()
Returns the ComponentDefinition based on which this Component was created

Returns:
The ComponentDefintion object for the Component

getUserSession

public UserSession getUserSession()
Returns the UserSession, under which the Component was created

Returns:
The UserSession object

getReturnToFormKey

public FormKey getReturnToFormKey()
Getter for property returnToFormKey. This FormKey determines the screen to display when quitting from a component.

Returns:
Value of property returnToFormKey.

setReturnToFormKey

public void setReturnToFormKey(FormKey returnToFormKey)
Setter for property returnToFormKey. This FormKey determines the screen to display when quitting from a component.

Parameters:
returnToFormKey - New value of property returnToFormKey.

getContainerFormKey

public FormKey getContainerFormKey()
Getter for property containerFormKey. This property is useful when this component is being rendered as a tile inside another component. The outer component is expected to set this property on this component. The outer component is also expected to register the FormKeyChangeListener on this component. The ActionBase will intercept all FormKeys for this component. It will then fire the FormKeyChangeEvents on the listeners. The ActionBase will then return the ContainerFormKey. The Component will fire the FormKeyChangeEvents on the listeners during the quit(), passing the ReturnToFormKey. All this helps render the tiles correctly.

Returns:
Value of property containerFormKey.

setContainerFormKey

public void setContainerFormKey(FormKey containerFormKey)
Setter for property containerFormKey. This property is useful when this component is being rendered as a tile inside another component. The outer component is expected to set this property on this component. The outer component is also expected to register the FormKeyChangeListener on this component. The ActionBase will intercept all FormKeys for this component. It will then fire the FormKeyChangeEvents on the listeners. The ActionBase will then return the ContainerFormKey. The Component will fire the FormKeyChangeEvents on the listeners during the quit(), passing the ReturnToFormKey. All this helps render the tiles correctly.

Parameters:
containerFormKey - New value of property containerFormKey.

addFormKeyChangeListener

public void addFormKeyChangeListener(FormKeyChangeListener listener)
Registers listener so that it will receive FormKeyChangeEvents. The ActionBase typically creates the FormKeyChangeEvent object, when processing an event for a component, that has a ContainerFormKey. It will then fire the FormKeyChangeListener registered with the component, passing the FormKeyChangeEvent object. The Component will fire the FormKeyChangeEvents on the listeners during the quit(), passing the ReturnToFormKey.

Parameters:
listener - the FormKeyChangeListener to register.

removeFormKeyChangeListener

public void removeFormKeyChangeListener(FormKeyChangeListener listener)
Unregisters listener so that it will no longer receive FormKeyChangeEvents.

Parameters:
listener - the FormKeyChangeListener to be removed.

getFormKeyChangeListeners

public FormKeyChangeListener[] getFormKeyChangeListeners()
Returns an array of all the FormKeyChangeListeners registered on this component.

Returns:
all of the component's FormKeyChangeListeners or a null if no ancestor listeners are currently registered.

isActive

public boolean isActive()
Returns a true if the component is still active. The component should be set to inactive status after a quit().

Returns:
a true if the component is still active.

getToken

public String getToken()
Getter for property token.

Returns:
Value of property token.

setToken

public void setToken(String token)
Setter for property token.

Parameters:
token - New value of property token.


Copyright © 2002-2004 JAFFA Project.