net.firstpartners.rp.back.datastore
Class BasicFeedbackDataStore

java.lang.Object
  extended by net.firstpartners.rp.back.datastore.BasicFeedbackDataStore
All Implemented Interfaces:
IFeedbackDataStore

public class BasicFeedbackDataStore
extends java.lang.Object
implements IFeedbackDataStore

Simple Meta Data Store as an XML file.

Author:
brownpa

Field Summary
private static int counter
          Internal counter for storing the feedback information
static java.lang.String DEFAULT_SPECIAL_DATA
          Folder name for storing the feedback events
protected  org.apache.log4j.Logger logger
          Logger for this class and subclasses
(package private) static java.lang.String MODEL_EXTENSION
          Model extension for the feedback event
(package private) static java.lang.String MODEL_NAME
          Model name for the feedback event
 
Fields inherited from interface net.firstpartners.rp.plugins.IFeedbackDataStore
feedback, query
 
Constructor Summary
BasicFeedbackDataStore()
           
 
Method Summary
static int getCounter()
           
 BaseFeedback read(java.lang.String modelpath)
          Get the Feedback object from the model
 void save(BaseFeedback advice)
          Save the feedback data
static void setCounter(int counter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SPECIAL_DATA

public static final java.lang.String DEFAULT_SPECIAL_DATA
Folder name for storing the feedback events

See Also:
Constant Field Values

MODEL_NAME

static final java.lang.String MODEL_NAME
Model name for the feedback event

See Also:
Constant Field Values

MODEL_EXTENSION

static final java.lang.String MODEL_EXTENSION
Model extension for the feedback event

See Also:
Constant Field Values

counter

private static int counter
Internal counter for storing the feedback information


logger

protected final org.apache.log4j.Logger logger
Logger for this class and subclasses

Constructor Detail

BasicFeedbackDataStore

public BasicFeedbackDataStore()
Method Detail

read

public BaseFeedback read(java.lang.String modelpath)
                  throws RpException
Get the Feedback object from the model

Specified by:
read in interface IFeedbackDataStore
Parameters:
modelpath - The model path
Returns:
Feedback object from the model
Throws:
RpException - If an error occur in reading the model

save

public void save(BaseFeedback advice)
          throws RpException
Save the feedback data

Specified by:
save in interface IFeedbackDataStore
Parameters:
advice - Feedback object
Throws:
RpException - If an error occur in storing the model

getCounter

public static int getCounter()
Returns:
Returns the counter.

setCounter

public static void setCounter(int counter)
Parameters:
counter - The counter to set.