com.ibm.ecm.sample.webhook.util

Class CSServerInfo

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


  • public class CSServerInfo
    extends java.lang.Object
    This class is used for handling the Content Services server information, including the GraphQL server URL and login credentials for the user that will be used to configure the Content Event Webhook and handle callback requests to process the document that triggered the Webhook's subscription. Make sure to change the information set in CSServerInfo.properties to have the appropriate Content Services GraphQL server URL and Content Platform Engine admin user to use for setting up the Content Event Webhook event action and subscription and callback logic. Note that user credentials are stored in clear text in CSServerInfo.properties for simplicity of setup of this sample Content Event Webhook Receiver application. In a production environment, a different approach should be used to store, encrypt, and retrieve the user credentials.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CS_SERVER_GRAPHQL_URL
      Content Services GraphQL API URL
      static java.lang.String CS_SERVER_OBJECTSTORE
      Object Store for Content Event Webhook Receiver sample
      static java.lang.String CS_SERVER_PASSWORD
      Content Platform Engine/Content Services password.
      static java.lang.String CS_SERVER_USERNAME
      Content Platform Engine/Content Services user.
      static java.lang.String WEBHOOK_RECEIVER_URL
      Content Event Webhook Receiver URL.
    • Constructor Summary

      Constructors 
      Constructor and Description
      CSServerInfo() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String getString(java.lang.String key)
      Get a property with the given key from CSServerInfo.properties.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CS_SERVER_GRAPHQL_URL

        public static final java.lang.String CS_SERVER_GRAPHQL_URL
        Content Services GraphQL API URL
      • CS_SERVER_OBJECTSTORE

        public static final java.lang.String CS_SERVER_OBJECTSTORE
        Object Store for Content Event Webhook Receiver sample
      • WEBHOOK_RECEIVER_URL

        public static final java.lang.String WEBHOOK_RECEIVER_URL
        Content Event Webhook Receiver URL.
      • CS_SERVER_USERNAME

        public static final java.lang.String CS_SERVER_USERNAME
        Content Platform Engine/Content Services user. User must have full control on the Object Store configured for the Content Event Webhook
      • CS_SERVER_PASSWORD

        public static final java.lang.String CS_SERVER_PASSWORD
        Content Platform Engine/Content Services password.
    • Constructor Detail

      • CSServerInfo

        public CSServerInfo()
    • Method Detail

      • getString

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