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.
  • 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:
    • baseAttributes

      public List<String> baseAttributes()
      Return base type attributes from the custom attribute list
      Returns:
      the list of base type attributes
      See Also:
    • 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

      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:
    • 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:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

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