public class UserProfileResource extends AbstractAccessibleResource<UserProfile> implements GetResource, ListResource, UpdateResource, DeleteResource
AbstractAccessibleResource.Handler<E extends Accessible>, AbstractAccessibleResource.NoOpHandler<E extends Accessible>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 |
|---|
UserProfileResource(org.neo4j.graphdb.GraphDatabaseService database) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
aggregateEventsForUser(String userId,
EventsApi.Aggregation aggregation)
Aggregate actions that are relevant to a given user based on
the other users that they follow and the items they watch.
|
javax.ws.rs.core.Response |
aggregateUserActions(String userId,
EventsApi.Aggregation aggregation)
Fetch an aggregate list of a user's actions.
|
void |
blockUserProfile(String userId,
List<String> otherIds) |
javax.ws.rs.core.Response |
createUserProfile(Bundle bundle,
List<String> groupIds,
List<String> accessors) |
void |
delete(String id)
Delete a resource.
|
void |
followUserProfile(String userId,
List<String> otherIds) |
javax.ws.rs.core.Response |
get(String id)
Fetch a resource by id.
|
boolean |
isBlocking(String userId,
String otherId) |
boolean |
isFollower(String userId,
String otherId) |
boolean |
isFollowing(String userId,
String otherId) |
boolean |
isWatching(String userId,
String otherId) |
javax.ws.rs.core.Response |
list()
List available resources.
|
javax.ws.rs.core.Response |
listAnnotations(String userId) |
javax.ws.rs.core.Response |
listBlocked(String userId) |
javax.ws.rs.core.Response |
listFollowers(String userId) |
javax.ws.rs.core.Response |
listFollowing(String userId) |
javax.ws.rs.core.Response |
listWatching(String userId) |
javax.ws.rs.core.Response |
pageLinks(String userId) |
javax.ws.rs.core.Response |
pageVirtualUnits(String userId) |
void |
unblockUserProfile(String userId,
List<String> otherIds) |
void |
unfollowUserProfile(String userId,
List<String> otherIds) |
void |
unwatchItem(String userId,
List<String> otherIds) |
javax.ws.rs.core.Response |
update(String id,
Bundle bundle)
Update a resource.
|
void |
watchItem(String userId,
List<String> otherIds) |
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 UserProfileResource(@Context
org.neo4j.graphdb.GraphDatabaseService database)
public javax.ws.rs.core.Response get(String id) throws ItemNotFound
GetResourceget in interface GetResourceid - The requested item idItemNotFoundpublic javax.ws.rs.core.Response list()
ListResource
The default list limit can be overridden using the limit
parameter, and disabled completely using a value of -1.
Item lists are paginated using the page parameter.
The page, limit, and total number of items is returned in the Content-Range response header in the form:
page=1; count=20; total=50
If the header X-Stream is set to true
no count of total items will be performed. This is more efficient when returning large
numbers of items or when limiting is disabled completely.
Example:
curl http://localhost:7474/ehri/[RESOURCE]/list?page=5&limit=10
list in interface ListResourcepublic javax.ws.rs.core.Response createUserProfile(Bundle bundle, List<String> groupIds, List<String> accessors) throws PermissionDenied, ValidationError, DeserializationError, ItemNotFound
public javax.ws.rs.core.Response update(String id, Bundle bundle) throws PermissionDenied, ValidationError, DeserializationError, ItemNotFound
UpdateResourceupdate in interface UpdateResourceid - The resource ID.bundle - A resource bundle, with or without an ID.PermissionDeniedValidationErrorDeserializationErrorItemNotFoundpublic void delete(String id) throws PermissionDenied, ItemNotFound, ValidationError
DeleteResourcedelete in interface DeleteResourceid - The resource ID.PermissionDeniedItemNotFoundValidationErrorpublic javax.ws.rs.core.Response listFollowers(String userId) throws ItemNotFound
ItemNotFoundpublic javax.ws.rs.core.Response listFollowing(String userId) throws ItemNotFound
ItemNotFoundpublic boolean isFollowing(String userId, String otherId) throws PermissionDenied, ItemNotFound
PermissionDeniedItemNotFoundpublic boolean isFollower(String userId, String otherId) throws PermissionDenied, ItemNotFound
PermissionDeniedItemNotFoundpublic void followUserProfile(String userId, List<String> otherIds) throws PermissionDenied, ItemNotFound
PermissionDeniedItemNotFoundpublic void unfollowUserProfile(String userId, List<String> otherIds) throws PermissionDenied, ItemNotFound
PermissionDeniedItemNotFoundpublic javax.ws.rs.core.Response listBlocked(String userId) throws ItemNotFound
ItemNotFoundpublic boolean isBlocking(String userId, String otherId) throws PermissionDenied, ItemNotFound
PermissionDeniedItemNotFoundpublic void blockUserProfile(String userId, List<String> otherIds) throws PermissionDenied, ItemNotFound
PermissionDeniedItemNotFoundpublic void unblockUserProfile(String userId, List<String> otherIds) throws PermissionDenied, ItemNotFound
PermissionDeniedItemNotFoundpublic javax.ws.rs.core.Response listWatching(String userId) throws ItemNotFound
ItemNotFoundpublic void watchItem(String userId, List<String> otherIds) throws PermissionDenied, ItemNotFound
PermissionDeniedItemNotFoundpublic void unwatchItem(String userId, List<String> otherIds) throws PermissionDenied, ItemNotFound
PermissionDeniedItemNotFoundpublic boolean isWatching(String userId, String otherId) throws PermissionDenied, ItemNotFound
PermissionDeniedItemNotFoundpublic javax.ws.rs.core.Response listAnnotations(String userId) throws ItemNotFound
ItemNotFoundpublic javax.ws.rs.core.Response pageLinks(String userId) throws ItemNotFound
ItemNotFoundpublic javax.ws.rs.core.Response pageVirtualUnits(String userId) throws ItemNotFound
ItemNotFoundpublic javax.ws.rs.core.Response aggregateUserActions(String userId, EventsApi.Aggregation aggregation) throws ItemNotFound
userId - the user's IDaggregation - the manner in which to aggregate the results, accepting
"user", "strict" or "off" (no aggregation). Default is
strict.ItemNotFoundpublic javax.ws.rs.core.Response aggregateEventsForUser(String userId, EventsApi.Aggregation aggregation) throws ItemNotFound
userId - the user's IDaggregation - the manner in which to aggregate the results, accepting
"user", "strict" or "off" (no aggregation). Default is
user.ItemNotFoundCopyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.