Java Code Examples for javax.servlet.http.HttpServletResponse#SC_NOT_IMPLEMENTED
The following examples show how to use
javax.servlet.http.HttpServletResponse#SC_NOT_IMPLEMENTED .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultPersonService.java From attic-rave with Apache License 2.0 | 6 votes |
@Override public List<org.apache.rave.model.Person> getPeople(Set<UserId> userIds, GroupId groupId, CollectionOptions collectionOptions, SecurityToken token) { switch (groupId.getType()) { case all: return getUniqueListOfConnectedPeople(userIds, collectionOptions, token); case friends: return getUniqueListOfFriends(userIds, collectionOptions, token); case objectId: return getGroupMembersFromRepository(collectionOptions, groupId.getObjectId().toString(), token.getAppId()); case self: UserId id = userIds.size() == 1 ? userIds.iterator().next() : new UserId(UserId.Type.me, null); return Lists.newArrayList(getPersonForId(id, token)); case custom: throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Custom GroupIDs are not tracked by the container"); default: throw new ProtocolException(HttpServletResponse.SC_BAD_REQUEST, "Invalid group id specified by request"); } }
Example 2
Source File: AbstractRESTHandler.java From orion.server with Eclipse Public License 1.0 | 5 votes |
/** * Handles an idempotent PUT request. Note this method is meant to be overridden in descendant classes. * @param request The PUT request being handled. * @param response The response associated with the request. * @param path Path suffix required to handle the request. * @return A {@link JazzJob} which returns the PUT request result on completion. */ protected CFJob handlePut(T resource, final HttpServletRequest request, final HttpServletResponse response, final String path) { return new CFJob(request, false) { @Override protected IStatus performJob() { String msg = NLS.bind("Failed to handle request for {0}", path); //$NON-NLS-1$ return new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_NOT_IMPLEMENTED, msg, null); } }; }
Example 3
Source File: AbstractRESTHandler.java From orion.server with Eclipse Public License 1.0 | 5 votes |
/** * Handles a POST request. Note this method is meant to be overridden in descendant classes. * The POST request is not idempotent as PUT, although it may handle similar operations. * @param request The POST request being handled. * @param response The response associated with the request. * @param path Path suffix required to handle the request. * @return A {@link JazzJob} which returns the POST request result on completion. */ protected CFJob handlePost(final T resource, final HttpServletRequest request, final HttpServletResponse response, final String path) { return new CFJob(request, false) { @Override protected IStatus performJob() { String msg = NLS.bind("Failed to handle request for {0}", path); //$NON-NLS-1$ return new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_NOT_IMPLEMENTED, msg, null); } }; }
Example 4
Source File: AbstractRESTHandler.java From orion.server with Eclipse Public License 1.0 | 5 votes |
/** * Handles a GET request. Note this method is meant to be overridden in descendant classes. * @param request The GET request being handled. * @param response The response associated with the request. * @param path Path suffix required to handle the request. * @return A {@link JazzJob} which returns the requested resource on completion. */ protected CFJob handleGet(T resource, final HttpServletRequest request, final HttpServletResponse response, final String path) { return new CFJob(request, false) { @Override protected IStatus performJob() { String msg = NLS.bind("Failed to handle request for {0}", path); //$NON-NLS-1$ return new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_NOT_IMPLEMENTED, msg, null); } }; }
Example 5
Source File: DefaultOAuth2Service.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public OAuth2Code generateRefreshToken(OAuth2NormalizedRequest req) { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 6
Source File: DefaultMediaItemService.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public Future<Void> updateMediaItem(UserId userId, String appId, String albumId, String mediaItemId, MediaItem mediaItem, SecurityToken token) throws ProtocolException { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 7
Source File: DefaultOAuth2Service.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public void validateRequestForResource(OAuth2NormalizedRequest req, Object resourceRequest) throws OAuth2Exception { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 8
Source File: DefaultMediaItemService.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public Future<RestfulCollection<MediaItem>> getMediaItems(Set<UserId> userIds, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 9
Source File: DefaultMediaItemService.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public Future<MediaItem> getMediaItem(UserId userId, String appId, String albumId, String mediaItemId, Set<String> fields, SecurityToken token) throws ProtocolException { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 10
Source File: DefaultOAuth2Service.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public void authenticateClient(OAuth2NormalizedRequest req) throws OAuth2Exception { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 11
Source File: DefaultOAuth2Service.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public OAuth2DataService getDataService() { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 12
Source File: DefaultPersonService.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public Future<Person> updatePerson(UserId id, Person person, SecurityToken token) throws ProtocolException { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 13
Source File: OpenSocialActivityService.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public Future<Void> createActivity(UserId userId, GroupId groupId, String appId, Set<String> fields, Activity activity, SecurityToken token) throws ProtocolException { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 14
Source File: OpenSocialActivityService.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public Future<Void> deleteActivities(UserId userId, GroupId groupId, String appId, Set<String> activityIds, SecurityToken token) throws ProtocolException { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 15
Source File: DefaultGroupService.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public Future<RestfulCollection<Group>> getGroups(UserId userId, CollectionOptions options, Set<String> fields, SecurityToken token) { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 16
Source File: OpenSocialActivityService.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public Future<RestfulCollection<Activity>> getActivities(UserId userId, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, Set<String> activityIds, SecurityToken token) throws ProtocolException { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 17
Source File: OpenSocialActivityService.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public Future<RestfulCollection<Activity>> getActivities(Set<UserId> userIds, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, SecurityToken token) throws ProtocolException { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 18
Source File: DefaultMediaItemService.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public Future<Void> createMediaItem(UserId userId, String appId, String albumId, MediaItem mediaItem, SecurityToken token) throws ProtocolException { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }
Example 19
Source File: RestExceptions.java From titus-control-plane with Apache License 2.0 | 4 votes |
private static RestException fromStatusRuntimeException(StatusRuntimeException e) { int statusCode; switch (e.getStatus().getCode()) { case OK: statusCode = HttpServletResponse.SC_OK; break; case INVALID_ARGUMENT: statusCode = HttpServletResponse.SC_BAD_REQUEST; break; case DEADLINE_EXCEEDED: statusCode = HttpServletResponse.SC_REQUEST_TIMEOUT; break; case NOT_FOUND: statusCode = HttpServletResponse.SC_NOT_FOUND; break; case ALREADY_EXISTS: statusCode = HttpServletResponse.SC_CONFLICT; break; case PERMISSION_DENIED: statusCode = HttpServletResponse.SC_FORBIDDEN; break; case RESOURCE_EXHAUSTED: statusCode = TOO_MANY_REQUESTS; break; case FAILED_PRECONDITION: statusCode = HttpServletResponse.SC_CONFLICT; break; case UNIMPLEMENTED: statusCode = HttpServletResponse.SC_NOT_IMPLEMENTED; break; case UNAVAILABLE: statusCode = HttpServletResponse.SC_SERVICE_UNAVAILABLE; break; case UNAUTHENTICATED: statusCode = HttpServletResponse.SC_UNAUTHORIZED; break; default: statusCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR; } return RestException.newBuilder(statusCode, e.getMessage()) .withCause(e) .build(); }
Example 20
Source File: DefaultMediaItemService.java From attic-rave with Apache License 2.0 | 4 votes |
@Override public Future<Void> deleteMediaItem(UserId userId, String appId, String albumId, String mediaItemId, SecurityToken token) throws ProtocolException { throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented"); }