Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.ui.web.rest
Class RestHelper

java.lang.Object
  extended by org.nuxeo.ecm.platform.ui.web.rest.RestHelper
All Implemented Interfaces:
java.io.Serializable

@Name(value="restHelper")
@Scope(value=EVENT)
public class RestHelper
extends java.lang.Object
implements java.io.Serializable

Helper for generation of URLs and related update of document context.

Author:
tiry, Anahide Tchertchian, Florent Guillaume
See Also:
Serialized Form

Constructor Summary
RestHelper()
           
 
Method Summary
static java.lang.String addCurrentConversationParameters(java.lang.String url)
          Adds current conversation request parameters to the given url.
static java.lang.String addMainConversationParameters(java.lang.String url)
          Adds main conversation request parameters to the given url.
 java.lang.String getBaseURL()
           
 java.lang.String getContextPath()
           
static Manager getConversationManager()
           
 DocumentView getDocumentView()
           
 DocumentView getNewDocumentView()
           
 java.lang.String initContextFromRestRequest(DocumentView docView)
          Sets current server location (core repository) and core document as provided by the document view.
 void setDocumentView(DocumentView docView)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestHelper

public RestHelper()
Method Detail

initContextFromRestRequest

@Begin(id="#{conversationIdGenerator.currentOrNewMainConversationId}",
       join=true)
public java.lang.String initContextFromRestRequest(DocumentView docView)
                                            throws ClientException
Sets current server location (core repository) and core document as provided by the document view.

Only sets current server location if the document reference is null.

Throws:
ClientException

setDocumentView

public void setDocumentView(DocumentView docView)

getNewDocumentView

public DocumentView getNewDocumentView()

getDocumentView

public DocumentView getDocumentView()

getConversationManager

public static Manager getConversationManager()
Returns:
the Seam conversation manager.

addCurrentConversationParameters

public static java.lang.String addCurrentConversationParameters(java.lang.String url)
Adds current conversation request parameters to the given url.

Parameters:
url -
Returns:
the url with additional conversation request parameters

addMainConversationParameters

public static java.lang.String addMainConversationParameters(java.lang.String url)
Adds main conversation request parameters to the given url.

Parameters:
url -
Returns:
the url with additional conversation request parameters

getBaseURL

@Factory(value="baseURL",
         scope=CONVERSATION)
public java.lang.String getBaseURL()

getContextPath

@Factory(value="contextPath",
         scope=CONVERSATION)
public java.lang.String getContextPath()

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.