public interface AssetFacade
Modifier and Type | Method and Description |
---|---|
List<AssetResultRow> |
executeContentQuery(String siteName, Long assetId, String assetName, int limit, String sortingField, boolean ascending)
Execute a ContentQuery to retrieve the results
|
AssetId |
filterSingleAsset(AssetId asset, String desiredLocale, String dimensionSetName)
Filter an asset based on a DimensionSet and a preferred locale
|
List<String> |
getAllAssociations(AssetId id)
Get a list of all defined associations for a given asset
|
List<String> |
getAllAttributes(AssetId id)
Get a list of all defined attributes back for given asset id
|
AssetId |
getAssetByName(String site, String assetType, String assetName)
Retrieve an asset id from an asset name; for the possible multiple returns (assets with same names), we will return the first asset from the list
|
String |
getField(String assettype, String id, String fieldName)
Get a field for a given asset type and id
|
String |
getICSVar(String name)
Get an ICS variable given name
|
List<AssetId> |
getImmediateChildren(String siteName, AssetId assetId)
Get the immediate children of a given flex parent asset
|
Long |
getPublicationId(String assetName)
Get the publication id given a publication name
|
List<RecommendedAssetId> |
getRecommendations(String recommendationName, String alias, String profileName, Map<String,Object> profile, String segments, String sitename, boolean keepSegments)
Get a list of recommended assets
|
AssetId |
getRelative(AssetId asset, String locale)
Get a relative of a given asset using the preferred locale
|
Collection<AssetId> |
getRelatives(AssetId assetId)
Retrieve the relatives of a given asset in a Collection
|
List<AssetId> |
getSegments(String alias, String profileName, Map<String,Object> profile, String sitename)
Get the segments that the visitor belongs to with visitor alias and visitor attributes
|
String |
getSubtype(AssetId asset)
Get the subtype for a given asset
|
boolean |
isAssetInSite(AssetId asset, String site) |
boolean |
isAttributeExist(AssetData assetData, String attribute)
Check if an Attribute exist in current assetData
|
boolean |
isValid(AssetId id, Date date)
Check an asset is valid or not for a given date
|
String |
makeBlobLink(BlobLinkInfo linkInfo)
Generate a blob link given table, identifierColumnName, identifier, and columnname with given BlobLinkInfo
|
String |
makeLink(LinkInfo linkInfo)
Generate a link given asset, template name and LinkInfo
|
String |
processEmbeddedLink(InputStream data)
Process the embeddedLink inside a binary attribute and return the processed result
|
String |
processEmbeddedLink(String data)
Process the embeddedLink inside a String/Text attribute and return the processed result
|
AssetData |
read(AssetId assetId, List<String> attributes)
Reads given set attribute data and returns an AssetData instance containing them.
|
Iterable<AssetData> |
read(List<AssetId> assetIds, boolean immediateOnly)
Read a list of AssetData given a list of AssetIds
|
List<AssetId> |
retainSegments(String alias, String profileName, Map<String,Object> profile, String segments, String sitename)
Get the segments from the specified list that the visitor belongs to with visitor alias and visitor attributes
|
Iterable<AssetData> read(List<AssetId> assetIds, boolean immediateOnly) throws AssetAccessException
assetIds
- the list of asset ids to readAssetAccessException
- rethrown excetpionAssetData read(AssetId assetId, List<String> attributes) throws AssetAccessException
assetId
- AssetId to read attributes forattributes
- names of the attributesAssetAccessException
- 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.List<String> getAllAttributes(AssetId id)
id
- the asset id to get attributes forList<String> getAllAssociations(AssetId id)
id
- the asset id to get attributes forString getICSVar(String name)
name
- the name of the ICS variableString getField(String assettype, String id, String fieldName)
assettype
- the asset typeid
- the id of the assetfieldName
- the name of the field to get value forString getSubtype(AssetId asset) throws AssetAccessException
asset
- the asset idAssetAccessException
- an AssetAccessExceptionboolean isValid(AssetId id, Date date)
id
- the asset iddate
- the date of interestAssetId getRelative(AssetId asset, String locale)
asset
- the assetlocale
- the interested localeString makeLink(LinkInfo linkInfo) throws AssetAccessException
linkInfo
- the link informationAssetAccessException
- an AssetAccessExceptionString makeBlobLink(BlobLinkInfo linkInfo) throws AssetAccessException
linkInfo
- the blob link informationAssetAccessException
- an AssetAccessExceptionList<AssetId> getSegments(String alias, String profileName, Map<String,Object> profile, String sitename)
alias
- the visitor aliasprofileName
- the name of the visitor profile.profile
- the visitor's profile (which is a map containing the attributes).sitename
- the site nameList<AssetId> retainSegments(String alias, String profileName, Map<String,Object> profile, String segments, String sitename)
alias
- the visitor aliasprofileName
- the name of the visitor profile.profile
- the visitor's profile (which is a map containing the attributes).segments
- the list of segment names separated by ","sitename
- the site nameList<RecommendedAssetId> getRecommendations(String recommendationName, String alias, String profileName, Map<String,Object> profile, String segments, String sitename, boolean keepSegments) throws AssetAccessException
recommendationName
- the recommendation asset name to retrieve assets fromalias
- the visitor aliasprofileName
- the name of the visitor profile.profile
- the visitor's profile (which is a map containing the attributes).segments
- the list of segment names separated by "," if knownsitename
- the site nameAssetAccessException
- an AssetAccessExceptionboolean isAttributeExist(AssetData assetData, String attribute)
assetData
- the AssetDataattribute
- the attribute name to checkAssetId filterSingleAsset(AssetId asset, String desiredLocale, String dimensionSetName) throws com.fatwire.mda.DimensionException
asset
- the asset to filterdesiredLocale
- the preferred localedimensionSetName
- name of the DimensionSet to be usedcom.fatwire.mda.DimensionException
- an DimensionExceptionCollection<AssetId> getRelatives(AssetId assetId)
assetId
- the asset id of interested assetList<AssetId> getImmediateChildren(String siteName, AssetId assetId)
siteName
- the site name of the site children are interested inassetId
- the asset idAssetId getAssetByName(String site, String assetType, String assetName)
site
- the site nameassetType
- the asset typeassetName
- the asset nameString processEmbeddedLink(String data)
data
- the attribute value that needs to be processedString processEmbeddedLink(InputStream data)
data
- the attribute value that needs to be processedList<AssetResultRow> executeContentQuery(String siteName, Long assetId, String assetName, int limit, String sortingField, boolean ascending) throws AssetAccessException
siteName
- the site nameassetId
- the ContentQuery idassetName
- the ContentQuery name, one of the id or name needs to present for this method to worklimit
- the limit of how many assets will be returnedsortingField
- the sorting field to sort the resultsascending
- whether sort in ascending or descending orderAssetAccessException
Long getPublicationId(String assetName)
assetName
- the publication name