Pattern.Manager

Description

Pattern management functions

Categories

NameDescription
AdvancedAdvanced pattern management functions

Functions

NameSignature and Synopsis
deployvoid deploy(Object patternInstance, String patternInstanceName)
Deploys the pattern instance that has all the necessary parameters set. The instance will be deployed under the name provided. This name has to be unique.
getDeployedString[] getDeployed(String patternDefURI)
Returns the pattern instance names that are deployed under the given URI.
getRegisteredString[] getRegistered()
Returns the URIs of all the registered patterns.
instantiateObject instantiate(String patternDefURI)
Creates an instance of the pattern registered under the given URI for deployment. This instance should be configured before deployment.
registerString register(String patternLangString)
Registers the pattern definition text under the URI (define pattern XYZ ...) provided in the text. The URI (XYZ) that was extracted is also returned by the method for reference. The URI has to be unique for the registration to succeed.
setClosurevoid setClosure(Object patternInstance, Object closure)
Sets a $1closure$1 object that will be delivered in the listener function call to help identify this pattern instance. The value is set only for the given pattern instance.
setCompletionListenervoid setCompletionListener(Object patternInstance, String ruleFunctionURI)
Sets the given rule function URI as the listener that will be invoked by the Pattern Service when/if this pattern instance observes the specified event sequence. The value is set only for the given pattern instance.
setFailureListenervoid setFailureListener(Object patternInstance, String ruleFunctionURI)
Sets the given rule function URI as the listener that will be invoked by the Pattern Service when/if this pattern instance fails due to a wrong event sequence. The value is set only for the given pattern instance.
setParameterDateTimevoid setParameterDateTime(Object patternInstance, String parameterName, DateTime value)
If the pattern string has a bind parameter that expects a DateTime object (java.util.Calendar), then its value has to be set using this method. The value is set only for the given pattern instance.
setParameterDoublevoid setParameterDouble(Object patternInstance, String parameterName, double value)
If the pattern string has a bind parameter that expects a double, then its value has to be set using this method. The value is set only for the given pattern instance.
setParameterIntvoid setParameterInt(Object patternInstance, String parameterName, int value)
If the pattern string has a bind parameter that expects an integer, then its value has to be set using this method. The value is set only for the given pattern instance.
setParameterLongvoid setParameterLong(Object patternInstance, String parameterName, long value)
If the pattern string has a bind parameter that expects a long, then its value has to be set using this method. The value is set only for the given pattern instance.
setParameterStringvoid setParameterString(Object patternInstance, String parameterName, String value)
If the pattern string has a bind parameter that expects a String, then its value has to be set using this method. The value is set only for the given pattern instance.
undeployvoid undeploy(String patternInstanceName)
Undeploys the pattern instance that was deployed under the name provided.
unregistervoid unregister(String patternDefURI)
Unregisters the Pattern that was previously registered under the given URI.