
org.raml.jaxrs.codegen.maven.MavenRamlConfig Maven / Gradle / Ivy
The newest version!
package org.raml.jaxrs.codegen.maven;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.raml.model.ActionType;
import org.raml.model.Protocol;
import com.google.common.collect.Sets;
import com.mulesoft.jaxrs.raml.annotation.model.IRamlConfig;
import com.mulesoft.jaxrs.raml.annotation.model.IResourceVisitorExtension;
/**
* Simple IRamlConfig implementation to handle setting of API title, baseUrl, and version from the Maven plugin configuration.
*
* @author kor
* @version $Id: $Id
*/
public class MavenRamlConfig implements IRamlConfig {
private String title;
private String baseUrl;
private String version;
private List extensions
= new ArrayList();
/**
* Constructor for MavenRamlConfig.
*
* @param title a {@link java.lang.String} object.
* @param baseUrl a {@link java.lang.String} object.
* @param version a {@link java.lang.String} object.
*/
public MavenRamlConfig(String title, String baseUrl, String version) {
super();
this.title = title;
this.baseUrl = baseUrl;
this.version = version;
}
/**
* Getter for the field title
.
*
* @return a {@link java.lang.String} object.
*/
public String getTitle() {
return title;
}
/**
* Getter for the field baseUrl
.
*
* @return a {@link java.lang.String} object.
*/
public String getBaseUrl() {
return baseUrl;
}
/**
* Getter for the field version
.
*
* @return a {@link java.lang.String} object.
*/
public String getVersion() {
return version;
}
/**
* getProtocols.
*
* @return a {@link java.util.Set} object.
*/
public Set getProtocols() {
return Sets.newHashSet();
}
/** {@inheritDoc} */
public String getResponseCode(ActionType type) {
return "200";
}
/**
* isSingle.
*
* @return a boolean.
*/
public boolean isSingle() {
return false;
}
/**
* isSorted.
*
* @return a boolean.
*/
public boolean isSorted() {
return false;
}
/**
* doFullTree.
*
* @return a boolean.
*/
public boolean doFullTree() {
return false;
}
/** {@inheritDoc} */
public void setSingle(boolean selection) {
// NOOP
}
public List getExtensions() {
return extensions;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy