org.rhq.core.util.updater
Class DeploymentProperties
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
org.rhq.core.util.updater.DeploymentProperties
- All Implemented Interfaces:
- Serializable, Cloneable, Map<Object,Object>
public class DeploymentProperties
- extends Properties
Provides properties that define metadata about a deployment.
Use the factory method loadFromFile(File) to load deployment properties
files. Use saveToFile(File) to store deployment properties.
- Author:
- John Mazzitelli
- See Also:
- Serialized Form
| Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
| Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
DeploymentProperties
public DeploymentProperties()
- Creates an empty set of deployment properties. The caller must ensure valid
deployment properties are set later.
DeploymentProperties
public DeploymentProperties(int deploymentId,
String bundleName,
String bundleVersion,
String description)
- Convenience constructor whose parameters are all the required values that
this object needs.
- Parameters:
deploymentId - see getDeploymentId()bundleName - see getBundleName()bundleVersion - see getBundleVersion()description - see getDescription()
loadFromFile
public static DeploymentProperties loadFromFile(File file)
throws Exception
- Throws:
Exception
isValid
public boolean isValid()
- Returns
true if this object has everything required to define a valid deployment.
- Returns:
- true if this is valid
saveToFile
public void saveToFile(File file)
throws Exception
- Throws:
Exception
getDeploymentId
public int getDeploymentId()
- This returns a deployment ID that identifies a known deployment.
If the deployment is not yet known (that is, its going to be a new
deployment added to the system), this will typically return 0.
- Returns:
- an identifier that uniquely identifies this particular deployment.
setDeploymentId
public void setDeploymentId(int id)
getBundleName
public String getBundleName()
- Returns:
- the name of the bundle for this deployment
setBundleName
public void setBundleName(String name)
getBundleVersion
public String getBundleVersion()
- Returns:
- the version of the bundle for this deployment
setBundleVersion
public void setBundleVersion(String version)
getDescription
public String getDescription()
- Returns:
- the description of this deployment
setDescription
public void setDescription(String description)
getManageRootDir
public boolean getManageRootDir()
- Returns:
- the flag to indicate if the entire root directory content is to be managed.
If there is no property, this method returns a default of
true
setManageRootDir
public void setManageRootDir(boolean willManageRootDir)
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.