com.fatwire.assetapi.data
Class BasicAssetDataReadStrategy
java.lang.Object
com.fatwire.assetapi.data.BasicAssetDataReadStrategy
- All Implemented Interfaces:
- com.fatwire.assetapi.data.AssetDataReadStrategy
- Direct Known Subclasses:
- FormAttributeEditorReadStrategy, HistoryGroupReadStrategy, PageDefinitionReadStrategy, RecommendationReadStrategy, SegmentReadStrategy
public class BasicAssetDataReadStrategy
- extends java.lang.Object
- implements com.fatwire.assetapi.data.AssetDataReadStrategy
BasicAssetDataReadStrategy is basic class that read Content Server asset data. It reads
the asset data for the following asset types: Page, Collection, Link, Query, DimensionSet,
Dimension, Article, Linkset, Image; it also read asset data for all the Asset Maker asset
types, Flex Attribute types, Flex Filter Types, Flex (parent) Definition types, and other
asset types that do not have a specific reader.
Not only the BasicAssetDataReadStrategy reads these asset types, it also reads the basic
attribute values for Flex Assets, Flex Parent assets and other special asset types. If no
specific strategy is specified for an asset type, BasicAssetDataReadStrategy is going to
be used.
Method Summary |
protected Query |
_checkQuery(Query query)
|
protected AssetTypeDef |
_getAssetTypeDef(java.lang.String assettype,
java.lang.String subtype)
returnt the AssetTypeDef given asset type and subtype |
protected boolean |
allStandardAttributes(java.util.List<java.lang.String> attributeNames)
|
protected java.lang.String |
getAssetDefinitionType(ICS ics,
com.openmarket.xcelerate.asset.AssetType type,
java.lang.String attributename)
|
protected java.lang.String |
performQuery(Query query,
java.lang.String assettype,
java.lang.String subtype,
AssetTypeDef def,
boolean isFlex,
java.util.List<java.lang.String> uniqIds)
|
MutableAssetData |
read(com.openmarket.xcelerate.interfaces.IAsset asset,
AssetId id)
|
java.lang.Iterable<MutableAssetData> |
read(java.util.List<AssetId> ids)
|
java.lang.Iterable<MutableAssetData> |
read(Query query)
|
MutableAssetData |
readAttributes(AssetId id,
java.util.List<java.lang.String> attributeNames)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_ics
protected ICS _ics
_logger
protected static final org.apache.commons.logging.Log _logger
basicStandAttributes
public static java.util.List<java.lang.String> basicStandAttributes
BasicAssetDataReadStrategy
public BasicAssetDataReadStrategy(ICS ics)
read
public java.lang.Iterable<MutableAssetData> read(Query query)
throws AssetAccessException
- Specified by:
read
in interface com.fatwire.assetapi.data.AssetDataReadStrategy
- Throws:
AssetAccessException
_checkQuery
protected Query _checkQuery(Query query)
throws AssetAccessException
- Throws:
AssetAccessException
read
public MutableAssetData read(com.openmarket.xcelerate.interfaces.IAsset asset,
AssetId id)
throws AssetAccessException
- Specified by:
read
in interface com.fatwire.assetapi.data.AssetDataReadStrategy
- Throws:
AssetAccessException
read
public java.lang.Iterable<MutableAssetData> read(java.util.List<AssetId> ids)
throws AssetAccessException,
AssetNotExistException
- Specified by:
read
in interface com.fatwire.assetapi.data.AssetDataReadStrategy
- Throws:
AssetAccessException
AssetNotExistException
readAttributes
public MutableAssetData readAttributes(AssetId id,
java.util.List<java.lang.String> attributeNames)
throws AssetAccessException,
AssetNotExistException
- Specified by:
readAttributes
in interface com.fatwire.assetapi.data.AssetDataReadStrategy
- Throws:
AssetAccessException
AssetNotExistException
getAssetDefinitionType
protected java.lang.String getAssetDefinitionType(ICS ics,
com.openmarket.xcelerate.asset.AssetType type,
java.lang.String attributename)
throws com.openmarket.basic.interfaces.AssetException
- Throws:
com.openmarket.basic.interfaces.AssetException
performQuery
protected java.lang.String performQuery(Query query,
java.lang.String assettype,
java.lang.String subtype,
AssetTypeDef def,
boolean isFlex,
java.util.List<java.lang.String> uniqIds)
throws AssetAccessException
- Throws:
AssetAccessException
allStandardAttributes
protected boolean allStandardAttributes(java.util.List<java.lang.String> attributeNames)
_getAssetTypeDef
protected AssetTypeDef _getAssetTypeDef(java.lang.String assettype,
java.lang.String subtype)
throws AssetAccessException
- returnt the
AssetTypeDef
given asset type and subtype
- Parameters:
assettype
- the type of the assetsubtype
- the subtype of the asset
- Returns:
AssetTypeDef
the asset type defintion of the given asset type and subtype
- Throws:
AssetAccessException
- exception will be thrown from AssetTypeDefManager.findByName(assettype, subtype)
Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.