com.aspose.tasks

Interfaces

Classes

Exceptions

com.aspose.tasks

Class ExtendedAttribute



  • public class ExtendedAttribute
    extends Object

    Represents extended attributes.


    Currently supported all types of Extended attributes reading from MSP Xml 2003/2007 and mpp 2003. For MSP mpp 2007 all Extended attributes reading supported except durations and flags.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      ExtendedAttributeDefinition getAttributeDefinition()
      Deprecated. 
      This property's setter is obsolete and will be removed in v 20.12. Please use factory methods of ExtendedAttributeDefinition class to create instance of ExtendedAttribute for the specific AttributeDefinition. The getter can be safely used.
      Date getDateValue()
      Gets a value for attributes with date types (Date, Start, Finish).
      Duration getDurationValue()
      Gets value for attributes with 'Duration' type.
      String getFieldId()
      Deprecated. 
      This property's setter is obsolete and will be removed in v 20.12. Please use factory methods of ExtendedAttributeDefinition class to create instance of ExtendedAttribute for the specific AttributeDefinition. The getter can be safely used.
      boolean getFlagValue()
      Gets a value indicating whether a flag is set for an attribute with 'Flag' type.
      BigDecimal getNumericValue()
      Gets a value for attributes with numeric types (Cost, Number).
      String getTextValue()
      Gets a value for attributes with 'Text' type.
      String getValueGuid()
      Gets the guid of a lookup value.
      boolean getValueReadOnly()
      Gets a value indicating whether a value of this ExtendedAttribute instance is read-only.
      void setAttributeDefinition(ExtendedAttributeDefinition value)
      Deprecated. 
      This property's setter is obsolete and will be removed in v 20.12. Please use factory methods of ExtendedAttributeDefinition class to create instance of ExtendedAttribute for the specific AttributeDefinition. The getter can be safely used.
      void setDateValue(Date value)
      Sets a value for attributes with date types (Date, Start, Finish).
      void setDurationValue(Duration value)
      Sets value for attributes with 'Duration' type.
      void setFieldId(String value)
      Deprecated. 
      This property's setter is obsolete and will be removed in v 20.12. Please use factory methods of ExtendedAttributeDefinition class to create instance of ExtendedAttribute for the specific AttributeDefinition. The getter can be safely used.
      void setFlagValue(boolean value)
      Sets a value indicating whether a flag is set for an attribute with 'Flag' type.
      void setNumericValue(BigDecimal value)
      Sets a value for attributes with numeric types (Cost, Number).
      void setTextValue(String value)
      Sets a value for attributes with 'Text' type.
      String toString()
      Returns short string representation of an extended attribute.
    • Method Detail

      • getAttributeDefinition

        @Deprecated
        public final ExtendedAttributeDefinition getAttributeDefinition()
        Deprecated. This property's setter is obsolete and will be removed in v 20.12. Please use factory methods of ExtendedAttributeDefinition class to create instance of ExtendedAttribute for the specific AttributeDefinition. The getter can be safely used.

        Gets sets the attribute definition

        Returns:
        sets the attribute definition
      • setAttributeDefinition

        @Deprecated
        public final void setAttributeDefinition(ExtendedAttributeDefinition value)
        Deprecated. This property's setter is obsolete and will be removed in v 20.12. Please use factory methods of ExtendedAttributeDefinition class to create instance of ExtendedAttribute for the specific AttributeDefinition. The getter can be safely used.

        Sets sets the attribute definition

        Parameters:
        value - the attribute definition
      • getDateValue

        public final Date getDateValue()

        Gets a value for attributes with date types (Date, Start, Finish).

        Returns:
        a value for attributes with date types (Date, Start, Finish).
        Throws:
        com.aspose.ms.System.InvalidOperationException - Thrown if the ExtendedAttribute.AttributeDefinition(getAttributeDefinition()/setAttributeDefinition(ExtendedAttributeDefinition)) property is not initialized or current attribute is not an date attribute.
      • setDateValue

        public final void setDateValue(Date value)

        Sets a value for attributes with date types (Date, Start, Finish).

        Parameters:
        value - a value for attributes with date types (Date, Start, Finish).
        Throws:
        com.aspose.ms.System.InvalidOperationException - Thrown if the ExtendedAttribute.AttributeDefinition(getAttributeDefinition()/setAttributeDefinition(ExtendedAttributeDefinition)) property is not initialized or current attribute is not an date attribute.
      • getFieldId

        @Deprecated
        public final String getFieldId()
        Deprecated. This property's setter is obsolete and will be removed in v 20.12. Please use factory methods of ExtendedAttributeDefinition class to create instance of ExtendedAttribute for the specific AttributeDefinition. The getter can be safely used.

        Gets the id of a field. Read/write String.

        Returns:
        the id of a field.
      • setFieldId

        @Deprecated
        public final void setFieldId(String value)
        Deprecated. This property's setter is obsolete and will be removed in v 20.12. Please use factory methods of ExtendedAttributeDefinition class to create instance of ExtendedAttribute for the specific AttributeDefinition. The getter can be safely used.

        Sets the id of a field. Read/write String.

        Parameters:
        value - the id of a field.
      • getFlagValue

        public final boolean getFlagValue()

        Gets a value indicating whether a flag is set for an attribute with 'Flag' type.

        Returns:
        a value indicating whether a flag is set for an attribute with 'Flag' type.
        Throws:
        com.aspose.ms.System.InvalidOperationException - Thrown if the ExtendedAttribute.AttributeDefinition(getAttributeDefinition()/setAttributeDefinition(ExtendedAttributeDefinition)) property is not initialized or current attribute is not a flag attribute.
      • setFlagValue

        public final void setFlagValue(boolean value)

        Sets a value indicating whether a flag is set for an attribute with 'Flag' type.

        Parameters:
        value - a value indicating whether a flag is set for an attribute with 'Flag' type.
        Throws:
        com.aspose.ms.System.InvalidOperationException - Thrown if the ExtendedAttribute.AttributeDefinition(getAttributeDefinition()/setAttributeDefinition(ExtendedAttributeDefinition)) property is not initialized or current attribute is not a flag attribute.
      • getTextValue

        public final String getTextValue()

        Gets a value for attributes with 'Text' type.

        Returns:
        a value for attributes with 'Text' type.
        Throws:
        com.aspose.ms.System.InvalidOperationException - Thrown if the ExtendedAttribute.AttributeDefinition(getAttributeDefinition()/setAttributeDefinition(ExtendedAttributeDefinition)) property is not initialized or current attribute is not a text attribute.
      • setTextValue

        public final void setTextValue(String value)

        Sets a value for attributes with 'Text' type.

        Parameters:
        value - a value for attributes with 'Text' type.
        Throws:
        com.aspose.ms.System.InvalidOperationException - Thrown if the ExtendedAttribute.AttributeDefinition(getAttributeDefinition()/setAttributeDefinition(ExtendedAttributeDefinition)) property is not initialized or current attribute is not a text attribute.
      • getValueGuid

        public final String getValueGuid()

        Gets the guid of a lookup value.


        Should not be set directly, instead use ExtendedAttributeDefinition.CreateExtendedAttribute(Value lookupValue) to create an extended attribute with a lookup value.
        Returns:
        the guid of a lookup value.
      • getValueReadOnly

        public final boolean getValueReadOnly()

        Gets a value indicating whether a value of this ExtendedAttribute instance is read-only.

        Value: returns true if a formula or rollup is defined in the ExtendedAttributeDefinition for this object.
        Returns:
        a value indicating whether a value of this ExtendedAttribute instance is read-only.
      • toString

        public String toString()

        Returns short string representation of an extended attribute.

        Overrides:
        toString in class Object
        Returns:
        The string representation of the extended attribute.