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.String
getAdContent(String
adQuery, long identifier,String
containerUID,String
contextUID,String
placeholder,String
userId,String
servletBase,Request
request,AdService
as, int height, int width)
throwsAdContentException
,CreateException
AdContentException
CreateException
DEPRECATED Use <ejb-ref> instead.
public staticreturn the currently active AdService EJBAdService
getAdService()
throwsNamingException
,CreateException
NamingException
CreateException
public staticGet an AdService instance from the specified JNDI name.AdService
getAdService(String
name)
throwsNamingException
,CreateException
NamingException
CreateException
public staticGet the BinaryValue of the first non-null value of the property.BinaryValue
getBinaryValue(Property
p)
DEPRECATED Use getContent(AdService, String, Request) instead.
public staticreturn the content object for the passed content path.Node
getContent(AdService
as,String
path)
Related Topics
AdHelper.getContent(AdService, String, Request)
public staticReturn the content object for the passed content path.Node
getContent(AdService
as,String
path,Request
request)
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.BinaryValue
getPrimaryContentBinaryValue(Node
c)
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 ofNode
c, 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
BinaryValue
s 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. Value
s 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
BinaryValue
s 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 thenString
getPrimaryMimeType(Node
c)
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.Property
getPrimaryProperty(Node
c)
throwsRepositoryException
RepositoryException
public static int getPropertyAsInt(Utility to retrieve the first value of a content property and convert it (if needed) into an int.Node
c,String
propName, int def)
throwsRepositoryException
RepositoryException
public staticUtility to retrieve the first non-null Object value of a content property.Object
getPropertyValue(Node
c,String
propName)
throwsRepositoryException
RepositoryException
public staticUtility to retrieve the first non-null Object value of a content property as a String.String
getPropertyValueString(Node
c,String
propName)
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.String
pathInfoEncode(String
pathInfo)
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 AdEventTrackerString
userId,HttpServletRequest
request,String
containerUID,String
contextUID,String
placeholder,String
contId)
DEPRECATED No longer publically available.
public static void raiseDisplayEvent(Raise an display event with the AdEventTracker.String
userId,HttpServletRequest
request,String
containerUID,String
contextUID,String
placeholder,String
contId)
public staticConvert an arbitrary string to HTML which will display as the original string intended.String
toHTML(String
in)
This will replace the characters '&', '"', '<', and '>' with '&', "', '<', and '>', respectively.