public abstract class Resource extends Object
| Modifier and Type | Field and Description |
|---|---|
protected PropertyKey |
idProperty |
protected SecurityContext |
securityContext |
| Constructor and Description |
|---|
Resource() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyDefaultSorting(List<? extends GraphObject> list,
PropertyKey sortKey,
boolean sortDescending) |
protected String |
buildLocationHeader(GraphObject newObject) |
abstract boolean |
checkAndConfigure(String part,
SecurityContext securityContext,
javax.servlet.http.HttpServletRequest request)
Check and configure this instance with the given values.
|
void |
configureIdProperty(PropertyKey idProperty) |
void |
configurePropertyView(Value<String> propertyView) |
boolean |
createPostTransaction()
Override this method in your resource implementation and return false
to prevent the creation of an encosing transaction context in your
doPost() method.
|
RestMethodResult |
doDelete() |
abstract Result |
doGet(PropertyKey sortKey,
boolean sortDescending,
int pageSize,
int page,
String offsetId) |
RestMethodResult |
doHead() |
RestMethodResult |
doOptions() |
abstract RestMethodResult |
doPost(Map<String,Object> propertySet) |
RestMethodResult |
doPut(Map<String,Object> propertySet) |
protected void |
extractDistanceSearch(javax.servlet.http.HttpServletRequest request,
Query query) |
protected void |
extractSearchableAttributes(SecurityContext securityContext,
Class type,
javax.servlet.http.HttpServletRequest request,
Query query) |
protected PropertyKey |
findPropertyKey(TypedIdResource typedIdResource,
TypeResource typeResource) |
abstract Class<? extends GraphObject> |
getEntityClass() |
abstract String |
getResourceSignature() |
abstract String |
getUriPart() |
abstract boolean |
isCollectionResource() |
boolean |
isPrimitiveArray() |
protected static int |
parseInteger(Object source) |
void |
postProcessResultSet(Result result) |
void |
setSecurityContext(SecurityContext securityContext) |
abstract Resource |
tryCombineWith(Resource next) |
protected SecurityContext securityContext
protected PropertyKey idProperty
public abstract Resource tryCombineWith(Resource next) throws FrameworkException
FrameworkExceptionpublic abstract boolean checkAndConfigure(String part, SecurityContext securityContext, javax.servlet.http.HttpServletRequest request) throws FrameworkException
part - the uri part that matched this resourcesecurityContext - the security context of the current requestrequest - the current requestFrameworkExceptionpublic abstract String getUriPart()
public abstract Class<? extends GraphObject> getEntityClass()
public abstract String getResourceSignature()
public abstract boolean isCollectionResource()
throws FrameworkException
FrameworkExceptionpublic abstract Result doGet(PropertyKey sortKey, boolean sortDescending, int pageSize, int page, String offsetId) throws FrameworkException
FrameworkExceptionpublic abstract RestMethodResult doPost(Map<String,Object> propertySet) throws FrameworkException
FrameworkExceptionpublic RestMethodResult doHead() throws FrameworkException
FrameworkExceptionpublic RestMethodResult doOptions() throws FrameworkException
FrameworkExceptionpublic RestMethodResult doDelete() throws FrameworkException
FrameworkExceptionpublic RestMethodResult doPut(Map<String,Object> propertySet) throws FrameworkException
FrameworkExceptionpublic void configurePropertyView(Value<String> propertyView)
propertyView - public void configureIdProperty(PropertyKey idProperty)
public void postProcessResultSet(Result result)
public boolean isPrimitiveArray()
public void setSecurityContext(SecurityContext securityContext)
public boolean createPostTransaction()
protected PropertyKey findPropertyKey(TypedIdResource typedIdResource, TypeResource typeResource)
protected String buildLocationHeader(GraphObject newObject)
protected void applyDefaultSorting(List<? extends GraphObject> list, PropertyKey sortKey, boolean sortDescending)
protected void extractDistanceSearch(javax.servlet.http.HttpServletRequest request,
Query query)
protected void extractSearchableAttributes(SecurityContext securityContext, Class type, javax.servlet.http.HttpServletRequest request, Query query) throws FrameworkException
FrameworkExceptionprotected static int parseInteger(Object source)
Copyright © 2014. All rights reserved.