Package com.dottydingo.hyperion.service.context

Examples of com.dottydingo.hyperion.service.context.HttpMethod


        phaseContext.setEntityPlugin(plugin);

        phaseContext.setRequestMethod(getHttpMethod(request.getRequestMethod()));
        String requestMethod = getEffectiveMethod(request);
        HttpMethod httpMethod = getHttpMethod(requestMethod);

        if(!plugin.isMethodAllowed(httpMethod))
            throw new NotAllowedException(String.format("%s is not allowed.",httpMethod));

        if(serviceStatus.getReadOnly() && httpMethod.isWriteOperation())
            throw new NotAllowedException("Service is in read only mode.");

        phaseContext.setEffectiveMethod(httpMethod);

        // special case where version is in the URI
View Full Code Here


    }

    protected HttpMethod getHttpMethod(String methodName)
    {
        HttpMethod httpMethod;
        try
        {
            httpMethod = HttpMethod.valueOf(methodName);
        }
        catch (IllegalArgumentException e)
View Full Code Here

    }

    @Override
    public PhaseExecutor<HyperionContext> getNextPhase(HyperionContext context)
    {
        HttpMethod method = context.getEffectiveMethod();

        PhaseExecutor<HyperionContext> executor = null;
        switch (method)
        {
            case DELETE:
View Full Code Here

        phaseContext.setEntityPlugin(plugin);

        phaseContext.setRequestMethod(getHttpMethod(request.getRequestMethod()));
        String requestMethod = getEffectiveMethod(request);
        HttpMethod httpMethod = getHttpMethod(requestMethod);

        if(!plugin.isMethodAllowed(httpMethod))
            throw new HyperionException(405,String.format("%s is not allowed.",httpMethod));

        phaseContext.setEffectiveMethod(httpMethod);
View Full Code Here

    }

    protected HttpMethod getHttpMethod(String methodName)
    {
        HttpMethod httpMethod;
        try
        {
            httpMethod = HttpMethod.valueOf(methodName);
        }
        catch (IllegalArgumentException e)
View Full Code Here

TOP

Related Classes of com.dottydingo.hyperion.service.context.HttpMethod

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.