public interface AttributeTemplatesBuilder extends Builder
AttributeTemplatesBuilder
to be used when creating attribute
templates. An attribute template is optional for an attribute and lives in the depository. It's
main purpose is to provide extra data to further describe a referencing attribute. All attributes
that are created from a template will take on the characteristics of the template, most notable the
title, type, and units (for templates of type number only). The template contains
other data, such as input assisting data (ranges and lists of values) to be used when creating a
value on the attribute. The template may also contain a category, which allows attributes
to be grouped together and easily sorted. A note may also be set on a template to provide further
description about a referencing attribute.
Each template must contain a unique title and a type. If the type is number, then the units
must also be set. All other data is optional.
There are six types of attribute templates: Null, Boolean, Integer, Number, String, and Date. Each
type requires a title, type, and can optionally contain a note and a category. Other data varies
depending on the type. Below describes the differences betweeen the types.
Null - No other data can be set for a template of type Null.
Boolean - A default boolean can be set to True or False. This can be set by calling SetDefaultBoolean.
Integer - A default integer can be set to assist when creating an attribute referencing an integer
template. The integer type also allows for constraints to be set. If the constraint is
set to Range, then the min integer and max integer need to be set to define the range.
If the constraint is set to List, then the value integer list will need to be set to
define the acceptable list of values. If constraint is set to None, then no constraints
will be enforced. The default value must comply with all constraints in order for the
template to be created successfully.
Number - A default floating point number and constraints can be set in the exact same fashion as
with the integer, the only difference being that the number fields will be used instead
of the integer fields. The units must be set to define the template's measure. Only
the measure (Length, Area, Volume, etc) is considered required information, the units
themselves (mm, kg, etc) will only be used along with the default value as input
assistance when creating an attribute referencing a number template.
String - A default string can be set. The string type also allows for a list of values to be set
as input assistance. To do this, the constraint must be set to List and the string list
will need to be populated with the desired values. The string type does not allow for the
constraint to be set to Range, it must be set to either List or None. The default string
must be contained in the list of values if Constraint is set to List.
Date - No other data can be set for a template of type Date. The current date will always be used
as input assistance when creating an attribute referencing a date template.
This class will also allow for the import and export of attribute templates. The export feature
will save all templates currently in the depository to an external catalog file so they can be imported
at a later time to another part file. To use this feature, the catalog filename must be set to
specify the external file. Similarly, the import feature will take all templates contained in
the specified catalog file and instantiate them in the part. If the title, type, or measure of an
imported template conflicts with a template already in the depository, then the template will not be
imported. If the optional data of an imported template conflicts with a template already in the
depository, then the data from the imported template will overwrite the data in the depository.
PropertiesManager.createAttributeTemplatesBuilder()
Property | Value |
---|---|
Constraint | None |
CopyAttributeOnObjectCopy | True |
DataType | String |
DefaultBoolean | True |
DefaultInteger | 0 |
DefaultNumber | 0 |
MaxInteger | 0 |
MaxNumber | 0 |
MinInteger | 0 |
MinNumber | 0 |
ProxyAttributeForLocking |
Modifier and Type | Interface and Description |
---|---|
static class |
AttributeTemplatesBuilder.AccessKey
Specifies the available access keys that determine which objects will have access to this attribute template.
|
static class |
AttributeTemplatesBuilder.ConstraintOptions
Specifies the constraint data associated with the template.
|
static class |
AttributeTemplatesBuilder.DefaultBooleanOptions
Specifies the default value for a template of type Boolean.
|
static class |
AttributeTemplatesBuilder.TemplatesOptions
Specifies the templates option when setting or displaying templates.
|
Modifier and Type | Method and Description |
---|---|
void |
addAccessKey(AttributeTemplatesBuilder.AccessKey accessKey)
Add a new access key to the list of access keys.
|
String |
alias()
Returns the Alias.
|
boolean |
allowMultipleValues()
Returns the flag specifying if an attribute can contain multiple values.
|
String |
catalogFilename()
Returns the catalog filename.
|
String |
category()
Returns the category.
|
AttributeTemplatesBuilder.ConstraintOptions |
constraint()
Returns the constraint.
|
boolean |
copyAttributeOnObjectCopy()
Returns the flag specifying whether the attribute should be copied when the object is copied.
|
AttributePropertiesBaseBuilder.DataTypeOptions |
dataType()
Returns the data type.
|
DateBuilder |
dateConstraint()
Returns the date constraint.
|
AttributeTemplatesBuilder.DefaultBooleanOptions |
defaultBoolean()
Returns the default boolean.
|
DateBuilder |
defaultDate()
Returns the default date.
|
int |
defaultInteger()
Returns the default integer.
|
double |
defaultNumber()
Returns the default number.
|
String |
defaultString()
Returns the default string.
|
boolean |
delete(String title,
AttributePropertiesBaseBuilder.DataTypeOptions type)
Delete an attribute template by specifying the title and type of the template.
|
boolean |
enforcedConstraints()
Returns the enforced constraints.
|
void |
exportCatalog()
Exports templates to a specified external catalog.
|
AttributeTemplatesBuilder.AccessKey[] |
getAccessKeys()
Get the access keys.
|
String[] |
getIntegerList()
Returns the integer list.
|
String[] |
getNote()
Returns the note.
|
String[] |
getNumberList()
Returns the number list.
|
String[] |
getStringList()
Returns the string list.
|
void |
importCatalog()
Imports templates from a specified external catalog.
|
boolean |
lockOnSave()
Returns the flag specifying if the attribute should be locked on save.
|
int |
maxInteger()
Returns the max integer.
|
double |
maxNumber()
Returns the max number.
|
String |
maxString()
Returns the max string.
|
int |
minInteger()
Returns the min integer.
|
double |
minNumber()
Returns the min number.
|
String |
minString()
Returns the min string.
|
boolean |
persistent()
Returns the persistent flag.
|
String |
proxyAttributeForLocking()
Returns the proxy attribute for locking.
|
void |
removeAccessKey(AttributeTemplatesBuilder.AccessKey accessKey)
Remove an access key from the list of access keys.
|
void |
setAccessKeys(AttributeTemplatesBuilder.AccessKey[] accessKeys)
Set the access keys.
|
void |
setAlias(String alias)
License requirements: None. |
void |
setAllowMultipleValues(boolean array)
License requirements: None. |
void |
setCatalogFilename(String catalogFilename)
License requirements: None. |
void |
setCategory(String category)
License requirements: None. |
void |
setConstraint(AttributeTemplatesBuilder.ConstraintOptions constraint)
License requirements: None. |
void |
setCopyAttributeOnObjectCopy(boolean copyAttributeOnObjectCopy)
License requirements: None. |
void |
setDataType(AttributePropertiesBaseBuilder.DataTypeOptions dataType)
License requirements: None. |
void |
setDefaultBoolean(AttributeTemplatesBuilder.DefaultBooleanOptions defaultBoolean)
License requirements: None. |
void |
setDefaultInteger(int defaultInteger)
License requirements: None. |
void |
setDefaultNumber(double defaultNumber)
License requirements: None. |
void |
setDefaultString(String defaultString)
License requirements: None. |
void |
setEnforcedConstraints(boolean enforcedConstraints)
License requirements: None. |
void |
setIntegerList(String[] integerList)
Sets the integer list.
|
void |
setLockOnSave(boolean lockOnSave)
License requirements: None. |
void |
setMaxInteger(int maxInteger)
License requirements: None. |
void |
setMaxNumber(double maxNumber)
License requirements: None. |
void |
setMaxString(String maxString)
License requirements: None. |
void |
setMinInteger(int minInteger)
License requirements: None. |
void |
setMinNumber(double minNumber)
License requirements: None. |
void |
setMinString(String minString)
License requirements: None. |
void |
setNote(String[] note)
Sets the note.
|
void |
setNumberList(String[] numberList)
Sets the number list.
|
void |
setPersistent(boolean persistent)
License requirements: None. |
void |
setProxyAttributeForLocking(String proxyAttributeForLocking)
License requirements: None. |
void |
setStringList(String[] stringList)
Sets the string list.
|
void |
setTemplates(AttributeTemplatesBuilder.TemplatesOptions dataType)
License requirements: None. |
void |
setTitle(String title)
License requirements: None. |
void |
setUnits(String units)
License requirements: None. |
AttributeTemplatesBuilder.TemplatesOptions |
templates()
Returns the templates option.
|
String |
title()
Returns the title.
|
String |
units()
Returns the units.
|
void |
updateTemplates()
Update templates in the part from the external catalog defined in customer defaults.
|
commit, destroy, getCommittedObjects, getObject, showResults
printTestData, printTestData, tag, tagValue
validate
AttributeTemplatesBuilder.TemplatesOptions templates() throws NXException, RemoteException
NXException
RemoteException
void setTemplates(AttributeTemplatesBuilder.TemplatesOptions dataType) throws NXException, RemoteException
dataType
- NXException
RemoteException
String title() throws NXException, RemoteException
NXException
RemoteException
void setTitle(String title) throws NXException, RemoteException
title
- NXException
RemoteException
AttributePropertiesBaseBuilder.DataTypeOptions dataType() throws NXException, RemoteException
NXException
RemoteException
void setDataType(AttributePropertiesBaseBuilder.DataTypeOptions dataType) throws NXException, RemoteException
dataType
- NXException
RemoteException
AttributeTemplatesBuilder.ConstraintOptions constraint() throws NXException, RemoteException
NXException
RemoteException
void setConstraint(AttributeTemplatesBuilder.ConstraintOptions constraint) throws NXException, RemoteException
constraint
- NXException
RemoteException
int minInteger() throws NXException, RemoteException
NXException
RemoteException
void setMinInteger(int minInteger) throws NXException, RemoteException
minInteger
- NXException
RemoteException
int maxInteger() throws NXException, RemoteException
NXException
RemoteException
void setMaxInteger(int maxInteger) throws NXException, RemoteException
maxInteger
- NXException
RemoteException
double minNumber() throws NXException, RemoteException
NXException
RemoteException
void setMinNumber(double minNumber) throws NXException, RemoteException
minNumber
- NXException
RemoteException
double maxNumber() throws NXException, RemoteException
NXException
RemoteException
void setMaxNumber(double maxNumber) throws NXException, RemoteException
maxNumber
- NXException
RemoteException
String minString() throws NXException, RemoteException
NXException
RemoteException
void setMinString(String minString) throws NXException, RemoteException
minString
- NXException
RemoteException
String maxString() throws NXException, RemoteException
NXException
RemoteException
void setMaxString(String maxString) throws NXException, RemoteException
maxString
- NXException
RemoteException
DateBuilder dateConstraint() throws NXException, RemoteException
NXException
RemoteException
String[] getIntegerList() throws NXException, RemoteException
NXException
RemoteException
void setIntegerList(String[] integerList) throws NXException, RemoteException
integerList
- NXException
RemoteException
String[] getNumberList() throws NXException, RemoteException
NXException
RemoteException
void setNumberList(String[] numberList) throws NXException, RemoteException
numberList
- NXException
RemoteException
String[] getStringList() throws NXException, RemoteException
NXException
RemoteException
void setStringList(String[] stringList) throws NXException, RemoteException
stringList
- NXException
RemoteException
double defaultNumber() throws NXException, RemoteException
NXException
RemoteException
void setDefaultNumber(double defaultNumber) throws NXException, RemoteException
defaultNumber
- NXException
RemoteException
String units() throws NXException, RemoteException
NXException
RemoteException
void setUnits(String units) throws NXException, RemoteException
units
- NXException
RemoteException
int defaultInteger() throws NXException, RemoteException
NXException
RemoteException
void setDefaultInteger(int defaultInteger) throws NXException, RemoteException
defaultInteger
- NXException
RemoteException
AttributeTemplatesBuilder.DefaultBooleanOptions defaultBoolean() throws NXException, RemoteException
NXException
RemoteException
void setDefaultBoolean(AttributeTemplatesBuilder.DefaultBooleanOptions defaultBoolean) throws NXException, RemoteException
defaultBoolean
- NXException
RemoteException
String defaultString() throws NXException, RemoteException
NXException
RemoteException
void setDefaultString(String defaultString) throws NXException, RemoteException
defaultString
- NXException
RemoteException
DateBuilder defaultDate() throws NXException, RemoteException
NXException
RemoteException
String category() throws NXException, RemoteException
NXException
RemoteException
void setCategory(String category) throws NXException, RemoteException
category
- NXException
RemoteException
String proxyAttributeForLocking() throws NXException, RemoteException
AttributeTemplatesBuilder.TemplatesOptions
.
NXException
RemoteException
void setProxyAttributeForLocking(String proxyAttributeForLocking) throws NXException, RemoteException
proxyAttributeForLocking
- NXException
RemoteException
String[] getNote() throws NXException, RemoteException
NXException
RemoteException
void setNote(String[] note) throws NXException, RemoteException
note
- NXException
RemoteException
boolean enforcedConstraints() throws NXException, RemoteException
NXException
RemoteException
void setEnforcedConstraints(boolean enforcedConstraints) throws NXException, RemoteException
enforcedConstraints
- NXException
RemoteException
boolean persistent() throws NXException, RemoteException
NXException
RemoteException
void setPersistent(boolean persistent) throws NXException, RemoteException
persistent
- NXException
RemoteException
void importCatalog() throws NXException, RemoteException
NXException
RemoteException
void exportCatalog() throws NXException, RemoteException
NXException
RemoteException
void updateTemplates() throws NXException, RemoteException
NXException
RemoteException
String catalogFilename() throws NXException, RemoteException
NXException
RemoteException
void setCatalogFilename(String catalogFilename) throws NXException, RemoteException
catalogFilename
- NXException
RemoteException
boolean delete(String title, AttributePropertiesBaseBuilder.DataTypeOptions type) throws NXException, RemoteException
title
- type
- NXException
RemoteException
boolean copyAttributeOnObjectCopy() throws NXException, RemoteException
NXException
RemoteException
void setCopyAttributeOnObjectCopy(boolean copyAttributeOnObjectCopy) throws NXException, RemoteException
copyAttributeOnObjectCopy
- NXException
RemoteException
String alias() throws NXException, RemoteException
NXException
RemoteException
void setAlias(String alias) throws NXException, RemoteException
alias
- NXException
RemoteException
boolean allowMultipleValues() throws NXException, RemoteException
NXException
RemoteException
void setAllowMultipleValues(boolean array) throws NXException, RemoteException
array
- NXException
RemoteException
boolean lockOnSave() throws NXException, RemoteException
NXException
RemoteException
void setLockOnSave(boolean lockOnSave) throws NXException, RemoteException
lockOnSave
- NXException
RemoteException
AttributeTemplatesBuilder.AccessKey[] getAccessKeys() throws NXException, RemoteException
NXException
RemoteException
void setAccessKeys(AttributeTemplatesBuilder.AccessKey[] accessKeys) throws NXException, RemoteException
accessKeys
- NXException
RemoteException
void addAccessKey(AttributeTemplatesBuilder.AccessKey accessKey) throws NXException, RemoteException
accessKey
- NXException
RemoteException
void removeAccessKey(AttributeTemplatesBuilder.AccessKey accessKey) throws NXException, RemoteException
accessKey
- NXException
RemoteException
Copyright 2017 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.