public class BasicManagedBundle extends AbstractBrooklynObject implements ManagedBundle, BrooklynObjectInternal
BrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
Constructor and Description |
---|
BasicManagedBundle()
Creates an empty one, with an ID, expecting other fields will be populated.
|
BasicManagedBundle(java.lang.String name,
java.lang.String version,
java.lang.String url,
Credentials credentials,
java.lang.String checksum) |
BasicManagedBundle(java.lang.String name,
java.lang.String version,
java.lang.String url,
java.lang.String checksum) |
Modifier and Type | Method and Description |
---|---|
BrooklynObjectInternal.ConfigurationSupportInternal |
config() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getChecksum()
MD5 checksum of the contents of bundle as installed to OSGi
|
<T> T |
getConfig(ConfigKey<T> key)
Convenience for calling
Configurable.ConfigurationSupport.get(ConfigKey) ,
via code like config().get(key) . |
java.lang.String |
getDisplayName()
A display name; recommended to be a concise single-line description.
|
java.lang.String |
getOsgiUniqueUrl()
Gets the (internal) value to be used as the location in bundleContext.install(location).
|
java.lang.String |
getOsgiVersionString()
guaranteed to be in OSGi syntax, or null if name+version not available
|
boolean |
getPersistenceNeeded() |
RebindSupport<?> |
getRebindSupport() |
java.lang.String |
getSuppliedVersionString()
string as defined by caller; not necessarily in OSGi syntax
|
java.lang.String |
getSymbolicName() |
java.lang.String |
getUrl()
where this bundle can be downloaded; typically required unless we are guaranteed the bundle will be manually installed or handled by persistence
|
Credentials |
getUrlCredential() |
VersionedName |
getVersionedName() |
int |
hashCode() |
boolean |
isNameResolved() |
static ManagedBundle |
of(CatalogItem.CatalogBundle bundle) |
void |
setChecksum(java.lang.String md5Checksum) |
void |
setDisplayName(java.lang.String newName) |
void |
setPersistenceNeeded(boolean val) |
void |
setSymbolicName(java.lang.String symbolicName) |
void |
setUrl(java.lang.String url) |
void |
setVersion(java.lang.String version) |
BrooklynObjectInternal.SubscriptionSupportInternal |
subscriptions()
Subscriptions are the mechanism for receiving notifications of sensor-events (e.g.
|
java.lang.String |
toString() |
addSearchPath, getCatalogItemId, getCatalogItemIdSearchPath, getId, getManagementContext, init, rebind, relations, setCatalogItemId, setCatalogItemIdAndSearchPath, setManagementContext, stackCatalogItemId, tags
addSearchPath, getManagementContext, relations, setCatalogItemId, setCatalogItemIdAndSearchPath, stackCatalogItemId
getCatalogItemId, getCatalogItemIdSearchPath, tags
getId
public BasicManagedBundle()
public BasicManagedBundle(java.lang.String name, java.lang.String version, java.lang.String url, @Nullable java.lang.String checksum)
public BasicManagedBundle(java.lang.String name, java.lang.String version, java.lang.String url, Credentials credentials, @Nullable java.lang.String checksum)
public boolean isNameResolved()
isNameResolved
in interface OsgiBundleWithUrl
public java.lang.String getSymbolicName()
getSymbolicName
in interface OsgiBundleWithUrl
public void setSymbolicName(java.lang.String symbolicName)
public java.lang.String getSuppliedVersionString()
OsgiBundleWithUrl
getSuppliedVersionString
in interface OsgiBundleWithUrl
public java.lang.String getOsgiVersionString()
OsgiBundleWithUrl
getOsgiVersionString
in interface OsgiBundleWithUrl
public void setVersion(java.lang.String version)
public VersionedName getVersionedName()
getVersionedName
in interface ManagedBundle
getVersionedName
in interface OsgiBundleWithUrl
VersionedName
for this bundle, or null if not availablepublic java.lang.String getUrl()
OsgiBundleWithUrl
getUrl
in interface OsgiBundleWithUrl
public Credentials getUrlCredential()
getUrlCredential
in interface OsgiBundleWithUrl
OsgiBundleWithUrl.getUrl()
.public void setUrl(java.lang.String url)
public java.lang.String getOsgiUniqueUrl()
getOsgiUniqueUrl
in interface ManagedBundle
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getDisplayName()
BrooklynObject
getDisplayName
in interface BrooklynObject
public <T> T getConfig(ConfigKey<T> key)
Configurable
Configurable.ConfigurationSupport.get(ConfigKey)
,
via code like config().get(key)
.getConfig
in interface Configurable
public RebindSupport<?> getRebindSupport()
getRebindSupport
in interface Rebindable
getRebindSupport
in interface BrooklynObjectInternal
public BrooklynObjectInternal.ConfigurationSupportInternal config()
config
in interface Configurable
config
in interface BrooklynObjectInternal
public BrooklynObjectInternal.SubscriptionSupportInternal subscriptions()
BrooklynObject
subscriptions
in interface BrooklynObject
subscriptions
in interface BrooklynObjectInternal
public void setDisplayName(java.lang.String newName)
setDisplayName
in class AbstractBrooklynObject
public java.lang.String getChecksum()
ManagedBundle
getChecksum
in interface ManagedBundle
public void setChecksum(java.lang.String md5Checksum)
public static ManagedBundle of(CatalogItem.CatalogBundle bundle)
public void setPersistenceNeeded(boolean val)
public boolean getPersistenceNeeded()