Package com.microstrategy.web.objects
Interface WebSubscriptionsSource
-
- All Superinterfaces:
WebFeatures
public interface WebSubscriptionsSource extends WebFeatures
The WebSubscriptionsSource interface allows the user to retrieve objects related to subscription creation/manipulation and it's dependencies.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
Fields Modifier and Type Field Description static int
SORT_FIELD_ADDRESS_NAME
sorts the collections by the display name of the addressstatic int
SORT_FIELD_ADDRESS_PHYSICAL_VALUE
sorts the collections by the display name of the addressstatic int
SORT_FIELD_DEVICE_NAME
sorts the collections by the display name of the _devicestatic int
SORT_FIELD_OWNER_NAME
sorts the collections by the owner namestatic int
SORT_FIELD_PERSONALIZATION
sorts the collections by the whether or not they are personalizedstatic int
SORT_FIELD_RECIPIENT_NAME
sorts the collections by the recipient namestatic int
SORT_FIELD_SCHEDULE_NAME
sorts the collections by the display name of the schedulestatic int
SORT_FIELD_SUBSCRIPTION_NAME
Sorts the collections by the subscription namestatic int
SORT_FIELD_TARGET_NAME
sorts the collections by the display name of the report/documentstatic int
SUBSCRIPTION_SETUP_STATUS_DISABLED
static int
SUBSCRIPTION_SETUP_STATUS_ENABLED
static int
SUBSCRIPTION_SETUP_STATUS_ENGINE_NOT_CONFIGURED
static int
SUBSCRIPTION_SETUP_STATUS_NOT_INSTALLED
static int
SUBSCRIPTION_SETUP_STATUS_PROJECT_NOT_CONFIGURED
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addRecipientsToSubscription(WebSubscriptionRecipientList recipients, java.lang.String subscriptionID)
Adds the specified recipients to the subscription with the specified ID.boolean
checkNCSCSConfigured()
Utility method to check if Content Services is configured for Distribution Services in the metadataWebScheduledMaintenance
createScheduledMaintenance(WebScheduleTrigger trigger, WebProject project, int commandID, java.util.ArrayList<ScheduledMaintenanceParameter> parm)
Create a newWebScheduledMaintenance
object.SimpleList
getAddresses()
Deprecated.Please usegetAddressesByDeliveryMode(int)
insteadSimpleList
getAddresses(int contentType)
Deprecated.Please usegetAddressesByDeliveryMode(int)
insteadSimpleList
getAddresses(int contentType, int deliveryMode)
Deprecated.Please usegetAddressesByDeliveryMode(int)
insteadSimpleList
getAddressesByDeliveryMode(int deliveryMode)
Retrieves list ofWebSubscriptionAddress
objects for the given delivery modeSimpleList
getAddressesByDeliveryMode(int deliveryMode, WebUser user)
Retrieves the list of all addresses for the given userSimpleList
getAvailableFormats(int contentType, int deliveryMode)
Retrieves list ofWebSubscriptionContentFormat
objects for the given delivery mode and contentTypeSimpleList
getAvailableFormats(WebResultSetInstance ri, int contentType, int deliveryMode)
Deprecated.Please useWebSubscriptionContent.getAvailableFormats()
instead.int
getBlockBegin()
Returns the current starting count set for the incremental fetch of the subscriptions.int
getBlockCount()
Returns the current block size set for the incremental fetch of the subscriptions.WebSubscription
getCopy(WebSubscription ws)
Used to make copy of theWebSubscription
object that is passed inWebSubscriptionDevice
getDevice(java.lang.String deviceID)
Retrieves aWebSubscriptionDevice
using the id.SimpleList
getDevices()
Returns the list of available devicesSimpleList
getDevices(int contentType)
Returns the list of available devices for a specific content typeSimpleList
getDevices(int contentType, int deliveryMode)
Retrieves list ofWebSubscriptionDevice
objects for the given delivery mode and contentTypeSimpleList
getDevicesByDeliveryMode(int deliveryMode)
Retrieves list ofWebSubscriptionDevice
objects for the given delivery mode and contentTypeint
getFlags()
Returns the current setting of the flags which will determine what data will be obtained when retrieving subscriptions from the Intelligence Server.This will affect all getSubscriptions calls on this interface.WebSubscriptionLocation
getLocation(java.lang.String locationKey, int contentType, int deliveryMode)
Retrieves aWebSubscriptionLocation
object using the key provided.SimpleList
getLocations(int contentType)
Deprecated.Please usegetLocationsByDeliveryMode(int)
insteadSimpleList
getLocations(int contentType, int deliveryMode)
Deprecated.Please usegetLocationsByDeliveryMode(int)
insteadSimpleList
getLocationsByDeliveryMode(int deliveryMode)
Retrieves aSimpleList
ofWebSubscriptionLocation
objects corresponding to the given delivery modeWebSubscriptionComponent
getNewObject(int type)
Returns a reference to an new object of the specified type.WebSubscriptionComponent
getNewObject(int type, boolean isMCS)
Returns a reference to an new object of the specified type.WebSubscriptionRecipientList
getNewRecipientList(int deliveryMode)
Returns an empty recipient list to hold the specified type of recipientsWebSubscriptionsFilter
getNewSubscriptionsFilter()
Returns a clean filter to be modified to manipulate which subscriptions are returned by getSubscriptions calls on this and other objectsSimpleList
getNotificationAddresses(int subscriptionDeliveryMode, int notificationDeliveryMode)
Retrieves a list of notification addresses that are available.SimpleList
getNotificationDevices(int subscriptionDeliveryMode, int notificationDeliveryMode)
Retrieves a list of notification devices that are available.WebSubscriptionComponent
getObject(java.lang.String id, int type)
Returns a reference to an object that already exists in the metadata.WebSubscriptionComponent
getObject(java.lang.String id, int type, boolean populate)
Returns a reference to an object that already exists in the metadata.WebProjectSettings
getProjectSettings(int type, int moduleID)
Returns theWebProjectSettings
object for a specific module.WebScheduledMaintenances
getScheduledMaintenances()
RetrieveWebScheduledMaintenances
object from i-server.int
getSortField()
int
getSubscriptionCount(WebObjectInfo woi, int deliveryMode)
Returns the count of the list of available subscriptions corresponding to the specified object and delivery modeSimpleList
getSubscriptions()
Returns the list of available subscriptionsSimpleList
getSubscriptions(WebObjectInfo woi)
Returns the list of available subscriptions for the given object (which is a report or document)SimpleList
getSubscriptions(WebObjectInfo woi, int deliveryMode)
Returns the list of available subscriptions corresponding to the specified object and delivery modeSimpleList
getSubscriptions(WebObjectInfo woi, WebSubscriptionsFilter filter)
Returns aSimpleList
collection ofWebSubscription
objects to which this particular object is the subscription content, from a specified begin block, up to a specified block count.SimpleList
getSubscriptionsByDeliveryMode(int deliveryMode)
Retrieves aSimpleList
of subscriptions corresponding to the given delivery modeSimpleList
getSubscriptionsByDeliveryMode(int deliveryMode, java.lang.String projectDSSID)
Returns the list of available subscriptions corresponding to the specified object and delivery mode and for a particular project.int
getSubscriptionSetupStatus()
This is a convenience method for determining if the subscription functionality is set up correctly to work.SimpleList
getSubscriptionTriggers(java.lang.String id, int type, java.lang.String projId)
Triggers are first class objects in the MicroStrategy MD.SimpleList
getSubscriptionTriggersWithDetail(java.lang.String id, int type, java.lang.String projectId)
This method retrieves trigger list with details.WebSubscriptionTrigger
getTriggerByTimePattern(int monthValue, int monthRecurrence, int weekValue, int weekRecurrence, int dayValue, int dayRecurrence, int dayOfWeekValue, int dayOfWeekRecurrence, int hourValue, int hourRecurrence)
This method gets the hidden time based time trigger in MD by its definitionWebSubscriptionTrigger
getTriggerByTimePatternDaily(int hour)
This method get the hidden Daily triggered trigger in MD by hour.WebSubscriptionTrigger
getTriggerByTimePatternMonthly(int day, int hour)
This methods gets the hidden Monthly triggered trigger in MD by day and hour.WebSubscriptionTrigger
getTriggerByTimePatternWeekday(int hour)
This method gets the hidden Weekday triggered trigger in MD by hour.WebSubscriptionTrigger
getTriggerByTimePatternWeekly(int week, int hour)
This method gets the hidden Weekly triggered trigger in MD by week and hour.WebFolder
getTriggers()
Triggers are first class objects in the MicroStrategy MD.SimpleList
getTriggers(int contentType)
Deprecated.Please usegetTriggers()
insteadSimpleList
getTriggers(int contentType, int deliveryMode)
Deprecated.Please usegetTriggers()
instead.SimpleList
getTriggers(java.lang.String id, int contentType, int deliveryMode, java.lang.String projectId)
Retrieves list ofWebSubscriptionTrigger
objects for the given delivery mode and contentTypeWebFolder
getTriggers(java.lang.String id, int contentType, java.lang.String pgd)
Triggers are first class objects in the MicroStrategy MD.WebFolder
getTriggersWithDetail(java.lang.String id, int contentType, java.lang.String projectId)
This method retrieves triggers folder with details.boolean
hasAnySubscription()
Indicate if the user logged in has at least one subscription.void
init(java.lang.String resourceDir)
This call should be made before any subscription functionality is used.boolean
isIServerNCSSource()
This method indicates whether the currentWebSubscriptionsSource
connects to the MicroStrategy Intelligence server for all Narrowcast related information (TRUE
) or the Narrowcast Server for the same (false
)boolean
isSortAscending()
boolean
isUserAllowedToSubscribe(java.lang.String objectID, int objectType, java.lang.String userID, java.lang.String projectID)
whether allow user to subscribe report/documentvoid
refreshDeviceCache()
This method refreshes device cache.void
removeSubscription(java.lang.String id)
Attempts to remove a subscription by its IDvoid
removeTriggerCache()
This method removes trigger cache.WebSubscriptionContentFormat
restoreFormatFromState(java.lang.String state)
Creates the content format object given an input stateWebSubscriptionComponent
restoreObject(java.lang.String state, int type)
Returns a reference to an object that already exists in the metadata.WebSubscription
restoreSubscriptionFromState(SAXSupport parser, java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attrs)
Creates a newWebSubscription
object from the given statevoid
setBlockBegin(int blockBegin)
Sets the starting count for all thegetSubscriptions()
methods exposed in this interface.void
setBlockCount(int blockCount)
Sets the block size for the incremental fetch of thegetSubscriptions()
method.void
setFlags(int flags)
Sets the current setting of the flags which will determine what data will be obtained when retrieving subscriptions from the Intelligence Server.void
setSortAscending(boolean order)
Sets the sort ordervoid
setSortField(int sortField)
Sets the field based on which the returned collections would be sorted-
Methods inherited from interface com.microstrategy.web.objects.WebFeatures
isFeatureAvailable, isFeatureAvailable
-
-
-
-
Field Detail
-
SORT_FIELD_ADDRESS_NAME
static final int SORT_FIELD_ADDRESS_NAME
sorts the collections by the display name of the address- See Also:
- Constant Field Values
-
SORT_FIELD_ADDRESS_PHYSICAL_VALUE
static final int SORT_FIELD_ADDRESS_PHYSICAL_VALUE
sorts the collections by the display name of the address- See Also:
- Constant Field Values
-
SORT_FIELD_SCHEDULE_NAME
static final int SORT_FIELD_SCHEDULE_NAME
sorts the collections by the display name of the schedule- See Also:
- Constant Field Values
-
SORT_FIELD_DEVICE_NAME
static final int SORT_FIELD_DEVICE_NAME
sorts the collections by the display name of the _device- See Also:
- Constant Field Values
-
SORT_FIELD_TARGET_NAME
static final int SORT_FIELD_TARGET_NAME
sorts the collections by the display name of the report/document- See Also:
- Constant Field Values
-
SORT_FIELD_PERSONALIZATION
static final int SORT_FIELD_PERSONALIZATION
sorts the collections by the whether or not they are personalized- See Also:
- Constant Field Values
-
SORT_FIELD_OWNER_NAME
static final int SORT_FIELD_OWNER_NAME
sorts the collections by the owner name- See Also:
- Constant Field Values
-
SORT_FIELD_RECIPIENT_NAME
static final int SORT_FIELD_RECIPIENT_NAME
sorts the collections by the recipient name- See Also:
- Constant Field Values
-
SORT_FIELD_SUBSCRIPTION_NAME
static final int SORT_FIELD_SUBSCRIPTION_NAME
Sorts the collections by the subscription name- See Also:
- Constant Field Values
-
SUBSCRIPTION_SETUP_STATUS_ENABLED
static final int SUBSCRIPTION_SETUP_STATUS_ENABLED
- See Also:
- Constant Field Values
-
SUBSCRIPTION_SETUP_STATUS_DISABLED
static final int SUBSCRIPTION_SETUP_STATUS_DISABLED
- See Also:
- Constant Field Values
-
SUBSCRIPTION_SETUP_STATUS_NOT_INSTALLED
static final int SUBSCRIPTION_SETUP_STATUS_NOT_INSTALLED
- See Also:
- Constant Field Values
-
SUBSCRIPTION_SETUP_STATUS_ENGINE_NOT_CONFIGURED
static final int SUBSCRIPTION_SETUP_STATUS_ENGINE_NOT_CONFIGURED
- See Also:
- Constant Field Values
-
SUBSCRIPTION_SETUP_STATUS_PROJECT_NOT_CONFIGURED
static final int SUBSCRIPTION_SETUP_STATUS_PROJECT_NOT_CONFIGURED
- See Also:
- Constant Field Values
-
-
Method Detail
-
removeSubscription
void removeSubscription(java.lang.String id) throws WebObjectsException
Attempts to remove a subscription by its ID- Parameters:
id
- String identifier of the subscription- Throws:
WebObjectsException
- Thrown if the subscription id does not exist
-
getAddresses
SimpleList getAddresses() throws WebObjectsException
Deprecated.Please usegetAddressesByDeliveryMode(int)
instead- Returns:
SimpleList
of the all user addresses. This list is read-only.- Throws:
WebObjectsException
- Thrown if there is an error reading the list of addresses from the metadata
-
getAddresses
SimpleList getAddresses(int contentType) throws WebObjectsException
Deprecated.Please usegetAddressesByDeliveryMode(int)
instead- Parameters:
contentType
- as defined inEnumWebSubscriptionContentTypes
- Returns:
SimpleList
of the user's addresses that can be used for a specific content type. This list is read-only.- Throws:
WebObjectsException
- Thrown if there is an error reading the list of addresses from the metadata
-
restoreFormatFromState
WebSubscriptionContentFormat restoreFormatFromState(java.lang.String state) throws WebObjectsException
Creates the content format object given an input state- Parameters:
state
- the state of the format object- Returns:
- The WebSubscriptionContentFormat object restored from the state
- Throws:
WebObjectsException
-
getDevices
SimpleList getDevices() throws WebObjectsException
Returns the list of available devices- Returns:
SimpleList
of the all the devices that the user can create addresses for. This list is read-only.- Throws:
WebObjectsException
- Thrown if there is an error reading the list of devices from the metadata
-
getDevices
SimpleList getDevices(int contentType) throws WebObjectsException
Returns the list of available devices for a specific content type- Parameters:
contentType
- as defined inEnumWebSubscriptionContentTypes
- Returns:
SimpleList
of the all the devices that the user can create addresses for. This list is read-only.- Throws:
WebObjectsException
- Thrown if there is an error reading the list of devices from the metadata
-
getTriggers
SimpleList getTriggers(int contentType) throws WebObjectsException
Deprecated.Please usegetTriggers()
insteadReturns the list of available triggers for a specific content type- Parameters:
contentType
- as defined inEnumWebSubscriptionContentTypes
- Returns:
SimpleList
of the all the triggers that the user can use for the specific contentType. This list is read-only.- Throws:
WebObjectsException
- Thrown if there is an error reading the list of devices from the metadata
-
getSubscriptions
SimpleList getSubscriptions() throws WebObjectsException
Returns the list of available subscriptions- Returns:
SimpleList
of the user's subscriptions. This list is read-only.- Throws:
WebObjectsException
- Thrown if there is an error reading the list of subscriptions from the metadata
-
getSubscriptions
SimpleList getSubscriptions(WebObjectInfo woi) throws WebObjectsException
Returns the list of available subscriptions for the given object (which is a report or document)- Parameters:
woi
-WebObjectInfo
representing report/document for which subscriptions should be retrieved- Returns:
SimpleList
of the user's subscriptions. This list is read-only.- Throws:
WebObjectsException
- Thrown if there is an error reading the list of subscriptions from the metadata
-
getObject
WebSubscriptionComponent getObject(java.lang.String id, int type) throws WebObjectsException
Returns a reference to an object that already exists in the metadata.- Parameters:
id
- String identifier of the componenttype
- integer type of the component as defined inEnumWebSubscriptionObjectTypes
- Returns:
WebSubscriptionComponent
- Throws:
WebObjectsException
- Thrown if the object with the given id and type does not exist in the metadata
-
getObject
WebSubscriptionComponent getObject(java.lang.String id, int type, boolean populate) throws WebObjectsException
Returns a reference to an object that already exists in the metadata.- Parameters:
id
- String identifier of the componenttype
- integer type of the component as defined inEnumWebSubscriptionObjectTypes
populate
- boolean indicating whether or not the object reference retrieved should be populated with all the properties from the metadata- Returns:
WebSubscriptionComponent
- Throws:
WebObjectsException
- Thrown if the object with the given id and type does not exist in the metadata
-
getNewObject
WebSubscriptionComponent getNewObject(int type) throws WebObjectsException
Returns a reference to an new object of the specified type.- Parameters:
type
- integer type of the component as defined inEnumWebSubscriptionObjectTypes
- Returns:
WebSubscriptionComponent
- Throws:
WebObjectsException
- Thrown if the type specified is not supported
-
getNewObject
WebSubscriptionComponent getNewObject(int type, boolean isMCS) throws WebObjectsException
Returns a reference to an new object of the specified type.- Parameters:
type
- integer type of the component as defined inEnumWebSubscriptionObjectTypes
- Returns:
WebSubscriptionComponent
- Throws:
WebObjectsException
- Thrown if the type specified is not supported
-
restoreObject
WebSubscriptionComponent restoreObject(java.lang.String state, int type) throws WebObjectsException
Returns a reference to an object that already exists in the metadata. Note that this is just a convenience method. The effect of calling this should be the same as calling getObject followed by setXML.- Parameters:
state
- String xml representing the state of aWebSubscriptionComponent
type
- integer type of the component as defined inEnumWebSubscriptionObjectTypes
- Returns:
WebSubscriptionComponent
- Throws:
WebObjectsException
- Thrown if there is an error reading the state string
-
restoreSubscriptionFromState
WebSubscription restoreSubscriptionFromState(SAXSupport parser, java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attrs) throws WebObjectsException
Creates a newWebSubscription
object from the given state- Returns:
- The new
WebSubscription
object - Throws:
WebObjectsException
- if the subscription could not be restored using the state.
-
setSortField
void setSortField(int sortField)
Sets the field based on which the returned collections would be sorted- Parameters:
sortField
- indicates the field selected from the enumeration defined in this interface
-
setSortAscending
void setSortAscending(boolean order)
Sets the sort order- Parameters:
order
-
-
getSortField
int getSortField()
- Returns:
- the integer identifier for the field which the collection would be sorted on.
-
isSortAscending
boolean isSortAscending()
- Returns:
- boolean indicating whether the sorting is going to be in ascending order
-
getCopy
WebSubscription getCopy(WebSubscription ws) throws WebObjectsException
Used to make copy of theWebSubscription
object that is passed in- Parameters:
ws
- the subscription for which a copy needs to be made- Returns:
WebSubscription
which is a clone of the argument- Throws:
WebObjectsException
-
getSubscriptionSetupStatus
int getSubscriptionSetupStatus()
This is a convenience method for determining if the subscription functionality is set up correctly to work.- Returns:
- a value from one of the following constants
-
getSubscriptions
SimpleList getSubscriptions(WebObjectInfo woi, int deliveryMode) throws WebObjectsException
Returns the list of available subscriptions corresponding to the specified object and delivery mode- Parameters:
woi
- the object for which subscriptions are to be retrieved. The type of this object is one ofdeliveryMode
- indicates the delivery mode for which subscriptions should be retrieved Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
-
getSubscriptions
SimpleList getSubscriptions(WebObjectInfo woi, WebSubscriptionsFilter filter) throws WebObjectsException
Returns aSimpleList
collection ofWebSubscription
objects to which this particular object is the subscription content, from a specified begin block, up to a specified block count. These results will be filtered by the passed inWebSubscriptionsFilter
- Parameters:
woi
-WebObjectInfo
object of eitherEnumDSSXMLObjectTypes.DssXmlTypeReportDefinition
orEnumDSSXMLObjectTypes.DssXmlTypeDocumentDefinition
filter
-WebSubscriptionsFilter
to restrict the results of this call. A blank filter can be retrieved fromgetNewSubscriptionsFilter()
- Returns:
SimpleList
ofWebSubscription
objects- Throws:
WebObjectsException
-
getSubscriptionsByDeliveryMode
SimpleList getSubscriptionsByDeliveryMode(int deliveryMode) throws WebObjectsException
Retrieves aSimpleList
of subscriptions corresponding to the given delivery mode- Parameters:
deliveryMode
- indicates the delivery mode for which subscriptions should be retrieved Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
-
getLocations
SimpleList getLocations(int contentType, int deliveryMode) throws WebObjectsException
Deprecated.Please usegetLocationsByDeliveryMode(int)
insteadReturns available locations forEnumWebSubscriptionDeliveryMode.SUBSCRIPTION_DELIVERY_MODE_FILE
andEnumWebSubscriptionDeliveryMode.SUBSCRIPTION_DELIVERY_MODE_PRINT
.- Parameters:
contentType
- Indicates the type of content. Possible values are defined inEnumWebSubscriptionContentTypes
deliveryMode
- indicates the delivery mode for which locations should be retrieved returns subscriptions for one particular user.If you want to retrieve for all users then use the overloaded method which takes in the project ID as well Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
-
getLocations
SimpleList getLocations(int contentType) throws WebObjectsException
Deprecated.Please usegetLocationsByDeliveryMode(int)
insteadReturns the list of locations for a given content type- Parameters:
contentType
- Indicates the type of content. Possible values are defined inEnumWebSubscriptionContentTypes
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
-
getLocationsByDeliveryMode
SimpleList getLocationsByDeliveryMode(int deliveryMode) throws WebObjectsException
Retrieves aSimpleList
ofWebSubscriptionLocation
objects corresponding to the given delivery mode- Parameters:
deliveryMode
- indicates the delivery mode for which locations should be retrieved Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
-
getAddresses
SimpleList getAddresses(int contentType, int deliveryMode) throws WebObjectsException
Deprecated.Please usegetAddressesByDeliveryMode(int)
insteadRetrieves aSimpleList
ofWebSubscriptionAddress
objects- Parameters:
contentType
- Indicates the type of content. Possible values are defined inEnumWebSubscriptionContentTypes
deliveryMode
- indicates the delivery mode for which addresses should be retrieved Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
-
getAddressesByDeliveryMode
SimpleList getAddressesByDeliveryMode(int deliveryMode) throws WebObjectsException
Retrieves list ofWebSubscriptionAddress
objects for the given delivery mode- Parameters:
deliveryMode
- indicates the delivery mode for which addresses should be retrieved Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
-
getAddressesByDeliveryMode
SimpleList getAddressesByDeliveryMode(int deliveryMode, WebUser user) throws WebObjectsException
Retrieves the list of all addresses for the given user- Parameters:
deliveryMode
-user
-- Returns:
- the list of all addresses for the given user
- Throws:
WebObjectsException
-
getDevices
SimpleList getDevices(int contentType, int deliveryMode) throws WebObjectsException
Retrieves list ofWebSubscriptionDevice
objects for the given delivery mode and contentType- Parameters:
contentType
- Indicates the type of content. Possible values are defined inEnumWebSubscriptionContentTypes
deliveryMode
- indicates the delivery mode for which devices should be retrieved Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
-
getDevicesByDeliveryMode
SimpleList getDevicesByDeliveryMode(int deliveryMode) throws WebObjectsException
Retrieves list ofWebSubscriptionDevice
objects for the given delivery mode and contentType- Parameters:
deliveryMode
- indicates the delivery mode for which devices should be retrieved Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
-
refreshDeviceCache
void refreshDeviceCache() throws WebObjectsException
This method refreshes device cache. This is used when CUD(create/update/delete) request is made. Next time when device cache is required, it will be reloaded.- Throws:
WebObjectsException
-
getTriggers
SimpleList getTriggers(int contentType, int deliveryMode) throws WebObjectsException
Deprecated.Please usegetTriggers()
instead.Retrieves list ofWebSubscriptionTrigger
objects for the given delivery mode and contentType- Parameters:
contentType
- Indicates the type of content. Possible values are defined inEnumWebSubscriptionContentTypes
deliveryMode
- indicates the delivery mode for which triggers should be retrieved Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
-
getTriggers
SimpleList getTriggers(java.lang.String id, int contentType, int deliveryMode, java.lang.String projectId) throws WebObjectsException
Retrieves list ofWebSubscriptionTrigger
objects for the given delivery mode and contentType- Parameters:
contentType
- Indicates the type of content. Possible values are defined inEnumWebSubscriptionContentTypes
deliveryMode
- indicates the delivery mode for which triggers should be retrievedid
- indicates the id of content.projectId
- indicated the id of project. Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
-
getTriggers
WebFolder getTriggers() throws WebObjectsException
Triggers are first class objects in the MicroStrategy MD. This method gets the current triggers Folder within the project.Triggers List can be retrieved from that.GetSubscriptionTriggers can be used to retrieve the List- Returns:
- the
WebFolder
object containing the triggers - Throws:
WebObjectsException
- whenever there is an error in retrieving information from the Intelligence Server
-
getSubscriptionTriggers
SimpleList getSubscriptionTriggers(java.lang.String id, int type, java.lang.String projId) throws WebObjectsException
Triggers are first class objects in the MicroStrategy MD. This method gets the current triggers within the project.- Returns:
- the
SimpleList
object containing the triggers - Throws:
WebObjectsException
- whenever there is an error in retrieving information from the Intelligence Server
-
getTriggersWithDetail
WebFolder getTriggersWithDetail(java.lang.String id, int contentType, java.lang.String projectId) throws WebObjectsException
This method retrieves triggers folder with details.- Parameters:
id
- indicates the id of content.contentType
- Indicates the type of content. Possible values are defined inEnumWebSubscriptionContentTypes
.projectId
- indicated the id of project.- Returns:
- the
WebFolder
object containing the triggers. - Throws:
WebObjectsException
- whenever there is an error in retrieving information from the Intelligence Server
-
removeTriggerCache
void removeTriggerCache() throws WebObjectsException
This method removes trigger cache. This is used when CUD(create/update/delete) request is made. Next time when trigger cache is required, it will be reloaded.- Throws:
WebObjectsException
-
getSubscriptionTriggersWithDetail
SimpleList getSubscriptionTriggersWithDetail(java.lang.String id, int type, java.lang.String projectId) throws WebObjectsException
This method retrieves trigger list with details.- Parameters:
id
- indicates the id of content.type
- Indicates the type of content. Possible values are defined inEnumWebSubscriptionContentTypes
.projectId
- indicated the id of project.- Returns:
- the
SimpleList
object containing the triggers. - Throws:
WebObjectsException
- whenever there is an error in retrieving information from the Intelligence Server
-
getTriggerByTimePattern
WebSubscriptionTrigger getTriggerByTimePattern(int monthValue, int monthRecurrence, int weekValue, int weekRecurrence, int dayValue, int dayRecurrence, int dayOfWeekValue, int dayOfWeekRecurrence, int hourValue, int hourRecurrence) throws WebObjectsException
This method gets the hidden time based time trigger in MD by its definition- Parameters:
monthValue
- Month value of trigger definitionmonthRecurrence
- Month recurrence type of trigger definition. This value comes formEnumDSSXMLTimeOccurrenceType
.weekValue
- Week value of trigger definitionweekRecurrence
- Week recurrence type of trigger definition. This value comes formEnumDSSXMLTimeOccurrenceType
.dayValue
- Day value of trigger definitiondayRecurrence
- Day recurrence type of trigger definition. This value comes formEnumDSSXMLTimeOccurrenceType
.dayOfWeekValue
- Day Of Week value of trigger definitiondayOfWeekRecurrence
- Day Of Week recurrence type of trigger definition. This value comes formEnumDSSXMLTimeOccurrenceType
.hourValue
- Hour value of trigger definitionhourRecurrence
- Hour recurrence type of trigger definition. This value comes formEnumDSSXMLTimeOccurrenceType
.- Returns:
- the
WebSubscriptionTrigger
object represent the hidden trigger - Throws:
WebObjectsException
-
getTriggerByTimePatternDaily
WebSubscriptionTrigger getTriggerByTimePatternDaily(int hour) throws WebObjectsException
This method get the hidden Daily triggered trigger in MD by hour.- Parameters:
hour
- Hour value in one Day, from 0 to 23.- Returns:
- the
WebSubscriptionTrigger
object represent the hidden trigger - Throws:
WebObjectsException
-
getTriggerByTimePatternWeekday
WebSubscriptionTrigger getTriggerByTimePatternWeekday(int hour) throws WebObjectsException
This method gets the hidden Weekday triggered trigger in MD by hour.- Parameters:
hour
- Hour value in one Day, from 0 to 23.- Returns:
- the
WebSubscriptionTrigger
object represent the hidden trigger - Throws:
WebObjectsException
-
getTriggerByTimePatternWeekly
WebSubscriptionTrigger getTriggerByTimePatternWeekly(int week, int hour) throws WebObjectsException
This method gets the hidden Weekly triggered trigger in MD by week and hour.- Parameters:
week
- Week value, value comes fromEnumDSSXMLDayOfWeekBitEncoded
hour
- Hour value in one Day, from 0 to 23.- Returns:
- the
WebSubscriptionTrigger
object represent the hidden trigger - Throws:
WebObjectsException
-
getTriggerByTimePatternMonthly
WebSubscriptionTrigger getTriggerByTimePatternMonthly(int day, int hour) throws WebObjectsException
This methods gets the hidden Monthly triggered trigger in MD by day and hour.- Parameters:
day
- Day value in one month. Currently only support Start of Month and Middle of Month, eg. 1 or 15hour
- Hour value in one Day, from 0 to 23.- Returns:
- the
WebSubscriptionTrigger
object represent the hidden trigger - Throws:
WebObjectsException
-
getTriggers
WebFolder getTriggers(java.lang.String id, int contentType, java.lang.String pgd) throws WebObjectsException
Triggers are first class objects in the MicroStrategy MD. This method gets the current triggers within the project.- Parameters:
id
- indicates the id of content.contentType
- Indicates the type of content. Possible values are defined inEnumWebSubscriptionContentTypes
pgd
- project Id.- Returns:
- the
WebFolder
object containing the triggers - Throws:
WebObjectException
- whenever there is an error in retrieving information from the Intelligence ServerWebObjectsException
-
getAvailableFormats
SimpleList getAvailableFormats(int contentType, int deliveryMode) throws WebObjectsException
Retrieves list ofWebSubscriptionContentFormat
objects for the given delivery mode and contentType- Parameters:
contentType
- Indicates the type of content. Possible values are defined inEnumWebSubscriptionContentTypes
deliveryMode
- indicates the delivery mode for which formats should be retrieved Possible values are defined inEnumWebSubscriptionDeliveryMode
Please note that this method does not filter out formats which are not supported by a report or document. For example, the flash format is supported only if the document or report is enabled for visualizations. Please useWebSubscriptionContent.getAvailableFormats()
to get a filtered list depending on the report or document- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
-
getAvailableFormats
SimpleList getAvailableFormats(WebResultSetInstance ri, int contentType, int deliveryMode) throws WebObjectsException
Deprecated.Please useWebSubscriptionContent.getAvailableFormats()
instead.Retrieves list ofWebSubscriptionContentFormat
objects for the given delivery mode and contentType- Parameters:
ri
- Some formats rely on properties configured on the report or document.contentType
- Indicates the type of content. Possible values are defined inEnumWebSubscriptionContentTypes
deliveryMode
- indicates the delivery mode for which formats should be retrieved Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 8.1.0
-
getLocation
WebSubscriptionLocation getLocation(java.lang.String locationKey, int contentType, int deliveryMode) throws WebObjectsException
Retrieves aWebSubscriptionLocation
object using the key provided. Typically this method is useful while persisting and restoring the state of a specific location- Parameters:
locationKey
- the key of the location object that needs to be retrieved. The key can be obtained usingStringKey.getStringKey()
which is accessible from the location object- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 7.5.1
-
getDevice
WebSubscriptionDevice getDevice(java.lang.String deviceID) throws WebObjectsException
Retrieves aWebSubscriptionDevice
using the id.- Parameters:
deviceID
- ID of the device- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 8.0.0
-
getNotificationAddresses
SimpleList getNotificationAddresses(int subscriptionDeliveryMode, int notificationDeliveryMode) throws WebObjectsException
Retrieves a list of notification addresses that are available. The parameters indicate the subscription and the notification delivery mode. For instance, you could create a file subscription (subscription delivery modeEnumWebSubscriptionDeliveryMode.SUBSCRIPTION_DELIVERY_MODE_FILE
) and have the notification sent to your email (notification delivery modeEnumWebSubscriptionDeliveryMode.SUBSCRIPTION_DELIVERY_MODE_EMAIL
)- Parameters:
subscriptionDeliveryMode
- indicates the delivery mode for which a subscription is intended to be created Possible values are defined inEnumWebSubscriptionDeliveryMode
notificationDeliveryMode
- indicates the delivery mode in which the notification will be sent Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 8.0.0
-
getNotificationDevices
SimpleList getNotificationDevices(int subscriptionDeliveryMode, int notificationDeliveryMode) throws WebObjectsException
Retrieves a list of notification devices that are available. The parameters indicate the subscription and the notification delivery mode. For instance, you could create a file subscription (subscription delivery modeEnumWebSubscriptionDeliveryMode.SUBSCRIPTION_DELIVERY_MODE_FILE
) and have the notification sent to your email (notification delivery modeEnumWebSubscriptionDeliveryMode.SUBSCRIPTION_DELIVERY_MODE_EMAIL
)- Parameters:
subscriptionDeliveryMode
- indicates the delivery mode for which a subscription is intended to be created Possible values are defined inEnumWebSubscriptionDeliveryMode
notificationDeliveryMode
- indicates the delivery mode in which the notification will be sent Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 8.0.0
-
init
void init(java.lang.String resourceDir)
This call should be made before any subscription functionality is used.- Parameters:
resourceDir
- directory containing the merlin.ser file- Since:
- MicroStrategy Web 8.0.1
-
isIServerNCSSource
boolean isIServerNCSSource()
This method indicates whether the currentWebSubscriptionsSource
connects to the MicroStrategy Intelligence server for all Narrowcast related information (TRUE
) or the Narrowcast Server for the same (false
)- Since:
- MicroStrategy Web 9.0.0
-
setBlockBegin
void setBlockBegin(int blockBegin)
Sets the starting count for all thegetSubscriptions()
methods exposed in this interface. This will facilitate incremental fetching of the subscriptions. Please note that this does not apply to methods likegetLocations(int)
,getAddresses()
etc.- Parameters:
blockBegin
-- Since:
- MicroStrategy Web 9.0.0
-
setBlockCount
void setBlockCount(int blockCount)
Sets the block size for the incremental fetch of thegetSubscriptions()
method. Similar tosetBlockBegin(int)
this block count only applies to the fetching of subscriptions and not addresses, locations, devices or triggers.- Parameters:
blockCount
-- Since:
- MicroStrategy Web 9.0.0
-
getBlockBegin
int getBlockBegin()
Returns the current starting count set for the incremental fetch of the subscriptions. Please seesetBlockBegin(int)
for more details.- Since:
- MicroStrategy Web 9.0.0
-
getBlockCount
int getBlockCount()
Returns the current block size set for the incremental fetch of the subscriptions. Please seesetBlockCount(int)
for more details.- Since:
- MicroStrategy Web 9.0.0
-
checkNCSCSConfigured
boolean checkNCSCSConfigured() throws WebObjectsException
Utility method to check if Content Services is configured for Distribution Services in the metadata- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 9.0.0
-
getProjectSettings
WebProjectSettings getProjectSettings(int type, int moduleID) throws WebObjectsException
Returns theWebProjectSettings
object for a specific module. Currently this can be used to get the project settings for notifications for various delivery modes.- Parameters:
type
- fromEnumDSSXMLProjectConfigurationSettingType
moduleID
- fromEnumDSSXMLNotificationModuleID
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 9.0.0
-
getSubscriptionCount
int getSubscriptionCount(WebObjectInfo woi, int deliveryMode) throws WebObjectsException
Returns the count of the list of available subscriptions corresponding to the specified object and delivery mode- Parameters:
woi
- the object for which subscriptions are to be retrieved. The type of this object is one ofdeliveryMode
- indicates the delivery mode for which subscriptions should be retrieved Possible values are defined inEnumDSSXMLSubscriptionDeliveryType
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 9.0.0
-
getNewSubscriptionsFilter
WebSubscriptionsFilter getNewSubscriptionsFilter()
Returns a clean filter to be modified to manipulate which subscriptions are returned by getSubscriptions calls on this and other objects- Returns:
- new
WebSubscriptionsFilter
object
-
getNewRecipientList
WebSubscriptionRecipientList getNewRecipientList(int deliveryMode) throws WebObjectsException
Returns an empty recipient list to hold the specified type of recipients- Parameters:
deliveryMode
- int fromEnumDSSXMLSubscriptionDeliveryType
to discern what type of recipients this list will hold. Only supports single delivery type- Returns:
- empty
WebSubscriptionRecipientList
- Throws:
WebObjectsException
-
addRecipientsToSubscription
void addRecipientsToSubscription(WebSubscriptionRecipientList recipients, java.lang.String subscriptionID) throws WebObjectsException
Adds the specified recipients to the subscription with the specified ID. The specifiedWebSubscriptionRecipientListImpl
should have the same delivery mode as the subscription with the specified ID- Parameters:
recipients
-WebSubscriptionRecipientList
containing the recipients to be addedsubscriptionID
-String
containing the subscription to add the recipients to- Throws:
WebObjectsException
-
getFlags
int getFlags()
Returns the current setting of the flags which will determine what data will be obtained when retrieving subscriptions from the Intelligence Server.This will affect all getSubscriptions calls on this interface. This value will come fromEnumDSSXMLNCSInstanceSourceField
.- Returns:
- int from
EnumDSSXMLNCSInstanceSourceField
- See Also:
setFlags(int)
-
setFlags
void setFlags(int flags)
Sets the current setting of the flags which will determine what data will be obtained when retrieving subscriptions from the Intelligence Server. This will affect all getSubscriptions calls on this interface. This value should come fromEnumDSSXMLNCSInstanceSourceField
.- Parameters:
flags
- int fromEnumDSSXMLNCSInstanceSourceField
- See Also:
getFlags()
-
hasAnySubscription
boolean hasAnySubscription()
Indicate if the user logged in has at least one subscription. Currently, it's only used for showing the 'My Subscriptions' shortcut.
-
isUserAllowedToSubscribe
boolean isUserAllowedToSubscribe(java.lang.String objectID, int objectType, java.lang.String userID, java.lang.String projectID) throws WebObjectsException
whether allow user to subscribe report/document- Parameters:
objectID
- report/document IDobjectType
- report/documentuserID
- the user ID to subscribeprojectID
- the project ID- Returns:
- whether allow user to subscribe report/document
- Throws:
WebObjectsException
-
getSubscriptionsByDeliveryMode
SimpleList getSubscriptionsByDeliveryMode(int deliveryMode, java.lang.String projectDSSID) throws WebObjectsException
Returns the list of available subscriptions corresponding to the specified object and delivery mode and for a particular project. Using this method with projectID will return all the subscriptions of this delivery mode for all users.This will be slower as compared to using it without projectID which will return all subscriptions of the delivery mode but only of the user using it.- Parameters:
woi
- the object for which subscriptions are to be retrieved. The type of this object is one ofdeliveryMode
- indicates the delivery mode for which subscriptions should be retrieved Possible values are defined inEnumWebSubscriptionDeliveryMode
- Throws:
WebObjectsException
-
getScheduledMaintenances
WebScheduledMaintenances getScheduledMaintenances() throws WebObjectsException
RetrieveWebScheduledMaintenances
object from i-server.- Returns:
- The
WebScheduledMaintenances
object - Throws:
WebObjectException
- if there is an error in populating the details from IServer.WebObjectsException
-
createScheduledMaintenance
WebScheduledMaintenance createScheduledMaintenance(WebScheduleTrigger trigger, WebProject project, int commandID, java.util.ArrayList<ScheduledMaintenanceParameter> parm) throws WebObjectsException
Create a newWebScheduledMaintenance
object.- Parameters:
trigger
- , theWebScheduleTrigger
object used to create aWebScheduledMaintenance
object.project
- , theWebProject
object used to create aWebScheduledMaintenance
object.commandID
- , the command used to create scheduled maintenance object, comes fromEnumDSSXMLServerCommand
.parm
- , the parameters used to create the scheduled maintenance object. Note different command requires different parameters. For a parameter, it could be required or optional. And its type could be String or int. Please refer to {@link http://ts-web-inf:8080/snipsnap/space/swang/ScheduledMaintenance} for details.- Returns:
- The
WebScheduledMaintenances
object - Throws:
WebObjectException
- if there is an error in populating the details from IServer.WebObjectsException
-
-