public interface BrooklynCatalog
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_VERSION
Version set in catalog when creator does not supply a version, to mean a low priority item;
and used when requesting to indicate the best version.
|
Modifier and Type | Method and Description |
---|---|
void |
addItem(CatalogItem<?,?> item)
Deprecated.
since 0.7.0 Construct catalogs with yaml (referencing OSGi bundles) instead
|
CatalogItem<?,?> |
addItem(java.lang.Class<?> clazz)
Deprecated.
since 0.7.0 Construct catalogs with OSGi bundles instead.
This is used in a handful of tests which should be rewritten to refer to OSGi bundles.
|
CatalogItem<?,?> |
addItem(java.lang.String yaml)
Deprecated.
since 0.7.0 use
addItems(String, boolean) |
CatalogItem<?,?> |
addItem(java.lang.String yaml,
boolean forceUpdate)
Deprecated.
since 0.7.0 use
addItems(String, boolean) |
java.lang.Iterable<? extends CatalogItem<?,?>> |
addItems(java.lang.String yaml)
Adds items (represented in yaml) to the catalog.
|
java.lang.Iterable<? extends CatalogItem<?,?>> |
addItems(java.lang.String yaml,
boolean forceUpdate)
Adds items (represented in yaml) to the catalog.
|
<T,SpecT extends AbstractBrooklynObjectSpec<? extends T,SpecT>> |
createSpec(CatalogItem<T,SpecT> item)
creates a spec for the given catalog item, throwing exceptions if any problems
|
void |
deleteCatalogItem(java.lang.String symbolicName,
java.lang.String version) |
<T,SpecT> CatalogItem<T,SpecT> |
getCatalogItem(java.lang.Class<T> type,
java.lang.String symbolicName,
java.lang.String version)
variant of
getCatalogItem(String, String) which checks (and casts) type for convenience
(returns null if type does not match) |
CatalogItem<?,?> |
getCatalogItem(java.lang.String symbolicName,
java.lang.String version) |
<T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> |
getCatalogItems() |
<T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> |
getCatalogItems(
convenience for filtering items in the catalog; see CatalogPredicates for useful filters
|
java.lang.ClassLoader |
getRootClassLoader() |
void |
persist(CatalogItem<?,?> catalogItem)
persists the catalog item to the object store, if persistence is enabled
|
void |
reset(java.util.Collection<CatalogItem<?,?>> entries) |
static final java.lang.String DEFAULT_VERSION
getCatalogItem(String, String)
for discussion of the best version.)CatalogItem<?,?> getCatalogItem(java.lang.String symbolicName, java.lang.String version)
symbolicName
and optionally CatalogItem.getVersion()
,
taking the best version if the version is DEFAULT_VERSION
or null,
returning null if no matches are found.void deleteCatalogItem(java.lang.String symbolicName, java.lang.String version)
java.util.NoSuchElementException
- if not found<T,SpecT> CatalogItem<T,SpecT> getCatalogItem(java.lang.Class<T> type, java.lang.String symbolicName, java.lang.String version)
getCatalogItem(String, String)
which checks (and casts) type for convenience
(returns null if type does not match)<T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> getCatalogItems()
<T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> getCatalogItems(filter)
void persist(CatalogItem<?,?> catalogItem)
java.lang.ClassLoader getRootClassLoader()
<T,SpecT extends AbstractBrooklynObjectSpec<? extends T,SpecT>> SpecT createSpec(CatalogItem<T,SpecT> item)
@Deprecated CatalogItem<?,?> addItem(java.lang.String yaml)
addItems(String, boolean)
java.lang.IllegalArgumentException
- if the yaml was invalid@Deprecated CatalogItem<?,?> addItem(java.lang.String yaml, boolean forceUpdate)
addItems(String, boolean)
forceUpdate
- If true allows catalog update even when an
item exists with the same symbolicName and versionjava.lang.IllegalArgumentException
- if the yaml was invalidjava.lang.Iterable<? extends CatalogItem<?,?>> addItems(java.lang.String yaml)
java.lang.IllegalArgumentException
- if the yaml was invalidjava.lang.Iterable<? extends CatalogItem<?,?>> addItems(java.lang.String yaml, boolean forceUpdate)
forceUpdate
- If true allows catalog update even when an
item exists with the same symbolicName and versionjava.lang.IllegalArgumentException
- if the yaml was invalid@Deprecated void addItem(CatalogItem<?,?> item)
@Deprecated CatalogItem<?,?> addItem(java.lang.Class<?> clazz)
Note 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.
void reset(java.util.Collection<CatalogItem<?,?>> entries)