org.apache.tamaya.model

## Class ConfigModelManager

- java.lang.Object
- - org.apache.tamaya.model.ConfigModelManager

-     public final class ConfigModelManager
      extends Object

  Validator accessor to validate the current configuration.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Collection<ConfigModel>` | `findModels(ModelType type, String namePattern)` Find the validations by checking the validation's name using the given regular expression.
    `static Collection<ConfigModel>` | `findModels(String namePattern)` Find the validations by checking the validation's name using the given regular expression.
    `static <T extends ConfigModel> T` | `getModel(String name, Class<T> modelType)` Find the validations by matching the validation's name against the given model type.
    `static Collection<ConfigModel>` | `getModels()` Get the validations defined.
    `static void` | `registerMBean()` Registers the `ConfigDocumentationMBean` mbean for accessing config documentation into the local platform mbean server.
    `static void` | `registerMBean(String context)` Registers the `ConfigDocumentationMBean` mbean for accessing config documentation into the local platform mbean server.
    `static Collection<ValidationResult>` | `validate()` Validates the current configuration.
    `static Collection<ValidationResult>` | `validate(boolean showUndefined)` Validates the current configuration.
    `static Collection<ValidationResult>` | `validate(org.apache.tamaya.Configuration config)` Validates the given configuration.
    `static Collection<ValidationResult>` | `validate(org.apache.tamaya.Configuration config, boolean showUndefined)` Validates the given configuration.

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

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

- - ### Method Detail

    - #### getModels

          public static Collection<ConfigModel> getModels()

      Get the validations defined.
      Returns:
        the sections defined, never null.

    - #### findModels

          public static Collection<ConfigModel> findModels(ModelType type,
                                           String namePattern)

      Find the validations by checking the validation's name using the given regular expression.
      Parameters:
        `type` - the target ModelType, not null.
        `namePattern` - the regular expression to use, not null.
      Returns:
        the sections defined, never null.

    - #### getModel

          public static <T extends ConfigModel> T getModel(String name,
                                           Class<T> modelType)

      Find the validations by matching the validation's name against the given model type.
      Type Parameters:
        `T` - type of the model to filter for.
      Parameters:
        `name` - the name to use, not null.
        `modelType` - classname of the target model type.
      Returns:
        the sections defined, never null.

    - #### findModels

          public static Collection<ConfigModel> findModels(String namePattern)

      Find the validations by checking the validation's name using the given regular expression.
      Parameters:
        `namePattern` - the regular expression to use, not null.
      Returns:
        the sections defined, never null.

    - #### validate

          public static Collection<ValidationResult> validate()

      Validates the current configuration.
      Returns:
        the validation results, never null.

    - #### validate

          public static Collection<ValidationResult> validate(boolean showUndefined)

      Validates the current configuration.
      Parameters:
        `showUndefined` - show any unknown parameters.
      Returns:
        the validation results, never null.

    - #### validate

          public static Collection<ValidationResult> validate(org.apache.tamaya.Configuration config)

      Validates the given configuration.
      Parameters:
        `config` - the configuration to be validated against, not null.
      Returns:
        the validation results, never null.

    - #### validate

          public static Collection<ValidationResult> validate(org.apache.tamaya.Configuration config,
                                              boolean showUndefined)

      Validates the given configuration.
      Parameters:
        `config` - the configuration to be validated against, not null.
        `showUndefined` - allows filtering for undefined configuration elements.
      Returns:
        the validation results, never null.

    - #### registerMBean

          public static void registerMBean()

      Registers the `ConfigDocumentationMBean` mbean for accessing config documentation into the local platform mbean server.

    - #### registerMBean

          public static void registerMBean(String context)

      Registers the `ConfigDocumentationMBean` mbean for accessing config documentation into the local platform mbean server.
      Parameters:
        `context` - allows to specify an additional MBean context, maybe `null`.

Copyright © 2014–2016 Apache Software Foundation. All rights reserved.