/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.maven.packaging.model;
public class EipOptionModel {
private String name;
private String displayName;
private String title;
private String required;
private String javaType;
private String type;
private String label;
private String description;
private boolean deprecated;
private boolean input;
private boolean output;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getJavaType() {
return javaType;
}
public void setJavaType(String javaType) {
this.javaType = javaType;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getRequired() {
return required;
}
public void setRequired(String required) {
this.required = required;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public boolean isDeprecated() {
return deprecated;
}
public void setDeprecated(boolean deprecated) {
this.deprecated = deprecated;
}
public boolean isInput() {
return input;
}
public void setInput(boolean input) {
this.input = input;
}
public String getInput() {
return input ? "true" : "false";
}
public boolean isOutput() {
return output;
}
public void setOutput(boolean output) {
this.output = output;
}
public String getOutput() {
return output ? "true" : "false";
}
public String getShortJavaType() {
if (javaType.startsWith("java.util.Map")) {
return "Map";
} else if (javaType.startsWith("java.util.Set")) {
return "Set";
} else if (javaType.startsWith("java.util.List")) {
return "List";
}
int pos = javaType.lastIndexOf(".");
if (pos != -1) {
return javaType.substring(pos + 1);
} else {
return javaType;
}
}
}