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(OutlineValue outlineValue)
Deprecated.
If you want to create an attribute with the specific value use ExtendedAttributeDefinition.createExtendedAttribute(Value) instead.
|
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()
Returns the alias of a custom field.
|
boolean |
getAppendNewValues()
Determines whether new values added to a project are automatically added to the list.
|
boolean |
getAutoRollDown()
Determines whether an automatic rolldown to assignments is enabled.
|
int |
getCalculationType()
Determines whether rollups are calculated for a task and group summary rows.
|
int |
getCfType()
Returns the type of a custom field.
|
String |
getDefault()
Returns the default value in the list.
|
String |
getDefaultGuid()
Returns the Guid of the default lookup table entry.
|
int |
getElementType()
Returns a value which determines whether the extended attribute is associated
with a task, a resource, or an assignment.
|
String |
getFieldId()
Corresponds to the Pid of a custom field.
|
String |
getFieldName()
Returns the name of a custom field.
|
String |
getFormula()
Returns the formula that Microsoft Project uses to populate a custom task field.
|
String |
getGuid()
Returns the Guid of a custom field.
|
String |
getLookupUid()
Returns the Guid of the lookup table associated with a custom field.
|
int |
getMaxMultiValues()
Returns the maximum number of values you can setInternal in a picklist.
|
Project |
getParentProject()
Returns a parent project for the
ExtendedAttributeDefinition instance. |
String |
getPhoneticsAlias()
Returns the phonetic pronunciation of the alias of a custom field.
|
boolean |
getRestrictValues()
Determines whether only values in the list are allowed in a file.
|
int |
getRollupType()
Returns the way rollups are calculated.
|
String |
getSecondaryGuid()
Returns secondary guid of extended attribute.
|
String |
getSecondaryPid()
Returns the secondary Pid of a custom field.
|
boolean |
getUserDef()
Determines whether a custom field is user defined.
|
List<Value> |
getValueList()
Returns a list of values for this object.
|
int |
getValuelistSortOrder()
Returns the way value lists are sorted.
|
int |
hashCode()
Returns a hash code for this ExtendedAttributeDefinition.
|
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)
Determines whether new values added to a project are automatically added to the list.
|
void |
setAutoRollDown(boolean value)
Determines whether an automatic rolldown to assignments is enabled.
|
void |
setCalculationType(int value)
Determines whether rollups are calculated for a task and group summary rows.
|
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 a value which determines whether the extended attribute is associated with a task, a resource, or an assignment.
|
void |
setFieldId(String value)
Corresponds to the Pid 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 setInternal in a picklist.
|
void |
setPhoneticsAlias(String value)
Sets the phonetic pronunciation of the alias of a custom field.
|
void |
setRestrictValues(boolean value)
Determines whether only values in the list are allowed in a file.
|
void |
setRollupType(int value)
Sets the way rollups are calculated.
|
void |
setSecondaryGuid(String value)
Sets secondary guid of extended attribute.
|
void |
setSecondaryPid(String value)
Sets the secondary Pid of a custom field.
|
void |
setUserDef(boolean value)
Determines whether a custom field is user defined.
|
void |
setValuelistSortOrder(int value)
Sets the way value lists are sorted.
|
public final void addLookupValue(Value value)
ValueList
.
This method works only for ExtendedAttributeDefinition
instances
which have CalculationType
equals to Tasks.CalculationType.Lookup
.value
- The specified Value
item.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 attribute's CfType 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 attribute's CfType 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 attribute's CfType 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 attribute's CfType 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 attribute's CfType is not 'Flag'@Deprecated public final ExtendedAttribute createExtendedAttribute(OutlineValue outlineValue)
OutlineValue
item from OutlineCodeDefinition
lookup table.outlineValue
- The specified OutlineValue
item.ExtendedAttribute
class linked with specified OutlineValue
item.public final ExtendedAttribute createExtendedAttribute(Value lookupValue)
Value
item.lookupValue
- The specified Value
item.
lookupValue
should be previously added to the ExtendedAttributeDefinition
using addLookupValue
method.ExtendedAttribute
class linked with specified Value
item.public static ExtendedAttributeDefinition createLookupDefinition()
CalculationType
equals to Tasks.CalculationType.Lookup
.
After creation you should manually specify the value for CfType
, FieldId
and Alias
.
Prefer using the stronger method createLookupTaskDefinition(CustomFieldType,ExtendedAttributeTask,String)
or createLookupResourceDefinition(CustomFieldType,ExtendedAttributeResource,String)
.ExtendedAttributeDefinition
public static ExtendedAttributeDefinition createLookupResourceDefinition(int fieldId, String alias)
Factory method which creates an extended attribute definition with lookup.
It has CalculationType
equals to Tasks.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
equals to Tasks.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
equals to Tasks.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
equals to Tasks.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)
CalculationType
equals to Tasks.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
equals to Tasks.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
equals to Tasks.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
equals to Tasks.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()
String
.public final void setAlias(String value)
String
.value
- custom field alias.public final boolean getAppendNewValues()
boolean
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.public final void setAppendNewValues(boolean value)
boolean
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.value
- true if new values added to a project are automatically added to the list.public final boolean getAutoRollDown()
boolean
.
Currently supported for Xml format only.public final void setAutoRollDown(boolean value)
boolean
.
Currently supported for Xml format only.value
- true if an automatic rolldown to assignments is enabled.public final int getCalculationType()
CalculationType
.
Currently supported for Xml format only.public final void setCalculationType(int value)
CalculationType
.
Currently supported for Xml format only.value
- calculation type.public final int getCfType()
CustomFieldType
.public final String getDefault()
String
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.public final void setDefault(String value)
String
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.value
- the default value in the list.public final String getDefaultGuid()
String
.
Currently supported for Xml format only.public final void setDefaultGuid(String value)
String
.
Currently supported for Xml format only.value
- default lookup table entry Guid.public final int getElementType()
ElementType
.
Currently supported for Xml format only.public final void setElementType(int value)
value
- a flag which determines whether the extended attribute is associated with a task, a resource, or an assignment.public final String getFieldId()
Aspose.Tasks.ExtendedAttributeTask
class to specify FieldId
property.
Preferable way to set FieldId
property is to create ExtendedAttributeDefinition
using one of the dedicated factory methods like createTaskDefinition
or createLookupTaskDefinition
.public final void setFieldId(String value)
Aspose.Tasks.ExtendedAttributeTask
class to specify FieldId
property.
Preferable way to set FieldId
property is to create ExtendedAttributeDefinition
using one of the dedicated factory methods like createTaskDefinition
or createLookupTaskDefinition
.public final String getFieldName()
String
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.public final String getFormula()
string
.
Currently supported for Xml format only.public final String getGuid()
public final void setGuid(String value)
value
- custom field Guid.public final String getLookupUid()
public final int getMaxMultiValues()
int
.
Currently supported for Xml format only.public final void setMaxMultiValues(int value)
int
.
Currently supported for Xml format only.value
- the maximum number of values.public final Project getParentProject()
ExtendedAttributeDefinition
instance.public final String getPhoneticsAlias()
String
.
Currently supported for Xml format only.public final void setPhoneticsAlias(String value)
String
.
Currently supported for Xml format only.value
- custom field phonetic pronunciation.public final boolean getRestrictValues()
boolean
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.public final void setRestrictValues(boolean value)
boolean
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.value
- true if only values in the list are allowed in a file.public final int getRollupType()
RollupType
.
Currently supported for Xml format only.public final void setRollupType(int value)
RollupType
.
Currently supported for Xml format only.value
- rollup type.public final String getSecondaryGuid()
String
.
This is new for MS Project 2010 property.public final void setSecondaryGuid(String value)
String
.
This is new for MS Project 2010 property.value
- secondary guid.public final String getSecondaryPid()
String
.
Currently supported for Xml format only.public final void setSecondaryPid(String value)
String
.
Currently supported for Xml format only.value
- custom field secondary Pid.public final boolean getUserDef()
boolean
.
Currently supported for Xml format only.public final void setUserDef(boolean value)
boolean
.
Currently supported for Xml format only.value
- true if a custom field is user defined.public final List<Value> getValueList()
public final int getValuelistSortOrder()
int
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.public final void setValuelistSortOrder(int value)
int
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.value
- the way value lists are sorted.public int hashCode()
public final void removeLookupValue(Value value)
ValueList
.
This method works only for ExtendedAttributeDefinition
instances
which have CalculationType
equals to Tasks.CalculationType.Lookup
.value
- Value
of lookup item to remove.public final void setFormula(String value)
string
.
Currently supported for Xml format only.value
- custom field formula.Copyright (c) 2008-2018 Aspose Pty Ltd. All Rights Reserved.