javax.servlet.http.HttpServletResponse#SC_NOT_IMPLEMENTED源码实例Demo

下面列出了javax.servlet.http.HttpServletResponse#SC_NOT_IMPLEMENTED 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: attic-rave   文件: DefaultPersonService.java
@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");
    }
}
 
源代码2 项目: orion.server   文件: AbstractRESTHandler.java
/**
 * 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);
		}
	};
}
 
源代码3 项目: orion.server   文件: AbstractRESTHandler.java
/**
 * 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);
		}
	};
}
 
源代码4 项目: orion.server   文件: AbstractRESTHandler.java
/**
 * 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);
		}
	};
}
 
源代码5 项目: attic-rave   文件: DefaultMediaItemService.java
@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");
}
 
源代码6 项目: titus-control-plane   文件: RestExceptions.java
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();
}
 
源代码7 项目: attic-rave   文件: DefaultMediaItemService.java
@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");
}
 
源代码8 项目: attic-rave   文件: OpenSocialActivityService.java
@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");
}
 
源代码9 项目: attic-rave   文件: OpenSocialActivityService.java
@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");
}
 
源代码10 项目: attic-rave   文件: DefaultGroupService.java
@Override
public Future<RestfulCollection<Group>> getGroups(UserId userId, CollectionOptions options, Set<String> fields, SecurityToken token) {
  throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
}
 
源代码11 项目: attic-rave   文件: OpenSocialActivityService.java
@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");
}
 
源代码12 项目: attic-rave   文件: OpenSocialActivityService.java
@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");
}
 
源代码13 项目: attic-rave   文件: DefaultPersonService.java
@Override
public Future<Person> updatePerson(UserId id, Person person, SecurityToken token) throws ProtocolException {
    throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
}
 
源代码14 项目: attic-rave   文件: DefaultOAuth2Service.java
@Override
public OAuth2DataService getDataService() {
    throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
}
 
源代码15 项目: attic-rave   文件: DefaultOAuth2Service.java
@Override
public void authenticateClient(OAuth2NormalizedRequest req) throws OAuth2Exception {
    throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
}
 
源代码16 项目: attic-rave   文件: DefaultMediaItemService.java
@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");
}
 
源代码17 项目: attic-rave   文件: DefaultMediaItemService.java
@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");
}
 
源代码18 项目: attic-rave   文件: DefaultOAuth2Service.java
@Override
public void validateRequestForResource(OAuth2NormalizedRequest req, Object resourceRequest) throws OAuth2Exception {
    throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
}
 
源代码19 项目: attic-rave   文件: DefaultMediaItemService.java
@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");
}
 
源代码20 项目: attic-rave   文件: DefaultOAuth2Service.java
@Override
public OAuth2Code generateRefreshToken(OAuth2NormalizedRequest req) {
    throw new ProtocolException(HttpServletResponse.SC_NOT_IMPLEMENTED, "Not Implemented");
}