Object
AdConstants
A set of static methods which perform provide utilities services to the ad package.
Object
AdHelper
AdConstants
Constructor Summary |
|
Method Summary |
public static | |
public static |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static int |
|
public static |
|
public static int |
|
public static |
|
public static |
|
public static int |
|
public static |
|
public static |
|
public static |
|
public static |
|
public static void |
|
public static void |
|
public static |
Methods from class java.lang. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AdHelper()
Method Detail |
DEPRECATED This method moved to com.bea.p13n.ad.AdService.getAdContent(com.bea.p13n.expression.Expression, long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.bea.p13n.http.Request, int, int).
public staticReturn the content for an ad Query as an XHTML string.StringgetAdContent(StringadQuery, long identifier,StringcontainerUID,StringcontextUID,Stringplaceholder,StringuserId,StringservletBase,Requestrequest,AdServiceas, int height, int width)
throwsAdContentException,CreateException
AdContentException
CreateException
DEPRECATED Use <ejb-ref> instead.
public staticreturn the currently active AdService EJBAdServicegetAdService()
throwsNamingException,CreateException
NamingException
CreateException
public staticGet an AdService instance from the specified JNDI name.AdServicegetAdService(Stringname)
throwsNamingException,CreateException
NamingException
CreateException
public staticGet the BinaryValue of the first non-null value of the property.BinaryValuegetBinaryValue(Propertyp)
DEPRECATED Use getContent(AdService, String, Request) instead.
public staticreturn the content object for the passed content path.NodegetContent(AdServiceas,Stringpath)
Related Topics
AdHelper.getContent(AdService, String, Request)
public staticReturn the content object for the passed content path.NodegetContent(AdServiceas,Stringpath,Requestrequest)
public static String getDefaultAdBucketServiceName()
Get the default AdBucketService JNDI name for the current application.
public static String getDefaultAdServiceName()
Get the default AdService JNDI name for the current application.
DEPRECATED No longer publically available.
public static AdEventTracker getEventTracker()
Return the ad event tracker to use.
This will access the AdServiceMBean for
the class name of the AdEventTracker to use.
DEPRECATED No longer used here (use java.util.Random)
public static int getNextRandom(int max)Return a random number between [0,max)Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value max (exclusive).
public staticGet the BinaryValue of the first non-null value of the node's primary content property.BinaryValuegetPrimaryContentBinaryValue(Nodec)
throwsRepositoryException
RepositoryException
Related Topics
AdHelper.getPrimaryProperty(Node)
public static int getPrimaryFileSize(Get the size of the primary content property. If the primary property is not binary then return the number ofNodec, int def)
throwsRepositoryException
Value objects contained in the primary
Property. If the primary property is binary then
return the file size of the first non-null BinaryValue.
If the primary property is binary and a non-null
BinaryValues can not be found or no primary property
can be found then the value of the parameter def is returned.
BinaryValue can't be found. Values for the primary. If the primary
property is binary then return the file size of the first non-null
BinaryValue. If no primary property can be found
or if the primary property is binary and no non-null
BinaryValues can be found, then def is
returned. RepositoryException
Related Topics
AdHelper.getPrimaryProperty(Node)
AdHelper.getBinaryValue(Property)
public staticGet the mime type of the primary content property. If the primary property is not binary thenStringgetPrimaryMimeType(Nodec)
throwsRepositoryException
text/plain
will be returned. If the primary property is a binary
property then the mime type of the first non-null
BinaryValue will be returned. If the primary property is
binary but does not contain a non-null BinaryValue,
null will be returned.
text/plain is returned if the primary
property is not binary. If the primary property is binary then return the
mime type of the first non-null binary or null if no non-null
BinaryValue is found. RepositoryException
Related Topics
AdHelper.getPrimaryProperty(Node)
AdHelper.getBinaryValue(Property)
public staticGet the primary content property to use for rendering. This will return the Node's primary property. If not set, it will find the first binary property. If no binary properties, it will find the first String property. Otherwise, it will return null.PropertygetPrimaryProperty(Nodec)
throwsRepositoryException
RepositoryException
public static int getPropertyAsInt(Utility to retrieve the first value of a content property and convert it (if needed) into an int.Nodec,StringpropName, int def)
throwsRepositoryException
RepositoryException
public staticUtility to retrieve the first non-null Object value of a content property.ObjectgetPropertyValue(Nodec,StringpropName)
throwsRepositoryException
RepositoryException
public staticUtility to retrieve the first non-null Object value of a content property as a String.StringgetPropertyValueString(Nodec,StringpropName)
throwsRepositoryException
RepositoryException
DEPRECATED No longer publically available.
public static AdContentProvider getRendering()
Return the global ad renderer to use.
This will access the AdServiceMBean for
the class name of the AdContentProvider to use.
public staticCorrectly URLEncode a path-info string.StringpathInfoEncode(StringpathInfo)
This can be used to pass a contentId as Path-Info to the ShowDocServlet.
This will url encode the pathInfo, but will leave "/"'s alone.
DEPRECATED No longer publically available.
public static void raiseClickThruEvent(Raise a click thru event with the AdEventTrackerStringuserId,HttpServletRequestrequest,StringcontainerUID,StringcontextUID,Stringplaceholder,StringcontId)
DEPRECATED No longer publically available.
public static void raiseDisplayEvent(Raise an display event with the AdEventTracker.StringuserId,HttpServletRequestrequest,StringcontainerUID,StringcontextUID,Stringplaceholder,StringcontId)
public staticConvert an arbitrary string to HTML which will display as the original string intended.StringtoHTML(Stringin)
This will replace the characters '&', '"', '<', and '>' with '&', "', '<', and '>', respectively.