public abstract class AbstractAsset extends PropertyHolder implements MutableAsset
Asset implementation.Asset| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAsset(AssetType type,
String name,
RepositoryService service,
Property... properties)
Creates an instance with a given _type, name, target repository service, and properties.
|
protected |
AbstractAsset(AssetType type,
String id,
String name,
Property... properties)
Creates an instance with a given _type, identifier, name, and properties.
|
protected |
AbstractAsset(AssetType type,
String id,
String name,
RepositoryService service,
Property... properties)
Creates an instance with a given _type,identifier, name, target repository service, and properties.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
id()
Returns the identifier of this asset.
|
String |
name()
Returns the name of this asset.
|
RepositoryService |
service()
Returns the
RepositoryService with which this asset was retrieved or should be published. |
void |
setService(RepositoryService service)
Sets the
RepositoryService with which this asset was retrieved or should be published |
void |
setVersion(String version)
Sets the version of this asset
|
String |
toString() |
AssetType |
type()
Returns the
AssetType of this asset. |
String |
version()
Returns the version of this asset, if available.
|
properties, propertiesclone, finalize, getClass, notify, notifyAll, wait, wait, waitpropertiesprotected AbstractAsset(AssetType type, String id, String name, Property... properties)
Inherit as a plugin-facing constructor for asset discovery and retrieval.
_type - the _typeid - the identifiername - the nameproperties - the propertiesprotected AbstractAsset(AssetType type, String id, String name, RepositoryService service, Property... properties)
Inherit as a client-facing constructor for asset publication with services that allow client-defined identifiers.
_type - the _typeid - the identifiername - the nameservice - the target serviceproperties - the propertiesprotected AbstractAsset(AssetType type, String name, RepositoryService service, Property... properties)
Inherit as a client-facing constructor for asset publication with services that do now allow client-defined identifiers, or else that force services to generate identifiers.
name - the nameservice - the target serviceproperties - the propertiespublic String version()
Assetpublic void setVersion(String version)
setVersion in interface MutableAssetversion - the versionpublic String id()
AssetThe identifier must unambiguously distinguish this asset from any other asset that can be retrieved or published with any repository service.
public AssetType type()
AssetAssetType of this asset.public RepositoryService service()
AssetRepositoryService with which this asset was retrieved or should be published.public void setService(RepositoryService service)
MutableAssetRepositoryService with which this asset was retrieved or should be publishedsetService in interface MutableAssetservice - the servicepublic String name()
AssetThe name must unambiguously distinguish this asset from any other asset that can be retrieved or published with repository service associated with this asset.
public int hashCode()
hashCode in class PropertyHolderpublic boolean equals(Object obj)
equals in class PropertyHolderCopyright © 2018. All rights reserved.