jbpm-form-modeler-request-dispatcher 6.2.0.CR4

org.jbpm.formModeler.service.bb.mvc.components
Class URLMarkupGenerator

java.lang.Object
  extended by org.jbpm.formModeler.service.bb.mvc.components.URLMarkupGenerator

@ApplicationScoped
public class URLMarkupGenerator
extends Object


Field Summary
static String COMMAND_RUNNER
           
 
Constructor Summary
URLMarkupGenerator()
           
 
Method Summary
 String getBaseURI()
          Mapping to the controller servlet.
 String getContextHost(javax.servlet.ServletRequest request)
           
 String getMarkup(String bean, String action, Map params)
          Get a link to executing an action on a bean.
protected  String getParameterMarkup(String name, Object value)
           
 String getParamsMarkup(Map params)
          Convert a parameter map (string->string) to its URL form name1=value1&name2=value2 ...
 String getPermanentLink(String bean, String action, Map params)
          Get a permanent link to a given action on a bean
 String getServletMapping()
          Get the base URI for any markup, that is, the base path plus the servlet mapping.
static URLMarkupGenerator lookup()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMAND_RUNNER

public static final String COMMAND_RUNNER
See Also:
Constant Field Values
Constructor Detail

URLMarkupGenerator

public URLMarkupGenerator()
Method Detail

lookup

public static URLMarkupGenerator lookup()

getPermanentLink

public String getPermanentLink(String bean,
                               String action,
                               Map params)
Get a permanent link to a given action on a bean

Parameters:
bean - Bean handler that will perform the action
action - Bean's method that will be invoked
params - Extra parameters for link
Returns:
A link url to a bean action, independent on the page.

getServletMapping

public String getServletMapping()
Get the base URI for any markup, that is, the base path plus the servlet mapping. Any uri constructed on top of it will go to the Controller servlet

Returns:
the base URI for any markup

getBaseURI

public String getBaseURI()
Mapping to the controller servlet. By default it is Controller, but in case there is friendly url, can be replaced by workspace/<friendly_url> It is NOT preceded by "/"

Returns:
Mapping to the controller servlet.

getMarkup

public String getMarkup(String bean,
                        String action,
                        Map params)
Get a link to executing an action on a bean.


getParamsMarkup

public String getParamsMarkup(Map params)
Convert a parameter map (string->string) to its URL form name1=value1&name2=value2 ...

Parameters:
params - parameter map to process.
Returns:
A String representation for the received parameter map

getParameterMarkup

protected String getParameterMarkup(String name,
                                    Object value)

getContextHost

public String getContextHost(javax.servlet.ServletRequest request)

jbpm-form-modeler-request-dispatcher 6.2.0.CR4

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.