org.makersoft.web.mvc.mapping.AbstractMapping.java Source code

Java tutorial

Introduction

Here is the source code for org.makersoft.web.mvc.mapping.AbstractMapping.java

Source

/*
 * @(#)AbstractMapping.java 2013-1-28 ?23:33:33
 *
 * Copyright (c) 2011-2013 Makersoft.org all rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *
 */
package org.makersoft.web.mvc.mapping;

import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Class description goes here.
 */
public abstract class AbstractMapping implements Mapping {

    private String methodName;

    private static final String[] CONSUMES = new String[] { MediaType.ALL_VALUE };

    private static final String[] PRODUCES = new String[] { MediaType.APPLICATION_JSON_VALUE,
            MediaType.TEXT_HTML_VALUE }; // MediaType.APPLICATION_XML_VALUE,

    public AbstractMapping(final String methodName) {
        this.methodName = methodName;
    }

    @Override
    public String getMethodName() {
        return methodName;
    }

    @Override
    public String[] getValues() {
        return null;
    }

    @Override
    public RequestMethod[] getRequestMethods() {
        return null;
    }

    @Override
    public String[] getParams() {
        return null;
    }

    @Override
    public String[] getHeaders() {
        return null;
    }

    @Override
    public String[] getConsumes() {
        return CONSUMES;
    }

    @Override
    public String[] getProduces() {
        return PRODUCES;
    }

}