public interface BrooklynCatalog
Modifier and Type | Method and Description |
---|---|
void |
addItem(CatalogItem<?,?> item)
Deprecated.
since 0.7.0 Construct catalogs with OSGi bundles instead
|
CatalogItem<?,?> |
addItem(java.lang.Class<?> clazz)
Deprecated.
since 0.7.0 Construct catalogs with OSGi bundles instead
|
CatalogItem<?,?> |
addItem(java.lang.String yaml)
Adds an item (represented in yaml) to the catalog.
|
<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) |
<T,SpecT> CatalogItem<T,SpecT> |
getCatalogItem(java.lang.Class<T> type,
java.lang.String id)
variant of
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() |
<T,SpecT> java.lang.Class<? extends T> |
loadClass(CatalogItem<T,SpecT> item)
Deprecated.
since 0.7.0 use
createSpec(CatalogItem) |
<T> java.lang.Class<? extends T> |
loadClassByType(java.lang.String typeName,
java.lang.Class<T> typeClass)
Deprecated.
since 0.7.0 use
createSpec(CatalogItem) |
void |
reset(java.util.Collection<CatalogItem<?,?>> entries) |
CatalogItem<?,?> getCatalogItem(java.lang.String idOrRegisteredTypeName)
registeredTypeName
, or null if not found.void deleteCatalogItem(java.lang.String id)
java.util.NoSuchElementException
- if not found<T,SpecT> CatalogItem<T,SpecT> getCatalogItem(java.lang.Class<T> type, java.lang.String id)
getCatalogItem(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(com.google.common.base.Predicate<? super CatalogItem<T,SpecT>> filter)
java.lang.ClassLoader getRootClassLoader()
<T,SpecT> SpecT createSpec(CatalogItem<T,SpecT> item)
@Deprecated <T,SpecT> java.lang.Class<? extends T> loadClass(CatalogItem<T,SpecT> item)
createSpec(CatalogItem)
@Deprecated <T> java.lang.Class<? extends T> loadClassByType(java.lang.String typeName, java.lang.Class<T> typeClass)
createSpec(CatalogItem)
CatalogItem<?,?> addItem(java.lang.String yaml)
java.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)