Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.campaign.model
Class CampaignModel

    java.lang.Object
      com.bea.p13n.model.Model
          com.bea.p13n.model.XmlObjectModel
              com.bea.campaign.model.CampaignModel

All Implemented Interfaces
  Serializable, Cloneable

    public class CampaignModel

extends XmlObjectModel

A model representing a campaign. Campaigns will have as children a set that consists of ScenarioLinks and/or ScenarioModels.

See Also
  Serialized Form

Nested Class Summary
`class` | `CampaignModel.ScenarioLink` An object representing a link to a scenario model.

Nested classes/interfaces inherited from class com.bea.p13n.model.Model
`Model.ChangeEvent, Model.ChangeListener, Model.ChangeSupport, Model.Debug`

Field Summary
`static String` | `RULE_TYPE` Rule type for campaign rules.

Fields inherited from class com.bea.p13n.model.XmlObjectModel
`copyRootXmlObject, instanceUri, isComplete`

Fields inherited from class com.bea.p13n.model.Model
`childrenModels, docModel, parentModel, roChildrenModels`

Constructor Summary
`CampaignModel()` Creates new, unitialized CampaignModel.
`CampaignModel(com.bea.campaign.schema.CampaignDocument.Campaign campaignNode)` Creates new CampaignModel from a campaign xml object.

Method Summary
`ScenarioModel` | `addCopyScenarioModel(ScenarioModel model)` Add a copy of the specified ScenarioModel to this campaign.
`void` | `addScenarioLink(CampaignModel.ScenarioLink link)` Add a scenario-link to the campaign.
`void` | `addScenarioModel(ScenarioModel model)` Add a scenario to the campaign.
`void` | `clearCachedData()` Clear any cached data this is holding.
`Model` | `copy()` Create a copy of this campaign.
`org.apache.xmlbeans.XmlObject` | `createNewXmlObject()` Create a new, empty campaign xml object.
`boolean` | `determineIsComplete()` Tell if this campaign is complete.
`com.bea.campaign.schema.CampaignDocument.Campaign` | `getCampaign()` Get the underlying campaign xml object.
`String` | `getDescription()` Gets the campaign's description.
`String` | `getGoalDescription()` Gets the campaign's goal description.
`AdCountGoal[]` | `getGoals()` Get the goals for the campaign.
`protected AdCountGoal[]` | `getGoalsNoCache()` Get the goals for the campaign directly from the underlying object.
`String` | `getId()` Return the id attribute of this campaign.
`String` | `getName()` Gets the campaign's name.
`String` | `getSponsor()` Gets the campaign's sponsor.
`Calendar` | `getStartDate()` Gets the campaign's start date/time.
`Calendar` | `getStopDate()` Gets the campaign's stop date/time.
`String` | `getValueProposition()` Gets the campaign's value proposition.
`void` | `initializeNew()` Initialize this model to be a new, empty campaign.
`boolean` | `isActive()` Gets the Campaign's active attribute
`boolean` | `isGoalsOrLogic()` Gets the campaign goals boolean combination logic.
`boolean` | `isShutdown()` Gets the campaign's shutdown value.
`boolean` | `removeScenarioLink(CampaignModel.ScenarioLink model)` Remove a scenario link from the campaign.
`boolean` | `removeScenarioModel(ScenarioModel model)` Remove a scenario from the campaign.
`boolean` | `removeScenarioModelOrLink(int index)` Remove the index'th scenario or scenario link from this campaign.
`void` | `setActive(boolean active)`
`void` | `setDescription(String desc)` Sets the campaign's description.
`void` | `setGoalDescription(String desc)` Sets the campaign's goal description.
`void` | `setGoals(AdCountGoal... goals)` Set the goals for the campaign.
`void` | `setGoalsOrLogic(boolean logic)` Sets the campaign goals boolean combination logic.
`void` | `setId(String id)` Sets the Campaign's id
`void` | `setIsComplete(boolean isComplete)` Override to set on our `campaign` xml object.
`void` | `setName(String name)` Sets the campaign's name.
`void` | `setShutdown(boolean shutdown)` Sets the campaign's shutdown value.
`void` | `setSponsor(String sponsor)` Sets the campaign's sponsor.
`void` | `setStartDate(Calendar date)` Sets the campaign's start date/time.
`void` | `setStopDate(Calendar date)` Sets the campaign's stop date/time.
`void` | `setValueProposition(String value)` Sets the campaign's value proposition.
`void` | `setXmlObject(org.apache.xmlbeans.XmlObject object)` Set the xmlobject for this CampaignModel.

Methods inherited from class com.bea.p13n.model.XmlObjectModel
`checkElement, childAdded, childRemoved, fixQName, getApplicationInstanceUri, getChild, getCopyXmlObject, getDocument, getLocalName, getParent, getQName, getRootXmlObject, isComplete, isNil, preRemove, propertyChanged, removeAllChildren, removeChild, setApplicationInstanceUri, setIsComplete, setParent, setRootXmlObject`

Methods inherited from class com.bea.p13n.model.Model
`addChangeListener, addChild, addChild, clone, doubleEquals, equals, getChildren, getDebug, getDebug, getDocument, getParent, longEquals, removeChangeListener, removeChild, removeChild, removeEmpties, setDocument`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### RULE_TYPE

    public static final String RULE_TYPE

  Rule type for campaign rules.

  See Also
    Constants Summary

Constructor Detail

### CampaignModel

    public CampaignModel()

  Creates new, unitialized CampaignModel. Use `setXmlObject(org.apache.xmlbeans.XmlObject)` or `initializeNew()` to initialize this instance.

### CampaignModel

    public CampaignModel(com.bea.campaign.schema.CampaignDocument.Campaign campaignNode)
                  throws IllegalArgumentException

  Creates new CampaignModel from a campaign xml object.

  Throws
    `IllegalArgumentException`

Method Detail

### setXmlObject

    public void setXmlObject(org.apache.xmlbeans.XmlObject object)
                      throws IllegalArgumentException

  Set the xmlobject for this CampaignModel. The object must be of type `CampaignDocument.Campaign`. Setting the campaign results in a rebuild of the model.

  Throws
    `IllegalArgumentException`

### getCampaign

    public com.bea.campaign.schema.CampaignDocument.Campaign getCampaign()

  Get the underlying campaign xml object. Any changes to the return value from this will not be set on this model.

### clearCachedData

    public void clearCachedData()

  Clear any cached data this is holding.

  Specified by:
    `clearCachedData` in class `XmlObjectModel`

### copy

    public Model copy()

  Create a copy of this campaign.

  Specified by:
    `copy` in class `Model`

### createNewXmlObject

    public org.apache.xmlbeans.XmlObject createNewXmlObject()

  Create a new, empty campaign xml object.

### initializeNew

    public void initializeNew()

  Initialize this model to be a new, empty campaign.

### getId

    public String getId()

  Return the id attribute of this campaign.

### setId

    public void setId(String id)

  Sets the Campaign's id

### removeScenarioModel

    public boolean removeScenarioModel(ScenarioModel model)

  Remove a scenario from the campaign.

  Returns
    true if removed, false if not.
  See Also
    `removeScenarioModelOrLink(int)`

### removeScenarioLink

    public boolean removeScenarioLink(CampaignModel.ScenarioLink model)

  Remove a scenario link from the campaign.

  Returns
    true if removed, false if not.
  See Also
    `removeScenarioModelOrLink(int)`

### removeScenarioModelOrLink

    public boolean removeScenarioModelOrLink(int index)

  Remove the index'th scenario or scenario link from this campaign.

  Returns
    true if removed, false if not.

### addScenarioModel

    public void addScenarioModel(ScenarioModel model)

  Add a scenario to the campaign. This might change the `id` the scenario to make sure all scenario id's are unique.

### addCopyScenarioModel

    public ScenarioModel addCopyScenarioModel(ScenarioModel model)

  Add a copy of the specified ScenarioModel to this campaign.

  Returns
    the ScenarioModel instance added.

### addScenarioLink

    public void addScenarioLink(CampaignModel.ScenarioLink link)

  Add a scenario-link to the campaign.

### getName

    public String getName()

  Gets the campaign's name. This will be never null.

### setName

    public void setName(String name)

  Sets the campaign's name.

### getSponsor

    public String getSponsor()

  Gets the campaign's sponsor. This will never be null.

### setSponsor

    public void setSponsor(String sponsor)

  Sets the campaign's sponsor.

### getDescription

    public String getDescription()

  Gets the campaign's description. This will never be null.

### setDescription

    public void setDescription(String desc)

  Sets the campaign's description.

### getGoalDescription

    public String getGoalDescription()

  Gets the campaign's goal description.

### setGoalDescription

    public void setGoalDescription(String desc)

  Sets the campaign's goal description.

### getValueProposition

    public String getValueProposition()

  Gets the campaign's value proposition.

### setValueProposition

    public void setValueProposition(String value)

  Sets the campaign's value proposition.

### getStartDate

    public Calendar getStartDate()

  Gets the campaign's start date/time.

### setStartDate

    public void setStartDate(Calendar date)

  Sets the campaign's start date/time.

### getStopDate

    public Calendar getStopDate()

  Gets the campaign's stop date/time.

### setStopDate

    public void setStopDate(Calendar date)

  Sets the campaign's stop date/time.

### isActive

    public boolean isActive()

  Gets the Campaign's active attribute

### setActive

    public void setActive(boolean active)

### isShutdown

    public boolean isShutdown()

  Gets the campaign's shutdown value.

### setShutdown

    public void setShutdown(boolean shutdown)

  Sets the campaign's shutdown value.

### isGoalsOrLogic

    public boolean isGoalsOrLogic()

  Gets the campaign goals boolean combination logic.

  Returns
    true for OR logic, false for AND

### setGoalsOrLogic

    public void setGoalsOrLogic(boolean logic)

  Sets the campaign goals boolean combination logic.

  Parameters
    `logic` - true for OR logic, false for AND

### getGoals

    public AdCountGoal[] getGoals()

  Get the goals for the campaign.

### getGoalsNoCache

    protected AdCountGoal[] getGoalsNoCache()

  Get the goals for the campaign directly from the underlying object.

### setGoals

    public void setGoals(AdCountGoal... goals)

  Set the goals for the campaign.

### setIsComplete

    public void setIsComplete(boolean isComplete)

  Override to set on our `campaign` xml object.

  Overrides:
    `setIsComplete` in class `XmlObjectModel`

### determineIsComplete

    public boolean determineIsComplete()

  Tell if this campaign is complete. Campaigns are complete if:
  1. they have a non-empty name, sponsor, and description.
  2. they have a start and stop date/time.
  3. the start date/time is before the stop date/time.
  4. all scenario children are complete.

  Overrides:
    `determineIsComplete` in class `XmlObjectModel`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.