com.versionone.apiclient.interfaces

## Interface IAttributeDefinition

-     public interface IAttributeDefinition

  Defines methods for the definition of a VersionOne attribute

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `IAttributeDefinition.Aggregate` Supported aggregate types
    `static class` | `IAttributeDefinition.AttributeType` Supported attribute types

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `IAttributeDefinition` | `aggregate(IAttributeDefinition.Aggregate aggregate)` Aggregate objects
    `Object` | `coerce(Object value)` Attempt to convert the value into this type
    `IAttributeDefinition` | `downcast(IAssetType assetType)` Downcast current object
    `IAttributeDefinition` | `filter(IFilterTerm filter)` Add filter to object
    `IAssetType` | `getAssetType()` Get asset type information to this attribute
    `IAttributeDefinition.AttributeType` | `getAttributeType()` Get type of attribute
    `IAttributeDefinition` | `getBase()` Get base attribute information
    `String` | `getDisplayName()` Get attribute display name
    `String` | `getName()` Get attribute name
    `IAssetType` | `getRelatedAsset()` Get type information for related asset if this attribute is a relation
    `String` | `getToken()` Get attribute token
    `boolean` | `isMultiValue()` Does this attribute support multiple values
    `boolean` | `isReadOnly()` Is this attribute read-only
    `boolean` | `isRequired()` Is this a required attribute
    `IAttributeDefinition` | `join(IAttributeDefinition joined)` Join current token with new

- - ### Method Detail

    - #### coerce

          Object coerce(Object value)
                 throws V1Exception

      Attempt to convert the value into this type
      Parameters:
        `value` - - value to coerce
      Returns:
        same value in this type
      Throws:
        `V1Exception` - - if the value cannot be converted

    - #### getAssetType

          IAssetType getAssetType()
                           throws MetaException

      Get asset type information to this attribute
      Returns:
        IAssetType for this attribute
      Throws:
        `MetaException` - - MetaException

    - #### getName

          String getName()

      Get attribute name
      Returns:
        string containing name

    - #### getDisplayName

          String getDisplayName()

      Get attribute display name
      Returns:
        String

    - #### getToken

          String getToken()

      Get attribute token
      Returns:
        String containing token

    - #### getAttributeType

          IAttributeDefinition.AttributeType getAttributeType()

      Get type of attribute
      Returns:
        AttributeType for this instance

    - #### getBase

          IAttributeDefinition getBase()
                                throws MetaException

      Get base attribute information
      Returns:
        IAttributeDefinition for base
      Throws:
        `MetaException` - if there is no base

    - #### isReadOnly

          boolean isReadOnly()

      Is this attribute read-only
      Returns:
        true if read-only, false otherwise

    - #### isRequired

          boolean isRequired()

      Is this a required attribute
      Returns:
        true if attribute is required, false otherwise

    - #### isMultiValue

          boolean isMultiValue()

      Does this attribute support multiple values
      Returns:
        true if attribute supports multiple-values, false otherwise

    - #### getRelatedAsset

          IAssetType getRelatedAsset()
                              throws MetaException

      Get type information for related asset if this attribute is a relation
      Returns:
        IAssetType for related asset
      Throws:
        `MetaException` - - if we cannot get the Asset Type information

    - #### downcast

          IAttributeDefinition downcast(IAssetType assetType)

      Downcast current object
      Parameters:
        `assetType` - IAssetType for asset defined in token
      Returns:
        Downcasted object

    - #### filter

          IAttributeDefinition filter(IFilterTerm filter)
                               throws APIException

      Add filter to object
      Parameters:
        `filter` - filter for adding
      Returns:
        object with filter
      Throws:
        `APIException` - if filter has incorrect statement

    - #### join

          IAttributeDefinition join(IAttributeDefinition joined)

      Join current token with new
      Parameters:
        `joined` - Object with token for joining
      Returns:
        new object with joined tokens

    - #### aggregate

          IAttributeDefinition aggregate(IAttributeDefinition.Aggregate aggregate)

      Aggregate objects
      Parameters:
        `aggregate` - rule for Aggregating
      Returns:
        agregated object

Copyright © 2022 VersionOne, Inc.. All rights reserved.