com.sapportals.portal.appintegrator.layer

Interface IIntegrationLayer

All Known Implementing Classes:
AbstractIntegrationLayer

public interface IIntegrationLayer

Defines the interface for an Integration Layer.

A layer handles a specific task to integrate back-end applications, such as generating the URL to the backend system, user mapping, rendering, drag and relate issues etc.

The integration of one kind of backend application is done by one or (normaly) more layers that are stacked together in the so called Layer Stack, where each layer defines its subsequent * layer &ndash see getNextLayer().

Each layer as a (unique) id (see getLayerId()) and a well defined number (see getLayerNo()) which is defined as the position in the Layer Stack beginning with 0 for the top layer.

A layer needs parameter to do its job which are provided by its preceding layer. The methods getMandatoryParameters() and getOptionalParameters() defines the mandatory and optional parameters resp. The method missingParameters() returns true, if one or more mandatory parameters are missing.

The parameters are managed by the so called Parameter Provider Manager (see IParameterConveyor). Every layer contains a reference to the same Parameter Provider Manager, which is provided through the layer initialization (@see init(IPortalComponentRequest, IParameterConveyor, int, String)).

The layer are mangaged by a Layer Processor (see com.sapportals.portal.appintegrator.LayerProcessor which initializes the layer and calls than the methods prolog(), processLayer() and epilog() during the action phase and the method render(IPortalComponentResponse) during the content phase of the portal request.
The prolog() method should be used to read the input parameters form the Parameter Conveyor and * the epilog() method should than provide the result of this layer to the next layer. processLayer() should be used to do the real work like URL generation etc. while render() should be used to output the result to the user agent.

See Also:
AbstractIntegrationLayer

Field Summary
static String PROPNAME_MANDATORY_PARAMETERS
          name of MandatoryParameters property
static String PROPNAME_NEXT_LAYER
          name of NextLayer property
static 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().
 ApplicationIntegratorException getException()
          Returns the exception the occured during the processing of this layer or null if the processing was succesful.
 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.
 Enumeration getMandatoryParameters()
          Returns an enumeration over the mandatory parameters of this layer
 String getNextLayer()
          Returns the id of the next layer in the layer stack.
 Enumeration getOptionalParameters()
          Returns an enumeration over the optional parameters of this layer
 Enumeration getValidValues(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(IPortalComponentRequest request, IParameterConveyor conveyor, int layerNo, 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(IPortalComponentResponse response)
          This method is used to produce the output of this layer.
 void setException(ApplicationIntegratorException 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

static final String PROPNAME_NEXT_LAYER
name of NextLayer property

See Also:
Constant Field Values

PROPNAME_MANDATORY_PARAMETERS

static final String PROPNAME_MANDATORY_PARAMETERS
name of MandatoryParameters property

See Also:
Constant Field Values

PROPNAME_OPTIONAL_PARAMETERS

static final String PROPNAME_OPTIONAL_PARAMETERS
name of OptionalParameters property

See Also:
Constant Field Values
Method Detail

init

void init(IPortalComponentRequest request,
          IParameterConveyor conveyor,
          int layerNo,
          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
layerName - the (unique) id of this layer
See Also:
IParameterConveyor

getLayerNo

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

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

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

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

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

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

void render(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

void setException(ApplicationIntegratorException e)
set the exception for this layer


hasException

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

ApplicationIntegratorException 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

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

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

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

Enumeration getValidValues(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

boolean isDebugMode()
Returns whether debug mode is on or off

Returns:
true, if debug mode is on

stopProcessing

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
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-RUNTIME [sap.com] tc/ep/appintegration/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice