com.sapportals.portal.appintegrator.template_processor.context
Class AbstractContext

java.lang.Object
  |
  +--com.sapportals.portal.appintegrator.template_processor.context.AbstractContext
All Implemented Interfaces:
IAccessor

public abstract class AbstractContext
extends java.lang.Object
implements IAccessor

Abstract Context This Context collects common methods for all context wrappers Copyright (c) SAP Portals Europe GmbH 2001

Version:
$Revision: #1 $

Field Summary
protected  java.lang.String mm_name
          the name of the context
protected  IAccessor mm_overlay
          the current overlay context (null if overlay is disabled)
 
Constructor Summary
AbstractContext()
           
 
Method Summary
 IAccessor get(java.lang.String id)
          returns the IAccessor member which key equals to id of the current context which must be another (nested) context
 java.lang.String getContextName()
          Returns the name of the context
 java.lang.String getTerminal(java.lang.String id, java.util.Locale loc)
          returns the String value for a leaf property for locale loc
 void setContextName(java.lang.String newName)
          sets the name of the context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mm_name

protected java.lang.String mm_name
the name of the context

mm_overlay

protected IAccessor mm_overlay
the current overlay context (null if overlay is disabled)
Constructor Detail

AbstractContext

public AbstractContext()
Method Detail

get

public IAccessor get(java.lang.String id)
              throws java.lang.NullPointerException
returns the IAccessor member which key equals to id of the current context which must be another (nested) context
Specified by:
get in interface IAccessor
Parameters:
id - the id (i.e. key) of the nested context
Throws:
NullPointerException, - if id is null

getTerminal

public java.lang.String getTerminal(java.lang.String id,
                                    java.util.Locale loc)
                             throws java.lang.NullPointerException
returns the String value for a leaf property for locale loc
Specified by:
getTerminal in interface IAccessor
Parameters:
id - the id (i.e. key) of the property (maybe local depended)
loc - the desired locale
Throws:
NullPointerException, - if id is null

setContextName

public void setContextName(java.lang.String newName)
sets the name of the context
Specified by:
setContextName in interface IAccessor
Parameters:
newName - new name of the context

getContextName

public java.lang.String getContextName()
Returns the name of the context
Specified by:
getContextName in interface IAccessor
Returns:
the name of the PortalComponentProfileWrapper context (i.e. "profile")