org.pentaho.platform.api.repository
Interface ISubscriptionRepository

All Superinterfaces:
IPentahoInitializer
All Known Implementing Classes:
SubscriptionRepository

public interface ISubscriptionRepository
extends IPentahoInitializer


Method Summary
 void addContent(ISubscribeContent content)
           
 List<ISubscribeContent> addContent(String[] actionRefs)
           
 ISubscribeContent addContent(String actionRef, String contentType)
           
 boolean addContentForSchedule(ISubscribeContent content, ISchedule sched)
           
 void addContentForSchedule(String[] contentIds, String schedId)
           
 boolean addContentForSchedule(String contentId, String schedId)
           
 ISchedule addCronSchedule(String title, String scheduleRef, String description, String cronString, String group, Date startDate, Date endDate)
          Add a new schedule whose task-execution time is defined by a Cron string.
 ISchedule addRepeatSchedule(String title, String scheduleRef, String description, Integer repeatCount, Integer repeatInterval, String group, Date startDate, Date endDate)
          Add a new schedule whose task-execution time is defined by a repeat interval and a repeat count.
 void addSchedule(ISchedule schedule)
           
 void addSchedulesToDocument(String user, String contentId, org.dom4j.Element schedulesNode, String editId)
           
 boolean addSubscription(ISubscription subscription)
           
 void addSubscriptionsToDocument(String user, String contentId, org.dom4j.Element subscriptionsNode, String editId, IPentahoSession session)
           
 void addSubscriptionToDocument(ISubscription subscription, org.dom4j.Element subscriptionsNode, String editId, IPentahoSession session)
           
 boolean checkUniqueSubscriptionName(String name, String user, String contentId)
          Returns true if the subscription name is unique for the user/contentId
 void deleteContent(ISubscribeContent content)
           
 boolean deleteContentForSchedule(ISubscribeContent content, ISchedule sched)
           
 boolean deleteContentForSchedule(String contentId, String schedId)
           
 boolean deleteSchedule(ISchedule sched)
           
 boolean deleteScheduleById(String scheduleId)
           
 boolean deleteSubscribeContent(ISubscribeContent subContent)
           
 boolean deleteSubscribeContentById(String subContentId)
           
 boolean deleteSubscription(String subscriptionId)
           
 boolean deleteSubscription(String subscriptionId, IPentahoSession session)
           
 boolean deleteSubscriptionForSchedule(ISubscription subscription, ISchedule sched)
           
 void deleteUserSubscriptions(String user)
           
 ISubscribeContent editContent(String id, String actionRef, String contentType)
           
 ISchedule editCronSchedule(String id, String title, String scheduleRef, String description, String cronString, String group, Date startDate, Date endDate)
          Edit an existing schedule.
 ISchedule editRepeatSchedule(String id, String title, String scheduleRef, String description, Integer repeatCount, Integer repeatInterval, String group, Date startDate, Date endDate)
          Edit an existing schedule.
 List<ISubscribeContent> getAllContent()
           
 List<ISubscription> getAllSubscriptions()
           
 ISubscribeContent getContentByActionReference(String actionReference)
           
 ISubscribeContent getContentById(String contentId)
           
 List<ISubscribeContent> getContentBySchedule(ISchedule schedule)
           
 IContentItem getContentItem(String subscriptionName, IPentahoSession session)
           
 ISchedule getSchedule(String id)
           
 ISchedule getScheduleByScheduleReference(String scheduleReference)
           
 List<ISchedule> getSchedules()
           
 List<ISchedule> getSchedulesByTitle(String title)
           
 ISubscription getSubscription(String subscriptionId, IPentahoSession session)
           
 List getSubscriptionArchives(String subscriptionName, IPentahoSession session)
           
 org.pentaho.commons.connection.IPentahoResultSet getSubscriptions(String scheduleId, IPentahoSession session, String solution, String path, String action, String[] parameterNames)
           
 List<ISubscription> getSubscriptionsForSchedule(ISchedule schedule)
           
 List<ISubscription> getSubscriptionsForSchedule(String scheduleId)
           
 List<ISubscription> getUserSubscriptions(String user)
           
 org.dom4j.Document getUserSubscriptions(String user, String contentId, IPentahoSession session)
           
 org.dom4j.Element importContent(org.dom4j.Document doc)
           
 org.dom4j.Element importSchedules(org.dom4j.Document doc)
           
 void setContent(String[] actionRefs)
           
 void setContentForSchedule(String[] contentId, String schedId)
           
 void setSchedulesForContent(String[] scheduleId, String contentId)
           
 List<ISchedule> syncSchedules()
           
 
Methods inherited from interface org.pentaho.platform.api.engine.IPentahoInitializer
init
 

Method Detail

addSubscription

boolean addSubscription(ISubscription subscription)

addContent

void addContent(ISubscribeContent content)

deleteContent

void deleteContent(ISubscribeContent content)

editContent

ISubscribeContent editContent(String id,
                              String actionRef,
                              String contentType)

addContent

ISubscribeContent addContent(String actionRef,
                             String contentType)

setContent

void setContent(String[] actionRefs)
                throws Exception
Throws:
Exception

addContent

List<ISubscribeContent> addContent(String[] actionRefs)
                                   throws SubscriptionRepositoryCheckedException
Throws:
SubscriptionRepositoryCheckedException

getAllContent

List<ISubscribeContent> getAllContent()

getAllSubscriptions

List<ISubscription> getAllSubscriptions()

getUserSubscriptions

List<ISubscription> getUserSubscriptions(String user)

deleteContentForSchedule

boolean deleteContentForSchedule(String contentId,
                                 String schedId)
                                 throws SubscriptionRepositoryCheckedException
Throws:
SubscriptionRepositoryCheckedException

deleteContentForSchedule

boolean deleteContentForSchedule(ISubscribeContent content,
                                 ISchedule sched)
                                 throws SubscriptionRepositoryCheckedException
Throws:
SubscriptionRepositoryCheckedException

addContentForSchedule

boolean addContentForSchedule(String contentId,
                              String schedId)
                              throws SubscriptionRepositoryCheckedException
Throws:
SubscriptionRepositoryCheckedException

setContentForSchedule

void setContentForSchedule(String[] contentId,
                           String schedId)
                           throws Exception
Throws:
Exception

addContentForSchedule

void addContentForSchedule(String[] contentIds,
                           String schedId)
                           throws SubscriptionRepositoryCheckedException
Throws:
SubscriptionRepositoryCheckedException

addContentForSchedule

boolean addContentForSchedule(ISubscribeContent content,
                              ISchedule sched)
                              throws SubscriptionRepositoryCheckedException
Throws:
SubscriptionRepositoryCheckedException

setSchedulesForContent

void setSchedulesForContent(String[] scheduleId,
                            String contentId)
                            throws Exception
Throws:
Exception

getUserSubscriptions

org.dom4j.Document getUserSubscriptions(String user,
                                        String contentId,
                                        IPentahoSession session)

addCronSchedule

ISchedule addCronSchedule(String title,
                          String scheduleRef,
                          String description,
                          String cronString,
                          String group,
                          Date startDate,
                          Date endDate)
                          throws SubscriptionRepositoryCheckedException
Add a new schedule whose task-execution time is defined by a Cron string.

Parameters:
title - Title of the schedule. Title is typically displayed in the subscription UI to help the user making the subscription to identify which schedule they want to execute the action sequence.
scheduleRef - The name of the schedule. (In Quartz implementation, this name will be used as the trigger name).
description - a description of the schedule
cronString - a Cron string identifying when the schedule will execute
group - the group name. (In Quartz implementations, this will be used as the trigger's group name).
startDate - date/time the schedule should begin executing it's tasks.
endDate - date/time that the schedule should stop executing its tasks. This parameter may be null, in which case the schedule will never stop.
Returns:
the schedule that was created
Throws:
SubscriptionRepositoryCheckedException - if the subscription repository fails to create the schedule.

addRepeatSchedule

ISchedule addRepeatSchedule(String title,
                            String scheduleRef,
                            String description,
                            Integer repeatCount,
                            Integer repeatInterval,
                            String group,
                            Date startDate,
                            Date endDate)
                            throws SubscriptionRepositoryCheckedException
Add a new schedule whose task-execution time is defined by a repeat interval and a repeat count. The repeat interval is the period of time that passes between schedule executions. The repeat count is the number of times the schedule should execute. If the repeat count is 0, the schedule will execute once.

Parameters:
title - Title of the schedule. Title is typically displayed in the subscription UI to help the user making the subscription to identify which schedule they want to execute the action sequence.
scheduleRef - The name of the schedule. (In Quartz implementation, this name will be used as the trigger name).
description - a description of the schedule
repeatCount - the number of times the schedule should execute
repeatInterval - the period of time that passes between schedule executions
group - the group name. (In Quartz implementations, this will be used as the trigger's group name).
startDate - date/time the schedule should begin executing it's tasks.
endDate - date/time that the schedule should stop executing its tasks. This parameter may be null, in which case the schedule will never stop.
Returns:
the schedule that was created
Throws:
SubscriptionRepositoryCheckedException - if the subscription repository fails to create the schedule.

addSchedule

void addSchedule(ISchedule schedule)
                 throws SubscriptionRepositoryCheckedException
Throws:
SubscriptionRepositoryCheckedException

editCronSchedule

ISchedule editCronSchedule(String id,
                           String title,
                           String scheduleRef,
                           String description,
                           String cronString,
                           String group,
                           Date startDate,
                           Date endDate)
                           throws SubscriptionRepositoryCheckedException
Edit an existing schedule. The edited schedule will have task-execution time that is defined by a Cron string.

Parameters:
title - Title of the schedule. Title is typically displayed in the subscription UI to help the user making the subscription to identify which schedule they want to execute the action sequence.
scheduleRef - The name of the schedule. (In Quartz implementation, this name will be used as the trigger name).
description - a description of the schedule
cronString - a Cron string identifying when the schedule will execute
group - the group name. (In Quartz implementations, this will be used as the trigger's group name).
startDate - date/time the schedule should begin executing it's tasks.
endDate - date/time that the schedule should stop executing its tasks. This parameter may be null, in which case the schedule will never stop.
Returns:
the schedule that was created
Throws:
SubscriptionRepositoryCheckedException - if the subscription repository fails to create the schedule.

editRepeatSchedule

ISchedule editRepeatSchedule(String id,
                             String title,
                             String scheduleRef,
                             String description,
                             Integer repeatCount,
                             Integer repeatInterval,
                             String group,
                             Date startDate,
                             Date endDate)
                             throws SubscriptionRepositoryCheckedException
Edit an existing schedule. The edited schedule will have a task-execution time that is defined by a repeat interval and a repeat count. The repeat interval is the period of time that passes between schedule executions. The repeat count is the number of times the schedule should execute. If the repeat count is 0, the schedule will execute once.

Parameters:
title - Title of the schedule. Title is typically displayed in the subscription UI to help the user making the subscription to identify which schedule they want to execute the action sequence.
scheduleRef - The name of the schedule. (In Quartz implementation, this name will be used as the trigger name).
description - a description of the schedule
repeatCount - the number of times the schedule should execute
repeatInterval - the period of time that passes between schedule executions
group - the group name. (In Quartz implementations, this will be used as the trigger's group name).
startDate - date/time the schedule should begin executing it's tasks.
endDate - date/time that the schedule should stop executing its tasks. This parameter may be null, in which case the schedule will never stop.
Returns:
the schedule that was created
Throws:
SubscriptionRepositoryCheckedException - if the subscription repository fails to create the schedule.

addSubscriptionToDocument

void addSubscriptionToDocument(ISubscription subscription,
                               org.dom4j.Element subscriptionsNode,
                               String editId,
                               IPentahoSession session)

addSubscriptionsToDocument

void addSubscriptionsToDocument(String user,
                                String contentId,
                                org.dom4j.Element subscriptionsNode,
                                String editId,
                                IPentahoSession session)

addSchedulesToDocument

void addSchedulesToDocument(String user,
                            String contentId,
                            org.dom4j.Element schedulesNode,
                            String editId)

getContentByActionReference

ISubscribeContent getContentByActionReference(String actionReference)

getContentById

ISubscribeContent getContentById(String contentId)

getContentBySchedule

List<ISubscribeContent> getContentBySchedule(ISchedule schedule)

getSubscription

ISubscription getSubscription(String subscriptionId,
                              IPentahoSession session)

deleteSubscription

boolean deleteSubscription(String subscriptionId,
                           IPentahoSession session)

deleteSubscription

boolean deleteSubscription(String subscriptionId)
                           throws SubscriptionRepositoryCheckedException
Throws:
SubscriptionRepositoryCheckedException

deleteSubscriptionForSchedule

boolean deleteSubscriptionForSchedule(ISubscription subscription,
                                      ISchedule sched)
                                      throws SubscriptionRepositoryCheckedException
Throws:
SubscriptionRepositoryCheckedException

getContentItem

IContentItem getContentItem(String subscriptionName,
                            IPentahoSession session)

getSchedules

List<ISchedule> getSchedules()

getSchedule

ISchedule getSchedule(String id)

getSubscriptionsForSchedule

List<ISubscription> getSubscriptionsForSchedule(String scheduleId)

getSubscriptionsForSchedule

List<ISubscription> getSubscriptionsForSchedule(ISchedule schedule)

getSubscriptionArchives

List getSubscriptionArchives(String subscriptionName,
                             IPentahoSession session)

getSubscriptions

org.pentaho.commons.connection.IPentahoResultSet getSubscriptions(String scheduleId,
                                                                  IPentahoSession session,
                                                                  String solution,
                                                                  String path,
                                                                  String action,
                                                                  String[] parameterNames)

deleteSubscribeContentById

boolean deleteSubscribeContentById(String subContentId)
                                   throws SubscriptionSchedulerException
Throws:
SubscriptionSchedulerException

deleteSubscribeContent

boolean deleteSubscribeContent(ISubscribeContent subContent)
                               throws SubscriptionSchedulerException
Throws:
SubscriptionSchedulerException

deleteScheduleById

boolean deleteScheduleById(String scheduleId)
                           throws SubscriptionRepositoryCheckedException
Throws:
SubscriptionRepositoryCheckedException

deleteSchedule

boolean deleteSchedule(ISchedule sched)
                       throws SubscriptionRepositoryCheckedException
Throws:
SubscriptionRepositoryCheckedException

getScheduleByScheduleReference

ISchedule getScheduleByScheduleReference(String scheduleReference)

getSchedulesByTitle

List<ISchedule> getSchedulesByTitle(String title)

deleteUserSubscriptions

void deleteUserSubscriptions(String user)

checkUniqueSubscriptionName

boolean checkUniqueSubscriptionName(String name,
                                    String user,
                                    String contentId)
Returns true if the subscription name is unique for the user/contentId

Parameters:
Name - the schedule name to check for uniqueness
user - the user that owns the schedules
contentId - The action sequence separated by slashes
Returns:

importSchedules

org.dom4j.Element importSchedules(org.dom4j.Document doc)

importContent

org.dom4j.Element importContent(org.dom4j.Document doc)

syncSchedules

List<ISchedule> syncSchedules()
                              throws Exception
Throws:
Exception