AdCountGoal Class

com.bea.campaign
AdCountGoal Class

public class AdCountGoal

    extends Object
    implements Goal

A goal based upon ad counts.


Hierarchy
Object
  AdCountGoal
All Implemented Interfaces

Goal, Serializable

Field Summary

protected Collection
adPaths
The list of ad ids.
public static final short
AND
Constant for AND boolean logic.
public static final short
CLICK_THRU
Constant for click-thru counts.
protected short
countType
The impression or click-thru count type.
public static final short
GLOBAL
Constant for global counts.
protected long
goalCount
The goal's count.
public static final short
IMPRESSION
Constant for impression counts.
public static final short
LOCAL
Constant for campaign-local counts.
protected short
logic
The boolean logic.
public static final short
OR
Constant for OR boolean logic.
protected short
type
The local or global count type.
 

Constructor Summary

AdCountGoal()

 

Method Summary

public void
addAdId(String id)
Add an ad paths.
public void
addAdPath(String path)
Add an ad path.
public Collection
getAdIds()
Get the ad paths.
public Collection
getAdPaths()
Get the ad paths.
public short
getCountType()
Get the count type.
public long
getGoalCount()
Get the goal's count.
public short
getLogic()
Return the boolean logic of the goal
public short
getType()
Get the campaign count type.
public boolean
hasBeenMet(CampaignService service, Campaign campaign)
Determine if this goal has been met.
public void
init(Element e)
Initialize this goal from an XML element.
public void
printXML(Writer writer)
Print out this goal as an XML element.
public void
setCountType(short t)
Set the campaign count type.
public void
setCountType(String t)
Set the campaign count type.
public void
setGoalCount(long count)
Set the goal's count.
public void
setLogic(short l)
Set the boolean logic.
public void
setLogic(String l)
Set the boolean logic.
public void
setType(short t)
Set the campaign count type.
public void
setType(String t)
Set the campaign count type.
public String
toString()
Get a string representation of this.
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
   
Methods from interface com.bea.campaign.Goal
hasBeenMet, init, printXML
 

Field Detail

adPaths

protected Collection adPaths
The list of ad ids.


AND

public static final short AND
Constant for AND boolean logic.


CLICK_THRU

public static final short CLICK_THRU
Constant for click-thru counts.


countType

protected short countType
The impression or click-thru count type.


GLOBAL

public static final short GLOBAL
Constant for global counts.


goalCount

protected long goalCount
The goal's count.


IMPRESSION

public static final short IMPRESSION
Constant for impression counts.


LOCAL

public static final short LOCAL
Constant for campaign-local counts.


logic

protected short logic
The boolean logic.


OR

public static final short OR
Constant for OR boolean logic.


type

protected short type
The local or global count type.

 

Constructor Detail

AdCountGoal

public AdCountGoal()
 

Method Detail

addAdId(String) Method

DEPRECATED Use addAdPath(path) instead.

public void addAdId(String id)
Add an ad paths.


addAdPath(String) Method

public void addAdPath(String path)
Add an ad path.


getAdIds() Method

DEPRECATED Use getAdPaths() instead.

public Collection getAdIds()
Get the ad paths.


getAdPaths() Method

public Collection getAdPaths()
Get the ad paths.


getCountType() Method

public short getCountType()
Get the count type.

Returns

IMPRESSION or CLICK_THRU.

getGoalCount() Method

public long getGoalCount()
Get the goal's count.


getLogic() Method

public short getLogic()
Return the boolean logic of the goal

Returns

AND or OR.

getType() Method

public short getType()
Get the campaign count type.

Returns

LOCAL or GLOBAL.

hasBeenMet(CampaignService, Campaign) Method

public boolean hasBeenMet(CampaignService service, 
                          Campaign campaign)
Determine if this goal has been met.

Parameters

service
the CampaignService to use.
campaign
the Campaign to check under.

Returns

true if this goal has been met, false if not.

init(Element) Method

public void init(Element e)
throws IllegalArgumentException
Initialize this goal from an XML element.

Consult the campaign.xsd XML Schema file for the structure of the Ad Count Goal XML.

Parameters

e
the element.

Exceptions

IllegalArgumentException
thrown on invalid XML.

printXML(Writer) Method

public void printXML(Writer writer)
Print out this goal as an XML element.

Parameters

writer
the output writer.

setCountType(short) Method

public void setCountType(short t)
Set the campaign count type.

Parameters

t
IMPRESSION or CLICK_THRU.

setCountType(String) Method

public void setCountType(String t)
Set the campaign count type.

Parameters

t
IMPRESSION or CLICK_THRU.

setGoalCount(long) Method

public void setGoalCount(long count)
Set the goal's count.


setLogic(short) Method

public void setLogic(short l)
Set the boolean logic.

Parameters

l
AND or OR.

setLogic(String) Method

public void setLogic(String l)
Set the boolean logic.

Parameters

l
"and" or "or".

setType(short) Method

public void setType(short t)
Set the campaign count type.

Parameters

t
LOCAL or GLOBAL.

setType(String) Method

public void setType(String t)
Set the campaign count type.

Parameters

t
LOCAL or GLOBAL.

toString() Method

public String toString()
Get a string representation of this.

Overrides
Object.toString()