ExtendedAttributeDefinition
Inheritance: java.lang.Object
public class ExtendedAttributeDefinition
Represents an extended attribute definition associated with a project.
Methods
Method | Description |
---|---|
addLookupValue(Value value) | Adds a value to the internal lookup list. |
compareTo(ExtendedAttributeDefinition o) | Compares this object with another instance of the @{code ExtendedAttributeDefinition} class. |
createExtendedAttribute() | Creates a new extended attribute with the field ID which equals to this object’s field ID value. |
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. |
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. |
createExtendedAttribute(Value lookupValue) | Creates new extended attribute linked with specified Value item. |
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. |
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. |
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. |
createLookupResourceDefinition(int customFieldType, int fieldId, String alias) | Factory method which creates an extended attribute definition with lookup. |
createLookupResourceDefinition(int fieldId, String alias) | Factory method which creates an extended attribute definition with lookup. |
createLookupTaskDefinition(int customFieldType, int fieldId, String alias) | Factory method which creates an extended attribute definition with lookup. |
createLookupTaskDefinition(int fieldId, String alias) | Factory method which creates an extended attribute definition with lookup. |
createResourceDefinition(int customFieldType, int fieldId, String alias) | Factory method which creates a simple extended attribute definition, which Microsoft Project shows as “None”. |
createResourceDefinition(int fieldId, String alias) | Factory method which creates a simple extended attribute definition, which Microsoft Project shows as “None”. |
createTaskDefinition(int customFieldType, int fieldId, String alias) | Factory method which creates a simple extended attribute definition, which Microsoft Project shows as “None”. |
createTaskDefinition(int fieldId, String alias) | Factory method which creates a simple extended attribute definition, which Microsoft Project shows as “None”. |
equals(Object obj) | Returns a flag indicating whether this instance is equal to the specified object. |
getAlias() | Gets the alias of a custom field. |
getAppendNewValues() | Gets a value indicating whether new values added to a project are automatically added to the list. |
getAutoRollDown() | Gets a value indicating whether an automatic roll down to assignments is enabled. |
getCalculationType() | Gets the type of calculation of the custom attribute’s value. |
getCfType() | Gets the type of a custom field. |
getDefault() | Gets the default value in the list. |
getDefaultGuid() | Gets the Guid of the default lookup table entry. |
getElementType() | Gets the extended attribute is associated with a task, a resource or an assignment. |
getFieldId() | Gets corresponds to the project id of a custom field. |
getFieldName() | Gets the name of a custom field. |
getFormula() | Gets the formula that Microsoft Project uses to populate a custom task field. |
getGraphicalIndicator() | Gets a graphical indicators info associated with the extended attribute. |
getGuid() | Gets the Guid of a custom field. |
getLookupUid() | Gets a Guid of the lookup table associated with a custom field. |
getMaxMultiValues() | Gets the maximum number of values you can set in a pick list. |
getParentProject() | Gets the parent project for the ExtendedAttributeDefinition instance. |
getPhoneticsAlias() | Gets the phonetic pronunciation of the alias of a custom field. |
getRestrictValues() | Gets a value indicating whether the custom field values are restricted to values in the ValueList (getValueList()/setValueList(List)). |
getRollupType() | Gets the way rollups are calculated. |
getSecondaryGuid() | Gets the secondary guid of extended attribute. |
getSecondaryPid() | Gets the secondary PID of a custom field. |
getSummaryRowsCalculationType() | Gets the type of calculation of the custom attribute’s value for summary rows. |
getUserDef() | Gets a value indicating whether a custom field is user defined. |
getValueList() | Gets the List<Value> ValueList. |
getValuelistSortOrder() | Gets the way value lists are sorted. |
hashCode() | Returns a hash code for the instance of the ExtendedAttributeDefinition class. |
removeLookupValue(Value value) | Removes a value from the internal lookup list. |
setAlias(String value) | Sets the alias of a custom field. |
setAppendNewValues(boolean value) | Sets a value indicating whether new values added to a project are automatically added to the list. |
setAutoRollDown(boolean value) | Sets a value indicating whether an automatic roll down to assignments is enabled. |
setCalculationType(int value) | Sets the type of calculation of the custom attribute’s value. |
setDefault(String value) | Sets the default value in the list. |
setDefaultGuid(String value) | Sets the Guid of the default lookup table entry. |
setElementType(int value) | Sets the extended attribute is associated with a task, a resource or an assignment. |
setFieldId(String value) | Sets corresponds to the project id of a custom field. |
setFormula(String value) | Sets the formula that Microsoft Project uses to populate a custom task field. |
setGraphicalIndicator(GraphicalIndicatorsInfo value) | Sets a graphical indicators info associated with the extended attribute. |
setGuid(String value) | Sets the Guid of a custom field. |
setMaxMultiValues(int value) | Sets the maximum number of values you can set in a pick list. |
setPhoneticsAlias(String value) | Sets the phonetic pronunciation of the alias of a custom field. |
setRestrictValues(boolean value) | Sets a value indicating whether the custom field values are restricted to values in the ValueList (getValueList()/ setValueList(List)). |
setRollupType(int value) | Sets the way rollups are calculated. |
setSecondaryGuid(String value) | Sets the secondary guid of extended attribute. |
setSecondaryPid(String value) | Sets the secondary PID of a custom field. |
setSummaryRowsCalculationType(int value) | Sets the type of calculation of the custom attribute’s value for summary rows. |
setUserDef(boolean value) | Sets a value indicating whether a custom field is user defined. |
setValuelistSortOrder(int value) | Sets the way value lists are sorted. |
addLookupValue(Value value)
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() {{
this.setId(1);
this.setVal("Text value 1");
this.setDescription("Text value description 1");
}});
Parameters:
Parameter | Type | Description |
---|---|---|
value | Value | Value to add into lookup. |
This method works only for ExtendedAttributeDefinition instances which have CalculationType
(getCalculationType()/ setCalculationType(int)) equals to CalculationType.Lookup. |
compareTo(ExtendedAttributeDefinition o)
public int compareTo(ExtendedAttributeDefinition o)
Compares this object with another instance of the @{code ExtendedAttributeDefinition} class.
Parameters:
Parameter | Type | Description |
---|---|---|
o | ExtendedAttributeDefinition | the object to be compared. |
Returns: int - 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: ExtendedAttribute - returns created instance of the ExtendedAttribute class with the fieldID which equals to this object’s fieldID value.
createExtendedAttribute(boolean flagValue)
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:
Parameter | Type | Description |
---|---|---|
flagValue | boolean | The specified flag value. |
Returns: ExtendedAttribute - returns created instance of the ExtendedAttribute class with the fieldID which equals to this object’s fieldID value.
createExtendedAttribute(Duration durationValue)
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:
Parameter | Type | Description |
---|---|---|
durationValue | Duration | The specified duration value. |
Returns: ExtendedAttribute - returns created instance of the ExtendedAttribute class with the fieldID which equals to this object’s fieldID value.
createExtendedAttribute(Value lookupValue)
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);
ExtendedAttribute extendedAttribute = taskTextAttr.createExtendedAttribute(value2);
Parameters:
Parameter | Type | Description |
---|---|---|
lookupValue | Value | The specified Value item. |
lookupValue
should be previously added to the ExtendedAttributeDefinition using addLookupValue(Value) method. |
Returns: ExtendedAttribute - returns created instance of the ExtendedAttribute class linked with specified Value item.
createExtendedAttribute(String textValue)
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:
Parameter | Type | Description |
---|---|---|
textValue | java.lang.String | The specified text value. |
Returns: ExtendedAttribute - returns created instance of the ExtendedAttribute class with the fieldID which equals to this object’s fieldID value.
createExtendedAttribute(BigDecimal numericValue)
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:
Parameter | Type | Description |
---|---|---|
numericValue | java.math.BigDecimal | The specified numeric value. |
Returns: ExtendedAttribute - returns created instance of the ExtendedAttribute class with the fieldID which equals to this object’s fieldID value.
createExtendedAttribute(Date dateTimeValue)
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:
Parameter | Type | Description |
---|---|---|
dateTimeValue | java.util.Date | The specified datetime value. |
Returns: ExtendedAttribute - returns created instance of the ExtendedAttribute class with the fieldID which equals to this object’s fieldID value.
createLookupResourceDefinition(int customFieldType, int fieldId, String alias)
public static ExtendedAttributeDefinition createLookupResourceDefinition(int customFieldType, int fieldId, String alias)
Factory method which creates an extended attribute definition with lookup. It has CalculationType
(getCalculationType()/ setCalculationType(int)) equals to CalculationType.Lookup and can be used in Resources only. You are required to specify customFieldType
, fieldId
and alias
when call this method.
Use this example to create a custom field definition for a resource with lookup and then fill it with text values:
ExtendedAttributeDefinition resourceTextAttr = ExtendedAttributeDefinition.createLookupResourceDefinition(ExtendedAttributeResource.Text27, "My custom field");
resourceTextAttr.addLookupValue(new Value() {{
this.setId(1);
this.setVal("Text value 1");
this.setDescription("Text value description 1");
}});
resourceTextAttr.addLookupValue(new Value() {{
this.setId(2);
this.setVal("Text value 2");
this.setDescription("Text value description 2");
}});
project.getExtendedAttributes().add(resourceTextAttr);
Parameters:
Parameter | Type | Description |
---|---|---|
customFieldType | int | The specified CustomFieldType type. |
fieldId | int | The specified ExtendedAttributeResource field ID. |
alias | java.lang.String | The specified String alias. |
Returns:
ExtendedAttributeDefinition - Created instance of the ExtendedAttributeDefinition class with specified customFieldType
, fieldId
and alias
.
createLookupResourceDefinition(int fieldId, String alias)
public static ExtendedAttributeDefinition createLookupResourceDefinition(int fieldId, String alias)
Factory method which creates an extended attribute definition with lookup. It has CalculationType
(getCalculationType()/ setCalculationType(int)) equals to CalculationType.Lookup and can be used in Resources only. You are required to specify fieldId
and alias
when call this method. The field type is inferred from field id.
Use this example to create a custom field definition for a resource with lookup and then fill it with text values:
ExtendedAttributeDefinition resourceTextAttr = ExtendedAttributeDefinition.createLookupResourceDefinition(ExtendedAttributeResource.Text27, "My custom field");
resourceTextAttr.addLookupValue(new Value() {{
this.setId(1);
this.setVal("Text value 1");
this.setDescription("Text value description 1");
}});
resourceTextAttr.addLookupValue(new Value() {{
this.setId(2);
this.setVal("Text value 2");
this.setDescription("Text value description 2");
}});
project.getExtendedAttributes().add(resourceTextAttr);
Parameters:
Parameter | Type | Description |
---|---|---|
fieldId | int | The specified ExtendedAttributeResource field ID. |
alias | java.lang.String | The specified String alias. |
Returns:
ExtendedAttributeDefinition - Created instance of the ExtendedAttributeDefinition class with specified fieldId
and alias
.
createLookupTaskDefinition(int customFieldType, int fieldId, String alias)
public static ExtendedAttributeDefinition createLookupTaskDefinition(int customFieldType, int fieldId, String alias)
Factory method which creates an extended attribute definition with lookup. It has CalculationType
(getCalculationType()/ setCalculationType(int)) equals to CalculationType.Lookup and can be used in Tasks only. You are required to specify customFieldType
, fieldId
and alias
when call this method.
Use this example to create a custom field definition for a task with lookup and then fill it with text values:
ExtendedAttributeDefinition taskTextAttr = ExtendedAttributeDefinition.createLookupTaskDefinition(CustomFieldType.Text, ExtendedAttributeResource.Text27, "My custom field");
taskTextAttr.addLookupValue(new Value() {{
this.setId(1);
this.setVal("Text value 1");
this.setDescription("Text value description 1");
}});
taskTextAttr.addLookupValue(new Value() {{
this.setId(2);
this.setVal("Text value 2");
this.setDescription("Text value description 2");
}});
project.getExtendedAttributes().add(taskTextAttr);
Parameters:
Parameter | Type | Description |
---|---|---|
customFieldType | int | The specified CustomFieldType type. |
fieldId | int | The specified ExtendedAttributeTask field ID. |
alias | java.lang.String | The specified String alias. |
Returns:
ExtendedAttributeDefinition - Created instance of the ExtendedAttributeDefinition class with specified customFieldType
, fieldId
and alias
.
createLookupTaskDefinition(int fieldId, String alias)
public static ExtendedAttributeDefinition createLookupTaskDefinition(int fieldId, String alias)
Factory method which creates an extended attribute definition with lookup. It has CalculationType
(getCalculationType()/ setCalculationType(int)) equals to CalculationType.Lookup and can be used in Tasks only. You are required to specify fieldId
and alias
when call this method. The field type is inferred from field id.
Use this example to create a custom field definition for a task with lookup and then fill it with text values:
ExtendedAttributeDefinition taskTextAttr = ExtendedAttributeDefinition.createLookupTaskDefinition(CustomFieldType.Text, ExtendedAttributeResource.Text27, "My custom field");
taskTextAttr.addLookupValue(new Value() {{
this.setId(1);
this.setVal("Text value 1");
this.setDescription("Text value description 1");
}});
taskTextAttr.addLookupValue(new Value() {{
this.setId(2);
this.setVal("Text value 2");
this.setDescription("Text value description 2");
}});
project.getExtendedAttributes().add(taskTextAttr);
Parameters:
Parameter | Type | Description |
---|---|---|
fieldId | int | The specified ExtendedAttributeTask field ID. |
alias | java.lang.String | The specified String alias. |
Returns:
ExtendedAttributeDefinition - Created instance of the ExtendedAttributeDefinition class with specified fieldId
and alias
.
createResourceDefinition(int customFieldType, int fieldId, String alias)
public static ExtendedAttributeDefinition createResourceDefinition(int customFieldType, int fieldId, String alias)
Factory method which creates a simple extended attribute definition, which Microsoft Project shows as “None”. It has CalculationType
(getCalculationType()/ setCalculationType(int)) equals to CalculationType.None and can be used in Resource only. You are required to specify customFieldType
, fieldId
and alias
when call this method.
Use this example to create a custom text field definition:
ExtendedAttributeDefinition resourceTextAttr = ExtendedAttributeDefinition.createResourceDefinition(CustomFieldType.Text, ExtendedAttributeResource.Text27, "My custom field");
project.getExtendedAttributes().add(resourceTextAttr);
Parameters:
Parameter | Type | Description |
---|---|---|
customFieldType | int | The specified CustomFieldType type. |
fieldId | int | The specified ExtendedAttributeResource field ID. |
alias | java.lang.String | The specified String alias. |
Returns:
ExtendedAttributeDefinition - Created instance of the ExtendedAttributeDefinition class with specified customFieldType
, fieldId
and alias
.
createResourceDefinition(int fieldId, String alias)
public static ExtendedAttributeDefinition createResourceDefinition(int fieldId, String alias)
Factory method which creates a simple extended attribute definition, which Microsoft Project shows as “None”. It has CalculationType
(getCalculationType()/ setCalculationType(int)) equals to CalculationType.None and can be used in Resource only. You are required to specify fieldId
and alias
when call this method. The field type is inferred from field id.
Use this example to create a custom text field definition:
ExtendedAttributeDefinition resourceTextAttr = ExtendedAttributeDefinition.createResourceDefinition(ExtendedAttributeResource.Text27, "My custom field");
project.getExtendedAttributes().add(resourceTextAttr);
Parameters:
Parameter | Type | Description |
---|---|---|
fieldId | int | The specified ExtendedAttributeResource field ID. |
alias | java.lang.String | The specified String alias. |
Returns:
ExtendedAttributeDefinition - Created instance of the ExtendedAttributeDefinition class with specified fieldId
and alias
.
createTaskDefinition(int customFieldType, int fieldId, String alias)
public static ExtendedAttributeDefinition createTaskDefinition(int customFieldType, int fieldId, String alias)
Factory method which creates a simple extended attribute definition, which Microsoft Project shows as “None”. It has CalculationType
(getCalculationType()/ setCalculationType(int)) equals to CalculationType.None and can be used in Tasks only. You are required to specify customFieldType
, fieldId
and alias
when calling this method.
Use this example to create a custom text field definition:
ExtendedAttributeDefinition taskTextAttr = ExtendedAttributeDefinition.createTaskDefinition(CustomFieldType.Text, ExtendedAttributeTask.Text27, "My custom field");
project.getExtendedAttributes().add(taskTextAttr);
Parameters:
Parameter | Type | Description |
---|---|---|
customFieldType | int | The specified CustomFieldType type. |
fieldId | int | The specified ExtendedAttributeTask field ID. |
alias | java.lang.String | The specified String alias. |
Returns:
ExtendedAttributeDefinition - Created instance of the ExtendedAttributeDefinition class with specified customFieldType
, fieldId
and alias
.
createTaskDefinition(int fieldId, String alias)
public static ExtendedAttributeDefinition createTaskDefinition(int fieldId, String alias)
Factory method which creates a simple extended attribute definition, which Microsoft Project shows as “None”. It has CalculationType
(getCalculationType()/ setCalculationType(int)) equals to CalculationType.None and can be used in Tasks only. You are required to specify fieldId
and alias
when calling this method. The field type is inferred from field id.
Use this example to create a custom text field definition:
ExtendedAttributeDefinition taskTextAttr = ExtendedAttributeDefinition.createTaskDefinition(ExtendedAttributeTask.Text27, "My custom field");
project.getExtendedAttributes().add(taskTextAttr);
Parameters:
Parameter | Type | Description |
---|---|---|
fieldId | int | The specified ExtendedAttributeTask field ID. |
alias | java.lang.String | The specified String alias. |
Returns:
ExtendedAttributeDefinition - Created instance of the ExtendedAttributeDefinition class with specified fieldId
and alias
.
equals(Object obj)
public boolean equals(Object obj)
Returns a flag indicating whether this instance is equal to the specified object.
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object | the specified object to compare to this instance. |
Returns: boolean - 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: java.lang.String - 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: boolean - 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.
Returns: boolean - a value indicating whether an automatic roll down to assignments is enabled.
getCalculationType()
public final int getCalculationType()
Gets the type of calculation of the custom attribute’s value.
Returns: int - the type of calculation of the custom attribute’s value.
getCfType()
public final int getCfType()
Gets the type of a custom field.
Returns: int - 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: java.lang.String - the default value in the list.
getDefaultGuid()
public final String getDefaultGuid()
Gets the Guid of the default lookup table entry.
Returns: java.lang.String - 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.
Returns: int - the extended attribute is associated with a task, a resource or an assignment.
getFieldId()
public final String getFieldId()
Gets corresponds to the project id of a custom field. Use string representation of a constant from ExtendedAttributeTask class to specify FieldId
(getFieldId()/ setFieldId(String)) property.
customFieldDefinition.setFieldId(Integer.toString(ExtendedAttributeTask.Number10));
Preferable way to set FieldId
(getFieldId()/ setFieldId(String)) property is to create ExtendedAttributeDefinition using one of the dedicated factory methods like createTaskDefinition(int, String) or createLookupTaskDefinition(int, int, String).
Returns: java.lang.String - corresponds to the project id of a custom field.
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: java.lang.String - 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: java.lang.String - the formula that Microsoft Project uses to populate a custom task field.
getGraphicalIndicator()
public final GraphicalIndicatorsInfo getGraphicalIndicator()
Gets a graphical indicators info associated with the extended attribute. Applicable to MPP format.
Returns: GraphicalIndicatorsInfo - a graphical indicators info associated with the extended attribute.
getGuid()
public final String getGuid()
Gets the Guid of a custom field.
Currently supported for Xml format only.
Returns: java.lang.String - the Guid of a custom field.
getLookupUid()
public final String getLookupUid()
Gets a Guid of the lookup table associated with a custom field.
In order to create a custom field with lookup, use one of the factory methods: createLookupTaskDefinition(int, int, String) or createLookupResourceDefinition(int, int, String).
Returns: java.lang.String - a Guid of the lookup table associated with a custom field.
getMaxMultiValues()
public final int getMaxMultiValues()
Gets the maximum number of values you can set in a pick list.
Currently supported for Xml format only.
Returns: int - the maximum number of values you can set in a pick list.
getParentProject()
public final Project getParentProject()
Gets the parent project for the ExtendedAttributeDefinition instance.
Returns: Project - the parent project for the ExtendedAttributeDefinition instance.
getPhoneticsAlias()
public final String getPhoneticsAlias()
Gets the phonetic pronunciation of the alias of a custom field.
Currently supported for Xml format only.
Returns: java.lang.String - 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:
boolean - a value indicating whether the custom field values are restricted to values in the ValueList
(getValueList()/ setValueList(List)).
getRollupType()
public final int getRollupType()
Gets the way rollups are calculated.
Writing currently supported for Xml format only.
Returns: int - 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: java.lang.String - the secondary guid of extended attribute.
getSecondaryPid()
public final String getSecondaryPid()
Gets the secondary PID of a custom field.
Returns: java.lang.String - the secondary PID of a custom field.
getSummaryRowsCalculationType()
public final int getSummaryRowsCalculationType()
Gets the type of calculation of the custom attribute’s value for summary rows.
Returns: int - the type of calculation of the custom attribute’s value for summary rows.
getUserDef()
public final boolean getUserDef()
Gets a value indicating whether a custom field is user defined.
Currently supported for Xml format only.
Returns: boolean - 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: java.util.List<com.aspose.tasks.Value> - the List<Value> ValueList.
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: int - the way value lists are sorted.
hashCode()
public int hashCode()
Returns a hash code for the instance of the ExtendedAttributeDefinition class.
Returns: int - a hash code for this object.
removeLookupValue(Value value)
public final void removeLookupValue(Value value)
Removes a value from the internal lookup list. This is a preferable way for manipulations with the ValueList
(getValueList()/ setValueList(List)).
Parameters:
Parameter | Type | Description |
---|---|---|
value | Value | Value to remove from lookup. |
This method works only for ExtendedAttributeDefinition instances which have CalculationType
(getCalculationType/ setCalculationType(int)) equals to CalculationType.Lookup. |
setAlias(String value)
public final void setAlias(String value)
Sets the alias of a custom field.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | the alias of a custom field. |
setAppendNewValues(boolean value)
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:
Parameter | Type | Description |
---|---|---|
value | boolean | a value indicating whether new values added to a project are automatically added to the list. |
setAutoRollDown(boolean value)
public final void setAutoRollDown(boolean value)
Sets a value indicating whether an automatic roll down to assignments is enabled.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | a value indicating whether an automatic roll down to assignments is enabled. |
setCalculationType(int value)
public final void setCalculationType(int value)
Sets the type of calculation of the custom attribute’s value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | the type of calculation of the custom attribute’s value. |
setDefault(String value)
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:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | the default value in the list. |
setDefaultGuid(String value)
public final void setDefaultGuid(String value)
Sets the Guid of the default lookup table entry.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | the Guid of the default lookup table entry. |
setElementType(int value)
public final void setElementType(int value)
Sets the extended attribute is associated with a task, a resource or an assignment.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | the extended attribute is associated with a task, a resource or an assignment. |
setFieldId(String value)
public final void setFieldId(String value)
Sets corresponds to the project id of a custom field. Use string representation of a constant from ExtendedAttributeTask class to specify FieldId
(getFieldId()/ setFieldId(String)) property.
customFieldDefinition.setFieldId(Integer.toString(ExtendedAttributeTask.Number10));
Preferable way to set FieldId
(getFieldId()/ setFieldId(String)) property is to create ExtendedAttributeDefinition using one of the dedicated factory methods like createTaskDefinition(int, String) or createLookupTaskDefinition(int, int, String).
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | corresponds to the project id of a custom field. |
setFormula(String value)
public final void setFormula(String value)
Sets the formula that Microsoft Project uses to populate a custom task field.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | the formula that Microsoft Project uses to populate a custom task field. |
setGraphicalIndicator(GraphicalIndicatorsInfo value)
public final void setGraphicalIndicator(GraphicalIndicatorsInfo value)
Sets a graphical indicators info associated with the extended attribute. Applicable to MPP format.
Parameters:
Parameter | Type | Description |
---|---|---|
value | GraphicalIndicatorsInfo | a graphical indicators info associated with the extended attribute. |
setGuid(String value)
public final void setGuid(String value)
Sets the Guid of a custom field.
Currently supported for Xml format only.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | the Guid of a custom field. |
setMaxMultiValues(int value)
public final void setMaxMultiValues(int value)
Sets the maximum number of values you can set in a pick list.
Currently supported for Xml format only.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | the maximum number of values you can set in a pick list. |
setPhoneticsAlias(String value)
public final void setPhoneticsAlias(String value)
Sets the phonetic pronunciation of the alias of a custom field.
Currently supported for Xml format only.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | the phonetic pronunciation of the alias of a custom field. |
setRestrictValues(boolean value)
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:
Parameter | Type | Description |
---|---|---|
value | boolean | a value indicating whether the custom field values are restricted to values in the |
setRollupType(int value)
public final void setRollupType(int value)
Sets the way rollups are calculated.
Writing currently supported for Xml format only.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | the way rollups are calculated. |
setSecondaryGuid(String value)
public final void setSecondaryGuid(String value)
Sets the secondary guid of extended attribute.
This is new for MS Project 2010 property.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | the secondary guid of extended attribute. |
setSecondaryPid(String value)
public final void setSecondaryPid(String value)
Sets the secondary PID of a custom field.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | the secondary PID of a custom field. |
setSummaryRowsCalculationType(int value)
public final void setSummaryRowsCalculationType(int value)
Sets the type of calculation of the custom attribute’s value for summary rows.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | the type of calculation of the custom attribute’s value for summary rows. |
setUserDef(boolean value)
public final void setUserDef(boolean value)
Sets a value indicating whether a custom field is user defined.
Currently supported for Xml format only.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | a value indicating whether a custom field is user defined. |
setValuelistSortOrder(int value)
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:
Parameter | Type | Description |
---|---|---|
value | int | the way value lists are sorted. |