org.apache.tamaya.model.spi

## Class AbstractModel

- java.lang.Object
- - org.apache.tamaya.model.spi.AbstractModel

- All Implemented Interfaces:
    Comparable<ConfigModel>, ConfigModel
  Direct Known Subclasses:
    ParameterModel

      public abstract class AbstractModel
      extends Object
      implements ConfigModel, Comparable<ConfigModel>

  Default configuration Model for a configuration area.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractModel(String name, boolean required, String description, String provider)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(ConfigModel configModel)`
    `boolean` | `equals(Object o)`
    `String` | `getDescription()` Get an description of the item, using the default locale.
    `String` | `getName()` Get the item's name, it should minimally describe the validation.
    `String` | `getProvider()` Get the provider of this validation.
    `int` | `hashCode()`
    `boolean` | `isRequired()` Check if this validation is a required one.

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

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

    - ### Methods inherited from interface org.apache.tamaya.model.ConfigModel

      `getType, validate`

- - ### Constructor Detail

    - #### AbstractModel

          protected AbstractModel(String name,
                       boolean required,
                       String description,
                       String provider)

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from interface: `ConfigModel`
      Get the item's name, it should minimally describe the validation. Examples are:

               Sections: a.b.c
               Params: a.b.c.paramName
               Filter: a.b.c.FilterImplClass
               Dependency: mydepClassname
               CombinationPolicy: a.b.c.MyCombinationPolicyClass

      Specified by:
        `getName` in interface `ConfigModel`
      Returns:
        the item's name.

    - #### getProvider

          public String getProvider()

      Description copied from interface: `ConfigModel`
      Get the provider of this validation.
      Specified by:
        `getProvider` in interface `ConfigModel`
      Returns:
        the provider.

    - #### getDescription

          public String getDescription()

      Description copied from interface: `ConfigModel`
      Get an description of the item, using the default locale. The description is basically optional though it is higly recommended to provide a description, so the validation issues is well resolvable.
      Specified by:
        `getDescription` in interface `ConfigModel`
      Returns:
        the description required, or null.

    - #### isRequired

          public boolean isRequired()

      Description copied from interface: `ConfigModel`
      Check if this validation is a required one.
      Specified by:
        `isRequired` in interface `ConfigModel`
      Returns:
        true, if this validation is required.

    - #### compareTo

          public int compareTo(ConfigModel configModel)

      Specified by:
        `compareTo` in interface `Comparable<ConfigModel>`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

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