com.ibm.broker.config.appdev.patterns

Interface PatternInstanceManager



  • public interface PatternInstanceManager
    Provides access to the current pattern instance being generated. This interface is not intended to be implemented by clients.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String copyright 
    • Method Detail

      • getPluginClass

        java.lang.Class<?> getPluginClass(java.lang.String pluginId,
                                          java.lang.String className)
                                   throws java.lang.ClassNotFoundException
        Looks up the class that matches this plug-in and class name.
        Parameters:
        pluginId - The plug-in symbolic name.
        className - The Java class name to find.
        Returns:
        Class instance.
        Throws:
        java.lang.ClassNotFoundException - ClassNotFoundException.
      • getParameterValue

        java.lang.String getParameterValue(java.lang.String parameterId)
        Gets the string value of a parameter in this pattern instance.
        Parameters:
        parameterId - The unique identifier of a parameter.
        Returns:
        The string value for the given parameter or null.
      • getParameterList

        java.lang.String[] getParameterList()
        Returns:
        List of parameter identifiers in this pattern instance.
      • setParameterValue

        boolean setParameterValue(java.lang.String parameterId,
                                  java.lang.String parameterValue)
        Sets the string value of a parameter in this pattern instance.
        Parameters:
        parameterId - The unique identifier of a parameter.
        parameterValue - The value for the parameter.
        Returns:
        true if the parameter was successfully set.
      • runScript

        void runScript(java.lang.String pluginId,
                       java.lang.String relativePath)
        Runs the PHP script associated with this relative path. The pluginId identifies the plug-in containing the PHP script. The relativePath is the path to the PHP script in the plug-in - it should not have any leading directory separator character. The output from the PHP script is ignored. You can write the output from PHP templates to files in pattern instance projects by calling mb_pattern_run_template from within the PHP script.
        Parameters:
        pluginId - The plug-in that contains the script.
        relativePath - The relative path to the script.
      • getPatternInstanceName

        java.lang.String getPatternInstanceName()
        Returns:
        The name of this pattern instance.
      • getWorkspaceLocation

        java.lang.String getWorkspaceLocation()
        Returns:
        The workspace location for pattern instance projects.
      • getMessageFlow

        MessageFlow getMessageFlow(java.lang.String projectName,
                                   java.lang.String relativePath)
        Gets a message flow after any target properties have been changed.
        Parameters:
        projectName - The project name excluding pattern instance prefix.
        relativePath - The relative path to the message flow in the project.
        Returns:
        The MessageFlow or null.
      • removeMessageFlow

        void removeMessageFlow(MessageFlow messageFlow)
        Removes a message flow from the PatternInstanceManager The message flow will not be saved to any pattern instance project.
        Parameters:
        messageFlow - The message flow to remove from the pattern instance.
      • getParameterTable

        PatternParameterTable getParameterTable(java.lang.String parameterId)
        Returns:
        PatternParameterTable containing the table for a parameter.
      • isParameterTable

        boolean isParameterTable(java.lang.String parameterId)
        Returns:
        true if this is parameter is a table of values.
      • setUserDefinedValue

        void setUserDefinedValue(java.lang.String name,
                                 java.lang.Object value)
        Stores a user-defined value in the pattern instance.
        Parameters:
        name - The unique key for the value.
        value - The actual value to be stored.
      • getUserDefinedValue

        java.lang.Object getUserDefinedValue(java.lang.String name)
        Returns:
        Gets a user-defined value or null.
      • addProjectToPatternInstance

        void addProjectToPatternInstance(java.lang.String projectName)
                                  throws java.lang.IllegalArgumentException
        Adds the project to the working set for this pattern instance.
        Throws:
        java.lang.IllegalArgumentException - IllegalArgumentException.