public class ExtendedAttributeDefinition extends Object
Represents an extended attribute definition associated with a project.
Modifier and Type | Method and 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(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(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(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.
|
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(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(Value lookupValue)
Creates new extended attribute linked with specified
Value item. |
static ExtendedAttributeDefinition |
createLookupDefinition()
Factory method which creates an extended attribute definition with lookup.
|
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 the
ExtendedAttributeDefinition 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 the
ValueList (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 the
ExtendedAttributeDefinition 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 the
ValueList (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.
|
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" });
value
- Value to add into lookup.
ExtendedAttributeDefinition
instances
which have CalculationType
(getCalculationType()
/setCalculationType(int)
) equals
to CalculationType.Lookup
.
public int compareTo(ExtendedAttributeDefinition o)
o
- the object to be compared.public final ExtendedAttribute createExtendedAttribute()
Creates a new extended attribute with the field ID which equals to this object's field ID value.
ExtendedAttribute
class with the fieldID which equals to this
object's fieldID value.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.
textValue
- The specified text value.ExtendedAttribute
class with the fieldID which equals to this
object's fieldID value.com.aspose.ms.System.InvalidOperationException
- If current CfType
(getCfType()
/setCfType(int)
)
is not 'Text'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.
numericValue
- The specified numeric value.ExtendedAttribute
class with the fieldID which equals to this
object's fieldID value.com.aspose.ms.System.InvalidOperationException
- If current CfType
(getCfType()
/setCfType(int)
)
is not 'Number' or 'Cost'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.
dateTimeValue
- The specified datetime value.ExtendedAttribute
class with the fieldID which equals to this
object's fieldID value.com.aspose.ms.System.InvalidOperationException
- If current CfType
(getCfType()
/setCfType(int)
)
is not 'Date', 'Start' or 'Finish'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.
durationValue
- The specified duration value.ExtendedAttribute
class with the fieldID which equals to this
object's fieldID value.com.aspose.ms.System.InvalidOperationException
- If current CfType
(getCfType()
/setCfType(int)
)
is not 'Duration'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.
flagValue
- The specified flag value.ExtendedAttribute
class with the fieldID which equals to this
object's fieldID value.com.aspose.ms.System.InvalidOperationException
- If current CfType
(getCfType()
/setCfType(int)
)
is not 'Flag'public final ExtendedAttribute createExtendedAttribute(Value lookupValue)
Creates new extended attribute linked with specified Value
item.
Use this code to create newExtendedAttribute
using specific value:taskTextAttr.addLookupValue(value1); taskTextAttr.addLookupValue(value2); var extendedAttribute = taskTextAttr.createExtendedAttribute(value2);
lookupValue
- The specified Value
item.
lookupValue
should be previously added to the ExtendedAttributeDefinition
using addLookupValue(Value)
method.
ExtendedAttribute
class linked with specified Value
item.public static ExtendedAttributeDefinition createLookupDefinition()
Factory method which creates an extended attribute definition with lookup. It has CalculationType
(getCalculationType()
/setCalculationType(int)
) equals to CalculationType.Lookup
.
After creation you should manually specify the value for CfType
(getCfType()
/setCfType(int)
), FieldId
(getFieldId()
/setFieldId(String)
) and Alias
(getAlias()
/setAlias(String)
).
ExtendedAttributeDefinition
class with lookup.
createLookupTaskDefinition(int, int, String)
or createLookupResourceDefinition(int, int, String)
.
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.
fieldId
- The specified ExtendedAttributeResource
field ID.alias
- The specified String
alias.ExtendedAttributeDefinition
class with specified fieldId
and
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.
customFieldType
- The specified CustomFieldType
type.fieldId
- The specified ExtendedAttributeResource
field ID.alias
- The specified String
alias.ExtendedAttributeDefinition
class with specified customFieldType
,
fieldId
and 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.
fieldId
- The specified ExtendedAttributeTask
field ID.alias
- The specified String
alias.ExtendedAttributeDefinition
class with specified fieldId
and
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.
customFieldType
- The specified CustomFieldType
type.fieldId
- The specified ExtendedAttributeTask
field ID.alias
- The specified String
alias.ExtendedAttributeDefinition
class with specified customFieldType
,
fieldId
and 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.
customFieldType
- The specified CustomFieldType
type.fieldId
- The specified ExtendedAttributeResource
field ID.alias
- The specified String
alias.ExtendedAttributeDefinition
class with specified customFieldType
,
fieldId
and 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.
fieldId
- The specified ExtendedAttributeResource
field ID.alias
- The specified String
alias.ExtendedAttributeDefinition
class with specified fieldId
and
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.
customFieldType
- The specified CustomFieldType
type.fieldId
- The specified ExtendedAttributeTask
field ID.alias
- The specified String
alias.ExtendedAttributeDefinition
class with specified customFieldType
,
fieldId
and 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.
fieldId
- The specified ExtendedAttributeTask
field ID.alias
- The specified String
alias.ExtendedAttributeDefinition
class with specified fieldId
and
alias
.public boolean equals(Object obj)
Returns a flag indicating whether this instance is equal to the specified object.
public final String getAlias()
Gets the alias of a custom field.
public final void setAlias(String value)
Sets the alias of a custom field.
value
- the alias of a custom field.public final boolean getAppendNewValues()
Gets a value indicating whether new values added to a project are automatically added to the list.
public final void setAppendNewValues(boolean value)
Sets a value indicating whether new values added to a project are automatically added to the list.
value
- a value indicating whether new values added to a project are automatically added to the
list.public final boolean getAutoRollDown()
Gets a value indicating whether an automatic roll down to assignments is enabled.
public final void setAutoRollDown(boolean value)
Sets a value indicating whether an automatic roll down to assignments is enabled.
value
- a value indicating whether an automatic roll down to assignments is enabled.public final int getCalculationType()
Gets the calculation type.
public final void setCalculationType(int value)
Sets the calculation type.
value
- the calculation type.public final int getCfType()
Gets the type of a custom field.
public final String getDefault()
Gets the default value in the list.
public final void setDefault(String value)
Sets the default value in the list.
value
- the default value in the list.public final String getDefaultGuid()
Gets the Guid of the default lookup table entry.
public final void setDefaultGuid(String value)
Sets the Guid of the default lookup table entry.
value
- the Guid of the default lookup table entry.public final int getElementType()
Gets the extended attribute is associated with a task, a resource or an assignment.
public final void setElementType(int value)
Sets the extended attribute is associated with a task, a resource or an assignment.
value
- the extended attribute is associated
with a task, a resource or an assignment.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.
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)
.
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.
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)
.
value
- corresponds to the project id of a custom field.public final String getFieldName()
Gets the name of a custom field.
public final void setFormula(String value)
Sets the formula that Microsoft Project uses to populate a custom task field.
value
- the formula that Microsoft Project uses to populate a custom task field.public final String getFormula()
Gets the formula that Microsoft Project uses to populate a custom task field.
public final String getGuid()
Gets the Guid of a custom field.
public final void setGuid(String value)
Sets the Guid of a custom field.
value
- the Guid of a custom field.public final String getLookupUid()
Gets a Guid of the lookup table associated with a custom field.
LookupUid
(getLookupUid()
/setLookupUid(String)
) directly,
but instead use one of the factory methods: createLookupTaskDefinition(int, int, String)
or createLookupResourceDefinition(int, int, String)
.
public final int getMaxMultiValues()
Gets the maximum number of values you can set in a pick list.
Read/write int
.
public final void setMaxMultiValues(int value)
Sets the maximum number of values you can set in a pick list.
Read/write int
.
value
- the maximum number of values you can set in a pick list.public final Project getParentProject()
Gets the parent project for the ExtendedAttributeDefinition
instance.
ExtendedAttributeDefinition
instance.public final String getPhoneticsAlias()
Gets the phonetic pronunciation of the alias of a custom field.
public final void setPhoneticsAlias(String value)
Sets the phonetic pronunciation of the alias of a custom field.
value
- the phonetic pronunciation of the alias of a custom field.public final boolean getRestrictValues()
Gets a value indicating whether the custom field values are restricted to values in the ValueList
(getValueList()
/#setValueList(List
).
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
).
value
- a value indicating whether the custom field values are restricted to values in thepublic final int getRollupType()
Gets the way rollups are calculated.
public final void setRollupType(int value)
Sets the way rollups are calculated.
value
- the way rollups are calculated.public final String getSecondaryGuid()
Gets the secondary guid of extended attribute.
public final void setSecondaryGuid(String value)
Sets the secondary guid of extended attribute.
value
- the secondary guid of extended attribute.public final String getSecondaryPid()
Gets the secondary PID of a custom field.
public final void setSecondaryPid(String value)
Sets the secondary PID of a custom field.
value
- the secondary PID of a custom field.public final boolean getUserDef()
Gets a value indicating whether a custom field is user defined.
Read/write boolean
.
public final void setUserDef(boolean value)
Sets a value indicating whether a custom field is user defined.
Read/write boolean
.
value
- a value indicating whether a custom field is user defined.public final List<Value> getValueList()
Gets the List<Value> ValueList.
public final int getValuelistSortOrder()
Gets the way value lists are sorted. Values are: 0=Descending, 1=Ascending.
public final void setValuelistSortOrder(int value)
Sets the way value lists are sorted. Values are: 0=Descending, 1=Ascending.
value
- the way value lists are sorted.public int hashCode()
Returns a hash code for the instance of the ExtendedAttributeDefinition
class.
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
).
value
- Value to remove from lookup.
ExtendedAttributeDefinition
instances
which have CalculationType
(getCalculationType()
/setCalculationType(int)
) equals
to CalculationType.Lookup
.