org.objectweb.telosys.uil.screenmap
Class ScreenMap

java.lang.Object
  extended byorg.objectweb.telosys.common.TelosysObject
      extended byorg.objectweb.telosys.uil.screenmap.ScreenMap

public class ScreenMap
extends TelosysObject

ScreenMap informations for specific screenmap request
An instance of this class is created each time a screenmap request occurs


Constructor Summary
ScreenMap(ScreenDefRootDir rootDir, ScreenDefinition def, java.lang.String sScreenType, int iScreenContextId, java.lang.String sScreenContextName, java.lang.String sScreenContextAction)
          Constructor
 
Method Summary
 java.lang.String describe()
          Returns a string describing the ScreenMap
static java.lang.String getContextURI(java.lang.String sScreenName, java.lang.String sScreenType, java.lang.String sContextId, java.lang.String sContextName, java.lang.String sContextAction, java.lang.String sParams)
          Build a Web App context URI with the given ScreenMap parts
( e.g. : "/screenmap/name-type/id-ctx:action?
 java.lang.String getCss()
          Returns the CSS file if any
 java.lang.String getCssPath()
          Returns the path to the CSS file if any
 int getElemCount()
          Returns the number of elements
 ScreenMapElement getElement(java.lang.String sName)
          Returns the element corresponding to the given name
 java.lang.String getImagesRootDir()
          Returns the images root dir
 java.lang.String getName()
           
 java.lang.String getScreenBody()
          Returns the ScreenBody if any
 java.lang.String getScreenBodyPath()
          Returns the path to the ScreenBody if any
 java.lang.String getScreenContextAction()
          Returns the ScreenContext action required for this ScreenMap (can be null)
 int getScreenContextId()
          Returns the ID of the ScreenContext managed by this ScreenMap ( never UNDEFINED_CONTEXT_ID )
 java.lang.String getScreenContextName()
          Returns the name of ScreenContext managed by this ScreenMap ( never null )
 java.lang.String getScript()
          Returns the JS script file if any
 java.lang.String getScriptPath()
          Returns the path to the JS script file if any
 java.lang.String getTargetPath()
          Returns the path to target the Screen
 Translator getTranslator()
          Returns the screen map translator (if any)
 java.lang.String getType()
          Returns the ScreenMap type
 boolean isHtmlType()
          Returns true if the ScreenMap produces HTML output
 boolean isXulType()
          Returns true if the ScreenMap produces XUL output
 
Methods inherited from class org.objectweb.telosys.common.TelosysObject
error, error, error, getFlagTrace, info, setFlagTrace, trace, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScreenMap

public ScreenMap(ScreenDefRootDir rootDir,
                 ScreenDefinition def,
                 java.lang.String sScreenType,
                 int iScreenContextId,
                 java.lang.String sScreenContextName,
                 java.lang.String sScreenContextAction)
Constructor

Parameters:
rootDir -
def -
sScreenType - "html" or "xul" ( can be null )
iScreenContextId - 0..N or UNDEFINED_CONTEXT_ID or DYNAMIC_CONTEXT_ID ( use UNDEFINED_CONTEXT_ID for "null" )
sScreenContextName - can be null
Method Detail

getTargetPath

public java.lang.String getTargetPath()
Returns the path to target the Screen

Returns:
the path to the Screen Template ( if ScreenBody ) or the Screen Page

getScreenBodyPath

public java.lang.String getScreenBodyPath()
Returns the path to the ScreenBody if any

Returns:

getScreenBody

public java.lang.String getScreenBody()
Returns the ScreenBody if any

Returns:

getCssPath

public java.lang.String getCssPath()
Returns the path to the CSS file if any

Returns:

getCss

public java.lang.String getCss()
Returns the CSS file if any

Returns:

getScriptPath

public java.lang.String getScriptPath()
Returns the path to the JS script file if any

Returns:

getScript

public java.lang.String getScript()
Returns the JS script file if any

Returns:

getType

public java.lang.String getType()
Returns the ScreenMap type

Returns:
the type ( i.e. : "html" or "xul" )

getScreenContextId

public int getScreenContextId()
Returns the ID of the ScreenContext managed by this ScreenMap ( never UNDEFINED_CONTEXT_ID )

Returns:

getScreenContextName

public java.lang.String getScreenContextName()
Returns the name of ScreenContext managed by this ScreenMap ( never null )

Returns:

getScreenContextAction

public java.lang.String getScreenContextAction()
Returns the ScreenContext action required for this ScreenMap (can be null)

Returns:
Since:
1.0.5

isHtmlType

public boolean isHtmlType()
Returns true if the ScreenMap produces HTML output

Returns:

isXulType

public boolean isXulType()
Returns true if the ScreenMap produces XUL output

Returns:

getImagesRootDir

public java.lang.String getImagesRootDir()
Returns the images root dir

Returns:

getName

public java.lang.String getName()
Returns:
the name of the ScreenMap

getElement

public ScreenMapElement getElement(java.lang.String sName)
Returns the element corresponding to the given name

Parameters:
sName -
Returns:
the element, or null if unknown

getElemCount

public int getElemCount()
Returns the number of elements

Returns:

getTranslator

public Translator getTranslator()
Returns the screen map translator (if any)

Returns:

describe

public java.lang.String describe()
Returns a string describing the ScreenMap

Returns:

getContextURI

public static java.lang.String getContextURI(java.lang.String sScreenName,
                                             java.lang.String sScreenType,
                                             java.lang.String sContextId,
                                             java.lang.String sContextName,
                                             java.lang.String sContextAction,
                                             java.lang.String sParams)
Build a Web App context URI with the given ScreenMap parts
( e.g. : "/screenmap/name-type/id-ctx:action?params" )

Parameters:
sScreenName - : the ScreenMap name
sScreenType - : the ScreenMap type ( e.g. "html" or "xul" ) null = default type
sContextId - : the context id to use ( e.g. "1", "2", ... ) null = default context-id
sContextName - : the name of the ScreenContext to use, or null = ScreenMap name
sContextAction - : the action to apply on the ScreenContext ( "open", "use", "none" ) or null
sParams - : the standard URL parameters ( e.g. "param1=aaa¶m2=bbb" ) or null
Returns:
: the relative URI in the current Web App ( e.g. "/screenmap/SCREEN01-html/1-MYCONTEXT:use" )