fuego.workspace
Class UrlActions

java.lang.Object
  extended by fuego.workspace.UrlActions

public class UrlActions
extends java.lang.Object


Field Summary
static java.lang.String ACTIVITY_ID
          activityId request attribute.
static java.lang.String ACTIVITY_NAME
          activity request attribute.
static java.lang.String FILE_NAME
          fileName request attribute.
static java.lang.String INSTANCE_ID
          instanceId request attribute.
static java.lang.String INSTANCE_STAMP_ID
          instanceStampId request attribute.
static java.lang.String ITEM_ID
          itemId request attribute.
static java.lang.String PARTICIPANT_ID
          participantId request attribute.
static java.lang.String PROCESS_ID
          processId request attribute.
static java.lang.String TASK_IN
          taskIn request attribute.
static java.lang.String URL_DOWNLOAD_ATTACHMENT
           
static java.lang.String URL_EXECUTOR
           
static java.lang.String URL_IMAGE
           
static java.lang.String URL_WAPI
           
static java.lang.String WAPI_SESSION_ID
           
 
Constructor Summary
UrlActions()
           
 
Method Summary
static fuego.web.view.ImagePath activityImagePath(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String activityId, boolean thumbnail, javax.servlet.ServletContext servletContext)
          Gets the needed image file PATH to be assigned to an IMG SRC in order to show the activity image.
static java.lang.String deriveActionToForward(javax.servlet.http.HttpServletRequest req, java.lang.String url)
           
static java.lang.String downloadAttachment()
          Returns an URL to download an specified attachment of an instance.
static java.lang.String extractWAPISessionId(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String forwardComponentRedirectAction(java.lang.String targetAction)
           
static java.lang.String forwardComponentResultAction()
           
static java.lang.String getCurrentWAPISessionId(javax.servlet.http.HttpServletRequest request)
           
static java.lang.String getWAPISessionId()
          Returns the needed URL to get the current WAPI session ID.
static java.lang.String goComponentRedirectAction(java.lang.String targetAction, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static java.lang.String runApplication()
          Returns the needed URL to run an application.
static java.lang.String runApplication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String activityId)
          Returns the needed URL to run an application.
static java.lang.String runApplication(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, java.lang.String activityId)
          Returns the needed URL to run an application.
static java.lang.String runApplicationTask()
          Returns the needed URL to run an application with instance access.
static java.lang.String runApplicationTask(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String instanceStampId, java.lang.String activityId)
          Returns the needed URL to run an application with instance access.
static java.lang.String runExternalTask(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String externalUrl, java.lang.String activityName, java.lang.String instanceId, int itemId, java.lang.String participantId)
          Returns the needed URL to run an instance task
static java.lang.String runTask()
          Returns the needed URL to run an instance task.
static java.lang.String runTask(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String instanceStampId, int itemId)
          Returns the needed URL to run an instance task
static java.lang.String showAuditTrailImage()
          Returns the URL of the audit trail image servlet.
static java.lang.String showAuditTrailImage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String processId, java.lang.String instanceId)
          Returns the URL of the audit trail image servlet.
static java.lang.String showDownloadPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Returns the URL of the download servlet.
static java.lang.String showPapiAttachmentDownloadPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static java.lang.String showProcessImage()
          Returns the URL of the activity image servlet.
static java.lang.String showProcessImage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String processId)
          Returns the URL of the activity image servlet.
static java.lang.String showProcessImage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String processId, java.lang.String instanceId)
          Returns the URL of the activity image servlet.
static java.lang.String showWorkloadImage()
          Returns the URL of the workload image servlet.
static java.lang.String showWorkloadImage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String processId)
          Returns the URL of the workload image servlet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WAPI_SESSION_ID

public static final java.lang.String WAPI_SESSION_ID
See Also:
Constant Field Values

URL_EXECUTOR

public static final java.lang.String URL_EXECUTOR
See Also:
Constant Field Values

URL_IMAGE

public static final java.lang.String URL_IMAGE
See Also:
Constant Field Values

URL_DOWNLOAD_ATTACHMENT

public static final java.lang.String URL_DOWNLOAD_ATTACHMENT
See Also:
Constant Field Values

URL_WAPI

public static final java.lang.String URL_WAPI
See Also:
Constant Field Values

ACTIVITY_ID

public static final java.lang.String ACTIVITY_ID
activityId request attribute.

See Also:
Constant Field Values

ACTIVITY_NAME

public static final java.lang.String ACTIVITY_NAME
activity request attribute.

See Also:
Constant Field Values

INSTANCE_STAMP_ID

public static final java.lang.String INSTANCE_STAMP_ID
instanceStampId request attribute.

See Also:
Constant Field Values

INSTANCE_ID

public static final java.lang.String INSTANCE_ID
instanceId request attribute.

See Also:
Constant Field Values

ITEM_ID

public static final java.lang.String ITEM_ID
itemId request attribute.

See Also:
Constant Field Values

PROCESS_ID

public static final java.lang.String PROCESS_ID
processId request attribute.

See Also:
Constant Field Values

PARTICIPANT_ID

public static final java.lang.String PARTICIPANT_ID
participantId request attribute.

See Also:
Constant Field Values

TASK_IN

public static final java.lang.String TASK_IN
taskIn request attribute.

See Also:
Constant Field Values

FILE_NAME

public static final java.lang.String FILE_NAME
fileName request attribute.

See Also:
Constant Field Values
Constructor Detail

UrlActions

public UrlActions()
Method Detail

getWAPISessionId

public static java.lang.String getWAPISessionId()
Returns the needed URL to get the current WAPI session ID.

Returns:
A String containing the URL that must be requested by any method to get the current WAPI session ID.

runApplication

public static java.lang.String runApplication(javax.portlet.PortletRequest request,
                                              javax.portlet.PortletResponse response,
                                              java.lang.String activityId)
Returns the needed URL to run an application.

Parameters:
request - the PortletRequest associated with the HTTP request.
response - the PortletResponse associated with the HTTP response.
activityId - The application's activity ID.
Returns:
A String containing the URL that must be requested by any method to run an application.

runApplication

public static java.lang.String runApplication(javax.servlet.http.HttpServletRequest request,
                                              javax.servlet.http.HttpServletResponse response,
                                              java.lang.String activityId)
Returns the needed URL to run an application.

Parameters:
request - the HttpServletRequest associated with the HTTP request.
response - the HttpServletResponse associated with the HTTP response.
activityId - The application's activity ID.
Returns:
A String containing the URL that must be requested by any method to run an application.

runApplication

public static java.lang.String runApplication()
Returns the needed URL to run an application.

It is necessary to append the following parameters to the URL provided by this method.

Returns:
A String containing the URL that must be requested by any method to run an application.

runApplicationTask

public static java.lang.String runApplicationTask(javax.servlet.http.HttpServletRequest request,
                                                  javax.servlet.http.HttpServletResponse response,
                                                  java.lang.String instanceStampId,
                                                  java.lang.String activityId)
Returns the needed URL to run an application with instance access.

Parameters:
request - the HttpServletRequest associated with the HTTP request.
response - the HttpServletResponse associated with the HTTP response.
instanceStampId - The instance ID
activityId - The application's activity ID
Returns:
A String containing the URL that must be requested by any method to run an application with instance access.

runApplicationTask

public static java.lang.String runApplicationTask()
Returns the needed URL to run an application with instance access.

It is necessary to append the following parameters to the URL provided by this method.

Returns:
A String containing the URL that must be requested by any method to run an application with instance access.

runTask

public static java.lang.String runTask(javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response,
                                       java.lang.String instanceStampId,
                                       int itemId)
Returns the needed URL to run an instance task

Parameters:
request - the HttpServletRequest associated with the HTTP request.
response - the HttpServletResponse associated with the HTTP response.
instanceStampId - The instance ID.
itemId - The task ID.
Returns:
A String containing the URL that must be requested by any method to run an instance task.

runExternalTask

public static java.lang.String runExternalTask(javax.servlet.http.HttpServletRequest request,
                                               javax.servlet.http.HttpServletResponse response,
                                               java.lang.String externalUrl,
                                               java.lang.String activityName,
                                               java.lang.String instanceId,
                                               int itemId,
                                               java.lang.String participantId)
Returns the needed URL to run an instance task

Parameters:
request - the HttpServletRequest associated with the HTTP request.
response - the HttpServletResponse associated with the HTTP response.
externalUrl - The external URL to be called.
activityName - The activity name.
instanceId - The instance ID.
itemId - The task ID.
participantId - The participant ID.
Returns:
A String containing the URL that must be requested by any method to run an external instance task.

runTask

public static java.lang.String runTask()
Returns the needed URL to run an instance task.

It is necessary to append the following parameters to the URL provided by this method.

Returns:
A String containing the URL that must be requested by any method to run an instance task.

forwardComponentRedirectAction

public static java.lang.String forwardComponentRedirectAction(java.lang.String targetAction)

forwardComponentResultAction

public static java.lang.String forwardComponentResultAction()

goComponentRedirectAction

public static java.lang.String goComponentRedirectAction(java.lang.String targetAction,
                                                         javax.servlet.http.HttpServletRequest request,
                                                         javax.servlet.http.HttpServletResponse response)

activityImagePath

public static fuego.web.view.ImagePath activityImagePath(javax.servlet.http.HttpServletRequest request,
                                                         javax.servlet.http.HttpServletResponse response,
                                                         java.lang.String activityId,
                                                         boolean thumbnail,
                                                         javax.servlet.ServletContext servletContext)
Gets the needed image file PATH to be assigned to an IMG SRC in order to show the activity image.

Parameters:
request - the HttpServletRequest associated with the HTTP request.
response - the HttpServletResponse associated with the HTTP response.
activityId - the id of the activity whose image is to be sown
thumbnail - image?
servletContext - the ServletContext associated with the context.
Returns:
a String containing the path to the activity image file

showWorkloadImage

public static java.lang.String showWorkloadImage(javax.servlet.http.HttpServletRequest request,
                                                 javax.servlet.http.HttpServletResponse response,
                                                 java.lang.String processId)
Returns the URL of the workload image servlet. This servlet renders the image of the given process with the activity workload.

Parameters:
request - the HttpServletRequest associated with the HTTP request.
response - the HttpServletResponse associated with the HTTP response.
processId - the id of the process to be rendered
Returns:
a String containing the path to the process image file

showWorkloadImage

public static java.lang.String showWorkloadImage()
Returns the URL of the workload image servlet.

It is necessary to append the following parameters to the URL provided by this method.

This servlet renders the image of the given process with the activity workload. The request must have the processId (UrlActions.PROCESS_ID attribute setted.

Returns:
a String containing the path to the process image file

showAuditTrailImage

public static java.lang.String showAuditTrailImage(javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response,
                                                   java.lang.String processId,
                                                   java.lang.String instanceId)
Returns the URL of the audit trail image servlet. This servlet renders the image of the given process and highlights the path of the given instance.

Parameters:
request - the HttpServletRequest associated with the HTTP request.
response - the HttpServletResponse associated with the HTTP response.
processId - the id of the process to be rendered
instanceId - the id of the instance to highlight in the image
Returns:
a String containing the path to the process image file

showAuditTrailImage

public static java.lang.String showAuditTrailImage()
Returns the URL of the audit trail image servlet. This servlet renders the image of the given process and highlights the path of the given instance.

It is necessary to append the following parameters to the URL provided by this method.

Returns:
a String containing the path to the process image file

showProcessImage

public static java.lang.String showProcessImage(javax.servlet.http.HttpServletRequest request,
                                                javax.servlet.http.HttpServletResponse response,
                                                java.lang.String processId)
Returns the URL of the activity image servlet. This servlet renders the image of the given activity.

Parameters:
request - the HttpServletRequest associated with the HTTP request.
response - the HttpServletResponse associated with the HTTP response.
processId - the id of the process to be rendered
Returns:
a String containing the path to the process image file

showProcessImage

public static java.lang.String showProcessImage(javax.servlet.http.HttpServletRequest request,
                                                javax.servlet.http.HttpServletResponse response,
                                                java.lang.String processId,
                                                java.lang.String instanceId)
Returns the URL of the activity image servlet. This servlet renders the image of the given process and highlights the given instance.

Parameters:
request - the HttpServletRequest associated with the HTTP request.
response - the HttpServletResponse associated with the HTTP response.
processId - the id of the process to be rendered
instanceId - the id of the instance to highlight in the image
Returns:
a String containing the path to the process image file

showProcessImage

public static java.lang.String showProcessImage()
Returns the URL of the activity image servlet. This servlet renders the image of the given process and highlights the given instance.

It is necessary to append the following parameters to the URL provided by this method.

Returns:
a String containing the path to the process image file

showDownloadPage

public static java.lang.String showDownloadPage(javax.servlet.http.HttpServletRequest request,
                                                javax.servlet.http.HttpServletResponse response)
Returns the URL of the download servlet. This servlet renders the attachment file. It's expected that the request has this attributes set: fileName (filename that will be show to the user), contentType (the file's content type) and fileStream (InputStream to read and write the response)

Parameters:
request - the HttpServletRequest associated with the HTTP request.
response - the HttpServletResponse associated with the HTTP response.
Returns:
a String containing the URL of the download servlet

showPapiAttachmentDownloadPage

public static java.lang.String showPapiAttachmentDownloadPage(javax.servlet.http.HttpServletRequest request,
                                                              javax.servlet.http.HttpServletResponse response)

downloadAttachment

public static java.lang.String downloadAttachment()
Returns an URL to download an specified attachment of an instance. It's expected that the request has this attributes set: instanceId (the instanceId of the instance that has the attachment) fileName (filename that will be show to the user)

Returns:
a String containing the URL of the download servlet

deriveActionToForward

public static java.lang.String deriveActionToForward(javax.servlet.http.HttpServletRequest req,
                                                     java.lang.String url)

getCurrentWAPISessionId

public static java.lang.String getCurrentWAPISessionId(javax.servlet.http.HttpServletRequest request)

extractWAPISessionId

public static java.lang.String extractWAPISessionId(javax.servlet.http.HttpServletRequest request)