© 2002 BEA Systems, Inc.


com.bea.campaign
Class AdCountGoal

java.lang.Object
  |
  +--com.bea.campaign.AdCountGoal

public class AdCountGoal
extends java.lang.Object
implements Goal

A goal based upon ad counts.

See Also:
Serialized Form

Field Summary
protected  java.util.Collection adIds
          The list of ad ids.
static short AND
          Constant for AND boolean logic.
static short CLICK_THRU
          Constant for click-thru counts.
protected  short countType
          The impression or click-thru count type.
static short GLOBAL
          Constant for global counts.
protected  long goalCount
          The goal's count.
static short IMPRESSION
          Constant for impression counts.
static short LOCAL
          Constant for campaign-local counts.
protected  short logic
          The boolean logic.
static short OR
          Constant for OR boolean logic.
protected  short type
          The local or global count type.
 
Constructor Summary
AdCountGoal()
           
 
Method Summary
 void addAdId(java.lang.String id)
          Add an ad id.
 java.util.Collection getAdIds()
          Get the ad ids.
 short getCountType()
          Get the count type.
 long getGoalCount()
          Get the goal's count.
 short getLogic()
          Return the boolean logic of the goal
 short getType()
          Get the campaign count type.
 boolean hasBeenMet(CampaignService service, Campaign campaign)
          Determine if this goal has been met.
 void init(org.w3c.dom.Element e)
          Initialize this goal from an XML element.
 void printXML(java.io.Writer writer)
          Print out this goal as an XML element.
 void setCountType(short t)
          Set the campaign count type.
 void setCountType(java.lang.String t)
          Set the campaign count type.
 void setGoalCount(long count)
          Set the goal's count.
 void setLogic(short l)
          Set the boolean logic.
 void setLogic(java.lang.String l)
          Set the boolean logic.
 void setType(short t)
          Set the campaign count type.
 void setType(java.lang.String t)
          Set the campaign count type.
 java.lang.String toString()
          Get a string representation of this.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AND

public static final short AND
Constant for AND boolean logic.

OR

public static final short OR
Constant for OR boolean logic.

IMPRESSION

public static final short IMPRESSION
Constant for impression counts.

CLICK_THRU

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

LOCAL

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

GLOBAL

public static final short GLOBAL
Constant for global counts.

logic

protected short logic
The boolean logic.

type

protected short type
The local or global count type.

countType

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

goalCount

protected long goalCount
The goal's count.

adIds

protected java.util.Collection adIds
The list of ad ids.
Constructor Detail

AdCountGoal

public AdCountGoal()
Method Detail

getLogic

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

Returns:
AND or OR.

setLogic

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

Parameters:
l - AND or OR.

setLogic

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

Parameters:
l - "and" or "or".

getType

public short getType()
Get the campaign count type.

Returns:
LOCAL or GLOBAL.

setType

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

Parameters:
t - LOCAL or GLOBAL.

setType

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

Parameters:
t - LOCAL or GLOBAL.

getCountType

public short getCountType()
Get the count type.

Returns:
IMPRESSION or CLICK_THRU.

setCountType

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

Parameters:
t - IMPRESSION or CLICK_THRU.

setCountType

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

Parameters:
t - IMPRESSION or CLICK_THRU.

getGoalCount

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


setGoalCount

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


getAdIds

public java.util.Collection getAdIds()
Get the ad ids.


addAdId

public void addAdId(java.lang.String id)
Add an ad id.


hasBeenMet

public boolean hasBeenMet(CampaignService service,
                          Campaign campaign)
Determine if this goal has been met.
Specified by:
hasBeenMet in interface Goal


init

public void init(org.w3c.dom.Element e)
          throws java.lang.IllegalArgumentException
Initialize this goal from an XML element.

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

Specified by:
init in interface Goal

Parameters:
e - the element.
Throws:
java.lang.IllegalArgumentException - thrown on invalid XML.

printXML

public void printXML(java.io.Writer writer)
Print out this goal as an XML element.
Specified by:
printXML in interface Goal


toString

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

Overrides:
toString in class java.lang.Object

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved