public abstract class CatalogItemDtoAbstract<T,SpecT> extends AbstractBrooklynObject implements CatalogItem<T,SpecT>
CatalogItem.CatalogBundle, CatalogItem.CatalogItemLibraries, CatalogItem.CatalogItemTypeBrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupportConfigurable.ConfigurationSupportBrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal| Constructor and Description |
|---|
CatalogItemDtoAbstract() |
| Modifier and Type | Method and Description |
|---|---|
BrooklynObjectInternal.ConfigurationSupportInternal |
config() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCatalogItemId()
The catalog item ID this object was loaded from.
|
<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.
|
java.lang.String |
getIconUrl() |
java.lang.String |
getId() |
java.lang.String |
getJavaType() |
java.util.Collection<CatalogItem.CatalogBundle> |
getLibraries() |
java.lang.String |
getPlanYaml() |
RebindSupport<CatalogItemMemento> |
getRebindSupport() |
abstract java.lang.Class<SpecT> |
getSpecType() |
java.lang.String |
getSymbolicName() |
java.lang.String |
getVersion() |
int |
hashCode() |
boolean |
isDeprecated() |
boolean |
isDisabled() |
static java.util.Collection<CatalogItem.CatalogBundle> |
parseLibraries(java.util.Collection<?> possibleLibraries)
Parses an instance of CatalogLibrariesDto from the given List.
|
BrooklynObjectInternal.RelationSupportInternal<CatalogItem<T,SpecT>> |
relations()
Overrides the parent so that relations are not visible.
|
void |
setCatalogItemId(java.lang.String id)
Deprecated.
|
void |
setContainingBundle(VersionedName versionedName) |
void |
setDeprecated(boolean deprecated) |
void |
setDisabled(boolean disabled) |
void |
setDisplayName(java.lang.String newName) |
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() |
addSearchPath, getCatalogItemIdSearchPath, getManagementContext, init, rebind, setCatalogItemIdAndSearchPath, setManagementContext, stackCatalogItemIdgetCatalogItemJavaType, getCatalogItemTypegetCatalogItemIdSearchPathpublic BrooklynObjectInternal.ConfigurationSupportInternal config()
config in interface CatalogItem<T,SpecT>config in interface Configurableconfig in interface BrooklynObjectInternalUnsupportedOperationException; - Config not supported for catalog item. See getPlanYaml().public BrooklynObjectInternal.SubscriptionSupportInternal subscriptions()
BrooklynObjectsubscriptions in interface CatalogItem<T,SpecT>subscriptions in interface BrooklynObjectsubscriptions in interface BrooklynObjectInternalUnsupportedOperationException; - subscriptions are not supported for catalog itemspublic <U> U getConfig(ConfigKey<U> key)
ConfigurableConfigurable.ConfigurationSupport.get(ConfigKey),
via code like config().get(key).getConfig in interface Configurablepublic java.lang.String getId()
getId in interface IdentifiablegetId in class AbstractBrooklynObjectpublic java.lang.String getCatalogItemId()
BrooklynObjectThis can be used to understand the appropriate classloading context, such as for versioning purposes, as well as meta-information such as branding (maybe you can even get an icon) and potentially things like resource lifecycle (if a software version is being sunsetted).
In some cases this may be set heuristically from context and so may not be accurate. Callers can set an explicit catalog item ID if inferencing is not correct.
This should conform to OSGi specs for symbolic_name:version
but weaker semantics are usually allowed so long as neither segment contains a : or whitespace.
getCatalogItemId in interface CatalogItem<T,SpecT>getCatalogItemId in interface BrooklynObjectgetCatalogItemId in class AbstractBrooklynObjectpublic java.lang.String getJavaType()
getJavaType in interface CatalogItem<T,SpecT>public java.lang.String getContainingBundle()
getContainingBundle in interface CatalogItem<T,SpecT>public java.lang.String getDisplayName()
BrooklynObjectgetDisplayName in interface BrooklynObjectpublic 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 getVersion()
getVersion in interface CatalogItem<T,SpecT>public boolean isDeprecated()
isDeprecated in interface CatalogItem<T,SpecT>public void setDeprecated(boolean deprecated)
setDeprecated in interface CatalogItem<T,SpecT>public boolean isDisabled()
isDisabled in interface CatalogItem<T,SpecT>public void setDisabled(boolean disabled)
setDisabled in interface CatalogItem<T,SpecT>@Nonnull public java.util.Collection<CatalogItem.CatalogBundle> getLibraries()
getLibraries in interface CatalogItem<T,SpecT>@Nullable public java.lang.String getPlanYaml()
getPlanYaml in interface CatalogItem<T,SpecT>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic abstract java.lang.Class<SpecT> getSpecType()
getSpecType in interface CatalogItem<T,SpecT>CatalogItem.getCatalogItemJavaType()public RebindSupport<CatalogItemMemento> getRebindSupport()
getRebindSupport in interface CatalogItem<T,SpecT>getRebindSupport in interface RebindablegetRebindSupport in interface BrooklynObjectInternalpublic BrooklynObjectInternal.RelationSupportInternal<CatalogItem<T,SpecT>> relations()
relations in interface BrooklynObjectrelations in interface BrooklynObjectInternalrelations in class AbstractBrooklynObjectpublic void setDisplayName(java.lang.String newName)
setDisplayName in class AbstractBrooklynObjectpublic BrooklynObject.TagSupport tags()
BrooklynObjectImmutableMap 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 BrooklynObjecttags in class AbstractBrooklynObject@Deprecated public void setCatalogItemId(java.lang.String id)
setCatalogItemId in interface BrooklynObjectInternalsetCatalogItemId in class AbstractBrooklynObjectpublic void setContainingBundle(VersionedName versionedName)
public static java.util.Collection<CatalogItem.CatalogBundle> parseLibraries(java.util.Collection<?> possibleLibraries)
If a string is supplied, this tries heuristically to identify whether a reference is a bundle or a URL, as follows:
- if the string contains a slash, it is treated as a URL (or classpath reference), e.g. /file.txt;
- if the string is RegisteredTypeNaming#isGoodBrooklynTypeColonVersion(String)) with an OSGi version it is treated as a bundle, e.g. file:1;
- if the string is ambiguous (has a single colon) a warning is given,
and typically it is treated as a URL because OSGi versions are needed here, e.g. file:v1 is a URL,
but for a transitional period (possibly ending in 0.13 as warning is introduced in 0.12) for compatibility with previous versions,
versions starting with a number trigger bundle resolution, e.g. file:1.txt is a bundle for now
(but in all these cases warnings are logged)
- otherwise (multiple colons, or no colons) it is treated like a URL