public final 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_TOKEN |
static String |
HTML_MIME_TYPE |
static String |
JSON_MIME_TYPE |
static String |
ROOT_PATH_FRAGMENT |
Modifier and Type | Method and Description |
---|---|
static UrlBuilder |
compileBaseUrl(javax.servlet.http.HttpServletRequest request)
Compiles the base URL for links, collections and templates.
|
static UrlBuilder |
compileRepositoryUrl(javax.servlet.http.HttpServletRequest request,
String repositoryId) |
static UrlBuilder |
compileRootUrl(javax.servlet.http.HttpServletRequest request,
String repositoryId) |
static Acl |
createAddAcl(ControlParser controlParser) |
static ContentStream |
createContentStream(javax.servlet.http.HttpServletRequest request) |
static String |
createCookieValue(int code,
String objectId,
String ex,
String message) |
static Properties |
createNewProperties(ControlParser controlParser,
TypeCache typeCache) |
static List<String> |
createPolicies(ControlParser controlParser) |
static Acl |
createRemoveAcl(ControlParser controlParser) |
static Properties |
createUpdateProperties(ControlParser controlParser,
String typeId,
List<String> secondaryTypeIds,
List<String> objectIds,
TypeCache typeCache) |
static void |
deleteCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String repositoryId,
String token)
Deletes a transaction cookie.
|
static String |
getCookieName(String token)
Transforms the transaction into a cookie name.
|
static String |
getPath(javax.servlet.http.HttpServletRequest request)
Returns the current CMIS path.
|
static <T> T |
getProperty(ObjectData object,
String name,
Class<T> clazz)
Extracts a property from an object.
|
protected static ObjectData |
getSimpleObject(CmisService service,
String repositoryId,
String objectId) |
static void |
prepareContext(CallContext context,
BrowserBindingUtils.CallUrl callUrl,
CmisService service,
String repositoryId,
String objectId,
String token,
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 token,
String value)
Sets a transaction cookie.
|
static void |
setCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String repositoryId,
String token,
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(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_TOKEN
public static UrlBuilder compileBaseUrl(javax.servlet.http.HttpServletRequest request)
public static UrlBuilder compileRepositoryUrl(javax.servlet.http.HttpServletRequest request, String repositoryId)
public static UrlBuilder compileRootUrl(javax.servlet.http.HttpServletRequest request, String repositoryId)
public static String getPath(javax.servlet.http.HttpServletRequest request)
public static void prepareContext(CallContext context, BrowserBindingUtils.CallUrl callUrl, CmisService service, String repositoryId, String objectId, String token, javax.servlet.http.HttpServletRequest request)
public static <T> T getProperty(ObjectData object, String name, Class<T> clazz)
public static Properties createNewProperties(ControlParser controlParser, TypeCache typeCache)
public static Properties createUpdateProperties(ControlParser controlParser, String typeId, List<String> secondaryTypeIds, List<String> objectIds, TypeCache typeCache)
public static List<String> createPolicies(ControlParser controlParser)
public static Acl createAddAcl(ControlParser controlParser)
public static Acl createRemoveAcl(ControlParser controlParser)
public static ContentStream createContentStream(javax.servlet.http.HttpServletRequest request)
protected static ObjectData getSimpleObject(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 token)
public static void setCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String repositoryId, String token, String value)
public static void deleteCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String repositoryId, String token)
public static void setCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String repositoryId, String token, String value, int expiry)
public static String createCookieValue(int code, String objectId, String ex, String message)
public static void writeJSON(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 © 2009-2013 The Apache Software Foundation. All Rights Reserved.