@Exported public class AssetDataImpl extends Object implements MutableAssetData
AssetData
interface implementation classModifier | Constructor and Description |
---|---|
protected |
AssetDataImpl(AssetData copy)
Create an AssetData by copying an existing one.
|
|
AssetDataImpl(AssetId id)
Create an AssetData object with asset ID.
|
|
AssetDataImpl(AssetTypeDef assettype,
AssetId id)
Create an AssetData object with AssetTypeDef and asset ID.
|
Modifier and Type | Method and Description |
---|---|
void |
addAssociation(String associationName,
List<AssetId> assets)
Adds an associations by a given name.
|
void |
addAttributeData(AttributeData data)
Adds an attribute data.
|
AssetId |
getAssetId()
Returns unique identification of the asset instance
AssetId . |
AssetTypeDef |
getAssetTypeDef()
Returns
AssetTypeDef this instance is based on. |
List<AssetId> |
getAssociatedAssets(String name)
This method is lazy loading associated assets.
|
Iterable<String> |
getAssociationNames()
Retrieve the list of the association names that this asset contains data for.
|
List<AttributeData> |
getAttributeData()
Returns a list of all attribute data associated with this instance of asset.
|
AttributeData |
getAttributeData(String attributeName)
Returns data associated with a given attribute.
|
AttributeData |
getAttributeData(String attributeName,
boolean isMetaDataAttribute)
Returns a data associated with a given attribute.
|
List<String> |
getAttributeNames()
Returns List of attribute names contained in this instance of AssetData.
|
List<AssetId> |
getImmediateParents()
Returns the Asset Identifiers of immediate parents, if any.
|
List<AssetId> |
getImmediateParents(String parentDefName)
Returns the Asset Identifiers of immediate parents, if any.
|
List<AssetId> |
getParents()
Returns Asset identifiers of parent assets, if any.
|
AssetId |
getTreeNodeParentAssetId()
Returns the parent asset in the tree node.
|
void |
removeAttributeData(String attributeName)
Removes an attribute data from collection.
|
void |
setAssetId(AssetId assetId)
Sets unique identification of the asset instance
AssetId . |
void |
setAssociation(String associationName,
List<AssetId> assets)
Sets an associations by a given name.
|
void |
setAssociationsLoaded() |
void |
setAttributeData(List<AttributeData> data)
Sets data for this instance of AssetData.
|
void |
setParents(List<AssetId> id)
Sets parent assets for this instance of AssetData.
|
void |
setTreeNodeParentAssetId(AssetId treeNodeparentAssetId)
Sets the parent asset in the tree node.
|
public AssetDataImpl(AssetId id)
id
- - AssetId, the type and ID of the asset.public AssetDataImpl(AssetTypeDef assettype, AssetId id)
assettype
- - AssetTypeDef, the asset type definition of the asset.id
- - AssetId, the asset type and id of the asset.protected AssetDataImpl(AssetData copy) throws AssetAccessException
copy
- the asset data where to copy the data from.AssetAccessException
- is thrown when error happens read the data.public void setAttributeData(List<AttributeData> data)
MutableAssetData
setAttributeData
in interface MutableAssetData
data
- Data to set.public void addAttributeData(AttributeData data)
MutableAssetData
addAttributeData
in interface MutableAssetData
data
- Data to add.public void removeAttributeData(String attributeName)
MutableAssetData
removeAttributeData
in interface MutableAssetData
attributeName
- attribute to remove.public void setParents(List<AssetId> id) throws AssetAccessException
MutableAssetData
setParents
in interface MutableAssetData
id
- IDs of parents.AssetAccessException
- throw this Exception if error met.public void addAssociation(String associationName, List<AssetId> assets)
MutableAssetData
addAssociation
in interface MutableAssetData
associationName
- name of the association to add.assets
- to be added as associations.public void setAssociation(String associationName, List<AssetId> assets)
MutableAssetData
setAssociation
in interface MutableAssetData
associationName
- name of the association to add.assets
- to be added as associations.public AssetId getAssetId()
AssetData
AssetId
.getAssetId
in interface AssetData
public void setAssetId(AssetId assetId)
AssetData
AssetId
.setAssetId
in interface AssetData
assetId
- associated with the instance.public List<String> getAttributeNames()
AssetData
getAttributeNames
in interface AssetData
AssetTypeDef
to get to those).public AssetTypeDef getAssetTypeDef()
AssetData
AssetTypeDef
this instance is based on.getAssetTypeDef
in interface AssetData
public AttributeData getAttributeData(String attributeName)
AssetData
getAttributeData
in interface AssetData
attributeName
- name of the attribute.null
if there is no AttributeData of the specified name.public AttributeData getAttributeData(String attributeName, boolean isMetaDataAttribute)
AssetData
getAttributeData
in interface AssetData
attributeName
- name of the attribute.isMetaDataAttribute
- whether attribute is user defined, or it is system defined (for flex asset only).null
if no AttributeData of specified name and specified user defined
or not property.public List<AttributeData> getAttributeData()
AssetData
getAttributeData
in interface AssetData
public List<AssetId> getAssociatedAssets(String name)
getAssociatedAssets
in interface AssetData
name
- The association name that try to retrieve.public List<AssetId> getImmediateParents() throws AssetAccessException
AssetData
getImmediateParents
in interface AssetData
AssetAccessException
- captures layer specific failures and wraps other internal excetpionspublic List<AssetId> getParents() throws AssetAccessException
getParents
in interface AssetData
AssetAccessException
- captures layer specific failures and wraps other internal exceptions.public List<AssetId> getImmediateParents(String parentDefName) throws AssetAccessException
AssetData
getImmediateParents
in interface AssetData
parentDefName
- the name of the parent definition.AssetAccessException
- captures layer specific failures and wraps other internal exceptions.public Iterable<String> getAssociationNames()
String
list of existed association names.public void setAssociationsLoaded()
public AssetId getTreeNodeParentAssetId()
AssetData
getTreeNodeParentAssetId
in interface AssetData
public void setTreeNodeParentAssetId(AssetId treeNodeparentAssetId)
MutableAssetData
setTreeNodeParentAssetId
in interface MutableAssetData
treeNodeparentAssetId
- AssetId of the tree node parent.