public interface

SubscriptionBean

implements WebBean
com.microstrategy.web.beans.SubscriptionBean

Class Overview

This bean represents a Narrowcast subscription. This helps you to manage subscriptions to reports and documents that will be delivered as

  • Email
  • a File
  • a Print job
The important functionality this bean provides is:
  • creating new subscripitions by defining appropriate content,address, trigger and personalization
  • edit an existing subscription by initializing this bean with an appropriate id
  • delete an existing subscription
This bean can be created using newSubscriptionBean() Once created, the bean needs to associated with a content, a trigger and an address before it can be saved The content is defined using a valid report/document. This is set using setContent(String, int). The trigger to be used with this subscription is defined using setTriggerID(String). The address to be used with this subscription is defined by adding a new address ID to the list retrieved using getAddresses().

See Also

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
Public Methods
abstract void cancel()
sets the bean state to cancel
abstract void delete()
This method deletes the subscription that the bean was initialized with using the setSubscriptionID method.
abstract String getAddressValues()
abstract String getAddressValuesDeviceID()
abstract SimpleList getAddresses()
Returns an editable list.
abstract SimpleList getAvailableAddresses()
Returns a non-editable list of available addresses that are valid for this subscription that the user can pick from.
abstract SimpleList getAvailableDevices()
Returns a list of available devices that the user can pick from This is a list of devices that are relevant for the content defined using setContent(String, int) So it is important to set the delivery mode and set the content before retrieving this list
abstract SimpleList getAvailableLocations()
Returns a list of available WebSubscriptionDevice and WebSubscriptionAddress objects.
abstract SimpleList getAvailableMobileDevices()
Returns a list of available devices that the user can pick from for the Applciation type on the Alerts editor
abstract SimpleList getAvailableTriggers()
Returns a list of available triggers that the user can pick from This is a list of triggers that are relevant for the content defined using setContent(String, int) So it is important to set the delivery mode and set the content before retrieving this list
abstract WebSubscriptionContent getContent()
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract String getCustomMessage()
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract WebSubscriptionDeliveryModeProperties getDeliveryMode()
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract int getEditMode()
Returns the edit mode.
abstract String getLocationKey()
Retrieves location key of subscription.
abstract WebSubscriptionNotification getNotification()
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract PromptsBean getPromptsBean()
returns the embedded PromptsBean.
abstract WebEventHandler getPromptsEventHandler()
This method is deprecated. No replacement.
abstract WebSubscription getSubscription()
Returns the subscription object
abstract String getSubscriptionID()
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract ObjectBean getTarget()
retrieves the object (report or document) for which this subscription is created Returns null if no content was set
abstract String getTriggerID()
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract int getViewMode()
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract boolean isDiffContentForAlertSelected()
Indicate if user's about to select a different object for alerts
abstract boolean isPersonalized()
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract boolean isSendNowSet()
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract boolean isTriggerNonSchedulable()
return whether the trigger is nonSchedulable.
abstract void reprompt()
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract void save()
This method saves all the required subscriptions for the specified content, trigger and the list of addresses Once the save method completes, the list of addresses is reset.
abstract void setAddressValues(String values, String deviceID)
This presents an alternative to creating addresses via getAddresses().
abstract void setContent(ObjectBean ob)
You can also set an object bean on the SubscriptionBean.
abstract void setContent(String objectID, int type)
Defines the content of the subscription.
abstract void setCustomMessage(String message)
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract void setDeliveryMode(int deliveryMode)
Sets the device group to one of the enumerations defined in EnumWebSubscriptionDeliveryMode.
abstract void setIsDiffContentForAlertSelected(boolean selected)
abstract void setLocationKey(String key)
Sets location key of subscription.
abstract void setPromptsEventHandler(WebEventHandler promptsEventHandler)
This method is deprecated. setting the prompt event handler using setWebEventHandler(WebEventHandler) should cover this case.
abstract void setSendNow(boolean sendNow)
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract void setSubscriptionID(String subscriptionID)
This method is deprecated. use setSubscriptionID(String, int) instead.
abstract void setSubscriptionID(String subscriptionID, int editMode)
sets the subscriptionID to be used for this subscription
abstract void setTriggerID(String triggerID)
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
abstract void setViewMode(int mode)
This method is deprecated. Use the subscription object (getSubscription()) from bean instead.
[Expand]
Inherited Methods
From interface com.microstrategy.utils.serialization.Persistable
From interface com.microstrategy.web.beans.RequestPersistable
From interface com.microstrategy.web.beans.Transformable
From interface com.microstrategy.web.beans.WebBean
From interface com.microstrategy.web.beans.WebComponent

Public Methods

public abstract void cancel ()

sets the bean state to cancel

public abstract void delete ()

This method deletes the subscription that the bean was initialized with using the setSubscriptionID method. If the bean was not initialized in this way, then this call has no effect.

Throws
WebBeanException thrown if error occurs

public abstract String getAddressValues ()

public abstract String getAddressValuesDeviceID ()

public abstract SimpleList getAddresses ()

Returns an editable list. This is a convenience mechanism for the user to create multiple subscriptions at once when save() on this bean is called, subscriptions are created for each of the addresses that are a part of this list. The list is cleared after a successful completion the save() call. If the bean is initialized using the setSubscriptionID(String) method, then the list is prepopulted with the address ID that the subscription (represented by the ID set) corresponds to.

Returns
  • an editable SimpleList of addressIDs. Each element is of type String

public abstract SimpleList getAvailableAddresses ()

Returns a non-editable list of available addresses that are valid for this subscription that the user can pick from.

Returns
Throws
WebBeanException thrown if error occurs

public abstract SimpleList getAvailableDevices ()

Returns a list of available devices that the user can pick from This is a list of devices that are relevant for the content defined using setContent(String, int) So it is important to set the delivery mode and set the content before retrieving this list

Returns
Throws
WebBeanException thrown if error occurs

public abstract SimpleList getAvailableLocations ()

Returns a list of available WebSubscriptionDevice and WebSubscriptionAddress objects. Applicable to device groups SUBSCRIPTION_DELIVERY_MODE_FILE and SUBSCRIPTION_DELIVERY_MODE_PRINT only.

Returns
  • collection of file and print locations (device and addresses)
Throws
WebBeanException if there is a problem retrieving the available locations.

public abstract SimpleList getAvailableMobileDevices ()

Returns a list of available devices that the user can pick from for the Applciation type on the Alerts editor

Returns
Throws
WebBeanException thrown if error occurs

public abstract SimpleList getAvailableTriggers ()

Returns a list of available triggers that the user can pick from This is a list of triggers that are relevant for the content defined using setContent(String, int) So it is important to set the delivery mode and set the content before retrieving this list

Returns
Throws
WebBeanException thrown if error occurs

public abstract WebSubscriptionContent getContent ()

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

Retrieves the associated WebSubscriptionContent object The content is an abstraction that represents the underlying data that will be delivered. Content is fully defined by associating a report/document object with it.

Returns
Throws
WebBeanException thrown if the content can not be retrieved.

public abstract String getCustomMessage ()

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

Returns the custom message that is defined

Returns
  • The custom message set by the user

public abstract WebSubscriptionDeliveryModeProperties getDeliveryMode ()

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

Returns one of the delivery modes defined in EnumWebSubscriptionDeliveryMode. If previously unspecified with setDeliveryMode(int), this will return the default value SUBSCRIPTION_DELIVERY_MODE_EMAIL.

Returns
  • the delivery mode.

public abstract int getEditMode ()

Returns the edit mode.

Returns
  • edit mode
Throws
WebBeanException if an error occurred on Server while retrieving the subscription object.

public abstract String getLocationKey ()

Retrieves location key of subscription.

Returns
  • the location key.

public abstract WebSubscriptionNotification getNotification ()

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

This allows the user to define properties that will be used to configure delivery confirmation.

Returns
  • the notification object.

public abstract PromptsBean getPromptsBean ()

returns the embedded PromptsBean. The returned PromptsBean is empty if this subscription does not have contain any prompts.

Returns
  • the embedded PromptsBean.

public abstract WebEventHandler getPromptsEventHandler ()

This method is deprecated.
No replacement.

Gets the prompts event handler that is associated with the underlying promptsbean. This is just a convenience method. The result of this is the same as this.getPromptsBean().getWebEventHandler()

Returns
  • the prompts event handler
See Also

public abstract WebSubscription getSubscription ()

Returns the subscription object

Returns
  • subscription object
Throws
WebBeanException if an error occurred on Server while retrieving the subscription object.

public abstract String getSubscriptionID ()

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

retrieves the subscriptionID. SubscriptionID is the ID of the underlying subscription object The underlying subscription object cannot be retrieved using this bean. The subscriptionID is typically retrieved from a subscription object that is returned as a part of a list of subscriptions The list of subscriptions can be retrieved using the SubscriptionFolderBean

Returns
  • the subscriptionID

public abstract ObjectBean getTarget ()

retrieves the object (report or document) for which this subscription is created Returns null if no content was set

Returns
  • the object bean.
Throws
WebBeanException
WebBeanException

public abstract String getTriggerID ()

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

retrieves the triggerID. The trigger is the object that defines when (and how often) the subscription contents will be delivered

Returns
  • the triggerID

public abstract int getViewMode ()

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

Only relevant in the case of a report subscription. indicates whether the view mode is grid, graph or both possible values from EnumWebReportViewMode

Returns
  • the report view mode.

public abstract boolean isDiffContentForAlertSelected ()

Indicate if user's about to select a different object for alerts

Returns
  • if user's about to select a differernt object for alerts

public abstract boolean isPersonalized ()

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

returns true indicating whether the subscription is personalized This means that the content (report or document) used for this subscription was prompted

Returns
  • true if the subscription is personalized
Throws
WebBeanException thrown if error occurs

public abstract boolean isSendNowSet ()

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

Returns true if the preview of the subscription will be sent.

Returns
  • boolean indicating whether the preview for the subscription will be sent

public abstract boolean isTriggerNonSchedulable ()

return whether the trigger is nonSchedulable.

public abstract void reprompt ()

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

Reopens the answered prompts, if there is any, contained in this SubscriptionBean.

Throws
WebBeanException thrown if error occurs when refreshing.

public abstract void save ()

This method saves all the required subscriptions for the specified content, trigger and the list of addresses Once the save method completes, the list of addresses is reset. In other words, the getAddresses call would return an empty list

Throws
WebBeanException thrown if error occurs

public abstract void setAddressValues (String values, String deviceID)

This presents an alternative to creating addresses via getAddresses().

Parameters
values existing or new address values.
deviceID device under which new addresses are created.

public abstract void setContent (ObjectBean ob)

You can also set an object bean on the SubscriptionBean. The object bean can be either a ReportBean, DocumentBean or a RWBean. By setting the object bean, the underlying WebSubscription object is created and initialized with the instance from the object bean

public abstract void setContent (String objectID, int type)

Defines the content of the subscription.

Parameters
objectID ID of the object
type indicates whether it's a report or a document -- value from EnumDSSXMLObjectTypes
Throws
WebBeanException thrown if error occurs

public abstract void setCustomMessage (String message)

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

Defines a message that will be added to the subscription This is typically sent as an attachment to the actual content being delivered.

Parameters
message the message text that should be included with the subscription delivered

public abstract void setDeliveryMode (int deliveryMode)

Sets the device group to one of the enumerations defined in EnumWebSubscriptionDeliveryMode.

Parameters
deliveryMode the delivery mode.

public abstract void setIsDiffContentForAlertSelected (boolean selected)

public abstract void setLocationKey (String key)

Sets location key of subscription. This provides a way to abstract a address and a device into a single concept The client can use a device (for instance in the case of print subscriptions) or an address and get the corresponding key to set on this subscription.

Parameters
key the location key.

public abstract void setPromptsEventHandler (WebEventHandler promptsEventHandler)

This method is deprecated.
setting the prompt event handler using setWebEventHandler(WebEventHandler) should cover this case.

Sets the prompts event handler of the underlying prompts bean. This is just a convenience method. The effect of this is the same as doing this.getPromptsBean().setWebEventHandler(promptsEventHandler)

Parameters
promptsEventHandler of the underlying prompts bean.

public abstract void setSendNow (boolean sendNow)

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

Specifies that after making the subscription, a one-time delivery of the content should be done right away to the addresses to which the subscriptions are saved.

Parameters
sendNow boolean indicating that a one-time delivery should be done right away after saving

public abstract void setSubscriptionID (String subscriptionID)

This method is deprecated.
use setSubscriptionID(String, int) instead.

sets the subscriptionID to be used for this subscription.

Parameters
subscriptionID to be set
Throws
WebBeanException thrown if the argument provided does not correspond to an existing subscription

public abstract void setSubscriptionID (String subscriptionID, int editMode)

sets the subscriptionID to be used for this subscription

Parameters
subscriptionID to be set
editMode the edit mode. should be a value from EnumWebSubscriptionEditModes
Throws
WebBeanException thrown if the argument provided does not correspond to an existing subscription

public abstract void setTriggerID (String triggerID)

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

sets the triggerID to be used for this subscription. The trigger is the object that defines when (and how often) the subscription will be delivered The list of triggers available for this subscription can be retrieved using getAvailableTriggers(). You can use getID() for retrieving the trigger ID

Parameters
triggerID to be set

public abstract void setViewMode (int mode)

This method is deprecated.
Use the subscription object (getSubscription()) from bean instead.

Only relevant in the case of a report subscription. indicates whether the view mode is grid, graph or both

Parameters
mode one of the possible values from EnumWebReportViewMode