public class CatalogUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static char |
VERSION_DELIMITER |
Constructor and Description |
---|
CatalogUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getCatalogItemIdFromLoader(BrooklynClassLoadingContext loader)
Scans the given
BrooklynClassLoadingContext to detect what catalog item id is in effect. |
static <T,SpecT> CatalogItem<T,SpecT> |
getCatalogItemOptionalVersion(ManagementContext mgmt,
java.lang.Class<T> type,
java.lang.String versionedId) |
static CatalogItem<?,?> |
getCatalogItemOptionalVersion(ManagementContext mgmt,
java.lang.String versionedId) |
static BrooklynClassLoadingContext |
getClassLoadingContext(Entity entity) |
static java.lang.String |
getIdFromVersionedId(java.lang.String versionedId) |
static java.lang.String |
getVersionedId(java.lang.String id,
java.lang.String version) |
static java.lang.String |
getVersionFromVersionedId(java.lang.String versionedId) |
static void |
installLibraries(ManagementContext managementContext,
java.util.Collection<CatalogItem.CatalogBundle> libraries)
Registers all bundles with the management context's OSGi framework.
|
static void |
logDebugOrTraceIfRebinding(org.slf4j.Logger log,
java.lang.String message,
java.lang.Object... args) |
static boolean |
looksLikeVersionedId(java.lang.String versionedId) |
static BrooklynClassLoadingContext |
newClassLoadingContext(ManagementContext mgmt,
CatalogItem<?,?> item) |
static BrooklynClassLoadingContext |
newClassLoadingContext(ManagementContext mgmt,
java.lang.String catalogItemId,
java.util.Collection<CatalogItem.CatalogBundle> libraries) |
static BrooklynClassLoadingContext |
newClassLoadingContext(ManagementContext mgmt,
java.lang.String catalogItemId,
java.util.Collection<CatalogItem.CatalogBundle> libraries,
java.lang.ClassLoader customClassLoader)
Deprecated.
since 0.7.0 only for legacy catalog items which provide a non-osgi loader; see
#newDefault(ManagementContext) |
static void |
setCatalogItemIdOnAddition(Entity entity,
BrooklynObject itemBeingAdded) |
public static final char VERSION_DELIMITER
public static BrooklynClassLoadingContext newClassLoadingContext(ManagementContext mgmt, CatalogItem<?,?> item)
public static BrooklynClassLoadingContext getClassLoadingContext(Entity entity)
public static BrooklynClassLoadingContext newClassLoadingContext(@Nullable ManagementContext mgmt, java.lang.String catalogItemId, java.util.Collection<CatalogItem.CatalogBundle> libraries)
@Deprecated public static BrooklynClassLoadingContext newClassLoadingContext(@Nullable ManagementContext mgmt, java.lang.String catalogItemId, java.util.Collection<CatalogItem.CatalogBundle> libraries, java.lang.ClassLoader customClassLoader)
#newDefault(ManagementContext)
public static void installLibraries(ManagementContext managementContext, @Nullable java.util.Collection<CatalogItem.CatalogBundle> libraries)
public static java.lang.String getCatalogItemIdFromLoader(BrooklynClassLoadingContext loader)
BrooklynClassLoadingContext
to detect what catalog item id is in effect.public static void setCatalogItemIdOnAddition(Entity entity, BrooklynObject itemBeingAdded)
@Beta public static void logDebugOrTraceIfRebinding(org.slf4j.Logger log, java.lang.String message, java.lang.Object... args)
public static boolean looksLikeVersionedId(java.lang.String versionedId)
public static java.lang.String getIdFromVersionedId(java.lang.String versionedId)
public static java.lang.String getVersionFromVersionedId(java.lang.String versionedId)
public static java.lang.String getVersionedId(java.lang.String id, java.lang.String version)
public static CatalogItem<?,?> getCatalogItemOptionalVersion(ManagementContext mgmt, java.lang.String versionedId)
public static <T,SpecT> CatalogItem<T,SpecT> getCatalogItemOptionalVersion(ManagementContext mgmt, java.lang.Class<T> type, java.lang.String versionedId)