|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fatwire.assetapi.data.BasicAssetDataWriteStrategy
public class BasicAssetDataWriteStrategy
BasicAssetDataWriteStrategy is used to handle the write operation for basic asset types in Content Server through Asset API
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.fatwire.assetapi.data.AssetDataWriteStrategy |
---|
AssetDataWriteStrategy.AssetActionType |
Field Summary | |
---|---|
protected ICS |
_ics
|
protected static org.apache.commons.logging.Log |
_logger
|
Method Summary | |
---|---|
protected AssetTypeDef |
_getAssetTypeDef(java.lang.String assettype,
java.lang.String subtype)
returnt the AssetTypeDef given asset type and subtype |
protected void |
_save(java.util.List<IAsset> instances,
boolean insert)
Saves a list of asset instances to Content Server |
void |
delete(java.util.List<AssetId> data)
Delete a given list of assts from Content Server |
protected IAsset |
getInstance(AssetData data,
AssetDataWriteStrategy.AssetActionType type,
java.util.List<java.lang.String> ignoreAttributes,
boolean insert)
Gets an IAsset instance with the given asset data |
protected java.util.List<IAsset> |
getInstances(java.util.List<AssetData> data,
AssetDataWriteStrategy.AssetActionType type,
java.util.List<java.lang.String> ignoreAttributes,
boolean insert)
Gets a list of IAsset instances given a list of asset data |
void |
write(java.util.List<AssetData> data,
AssetDataWriteStrategy.AssetActionType type)
Inserts a given Iterator of AssetData instances in the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log _logger
protected ICS _ics
Method Detail |
---|
public void delete(java.util.List<AssetId> data) throws AssetAccessException
AssetDataWriteStrategy
delete
in interface AssetDataWriteStrategy
data
- the list of AssetIds to delete
AssetAccessException
- AssetAccessException captures layer specific failures and wraps other internal exceptions.public void write(java.util.List<AssetData> data, AssetDataWriteStrategy.AssetActionType type) throws AssetAccessException
AssetDataWriteStrategy
write
in interface AssetDataWriteStrategy
data
- AssetData to be inserted.type
- the type of operation for the list of assets
AssetAccessException
- captures layer specific failures and wraps other internal exceptions.protected void _save(java.util.List<IAsset> instances, boolean insert) throws AssetAccessException
instances
- the assets to saveinsert
- whether the assets will be saved as new; true indicates they are new assets; false indicates not
AssetAccessException
- throws the exception if error met in savingprotected java.util.List<IAsset> getInstances(java.util.List<AssetData> data, AssetDataWriteStrategy.AssetActionType type, java.util.List<java.lang.String> ignoreAttributes, boolean insert) throws AssetAccessException
data
- data the asset datas used to construct the IAssetstype
- the action type AssetActionType.NEW or AssetActionType.UPDATEignoreAttributes
- the list of attributes that will be ignored from the asset datasinsert
- whether it is an insert
AssetAccessException
- throws this exception if error metprotected IAsset getInstance(AssetData data, AssetDataWriteStrategy.AssetActionType type, java.util.List<java.lang.String> ignoreAttributes, boolean insert) throws AssetAccessException
data
- the asset data used to construct the IAssettype
- the action type AssetActionType.NEW or AssetActionType.UPDATEignoreAttributes
- the list of attributes that will be ignored from the asset datainsert
- whether it is an insert
AssetAccessException
- throws this exception if error metprotected AssetTypeDef _getAssetTypeDef(java.lang.String assettype, java.lang.String subtype) throws AssetAccessException
AssetTypeDef
given asset type and subtype
assettype
- the type of the assetsubtype
- the subtype of the asset
AssetTypeDef
the asset type defintion of the given asset type and subtype
AssetAccessException
- exception will be thrown from AssetTypeDefManager.findByName(assettype, subtype)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |