Package com.emc.documentum.rest.attributeview.api

# Class AttributeView

java.lang.Object
com.emc.documentum.rest.attributeview.api.AttributeView

public class AttributeView extends Object
A class representing the 'view expression' client provides. It includes a name for the view and a list of attributes if it is not one of the predefined views. There are three predefined views: DEFAULT, ALL and NONE. Each of them has an empty list of attributes. There is one CUSTOM view that is defined by the attributes client provides, and it has a list of attribute names. Please do NOT confuse it with the view in MVC term.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `AttributeView.ViewName`
  The name for the view.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final AttributeView`
  `ALL`
  View all attributes, corresponding to ":all"
  `static final AttributeView`
  `DEFAULT`
  Default view of attributes, corresponding to ":default"
  `static final AttributeView`
  `NONE`
  View none attributes

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `AttributeView(AttributeView.ViewName name)`
  ``
  `AttributeView(String... attributes)`
  Build attribute view from the attribute array
  ``
  `AttributeView(List<String> attributes)`
  Build attribute view from the custom attribute list

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `allForType(String objectType)`
  Check whether the custom attribute list are all for the specified object type.
  `List<String>`
  `attributes()`
  Return the custom attributes in the view
  `List<String>`
  `baseAttributes()`
  Return base type attributes from the custom attribute list
  `void`
  `classifyAttributes(String baseType, List<String> extendedAttributes)`
  Classify the custom attributes into base type attributes and extended attributes.
  `boolean`
  `equals(Object obj)`
  `List<String>`
  `extendedAttributes()`
  Return extended attributes from the custom attribute list
  `boolean`
  `hasExtendedAttributes()`
  Check whether the custom attributes contain any extended attributes
  `int`
  `hashCode()`
  `AttributeView.ViewName`
  `name()`
  Return the view parameter name

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

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

- ## Field Details

  - ### DEFAULT

    public static final AttributeView DEFAULT
    Default view of attributes, corresponding to ":default"

  - ### ALL

    public static final AttributeView ALL
    View all attributes, corresponding to ":all"

  - ### NONE

    public static final AttributeView NONE
    View none attributes

- ## Constructor Details

  - ### AttributeView

    protected AttributeView(AttributeView.ViewName name)

  - ### AttributeView

    public AttributeView(String... attributes)
    Build attribute view from the attribute array
    Parameters:
      `attributes` - the attribute array

  - ### AttributeView

    public AttributeView(List<String> attributes)
    Build attribute view from the custom attribute list
    Parameters:
      `attributes` - the attribute list including both base type attributes and extended attributes

- ## Method Details

  - ### name

    public AttributeView.ViewName name()
    Return the view parameter name
    Returns:
      the view parameter name

  - ### attributes

    public List<String> attributes()
    Return the custom attributes in the view
    Returns:
      the attributes in the view

  - ### extendedAttributes

    public List<String> extendedAttributes()
    Return extended attributes from the custom attribute list
    Returns:
      the list of extended attributes
    See Also:
      - `classifyAttributes(String, List)`

  - ### baseAttributes

    public List<String> baseAttributes()
    Return base type attributes from the custom attribute list
    Returns:
      the list of base type attributes
    See Also:
      - `classifyAttributes(String, List)`

  - ### hasExtendedAttributes

    public boolean hasExtendedAttributes()
    Check whether the custom attributes contain any extended attributes
    Returns:
      true if the custom attributes contain extended attributes; false for otherwise
    See Also:
      - `classifyAttributes(String, List)`

  - ### classifyAttributes

    public void classifyAttributes(String baseType, List<String> extendedAttributes)
    Classify the custom attributes into base type attributes and extended attributes.
    Parameters:
      `baseType` - the base type
      `extendedAttributes` - the list of extended attributes.
    See Also:
      - `baseAttributes()`
      - `extendedAttributes()`

  - ### allForType

    public boolean allForType(String objectType)
    Check whether the custom attribute list are all for the specified object type. The result is true if the custom attribute list does not have any extended attributes, or the object type is equaling to base type and there are no aspect attributes in the extended attributes.
    Parameters:
      `objectType` - the object type
    Returns:
      true if the custom attribute list contains additional attributes not for the object type; false for otherwise
    See Also:
      - `classifyAttributes(String, List)`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`