public class BasicBrooklynCatalog extends java.lang.Object implements BrooklynCatalog
| Modifier and Type | Class and Description |
|---|---|
static class |
BasicBrooklynCatalog.BrooklynLoaderTracker |
| 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.
|
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) |
CatalogDo |
getCatalog() |
<T,SpecT> CatalogItem<T,SpecT> |
getCatalogItem(java.lang.Class<T> type,
java.lang.String id)
variant of
BrooklynCatalog.getCatalogItem(String) which checks (and casts) type for convenience
(returns null if type does not match) |
CatalogItem<?,?> |
getCatalogItem(java.lang.String idOrRegisteredTypeName) |
<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 |
reset(CatalogDto dto) |
void |
reset(java.util.Collection<CatalogItem<?,?>> entries)
Resets the catalog to the given entries
|
void |
resetCatalogToContentsAtConfiguredUrl() |
java.lang.String |
toXmlString() |
public BasicBrooklynCatalog(ManagementContext mgmt)
public BasicBrooklynCatalog(ManagementContext mgmt, CatalogDto dto)
public boolean blockIfNotLoaded(Duration timeout)
public void reset(CatalogDto dto)
public void reset(java.util.Collection<CatalogItem<?,?>> entries)
reset in interface BrooklynCatalogpublic CatalogDo getCatalog()
public CatalogItem<?,?> getCatalogItem(java.lang.String idOrRegisteredTypeName)
getCatalogItem in interface BrooklynCatalogregisteredTypeName, or null if not found.public void deleteCatalogItem(java.lang.String id)
deleteCatalogItem in interface BrooklynCatalogpublic <T,SpecT> CatalogItem<T,SpecT> getCatalogItem(java.lang.Class<T> type, java.lang.String id)
BrooklynCatalogBrooklynCatalog.getCatalogItem(String) which checks (and casts) type for convenience
(returns null if type does not match)getCatalogItem 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 BrooklynCatalog@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()
public void resetCatalogToContentsAtConfiguredUrl()