com.aspose.tasks

Interfaces

Classes

Exceptions

com.aspose.tasks

Class ExtendedAttributeDefinition



  • public class ExtendedAttributeDefinition
    extends Object

    Represents an extended attribute definition associated with a project.

    • Method Detail

      • addLookupValue

        public final void addLookupValue(Value value)

        Adds a value to the internal lookup list. This is a preferable way for manipulations with the ValueList(getValueList()/#setValueList(List)).


         Use this code to add new Value to lookup list:
         
         taskTextAttr.AddLookupValue(new Value { Id = 1, Val = "Text value 1", Description = "Text value description 1" });
         

        Parameters:
        value - Value to add into lookup.


        This method works only for ExtendedAttributeDefinition instances which have CalculationType(getCalculationType()/setCalculationType(int)) equals to CalculationType.Lookup.

      • compareTo

        public int compareTo(ExtendedAttributeDefinition o)
        Compares this object with another instance of the @{code ExtendedAttributeDefinition} class.
        Parameters:
        o - the object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
      • createExtendedAttribute

        public final ExtendedAttribute createExtendedAttribute()

        Creates a new extended attribute with the field ID which equals to this object's field ID value.

        Returns:
        returns created instance of the ExtendedAttribute class with the fieldID which equals to this object's fieldID value.
      • createExtendedAttribute

        public final ExtendedAttribute createExtendedAttribute(String textValue)

        Creates a new extended attribute with the field ID which equals to this object's field ID value and the specified text value.

        Parameters:
        textValue - The specified text value.
        Returns:
        returns created instance of the ExtendedAttribute class with the fieldID which equals to this object's fieldID value.
        Throws:
        com.aspose.ms.System.InvalidOperationException - If current attribute's CfType is not 'Text'
      • createExtendedAttribute

        public final ExtendedAttribute createExtendedAttribute(BigDecimal numericValue)

        Creates a new extended attribute with the field ID which equals to this object's field ID value and the specified numeric value.

        Parameters:
        numericValue - The specified numeric value.
        Returns:
        returns created instance of the ExtendedAttribute class with the fieldID which equals to this object's fieldID value.
        Throws:
        com.aspose.ms.System.InvalidOperationException - If current attribute's CfType is not 'Number' or 'Cost'
      • createExtendedAttribute

        public final ExtendedAttribute createExtendedAttribute(Date dateTimeValue)

        Creates a new extended attribute with the field ID which equals to this object's field ID value and the specified date value.

        Parameters:
        dateTimeValue - The specified datetime value.
        Returns:
        returns created instance of the ExtendedAttribute class with the fieldID which equals to this object's fieldID value.
        Throws:
        com.aspose.ms.System.InvalidOperationException - If current attribute's CfType is not 'Date', 'Start' or 'Finish'
      • createExtendedAttribute

        public final ExtendedAttribute createExtendedAttribute(Duration durationValue)

        Creates a new extended attribute with the field ID which equals to this object's field ID value and the specified duration value.

        Parameters:
        durationValue - The specified duration value.
        Returns:
        returns created instance of the ExtendedAttribute class with the fieldID which equals to this object's fieldID value.
        Throws:
        com.aspose.ms.System.InvalidOperationException - If current attribute's CfType is not 'Duration'
      • createExtendedAttribute

        public final ExtendedAttribute createExtendedAttribute(boolean flagValue)

        Creates a new extended attribute with the field ID which equals to this object's field ID value and the specified flag value.

        Parameters:
        flagValue - The specified flag value.
        Returns:
        returns created instance of the ExtendedAttribute class with the fieldID which equals to this object's fieldID value.
        Throws:
        com.aspose.ms.System.InvalidOperationException - If current attribute's CfType is not 'Flag'
      • createExtendedAttribute

        public final ExtendedAttribute createExtendedAttribute(Value lookupValue)

        Creates new extended attribute linked with specified Value item.


         Use this code to create new ExtendedAttribute using specific value:
         
         taskTextAttr.addLookupValue(value1);
         taskTextAttr.addLookupValue(value2);
         var extendedAttribute = taskTextAttr.createExtendedAttribute(value2);
         

        Parameters:
        lookupValue - The specified Value item.


        lookupValue should be previously added to the ExtendedAttributeDefinition using addLookupValue(Value) method.

        Returns:
        returns created instance of the ExtendedAttribute class linked with specified Value item.
      • equals

        public boolean equals(Object obj)

        Returns a flag indicating whether this instance is equal to the specified object.

        Overrides:
        equals in class Object
        Parameters:
        obj - the specified object to compare to this instance.
        Returns:
        a flag indicating whether this instance is equal to the specified object.
      • getAlias

        public final String getAlias()

        Gets the alias of a custom field.

        Returns:
        the alias of a custom field.
      • setAlias

        public final void setAlias(String value)

        Sets the alias of a custom field.

        Parameters:
        value - the alias of a custom field.
      • getAppendNewValues

        public final boolean getAppendNewValues()

        Gets a value indicating whether new values added to a project are automatically added to the list.


        Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.

        Returns:
        a value indicating whether new values added to a project are automatically added to the list.
      • setAppendNewValues

        public final void setAppendNewValues(boolean value)

        Sets a value indicating whether new values added to a project are automatically added to the list.


        Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.

        Parameters:
        value - a value indicating whether new values added to a project are automatically added to the list.
      • getAutoRollDown

        public final boolean getAutoRollDown()

        Gets a value indicating whether an automatic roll down to assignments is enabled.


        Currently supported for Xml format only.

        Returns:
        a value indicating whether an automatic roll down to assignments is enabled.
      • setAutoRollDown

        public final void setAutoRollDown(boolean value)

        Sets a value indicating whether an automatic roll down to assignments is enabled.


        Currently supported for Xml format only.

        Parameters:
        value - a value indicating whether an automatic roll down to assignments is enabled.
      • getCalculationType

        public final int getCalculationType()

        Gets the calculation type.


        Writing currently supported for Xml format only.

        Returns:
        the calculation type.
      • setCalculationType

        public final void setCalculationType(int value)

        Sets the calculation type.


        Writing currently supported for Xml format only.

        Parameters:
        value - the calculation type.
      • getCfType

        public final int getCfType()

        Gets the type of a custom field.


        Should not be set directly, instead create ExtendedAttributeDefinition using strongly typed static factory methods named like Create*Definition().

        Returns:
        the type of a custom field.
      • getDefault

        public final String getDefault()

        Gets the default value in the list.


        Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.

        Returns:
        the default value in the list.
      • setDefault

        public final void setDefault(String value)

        Sets the default value in the list.


        Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.

        Parameters:
        value - the default value in the list.
      • getDefaultGuid

        public final String getDefaultGuid()

        Gets the Guid of the default lookup table entry.


        Currently supported for Xml format only.

        Returns:
        the Guid of the default lookup table entry.
      • setDefaultGuid

        public final void setDefaultGuid(String value)

        Sets the Guid of the default lookup table entry.


        Currently supported for Xml format only.

        Parameters:
        value - the Guid of the default lookup table entry.
      • getElementType

        public final int getElementType()

        Gets the extended attribute is associated with a task, a resource or an assignment.


        Currently supported for Xml format only.

        Returns:
        the extended attribute is associated with a task, a resource or an assignment.
      • setElementType

        public final void setElementType(int value)

        Sets the extended attribute is associated with a task, a resource or an assignment.


        Currently supported for Xml format only.

        Parameters:
        value - the extended attribute is associated with a task, a resource or an assignment.
      • getFieldName

        public final String getFieldName()

        Gets the name of a custom field.


        Should not be set directly, instead create ExtendedAttributeDefinition using strongly typed static factory methods named like create*Definition().

        Returns:
        the name of a custom field.
      • getFormula

        public final String getFormula()

        Gets the formula that Microsoft Project uses to populate a custom task field.

        Returns:
        the formula that Microsoft Project uses to populate a custom task field.
      • getGuid

        public final String getGuid()

        Gets the Guid of a custom field.


        Currently supported for Xml format only.

        Returns:
        the Guid of a custom field.
      • setGuid

        public final void setGuid(String value)

        Sets the Guid of a custom field.


        Currently supported for Xml format only.

        Parameters:
        value - the Guid of a custom field.
      • getMaxMultiValues

        public final int getMaxMultiValues()

        Gets the maximum number of values you can set in a pick list. Read/write int.


        Currently supported for Xml format only.

        Returns:
        the maximum number of values you can set in a pick list.
      • setMaxMultiValues

        public final void setMaxMultiValues(int value)

        Sets the maximum number of values you can set in a pick list. Read/write int.


        Currently supported for Xml format only.

        Parameters:
        value - the maximum number of values you can set in a pick list.
      • getPhoneticsAlias

        public final String getPhoneticsAlias()

        Gets the phonetic pronunciation of the alias of a custom field.


        Currently supported for Xml format only.

        Returns:
        the phonetic pronunciation of the alias of a custom field.
      • setPhoneticsAlias

        public final void setPhoneticsAlias(String value)

        Sets the phonetic pronunciation of the alias of a custom field.


        Currently supported for Xml format only.

        Parameters:
        value - the phonetic pronunciation of the alias of a custom field.
      • getRestrictValues

        public final boolean getRestrictValues()

        Gets a value indicating whether the custom field values are restricted to values in the ValueList(getValueList()/#setValueList(List)).

        Returns:
        a value indicating whether the custom field values are restricted to values in the
      • setRestrictValues

        public final void setRestrictValues(boolean value)

        Sets a value indicating whether the custom field values are restricted to values in the ValueList(getValueList()/#setValueList(List)).

        Parameters:
        value - a value indicating whether the custom field values are restricted to values in the
      • getRollupType

        public final int getRollupType()

        Gets the way rollups are calculated.


        Writing currently supported for Xml format only.

        Returns:
        the way rollups are calculated.
      • setRollupType

        public final void setRollupType(int value)

        Sets the way rollups are calculated.


        Writing currently supported for Xml format only.

        Parameters:
        value - the way rollups are calculated.
      • getSecondaryGuid

        public final String getSecondaryGuid()

        Gets the secondary guid of extended attribute.


        This is new for MS Project 2010 property.

        Returns:
        the secondary guid of extended attribute.
      • setSecondaryGuid

        public final void setSecondaryGuid(String value)

        Sets the secondary guid of extended attribute.


        This is new for MS Project 2010 property.

        Parameters:
        value - the secondary guid of extended attribute.
      • getSecondaryPid

        public final String getSecondaryPid()

        Gets the secondary Pid of a custom field.


        Currently supported for Xml format only.

        Returns:
        the secondary Pid of a custom field.
      • setSecondaryPid

        public final void setSecondaryPid(String value)

        Sets the secondary Pid of a custom field.


        Currently supported for Xml format only.

        Parameters:
        value - the secondary Pid of a custom field.
      • getUserDef

        public final boolean getUserDef()

        Gets a value indicating whether a custom field is user defined. Read/write boolean.


        Currently supported for Xml format only.

        Returns:
        a value indicating whether a custom field is user defined.
      • setUserDef

        public final void setUserDef(boolean value)

        Sets a value indicating whether a custom field is user defined. Read/write boolean.


        Currently supported for Xml format only.

        Parameters:
        value - a value indicating whether a custom field is user defined.
      • getValueList

        public final List<Value> getValueList()

        Gets the List<Value> ValueList.


        When values of extended attributes are specified as properties of elements in the schema, they may either be specified by values or by references to the values contained in this list. Applications may assume ordering of the list by ordering specified here. Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats. Do not change this list directly. Use ExtendedAttributeDefinition.addLookupValue/removeLookupValue methods instead.

        Returns:
        the List
      • getValuelistSortOrder

        public final int getValuelistSortOrder()

        Gets the way value lists are sorted. Values are: 0=Descending, 1=Ascending.


        Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.

        Returns:
        the way value lists are sorted.
      • setValuelistSortOrder

        public final void setValuelistSortOrder(int value)

        Sets the way value lists are sorted. Values are: 0=Descending, 1=Ascending.


        Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.

        Parameters:
        value - the way value lists are sorted.
      • setFormula

        public final void setFormula(String value)

        Sets the formula that Microsoft Project uses to populate a custom task field.

        Parameters:
        value - the formula that Microsoft Project uses to populate a custom task field.