public class CatalogItemDo<T,SpecT> extends java.lang.Object implements CatalogItem<T,SpecT>, BrooklynObjectInternal
CatalogItem.CatalogBundle, CatalogItem.CatalogItemLibraries, CatalogItem.CatalogItemType
BrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
Constructor and Description |
---|
CatalogItemDo(CatalogDo catalog,
CatalogItem<T,SpecT> itemDto) |
Modifier and Type | Method and Description |
---|---|
void |
addSearchPath(java.util.List<java.lang.String> searchPath) |
BrooklynObjectInternal.ConfigurationSupportInternal |
config() |
java.lang.String |
getCatalogItemId()
Built up from
CatalogItem.getSymbolicName() and CatalogItem.getVersion() . |
java.util.List<java.lang.String> |
getCatalogItemIdSearchPath()
An immutable list of ids of catalog items that this item depends on in some way,
with the item that directly defines it implicit, but other items it references explicit.
|
java.lang.Class<T> |
getCatalogItemJavaType() |
CatalogItem.CatalogItemType |
getCatalogItemType() |
<U> U |
getConfig(ConfigKey<U> key)
Convenience for calling
Configurable.ConfigurationSupport.get(ConfigKey) ,
via code like config().get(key) . |
java.lang.String |
getContainingBundle() |
java.lang.String |
getDescription() |
java.lang.String |
getDisplayName()
A display name; recommended to be a concise single-line description.
|
CatalogItem<T,SpecT> |
getDto() |
java.lang.String |
getIconUrl() |
java.lang.String |
getId() |
java.lang.String |
getJavaType() |
java.util.Collection<CatalogItem.CatalogBundle> |
getLibraries() |
ManagementContext |
getManagementContext() |
java.lang.String |
getPlanYaml() |
RebindSupport<CatalogItemMemento> |
getRebindSupport() |
java.lang.Class<SpecT> |
getSpecType() |
java.lang.String |
getSymbolicName() |
java.lang.String |
getVersion() |
boolean |
isDeprecated() |
boolean |
isDisabled() |
BrooklynObjectInternal.RelationSupportInternal<CatalogItem<T,SpecT>> |
relations()
Overrides the parent so that relations are not visible.
|
void |
setCatalogItemId(java.lang.String id) |
void |
setCatalogItemIdAndSearchPath(java.lang.String catalogItemId,
java.util.List<java.lang.String> ids) |
void |
setDeprecated(boolean deprecated) |
void |
setDisabled(boolean diabled) |
void |
stackCatalogItemId(java.lang.String id)
Moves the current catalog item id onto the start of the search path,
then sets the catalog item id to the supplied value.
|
BrooklynObjectInternal.SubscriptionSupportInternal |
subscriptions()
Subscriptions are the mechanism for receiving notifications of sensor-events (e.g.
|
BrooklynObject.TagSupport |
tags()
Tags are arbitrary objects which can be attached to an entity for subsequent reference.
|
java.lang.String |
toString() |
public CatalogItemDo(CatalogDo catalog, CatalogItem<T,SpecT> itemDto)
public CatalogItem<T,SpecT> getDto()
public ManagementContext getManagementContext()
getManagementContext
in interface BrooklynObjectInternal
public BrooklynObjectInternal.ConfigurationSupportInternal config()
config
in interface CatalogItem<T,SpecT>
config
in interface Configurable
config
in interface BrooklynObjectInternal
UnsupportedOperationException;
- Config not supported for catalog item. See getPlanYaml()
.public BrooklynObjectInternal.SubscriptionSupportInternal subscriptions()
BrooklynObject
subscriptions
in interface CatalogItem<T,SpecT>
subscriptions
in interface BrooklynObject
subscriptions
in interface BrooklynObjectInternal
UnsupportedOperationException;
- subscriptions are not supported for catalog itemspublic BrooklynObjectInternal.RelationSupportInternal<CatalogItem<T,SpecT>> relations()
relations
in interface BrooklynObject
relations
in interface BrooklynObjectInternal
public <U> U getConfig(ConfigKey<U> key)
Configurable
Configurable.ConfigurationSupport.get(ConfigKey)
,
via code like config().get(key)
.getConfig
in interface Configurable
public CatalogItem.CatalogItemType getCatalogItemType()
getCatalogItemType
in interface CatalogItem<T,SpecT>
public java.lang.Class<T> getCatalogItemJavaType()
getCatalogItemJavaType
in interface CatalogItem<T,SpecT>
public java.lang.String getId()
getId
in interface Identifiable
public java.lang.String getCatalogItemId()
CatalogItem
CatalogItem.getSymbolicName()
and CatalogItem.getVersion()
.
(It is a bit self-referential having this method on this type of BrooklynObject
,
but it is easier this than making the interface hierarchy more complicated.)getCatalogItemId
in interface CatalogItem<T,SpecT>
getCatalogItemId
in interface BrooklynObject
public void setDeprecated(boolean deprecated)
setDeprecated
in interface CatalogItem<T,SpecT>
public boolean isDeprecated()
isDeprecated
in interface CatalogItem<T,SpecT>
public void setDisabled(boolean diabled)
setDisabled
in interface CatalogItem<T,SpecT>
public boolean isDisabled()
isDisabled
in interface CatalogItem<T,SpecT>
public void setCatalogItemId(java.lang.String id)
setCatalogItemId
in interface BrooklynObjectInternal
public void setCatalogItemIdAndSearchPath(java.lang.String catalogItemId, java.util.List<java.lang.String> ids)
setCatalogItemIdAndSearchPath
in interface BrooklynObjectInternal
public void addSearchPath(java.util.List<java.lang.String> searchPath)
addSearchPath
in interface BrooklynObjectInternal
public java.util.List<java.lang.String> getCatalogItemIdSearchPath()
BrooklynObject
items: - id: X - id: Y item: X - id: Z item: Ythe spec for Z will have getCatalogId() of Z and getCatalogItemIdSearchPath() of Y, X. (The self catalog ID is implicit at the head of the search path.)
getCatalogItemIdSearchPath
in interface BrooklynObject
public void stackCatalogItemId(java.lang.String id)
BrooklynObjectInternal
stackCatalogItemId
in interface BrooklynObjectInternal
public java.lang.String getJavaType()
getJavaType
in interface CatalogItem<T,SpecT>
public java.lang.String getDisplayName()
BrooklynObject
getDisplayName
in interface BrooklynObject
public BrooklynObject.TagSupport tags()
BrooklynObject
ImmutableMap
may be used under the covers; also there is little point!);
and they should be amenable to our persistence (on-disk serialization) and our JSON serialization in the REST API.tags
in interface BrooklynObject
public java.lang.String getDescription()
getDescription
in interface CatalogItem<T,SpecT>
public java.lang.String getIconUrl()
getIconUrl
in interface CatalogItem<T,SpecT>
public java.lang.String getSymbolicName()
getSymbolicName
in interface CatalogItem<T,SpecT>
public java.lang.String getContainingBundle()
getContainingBundle
in interface CatalogItem<T,SpecT>
public java.lang.String getVersion()
getVersion
in interface CatalogItem<T,SpecT>
@Nonnull public java.util.Collection<CatalogItem.CatalogBundle> getLibraries()
getLibraries
in interface CatalogItem<T,SpecT>
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Class<SpecT> getSpecType()
getSpecType
in interface CatalogItem<T,SpecT>
CatalogItem.getCatalogItemJavaType()
@Nullable public java.lang.String getPlanYaml()
getPlanYaml
in interface CatalogItem<T,SpecT>
public RebindSupport<CatalogItemMemento> getRebindSupport()
getRebindSupport
in interface CatalogItem<T,SpecT>
getRebindSupport
in interface Rebindable
getRebindSupport
in interface BrooklynObjectInternal