com.fatwire.gst.foundation.wra
Interface WraCoreFieldDao

All Known Implementing Classes:
AssetApiWraCoreFieldDao, WraCoreFieldApiBypassDao

public interface WraCoreFieldDao

Dao for dealing with core fields in a WRA This DAO is not aware of Aliases. To work with Alias assets, see AliasCoreFieldDao.}

Since:
Jul 21, 2010
Author:
Tony Field, Dolf Dijkstra

Field Summary
static String[] VANITY_ATTRIBUTE_NAMES
           
static String[] WRA_ATTRIBUTE_NAMES
           
 
Method Summary
 long findP(AssetIdWithSite wraAssetIdWithSite)
          Locate the page that contains the specified Web-Referenceable Asset.
 VanityAsset getVanityWra(com.fatwire.assetapi.data.AssetId id)
           
 WebReferenceableAsset getWra(com.fatwire.assetapi.data.AssetId id)
          Return a web referenceable asset bean given an input id.
 boolean isVanityAsset(com.fatwire.assetapi.data.AssetId id)
          Method to test if an asset has a vanity url, that is has a path field.
 boolean isWebReferenceable(com.fatwire.assetapi.data.AssetId id)
          Method to test whether or not an asset is web-referenceable.
 boolean isWebReferenceable(TemplateAsset candidate)
          Method to test whether or not an asset is web-referenceable.
 boolean isWebReferenceable(WebReferenceableAsset candidate)
          Method to test whether or not an asset is web-referenceable.
 String resolveSite(String c, String cid)
           
 

Field Detail

WRA_ATTRIBUTE_NAMES

static final String[] WRA_ATTRIBUTE_NAMES

VANITY_ATTRIBUTE_NAMES

static final String[] VANITY_ATTRIBUTE_NAMES
Method Detail

isWebReferenceable

boolean isWebReferenceable(com.fatwire.assetapi.data.AssetId id)
Method to test whether or not an asset is web-referenceable.

Parameters:
id - asset ID to check
Returns:
true if the asset is a valid web-referenceable asset, false if it is not

isWebReferenceable

boolean isWebReferenceable(TemplateAsset candidate)
Method to test whether or not an asset is web-referenceable.

Parameters:
candidate - asset to check for web-referenceable support.
Returns:
true if the asset is a valid web-referenceable asset, false if it is not

isWebReferenceable

boolean isWebReferenceable(WebReferenceableAsset candidate)
Method to test whether or not an asset is web-referenceable.

Parameters:
candidate - asset to check for web-referenceable support.
Returns:
true if the asset is a valid web-referenceable asset, false if it is not

isVanityAsset

boolean isVanityAsset(com.fatwire.assetapi.data.AssetId id)
Method to test if an asset has a vanity url, that is has a path field.

Parameters:
id - asset ID to check
Returns:
true if the asset has a vanity url, false if it is not

getWra

WebReferenceableAsset getWra(com.fatwire.assetapi.data.AssetId id)
Return a web referenceable asset bean given an input id. Required fields must be set or an exception is thrown.

Parameters:
id - asset id
Returns:
WebReferenceableAsset, never null
See Also:
isWebReferenceable(com.fatwire.assetapi.data.AssetId)

findP

long findP(AssetIdWithSite wraAssetIdWithSite)
Locate the page that contains the specified Web-Referenceable Asset.

A WRA is supposed to just be placed on one page (in the unnamed association block), and this method locates it. If it is not found, 0L is returned.

If multiple matches are found, a warning is logged and the first one is returned.

Parameters:
wraAssetIdWithSite - id of the web-referenceable asset. Site is included
Returns:
page asset ID or 0L.

resolveSite

String resolveSite(String c,
                   String cid)
Parameters:
c -
cid -
Returns:
the name of the site that this asset belongs to.

getVanityWra

VanityAsset getVanityWra(com.fatwire.assetapi.data.AssetId id)
Parameters:
id -
Returns:
the VanityAsset for the id, null is not found or not a VanityAsset


Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.