pl.aislib.fm
Class PageInfo

java.lang.Object
  extended bypl.aislib.fm.PageInfo

public class PageInfo
extends java.lang.Object

This class describes servlet page attributes. Those attributes are: key assigned to page identyfying particular page, Java class implementing page behaviour, HTML template name used by this page, HTML template container (frame of this HTML page), HTML template slot inside of container, content type and content disposition for browser, triggers defined inside of this page.

Since:
AISLIB 0.1
Version:
$Revision: 1.8 $
Author:
Tomasz Pik, AIS.PL
Michal Jastak, AIS.PL

Constructor Summary
PageInfo(java.lang.String actionKey)
          Initializes PageInfo with actionKey.
 
Method Summary
 void addMessageInclude(java.lang.String name, int messageCode)
          Adds message to include in output of the page.
 void addTemplateInclude(java.lang.String name, java.lang.String templateName)
          Adds template to include in output of the page.
 boolean equals(java.lang.Object object)
          Checks 'equality' of two PageInfo objects.
 java.lang.String getActionKey()
          Gets action key for the page.
 java.lang.Class getClazz()
          Returns Class for the page.
 java.lang.String getContainerSlot()
          Gets name of the slot in the template container for the page.
 java.lang.String getContainerTemplateName()
          Gets name of the template container for the page.
 java.util.Map getMessageIncludes()
          Gets Map of message codes and keys.
protected  boolean getSessionExpiration()
          Returns session expiration behaviour.
 java.util.Map getTemplateIncludes()
          Gets Map of template names and keys.
 java.lang.String getTemplateName()
          Gets name of template defined for page represented by this PageInfo.
 int hashCode()
           
 void setContainer(java.lang.String containerTemplateName, java.lang.String containerSlot)
          Sets template container for the page.
protected  void setProperties(java.util.Map properties)
          Sets properties of the page.
protected  void setSessionExpiration(boolean _sessionExpiration)
          Sets session expiration beahviour.
protected  void setTemplateName(java.lang.String templateName)
          Method called by Workflow class when reading XML configuration.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageInfo

public PageInfo(java.lang.String actionKey)
Initializes PageInfo with actionKey.

Parameters:
actionKey - action key that identifies this page.
Method Detail

addTemplateInclude

public void addTemplateInclude(java.lang.String name,
                               java.lang.String templateName)
Adds template to include in output of the page.

Parameters:
name - key in master template.
templateName - name of template to include.

addMessageInclude

public void addMessageInclude(java.lang.String name,
                              int messageCode)
Adds message to include in output of the page.

Parameters:
name - key in master template.
messageCode - identification code for a message.

getTemplateIncludes

public java.util.Map getTemplateIncludes()
Gets Map of template names and keys. Returns Map of template names and keys for inclusion into response from the page.

Returns:
Map of template names and keys.

getMessageIncludes

public java.util.Map getMessageIncludes()
Gets Map of message codes and keys. Returns Map of message codes and keys for inclusion into response from the page.

Returns:
Map of message codes and keys.

getTemplateName

public java.lang.String getTemplateName()
Gets name of template defined for page represented by this PageInfo.

Returns:
name of template.

getContainerTemplateName

public java.lang.String getContainerTemplateName()
Gets name of the template container for the page.

Returns:
name of the container.

getContainerSlot

public java.lang.String getContainerSlot()
Gets name of the slot in the template container for the page. Returns name of slot (key) in template if this PageInfo represents page defined as a part of template container.

Returns:
name of the slot.

setContainer

public void setContainer(java.lang.String containerTemplateName,
                         java.lang.String containerSlot)
Sets template container for the page.

Parameters:
containerTemplateName - name of the container.
containerSlot - slot in template defined in the container.

setProperties

protected void setProperties(java.util.Map properties)
Sets properties of the page.

Parameters:
properties - properties of the page.

getActionKey

public java.lang.String getActionKey()
Gets action key for the page.

Returns:
action key for the page.

getClazz

public java.lang.Class getClazz()
Returns Class for the page.

Returns:
Class for the page.

equals

public boolean equals(java.lang.Object object)
Checks 'equality' of two PageInfo objects. This 'equality' is defined as equality of their actionKeys.

You may use this method with following argument types:

Parameters:
object - PageInfo object or actionKey String to check.
Returns:
true if PageInfo objects are equal in above meaning.
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
See Also:
Object.hashCode()

setTemplateName

protected void setTemplateName(java.lang.String templateName)
Method called by Workflow class when reading XML configuration.

Parameters:
templateName - name of main template for the page.

setSessionExpiration

protected void setSessionExpiration(boolean _sessionExpiration)
Sets session expiration beahviour. Method called by Workflow class when reading XML configuration.

Parameters:
_sessionExpiration - session expiration behaviour.

getSessionExpiration

protected boolean getSessionExpiration()
Returns session expiration behaviour. Returns true if page should be checked agains expiration of session, false otherwise.

Returns:
specification of session expiration behaviour.


Copyright © 2002-2005 AIS.PL. All Rights Reserved.