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 ExtendedAttributeDefinitiongetAttributeDefinition()Gets the attribute definition.DategetDateValue()Gets a value for attributes with date types (Date, Start, Finish).DurationgetDurationValue()Gets value for attributes with 'Duration' type.StringgetFieldId()Gets the id of a field.booleangetFlagValue()Gets a value indicating whether a flag is set for an attribute with 'Flag' type.BigDecimalgetNumericValue()Gets a value for attributes with numeric types (Cost, Number).StringgetTextValue()Gets a value for attributes with 'Text' type.StringgetValueGuid()Gets the guid of a lookup value.booleangetValueReadOnly()Gets a value indicating whether a value of thisExtendedAttributeinstance is read-only.voidsetDateValue(Date value)Sets a value for attributes with date types (Date, Start, Finish).voidsetDurationValue(Duration value)Sets value for attributes with 'Duration' type.voidsetFlagValue(boolean value)Sets a value indicating whether a flag is set for an attribute with 'Flag' type.voidsetNumericValue(BigDecimal value)Sets a value for attributes with numeric types (Cost, Number).voidsetTextValue(String value)Sets a value for attributes with 'Text' type.StringtoString()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 aDurationinstance.
-
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 aDurationinstance.
-
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 theExtendedAttributeinstance is read-only.ExtendedAttributeDefinitionfor this object.- Returns:
- a value indicating whether a value of this
ExtendedAttributeinstance is read-only.
-
-