pt.digitalis.dif.controller.objects
Class DIFRequest

java.lang.Object
  extended by pt.digitalis.dif.controller.objects.DIFRequest
All Implemented Interfaces:
IDIFRequest

public class DIFRequest
extends Object
implements IDIFRequest

Implementation for IDIFRequest.

Author:
Rodrigo Gonçalves rgoncalves@digitalis.pt, Luis Pinto lpinto@digitalis.pt
Created on:
2007/03/16

Field Summary
static String ORIGINAL_REQUEST
          The key to the original request stored as an attribute.
 
Fields inherited from interface pt.digitalis.dif.controller.interfaces.IDIFRequest
CLIENT_VALIDATIONS_ATTRIBUTE_ID, LOG_PARAMETER_ID, LOGIN_PARAMETER_ID, LOGOUT_PARAMETER_ID, PASSWORD_PARAMETER_ID, REDIRECT_TO_URL, USER_PARAMETER_ID
 
Constructor Summary
DIFRequest()
           
 
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()
          Inspector for the 'restCall' attribute.
 boolean isTemplateMode()
           
 void setAjaxMode(boolean ajaxMode)
          Modifier for the 'ajaxMode' attribute.
 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 setRestCall(boolean restCall)
          Modifier for the 'restCall' attribute.
 void setSession(IDIFSession session)
          Modifier for the session
 void setStage(String newStage)
          Stage modifier.
 void setTemplateMode(boolean templateMode)
           
 String toString()
          Returns the Request object in a human-readable form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ORIGINAL_REQUEST

public static final String ORIGINAL_REQUEST
The key to the original request stored as an attribute.

See Also:
Constant Field Values
Constructor Detail

DIFRequest

public DIFRequest()
Method Detail

addAttribute

public void addAttribute(String attributeName,
                         Object attributeValue)
Description copied from interface: IDIFRequest
Adds a new attribute to the DIFRequest collection.

Specified by:
addAttribute in interface IDIFRequest
Parameters:
attributeName - attribute identifier
attributeValue - attribute value
See Also:
IDIFRequest.addAttribute(String, Object)

addParameter

public void addParameter(String parameterName,
                         Object parameterValue)
Description copied from interface: IDIFRequest
Adds a new parameter to the DIFRequest collection.

Specified by:
addParameter in interface IDIFRequest
Parameters:
parameterName - parameter identifier
parameterValue - parameter value
See Also:
IDIFRequest.addParameter(String, Object)

getAttribute

public Object getAttribute(String name)
Description copied from interface: IDIFRequest
Retrieves an attribute from the attribute collection

Specified by:
getAttribute in interface IDIFRequest
Parameters:
name - the name of the attribute to retrieve
Returns:
on Object with the attribute value
See Also:
IDIFRequest.getAttribute(java.lang.String)

getAttributes

public Map<String,Object> getAttributes()
Description copied from interface: IDIFRequest
Inspector for the request parameters.

Specified by:
getAttributes in interface IDIFRequest
Returns:
the request attributes
See Also:
IDIFRequest.getAttributes()

getClient

public ClientDescriptor getClient()
Description copied from interface: IDIFRequest
Inspector for the client descriptor.

Specified by:
getClient in interface IDIFRequest
Returns:
the client descriptor
See Also:
IDIFRequest.getClient()

getFormat

public String getFormat()
Description copied from interface: IDIFRequest
Format inspector.

Specified by:
getFormat in interface IDIFRequest
Returns:
the format
See Also:
IDIFRequest.getFormat()

getParameter

public Object getParameter(String name)
Description copied from interface: IDIFRequest
Retrieves a parameter from the parameter collection

Specified by:
getParameter in interface IDIFRequest
Parameters:
name - the name of the parameter to retrieve
Returns:
on Object with the parameter value
See Also:
IDIFRequest.getParameter(java.lang.String)

getParameters

public Map<String,Object> getParameters()
Description copied from interface: IDIFRequest
Inspector for the request parameters.

Specified by:
getParameters in interface IDIFRequest
Returns:
the request parameters
See Also:
IDIFRequest.getParameters()

getRestAction

public RESTAction getRestAction()
Specified by:
getRestAction in interface IDIFRequest
Returns:
the REST action executed, if specified.
See Also:
IDIFRequest.getRestAction()

getSession

public IDIFSession getSession()
Description copied from interface: IDIFRequest
Inspector for the session.

Specified by:
getSession in interface IDIFRequest
Returns:
the session
See Also:
IDIFRequest.getSession()

getStage

public String getStage()
Description copied from interface: IDIFRequest
Stage inspector.

Specified by:
getStage in interface IDIFRequest
Returns:
the stage
See Also:
IDIFRequest.getStage()

getStageProxy

public IStage getStageProxy()
Description copied from interface: IDIFRequest
Stage inspector.

Specified by:
getStageProxy in interface IDIFRequest
Returns:
the stage proxy
See Also:
IDIFRequest.getStageProxy()

isAjaxMode

public boolean isAjaxMode()
Specified by:
isAjaxMode in interface IDIFRequest
Returns:
T if current stage has been requested in ajax mode
See Also:
IDIFRequest.isAjaxMode()

isComponentMode

public boolean isComponentMode()
Specified by:
isComponentMode in interface IDIFRequest
Returns:
T if current stage has been requested in component mode
See Also:
IDIFRequest.isComponentMode()

isHelpMode

public boolean isHelpMode()
Specified by:
isHelpMode in interface IDIFRequest
Returns:
T if current stage has been requested in help mode
See Also:
IDIFRequest.isHelpMode()

isPopupMode

public boolean isPopupMode()
Specified by:
isPopupMode in interface IDIFRequest
Returns:
T if current stage has been requested in popup mode
See Also:
IDIFRequest.isPopupMode()

isRestCall

public boolean isRestCall()
Inspector for the 'restCall' attribute.

Specified by:
isRestCall in interface IDIFRequest
Returns:
the restCall value

isTemplateMode

public boolean isTemplateMode()
Specified by:
isTemplateMode in interface IDIFRequest
Returns:
T if current stage has been requested in template mode
See Also:
IDIFRequest.isTemplateMode()

setAjaxMode

public void setAjaxMode(boolean ajaxMode)
Modifier for the 'ajaxMode' attribute.

Parameters:
ajaxMode - the new ajaxMode value to set

setAttributes

public void setAttributes(Map<String,Object> attributes)
Description copied from interface: IDIFRequest
Modifier for the request attributes.

Specified by:
setAttributes in interface IDIFRequest
Parameters:
attributes - the attributes to set
See Also:
IDIFRequest.setAttributes(Map)

setClient

public void setClient(ClientDescriptor client)
Specified by:
setClient in interface IDIFRequest
Parameters:
client - the client to set
See Also:
IDIFRequest.setClient(ClientDescriptor)

setComponentMode

public void setComponentMode(boolean componentMode)
Specified by:
setComponentMode in interface IDIFRequest
Parameters:
componentMode - the componentMode to set
See Also:
IDIFRequest.setComponentMode(boolean)

setFormat

public void setFormat(String format)
Description copied from interface: IDIFRequest
Format modifier.

Specified by:
setFormat in interface IDIFRequest
Parameters:
format - the format to set
See Also:
IDIFRequest.setFormat(java.lang.String)

setHelpMode

public void setHelpMode(boolean helpMode)
Specified by:
setHelpMode in interface IDIFRequest
Parameters:
helpMode - the helpMode to set
See Also:
IDIFRequest.setHelpMode(boolean)

setParameters

public void setParameters(Map<String,Object> parameters)
Description copied from interface: IDIFRequest
Modifier for the request parameters.

Specified by:
setParameters in interface IDIFRequest
Parameters:
parameters - the parameters to set
See Also:
IDIFRequest.setParameters(Map)

setPopupMode

public void setPopupMode(boolean popupMode)
Specified by:
setPopupMode in interface IDIFRequest
Parameters:
popupMode - the popupMode to set
See Also:
IDIFRequest.setPopupMode(boolean)

setRestAction

public void setRestAction(RESTAction restAction)
Specified by:
setRestAction in interface IDIFRequest
Parameters:
restAction - sets the RES action executed.
See Also:
IDIFRequest.setRestAction(pt.digitalis.dif.controller.objects.RESTAction)

setRestCall

public void setRestCall(boolean restCall)
Modifier for the 'restCall' attribute.

Parameters:
restCall - the new restCall value to set

setSession

public void setSession(IDIFSession session)
Description copied from interface: IDIFRequest
Modifier for the session

Specified by:
setSession in interface IDIFRequest
Parameters:
session - the session to set
See Also:
IDIFRequest.setSession(pt.digitalis.dif.controller.interfaces.IDIFSession)

setStage

public void setStage(String newStage)
Description copied from interface: IDIFRequest
Stage modifier.

Specified by:
setStage in interface IDIFRequest
Parameters:
newStage - the stage to set
See Also:
IDIFRequest.setStage(String)

setTemplateMode

public void setTemplateMode(boolean templateMode)
Specified by:
setTemplateMode in interface IDIFRequest
Parameters:
templateMode - the templateMode to set
See Also:
IDIFRequest.setTemplateMode(boolean)

toString

public String toString()
Returns the Request object in a human-readable form.

Overrides:
toString in class Object
See Also:
Object.toString()


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