pt.digitalis.dif.controller.interfaces
Interface IDIFRequest

All Known Implementing Classes:
DIFRequest

public interface IDIFRequest

Defines the expected behavior for a DIF request.

Author:
Luis Pinto lpinto@digitalis.pt, Rodrigo Gonçalves rgoncalves@digitalis.pt

Field Summary
static String CLIENT_VALIDATIONS_ATTRIBUTE_ID
          The id where requests indicates that the chal client validations should or shouldn't be made
static String LOG_PARAMETER_ID
          The id where requests indicates that want's download the server log
static String LOGIN_PARAMETER_ID
          The id where requests indicates that want's to login
static String LOGOUT_PARAMETER_ID
          The id where requests indicates that want's to logout
static String PASSWORD_PARAMETER_ID
          The id where users pass the user password to authenticate
static String REDIRECT_TO_URL
          The exceptional redirect to parameter
static String USER_PARAMETER_ID
          The id where users pass the user id to authenticate
 
Method Summary
 void addAttribute(String attributeName, Object attributeValue)
          Adds a new attribute to the DIFRequest collection.
 void addParameter(String parameterName, Object parameterValue)
          Adds a new parameter to the DIFRequest collection.
 Object getAttribute(String name)
          Retrieves an attribute from the attribute collection
 Map<String,Object> getAttributes()
          Inspector for the request parameters.
 ClientDescriptor getClient()
          Inspector for the client descriptor.
 String getFormat()
          Format inspector.
 Object getParameter(String name)
          Retrieves a parameter from the parameter collection
 Map<String,Object> getParameters()
          Inspector for the request parameters.
 RESTAction getRestAction()
           
 IDIFSession getSession()
          Inspector for the session.
 String getStage()
          Stage inspector.
 IStage getStageProxy()
          Stage inspector.
 boolean isAjaxMode()
           
 boolean isComponentMode()
           
 boolean isHelpMode()
           
 boolean isPopupMode()
           
 boolean isRestCall()
           
 boolean isTemplateMode()
           
 void setAttributes(Map<String,Object> attributes)
          Modifier for the request attributes.
 void setClient(ClientDescriptor client)
           
 void setComponentMode(boolean componentMode)
           
 void setFormat(String format)
          Format modifier.
 void setHelpMode(boolean helpMode)
           
 void setParameters(Map<String,Object> parameters)
          Modifier for the request parameters.
 void setPopupMode(boolean popupMode)
           
 void setRestAction(RESTAction restAction)
           
 void setSession(IDIFSession session)
          Modifier for the session
 void setStage(String newStage)
          Stage modifier.
 void setTemplateMode(boolean templateMode)
           
 

Field Detail

CLIENT_VALIDATIONS_ATTRIBUTE_ID

static final String CLIENT_VALIDATIONS_ATTRIBUTE_ID
The id where requests indicates that the chal client validations should or shouldn't be made

See Also:
Constant Field Values

LOG_PARAMETER_ID

static final String LOG_PARAMETER_ID
The id where requests indicates that want's download the server log

See Also:
Constant Field Values

LOGIN_PARAMETER_ID

static final String LOGIN_PARAMETER_ID
The id where requests indicates that want's to login

See Also:
Constant Field Values

LOGOUT_PARAMETER_ID

static final String LOGOUT_PARAMETER_ID
The id where requests indicates that want's to logout

See Also:
Constant Field Values

PASSWORD_PARAMETER_ID

static final String PASSWORD_PARAMETER_ID
The id where users pass the user password to authenticate

See Also:
Constant Field Values

REDIRECT_TO_URL

static final String REDIRECT_TO_URL
The exceptional redirect to parameter

See Also:
Constant Field Values

USER_PARAMETER_ID

static final String USER_PARAMETER_ID
The id where users pass the user id to authenticate

See Also:
Constant Field Values
Method Detail

addAttribute

void addAttribute(String attributeName,
                  Object attributeValue)
Adds a new attribute to the DIFRequest collection.

Parameters:
attributeName - attribute identifier
attributeValue - attribute value

addParameter

void addParameter(String parameterName,
                  Object parameterValue)
Adds a new parameter to the DIFRequest collection.

Parameters:
parameterName - parameter identifier
parameterValue - parameter value

getAttribute

Object getAttribute(String name)
Retrieves an attribute from the attribute collection

Parameters:
name - the name of the attribute to retrieve
Returns:
on Object with the attribute value

getAttributes

Map<String,Object> getAttributes()
Inspector for the request parameters.

Returns:
the request attributes

getClient

ClientDescriptor getClient()
Inspector for the client descriptor.

Returns:
the client descriptor

getFormat

String getFormat()
Format inspector.

Returns:
the format

getParameter

Object getParameter(String name)
Retrieves a parameter from the parameter collection

Parameters:
name - the name of the parameter to retrieve
Returns:
on Object with the parameter value

getParameters

Map<String,Object> getParameters()
Inspector for the request parameters.

Returns:
the request parameters

getRestAction

RESTAction getRestAction()
Returns:
the REST action executed, if specified.

getSession

IDIFSession getSession()
Inspector for the session.

Returns:
the session

getStage

String getStage()
Stage inspector.

Returns:
the stage

getStageProxy

IStage getStageProxy()
Stage inspector.

Returns:
the stage proxy

isAjaxMode

boolean isAjaxMode()
Returns:
T if current stage has been requested in ajax mode

isComponentMode

boolean isComponentMode()
Returns:
T if current stage has been requested in component mode

isHelpMode

boolean isHelpMode()
Returns:
T if current stage has been requested in help mode

isPopupMode

boolean isPopupMode()
Returns:
T if current stage has been requested in popup mode

isRestCall

boolean isRestCall()
Returns:
T if current stage has been requested in REST mode

isTemplateMode

boolean isTemplateMode()
Returns:
T if current stage has been requested in template mode

setAttributes

void setAttributes(Map<String,Object> attributes)
Modifier for the request attributes.

Parameters:
attributes - the attributes to set

setClient

void setClient(ClientDescriptor client)
Parameters:
client - the client to set

setComponentMode

void setComponentMode(boolean componentMode)
Parameters:
componentMode - the componentMode to set

setFormat

void setFormat(String format)
Format modifier.

Parameters:
format - the format to set

setHelpMode

void setHelpMode(boolean helpMode)
Parameters:
helpMode - the helpMode to set

setParameters

void setParameters(Map<String,Object> parameters)
Modifier for the request parameters.

Parameters:
parameters - the parameters to set

setPopupMode

void setPopupMode(boolean popupMode)
Parameters:
popupMode - the popupMode to set

setRestAction

void setRestAction(RESTAction restAction)
Parameters:
restAction - sets the RES action executed.

setSession

void setSession(IDIFSession session)
Modifier for the session

Parameters:
session - the session to set

setStage

void setStage(String newStage)
Stage modifier.

Parameters:
newStage - the stage to set

setTemplateMode

void setTemplateMode(boolean templateMode)
Parameters:
templateMode - the templateMode to set


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.