Brooklyn

brooklyn.location
[Java] Class LocationSpec

java.lang.Object
  brooklyn.location.LocationSpec
All Implemented Interfaces:
java.io.Serializable

public class LocationSpec

Gives details of a location to be created. It describes the location's configuration, and is reusable to create multiple locations with the same configuration. To create a LocationSpec, it is strongly encouraged to use create(...) methods.

Parameters:
- The type of location to be created
Authors:
aled


Constructor Summary
protected LocationSpec(java.lang.Class type)

 
Method Summary
LocationSpec configure(java.util.Map val)

LocationSpec configure(java.lang.CharSequence key, java.lang.Object val)

LocationSpec configure(ConfigKey key, java.lang.Object val)

LocationSpec configure(ConfigKey key, Task val)

LocationSpec configure(HasConfigKey key, java.lang.Object val)

LocationSpec configure(HasConfigKey key, Task val)

LocationSpec configureIfNotNull(ConfigKey key, java.lang.Object val)

static LocationSpec create(java.lang.Class type)

Creates a new LocationSpec instance for a location of the given type.

static LocationSpec create(java.util.Map config, java.lang.Class type)

Creates a new LocationSpec instance with the given config, for a location of the given type.

LocationSpec displayName(java.lang.String val)

LocationSpec extension(java.lang.Class extensionType, E extension)

java.util.Map getConfig()

@return Read-only configuration values

java.lang.String getDisplayName()

@return The display name of the location

java.util.Map getExtensions()

@return Read-only extension values

java.util.Map getFlags()

@return Read-only construction flags

Location getParent()

@return The location's parent

java.lang.Class getType()

@return The type of the location

LocationSpec parent(Location val)

static LocationSpec spec(java.lang.Class type)

@deprecated since 0.6 (added 0.6.0-M1); use create(Class)

static LocationSpec spec(java.util.Map config, java.lang.Class type)

@deprecated since 0.6 (added 0.6.0-M1); use create(Map, Class)

java.lang.String toString()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Constructor Detail

LocationSpec

protected LocationSpec(java.lang.Class type)


 
Method Detail

configure

public LocationSpec configure(java.util.Map val)


configure

public LocationSpec configure(java.lang.CharSequence key, java.lang.Object val)


configure

public LocationSpec configure(ConfigKey key, java.lang.Object val)


configure

public LocationSpec configure(ConfigKey key, Task val)


configure

public LocationSpec configure(HasConfigKey key, java.lang.Object val)


configure

public LocationSpec configure(HasConfigKey key, Task val)


configureIfNotNull

public LocationSpec configureIfNotNull(ConfigKey key, java.lang.Object val)


create

public static LocationSpec create(java.lang.Class type)
Creates a new LocationSpec instance for a location of the given type. The returned LocationSpec can then be customized.
Parameters:
type - A Location class


create

public static LocationSpec create(java.util.Map config, java.lang.Class type)
Creates a new LocationSpec instance with the given config, for a location of the given type. This is primarily for groovy code; equivalent to LocationSpec.create(type).configure(config).
Parameters:
config - The spec's configuration (see LocationSpec#configure(Map)#configure(Map)).
type - A Location class


displayName

public LocationSpec displayName(java.lang.String val)


extension

public LocationSpec extension(java.lang.Class extensionType, E extension)


getConfig

public java.util.Map getConfig()
Returns:
Read-only configuration values


getDisplayName

public java.lang.String getDisplayName()
Returns:
The display name of the location


getExtensions

public java.util.Map getExtensions()
Returns:
Read-only extension values


getFlags

public java.util.Map getFlags()
Returns:
Read-only construction flags
See Also:
SetFromFlag


getParent

public Location getParent()
Returns:
The location's parent


getType

public java.lang.Class getType()
Returns:
The type of the location


parent

public LocationSpec parent(Location val)


spec

public static  LocationSpec spec(Class type) {
public static LocationSpec spec(java.lang.Class type)
deprecated:
since 0.6 (added 0.6.0-M1); use create(Class)


spec

public static  LocationSpec spec(Map config, Class type) {
public static LocationSpec spec(java.util.Map config, java.lang.Class type)
deprecated:
since 0.6 (added 0.6.0-M1); use create(Map, Class)


toString

public String toString() {
public java.lang.String toString()


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.