com.ibm.ecm.sample.webhook.util

Class GraphQLCallTemplate

  • java.lang.Object
    • com.ibm.ecm.sample.webhook.util.GraphQLCallTemplate


  • public class GraphQLCallTemplate
    extends java.lang.Object
    This class is used for keeping track of templates for various GraphQL calls. See GraphQLCallTemplate.properties for the GraphQL call templates. Modify the templates in the GraphQLCallTemplate.properties file to change the calls used by the Content Event Webhook Receiver sample application. Variables in the template are replaced with actual variables at runtime to create the actual calls to the Content Services GraphQL API. The GraphQL call templates can be freely modified, as long as the code that uses the templates is also modified as necessary. In particular, the Event action and subscription GUIDs could be changed to be hard-coded, which might be preferable in a real-life scenario.
    • Field Detail

      • PING_CONTENTSERVICE_SERVER

        public static final java.lang.String PING_CONTENTSERVICE_SERVER
        Query for pinging the Content Services server. Parameters are bound to this string in the following order:

        • Name or GUID of the object store

      • CREATE_EVENTACTION_WITH_CLASSSUBSCRIPTION

        public static final java.lang.String CREATE_EVENTACTION_WITH_CLASSSUBSCRIPTION
        Mutation for creating Webhook external event action and subscription. Parameters are bound to this string in the following order:

        • Name or GUID of the object store
        • Webhook external event action name
        • Webhook external event action description
        • Webhook secret
        • Webhook Receiver URL
        • Webhook Receiver registration identifier
        • Webhook external event subscription name
        • Webhook external event subscription description

      • FETCH_EVENTACTION_WITH_CLASSSUBSCRIPTION

        public static final java.lang.String FETCH_EVENTACTION_WITH_CLASSSUBSCRIPTION
        Query for retreiving the Webhook external event action and associated subscriptions. Parameters are bound to this string in the following order:

        • Name or GUID of the object store
        • GUID of the external event action

      • UPDATE_EVENTACTION_WITH_CLASSSUBSCRIPTION

        public static final java.lang.String UPDATE_EVENTACTION_WITH_CLASSSUBSCRIPTION
        Mutation for updating an existing Webhook external event action and subscription. Parameters are bound to this string in the following order:

        • Name or GUID of the object store
        • GUID of the external event action
        • New Webhook external event action name
        • New Webhook external event subscription name
        • New Webhook external event subscription description
        • GUID of the Webhook external event subscription

      • GET_DOCUMENT

        public static final java.lang.String GET_DOCUMENT
        Query for retrieving a document. Parameters are bound to this string in the following order:

        • Name or GUID of the object store
        • GUID of the document to fetch

      • UPDATE_DOCUMENT

        public static final java.lang.String UPDATE_DOCUMENT
        Mutation for updating a document. Parameters are bound to this string in the following order:

        • Name or GUID of the object store
        • GUID of the document to modify
        • Array of properties to modify

      • DELETE_DOCUMENT

        public static final java.lang.String DELETE_DOCUMENT
        Mutation for deleting a document. Parameters are bound to this string in the following order:

        • Name or GUID of the object store
        • GUID of the document to delete

      • DELETE_EVENTACTION_SUBSCRIPTIONS

        public static final java.lang.String DELETE_EVENTACTION_SUBSCRIPTIONS
        Mutation for deleting existing Webhook external event action and associated subscriptions. This mutation is a batch of two different mutations. Parameters are bound to this string in the following order:

        • Name or GUID of the object store
        • GUID of the external event action to delete
        • List of subscription GUIDs to delete, each wrapped in double quotes
        • GUID of the external event action to delete (second mutation)
        • List of subscription GUIDs to delete, each wrapped in double quotes (second mutation)

    • Constructor Detail

      • GraphQLCallTemplate

        public GraphQLCallTemplate()
    • Method Detail

      • getString

        public static java.lang.String getString(java.lang.String key)
        Get a property with the given key from GraphQLCallTemplate.properties. The method returns null if the property is not found.
        Parameters:
        key - the key of the property to get from GraphQLCallTemplate.properties
        Returns:
        the value of the the property with the specified key, or null if there is no such property.