public class BrowserBindingUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BrowserBindingUtils.CallUrl |
Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT_BASETYPE_ID |
static String |
CONTEXT_OBJECT_ID |
static String |
CONTEXT_OBJECT_TYPE_ID |
static String |
CONTEXT_TRANSACTION |
static String |
HTML_MIME_TYPE |
static String |
JSON_MIME_TYPE |
static String |
ROOT_PATH_FRAGMENT |
Modifier and Type | Method and Description |
---|---|
static org.apache.chemistry.opencmis.commons.impl.UrlBuilder |
compileBaseUrl(javax.servlet.http.HttpServletRequest request)
Compiles the base URL for links, collections and templates.
|
static org.apache.chemistry.opencmis.commons.impl.UrlBuilder |
compileRepositoryUrl(javax.servlet.http.HttpServletRequest request,
String repositoryId) |
static org.apache.chemistry.opencmis.commons.impl.UrlBuilder |
compileRootUrl(javax.servlet.http.HttpServletRequest request,
String repositoryId) |
static org.apache.chemistry.opencmis.commons.data.Acl |
createAddAcl(ControlParser controlParser) |
static org.apache.chemistry.opencmis.commons.data.ContentStream |
createContentStream(javax.servlet.http.HttpServletRequest request) |
static String |
createCookieValue(int code,
String objectId,
String ex,
String message) |
static List<String> |
createPolicies(ControlParser controlParser) |
static org.apache.chemistry.opencmis.commons.data.Properties |
createProperties(ControlParser controlParser,
String typeId,
org.apache.chemistry.opencmis.commons.impl.TypeCache typeCache) |
static org.apache.chemistry.opencmis.commons.data.Acl |
createRemoveAcl(ControlParser controlParser) |
static void |
deleteCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String repositoryId,
String transaction)
Deletes a transaction cookie.
|
static String |
getCookieName(String transaction)
Transforms the transaction into a cookie name.
|
static String |
getPath(javax.servlet.http.HttpServletRequest request)
Returns the current CMIS path.
|
static <T> T |
getProperty(org.apache.chemistry.opencmis.commons.data.ObjectData object,
String name,
Class<T> clazz)
Extracts a property from an object.
|
protected static org.apache.chemistry.opencmis.commons.data.ObjectData |
getSimpleObject(org.apache.chemistry.opencmis.commons.server.CmisService service,
String repositoryId,
String objectId) |
static void |
prepareContext(org.apache.chemistry.opencmis.commons.server.CallContext context,
BrowserBindingUtils.CallUrl callUrl,
org.apache.chemistry.opencmis.commons.server.CmisService service,
String repositoryId,
String objectId,
String transaction,
javax.servlet.http.HttpServletRequest request)
Returns the object id of the current request.
|
static void |
setCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String repositoryId,
String transaction,
String value)
Sets a transaction cookie.
|
static void |
setCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String repositoryId,
String transaction,
String value,
int expiry)
Sets a transaction cookie.
|
static void |
setStatus(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
int statusCode)
Sets the given HTTP status code if the surpessResponseCodes parameter is
not set to true; otherwise sets HTTP status code 200 (OK).
|
static void |
writeEmpty(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static void |
writeJSON(org.apache.chemistry.opencmis.commons.impl.json.JSONStreamAware json,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Writes JSON to the servlet response and adds a callback wrapper if
requested.
|
public static final String JSON_MIME_TYPE
public static final String HTML_MIME_TYPE
public static final String ROOT_PATH_FRAGMENT
public static final String CONTEXT_OBJECT_ID
public static final String CONTEXT_OBJECT_TYPE_ID
public static final String CONTEXT_BASETYPE_ID
public static final String CONTEXT_TRANSACTION
public static org.apache.chemistry.opencmis.commons.impl.UrlBuilder compileBaseUrl(javax.servlet.http.HttpServletRequest request)
public static org.apache.chemistry.opencmis.commons.impl.UrlBuilder compileRepositoryUrl(javax.servlet.http.HttpServletRequest request, String repositoryId)
public static org.apache.chemistry.opencmis.commons.impl.UrlBuilder compileRootUrl(javax.servlet.http.HttpServletRequest request, String repositoryId)
public static String getPath(javax.servlet.http.HttpServletRequest request)
public static void prepareContext(org.apache.chemistry.opencmis.commons.server.CallContext context, BrowserBindingUtils.CallUrl callUrl, org.apache.chemistry.opencmis.commons.server.CmisService service, String repositoryId, String objectId, String transaction, javax.servlet.http.HttpServletRequest request)
public static <T> T getProperty(org.apache.chemistry.opencmis.commons.data.ObjectData object, String name, Class<T> clazz)
public static org.apache.chemistry.opencmis.commons.data.Properties createProperties(ControlParser controlParser, String typeId, org.apache.chemistry.opencmis.commons.impl.TypeCache typeCache)
public static List<String> createPolicies(ControlParser controlParser)
public static org.apache.chemistry.opencmis.commons.data.Acl createAddAcl(ControlParser controlParser)
public static org.apache.chemistry.opencmis.commons.data.Acl createRemoveAcl(ControlParser controlParser)
public static org.apache.chemistry.opencmis.commons.data.ContentStream createContentStream(javax.servlet.http.HttpServletRequest request)
protected static org.apache.chemistry.opencmis.commons.data.ObjectData getSimpleObject(org.apache.chemistry.opencmis.commons.server.CmisService service, String repositoryId, String objectId)
public static void setStatus(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, int statusCode)
public static String getCookieName(String transaction)
public static void setCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String repositoryId, String transaction, String value)
public static void deleteCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String repositoryId, String transaction)
public static void setCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String repositoryId, String transaction, String value, int expiry)
public static String createCookieValue(int code, String objectId, String ex, String message)
public static void writeJSON(org.apache.chemistry.opencmis.commons.impl.json.JSONStreamAware json, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
public static void writeEmpty(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
Copyright © 2018 City of Paris. All rights reserved.