|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.platform.ui.web.rest.services.URLPolicyServiceImpl
public class URLPolicyServiceImpl
Field Summary | |
---|---|
static java.lang.String |
NAME
|
Fields inherited from interface org.nuxeo.ecm.platform.ui.web.rest.api.URLPolicyService |
---|
DISABLE_REDIRECT_REQUEST_KEY, DOCUMENT_VIEW_REQUEST_KEY, FORCE_URL_ENCODING_REQUEST_KEY, POST_OUTCOME_REQUEST_KEY |
Constructor Summary | |
---|---|
URLPolicyServiceImpl()
|
Method Summary | |
---|---|
void |
addPatternDescriptor(URLPatternDescriptor pattern)
|
void |
appendParametersToRequest(javax.faces.context.FacesContext facesContext)
Appends parameters to request so that the model can be restored after request. |
void |
appendParametersToRequest(javax.faces.context.FacesContext facesContext,
java.lang.String pattern)
|
void |
applyRequestParameters(javax.faces.context.FacesContext facesContext)
Extracts parameters from request attributes. |
void |
clear()
|
java.lang.String |
getDefaultPatternName()
|
DocumentView |
getDocumentViewFromRequest(javax.servlet.http.HttpServletRequest request)
Builds the document view from request information. |
DocumentView |
getDocumentViewFromRequest(java.lang.String patternName,
javax.servlet.http.HttpServletRequest request)
Builds the document view from request information. |
java.lang.String |
getUrlFromDocumentView(DocumentView docView,
java.lang.String baseUrl)
Returns a URL given a document view. |
java.lang.String |
getUrlFromDocumentView(java.lang.String patternName,
DocumentView docView,
java.lang.String baseUrl)
Returns a URL given a document view. |
boolean |
isCandidateForDecoding(javax.servlet.http.HttpServletRequest httpRequest)
Returns true if request is a GET request and filter preprocessing is turned on. |
boolean |
isCandidateForEncoding(javax.servlet.http.HttpServletRequest httpRequest)
Returns true if request is a POST request and filter redirection is turned on. |
java.lang.String |
navigate(javax.faces.context.FacesContext facesContext)
Performs redirection action. |
void |
removePatternDescriptor(URLPatternDescriptor pattern)
|
void |
setDocumentViewInRequest(javax.servlet.http.HttpServletRequest request,
DocumentView docView)
Adds document view to the request for later retrieval. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NAME
Constructor Detail |
---|
public URLPolicyServiceImpl()
Method Detail |
---|
public java.lang.String getDefaultPatternName()
getDefaultPatternName
in interface URLPolicyService
public boolean isCandidateForDecoding(javax.servlet.http.HttpServletRequest httpRequest)
URLPolicyService
isCandidateForDecoding
in interface URLPolicyService
public boolean isCandidateForEncoding(javax.servlet.http.HttpServletRequest httpRequest)
URLPolicyService
isCandidateForEncoding
in interface URLPolicyService
public void setDocumentViewInRequest(javax.servlet.http.HttpServletRequest request, DocumentView docView)
URLPolicyService
setDocumentViewInRequest
in interface URLPolicyService
request
- the current request.docView
- to savepublic DocumentView getDocumentViewFromRequest(javax.servlet.http.HttpServletRequest request)
URLPolicyService
Delegates call to a document view codec found thanks to the default URL pattern descriptor.
getDocumentViewFromRequest
in interface URLPolicyService
public DocumentView getDocumentViewFromRequest(java.lang.String patternName, javax.servlet.http.HttpServletRequest request)
URLPolicyService
Delegates call to a document view codec found thanks given pattern name.
getDocumentViewFromRequest
in interface URLPolicyService
public java.lang.String getUrlFromDocumentView(DocumentView docView, java.lang.String baseUrl)
URLPolicyService
Delegates call to a document view codec found thanks to the default URL pattern descriptor.
getUrlFromDocumentView
in interface URLPolicyService
public java.lang.String getUrlFromDocumentView(java.lang.String patternName, DocumentView docView, java.lang.String baseUrl)
URLPolicyService
Delegates call to a document view codec found thanks given pattern name.
getUrlFromDocumentView
in interface URLPolicyService
public void applyRequestParameters(javax.faces.context.FacesContext facesContext)
URLPolicyService
Apply them to the model using EL value bindings described on URL pattern descriptors.
We look for binding values to set on the request attribute and on the document view parameters.
applyRequestParameters
in interface URLPolicyService
public void appendParametersToRequest(javax.faces.context.FacesContext facesContext)
URLPolicyService
Extract them using EL value bindings described on URL pattern descriptors.
If the document view is not null, values are set on its parameters. If the document view is null, values are set on the request parameters.
appendParametersToRequest
in interface URLPolicyService
public void appendParametersToRequest(javax.faces.context.FacesContext facesContext, java.lang.String pattern)
public java.lang.String navigate(javax.faces.context.FacesContext facesContext)
URLPolicyService
Extract it using an EL action binding described on URL pattern descriptors.
The action binding is called using given document view as parameter. If a sub URI is found, do nothing (may be an invalid resource URL).
navigate
in interface URLPolicyService
public void addPatternDescriptor(URLPatternDescriptor pattern)
addPatternDescriptor
in interface URLPolicyService
public void removePatternDescriptor(URLPatternDescriptor pattern)
removePatternDescriptor
in interface URLPolicyService
public void clear()
clear
in interface URLPolicyService
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |