Interface IDSSXMLSubscriptionServer


  • public interface IDSSXMLSubscriptionServer
    This interface provides all the functionality related to subscriptions in the XML API layer. It contains the calls which are used to retrieve a list of subscriptions, addresses, contacts. It also provides methods to delete and save a subscription, retrieve settings related to distribution services that are stored at the project, trigger an event and link contacts with a user
    Since:
    MicroStrategy Web 9.0.0
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String AddRecipients​(java.lang.String sessionID, java.lang.String subscriptionXML)
      This will add recipients to a subscription without requiring the user to have the entire subscription XML
      boolean CheckNCSCS​(java.lang.String sessionID)
      This calls checks if the content services repository is created and configured for use with Distribution Services.
      java.lang.String checkSubscriptionACL​(java.lang.String sessionID, java.lang.String did, int type, java.lang.String userID, java.lang.String projID)
      This call retrieves whether allow user to subscribe this report/document
      void DisableContact​(java.lang.String sessionID, java.lang.String contactID)
      Disable a contact, given the ID of the contact.
      void EnableContact​(java.lang.String sessionID, java.lang.String contactID)
      Enable a contact, given the ID of the contact.
      java.lang.String GetAddress​(java.lang.String sessionID, java.lang.String addressID)
      Retrieves the definition of an address that exists in the MD.
      java.lang.String GetAllContacts​(java.lang.String sessionID, int deliveryType, int flags, int blockBegin, int blockCount, int orderBy, java.lang.String namePattern, java.lang.String userID, int contactType, int enableFlag, boolean securityEnabled)  
      java.lang.String GetAllContacts​(java.lang.String sessionID, int deliveryType, int flags, int blockBegin, int blockCount, int orderBy, java.lang.String namePattern, java.lang.String userID, int contactType, int enableFlag, boolean securityEnabled, java.lang.String dssID, int dssType)
      Returns XML String containing contacts based on a report or document
      java.lang.String GetAllContacts​(java.lang.String sessionID, int deliveryType, int flags, int blockBegin, int blockCount, int orderBy, java.lang.String namePattern, java.lang.String userID, int contactType, int enableFlag, boolean securityEnabled, java.util.List<ObjectIdTypeAndProjectId> dssIDsAndTypes)
      Returns XML String containing contacts based on a list of report or document, its type, and the project it belongs to
      java.lang.String GetAllDevices​(java.lang.String sessionID)
      Returns a list of all devices that the current user has access to.
      java.lang.String GetContact​(java.lang.String sessionID, java.lang.String contactID, int deliveryType, boolean createDefaultContact)
      Returns XML String containing contact definition for contact with specified contactID and deliveryType
      java.lang.String GetContactsBySearch​(java.lang.String sessionID, int flags, int blockBegin, int blockCount, java.lang.String searchXML, java.lang.String orderByXML)  
      java.lang.String GetObjectAssociatedSchedules​(java.lang.String sessionID, java.lang.String did, int type, java.lang.String messageId)
      This call retrieves the object level schedules to a subscription
      java.lang.String getObjectAssociatedUsers​(java.lang.String sessionID, java.lang.String did, int type, java.lang.String messageId)
      This call retrieves the associated users of a report or document subscription
      java.lang.String GetProjectDSSettings​(java.lang.String sessionID, java.lang.String projectID)
      Returns XML String containing Distribution Services (DS) settings for users unable to access the server definition
      java.lang.String GetProjectsAssociatedSchedules​(java.lang.String sessionID)
      This call retrieves the schedules to a subscription
      java.lang.String GetSubscription​(java.lang.String sessionID, java.lang.String subscriptionID)
      Retrieves the definition of a specific subscription, given the subscritionID.
      java.lang.String GetSubscriptionCount​(java.lang.String sessionID, java.lang.String contentID, java.lang.String userID, java.lang.String contactID, java.lang.String addressID, java.lang.String triggerID, java.lang.String projectID, int deliveryType)
      This call retrieves a count of subscriptions for a given criteria.
      java.lang.String GetSubscriptions​(java.lang.String sessionID, java.lang.String filterXML, int blockBegin, int blockCount, int detailFlag)
      This call retrieves a list of subscriptions for a given criteria, specified in the filterXML.
      java.lang.String GetSubscriptions​(java.lang.String sessionID, java.lang.String filterXML, int blockBegin, int blockCount, int detailFlag, boolean isForAllProjects)
      This call retrieves a list of subscriptions for a given criteria, specified in the filterXML.
      java.lang.String GetSubscriptions​(java.lang.String sessionID, java.lang.String contentID, java.lang.String userID, java.lang.String contactID, java.lang.String addressID, java.lang.String triggerID, java.lang.String projectID, int blockBegin, int blockCount)
      This call retrieves a list of subscriptions for a given criteria.
      void LinkContactsWithUser​(java.lang.String sessionID, java.lang.String userID, java.lang.String contactsXML)
      Links a list of contacts with a user.
      void RemoveContact​(java.lang.String sessionID, java.lang.String contactID)
      Removes/deletes a contact, given the ID of the contact.
      void RemoveContacts​(java.lang.String sessionID, java.lang.String contactsXML, boolean disableContact)  
      void RemoveSubscription​(java.lang.String sessionID, java.lang.String subscriptionID)
      Deletes a subscription based on a specified subscriptionID.
      java.lang.String SaveAddress​(java.lang.String sessionID, java.lang.String userID, java.lang.String addressXML)
      Saves a new address to the MD.
      java.lang.String SaveAddress​(java.lang.String sessionID, java.lang.String userID, java.lang.String addressXML, java.lang.String appID)
      Saves a new address to the MD.
      void SaveContact​(java.lang.String sessionID, java.lang.String userID, java.lang.String contactXML)
      Saves a contact in the MD.
      void SaveObjectAssociatedSchedules​(java.lang.String sessionID, java.lang.String requestXML, java.lang.String did, int type, java.lang.String messageId, java.lang.String flag)
      This will save the schedules to a subscription in Object level
      void SaveObjectAssociatedUsers​(java.lang.String sessionID, java.lang.String requestXML, java.lang.String did, int type, java.lang.String messageId, java.lang.String flag)
      This call save the associated users of a report or document subscription
      void SaveProjectsAssociatedSchedules​(java.lang.String sessionID, java.lang.String associatedScheduleXML)
      This will save the schedules to a subscription
      void SaveSubscription​(java.lang.String sessionID, java.lang.String subscriptionXML)
      void SaveSubscription​(java.lang.String sessionID, java.lang.String subscriptionXML, StringWrapper response)
      Saves a subscription to the content server repository.
      void TriggerEvent​(java.lang.String sessionID, java.lang.String eventID)
      Triggers an 'Event', specified by the eventID.
    • Method Detail

      • GetAllContacts

        java.lang.String GetAllContacts​(java.lang.String sessionID,
                                        int deliveryType,
                                        int flags,
                                        int blockBegin,
                                        int blockCount,
                                        int orderBy,
                                        java.lang.String namePattern,
                                        java.lang.String userID,
                                        int contactType,
                                        int enableFlag,
                                        boolean securityEnabled)
                                 throws MSTRWebAPIException
        Throws:
        MSTRWebAPIException
      • GetAllContacts

        java.lang.String GetAllContacts​(java.lang.String sessionID,
                                        int deliveryType,
                                        int flags,
                                        int blockBegin,
                                        int blockCount,
                                        int orderBy,
                                        java.lang.String namePattern,
                                        java.lang.String userID,
                                        int contactType,
                                        int enableFlag,
                                        boolean securityEnabled,
                                        java.lang.String dssID,
                                        int dssType)
                                 throws MSTRWebAPIException
        Returns XML String containing contacts based on a report or document
        Parameters:
        sessionID - String containing sessionID
        Returns:
        String containing contacts XML
        Throws:
        MSTRWebAPIException
      • GetAllContacts

        java.lang.String GetAllContacts​(java.lang.String sessionID,
                                        int deliveryType,
                                        int flags,
                                        int blockBegin,
                                        int blockCount,
                                        int orderBy,
                                        java.lang.String namePattern,
                                        java.lang.String userID,
                                        int contactType,
                                        int enableFlag,
                                        boolean securityEnabled,
                                        java.util.List<ObjectIdTypeAndProjectId> dssIDsAndTypes)
                                 throws MSTRWebAPIException
        Returns XML String containing contacts based on a list of report or document, its type, and the project it belongs to
        Parameters:
        sessionID - String containing sessionID
        deliveryType - int from EnumDSSXMLSubscriptionDeliveryType
        Returns:
        String containing contacts XML
        Throws:
        MSTRWebAPIException
      • GetContact

        java.lang.String GetContact​(java.lang.String sessionID,
                                    java.lang.String contactID,
                                    int deliveryType,
                                    boolean createDefaultContact)
                             throws MSTRWebAPIException
        Returns XML String containing contact definition for contact with specified contactID and deliveryType
        Parameters:
        sessionID - String containing sessionID
        contactID - String containing the contact ID (NOT DSSID) for contact
        deliveryType - int from EnumDSSXMLSubscriptionDeliveryType
        createDefaultContact - boolean to determine whether IServer should create a default contact if one does not exist
        Returns:
        String containing contact XML
        Throws:
        MSTRWebAPIException
      • RemoveContact

        void RemoveContact​(java.lang.String sessionID,
                           java.lang.String contactID)
                    throws MSTRWebAPIException
        Removes/deletes a contact, given the ID of the contact. Currently, this is not used anywhere in the web application and is also not exposed in the web objects layer.
        Parameters:
        sessionID -
        contactID -
        Throws:
        MSTRWebAPIException
      • DisableContact

        void DisableContact​(java.lang.String sessionID,
                            java.lang.String contactID)
                     throws MSTRWebAPIException
        Disable a contact, given the ID of the contact. Currently, this is not used anywhere in the web application and is also not exposed in the web objects layer.
        Parameters:
        sessionID -
        contactID -
        Throws:
        MSTRWebAPIException
      • SaveContact

        void SaveContact​(java.lang.String sessionID,
                         java.lang.String userID,
                         java.lang.String contactXML)
                  throws MSTRWebAPIException
        Saves a contact in the MD. This method is currently used only to save existing addresses to default contacts of users. It is also used to delete existing addresses.
        Parameters:
        sessionID -
        userID - . If the userID is null, then the address is saved to the default contact of the user whose session is passed is.
        contactXML - . XML describing the contact definition. Currently this only contains the addresses that need to be saved as part of the contact definition
        Throws:
        MSTRWebAPIException
      • EnableContact

        void EnableContact​(java.lang.String sessionID,
                           java.lang.String contactID)
                    throws MSTRWebAPIException
        Enable a contact, given the ID of the contact.
        Parameters:
        sessionID -
        userID - . If the userID is null, then the address is saved to the default contact of the user whose session is passed is.
        Throws:
        MSTRWebAPIException
      • GetSubscriptions

        java.lang.String GetSubscriptions​(java.lang.String sessionID,
                                          java.lang.String filterXML,
                                          int blockBegin,
                                          int blockCount,
                                          int detailFlag)
                                   throws MSTRWebAPIException
        This call retrieves a list of subscriptions for a given criteria, specified in the filterXML. This call also supports incremental fetch in a limited manner, using the blockBegin and blockCount parameters
        Parameters:
        sessionID - String containing id of session to perform this action in
        filterXML - String containing XML used to filter the results of this call
        blockBegin - int specifying the start of the block. Starts with '0'
        blockCount - int specifying the length of the block. Specify '0' for unlimited list of subscriptions
        detailFlag - int specifying the type of data to return. Should come from EnumDSSXMLNCSInstanceSourceField.
        Throws:
        MSTRWebAPIException
      • GetSubscriptions

        java.lang.String GetSubscriptions​(java.lang.String sessionID,
                                          java.lang.String filterXML,
                                          int blockBegin,
                                          int blockCount,
                                          int detailFlag,
                                          boolean isForAllProjects)
                                   throws MSTRWebAPIException
        This call retrieves a list of subscriptions for a given criteria, specified in the filterXML. This call also supports incremental fetch in a limited manner, using the blockBegin and blockCount parameters
        Parameters:
        sessionID - String containing id of session to perform this action in
        filterXML - String containing XML used to filter the results of this call
        blockBegin - int specifying the start of the block. Starts with '0'
        blockCount - int specifying the length of the block. Specify '0' for unlimited list of subscriptions
        detailFlag - int specifying the type of data to return. Should come from EnumDSSXMLNCSInstanceSourceField.
        isForAllProjects - boolean specifying the call stack is from address deleting.
        Throws:
        MSTRWebAPIException
      • GetSubscriptions

        java.lang.String GetSubscriptions​(java.lang.String sessionID,
                                          java.lang.String contentID,
                                          java.lang.String userID,
                                          java.lang.String contactID,
                                          java.lang.String addressID,
                                          java.lang.String triggerID,
                                          java.lang.String projectID,
                                          int blockBegin,
                                          int blockCount)
                                   throws MSTRWebAPIException
        This call retrieves a list of subscriptions for a given criteria. It can be used to get a list of subscriptions created for a given project or for a given user ID or whose recipients include a given contactID or an addressID or which use a particular triggerID. This call also supports incremental fetch in a limited manner, using the blockBegin and blockCount parameters
        Parameters:
        sessionID -
        contentID - . Report or document ID. If specified, this call returns a list of subscriptions for the specified report/document
        userID - . Specifies a particular userID who is the owner/recipient for a list of subscriptions
        contactID - . Specifies a particular contactID as a filter for the list of subscriptions.
        addressID - . Specifies a particular addressID
        triggerID - . Specifies a particular trigger/schedule on which the subscriptions are run.
        projectID -
        blockBegin - . Used for supporting incremental fetch. Starts with '0'.
        blockCount - . Used for supporting incremental fetch. Specify '0' for unlimited list of subscriptions
        Throws:
        MSTRWebAPIException
      • GetSubscription

        java.lang.String GetSubscription​(java.lang.String sessionID,
                                         java.lang.String subscriptionID)
                                  throws MSTRWebAPIException
        Retrieves the definition of a specific subscription, given the subscritionID. This subscription ID can either be a parent of a multi-recipient subscription or one of its children
        Parameters:
        sessionID -
        subscriptionID -
        Throws:
        MSTRWebAPIException
      • RemoveSubscription

        void RemoveSubscription​(java.lang.String sessionID,
                                java.lang.String subscriptionID)
                         throws MSTRWebAPIException
        Deletes a subscription based on a specified subscriptionID. Right now, we can only delete one subscription at a time.
        Parameters:
        sessionID -
        subscriptionID -
        Throws:
        MSTRWebAPIException
      • SaveSubscription

        @Deprecated
        void SaveSubscription​(java.lang.String sessionID,
                              java.lang.String subscriptionXML)
                       throws MSTRWebAPIException
        Saves a subscription to the content server repository. The subscription is defined using a subscription XML, which defines the content, owner, address, trigger and other properties of the subscription.
        Parameters:
        sessionID -
        subscriptionXML -
        Throws:
        MSTRWebAPIException
      • SaveSubscription

        void SaveSubscription​(java.lang.String sessionID,
                              java.lang.String subscriptionXML,
                              StringWrapper response)
                       throws MSTRWebAPIException
        Saves a subscription to the content server repository. The subscription is defined using a subscription XML, which defines the content, owner, address, trigger and other properties of the subscription.
        Parameters:
        sessionID - String containing the id of the session to govern the creation of this subscription
        subscriptionXML - String containing the actual save XML
        response - StringWrapper to return
        Throws:
        MSTRWebAPIException
      • GetAllDevices

        java.lang.String GetAllDevices​(java.lang.String sessionID)
                                throws MSTRWebAPIException
        Returns a list of all devices that the current user has access to. This call returns all devices irrespective of delivery type.
        Parameters:
        sessionID -
        Throws:
        MSTRWebAPIException
      • SaveAddress

        java.lang.String SaveAddress​(java.lang.String sessionID,
                                     java.lang.String userID,
                                     java.lang.String addressXML)
                              throws MSTRWebAPIException
        Saves a new address to the MD. This method can be used to save an address to the default contact of the user whose session is provided (by passing in null for userID) or it can used to add a new address to the default contact of a specific user, specified by the userID
        Parameters:
        sessionID -
        userID - , Specific user whose adddres is being saved. If null is passed in for this parameter, the address is added to the default contact of the user whose session is used.
        addressXML - , This XML describes the definition of the address
        Throws:
        MSTRWebAPIException
      • SaveAddress

        java.lang.String SaveAddress​(java.lang.String sessionID,
                                     java.lang.String userID,
                                     java.lang.String addressXML,
                                     java.lang.String appID)
                              throws MSTRWebAPIException
        Saves a new address to the MD. This method can be used to save an address to the default contact of the user whose session is provided (by passing in null for userID) or it can used to add a new address to the default contact of a specific user, specified by the userID
        Parameters:
        sessionID -
        userID - , Specific user whose adddres is being saved. If null is passed in for this parameter, the address is added to the default contact of the user whose session is used.
        addressXML - , This XML describes the definition of the address
        appID - , mobile app id
        Throws:
        MSTRWebAPIException
      • GetAddress

        java.lang.String GetAddress​(java.lang.String sessionID,
                                    java.lang.String addressID)
                             throws MSTRWebAPIException
        Retrieves the definition of an address that exists in the MD. The address is specified by the address ID
        Parameters:
        sessionID -
        addressID -
        Throws:
        MSTRWebAPIException
      • LinkContactsWithUser

        void LinkContactsWithUser​(java.lang.String sessionID,
                                  java.lang.String userID,
                                  java.lang.String contactsXML)
                           throws MSTRWebAPIException
        Links a list of contacts with a user. A contact needs to be linked to a user so that when a subscription to the contact is executed/run, the security credentials of the user can be used to execute the report/document. A contact which is not linked to a user is useless for the purpose of subscription execution and delivery.
        Parameters:
        sessionID -
        userID -
        contactsXML -
        Throws:
        MSTRWebAPIException
      • TriggerEvent

        void TriggerEvent​(java.lang.String sessionID,
                          java.lang.String eventID)
                   throws MSTRWebAPIException
        Triggers an 'Event', specified by the eventID. This is useful when an event needs to be triggered programatically.
        Parameters:
        sessionID -
        eventID -
        Throws:
        MSTRWebAPIException
      • CheckNCSCS

        boolean CheckNCSCS​(java.lang.String sessionID)
                    throws MSTRWebAPIException
        This calls checks if the content services repository is created and configured for use with Distribution Services. For pre-9.x MD, that has not been upgraded, this method will return false.
        Parameters:
        sessionID -
        Throws:
        MSTRWebAPIException
      • GetProjectDSSettings

        java.lang.String GetProjectDSSettings​(java.lang.String sessionID,
                                              java.lang.String projectID)
                                       throws MSTRWebAPIException
        Returns XML String containing Distribution Services (DS) settings for users unable to access the server definition
        Parameters:
        sessionID - String containing the sessionID
        projectID - String containing project GUID
        Throws:
        MSTRWebAPIException
      • GetSubscriptionCount

        java.lang.String GetSubscriptionCount​(java.lang.String sessionID,
                                              java.lang.String contentID,
                                              java.lang.String userID,
                                              java.lang.String contactID,
                                              java.lang.String addressID,
                                              java.lang.String triggerID,
                                              java.lang.String projectID,
                                              int deliveryType)
                                       throws MSTRWebAPIException
        This call retrieves a count of subscriptions for a given criteria. It can be used to get a count of subscriptions created for a given project or for a given user ID or whose recipients include a given contactID or an addressID or which use a particular triggerID.
        Parameters:
        sessionID -
        contentID - . Report or document ID. If specified, this call returns a list of subscriptions for the specified report/document
        userID - . Specifies a particular userID who is the owner/recipient for a list of subscriptions
        contactID - . Specifies a particular contactID as a filter for the list of subscriptions.
        addressID - . Specifies a particular addressID
        triggerID - . Specifies a particular trigger/schedule on which the subscriptions are run.
        projectID -
        deliveryType - . From EnumDSSXMLSubscriptionDeliveryType
        Throws:
        MSTRWebAPIException
      • AddRecipients

        java.lang.String AddRecipients​(java.lang.String sessionID,
                                       java.lang.String subscriptionXML)
                                throws MSTRWebAPIException
        This will add recipients to a subscription without requiring the user to have the entire subscription XML
        Parameters:
        sessionID - String containing the id of the session to be used for this transaction
        subscriptionXML - String containing the add recipient XML
        Returns:
        String containing nothing. For future use
        Throws:
        MSTRWebAPIException
      • SaveProjectsAssociatedSchedules

        void SaveProjectsAssociatedSchedules​(java.lang.String sessionID,
                                             java.lang.String associatedScheduleXML)
                                      throws MSTRWebAPIException
        This will save the schedules to a subscription
        Parameters:
        sessionID - String containing the id of the session to be used for this transaction
        associatedScheduleXML - String containing the associating schedule XML
        Throws:
        MSTRWebAPIException
      • SaveObjectAssociatedSchedules

        void SaveObjectAssociatedSchedules​(java.lang.String sessionID,
                                           java.lang.String requestXML,
                                           java.lang.String did,
                                           int type,
                                           java.lang.String messageId,
                                           java.lang.String flag)
                                    throws MSTRWebAPIException
        This will save the schedules to a subscription in Object level
        Parameters:
        sessionID - String containing the id of the session to be used for this transaction
        associatedScheduleXML - String containing the associating schedule XML
        Throws:
        MSTRWebAPIException
      • GetProjectsAssociatedSchedules

        java.lang.String GetProjectsAssociatedSchedules​(java.lang.String sessionID)
                                                 throws MSTRWebAPIException
        This call retrieves the schedules to a subscription
        Parameters:
        sessionID - String containing the id of the session to be used for this transaction
        Throws:
        MSTRWebAPIException
      • GetObjectAssociatedSchedules

        java.lang.String GetObjectAssociatedSchedules​(java.lang.String sessionID,
                                                      java.lang.String did,
                                                      int type,
                                                      java.lang.String messageId)
                                               throws MSTRWebAPIException
        This call retrieves the object level schedules to a subscription
        Parameters:
        sessionID - String containing the id of the session to be used for this transaction
        Throws:
        MSTRWebAPIException
      • GetContactsBySearch

        java.lang.String GetContactsBySearch​(java.lang.String sessionID,
                                             int flags,
                                             int blockBegin,
                                             int blockCount,
                                             java.lang.String searchXML,
                                             java.lang.String orderByXML)
                                      throws MSTRWebAPIException
        Throws:
        MSTRWebAPIException
      • SaveObjectAssociatedUsers

        void SaveObjectAssociatedUsers​(java.lang.String sessionID,
                                       java.lang.String requestXML,
                                       java.lang.String did,
                                       int type,
                                       java.lang.String messageId,
                                       java.lang.String flag)
                                throws MSTRWebAPIException
        This call save the associated users of a report or document subscription
        Parameters:
        sessionID - String containing the id of the session to be used for this transaction
        requestXML - containing the associated users XML
        did - the report or document id
        type - the report or document type
        messageId - Message ID corresponding to the report or document
        flag - Option for allow or deny users to subscribe
        Throws:
        MSTRWebAPIException
      • getObjectAssociatedUsers

        java.lang.String getObjectAssociatedUsers​(java.lang.String sessionID,
                                                  java.lang.String did,
                                                  int type,
                                                  java.lang.String messageId)
                                           throws MSTRWebAPIException
        This call retrieves the associated users of a report or document subscription
        Parameters:
        sessionID - String containing the id of the session to be used for this transaction
        did - the report or document id
        type - the report or document type
        messageId - Message ID corresponding to the report or document
        Throws:
        MSTRWebAPIException
      • checkSubscriptionACL

        java.lang.String checkSubscriptionACL​(java.lang.String sessionID,
                                              java.lang.String did,
                                              int type,
                                              java.lang.String userID,
                                              java.lang.String projID)
                                       throws MSTRWebAPIException
        This call retrieves whether allow user to subscribe this report/document
        Parameters:
        sessionID - String containing the id of the session to be used for this transaction
        did - the report or document id
        type - the report or document type
        userID - the user ID
        projID - the project ID
        Throws:
        MSTRWebAPIException