public class PolicySaveToIntegrationRegistry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
copyright |
static java.lang.String |
URL_DATA_KEY_HOSTNAME |
static java.lang.String |
URL_DATA_KEY_POLICY_NAME |
static java.lang.String |
URL_DATA_KEY_POLICY_TYPE |
static java.lang.String |
URL_DATA_KEY_PORT |
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.
|
public static final java.lang.String copyright
public static final java.lang.String URL_DATA_KEY_HOSTNAME
public static final java.lang.String URL_DATA_KEY_PORT
public static final java.lang.String URL_DATA_KEY_POLICY_TYPE
public static final java.lang.String URL_DATA_KEY_POLICY_NAME
public static PolicySaveToIntegrationRegistry getInstance()
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
hostname
- port
- qmgr
- policyName
- policyType
- policyContent
- ConfigManagerProxyException
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 does not exist in the Integration Registry, a new policy will be created in the Integration Registry.
hostname
- port
- policyName
- policyType
- policyContent
- ConfigManagerProxyException
- When a connection to Integration Node with the specified hostname and port cannot be made, or policy cannot be created or updated.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 does not exist in the Integration Registry, a new policy will be created in the Integration Registry.
integrationNodeName
- hostname
- port
- policyName
- policyType
- policyContent
- ConfigManagerProxyException
- When a connection to the Integration Node cannot be made, or policy cannot be created or updated.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 does not exist in the Integration Registry, a new policy will be created in the Integration Registry.
brokerProxy
- policyName
- policyType
- policyContent
- ConfigManagerProxyException
- When a policy cannot be created or updated.public PolicyProxy getPolicy(java.lang.String policyUrl) throws PolicyUrlInvalidException, ConfigManagerProxyException
policyUrl
- PolicyUrlInvalidException
- If the policyUrl is not in "http://hostname:port/apiv1/policy/<policy Type>/<policyName>" formatConfigManagerProxyException
- When a connection to Integration Node with the specified hostname and port cannot be made, or policy can not be retrieved.public boolean isPolicyExists(java.lang.String policyUrl) throws PolicyUrlInvalidException, ConfigManagerProxyException
policyUrl
- PolicyUrlInvalidException
- If the policyUrl is not in "http://hostname:port/apiv1/policy/<policy Type>/<policyName>" formatConfigManagerProxyException
- When a connection to Integration Node with the specified hostname and port cannot be madepublic PolicyProxy updatePolicy(java.lang.String policyUrl, java.lang.String policyContent) throws PolicyUrlInvalidException, PolicyNotFoundException, ConfigManagerProxyException
policyUrl
- policyContent
- PolicyUrlInvalidException
- If the policyUrl is not in "http://hostname:port/apiv1/policy/<policy Type>/<policyName>" formatPolicyNotFoundException
- If policy can not be found for the specified policyUrlConfigManagerProxyException
- When a connection to Integration Node with the specified hostname and port cannot be made, or policy can not be updated.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 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.
policyUrl
- policyContent
- overrideContentIfExists
- PolicyUrlInvalidException
- If the policyUrl is not in "http://hostname:port/apiv1/policy/<policy Type>/<policyName>" formatConfigManagerProxyException
- When a connection to Integration Node with the specified hostname and port cannot be made, or policy can not be created or updated.public PolicyProxy createPolicy(java.lang.String policyUrl, java.lang.String policyContent) throws PolicyUrlInvalidException, ConfigManagerProxyException
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.
policyUrl
- policyContent
- PolicyUrlInvalidException
- If the policyUrl is not in "http://hostname:port/apiv1/policy/<policy Type>/<policyName>" formatConfigManagerProxyException
- When a connection to Integration Node with the specified hostname and port cannot be made, or policy can not be createdpublic void deletePolicy(java.lang.String policyUrl) throws PolicyUrlInvalidException, PolicyNotFoundException, ConfigManagerProxyException
policyUrl
- PolicyUrlInvalidException
- If the policyUrl is not in "http://hostname:port/apiv1/policy/<policy Type>/<policyName>" formatPolicyNotFoundException
- If policy can not be found for the specified policyUrlConfigManagerProxyException
- When a connection to Integration Node with the specified hostname and port cannot be made, or policy can not be deletedpublic java.util.Hashtable<java.lang.String,java.lang.String> parsePolicyUrl(java.lang.String policyUrl) throws PolicyUrlInvalidException
policyUrl
- PolicyUrlInvalidException
- If policyUrl is not in the correct format.