Spec operations - script to Java migration
The migration tables list the script operations that map to Spec Java™ API methods.
AttributeDefinition
These script operations
can be mapped to the following AttributeDefinition Java API methods.
Script operation | Java method |
---|---|
getNodeChildren() | getChildren |
getNodeName() | getName |
getNodeDisplayName([Locale locale]) | getLocalizedNameforLocale |
getNodePath() | getPath |
isNodeGrouping() | isGrouping |
getLocaleNode(Locale locale) | getLocalized |
getNodeLocale() | getLocales |
isNodeSpecRoot() | isSpecRoot |
String
Node::getNodeAttributeValue (String attributeName) |
AttributeDefinitionProperty::getValue() |
getNodeSpec() | getSpec() |
AttributeDefinitionProperty
These script
operations can be mapped to the following AttributeDefinitionProperty Java API methods.
Script operation | Java method |
---|---|
getNodeAttributeValue() | getValue() |
getNodeAttributeValues() | getValues() |
Node::setAttribute(String sAttributeName, String sValue [, Boolean dontReplace]) | setValue |
Node::setAttributes(String sAttributeName, HashMap sValues) | setValues |
LookupSpec
These script operations can be
mapped to the following LookupSpec Java API
methods.
Script operation | Java method |
---|---|
PrimarySpec::
Spec::getPrimaryKeyNode() |
getPrimaryKeyAttributeDefinition |
Spec::getSpecPrimaryKeyAttributePath() | AttributeDefinition to get to the path |
Spec::setPrimaryKeyPath() | setPrimaryKey |
PrimarySpec
These script operations can
be mapped to the following PrimarySpec Java API
methods.
Script operation | Java method |
---|---|
PrimarySpec::
Spec::getPrimaryKeyNode() |
getPrimaryKeyAttributeDefinition |
Spec::getSpecPrimaryKeyAttributePath() | AttributeDefinition to get to the path |
Spec::setPrimaryKeyPath() | setPrimaryKey |
Spec
These script operations can be mapped
to the following Spec Java API
methods.
Script operation | Java method |
---|---|
SpecNode new SpecNode
(Spec spec, String path, Integer order) Node buildSpecNode (Spec spec, String path, Integer order) |
createAttributeDefinition |
Spec::saveSpec() | save() |
Spec::addToSpecLocales() | addLocale |
Spec::replaceSpecLocales() | replaceLocales |
Spec::setLocalized() | setLocalized |
Spec::deleteSpec() | delete() |
Spec::removeNode() | removeAttributeDefinition |
Spec::removeFromSpecLocales | removeLocale() |
Spec::getSpecType | getType() |
Spec::isLocalized | isLocalized() |
Spec::getSpecAttribNames
Spec::getSpecAttribPaths Spec::getSpecPrimaryKeyAttributePath Spec::getSpecMultiOccurAttributePaths Spec::getSpecSequenceAttributePaths Spec::getSpecUniqueAttributePaths |
getAttributeDefinitions() and retrieve names of AttributeDefinitions |
Spec::getSpecName | getName |
Spec::getSpecNodes() | getAttributeDefinitions |
Spec::getNodeByPath() | getAttributeDefinition |
Spec::getLocales() | getLocales |
SpecManager
These script operations can
be mapped to the following SpecManager Java API
methods.
Script operation | Java method |
---|---|
new Spec(String specName, String specType [, String specFileType]) | createSpec(String specName, SpecType aSpecType) |
new Spec(String specName, String specType [, String specFileType]) | createSpec(String specName, FileSpec.FileType fileType) |
Spec getSpecByName(String name [, Boolean bImmutable]) | getSpec |
SpecMap getSpecMapByName([String name]) | SpecMap getSpecMap(String specMapName); |
SpecMap buildTestSpecMap(String mapName, String mapType,
Object source, Object destination) new SpecMap(String mapName, String mapType, Object source, Object destination) |
SpecMap createSpecMap(String specMapName, SpecMap.Type specMapType,
String sourceObjectName, String destinationObjectName); |
SpecMap
These script operations can be mapped
to the following SpecMap Java API
methods.
Script operation | Java method |
---|---|
Object SpecMap::getSpecMapSrcObject() | String getSourceObjectName(); |
Object SpecMap::getSpecMapDstObject() | String getDestinationObjectName(); |
SpecMap::saveSpecMap() | save(); |
SpecMap::map(String sSrcPath, String sDstPath) | SpecMapEntry addMapping(AttributeDefinition sourceAttributeDefinition,
AttributeDefinition destinationAttributeDefinition); |