org.pentaho.platform.repository.subscription
Class SubscribeContent

java.lang.Object
  extended by org.pentaho.platform.repository.subscription.SubscribeContent
All Implemented Interfaces:
ISubscribeContent

public class SubscribeContent
extends Object
implements ISubscribeContent

This class defines an action sequence (e.g. a report) that users can create subscriptions to. This class contains a reference to the action sequence that will be executed when the subscription is viewed online or scheduled. Parameters to the action sequence can be defined here. These parameters will be applied to every subscription to the action sequence. These parameter values can be overriden by the individual subscriptions if the user interface allows.

Author:
James Dixon

Field Summary
static String TYPE_DASHBOARD
           
static String TYPE_REPORT
           
static String TYPE_VIEW
           
 
Constructor Summary
SubscribeContent(String subContId, String actionReference, String type)
           
SubscribeContent(String subContId, String actionReference, String type, Map<String,Object> parameters)
           
 
Method Summary
 void addSchedule(ISchedule schedule)
           
 void clearsSchedules()
          removes all schedules.
 boolean equals(Object other)
           
 String getActionReference()
          Gets the reference to the action sequence used by subscriptions to this content
 String getId()
          Gets the id of this content
 Map<String,Object> getParameters()
          Gets the parameters for the content
 int getRevision()
           
 List<ISchedule> getSchedules()
           
 String getType()
           
 int hashCode()
           
 boolean hasSchedule(ISchedule schedule)
           
 boolean removeSchedule(ISchedule schedule)
           
 void setActionReference(String actionReference)
          Sets a reference to the action sequence that will be executed as part of a subscription
 void setParameters(Map<String,Object> parameters)
          Sets the parameters that will be provided to the action sequence when it is executed as part of a subscription
 void setSchedules(List<ISchedule> schedules)
           
 void setType(String type)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_REPORT

public static final String TYPE_REPORT
See Also:
Constant Field Values

TYPE_VIEW

public static final String TYPE_VIEW
See Also:
Constant Field Values

TYPE_DASHBOARD

public static final String TYPE_DASHBOARD
See Also:
Constant Field Values
Constructor Detail

SubscribeContent

public SubscribeContent(String subContId,
                        String actionReference,
                        String type)

SubscribeContent

public SubscribeContent(String subContId,
                        String actionReference,
                        String type,
                        Map<String,Object> parameters)
Method Detail

equals

public boolean equals(Object other)
Specified by:
equals in interface ISubscribeContent
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface ISubscribeContent
Overrides:
hashCode in class Object

getRevision

public int getRevision()
Specified by:
getRevision in interface ISubscribeContent
Returns:
Returns the revision.

getActionReference

public String getActionReference()
Gets the reference to the action sequence used by subscriptions to this content

Specified by:
getActionReference in interface ISubscribeContent
Returns:
Action sequence reference

addSchedule

public void addSchedule(ISchedule schedule)
Specified by:
addSchedule in interface ISubscribeContent

getSchedules

public List<ISchedule> getSchedules()
Specified by:
getSchedules in interface ISubscribeContent

hasSchedule

public boolean hasSchedule(ISchedule schedule)
Specified by:
hasSchedule in interface ISubscribeContent

removeSchedule

public boolean removeSchedule(ISchedule schedule)
Specified by:
removeSchedule in interface ISubscribeContent

clearsSchedules

public void clearsSchedules()
Description copied from interface: ISubscribeContent
removes all schedules.

Specified by:
clearsSchedules in interface ISubscribeContent

setParameters

public void setParameters(Map<String,Object> parameters)
Sets the parameters that will be provided to the action sequence when it is executed as part of a subscription

Specified by:
setParameters in interface ISubscribeContent
Parameters:
parameters - The parameters to pass to the action sequence

getParameters

public Map<String,Object> getParameters()
Gets the parameters for the content

Specified by:
getParameters in interface ISubscribeContent
Returns:
Parameter HashMap

getId

public String getId()
Gets the id of this content

Specified by:
getId in interface ISubscribeContent
Returns:

getType

public String getType()
Specified by:
getType in interface ISubscribeContent

setActionReference

public void setActionReference(String actionReference)
Sets a reference to the action sequence that will be executed as part of a subscription

Specified by:
setActionReference in interface ISubscribeContent
Parameters:
actionReference -

setSchedules

public void setSchedules(List<ISchedule> schedules)
Specified by:
setSchedules in interface ISubscribeContent

setType

public void setType(String type)
Specified by:
setType in interface ISubscribeContent