Package com.microstrategy.web.objects
Interface WebSubscriptionContact
-
- All Superinterfaces:
EnumWebPersistableState
,Persistable
,StringKey
,WebSubscriptionComponent
- All Known Subinterfaces:
WebSubscriptionDynamicRecipientList
- All Known Implementing Classes:
WebIServerSubscriptionDynamicRecipientListImpl
public interface WebSubscriptionContact extends WebSubscriptionComponent
This interface represents a 'Contact' object. It is used in the context of Distribution Services. A contact is an object that contains a list of addresses and is linked to aWebUserEntity
. When the subscription is executed, the report/document is run using the credentials of this user. By default every user has a 'default' contact which contains all the addresses and locations of the user (available from the User Preferences page in Web). The default contact is not pre-created, but is created on the fly as and when required.- Since:
- MicroStrategy Web 9.0.0
-
-
Field Summary
-
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAddress(WebSubscriptionAddress address)
add address of contactvoid
addMember(WebSubscriptionContact member)
add the members of contactjava.util.List<WebSubscriptionAddress>
getAddreses()
get the addresses of contactSimpleList
getAddressesByDeliveryMode(int delMode)
Returns aSimpleList
ofWebSubscriptionAddress
objects associated to this particular contact for a specified delivery mode.int
getContactType()
Returns the type of contact, fromEnumDSSXMLSubscriptionContactType
boolean
getIsAllInfo()
whether to save all info for the contactjava.lang.String
getLinkedUserId()
Gets the linked user Id of the contactjava.lang.String
getLinkedUserName()
Gets the linked user name of the contactSimpleList
getLocationsByDeliveryMode(int delMode)
Returns aSimpleList
ofWebSubscriptionLocation
objects associated to this particular contact for a specified delivery mode.WebSubscriptionContacts
getMembers()
get the members of the contactWebSubscriptionContacts
getMemberships()
get the Contact Groups of which the given contact is a member ofboolean
getStatus()
get the status of the contactSimpleList
getSubscriptions(int deliveryMode)
Returns aSimpleList
ofWebSubscription
objects to which this particular contact is subscribed to, for a specified delivery mode.SimpleList
getSubscriptions(int deliveryMode, int blockBegin, int blockCount)
Returns aSimpleList
collection ofWebSubscription
objects to which this particular user is subscribed to, for a specified delivery mode, from a specified begin block, up to a specified block count.SimpleList
getSubscriptions(WebSubscriptionsFilter filter, int blockBegin, int blockCount)
Returns aSimpleList
collection ofWebSubscription
objects to which this particular contact is a recipient, for a specified delivery mode, from a specified begin block, up to a specified block count.void
removeAddress(WebSubscriptionAddress address)
remove the address of contactvoid
removeMember(WebSubscriptionContact member)
remove members from the contactvoid
save()
save this conatctvoid
setDescription(java.lang.String description)
set description of contactvoid
setIsAllInfo(boolean isAllInfo)
Set whether to save all info for the contact
isAllInfo flag is added when we develop the save_contact XML API for Contact and contact group manager in Cloud OM.void
setLinkedUser(java.lang.String linkedUser)
set the linked Uservoid
setName(java.lang.String displayName)
Sets the name of the contactvoid
setStatus(boolean isEnabled)
set the status for the contactvoid
updateAddress(WebSubscriptionAddress address)
update address of contact-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState
-
Methods inherited from interface com.microstrategy.utils.StringKey
getStringKey
-
Methods inherited from interface com.microstrategy.web.objects.WebSubscriptionComponent
getDescription, getID, getName, getSessionInfo, getType, isPopulated, populate
-
-
-
-
Method Detail
-
getContactType
int getContactType()
Returns the type of contact, fromEnumDSSXMLSubscriptionContactType
-
getAddressesByDeliveryMode
SimpleList getAddressesByDeliveryMode(int delMode) throws WebObjectsException
Returns aSimpleList
ofWebSubscriptionAddress
objects associated to this particular contact for a specified delivery mode.- Parameters:
delMode
- , fromEnumDSSXMLSubscriptionDeliveryType
- Throws:
WebObjectsException
-
getSubscriptions
SimpleList getSubscriptions(int deliveryMode) throws WebObjectsException
Returns aSimpleList
ofWebSubscription
objects to which this particular contact is subscribed to, for a specified delivery mode.- Parameters:
deliveryMode
- , fromEnumDSSXMLSubscriptionDeliveryType
- Throws:
WebObjectsException
-
getSubscriptions
SimpleList getSubscriptions(int deliveryMode, int blockBegin, int blockCount) throws WebObjectsException
Returns aSimpleList
collection ofWebSubscription
objects to which this particular user is subscribed to, for a specified delivery mode, from a specified begin block, up to a specified block count.- Parameters:
deliveryMode
- , fromEnumDSSXMLSubscriptionDeliveryType
blockBegin
- , the starting count of subscription, it is 0-based index which means set it N will return subscriptions from the (N+1)th subscription.blockCount
- , block size for the incremental fetch of subscription. If set it 0, will return all subscriptions from the starting count- Throws:
WebObjectsException
-
getSubscriptions
SimpleList getSubscriptions(WebSubscriptionsFilter filter, int blockBegin, int blockCount) throws WebObjectsException
Returns aSimpleList
collection ofWebSubscription
objects to which this particular contact is a recipient, for a specified delivery mode, from a specified begin block, up to a specified block count.- Parameters:
filter
-WebSubscriptionsFilter
used to filter the results of this call. A blank filter can be retrieved fromWebSubscriptionsSource.getNewSubscriptionsFilter()
blockBegin
- , the starting count of subscription, it is 0-based index which means set it N will return subscriptions from the (N+1)th subscription.blockCount
- , block size for the incremental fetch of subscription. If set it 0, will return all subscriptions from the starting count- Returns:
SimpleList
collection ofWebSubscription
objects- Throws:
WebObjectsException
-
getLocationsByDeliveryMode
SimpleList getLocationsByDeliveryMode(int delMode) throws WebObjectsException
Returns aSimpleList
ofWebSubscriptionLocation
objects associated to this particular contact for a specified delivery mode.- Parameters:
delMode
- , fromEnumDSSXMLSubscriptionDeliveryType
- Throws:
WebObjectsException
-
setName
void setName(java.lang.String displayName)
Sets the name of the contact- Parameters:
displayName
-String
containing the name of the contact
-
getLinkedUserName
java.lang.String getLinkedUserName()
Gets the linked user name of the contact- Returns:
String
full name of the linked user
-
getLinkedUserId
java.lang.String getLinkedUserId()
Gets the linked user Id of the contact- Returns:
String
Id of the linked user
-
save
void save() throws WebObjectsException
save this conatct- Throws:
WebObjectsException
-
setDescription
void setDescription(java.lang.String description)
set description of contact- Parameters:
description
-
-
addAddress
void addAddress(WebSubscriptionAddress address)
add address of contact- Parameters:
address
-WebSubscriptionAddress
-
updateAddress
void updateAddress(WebSubscriptionAddress address)
update address of contact- Parameters:
address
-WebSubscriptionAddress
-
removeAddress
void removeAddress(WebSubscriptionAddress address) throws WebObjectsException
remove the address of contact- Parameters:
address
-WebSubscriptionAddress
- Throws:
WebObjectsException
-
getAddreses
java.util.List<WebSubscriptionAddress> getAddreses()
get the addresses of contact- Returns:
- List of the addresses of contact
-
setLinkedUser
void setLinkedUser(java.lang.String linkedUser)
set the linked User- Parameters:
linkedUser
- the linked User GUID
-
setStatus
void setStatus(boolean isEnabled)
set the status for the contact- Parameters:
isEnabled
-
-
addMember
void addMember(WebSubscriptionContact member)
add the members of contact- Parameters:
member
-WebSubscriptionContact
-
getMembers
WebSubscriptionContacts getMembers()
get the members of the contact- Returns:
WebSubscriptionContacts
-
getMemberships
WebSubscriptionContacts getMemberships()
get the Contact Groups of which the given contact is a member of- Returns:
WebSubscriptionContacts
-
removeMember
void removeMember(WebSubscriptionContact member) throws WebObjectsException
remove members from the contact- Parameters:
member
- the removed members- Throws:
WebObjectsException
-
getStatus
boolean getStatus()
get the status of the contact
-
getIsAllInfo
boolean getIsAllInfo()
whether to save all info for the contact- Returns:
- whether to get all info
-
setIsAllInfo
void setIsAllInfo(boolean isAllInfo)
Set whether to save all info for the contact
isAllInfo flag is added when we develop the save_contact XML API for Contact and contact group manager in Cloud OM.
Below is the description and usage of this flag. It is added to keep backward compatibility.
1. When itâs false, it keeps the old behavior that we remove or edit one of its addresses for this contact. We save the changed addresses.
2. When itâs true, it indicates to save all details for this contact, including all of its addresses, contact members, etc. For this case, we need pass all addresses of this contact to backend.- Parameters:
isAllInfo
-
-
-