public class GenericResource extends AbstractAccessibleResource<Accessible>
AbstractAccessibleResource.Handler<E extends Accessible>, AbstractAccessibleResource.NoOpHandler<E extends Accessible>| Modifier and Type | Field and Description |
|---|---|
static String |
ENDPOINT |
aclManager, actionManager, AGGREGATION_PARAM, cls, EVENT_TYPE_PARAM, FROM_PARAM, ITEM_ID_PARAM, ITEM_TYPE_PARAM, SHOW_PARAM, TO_PARAM, USER_PARAMACCESSOR_PARAM, ALL_PARAM, AUTH_HEADER_NAME, COMMIT_PARAM, CSV_MEDIA_TYPE, DEFAULT_LIST_LIMIT, FILTER_PARAM, graph, GROUP_PARAM, ID_PARAM, INCLUDE_PROPS_PARAM, ITEM_CACHE_TIME, jsonFactory, jsonMapper, LIMIT_PARAM, LOG_MESSAGE_HEADER_NAME, LOG_PARAM, logger, manager, N3_MIMETYPE, OFFSET_PARAM, PATCH_HEADER_NAME, RANGE_HEADER_NAME, RDF_MIMETYPE_FORMATS, RDF_XML_MIMETYPE, request, requestHeaders, RESOURCE_ENDPOINT_PREFIX, SCOPE_PARAM, SORT_PARAM, STREAM_HEADER_NAME, TOLERANT_PARAM, TURTLE_MIMETYPE, uriInfo, VERSION_PARAM| Constructor and Description |
|---|
GenericResource(org.neo4j.graphdb.GraphDatabaseService database) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
addDemotion(String id)
Down vote an item
|
javax.ws.rs.core.Response |
addPromotion(String id)
Up vote an item.
|
javax.ws.rs.core.Response |
annotations(String id)
Return a (paged) list of annotations for the given item.
|
javax.ws.rs.core.Response |
createAccessPoint(String id,
String did,
Bundle bundle)
Create an access point on the given description, for the given
parent item.
|
javax.ws.rs.core.Response |
createDescription(String id,
Bundle bundle)
Create a new description for this item.
|
void |
deleteAccessPoint(String id,
String did,
String apid)
Delete the access point with the given ID, on the given description,
belonging to the given parent item.
|
void |
deleteDescription(String id,
String did)
Delete a description with the given ID, belonging to the given parent item.
|
javax.ws.rs.core.Response |
events(String id,
EventsApi.Aggregation aggregation)
Lookup and page the history for a given item.
|
Document |
exportDc(String id,
String langCode) |
javax.ws.rs.core.Response |
get(String id)
Fetch an item of any type by ID.
|
javax.ws.rs.core.Response |
links(String id)
Returns a list of items linked to the given description.
|
javax.ws.rs.core.Response |
list(List<String> ids,
List<Long> gids)
Fetch a list of items by their ID.
|
javax.ws.rs.core.Response |
listFromJson(String json)
Fetch a list of items by their ID.
|
javax.ws.rs.core.Response |
listVersions(String id)
Lookup and page the versions for a given item.
|
javax.ws.rs.core.Response |
permissionGrants(String id)
List all the permission grants that relate specifically to this item.
|
javax.ws.rs.core.Response |
permissionGrantsAsScope(String id)
List all the permission grants that relate specifically to this scope.
|
javax.ws.rs.core.Response |
removeDemotion(String id)
Remove a down vote.
|
javax.ws.rs.core.Response |
removePromotion(String id)
Remove an up vote.
|
javax.ws.rs.core.Response |
setVisibility(String id,
List<String> accessorIds)
Set the accessors who are able to view an item.
|
javax.ws.rs.core.Response |
updateDescription(String id,
Bundle bundle)
Update a description belonging to the given item.
|
javax.ws.rs.core.Response |
updateDescriptionWithId(String id,
String did,
Bundle bundle)
Update a description with the given ID, belonging to the given parent item.
|
javax.ws.rs.core.Response |
visibility(String id)
Get the accessors who are able to view an item.
|
createItem, createItem, createItem, deleteItem, deleteItem, exportItemsAsZip, getAccessors, getEventsApi, getItem, listItems, updateItem, updateItemanonymousApi, api, beginTx, creationResponse, getCacheControl, getCurrentActioner, getCurrentUser, getGraph, getIntQueryParam, getItemUri, getLogMessage, getQuery, getRdfFormat, getRequesterUserProfile, getSerializer, getStringListQueryParam, isPatch, isStreaming, single, streamingList, streamingList, streamingListOfLists, streamingPage, streamingPage, streamingVertexList, streamingVertexListpublic static final String ENDPOINT
public GenericResource(@Context
org.neo4j.graphdb.GraphDatabaseService database)
public javax.ws.rs.core.Response list(List<String> ids, List<Long> gids)
ids - a list of string IDsgids - a list of graph number IDspublic javax.ws.rs.core.Response listFromJson(String json) throws ItemNotFound, PermissionDenied, DeserializationError, IOException
json - a JSON-encoded list of IDs, which can consist of
either strings or (if a number) graph (long) ids.ItemNotFoundPermissionDeniedDeserializationErrorIOExceptionpublic javax.ws.rs.core.Response get(String id) throws ItemNotFound, AccessDenied
id - the item's IDItemNotFoundAccessDeniedpublic javax.ws.rs.core.Response visibility(String id) throws PermissionDenied, ItemNotFound, SerializationError
id - the ID of the itemPermissionDeniedItemNotFoundSerializationErrorpublic javax.ws.rs.core.Response setVisibility(String id, List<String> accessorIds) throws PermissionDenied, ItemNotFound, SerializationError
id - the ID of the itemaccessorIds - the IDs of the users who can access this item.PermissionDeniedItemNotFoundSerializationErrorpublic javax.ws.rs.core.Response addPromotion(String id) throws PermissionDenied, ItemNotFound
id - the ID of the item to promote.PermissionDeniedItemNotFoundpublic javax.ws.rs.core.Response removePromotion(String id) throws PermissionDenied, ItemNotFound, ValidationError
id - the ID of the item to removePermissionDeniedItemNotFoundValidationErrorpublic javax.ws.rs.core.Response addDemotion(String id) throws PermissionDenied, ItemNotFound
id - the ID of the item to promote.PermissionDeniedItemNotFoundpublic javax.ws.rs.core.Response removeDemotion(String id) throws PermissionDenied, ItemNotFound, ValidationError
id - the ID of the item to removePermissionDeniedItemNotFoundValidationErrorpublic javax.ws.rs.core.Response events(String id, EventsApi.Aggregation aggregation) throws ItemNotFound, AccessDenied
id - the event idaggregation - the aggregation strategyItemNotFoundAccessDeniedpublic javax.ws.rs.core.Response annotations(String id) throws ItemNotFound
id - the item IDItemNotFoundpublic javax.ws.rs.core.Response links(String id) throws ItemNotFound
id - the item IDItemNotFoundpublic javax.ws.rs.core.Response permissionGrants(String id) throws PermissionDenied, ItemNotFound
PermissionDeniedItemNotFoundpublic javax.ws.rs.core.Response permissionGrantsAsScope(String id) throws ItemNotFound
ItemNotFoundpublic javax.ws.rs.core.Response createDescription(String id, Bundle bundle) throws PermissionDenied, ValidationError, DeserializationError, ItemNotFound
id - the item IDbundle - the description bundlePermissionDeniedValidationErrorDeserializationErrorItemNotFoundpublic javax.ws.rs.core.Response updateDescription(String id, Bundle bundle) throws PermissionDenied, ValidationError, DeserializationError, ItemNotFound, SerializationError
id - the item IDbundle - the description bundlePermissionDeniedValidationErrorDeserializationErrorItemNotFoundSerializationErrorpublic javax.ws.rs.core.Response updateDescriptionWithId(String id, String did, Bundle bundle) throws AccessDenied, PermissionDenied, ValidationError, DeserializationError, ItemNotFound, SerializationError
id - the item IDdid - the description IDbundle - the description bundleAccessDeniedPermissionDeniedValidationErrorDeserializationErrorItemNotFoundSerializationErrorpublic void deleteDescription(String id, String did) throws PermissionDenied, ItemNotFound, ValidationError, SerializationError
id - the item IDdid - the description IDPermissionDeniedItemNotFoundValidationErrorSerializationErrorpublic javax.ws.rs.core.Response createAccessPoint(String id, String did, Bundle bundle) throws PermissionDenied, ValidationError, DeserializationError, ItemNotFound
id - the parent item's IDdid - the description's IDbundle - the access point dataPermissionDeniedValidationErrorDeserializationErrorItemNotFoundpublic javax.ws.rs.core.Response listVersions(String id) throws ItemNotFound, AccessDenied
id - the event idItemNotFoundAccessDeniedpublic void deleteAccessPoint(String id, String did, String apid) throws AccessDenied, PermissionDenied, ValidationError, DeserializationError, ItemNotFound
id - the parent item's IDdid - the description's IDapid - the access point's IDAccessDeniedPermissionDeniedValidationErrorDeserializationErrorItemNotFoundpublic Document exportDc(String id, String langCode) throws AccessDenied, ItemNotFound, IOException
AccessDeniedItemNotFoundIOExceptionCopyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.