com.sapportals.portal.appintegrator.layer
Interface IIntegrationLayer

All Known Implementing Classes:
AbstractIntegrationLayer

public interface IIntegrationLayer

Version:
$Revision: #2 $.
See Also:
AbstractIntegrationLayer

Field Summary
static java.lang.String PROPNAME_MANDATORY_PARAMETERS
          name of MandatoryParameters property
static java.lang.String PROPNAME_NEXT_LAYER
          name of NextLayer property
static java.lang.String PROPNAME_OPTIONAL_PARAMETERS
          name of OptionalParameters property
 
Method Summary
 void epilog()
          This method is used to provide the result of this layer for the subsequent layers and it has to be called after prolog and processLayer() and before render().
 java.lang.Exception getException()
          Returns the exception the occured during the processing of this layer or null if the processing was succesful.
 java.lang.String getLayerId()
          Returns the (hopefully unique) id of this layer.
 int getLayerNo()
          Returns the number of this layer that is the position of this layer in the layer stack.
 java.util.Enumeration getMandatoryParameters()
          Returns an enumeration over the mandatory parameters of this layer
 java.lang.String getNextLayer()
          Returns the id of the next layer in the layer stack.
 java.util.Enumeration getOptionalParameters()
          Returns an enumeration over the optional parameters of this layer
 java.util.Enumeration getValidValues(java.lang.String parameter)
          Returns an enumeration over the valid values of the given parameter.
 boolean hasException()
          Returns true if an exception occured during the processing of this layer
 void init(com.sapportals.portal.prt.component.IPortalComponentRequest request, IParameterConveyor conveyor, int layerNo, java.lang.String layerName)
          Initializes this layer.
 boolean isDebugMode()
          Returns whether debug mode is on or off
 boolean missingParameters()
          Returns true, if there are one or more mandatory parameters missing to process this layer.
 void processLayer()
          This method is used to do the real job of this layer (ie.
 void prolog()
          This method is used to retrieve the input parameters for this layer and it is called before processLayer(), epilog and render().
 void render(com.sapportals.portal.prt.component.IPortalComponentResponse response)
          This method is used to produce the output of this layer.
 void setException(java.lang.Exception e)
          set the exception for this layer
 boolean stopProcessing()
          Returns whether the layer processing should stop at this layer or not
 

Field Detail

PROPNAME_NEXT_LAYER

public static final java.lang.String PROPNAME_NEXT_LAYER
name of NextLayer property

PROPNAME_MANDATORY_PARAMETERS

public static final java.lang.String PROPNAME_MANDATORY_PARAMETERS
name of MandatoryParameters property

PROPNAME_OPTIONAL_PARAMETERS

public static final java.lang.String PROPNAME_OPTIONAL_PARAMETERS
name of OptionalParameters property
Method Detail

init

public void init(com.sapportals.portal.prt.component.IPortalComponentRequest request,
                 IParameterConveyor conveyor,
                 int layerNo,
                 java.lang.String layerName)
Initializes this layer.
Parameters:
request - the Portal Component Request
conveyor - the Parameter Conveyor that will provide this layer with its parameter
layerNo - the number of this layer - i.e. the position in the layer stack
layerId - the (unique) id of this layer
See Also:
IParameterConveyor

getLayerNo

public int getLayerNo()
Returns the number of this layer that is the position of this layer in the layer stack. This will be 0 for the top layer, 1 for the second layer etc. The number is defined by the initialization of this layer.
Returns:
the number (position) of this layer
See Also:
init(IPortalComponentRequest, IParameterConveyor, int, String)

getLayerId

public java.lang.String getLayerId()
Returns the (hopefully unique) id of this layer. The number is defined by the initialization of this layer.
Returns:
the id of this layer
See Also:
init(IPortalComponentRequest, IParameterConveyor, int, String)

getNextLayer

public java.lang.String getNextLayer()
Returns the id of the next layer in the layer stack. Each layer defines the layer that is processed at next - that means each layer knows as best which layer to proceed. The caller is responsible to retrieve a corresponding implementation of the returned layer name and has to instantiate it.
Returns:
the id of the next layer.
See Also:
getLayerId()

prolog

public void prolog()
This method is used to retrieve the input parameters for this layer and it is called before processLayer(), epilog and render().
See Also:
processLayer(), epilog(), render(IPortalComponentResponse)

processLayer

public void processLayer()
This method is used to do the real job of this layer (ie. URL computation etc). It is called after epilog and before render() and processLayer().
See Also:
prolog(), epilog(), render(IPortalComponentResponse)

epilog

public void epilog()
This method is used to provide the result of this layer for the subsequent layers and it has to be called after prolog and processLayer() and before render().
See Also:
prolog(), processLayer(), render(IPortalComponentResponse)

render

public void render(com.sapportals.portal.prt.component.IPortalComponentResponse response)
This method is used to produce the output of this layer. Most intermediate layers can skip this (or render only a comment). This method is called after prolog, processLayer() and epilog.
See Also:
prolog(), epilog(), processLayer()

setException

public void setException(java.lang.Exception e)
set the exception for this layer

hasException

public boolean hasException()
Returns true if an exception occured during the processing of this layer
Returns:
true, if an exception occured during the processing of this layer
See Also:
getException()

getException

public java.lang.Exception getException()
Returns the exception the occured during the processing of this layer or null if the processing was succesful.
Returns:
the exception (if any) of this layer
See Also:
hasException()

missingParameters

public boolean missingParameters()
Returns true, if there are one or more mandatory parameters missing to process this layer.
Returns:
true, if one or more mandatory parameters for this layer are not defined.

getMandatoryParameters

public java.util.Enumeration getMandatoryParameters()
Returns an enumeration over the mandatory parameters of this layer
Returns:
an enumeration over the mandatory parameters of this layer
See Also:
getOptionalParameters()

getOptionalParameters

public java.util.Enumeration getOptionalParameters()
Returns an enumeration over the optional parameters of this layer
Returns:
an enumeration over the optional parameters of this layer
See Also:
getMandatoryParameters()

getValidValues

public java.util.Enumeration getValidValues(java.lang.String parameter)
Returns an enumeration over the valid values of the given parameter. If the set of valid values cannot be calculated (because there are none or they are not countable), the method returns an empty enumeration.
Returns:
an enumeration over the set of valid values for the given parameter

isDebugMode

public boolean isDebugMode()
Returns whether debug mode is on or off
Returns:
true, if debug mode is on

stopProcessing

public boolean stopProcessing()
Returns whether the layer processing should stop at this layer or not
Returns:
true, if the layer processing should stop at this layer