com.fatwire.gst.foundation.facade.assetapi
Class AssetIdUtils

java.lang.Object
  extended by com.fatwire.gst.foundation.facade.assetapi.AssetIdUtils

public final class AssetIdUtils
extends Object

Utility class for working with Asset IDs

Since:
Mar 9, 2011
Author:
Tony Field

Method Summary
static com.fatwire.assetapi.data.AssetId createAssetId(String c, long cid)
          Creates an AssetId from c and cid parameters.
static com.fatwire.assetapi.data.AssetId createAssetId(String c, String cid)
          Creates an AssetId from c and cid parameters.
static com.fatwire.assetapi.data.AssetId currentId(COM.FutureTense.Interfaces.ICS ics)
          Creates an AssetId out of 'c' and 'cid' variables on ICS context.
static com.fatwire.assetapi.data.AssetId currentPageId(COM.FutureTense.Interfaces.ICS ics)
          Creates an AssetId out of 'p' variable on ICS context with type 'Page'.
static com.fatwire.assetapi.data.AssetId fromString(String s)
          Convert a string in the form assettype:assetid into an AssetId object.
static String toString(com.fatwire.assetapi.data.AssetId id)
          Converts an AssetId into a String of the form assettype:id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fromString

public static com.fatwire.assetapi.data.AssetId fromString(String s)
Convert a string in the form assettype:assetid into an AssetId object.

Parameters:
s - string in the form assettype:assetid
Returns:
AsseId object
Throws:
IllegalArgumentException - if input is bad

toString

public static String toString(com.fatwire.assetapi.data.AssetId id)
Converts an AssetId into a String of the form assettype:id.

Parameters:
id -
Returns:
the assetid as a String in the form of assettype:id.

currentId

public static com.fatwire.assetapi.data.AssetId currentId(COM.FutureTense.Interfaces.ICS ics)
Creates an AssetId out of 'c' and 'cid' variables on ICS context.

Parameters:
ics -
Returns:
AssetId from c and cid
Throws:
IllegalArgumentException - if c or cid is blank.

currentPageId

public static com.fatwire.assetapi.data.AssetId currentPageId(COM.FutureTense.Interfaces.ICS ics)
Creates an AssetId out of 'p' variable on ICS context with type 'Page'.

Parameters:
ics -
Returns:
AssetId with id from 'p'.
Throws:
IllegalArgumentException - if p is blank.

createAssetId

public static com.fatwire.assetapi.data.AssetId createAssetId(String c,
                                                              String cid)
Creates an AssetId from c and cid parameters.

Parameters:
c - the assetype
cid - the assetid, must be a String representing a long value
Returns:
AssetId with c and cid paramters
Throws:
IllegalArgumentException - if c or cid is blank.

createAssetId

public static com.fatwire.assetapi.data.AssetId createAssetId(String c,
                                                              long cid)
Creates an AssetId from c and cid parameters.

Parameters:
c - the assetype.
cid - the assetid.
Returns:
AssetId with c and cid paramters.
Throws:
IllegalArgumentException - is c is blank


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