org.rhq.core.domain.bundle
Class ResourceTypeBundleConfiguration

java.lang.Object
  extended by org.rhq.core.domain.bundle.ResourceTypeBundleConfiguration
All Implemented Interfaces:
Serializable

public class ResourceTypeBundleConfiguration
extends Object
implements Serializable

If a resource type can be a target for bundle deployment, it will define some metadata values inside this configuration object. We store these in a Configuration to support extensibility in the future. Stored in this configuration object will be things like the bundle destination base directory definitions (the base locations where bundles can be deployed for resources that are of the given type). Rather than expect users of this object to know the internal properties stored in the config, this object has strongly-typed methods to extract the properties into more easily consumable POJOs, such as #getBundleDestinationBaseDirectory() and addBundleDestinationBaseDirectory(String, String, String, String).

See Also:
Serialized Form

Nested Class Summary
static class ResourceTypeBundleConfiguration.BundleDestinationBaseDirectory
          Defines where bundles can be deployed on a resource that is of our resource type.
 
Constructor Summary
ResourceTypeBundleConfiguration()
           
ResourceTypeBundleConfiguration(Configuration bundleConfiguration)
           
 
Method Summary
 void addBundleDestinationBaseDirectory(String name, String valueContext, String valueName, String description)
          Adds a destination base directory that can be used as a target for a bundle deployment.
 boolean equals(Object obj)
           
 Configuration getBundleConfiguration()
          Returns the actual, raw configuration.
 Set<ResourceTypeBundleConfiguration.BundleDestinationBaseDirectory> getBundleDestinationBaseDirectories()
          Returns the different destination base directories that can be the target for a bundle deployment.
 int hashCode()
           
 void setBundleConfiguration(Configuration bundleConfiguration)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceTypeBundleConfiguration

public ResourceTypeBundleConfiguration()

ResourceTypeBundleConfiguration

public ResourceTypeBundleConfiguration(Configuration bundleConfiguration)
Method Detail

getBundleConfiguration

public Configuration getBundleConfiguration()
Returns the actual, raw configuration. Callers should rarely want to use this - use the more strongly typed methods such as #getBundleDestinationBaseDirectory().

Returns:
the raw bundle configuration object

setBundleConfiguration

public void setBundleConfiguration(Configuration bundleConfiguration)

getBundleDestinationBaseDirectories

public Set<ResourceTypeBundleConfiguration.BundleDestinationBaseDirectory> getBundleDestinationBaseDirectories()
Returns the different destination base directories that can be the target for a bundle deployment. If this bundle configuration doesn't have any base directories, null is returned (though this should never happen if the bundle configuration has been fully prepared for a resource type).

Returns:
the set of destination base directories that can be targets for bundle deployments

addBundleDestinationBaseDirectory

public void addBundleDestinationBaseDirectory(String name,
                                              String valueContext,
                                              String valueName,
                                              String description)
Adds a destination base directory that can be used as a target for a bundle deployment.

Parameters:
name - the name of this bundle destination base directory (must not be null)
valueContext - indicates where the value's name can be looked up and found. This must be the string form of one of the enums found in ResourceTypeBundleConfiguration.BundleDestinationBaseDirectory.Context
valueName - the name of the property found in the given context where the value of the base directory is
description - optional explanation for what this destination location is

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.