public interface Location extends BrooklynObject
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
Modifier and Type | Method and Description |
---|---|
boolean |
containsLocation(Location potentialDescendent)
Answers true if this location equals or is an ancestor of the given location.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAllConfig(boolean includeInherited)
Deprecated.
since 0.7.0; use
Configurable.config() , such as policy.config().getBag() |
java.util.Collection<Location> |
getChildren()
Get the 'children' of this location.
|
<T> T |
getConfig(ConfigKey.HasConfigKey<T> key)
Convenience method for
config().get(key) |
java.lang.String |
getDisplayName()
Get the name assigned to this location.
|
<T> T |
getExtension(java.lang.Class<T> extensionType)
Returns an extension of the given type.
|
java.lang.String |
getId()
A unique id for this location.
|
Location |
getParent()
Get the 'parent' of this location.
|
boolean |
hasConfig(ConfigKey<?> key,
boolean includeInherited)
Deprecated.
since 0.7.0; use
Configurable.config() , such as ((LocationInternal)location).config().getRaw(key).isPresent() |
boolean |
hasExtension(java.lang.Class<?> extensionType)
Whether this location has support for the given extension type.
|
BrooklynObject.RelationSupport<Location> |
relations()
Relations specify a typed, directed connection between two entities.
|
void |
setParent(Location newParent)
Set the 'parent' of this location.
|
java.lang.String |
toVerboseString() |
getCatalogItemId, subscriptions, tags
config, getConfig, setConfig
java.lang.String getId()
getId
in interface Identifiable
java.lang.String getDisplayName()
getDisplayName
in interface BrooklynObject
Location getParent()
null
if this location is the tree root.null
if this location is the tree root.java.util.Collection<Location> getChildren()
void setParent(Location newParent)
null
to indicate that the location should be disconnected
from its parent.
Adds this location as a child of the new parent (see getChildLocations()
).newParent
- the new parent location object, or null
to clear the parent reference.java.lang.String toVerboseString()
boolean containsLocation(Location potentialDescendent)
<T> T getConfig(ConfigKey.HasConfigKey<T> key)
config().get(key)
#getConfig(ConfigKey)}
@Deprecated boolean hasConfig(ConfigKey<?> key, boolean includeInherited)
Configurable.config()
, such as ((LocationInternal)location).config().getRaw(key).isPresent()
@Deprecated java.util.Map<java.lang.String,java.lang.Object> getAllConfig(boolean includeInherited)
boolean hasExtension(java.lang.Class<?> extensionType)
getExtension(Class)
.java.lang.NullPointerException
- if extensionType is null<T> T getExtension(java.lang.Class<T> extensionType)
getExtension(Object.class)
will not match
anything, even though registered extension extend Object
.
This will not look at extensions of getParent()
.
java.lang.IllegalArgumentException
- if this location does not support the given extension typejava.lang.NullPointerException
- if extensionType is nullBrooklynObject.RelationSupport<Location> relations()
BrooklynObject
relations
in interface BrooklynObject