Package org.apache.abdera.protocol.server

Examples of org.apache.abdera.protocol.server.MediaCollectionAdapter


    }

    protected ResponseContext processMedia(RequestContext context, CollectionAdapter adapter) {
        String method = context.getMethod();
        if (adapter instanceof MediaCollectionAdapter) {
            MediaCollectionAdapter mcadapter = (MediaCollectionAdapter) adapter;
            if (method.equalsIgnoreCase("GET")) {
                return mcadapter.getMedia(context);
            } else if (method.equalsIgnoreCase("PUT")) {
                return mcadapter.putMedia(context);
            } else if (method.equalsIgnoreCase("DELETE")) {
                return mcadapter.deleteMedia(context);
            } else if (method.equalsIgnoreCase("HEAD")) {
                return mcadapter.headMedia(context);
            } else if (method.equalsIgnoreCase("OPTIONS")) {
                return mcadapter.optionsMedia(context);
            } else {
                return null;
            }
        } else {
            return ProviderHelper.notallowed(context);
View Full Code Here


    }

    protected ResponseContext processMedia(RequestContext context, CollectionAdapter adapter) {
        String method = context.getMethod();
        if (adapter instanceof MediaCollectionAdapter) {
            MediaCollectionAdapter mcadapter = (MediaCollectionAdapter)adapter;
            if (method.equalsIgnoreCase("GET")) {
                return mcadapter.getMedia(context);
            } else if (method.equalsIgnoreCase("POST")) {
                return mcadapter.postMedia(context);
            } else if (method.equalsIgnoreCase("PUT")) {
                return mcadapter.putMedia(context);
            } else if (method.equalsIgnoreCase("DELETE")) {
                return mcadapter.deleteMedia(context);
            } else if (method.equalsIgnoreCase("HEAD")) {
                return mcadapter.headMedia(context);
            } else if (method.equalsIgnoreCase("OPTIONS")) {
                return mcadapter.optionsMedia(context);
            } else {
                return null;
            }
        } else {
            return ProviderHelper.notallowed(context);
View Full Code Here

            response = adapter.headEntry(request);
          else if (method.equalsIgnoreCase("OPTIONS"))
            response = adapter.optionsEntry(request);
        } else if (type == TargetType.TYPE_MEDIA) {
          if (adapter instanceof MediaCollectionAdapter) {
            MediaCollectionAdapter mcadapter =
              (MediaCollectionAdapter) adapter;
            if (method.equalsIgnoreCase("GET"))
              response = mcadapter.getMedia(request);
            else if (method.equalsIgnoreCase("PUT"))
              response = mcadapter.putMedia(request);
            else if (method.equalsIgnoreCase("DELETE"))
              response = mcadapter.deleteMedia(request);  
            else if (method.equalsIgnoreCase("HEAD"))
              response = mcadapter.headMedia(request);  
            else if (method.equalsIgnoreCase("OPTIONS"))
              response = mcadapter.optionsMedia(request);       
          } else {
            response = ProviderHelper.notsupported(request);
          }
        } else if (type == TargetType.TYPE_NOT_FOUND) {
          response = ProviderHelper.notfound(request);
View Full Code Here

    }

    protected ResponseContext processMedia(RequestContext context, CollectionAdapter adapter) {
        String method = context.getMethod();
        if (adapter instanceof MediaCollectionAdapter) {
            MediaCollectionAdapter mcadapter = (MediaCollectionAdapter)adapter;
            if (method.equalsIgnoreCase("GET")) {
                return mcadapter.getMedia(context);
            } else if (method.equalsIgnoreCase("PUT")) {
                return mcadapter.putMedia(context);
            } else if (method.equalsIgnoreCase("DELETE")) {
                return mcadapter.deleteMedia(context);
            } else if (method.equalsIgnoreCase("HEAD")) {
                return mcadapter.headMedia(context);
            } else if (method.equalsIgnoreCase("OPTIONS")) {
                return mcadapter.optionsMedia(context);
            } else {
                return null;
            }
        } else {
            return ProviderHelper.notallowed(context);
View Full Code Here

TOP

Related Classes of org.apache.abdera.protocol.server.MediaCollectionAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.