public class ExtendedAttributeDefinition extends Object
Represents an extended attribute definition associated with a project.
Constructor and Description |
---|
ExtendedAttributeDefinition()
Deprecated.
Do not create attributes using this constructor.
Instead create ExtendedAttributeDefinition using strongly typed static factory methods named like Create*Definition().
|
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 new extended attribute with specified fieldID
|
ExtendedAttribute |
createExtendedAttribute(OutlineValue outlineValue)
Deprecated.
If you want to create an attribute with the specific value use ExtendedAttributeDefinition.createExtendedAttribute(Value) instead.
|
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 |
createLookupTaskDefinition(int customFieldType,
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 |
createTaskDefinition(int customFieldType,
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 |
setCfType(int value)
Deprecated.
Don't set the value for CfType property.
Instead create ExtendedAttributeDefinition using strongly typed static factory methods named like create*Definition().
|
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 |
setFieldName(String value)
Deprecated.
Don't set the value for FieldName property.
Instead create ExtendedAttributeDefinition using strongly typed static factory methods named like create*Definition().
|
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 |
setLookupUid(String value)
Deprecated.
Do not use Setter directly, instead use one of the factory methods:
ExtendedAttributeDefinition.createLookupTaskDefinition or ExtendedAttributeDefinition.createLookupResourceDefinition.
|
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 |
setValueList(List<Value> value)
Sets List<Value> ValueList.
|
void |
setValuelistSortOrder(int value)
Sets the way value lists are sorted.
|
@Deprecated public ExtendedAttributeDefinition()
ExtendedAttributeDefinition
class.public String getAlias()
String
.public void setAlias(String value)
String
.value
- custom field alias.public boolean getAppendNewValues()
boolean
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.public 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 boolean getAutoRollDown()
boolean
.
Currently supported for Xml format only.public void setAutoRollDown(boolean value)
boolean
.
Currently supported for Xml format only.value
- true if an automatic rolldown to assignments is enabled.public int getCalculationType()
CalculationType
.
Currently supported for Xml format only.public void setCalculationType(int value)
CalculationType
.
Currently supported for Xml format only.value
- calculation type.public int getCfType()
CustomFieldType
.@Deprecated public void setCfType(int value)
CustomFieldType
.value
- custom field type.public String getDefault()
String
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.public 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 String getDefaultGuid()
String
.
Currently supported for Xml format only.public void setDefaultGuid(String value)
String
.
Currently supported for Xml format only.value
- default lookup table entry Guid.public int getElementType()
ElementType
.
Currently supported for Xml format only.public void setElementType(int value)
value
- a flag which determines whether the extended attribute is associated with a task, a resource, or an assignment.public 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 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 String getFieldName()
String
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.@Deprecated public void setFieldName(String value)
String
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.value
- the name of a custom field.public String getFormula()
string
.
Currently supported for Xml format only.public void setFormula(String value)
string
.
Currently supported for Xml format only.value
- custom field formula.public String getGuid()
public void setGuid(String value)
value
- custom field Guid.public String getLookupUid()
@Deprecated public void setLookupUid(String value)
String
.
If you want to create a custom field with lookup, don't set LookupUid
directly,
but instead use one of the factory methods: createLookupTaskDefinition
or createLookupResourceDefinition
.value
- custom field lookup table Guid.public int getMaxMultiValues()
int
.
Currently supported for Xml format only.public void setMaxMultiValues(int value)
int
.
Currently supported for Xml format only.value
- the maximum number of values.public Project getParentProject()
ExtendedAttributeDefinition
instance.public String getPhoneticsAlias()
String
.
Currently supported for Xml format only.public void setPhoneticsAlias(String value)
String
.
Currently supported for Xml format only.value
- custom field phonetic pronunciation.public boolean getRestrictValues()
boolean
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.public 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 int getRollupType()
RollupType
.
Currently supported for Xml format only.public void setRollupType(int value)
RollupType
.
Currently supported for Xml format only.value
- rollup type.public String getSecondaryGuid()
String
.
This is new for MS Project 2010 property.public void setSecondaryGuid(String value)
String
.
This is new for MS Project 2010 property.value
- secondary guid.public String getSecondaryPid()
String
.
Currently supported for Xml format only.public void setSecondaryPid(String value)
String
.
Currently supported for Xml format only.value
- custom field secondary Pid.public boolean getUserDef()
boolean
.
Currently supported for Xml format only.public void setUserDef(boolean value)
boolean
.
Currently supported for Xml format only.value
- true if a custom field is user defined.public List<Value> getValueList()
public void setValueList(List<Value> value)
value
- custom field list of values.public int getValuelistSortOrder()
int
.
Currently supported for MSP 2003/2007 Xml and MSP 2003 mpp formats.public 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 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 customFieldType, int fieldId, String alias)
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.public static ExtendedAttributeDefinition createLookupTaskDefinition(int customFieldType, int fieldId, String alias)
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.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.public static ExtendedAttributeDefinition createTaskDefinition(int customFieldType, int fieldId, String alias)
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.public 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.@Deprecated public ExtendedAttribute createExtendedAttribute(OutlineValue outlineValue)
OutlineValue
item from OutlineCodeDefinition
lookup table.outlineValue
- The specified OutlineValue
item.ExtendedAttribute
class linked with specified OutlineValue
item.public 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 ExtendedAttribute createExtendedAttribute()
public boolean equals(Object obj)
public int hashCode()
public 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.Copyright (c) 2008-2018 Aspose Pty Ltd. All Rights Reserved.