org.keycloak.userprofile

## Class AttributeMetadata

- java.lang.Object
- - org.keycloak.userprofile.AttributeMetadata

-     public final class AttributeMetadata
      extends Object

  Author:
    Pedro Igor

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Predicate<AttributeContext>` | `ALWAYS_FALSE`
    `static Predicate<AttributeContext>` | `ALWAYS_TRUE`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AttributeMetadata` | `addAnnotations(Map<String,Object> annotations)`
    `AttributeMetadata` | `addValidator(AttributeValidatorMetadata validator)`
    `AttributeMetadata` | `addValidator(List<AttributeValidatorMetadata> validators)`
    `boolean` | `canEdit(AttributeContext context)`
    `boolean` | `canView(AttributeContext context)`
    `AttributeMetadata` | `clone()`
    `boolean` | `equals(Object o)`
    `Map<String,Object>` | `getAnnotations()`
    `String` | `getAttributeDisplayName()`
    `AttributeGroupMetadata` | `getAttributeGroupMetadata()`
    `int` | `getGuiOrder()`
    `String` | `getName()`
    `List<AttributeValidatorMetadata>` | `getValidators()`
    `int` | `hashCode()`
    `boolean` | `isReadOnly(AttributeContext context)`
    `boolean` | `isRequired(AttributeContext context)` Check if attribute is required based on it's predicate, it is handled as required if predicate is null
    `boolean` | `isSelected(AttributeContext context)`
    `AttributeMetadata` | `setAttributeDisplayName(String attributeDisplayName)`
    `AttributeMetadata` | `setAttributeGroupMetadata(AttributeGroupMetadata attributeGroupMetadata)`
    `AttributeMetadata` | `setGuiOrder(int guiOrder)`

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

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

- - ### Field Detail

    - #### ALWAYS_TRUE

          public static final Predicate<AttributeContext> ALWAYS_TRUE

    - #### ALWAYS_FALSE

          public static final Predicate<AttributeContext> ALWAYS_FALSE

  - ### Method Detail

    - #### getName

          public String getName()

    - #### getGuiOrder

          public int getGuiOrder()

    - #### setGuiOrder

          public AttributeMetadata setGuiOrder(int guiOrder)

    - #### getAttributeGroupMetadata

          public AttributeGroupMetadata getAttributeGroupMetadata()

    - #### isSelected

          public boolean isSelected(AttributeContext context)

    - #### isReadOnly

          public boolean isReadOnly(AttributeContext context)

    - #### canView

          public boolean canView(AttributeContext context)

    - #### canEdit

          public boolean canEdit(AttributeContext context)

    - #### isRequired

          public boolean isRequired(AttributeContext context)

      Check if attribute is required based on it's predicate, it is handled as required if predicate is null
      Parameters:
        `context` - to evaluate requirement of the attribute from
      Returns:
        true if attribute is required in provided context

    - #### getValidators

          public List<AttributeValidatorMetadata> getValidators()

    - #### addValidator

          public AttributeMetadata addValidator(List<AttributeValidatorMetadata> validators)

    - #### addValidator

          public AttributeMetadata addValidator(AttributeValidatorMetadata validator)

    - #### getAnnotations

          public Map<String,Object> getAnnotations()

    - #### addAnnotations

          public AttributeMetadata addAnnotations(Map<String,Object> annotations)

    - #### clone

          public AttributeMetadata clone()

      Overrides:
        `clone` in class `Object`

    - #### getAttributeDisplayName

          public String getAttributeDisplayName()

    - #### setAttributeDisplayName

          public AttributeMetadata setAttributeDisplayName(String attributeDisplayName)

    - #### setAttributeGroupMetadata

          public AttributeMetadata setAttributeGroupMetadata(AttributeGroupMetadata attributeGroupMetadata)

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2021 JBoss by Red Hat. All rights reserved.