Class ExtendedAttributeDefinition
- java.lang.Object
-
- com.aspose.tasks.ExtendedAttributeDefinition
-
public class ExtendedAttributeDefinition extends Object
Represents an extended attribute definition associated with a project.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLookupValue(Value value)
Adds a value to the internal lookup list.int
compareTo(ExtendedAttributeDefinition o)
Compares this object with another instance of the @{code ExtendedAttributeDefinition} class.ExtendedAttribute
createExtendedAttribute()
Creates a new extended attribute with the field ID which equals to this object's field ID value.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.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.ExtendedAttribute
createExtendedAttribute(Value lookupValue)
Creates new extended attribute linked with specifiedValue
item.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.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.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.static ExtendedAttributeDefinition
createLookupResourceDefinition(int customFieldType, int fieldId, String alias)
Factory method which creates an extended attribute definition with lookup.static ExtendedAttributeDefinition
createLookupResourceDefinition(int fieldId, String alias)
Factory method which creates an extended attribute definition with lookup.static ExtendedAttributeDefinition
createLookupTaskDefinition(int customFieldType, int fieldId, String alias)
Factory method which creates an extended attribute definition with lookup.static ExtendedAttributeDefinition
createLookupTaskDefinition(int fieldId, String alias)
Factory method which creates an extended attribute definition with lookup.static ExtendedAttributeDefinition
createResourceDefinition(int customFieldType, int fieldId, String alias)
Factory method which creates a simple extended attribute definition, which Microsoft Project shows as "None".static ExtendedAttributeDefinition
createResourceDefinition(int fieldId, String alias)
Factory method which creates a simple extended attribute definition, which Microsoft Project shows as "None".static ExtendedAttributeDefinition
createTaskDefinition(int customFieldType, int fieldId, String alias)
Factory method which creates a simple extended attribute definition, which Microsoft Project shows as "None".static ExtendedAttributeDefinition
createTaskDefinition(int fieldId, String alias)
Factory method which creates a simple extended attribute definition, which Microsoft Project shows as "None".boolean
equals(Object obj)
Returns a flag indicating whether this instance is equal to the specified object.String
getAlias()
Gets the alias of a custom field.boolean
getAppendNewValues()
Gets a value indicating whether new values added to a project are automatically added to the list.boolean
getAutoRollDown()
Gets a value indicating whether an automatic roll down to assignments is enabled.int
getCalculationType()
Gets the calculation type.int
getCfType()
Gets the type of a custom field.String
getDefault()
Gets the default value in the list.String
getDefaultGuid()
Gets the Guid of the default lookup table entry.int
getElementType()
Gets the extended attribute is associated with a task, a resource or an assignment.String
getFieldId()
Gets corresponds to the project id of a custom field.String
getFieldName()
Gets the name of a custom field.String
getFormula()
Gets the formula that Microsoft Project uses to populate a custom task field.String
getGuid()
Gets the Guid of a custom field.String
getLookupUid()
Gets a Guid of the lookup table associated with a custom field.int
getMaxMultiValues()
Gets the maximum number of values you can set in a pick list.Project
getParentProject()
Gets the parent project for theExtendedAttributeDefinition
instance.String
getPhoneticsAlias()
Gets the phonetic pronunciation of the alias of a custom field.boolean
getRestrictValues()
Gets a value indicating whether the custom field values are restricted to values in theValueList
(getValueList()
/#setValueList(List
).) int
getRollupType()
Gets the way rollups are calculated.String
getSecondaryGuid()
Gets the secondary guid of extended attribute.String
getSecondaryPid()
Gets the secondary PID of a custom field.boolean
getUserDef()
Gets a value indicating whether a custom field is user defined.List<Value>
getValueList()
Gets the List<Value> ValueList.int
getValuelistSortOrder()
Gets the way value lists are sorted.int
hashCode()
Returns a hash code for the instance of theExtendedAttributeDefinition
class.void
removeLookupValue(Value value)
Removes a value from the internal lookup list.void
setAlias(String value)
Sets the alias of a custom field.void
setAppendNewValues(boolean value)
Sets a value indicating whether new values added to a project are automatically added to the list.void
setAutoRollDown(boolean value)
Sets a value indicating whether an automatic roll down to assignments is enabled.void
setCalculationType(int value)
Sets the calculation type.void
setDefault(String value)
Sets the default value in the list.void
setDefaultGuid(String value)
Sets the Guid of the default lookup table entry.void
setElementType(int value)
Sets the extended attribute is associated with a task, a resource or an assignment.void
setFieldId(String value)
Sets corresponds to the project id of a custom field.void
setFormula(String value)
Sets the formula that Microsoft Project uses to populate a custom task field.void
setGuid(String value)
Sets the Guid of a custom field.void
setMaxMultiValues(int value)
Sets the maximum number of values you can set in a pick list.void
setPhoneticsAlias(String value)
Sets the phonetic pronunciation of the alias of a custom field.void
setRestrictValues(boolean value)
Sets a value indicating whether the custom field values are restricted to values in theValueList
(getValueList()
/#setValueList(List
).) void
setRollupType(int value)
Sets the way rollups are calculated.void
setSecondaryGuid(String value)
Sets the secondary guid of extended attribute.void
setSecondaryPid(String value)
Sets the secondary PID of a custom field.void
setUserDef(boolean value)
Sets a value indicating whether a custom field is user defined.void
setValuelistSortOrder(int value)
Sets the way value lists are sorted.
-
-
-
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() {{ this.setId(1); this.setVal("Text value 1"); this.setDescription("Text value description 1"); }});
- Parameters:
value
- Value to add into lookup.
This method works only forExtendedAttributeDefinition
instances which haveCalculationType
(getCalculationType()
/setCalculationType(int)
) equals toCalculationType.Lookup
.
-
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 currentCfType
(getCfType()
/setCfType(int)
) 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 currentCfType
(getCfType()
/setCfType(int)
) 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 currentCfType
(getCfType()
/setCfType(int)
) 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 currentCfType
(getCfType()
/setCfType(int)
) 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 currentCfType
(getCfType()
/setCfType(int)
) 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); ExtendedAttribute extendedAttribute = taskTextAttr.createExtendedAttribute(value2);
- Parameters:
lookupValue
- The specifiedValue
item.
lookupValue
should be previously added to theExtendedAttributeDefinition
usingaddLookupValue(Value)
method.- Returns:
- returns created instance of the
ExtendedAttribute
class linked with specifiedValue
item.
-
createLookupResourceDefinition
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 toCalculationType.Lookup
and can be used in Resources only. You are required to specifyfieldId
andalias
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:
fieldId
- The specifiedExtendedAttributeResource
field ID.alias
- The specifiedString
alias.- Returns:
- Created instance of the
ExtendedAttributeDefinition
class with specifiedfieldId
andalias
.
-
createLookupResourceDefinition
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 toCalculationType.Lookup
and can be used in Resources only. You are required to specifycustomFieldType
,fieldId
andalias
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:
customFieldType
- The specifiedCustomFieldType
type.fieldId
- The specifiedExtendedAttributeResource
field ID.alias
- The specifiedString
alias.- Returns:
- Created instance of the
ExtendedAttributeDefinition
class with specifiedcustomFieldType
,fieldId
andalias
.
-
createLookupTaskDefinition
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 toCalculationType.Lookup
and can be used in Tasks only. You are required to specifyfieldId
andalias
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:
fieldId
- The specifiedExtendedAttributeTask
field ID.alias
- The specifiedString
alias.- Returns:
- Created instance of the
ExtendedAttributeDefinition
class with specifiedfieldId
andalias
.
-
createLookupTaskDefinition
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 toCalculationType.Lookup
and can be used in Tasks only. You are required to specifycustomFieldType
,fieldId
andalias
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:
customFieldType
- The specifiedCustomFieldType
type.fieldId
- The specifiedExtendedAttributeTask
field ID.alias
- The specifiedString
alias.- Returns:
- Created instance of the
ExtendedAttributeDefinition
class with specifiedcustomFieldType
,fieldId
andalias
.
-
createResourceDefinition
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 toCalculationType.None
and can be used in Resource only. You are required to specifycustomFieldType
,fieldId
andalias
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:
customFieldType
- The specifiedCustomFieldType
type.fieldId
- The specifiedExtendedAttributeResource
field ID.alias
- The specifiedString
alias.- Returns:
- Created instance of the
ExtendedAttributeDefinition
class with specifiedcustomFieldType
,fieldId
andalias
.
-
createResourceDefinition
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 toCalculationType.None
and can be used in Resource only. You are required to specifyfieldId
andalias
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:
fieldId
- The specifiedExtendedAttributeResource
field ID.alias
- The specifiedString
alias.- Returns:
- Created instance of the
ExtendedAttributeDefinition
class with specifiedfieldId
andalias
.
-
createTaskDefinition
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 toCalculationType.None
and can be used in Tasks only. You are required to specifycustomFieldType
,fieldId
andalias
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:
customFieldType
- The specifiedCustomFieldType
type.fieldId
- The specifiedExtendedAttributeTask
field ID.alias
- The specifiedString
alias.- Returns:
- Created instance of the
ExtendedAttributeDefinition
class with specifiedcustomFieldType
,fieldId
andalias
.
-
createTaskDefinition
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 toCalculationType.None
and can be used in Tasks only. You are required to specifyfieldId
andalias
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:
fieldId
- The specifiedExtendedAttributeTask
field ID.alias
- The specifiedString
alias.- Returns:
- Created instance of the
ExtendedAttributeDefinition
class with specifiedfieldId
andalias
.
-
equals
public boolean equals(Object obj)
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.
- 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.
-
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 specifyFieldId
(getFieldId()
/setFieldId(String)
) property.customFieldDefinition.setFieldId(Integer.toString(ExtendedAttributeTask.Number10));
Preferable way to setFieldId
(getFieldId()
/setFieldId(String)
) property is to createExtendedAttributeDefinition
using one of the dedicated factory methods likecreateTaskDefinition(int, String)
orcreateLookupTaskDefinition(int, int, String)
.- Returns:
- corresponds to the project id of a custom field.
-
setFieldId
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 specifyFieldId
(getFieldId()
/setFieldId(String)
) property.customFieldDefinition.setFieldId(Integer.toString(ExtendedAttributeTask.Number10));
Preferable way to setFieldId
(getFieldId()
/setFieldId(String)
) property is to createExtendedAttributeDefinition
using one of the dedicated factory methods likecreateTaskDefinition(int, String)
orcreateLookupTaskDefinition(int, int, String)
.- Parameters:
value
- 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:
- the name of a custom field.
-
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.
-
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.
-
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)
orcreateLookupResourceDefinition(int, int, String)
.- Returns:
- 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:
- 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.
Currently supported for Xml format only.- Parameters:
value
- 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:
- 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:
- 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
ValueList
(getValueList()
/#setValueList(List
).)
-
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.
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.
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<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:
- 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.
-
hashCode
public int hashCode()
Returns a hash code for the instance of the
ExtendedAttributeDefinition
class.
-
removeLookupValue
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:
value
- Value to remove from lookup.
This method works only forExtendedAttributeDefinition
instances which haveCalculationType
(getCalculationType()
/setCalculationType(int)
) equals toCalculationType.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.
-
-