com.emc.storageos.model.property.PropertyInfo Maven / Gradle / Ivy
/*
* Copyright (c) 2008-2013 EMC Corporation
* All Rights Reserved
*/
package com.emc.storageos.model.property;
import java.util.Map;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.TreeMap;
@XmlRootElement(name = "property_base_info")
public class PropertyInfo {
private Map properties;
public static enum PropCategory {
ALL,
CONFIG,
OVF,
MUTATED,
SECRETS,
OBSOLETE,
REDEPLOY
}
/**
* Default constructor
*/
public PropertyInfo() {
}
/**
* Constructor
*
* @param properties map containing key,value pairs
*/
public PropertyInfo(Map properties) {
if (properties != null) {
for (Map.Entry entry : properties.entrySet()) {
getProperties().put(entry.getKey(), entry.getValue());
}
}
}
@XmlElementWrapper(name = "properties")
public Map getProperties() {
if (properties == null) {
properties = new TreeMap();
}
return properties;
}
public void setProperties(Map properties) {
this.properties = properties;
}
/**
* Get a specified property
*
* @param name property name
* @return property value
*/
public String getProperty(String name) {
return getProperties().get(name);
}
/**
* Get all properties
*
* @return map containing key, value pair
*/
/**
* Get all properties
*
* @return map containing key, value pair
*/
/**
* Get all properties
*
* @return map containing key, value pair
*/
/**
* Get all properties
*
* @return map containing key, value pair
*/
public Map getAllProperties() {
return getProperties();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy