com.microfocus.awm.meta.modelextension

## Class ModelExtensionParser

- java.lang.Object
- - com.microfocus.awm.meta.modelextension.ModelExtensionParser

-     public class ModelExtensionParser
      extends java.lang.Object

  Parser for the AWM model extension point: "com.microfocus.awm.model.extension".

  Copyright Micro Focus GmbH.

  Author:
    Ralf Pakosch

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ELEMENT_TYPE_MODEL_EXTENSION_ID` The model extension ID for the AWM element type extension property
    `static java.lang.String` | `END_MODEL_REFERENCE_QUALIFIER` The qualifier used in the model extension to indicate the end of a model object reference
    `static java.lang.String` | `MODEL_EXTENSION_EXT_POINT_ID` Extension point ID for AWM Model Extensions.
    `static java.lang.String` | `START_MODEL_REFERENCE_QUALIFIER` The qualifier used in the model extension to indicate the start of a model object reference.
    `static java.lang.String` | `TOOL_EXECUTOR_EXT_POINT_ID` Deprecated. Old tool type extension point. The extension point "com.microfocus.awm.model.extension" should be used instead.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ModelExtensionParser()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.List<FunctionPackageExtension>` | `getFunctionPackageExtensions()` Lazy gets a list of all registered model extensions.
    `static java.util.List<FunctionPackageExtension>` | `getFunctionPackageExtensions(TaurusPackage pPackage)` Lazy gets a list of all registered model extensions.
    `static java.util.List<java.lang.Throwable>` | `getModelExtensionPointErrors()` Gets a list of errors which occurred while model extensions were parsed.
    `static java.util.List<org.eclipse.core.runtime.IStatus>` | `getModelExtensionPointMessages()` Gets a list of `IStatus`es which occurred while model extensions were parsed.
    `static java.net.URL` | `getResource(org.eclipse.core.runtime.IConfigurationElement pExtension, java.lang.String pResourcePath)` Gets an URL from a resource configuration element.
    `static java.net.URL` | `getResourceFromAttribute(org.eclipse.core.runtime.IConfigurationElement pExtension, java.lang.String pAttributeName)` Gets an URL from a resource configuration element attribute.
    `static java.util.List<org.eclipse.core.runtime.IConfigurationElement>` | `getToolExecutorExtensions()` Deprecated. Old tool type extension point. The extension point "com.microfocus.awm.model.extension" should be used instead.
    `static java.util.List<ToolTypeExtension>` | `getToolTypes()` Gets a list of available tool type extensions.
    `static java.lang.String[]` | `parseMultiValueAttribute(java.lang.String pAttribute, java.lang.String pSeparator)` Parses an attribute of an extension which has several separated values.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MODEL_EXTENSION_EXT_POINT_ID

          public static final java.lang.String MODEL_EXTENSION_EXT_POINT_ID

      Extension point ID for AWM Model Extensions.
      See Also:
        Constant Field Values

    - #### ELEMENT_TYPE_MODEL_EXTENSION_ID

          public static final java.lang.String ELEMENT_TYPE_MODEL_EXTENSION_ID

      The model extension ID for the AWM element type extension property
      See Also:
        Constant Field Values

    - #### START_MODEL_REFERENCE_QUALIFIER

          public static final java.lang.String START_MODEL_REFERENCE_QUALIFIER

      The qualifier used in the model extension to indicate the start of a model object reference.
      See Also:
        Constant Field Values

    - #### END_MODEL_REFERENCE_QUALIFIER

          public static final java.lang.String END_MODEL_REFERENCE_QUALIFIER

      The qualifier used in the model extension to indicate the end of a model object reference
      See Also:
        Constant Field Values

    - #### TOOL_EXECUTOR_EXT_POINT_ID

          @Deprecated
          public static final java.lang.String TOOL_EXECUTOR_EXT_POINT_ID

      Deprecated. Old tool type extension point. The extension point "com.microfocus.awm.model.extension" should be used instead.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ModelExtensionParser

          public ModelExtensionParser()

  - ### Method Detail

    - #### getFunctionPackageExtensions

          public static java.util.List<FunctionPackageExtension> getFunctionPackageExtensions()

      Lazy gets a list of all registered model extensions. Uses extension point "com.microfocus.awm.model.extension".
      Returns:
        a list of function package extensions

    - #### getFunctionPackageExtensions

          public static java.util.List<FunctionPackageExtension> getFunctionPackageExtensions(TaurusPackage pPackage)

      Lazy gets a list of all registered model extensions. Uses extension point "com.microfocus.awm.model.extension".
      Parameters:
        `pPackage` - the `TaurusPackage` instance.
      Returns:
        a list of function package extensions

    - #### getToolExecutorExtensions

          @Deprecated
          public static java.util.List<org.eclipse.core.runtime.IConfigurationElement> getToolExecutorExtensions()

      Deprecated. Old tool type extension point. The extension point "com.microfocus.awm.model.extension" should be used instead.
      Gets an unparsed list of available tool type extensions. Uses the extension point "com.microfocus.awm.toolexecutor".
      Returns:
        a list of tool type extensions
      See Also:
        `getToolTypes()`

    - #### getToolTypes

          public static java.util.List<ToolTypeExtension> getToolTypes()

      Gets a list of available tool type extensions. Uses the extension point "com.microfocus.awm.toolexecutor".
      Returns:
        a list of tool type extensions
      See Also:
        `getToolExecutorExtensions()`

    - #### parseMultiValueAttribute

          public static java.lang.String[] parseMultiValueAttribute(java.lang.String pAttribute,
                                                                    java.lang.String pSeparator)

      Parses an attribute of an extension which has several separated values.
      Parameters:
        `pAttribute` - the attribute which contains several values
        `pSeparator` - the separator
      Returns:
        an array of (trimmed) values

    - #### getResourceFromAttribute

          public static java.net.URL getResourceFromAttribute(org.eclipse.core.runtime.IConfigurationElement pExtension,
                                                              java.lang.String pAttributeName)

      Gets an URL from a resource configuration element attribute.
      Parameters:
        `pExtension` - a configuration element
        `pAttributeName` - name of the attribute which contains a resource
      Returns:
        the resource URL or `null` if the resource could not be found or if this bundle is a fragment bundle or if the caller does not have the appropriate AdminPermission[this,RESOURCE], and the Java Runtime Environment supports permissions.
      See Also:
        `getResource(IConfigurationElement, String)`, `Bundle.getResource(String)`

    - #### getResource

          public static java.net.URL getResource(org.eclipse.core.runtime.IConfigurationElement pExtension,
                                                 java.lang.String pResourcePath)

      Gets an URL from a resource configuration element.
      Parameters:
        `pExtension` - a configuration element
        `pResourcePath` - the resource path in the bundle
      Returns:
        the resource URL or `null` if the resource could not be found or if this bundle is a fragment bundle or if the caller does not have the appropriate AdminPermission[this,RESOURCE], and the Java Runtime Environment supports permissions.
      See Also:
        `getResourceFromAttribute(IConfigurationElement, String)`, `Bundle.getResource(String)`

    - #### getModelExtensionPointErrors

          public static java.util.List<java.lang.Throwable> getModelExtensionPointErrors()

      Gets a list of errors which occurred while model extensions were parsed. Only contains errors which were explicitly cached and added to the list.
      Returns:
        a list of errors (can be empty)

    - #### getModelExtensionPointMessages

          public static java.util.List<org.eclipse.core.runtime.IStatus> getModelExtensionPointMessages()

      Gets a list of `IStatus`es which occurred while model extensions were parsed. Only contains statuses which were explicitly cached and added to the list.
      Returns:
        a list of statuses (`IStatus.WARNING` or `IStatus.INFO`). Can be empty.

Copyright © 2015 Micro Focus GmbH. All rights reserved.