/** * Request to create a content based resource * @author Heiko W. Rupp */ @ApiClass("A request to create a content-based resource. For this to work, it is required that the content to be deployed is already uploaded to the server.") public class CreateCBResourceRequest extends ResourceWithType { Map<String,Object> pluginConfig = new HashMap<String, Object>(); Map<String,Object> resourceConfig = new HashMap<String, Object>(); @ApiProperty("The configuration of the connection properties") public Map<String, Object> getPluginConfig() { return pluginConfig; } public void setPluginConfig(Map<String, Object> pluginConfig) { this.pluginConfig = pluginConfig; } @ApiProperty("The configuration of the resource to be created") public Map<String, Object> getResourceConfig() { return resourceConfig; } public void setResourceConfig(Map<String, Object> resourceConfig) { this.resourceConfig = resourceConfig; } }
private void processDataClass(Document doc, TypeElement classElementIn, Element xmlRoot) { String pkg = classElementIn.toString(); log.debug("Looking at " + pkg); if (!pkg.startsWith(modelPackage) || pkg.startsWith(skipPackage)) { log.debug(" skipping as it does not meet the required package"); return; } Element elem = doc.createElement("data"); xmlRoot.appendChild(elem); elem.setAttribute("name", classElementIn.getSimpleName().toString()); elem.setAttribute("nameId","..." + classElementIn.getSimpleName().toString()); ApiClass api = classElementIn.getAnnotation(ApiClass.class); if (api!=null) { elem.setAttribute("abstract",api.value()); if (api.description()!=null && !api.description().isEmpty()) { elem.setAttribute("description",api.description()); } } // Determine the name of how the elements of this class are named in the XML / JSON output XmlRootElement rootElement = classElementIn.getAnnotation(XmlRootElement.class); String objectName; if (rootElement!=null) { objectName = rootElement.name(); } else { objectName = classElementIn.getSimpleName().toString(); } elem.setAttribute("objectName",objectName); processDataClassProperties(doc, classElementIn, elem); }
/** * System status * @author Heiko W. Rupp */ @ApiClass("Place holder for the system status") @XmlRootElement public class Status { Map<String,String> values = new HashMap<String, String>(); public Status() { } @ApiProperty("Contains the status as a map of key/value pairs") public Map<String, String> getValues() { return values; } public void setValues(Map<String, String> values) { this.values = values; } }
/** * Encapsulate a simple string value * @author Heiko W. Rupp */ @ApiClass("Encapsulates a simple string value. In XML this is represented as <value value=\"...\"/>") @XmlRootElement(name = "value") public class StringValue { String value; public StringValue() { } public StringValue(String value) { this.value = value; } @XmlAttribute @ApiProperty("The actual value") public String getValue() { return value; } public void setValue(String value) { this.value = value; } }
/** * Encapsulate a simple double value * @author Libor Zoubek */ @ApiClass("Encapsulates a simple double value. In XML this is represented as <value value=\"...\"/>") @XmlRootElement(name = "value") public class DoubleValue { Double value; public DoubleValue() { } public DoubleValue(Double value) { this.value = value; } @XmlAttribute @ApiProperty("The actual value") public Double getValue() { return value; } public void setValue(Double value) { this.value = value; } }
/** * Encapsulate a simple integer value * @author Heiko W. Rupp */ @ApiClass("Encapsulates a simple integer value. In XML this is represented as <value value=\"...\"/>") @XmlRootElement(name = "value") public class IntegerValue { Integer value; @SuppressWarnings("unused") public IntegerValue() { } public IntegerValue(Integer value) { this.value = value; } @XmlAttribute @ApiProperty("The actual value") public Integer getValue() { return value; } public void setValue(Integer value) { this.value = value; } }
@ApiClass("One resource with its direct child resources") @XmlRootElement public class ResourceWithChildren {
@ApiClass(value = "An Event definition", description = "You can retrieve an EventDefinition and with its name create new EventSources for that resource") @XmlRootElement public class EventDefinitionRest {
@ApiClass("Represents an alert notification definition") @XmlRootElement(name = "notification") public class AlertNotificationRest {
@ApiClass(value = "A simple property definition", description = "This bean is e.g. used for parameters of operations") @XmlRootElement public class SimplePropDef {
@ApiClass @XmlRootElement public class AlertSender {
@ApiClass("One callTime data point of a metric (aka schedule)") @XmlRootElement public class CallTimeValueRest {
@ApiClass("A resource type") @XmlRootElement(name = "resourceType") public class ResourceTypeRest {
@ApiClass(value = "The template from which operations are created") @XmlRootElement(name = "operationDefinition") public class OperationDefinitionRest {
@ApiClass("Representation of a metric baseline/-band") @XmlRootElement public class Baseline {
@ApiClass("This class represents an EventSource - e.g. a logfile.") @XmlRootElement(name="source") public class EventSourceRest {
@ApiClass("This class represents one event.") @XmlRootElement(name = "event") public class EventRest {
@ApiClass("Represents the availability of a resource") @XmlRootElement(name = "availability") public class AvailabilityRest {
@ApiClass("One numerical data point of a metric (aka schedule)") @XmlRootElement public class NumericDataPoint {
@ApiClass("An aggregate of metrics data for a given metric definition (for a group)") @XmlRootElement public class MetricDefinitionAggregate {