|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fatwire.assetapi.data.AssetDataManagerImpl
public class AssetDataManagerImpl
AssetDataManager
implementation class
Constructor Summary | |
---|---|
AssetDataManagerImpl(ICS ics)
|
Method Summary | |
---|---|
protected java.lang.Iterable |
_getAssets(Query query)
Get a Iterator of asset data, this method is common for both readonly load and mutuable load of assets In this case, we only return a Iterable and cast the returned data according to the usage |
MutableAssetData |
deepCopy(AssetData example)
Create a deep copy of an AssetData, all the data will be copied |
void |
delete(java.util.List<AssetId> data)
Deletes a given Iterator of AssetIds from database. |
void |
insert(java.util.List<AssetData> data)
Inserts a given List of AssetData instances in the database and new assets will be created with the data from the list After the operation complete, the passed in AssetData in the list will be populated with the newly created Asset id |
AssetData |
newAssetData(java.lang.String assetTypeName,
AssetData example)
Creates an instance of AssetData (with copied instances of AttributeData from the example AssetData) |
MutableAssetData |
newAssetData(java.lang.String assetTypeName,
java.lang.String subtype)
Create an empty instance of AssetData with empty instance of AttributeData |
AttributeData |
newAttribiteData(java.lang.String attributeName,
java.lang.String assetTypeName,
java.lang.String subtype)
Creates an empty instance of AttributeData (of appropriate type and default) |
AttributeData |
newAttributeData(AttributeDef attributeDef)
Create an attributeData with an attribute definition specified |
AttributeData |
newAttributeData(java.lang.String attributeName,
java.lang.String assetTypeName,
java.lang.String subtype)
Creates an empty instance of AttributeData (of appropriate type and default) |
java.lang.Iterable<AssetData> |
read(java.util.List<AssetId> ids)
Reads asset data for all given AssetId s. |
java.lang.Iterable<AssetData> |
read(Query query)
read a list of Asset Data that satisfy the query. |
AssetData |
readAttributes(AssetId id,
java.util.List<java.lang.String> attributeNames)
Reads given set attribute data and returns an AssetData instance containing them. |
java.lang.Iterable<MutableAssetData> |
readForUpdate(java.util.List<AssetId> ids)
read a list of asset data to update |
java.lang.Iterable<MutableAssetData> |
readForUpdate(Query query)
Reads all asset data that satisfies a given Query and results in mutable results. |
void |
update(java.util.List<AssetData> data)
Updates a given list of AssetData in the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AssetDataManagerImpl(ICS ics)
Method Detail |
---|
public java.lang.Iterable<AssetData> read(Query query) throws AssetAccessException
read
in interface AssetDataManager
query
- the Query object
AssetAccessException
protected java.lang.Iterable _getAssets(Query query) throws AssetAccessException
query
- - the query passed in
AssetAccessException
- - in case of errros, exception is thrownpublic java.lang.Iterable<MutableAssetData> readForUpdate(Query query) throws AssetAccessException
AssetDataManager
readForUpdate
in interface AssetDataManager
query
- Query to be satisfied.
AssetAccessException
- is the layer specific failures and wraps other internal exceptions.public java.lang.Iterable<AssetData> read(java.util.List<AssetId> ids) throws AssetAccessException, AssetNotExistException
AssetDataManager
AssetId
s.
read
in interface AssetDataManager
ids
- the list of asset ids to read
AssetAccessException
- rethrown excetpion
AssetNotExistException
public java.lang.Iterable<MutableAssetData> readForUpdate(java.util.List<AssetId> ids) throws AssetAccessException, AssetNotExistException
readForUpdate
in interface AssetDataManager
ids
- the list of asset ids to read
AssetAccessException
AssetNotExistException
public AssetData readAttributes(AssetId id, java.util.List<java.lang.String> attributeNames) throws AssetAccessException, AssetNotExistException
AssetDataManager
readAttributes
in interface AssetDataManager
id
- AssetId to read attributes forattributeNames
- names of the attributes
AssetAccessException
- if thrown if the AssetId does not exist or attribute names passed are incorrect
for the asset. AssetAccessException also wraps any AssetExcptions thrown by the internal implementation.
AssetNotExistException
public void insert(java.util.List<AssetData> data) throws AssetAccessException
AssetDataManager
insert
in interface AssetDataManager
data
- AssetData to be inserted.
AssetAccessException
- captures layer specific failures and wraps other internal exceptions.public void update(java.util.List<AssetData> data) throws AssetAccessException
AssetDataManager
update
in interface AssetDataManager
data
- AssetData to be updated.
AssetAccessException
- captures layer specific failures and wraps other internal exceptions.public void delete(java.util.List<AssetId> data) throws AssetAccessException
AssetDataManager
delete
in interface AssetDataManager
data
- AssetIds to be deleted.
AssetAccessException
- captures layer specific failures and wraps other internal exceptions.public AttributeData newAttribiteData(java.lang.String attributeName, java.lang.String assetTypeName, java.lang.String subtype)
AssetDataManager
newAttribiteData
in interface AssetDataManager
attributeName
- name of the attributeassetTypeName
- name of asset typesubtype
- subtype of asset type.
public AttributeData newAttributeData(java.lang.String attributeName, java.lang.String assetTypeName, java.lang.String subtype)
AssetDataManager
newAttributeData
in interface AssetDataManager
attributeName
- name of the attributeassetTypeName
- name of asset typesubtype
- subtype of asset type.
public AttributeData newAttributeData(AttributeDef attributeDef)
AssetDataManager
newAttributeData
in interface AssetDataManager
attributeDef
- the definition of the attribute
public MutableAssetData newAssetData(java.lang.String assetTypeName, java.lang.String subtype) throws AssetAccessException
AssetDataManager
newAssetData
in interface AssetDataManager
assetTypeName
- the name of the assettypesubtype
- the name of the aset subtype
AssetAccessException
public AssetData newAssetData(java.lang.String assetTypeName, AssetData example)
AssetDataManager
newAssetData
in interface AssetDataManager
assetTypeName
- name of the asset typeexample
- optional example AsetData the returned will be based on.
public MutableAssetData deepCopy(AssetData example) throws AssetAccessException
example
- the asset data where to copy the data from
AssetAccessException
- throws exception if error met creating the copy
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |