com.ibm.broker.config.appdev

Class PolicySaveToIntegrationRegistry

  • java.lang.Object
    • com.ibm.broker.config.appdev.PolicySaveToIntegrationRegistry


  • public class PolicySaveToIntegrationRegistry
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      PolicyProxy createPolicy(java.lang.String policyUrl, java.lang.String policyContent)
      If a policy with the specified policyUrl already exists, no action will be taken, null is returned.
      PolicyProxy createPolicy(java.lang.String policyUrl, java.lang.String policyContent, boolean overrideContentIfExists)
      If a policy with the specified policyUrl already exists, and overrideContentIfExists is true, policyContent will override the existing content of the policy, and the PolicyProxy of the existing policy will be returned.
      void deletePolicy(java.lang.String policyUrl)
      Delete the policy for the specified policyUrl.
      static PolicySaveToIntegrationRegistry getInstance() 
      PolicyProxy getPolicy(java.lang.String policyUrl)
      Get the policy from the Integration Registry for the specified policyUrl.
      boolean isPolicyExists(java.lang.String policyUrl) 
      java.util.Hashtable<java.lang.String,java.lang.String> parsePolicyUrl(java.lang.String policyUrl)
      Parse the policyUrl string in "http://hostname:port/apiv1/policy/<policy Type>/<policyName>" format
      PolicyProxy policySave(BrokerProxy brokerProxy, java.lang.String policyName, java.lang.String policyType, java.lang.String policyContent)
      If the specified policyName for policyType in the specified brokerProxy already exists in the Integration Registry, the existing policy will be overridden by the new policyContent.
      PolicyProxy policySave(java.lang.String hostname, int port, java.lang.String policyName, java.lang.String policyType, java.lang.String policyContent)
      If the specified policyName for policyType in hostname:port already exists in the Integration Registry, the existing policy will be overridden by the new policyContent.
      void policySave(java.lang.String hostname, int port, java.lang.String qmgr, java.lang.String policyName, java.lang.String policyType, java.lang.String policyContent)
      Deprecated. 
      This method saves a policy to Integration Registry using MQBrokerConnection instead of IntegrationNodeConnection. It is not recommended to use this method; it will be removed soon.
      PolicyProxy policySave(java.lang.String integrationNodeName, java.lang.String hostname, int port, java.lang.String policyName, java.lang.String policyType, java.lang.String policyContent)
      If the specified policyName for policyType in the specified integration node or the specified hostname:port already exists in the Integration Registry, the existing policy will be overridden by the new policyContent.
      PolicyProxy updatePolicy(java.lang.String policyUrl, java.lang.String policyContent)
      Updates the content of a policy and returns the PolicyProxy.
      • Methods inherited from class java.lang.Object

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

      • URL_DATA_KEY_HOSTNAME

        public static final java.lang.String URL_DATA_KEY_HOSTNAME
        See Also:
        Constant Field Values
      • URL_DATA_KEY_PORT

        public static final java.lang.String URL_DATA_KEY_PORT
        See Also:
        Constant Field Values
      • URL_DATA_KEY_POLICY_TYPE

        public static final java.lang.String URL_DATA_KEY_POLICY_TYPE
        See Also:
        Constant Field Values
      • URL_DATA_KEY_POLICY_NAME

        public static final java.lang.String URL_DATA_KEY_POLICY_NAME
        See Also:
        Constant Field Values
    • Method Detail

      • policySave

        public void policySave(java.lang.String hostname,
                               int port,
                               java.lang.String qmgr,
                               java.lang.String policyName,
                               java.lang.String policyType,
                               java.lang.String policyContent)
                        throws ConfigManagerProxyException
        Deprecated. This method saves a policy to Integration Registry using MQBrokerConnection instead of IntegrationNodeConnection. It is not recommended to use this method; it will be removed soon.
        Parameters:
        hostname -
        port -
        qmgr -
        policyName -
        policyType -
        policyContent -
        Throws:
        ConfigManagerProxyException
      • policySave

        public PolicyProxy policySave(java.lang.String hostname,
                                      int port,
                                      java.lang.String policyName,
                                      java.lang.String policyType,
                                      java.lang.String policyContent)
                               throws ConfigManagerProxyException
        If the specified policyName for policyType in hostname:port already exists in the Integration Registry, the existing policy will be overridden by the new policyContent.

        If the specified policyName for policyType in hostname:port does not exist in the Integration Registry, a new policy will be created in the Integration Registry.

        Parameters:
        hostname -
        port -
        policyName -
        policyType -
        policyContent -
        Returns:
        PolicyProxy
        Throws:
        ConfigManagerProxyException - When a connection to Integration Node with the specified hostname and port cannot be made, or policy cannot be created or updated.
      • policySave

        public PolicyProxy policySave(java.lang.String integrationNodeName,
                                      java.lang.String hostname,
                                      int port,
                                      java.lang.String policyName,
                                      java.lang.String policyType,
                                      java.lang.String policyContent)
                               throws ConfigManagerProxyException
        If the specified policyName for policyType in the specified integration node or the specified hostname:port already exists in the Integration Registry, the existing policy will be overridden by the new policyContent.

        If the specified policyName for policyType in the specified integration node or the specified hostname:port does not exist in the Integration Registry, a new policy will be created in the Integration Registry.

        Parameters:
        integrationNodeName -
        hostname -
        port -
        policyName -
        policyType -
        policyContent -
        Returns:
        PolicyProxy
        Throws:
        ConfigManagerProxyException - When a connection to the Integration Node cannot be made, or policy cannot be created or updated.
      • policySave

        public PolicyProxy policySave(BrokerProxy brokerProxy,
                                      java.lang.String policyName,
                                      java.lang.String policyType,
                                      java.lang.String policyContent)
                               throws ConfigManagerProxyException
        If the specified policyName for policyType in the specified brokerProxy already exists in the Integration Registry, the existing policy will be overridden by the new policyContent.

        If the specified policyName for policyType in the specified brokerProxy does not exist in the Integration Registry, a new policy will be created in the Integration Registry.

        Parameters:
        brokerProxy -
        policyName -
        policyType -
        policyContent -
        Returns:
        PolicyProxy
        Throws:
        ConfigManagerProxyException - When a policy cannot be created or updated.
      • createPolicy

        public PolicyProxy createPolicy(java.lang.String policyUrl,
                                        java.lang.String policyContent,
                                        boolean overrideContentIfExists)
                                 throws PolicyUrlInvalidException,
                                        ConfigManagerProxyException
        If a policy with the specified policyUrl already exists, and overrideContentIfExists is true, policyContent will override the existing content of the policy, and the PolicyProxy of the existing policy will be returned.

        If a policy with the specified policyUrl already exists, and overrideContentIfExists is false, no action will be taken, null is returned.

        If a policy with the specified policyUrl does not exists, then a new policy will be created in the Integration Registry, and the PolicyProxy of the created policy will be returned.

        Parameters:
        policyUrl -
        policyContent -
        overrideContentIfExists -
        Returns:
        PolicyProxy
        Throws:
        PolicyUrlInvalidException - If the policyUrl is not in "http://hostname:port/apiv1/policy/<policy Type>/<policyName>" format
        ConfigManagerProxyException - When a connection to Integration Node with the specified hostname and port cannot be made, or policy can not be created or updated.
      • createPolicy

        public PolicyProxy createPolicy(java.lang.String policyUrl,
                                        java.lang.String policyContent)
                                 throws PolicyUrlInvalidException,
                                        ConfigManagerProxyException
        If a policy with the specified policyUrl already exists, no action will be taken, null is returned.

        If a policy with the specified policyUrl does not exists, then a new policy will be created in the Integration Registry, and the PolicyProxy of the created policy will be returned.

        Parameters:
        policyUrl -
        policyContent -
        Returns:
        PolicyProxy
        Throws:
        PolicyUrlInvalidException - If the policyUrl is not in "http://hostname:port/apiv1/policy/<policy Type>/<policyName>" format
        ConfigManagerProxyException - When a connection to Integration Node with the specified hostname and port cannot be made, or policy can not be created
      • parsePolicyUrl

        public java.util.Hashtable<java.lang.String,java.lang.String> parsePolicyUrl(java.lang.String policyUrl)
                                                                              throws PolicyUrlInvalidException
        Parse the policyUrl string in "http://hostname:port/apiv1/policy/<policy Type>/<policyName>" format
        Parameters:
        policyUrl -
        Returns:
        HashTable with four key/value pairs, where keys are "hostname", "port", "policytype", "policyname"
        Throws:
        PolicyUrlInvalidException - If policyUrl is not in the correct format.