oracle.adf.view.rich.model

## Class BaseAttributeDescriptor

- java.lang.Object
- - oracle.adf.view.rich.model.Descriptor
  - - oracle.adf.view.rich.model.BaseAttributeDescriptor

- Direct Known Subclasses:
    AttributeDescriptor

      public abstract class BaseAttributeDescriptor
      extends Descriptor

  A BaseAttributeDescriptor represents an attribute that is part of a view object (in ADF) or any other model object.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DESCRIPTOR_TYPE_ATTRIBUTE`

    - ### Fields inherited from class oracle.adf.view.rich.model.Descriptor

      `DESCRIPTOR_TYPE_DEFAULT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseAttributeDescriptor()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAutoComplete()` Returns the autocomplete text for the attribute
    `String` | `getCharacterCountBy()` Returns the method used to count surrogate pair characters.
    `abstract AttributeDescriptor.ComponentType` | `getComponentType()` Returns the component to use to render the value part of the search field.
    `javax.faces.convert.Converter` | `getConverter()` Returns a converter instance to use with this Attribute.
    `Object` | `getCustomizedProperty(String propertyName)` Returns the value of a customized property in model.
    `String` | `getDescriptorType()` Returns "ATTRIBUTE" as descriptor type of this object.
    `String` | `getFormat()` Returns a format to use when showing a locale specific value for this attribute.
    `String` | `getGroupName()` Returns the group name that this attribute belongs to.
    `abstract int` | `getLength()` Returns the size of the text control specified by the number of characters shown.
    `abstract int` | `getMaximumLength()` Returns the the maximum number of characters per line that can be entered into the text control.
    `abstract Object` | `getModel()` Returns the model object that represents the data for the component.
    `String` | `getPlaceholder()` Returns the placeholder text for the attribute
    `TimeZone` | `getTimeZone()` Returns a TimeZone to be set on the DateTimeConverter associated with this Attribute.
    `abstract Class` | `getType()` Returns the data type of the attribute.
    `javax.faces.validator.Validator` | `getValidator()` Returns a Validator instance to use with this Attribute.
    `boolean` | `hasDefaultConverter()` Returns a boolean to specify whether there is a default converter based on the data type This default converter will be created and attached to the component.
    `abstract boolean` | `isReadOnly()` Whether the attribute is readOnly.
    `abstract boolean` | `isRequired()` Whether the attribute is required or not.

    - ### Methods inherited from class oracle.adf.view.rich.model.Descriptor

      `getDescription, getLabel, getName`

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

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

- - ### Field Detail

    - #### DESCRIPTOR_TYPE_ATTRIBUTE

          public static final String DESCRIPTOR_TYPE_ATTRIBUTE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BaseAttributeDescriptor

          public BaseAttributeDescriptor()

  - ### Method Detail

    - #### getComponentType

          public abstract AttributeDescriptor.ComponentType getComponentType()

      Returns the component to use to render the value part of the search field. When the attribute has no component type associated with it, then the component to use is determined by its type.
      Returns:
        a ComponentType enum.

    - #### getFormat

          public String getFormat()

      Returns a format to use when showing a locale specific value for this attribute.
      For e.g., this could be a pattern like mm/dd/yyyy to use when converting the value. The format pattern used depends on the dataType of the attribute.
      Returns:
        an Object.

    - #### getConverter

          public javax.faces.convert.Converter getConverter()

      Returns a converter instance to use with this Attribute.
      Returns:
        an Converter Object.

    - #### getTimeZone

          public TimeZone getTimeZone()

      Returns a TimeZone to be set on the DateTimeConverter associated with this Attribute.
      Returns:
        an TimeZone Object.

    - #### getValidator

          public javax.faces.validator.Validator getValidator()

      Returns a Validator instance to use with this Attribute.
      Returns:
        a Validator Object.

    - #### getLength

          public abstract int getLength()

      Returns the size of the text control specified by the number of characters shown. The length is estimated based on the default font size of the browser.
      Returns:
        the size of the text control

    - #### getMaximumLength

          public abstract int getMaximumLength()

      Returns the the maximum number of characters per line that can be entered into the text control. This includes the characters representing the new line. If set to 0 or less, the maximumLength is ignored.
      Returns:
        the maximum number of characters per line.

    - #### getCharacterCountBy

          public String getCharacterCountBy()

      Returns the method used to count surrogate pair characters. The default, "codeUnit", counts surrogate pair characters as 2 logical characters. This is the case for most unicode encoding schemes. When "codePoint" is specified, surrogate pair characters count as one logical character, which is the case in the AL32UTF8 unicode encoding scheme.
      Returns:
        the surrogate pair character count by mode.

    - #### getModel

          public abstract Object getModel()

      Returns the model object that represents the data for the component.
      - For inputListOfValues/inputComboboxListOfValues, it's a ListOfValuesModel
      - For inputNumberSpinbox, it's a NumberRange object
      - For selectXyz components, it must be List<SelectItem>
      - Undefined for other types
      Returns:
        the model object that is the data for the component.

    - #### getDescriptorType

          public String getDescriptorType()

      Returns "ATTRIBUTE" as descriptor type of this object. This is used to differentiate descriptor objects as either Attributes or AttributeGroup.
      Overrides:
        `getDescriptorType` in class `Descriptor`
      Returns:
        String

    - #### getGroupName

          public String getGroupName()

      Returns the group name that this attribute belongs to.
      Returns:
        String groupName

    - #### getType

          public abstract Class getType()

      Returns the data type of the attribute. It is used to determine the type of component and the converter to use when rendering its value.
      Returns:
        a valid java.lang.Class instance

    - #### isReadOnly

          public abstract boolean isReadOnly()

      Whether the attribute is readOnly. A true value indicates that a value cannot be entered for this attribute.
      Returns:
        a boolean.

    - #### isRequired

          public abstract boolean isRequired()

      Whether the attribute is required or not.
      Returns:
        a boolean false.

    - #### getPlaceholder

          public String getPlaceholder()

      Returns the placeholder text for the attribute
      Returns:
        String placeholder text

    - #### getAutoComplete

          public String getAutoComplete()

      Returns the autocomplete text for the attribute
      Returns:
        String autocomplete text

    - #### hasDefaultConverter

          public boolean hasDefaultConverter()

      Returns a boolean to specify whether there is a default converter based on the data type This default converter will be created and attached to the component. If the getConverter() method however returns a converter, it will be attached to the component irrespective of this API.
      Returns:
        a boolean

    - #### getCustomizedProperty

          public Object getCustomizedProperty(String propertyName)

      Returns the value of a customized property in model. Override this methods in sub classes for customization Default implementation returns null.
      Parameters:
        `propertyName` - property to be returned
      Returns:
        a Object

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.