|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectPageFlowTagUtils
public class PageFlowTagUtils
This is a utility class for the beehive tags with routines for helping with URL rewriting.
Includes methods to create a fully-rewritten url based on an initial url with query parameters and an anchor (location on page), checking if it needs to be secure and rewriting. There's also a method to check if a url is an action.
| Nested Class Summary | |
|---|---|
static class |
PageFlowTagUtils.MappingAndController
|
| Constructor Summary | |
|---|---|
PageFlowTagUtils()
|
|
| Method Summary | |
|---|---|
static PageFlowTagUtils.MappingAndController |
getActionMapping(HttpServletRequest request,
FlowController flowController,
String action)
|
static String |
getToken(HttpServletRequest request,
ActionMapping mapping)
Get or generate a token used to prevent double submits to an action. |
static String |
getToken(HttpServletRequest request,
String action)
Get or generate a token used to prevent double submits to an action. |
static boolean |
isAction(HttpServletRequest request,
String action)
Determine whether a given URI is an Action. |
static String |
rewriteActionURL(PageContext pageContext,
String action,
Map params,
String location)
Create a fully-rewritten url from an initial action url with query parameters and an anchor (location on page), checking if it needs to be secure then call the rewriter service using a type of URLType.ACTION. |
static String |
rewriteHrefURL(PageContext pageContext,
String url,
Map params,
String location)
Create a fully-rewritten url from an initial href url with query parameters and an anchor (location on page), checking if it needs to be secure then call the rewriter service using a type of URLType.ACTION. |
static String |
rewriteResourceURL(PageContext pageContext,
String url,
Map params,
String location)
Create a fully-rewritten url from an initial resource url with query parameters and an anchor (location on page), checking if it needs to be secure then call the rewriter service using a type of URLType.RESOURCE. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PageFlowTagUtils()
| Method Detail |
|---|
public static String rewriteActionURL(PageContext pageContext,
String action,
Map params,
String location)
throws URISyntaxException
URLType.ACTION.
pageContext - the current PageContext.action - the action url to rewrite.params - the query parameters for this url.location - the location (anchor or fragment) for this url.
URISyntaxException
public static String rewriteHrefURL(PageContext pageContext,
String url,
Map params,
String location)
throws URISyntaxException
URLType.ACTION.
pageContext - the current PageContext.url - the href url to rewrite.params - the query parameters for this url.location - the location (anchor or fragment) for this url.
URISyntaxExceptionPageFlowUtils.getRewrittenHrefURI(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse, String, java.util.Map, String, boolean)
public static String rewriteResourceURL(PageContext pageContext,
String url,
Map params,
String location)
throws URISyntaxException
URLType.RESOURCE.
pageContext - the current PageContext.url - the resource url to rewrite.params - the query parameters for this url.location - the location (anchor or fragment) for this url.
URISyntaxExceptionPageFlowUtils.getRewrittenResourceURI(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse, String, java.util.Map, String, boolean)
public static boolean isAction(HttpServletRequest request,
String action)
request - the current HttpServletRequest.action - the URI to check.
true if the action is defined in the current page flow
or in a shared flow. Otherwise, return false.
public static String getToken(HttpServletRequest request,
String action)
preventDoubleSubmit attribute
set to true.
public static String getToken(HttpServletRequest request,
ActionMapping mapping)
preventDoubleSubmit attribute
set to true.
public static PageFlowTagUtils.MappingAndController getActionMapping(HttpServletRequest request,
FlowController flowController,
String action)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||