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 |
addCatalogLegacyItemsOnRebind(java.lang.Iterable<? extends CatalogItem<?,?>> items)
Deprecated.
since 1.0.0; instead use bundles in persisted state!
|
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.
|
java.lang.Iterable<? extends CatalogItem<?,?>> |
addItems(java.lang.String yaml)
As
#addItemsFromBundle(String, ManagedBundle) with a null bundle. |
java.lang.Iterable<? extends CatalogItem<?,?>> |
addItems(java.lang.String yaml,
boolean forceUpdate)
Deprecated.
since 1.0.0 use
addItems(String) or addItems(String, boolean, boolean) |
java.lang.Iterable<? extends CatalogItem<?,?>> |
addItems(java.lang.String yaml,
boolean validate,
boolean forceUpdate)
Adds items (represented in yaml) to the catalog.
|
java.lang.Iterable<? extends CatalogItem<?,?>> |
addItems(java.lang.String yaml,
ManagedBundle definingBundle)
Adds items (represented in yaml) to the catalog coming from the indicated managed bundle.
|
java.lang.Iterable<? extends CatalogItem<?,?>> |
addItems(java.lang.String yaml,
ManagedBundle bundle,
boolean forceUpdate)
As
addItems(String, ManagedBundle) but exposing forcing option as per #addItem(String, boolean) . |
void |
addTypesFromBundleBom(java.lang.String yaml,
ManagedBundle bundle,
boolean forceUpdate,
java.util.Map<RegisteredType,RegisteredType> result)
Adds the given registered types defined in a bundle's catalog BOM;
no validation performed, so caller should do that subsequently after
loading all potential inter-dependent types.
|
<T,SpecT extends AbstractBrooklynObjectSpec<? extends T,SpecT>> |
createSpec(CatalogItem<T,SpecT> item)
Deprecated.
since 0.10.0; use
peekSpec(CatalogItem) for a preview of what the item
corresponds to. |
void |
deleteCatalogItem(java.lang.String symbolicName,
java.lang.String version)
Deprecated.
since 0.12.0 use
BrooklynTypeRegistry instead |
void |
deleteCatalogItem(java.lang.String symbolicName,
java.lang.String version,
boolean alsoCheckTypeRegistry,
boolean failIfNotFound)
Deprecated.
since introduced in 1.0.0, only used for transitioning
|
<T,SpecT> CatalogItem<T,SpecT> |
getCatalogItem(java.lang.Class<T> type,
java.lang.String symbolicName,
java.lang.String version)
Deprecated.
since 0.12.0 use
BrooklynTypeRegistry instead |
CatalogItem<?,?> |
getCatalogItem(java.lang.String symbolicName,
java.lang.String version)
Deprecated.
since 0.12.0 use
BrooklynTypeRegistry instead |
<T,SpecT> CatalogItem<T,SpecT> |
getCatalogItemLegacy(java.lang.Class<T> type,
java.lang.String symbolicName,
java.lang.String version)
Deprecated.
since 0.12.0 only provided to allow TypeRegistry to see the legacy items
|
CatalogItem<?,?> |
getCatalogItemLegacy(java.lang.String symbolicName,
java.lang.String version)
Deprecated.
since 0.12.0 only provided to allow TypeRegistry to see the legacy items
|
<T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> |
getCatalogItems()
Deprecated.
since 0.12.0 use
BrooklynTypeRegistry instead |
<T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> |
getCatalogItems(<any> filter)
Deprecated.
since 0.12.0 use
BrooklynTypeRegistry instead |
<T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> |
getCatalogItemsLegacy()
Deprecated.
since 0.12.0 only provided to allow TypeRegistry to see the legacy items
|
<T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> |
getCatalogItemsLegacy(<any> filter)
Deprecated.
since 0.12.0 only provided to allow TypeRegistry to see the legacy items
|
java.lang.ClassLoader |
getRootClassLoader() |
AbstractBrooklynObjectSpec<?,?> |
peekSpec(CatalogItem<?,?> item)
Creates a spec for the given catalog item, throwing exceptions if any problems.
|
void |
persist(CatalogItem<?,?> catalogItem)
persists the catalog item to the object store, if persistence is enabled
|
void |
reset(java.util.Collection<CatalogItem<?,?>> entries) |
java.util.Collection<java.lang.Throwable> |
validateType(RegisteredType typeToValidate,
RegisteredTypeLoadingContext optionalConstraint)
Performs YAML validation on the given type, returning a collection of errors.
|
java.util.Map<RegisteredType,java.util.Collection<java.lang.Throwable>> |
validateTypes(java.lang.Iterable<RegisteredType> typesToValidate)
As
#validateType(RegisteredType) but taking a set of types, returning a map whose keys are
those types where validation failed, mapped to the collection of errors validating that type. |
static final java.lang.String DEFAULT_VERSION
getCatalogItem(String, String)
for discussion of the best version.)@Deprecated CatalogItem<?,?> getCatalogItem(java.lang.String symbolicName, java.lang.String version)
BrooklynTypeRegistry
insteadsymbolicName
and optionally CatalogItem.getVersion()
,
taking the best version if the version is DEFAULT_VERSION
or null,
returning null if no matches are found.@Deprecated CatalogItem<?,?> getCatalogItemLegacy(java.lang.String symbolicName, java.lang.String version)
getCatalogItem(String, String)
but only looking in legacy catalog@Deprecated void deleteCatalogItem(java.lang.String symbolicName, java.lang.String version)
BrooklynTypeRegistry
insteadjava.util.NoSuchElementException
- if not found@Deprecated void deleteCatalogItem(java.lang.String symbolicName, java.lang.String version, boolean alsoCheckTypeRegistry, boolean failIfNotFound)
symbolicName
and versionjava.util.NoSuchElementException
- if not found@Deprecated <T,SpecT> CatalogItem<T,SpecT> getCatalogItem(java.lang.Class<T> type, java.lang.String symbolicName, java.lang.String version)
BrooklynTypeRegistry
insteadgetCatalogItem(String, String)
which checks (and casts) type for convenience
(returns null if type does not match)@Deprecated <T,SpecT> CatalogItem<T,SpecT> getCatalogItemLegacy(java.lang.Class<T> type, java.lang.String symbolicName, java.lang.String version)
@Deprecated <T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> getCatalogItems()
BrooklynTypeRegistry
instead@Deprecated <T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> getCatalogItemsLegacy()
@Deprecated <T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> getCatalogItems(<any> filter)
BrooklynTypeRegistry
instead@Deprecated <T,SpecT> java.lang.Iterable<CatalogItem<T,SpecT>> getCatalogItemsLegacy(<any> filter)
void persist(CatalogItem<?,?> catalogItem)
java.lang.ClassLoader getRootClassLoader()
@Deprecated <T,SpecT extends AbstractBrooklynObjectSpec<? extends T,SpecT>> SpecT createSpec(CatalogItem<T,SpecT> item)
peekSpec(CatalogItem)
for a preview of what the item
corresponds to.AbstractBrooklynObjectSpec<?,?> peekSpec(CatalogItem<?,?> item)
EntityManagementUtils.createEntitySpecForApplication(ManagementContext mgmt, String plan)
for how apps are deployed.void addTypesFromBundleBom(java.lang.String yaml, ManagedBundle bundle, boolean forceUpdate, java.util.Map<RegisteredType,RegisteredType> result)
java.util.Map<RegisteredType,java.util.Collection<java.lang.Throwable>> validateTypes(java.lang.Iterable<RegisteredType> typesToValidate)
#validateType(RegisteredType)
but taking a set of types, returning a map whose keys are
those types where validation failed, mapped to the collection of errors validating that type.
An empty map result indicates no validation errors in the types passed in.java.util.Collection<java.lang.Throwable> validateType(RegisteredType typeToValidate, @Nullable RegisteredTypeLoadingContext optionalConstraint)
Validation may be side-effecting in that it sets metadata and refines supertypes for the given registered type.
java.lang.Iterable<? extends CatalogItem<?,?>> addItems(java.lang.String yaml)
#addItemsFromBundle(String, ManagedBundle)
with a null bundle.
(Only used for legacy-mode additions.)java.lang.Iterable<? extends CatalogItem<?,?>> addItems(java.lang.String yaml, @Nullable ManagedBundle definingBundle)
java.lang.IllegalArgumentException
- if the yaml was invalid@Deprecated java.lang.Iterable<? extends CatalogItem<?,?>> addItems(java.lang.String yaml, boolean forceUpdate)
addItems(String)
or addItems(String, boolean, 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, boolean validate, boolean forceUpdate)
validate
- Whether to validate the types (default true)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, ManagedBundle bundle, boolean forceUpdate)
addItems(String, ManagedBundle)
but exposing forcing option as per #addItem(String, boolean)
.
(Only used for legacy-mode additions.)@Deprecated void addItem(CatalogItem<?,?> item)
@Deprecated void addCatalogLegacyItemsOnRebind(java.lang.Iterable<? extends CatalogItem<?,?>> items)
reset(Collection)
but where it
just adds without removing the existing content. Note this is very different from
addItem(CatalogItem)
, which adds to the 'manual' catalog.@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)