|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.platform.repository.subscription.SubscriptionRepository
public class SubscriptionRepository
Constructor Summary | |
---|---|
SubscriptionRepository()
|
Method Summary | |
---|---|
void |
addContent(ISubscribeContent content)
|
List<ISubscribeContent> |
addContent(String[] actionRefs)
For each action sequence path in the actionRefs array, if there is not already content in the subscription repository for that action sequence, add it. |
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 contentId,
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 theId)
|
List<ISubscribeContent> |
getContentBySchedule(ISchedule schedule)
|
IContentItem |
getContentItem(String subscriptionName,
IPentahoSession session)
|
IContentItem |
getContentItem(String contentName,
String subscriptionName,
String mimeType,
String extension,
IPentahoSession session,
String solutionName,
String solutionPath,
boolean allowCreate)
|
org.apache.commons.logging.Log |
getLogger()
|
ISchedule |
getSchedule(String scheduleId)
|
ISchedule |
getScheduleByScheduleReference(String scheduleReference)
|
List<ISchedule> |
getSchedules()
|
List<ISchedule> |
getSchedulesByTitle(String title)
|
ISubscription |
getSubscription(String subscriptionId,
IPentahoSession session)
|
List |
getSubscriptionArchives(String subscriptionName,
IPentahoSession session)
|
ISubscription |
getSubscriptionById(String theId)
|
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)
|
List<ISubscription> |
getUserSubscriptionsToContentReference(String user,
String contentId)
|
org.dom4j.Element |
importContent(org.dom4j.Document doc)
|
org.dom4j.Element |
importSchedules(org.dom4j.Document doc)
|
void |
init(IPentahoSession session)
Simplifier for initialization of objects from the PentahoSystem object |
void |
setContent(String[] actionRefs)
If an action sequence currently in the subscription repository is not in the actionRefs array parameter, remove it from the subscription repository. |
void |
setContentForSchedule(String[] contentIds,
String schedId)
|
void |
setSchedulesForContent(String[] scheduleId,
String contentId)
|
List<ISchedule> |
syncSchedules()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubscriptionRepository()
Method Detail |
---|
public org.apache.commons.logging.Log getLogger()
public org.dom4j.Element importSchedules(org.dom4j.Document doc)
importSchedules
in interface ISubscriptionRepository
public org.dom4j.Element importContent(org.dom4j.Document doc)
importContent
in interface ISubscriptionRepository
public boolean addSubscription(ISubscription subscription)
addSubscription
in interface ISubscriptionRepository
public List<ISubscription> getSubscriptionsForSchedule(ISchedule schedule)
getSubscriptionsForSchedule
in interface ISubscriptionRepository
public List<ISubscription> getSubscriptionsForSchedule(String scheduleId)
getSubscriptionsForSchedule
in interface ISubscriptionRepository
public org.pentaho.commons.connection.IPentahoResultSet getSubscriptions(String scheduleId, IPentahoSession session, String solution, String path, String action, String[] parameterNames)
getSubscriptions
in interface ISubscriptionRepository
public void addContent(ISubscribeContent content)
addContent
in interface ISubscriptionRepository
public void deleteContent(ISubscribeContent content)
deleteContent
in interface ISubscriptionRepository
public ISubscribeContent addContent(String actionRef, String contentType)
addContent
in interface ISubscriptionRepository
public List<ISubscribeContent> addContent(String[] actionRefs) throws SubscriptionRepositoryCheckedException
addContent
in interface ISubscriptionRepository
SubscriptionRepositoryCheckedException
public void setContent(String[] actionRefs) throws Exception
setContent
in interface ISubscriptionRepository
Exception
public ISubscribeContent editContent(String contentId, String actionRef, String contentType)
editContent
in interface ISubscriptionRepository
public boolean deleteContentForSchedule(String contentId, String schedId) throws SubscriptionRepositoryCheckedException
deleteContentForSchedule
in interface ISubscriptionRepository
SubscriptionRepositoryCheckedException
public boolean deleteContentForSchedule(ISubscribeContent content, ISchedule sched) throws SubscriptionRepositoryCheckedException
deleteContentForSchedule
in interface ISubscriptionRepository
SubscriptionRepositoryCheckedException
public boolean addContentForSchedule(String contentId, String schedId) throws SubscriptionRepositoryCheckedException
addContentForSchedule
in interface ISubscriptionRepository
SubscriptionRepositoryCheckedException
public boolean addContentForSchedule(ISubscribeContent content, ISchedule sched) throws SubscriptionRepositoryCheckedException
addContentForSchedule
in interface ISubscriptionRepository
SubscriptionRepositoryCheckedException
public void setSchedulesForContent(String[] scheduleId, String contentId) throws Exception
setSchedulesForContent
in interface ISubscriptionRepository
Exception
public void addContentForSchedule(String[] contentIds, String schedId) throws SubscriptionRepositoryCheckedException
addContentForSchedule
in interface ISubscriptionRepository
SubscriptionRepositoryCheckedException
public void setContentForSchedule(String[] contentIds, String schedId) throws Exception
setContentForSchedule
in interface ISubscriptionRepository
Exception
public ISubscribeContent getContentById(String theId)
getContentById
in interface ISubscriptionRepository
public List<ISubscribeContent> getAllContent()
getAllContent
in interface ISubscriptionRepository
public ISubscribeContent getContentByActionReference(String actionReference)
getContentByActionReference
in interface ISubscriptionRepository
public List<ISubscribeContent> getContentBySchedule(ISchedule schedule)
getContentBySchedule
in interface ISubscriptionRepository
public org.dom4j.Document getUserSubscriptions(String user, String contentId, IPentahoSession session)
getUserSubscriptions
in interface ISubscriptionRepository
public void deleteUserSubscriptions(String user)
deleteUserSubscriptions
in interface ISubscriptionRepository
public List<ISubscription> getUserSubscriptionsToContentReference(String user, String contentId)
public List<ISubscription> getUserSubscriptions(String user)
getUserSubscriptions
in interface ISubscriptionRepository
public List<ISubscription> getAllSubscriptions()
getAllSubscriptions
in interface ISubscriptionRepository
public void addSubscriptionsToDocument(String user, String contentId, org.dom4j.Element subscriptionsNode, String editId, IPentahoSession session)
addSubscriptionsToDocument
in interface ISubscriptionRepository
public boolean checkUniqueSubscriptionName(String name, String user, String contentId)
checkUniqueSubscriptionName
in interface ISubscriptionRepository
Name
- the schedule name to check for uniquenessuser
- the user that owns the schedulescontentId
- The action sequence separated by slashes
public void addSchedulesToDocument(String user, String contentId, org.dom4j.Element schedulesNode, String editId)
addSchedulesToDocument
in interface ISubscriptionRepository
public void addSubscriptionToDocument(ISubscription subscription, org.dom4j.Element subscriptionsNode, String editId, IPentahoSession session)
addSubscriptionToDocument
in interface ISubscriptionRepository
public ISubscription getSubscriptionById(String theId)
public ISubscription getSubscription(String subscriptionId, IPentahoSession session)
getSubscription
in interface ISubscriptionRepository
public void init(IPentahoSession session)
IPentahoInitializer
init
in interface IPentahoInitializer
public List<ISchedule> getSchedules()
getSchedules
in interface ISubscriptionRepository
public List<ISchedule> syncSchedules() throws Exception
syncSchedules
in interface ISubscriptionRepository
Exception
public List<ISchedule> getSchedulesByTitle(String title)
getSchedulesByTitle
in interface ISubscriptionRepository
public ISchedule getScheduleByScheduleReference(String scheduleReference)
getScheduleByScheduleReference
in interface ISubscriptionRepository
public boolean deleteSubscription(String subscriptionId, IPentahoSession session)
deleteSubscription
in interface ISubscriptionRepository
public boolean deleteSubscription(String subscriptionId) throws SubscriptionRepositoryCheckedException
deleteSubscription
in interface ISubscriptionRepository
SubscriptionRepositoryCheckedException
public boolean deleteSubscriptionForSchedule(ISubscription subscription, ISchedule sched) throws SubscriptionRepositoryCheckedException
deleteSubscriptionForSchedule
in interface ISubscriptionRepository
SubscriptionRepositoryCheckedException
public boolean deleteSchedule(ISchedule sched) throws SubscriptionRepositoryCheckedException
deleteSchedule
in interface ISubscriptionRepository
SubscriptionRepositoryCheckedException
public boolean deleteScheduleById(String scheduleId) throws SubscriptionRepositoryCheckedException
deleteScheduleById
in interface ISubscriptionRepository
SubscriptionRepositoryCheckedException
public boolean deleteSubscribeContent(ISubscribeContent subContent) throws SubscriptionSchedulerException
deleteSubscribeContent
in interface ISubscriptionRepository
SubscriptionSchedulerException
public boolean deleteSubscribeContentById(String subContentId) throws SubscriptionSchedulerException
deleteSubscribeContentById
in interface ISubscriptionRepository
SubscriptionSchedulerException
public void addSchedule(ISchedule schedule) throws SubscriptionRepositoryCheckedException
addSchedule
in interface ISubscriptionRepository
SubscriptionRepositoryCheckedException
public ISchedule addCronSchedule(String title, String scheduleRef, String description, String cronString, String group, Date startDate, Date endDate) throws SubscriptionRepositoryCheckedException
ISubscriptionRepository
addCronSchedule
in interface ISubscriptionRepository
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 schedulecronString
- a Cron string identifying when the schedule will executegroup
- 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.
SubscriptionRepositoryCheckedException
- if the subscription repository
fails to create the schedule.public ISchedule addRepeatSchedule(String title, String scheduleRef, String description, Integer repeatCount, Integer repeatInterval, String group, Date startDate, Date endDate) throws SubscriptionRepositoryCheckedException
ISubscriptionRepository
addRepeatSchedule
in interface ISubscriptionRepository
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 schedulerepeatCount
- the number of times the schedule should executerepeatInterval
- the period of time that passes between schedule executionsgroup
- 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.
SubscriptionRepositoryCheckedException
- if the subscription repository
fails to create the schedule.public ISchedule editCronSchedule(String id, String title, String scheduleRef, String description, String cronString, String group, Date startDate, Date endDate) throws SubscriptionRepositoryCheckedException
ISubscriptionRepository
editCronSchedule
in interface ISubscriptionRepository
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 schedulecronString
- a Cron string identifying when the schedule will executegroup
- 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.
SubscriptionRepositoryCheckedException
- if the subscription repository
fails to create the schedule.public ISchedule editRepeatSchedule(String id, String title, String scheduleRef, String description, Integer repeatCount, Integer repeatInterval, String group, Date startDate, Date endDate) throws SubscriptionRepositoryCheckedException
ISubscriptionRepository
editRepeatSchedule
in interface ISubscriptionRepository
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 schedulerepeatCount
- the number of times the schedule should executerepeatInterval
- the period of time that passes between schedule executionsgroup
- 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.
SubscriptionRepositoryCheckedException
- if the subscription repository
fails to create the schedule.public ISchedule getSchedule(String scheduleId)
getSchedule
in interface ISubscriptionRepository
public List getSubscriptionArchives(String subscriptionName, IPentahoSession session)
getSubscriptionArchives
in interface ISubscriptionRepository
public IContentItem getContentItem(String subscriptionName, IPentahoSession session)
getContentItem
in interface ISubscriptionRepository
public IContentItem getContentItem(String contentName, String subscriptionName, String mimeType, String extension, IPentahoSession session, String solutionName, String solutionPath, boolean allowCreate)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |