public class BasicBrooklynCatalog extends java.lang.Object implements BrooklynCatalog
| Modifier and Type | Class and Description |
|---|---|
static class |
BasicBrooklynCatalog.BrooklynLoaderTracker |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NO_VERSION |
DEFAULT_VERSION| Constructor and Description |
|---|
BasicBrooklynCatalog(ManagementContext mgmt) |
BasicBrooklynCatalog(ManagementContext mgmt,
CatalogDto dto) |
| Modifier and Type | Method and Description |
|---|---|
void |
addItem(CatalogItem<?,?> item)
Deprecated.
|
CatalogItem<?,?> |
addItem(java.lang.Class<?> type)
Deprecated.
|
CatalogItem<?,?> |
addItem(java.lang.String yaml)
Adds an item (represented in yaml) to the catalog.
|
CatalogItem<?,?> |
addItem(java.lang.String yaml,
boolean forceUpdate)
Adds an item (represented in yaml) to the catalog.
|
java.util.List<? extends CatalogItem<?,?>> |
addItems(java.lang.String yaml)
Adds items (represented in yaml) to the catalog.
|
java.util.List<? extends CatalogItem<?,?>> |
addItems(java.lang.String yaml,
boolean forceUpdate)
Adds items (represented in yaml) to the catalog.
|
boolean |
blockIfNotLoaded(Duration timeout) |
<T,SpecT> SpecT |
createSpec(CatalogItem<T,SpecT> item)
creates a spec for the given catalog item, throwing exceptions if any problems
|
void |
deleteCatalogItem(java.lang.String id)
Deprecated.
|
void |
deleteCatalogItem(java.lang.String symbolicName,
java.lang.String version) |
CatalogDo |
getCatalog() |
<T,SpecT> CatalogItem<T,SpecT> |
getCatalogItem(java.lang.Class<T> type,
java.lang.String id)
Deprecated.
|
<T,SpecT> CatalogItem<T,SpecT> |
getCatalogItem(java.lang.Class<T> type,
java.lang.String id,
java.lang.String version)
variant of
BrooklynCatalog.getCatalogItem(String, String) which checks (and casts) type for convenience
(returns null if type does not match) |
CatalogItem<?,?> |
getCatalogItem(java.lang.String symbolicName)
Deprecated.
|
CatalogItem<?,?> |
getCatalogItem(java.lang.String symbolicName,
java.lang.String version) |
CatalogItem<?,?> |
getCatalogItemForType(java.lang.String typeName)
Deprecated.
|
<T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> |
getCatalogItems() |
<T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> |
getCatalogItems(com.google.common.base.Predicate<? super CatalogItem<T,SpecT>> filter)
convenience for filtering items in the catalog; see CatalogPredicates for useful filters
|
java.lang.ClassLoader |
getRootClassLoader() |
void |
load()
Loads this catalog.
|
<T,SpecT> java.lang.Class<? extends T> |
loadClass(CatalogItem<T,SpecT> item)
Deprecated.
|
<T> java.lang.Class<? extends T> |
loadClassByType(java.lang.String typeName,
java.lang.Class<T> typeClass)
Deprecated.
|
void |
persist(CatalogItem<?,?> catalogItem)
persists the catalog item to the object store, if persistence is enabled
|
void |
reset(CatalogDto dto) |
void |
reset(CatalogDto dto,
boolean failOnLoadError) |
void |
reset(java.util.Collection<CatalogItem<?,?>> entries)
Resets the catalog to the given entries
|
java.lang.String |
toXmlString() |
public static final java.lang.String NO_VERSION
public BasicBrooklynCatalog(ManagementContext mgmt)
public BasicBrooklynCatalog(ManagementContext mgmt, CatalogDto dto)
public boolean blockIfNotLoaded(Duration timeout)
public void reset(CatalogDto dto)
public void reset(CatalogDto dto, boolean failOnLoadError)
public void reset(java.util.Collection<CatalogItem<?,?>> entries)
reset in interface BrooklynCatalogpublic CatalogDo getCatalog()
@Deprecated public CatalogItem<?,?> getCatalogItem(java.lang.String symbolicName)
getCatalogItem in interface BrooklynCatalogsymbolicName, or null if not found.public CatalogItem<?,?> getCatalogItem(java.lang.String symbolicName, java.lang.String version)
getCatalogItem in interface BrooklynCatalogsymbolicName, or null if not found.@Deprecated public void deleteCatalogItem(java.lang.String id)
deleteCatalogItem in interface BrooklynCatalogpublic void deleteCatalogItem(java.lang.String symbolicName,
java.lang.String version)
deleteCatalogItem in interface BrooklynCatalog@Deprecated public <T,SpecT> CatalogItem<T,SpecT> getCatalogItem(java.lang.Class<T> type, java.lang.String id)
BrooklynCatalogBrooklynCatalog.getCatalogItem(String, String) which checks (and casts) type for convenience
(returns null if type does not match)getCatalogItem in interface BrooklynCatalogpublic <T,SpecT> CatalogItem<T,SpecT> getCatalogItem(java.lang.Class<T> type, java.lang.String id, java.lang.String version)
BrooklynCatalogBrooklynCatalog.getCatalogItem(String, String) which checks (and casts) type for convenience
(returns null if type does not match)getCatalogItem in interface BrooklynCatalogpublic void persist(CatalogItem<?,?> catalogItem)
BrooklynCatalogpersist in interface BrooklynCatalogpublic java.lang.ClassLoader getRootClassLoader()
getRootClassLoader in interface BrooklynCatalogpublic void load()
public <T,SpecT> SpecT createSpec(CatalogItem<T,SpecT> item)
BrooklynCatalogcreateSpec in interface BrooklynCatalog@Deprecated public <T,SpecT> java.lang.Class<? extends T> loadClass(CatalogItem<T,SpecT> item)
BrooklynCatalogloadClass in interface BrooklynCatalog@Deprecated
public <T> java.lang.Class<? extends T> loadClassByType(java.lang.String typeName,
java.lang.Class<T> typeClass)
loadClassByType in interface BrooklynCatalogpublic CatalogItem<?,?> addItem(java.lang.String yaml)
BrooklynCatalogaddItem in interface BrooklynCatalogpublic java.util.List<? extends CatalogItem<?,?>> addItems(java.lang.String yaml)
BrooklynCatalogaddItems in interface BrooklynCatalogpublic CatalogItem<?,?> addItem(java.lang.String yaml, boolean forceUpdate)
BrooklynCatalogaddItem in interface BrooklynCatalogforceUpdate - If true allows catalog update even when an
item exists with the same symbolicName and versionpublic java.util.List<? extends CatalogItem<?,?>> addItems(java.lang.String yaml, boolean forceUpdate)
BrooklynCatalogaddItems in interface BrooklynCatalogforceUpdate - If true allows catalog update even when an
item exists with the same symbolicName and version@Deprecated public void addItem(CatalogItem<?,?> item)
BrooklynCatalogaddItem in interface BrooklynCatalog@Deprecated public CatalogItem<?,?> addItem(java.lang.Class<?> type)
BrooklynCatalogNote that the class will be available for this session only, although the record of the item will appear in the catalog DTO if exported, so it is recommended to edit the 'manual' catalog DTO if using it to generate a catalog, either adding the appropriate classpath URL or removing this entry.
addItem in interface BrooklynCatalogpublic <T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> getCatalogItems()
getCatalogItems in interface BrooklynCatalogpublic <T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> getCatalogItems(com.google.common.base.Predicate<? super CatalogItem<T,SpecT>> filter)
BrooklynCataloggetCatalogItems in interface BrooklynCatalogpublic java.lang.String toXmlString()
@Deprecated public CatalogItem<?,?> getCatalogItemForType(java.lang.String typeName)
getCatalogItemForType in interface BrooklynCatalog