com.ibm.broker.rest

Class DynamicContent

  • java.lang.Object
    • com.ibm.broker.rest.DynamicContent


  • public final class DynamicContent
    extends java.lang.Object
    A class that defines dynamic content that can be served as supporting documentation for an API. Dynamic content differs to static content as it can specify replacement strings in the content, which will be replaced by the hosting integration server at runtime. For example, the host header can be replaced in the content.
    Since:
    IBM Integration Bus v10
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String HOST_REPLACEMENT
      A replacement string that can be inserted into the content.
      static java.lang.String PROTOCOL_REPLACEMENT
      A replacement string that can be inserted into the content.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DynamicContent(java.lang.String path, java.lang.String contentType, java.lang.String content)
      Create a new dynamic content object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getContent()
      Get the content.
      java.lang.String getContentType()
      Get the content type of the content, for example application/json.
      java.lang.String getPath()
      Get the path that the content should be served under, for example /document.json.
      • Methods inherited from class java.lang.Object

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

      • PROTOCOL_REPLACEMENT

        public static final java.lang.String PROTOCOL_REPLACEMENT
        A replacement string that can be inserted into the content. It will be replaced with the protocol being used to access the content, for example "http" or "https".
        See Also:
        Constant Field Values
      • HOST_REPLACEMENT

        public static final java.lang.String HOST_REPLACEMENT
        A replacement string that can be inserted into the content. It will be replaced with the host being used to access the content, for example "myserver.ibm.com:3313".
        See Also:
        Constant Field Values
    • Constructor Detail

      • DynamicContent

        public DynamicContent(java.lang.String path,
                              java.lang.String contentType,
                              java.lang.String content)
        Create a new dynamic content object.
        Parameters:
        path - the path that the content should be served under, for example /document.json.
        contentType - the content type of the content, for example application/json.
        content - the content.
    • Method Detail

      • getPath

        public java.lang.String getPath()
        Get the path that the content should be served under, for example /document.json.
        Returns:
        the path that the content should be served under, for example /document.json.
      • getContentType

        public java.lang.String getContentType()
        Get the content type of the content, for example application/json.
        Returns:
        the content type of the content, for example application/json.
      • getContent

        public java.lang.String getContent()
        Get the content.
        Returns:
        the content.