Class ExtendedAttribute
- java.lang.Object
-
- com.aspose.tasks.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 Modifier and Type Method Description ExtendedAttributeDefinition
getAttributeDefinition()
Gets the attribute definition.Date
getDateValue()
Gets a value for attributes with date types (Date, Start, Finish).Duration
getDurationValue()
Gets value for attributes with 'Duration' type.String
getFieldId()
Gets the id of a field.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 thisExtendedAttribute
instance is read-only.boolean
isErrorValue()
Gets whether calculation of extended attribute's value resulted in an error.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
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
public final ExtendedAttributeDefinition getAttributeDefinition()
Gets the attribute definition.
- Returns:
- 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 theExtendedAttribute.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 theExtendedAttribute.AttributeDefinition
(getAttributeDefinition()
/setAttributeDefinition(ExtendedAttributeDefinition)
) property is not initialized or current attribute is not an date attribute.
-
getDurationValue
public final Duration getDurationValue()
Gets value for attributes with 'Duration' type.
- Returns:
- value for attributes with 'Duration' type.
- Throws:
com.aspose.ms.System.InvalidOperationException
- Thrown if theExtendedAttribute.AttributeDefinition
(getAttributeDefinition()
/setAttributeDefinition(ExtendedAttributeDefinition)
) property is not initialized or custom field type ofExtendedAttribute.AttributeDefinition
(getAttributeDefinition()
/setAttributeDefinition(ExtendedAttributeDefinition)
) property is not aDuration
instance.
-
setDurationValue
public final void setDurationValue(Duration value)
Sets value for attributes with 'Duration' type.
- Parameters:
value
- value for attributes with 'Duration' type.- Throws:
com.aspose.ms.System.InvalidOperationException
- Thrown if theExtendedAttribute.AttributeDefinition
(getAttributeDefinition()
/setAttributeDefinition(ExtendedAttributeDefinition)
) property is not initialized or custom field type ofExtendedAttribute.AttributeDefinition
(getAttributeDefinition()
/setAttributeDefinition(ExtendedAttributeDefinition)
) property is not aDuration
instance.
-
getFieldId
public final String getFieldId()
Gets the id of a field.
- Returns:
- 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 theExtendedAttribute.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 theExtendedAttribute.AttributeDefinition
(getAttributeDefinition()
/setAttributeDefinition(ExtendedAttributeDefinition)
) property is not initialized or current attribute is not a flag attribute.
-
getNumericValue
public final BigDecimal getNumericValue()
Gets a value for attributes with numeric types (Cost, Number).
- Returns:
- a value for attributes with numeric types (Cost, Number).
- Throws:
com.aspose.ms.System.InvalidOperationException
- Thrown if theExtendedAttribute.AttributeDefinition
(getAttributeDefinition()
/setAttributeDefinition(ExtendedAttributeDefinition)
) property is not initialized or custom field type ofExtendedAttribute.AttributeDefinition
(getAttributeDefinition()
/setAttributeDefinition(ExtendedAttributeDefinition)
) property is not 'Cost' or 'Number'.
-
setNumericValue
public final void setNumericValue(BigDecimal value)
Sets a value for attributes with numeric types (Cost, Number).
- Parameters:
value
- a value for attributes with numeric types (Cost, Number).- Throws:
com.aspose.ms.System.InvalidOperationException
- Thrown if theExtendedAttribute.AttributeDefinition
(getAttributeDefinition()
/setAttributeDefinition(ExtendedAttributeDefinition)
) property is not initialized or custom field type ofExtendedAttribute.AttributeDefinition
(getAttributeDefinition()
/setAttributeDefinition(ExtendedAttributeDefinition)
) property is not 'Cost' or 'Number'.
-
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 theExtendedAttribute.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 theExtendedAttribute.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
Value: returns true if a formula or rollup is defined in theExtendedAttribute
instance is read-only.ExtendedAttributeDefinition
for this object.- Returns:
- a value indicating whether a value of this
ExtendedAttribute
instance is read-only.
-
isErrorValue
public final boolean isErrorValue()
Gets whether calculation of extended attribute's value resulted in an error.
- Returns:
- whether calculation of extended attribute's value resulted in an error.
-
-