Example Java Scripts

You can find examples of Java scripts in the following locations:

- UNIX: `${DM_ROOT}/AdminConsole/examples/`

- Windows: `%DM_ROOT%\AdminConsole\examples\`

The following Java scripts illustrate common Dimensions CM tasks:

Script | Description
assignedFormatsDemo.js | Assigns a file format to an item type. Deassigns a file format from an item type. Lists all file formats assigned to an item type.
assignedTypesDemo.js | Lists types assigned to a lifecycle. Assigns a lifecycle to a type. Deassigns a lifecycle from a type.
attributeBlockDemo.js | Creates attribute blocks. Updates attribute block details. Deletes attribute blocks. Assigns, or deassigns, attributes to or from attribute blocks. Lists attribute blocks defined for a type.
attributeDemo.js | Creates attributes and assign them to types. Updates attribute details. Deassigns attributes from types. Lists attributes assigned to an object type.
attributeRuleDemo.js | Creates attribute update rules. Deletes attribute update rules. Lists attribute update rules.
baselineReplConfigsDemo.js | Creates a baseline replication configuration. Creates a remote subordinate. Updates replication configuration details. Updates details of a remote subordinate. Deletes remote subordinates. Deletes replication configurations. Lists baseline replication configurations. Lists remote subordinates defined for a replication configuration.
baselineTemplateDemo.js | Creates a baseline template. Modifies baseline template rules. Copies baseline template rules between baseline templates. Deletes a baseline template. Lists all baseline templates defined in the base database. Lists all baselines using a baseline template.
branchDemo.js | Creates version branches. Updates branch details. Deletes branches. Lists all defined branches.
browseTemplatesDemo.js | Creates a browse template revision. Lists all browse template revisions defined for an object type. Exports or imports browse template contents. Deletes a browse template revision.
buildAreasDemo.js | Creates build areas. Updates build area details. Deletes build areas. Lists build areas.
buildStagesDemo.js | Assigns, or deassigns, a lifecycle state to a build stage. Lists build stages. Lists lifecycle states assigned to a build stage.
chdocRelTypeDemo.js | Creates request relationship types. Updates request relationship type details. Deletes request relationship types. Lists request relationship types defined in a product.
CMRulesDemo.js | Defines and updates CM rules for item and request types. Updates CM rules details for item and request types. Enables and/or disables CM rules for item and request types. Lists CM rules defined for item and request types.
copyAttrsDemo.js | Copies attribute definitions between object types. Lists attributes assigned to an object type.
copyRulesDemo.js | Copies attribute update rules between object types. Lists attribute update rules assigned to an object type.
formatsDemo.js | Creates file formats. Updates file format details. Deletes file formats. Lists file formats defined in a base database.
itemLibraryDemo.js | Defines a default item library for a product. Defines an item library for an item type. Updates default item library details. Updates item type item library details. Deletes an item library.
itemReplConfigsDemo.js | Creates a local or remote subordinate. Creates an item replication configuration. Updates replication configuration details. Updates details of a local or remote subordinate. Deletes replication configurations. Deletes local or remote subordinates. Lists item replication configurations. Lists local and remote subordinates defined for a replication configuration.
itemToItemRelTypeDemo.js | Creates an item to item relationship type. Updates item to item relationship types details. Deletes an item to item relationship type. Lists item to item relationship types defined for an item type.
itemTypeGroupDemo.js | Creates item type groups. Assigns and deassigns item types to, or from, item type groups. Deletes item type groups. Lists item type groups defined in a base database. Lists release templates using an item type group.
lifecycleDemo.js | Creates a lifecycle. Updates lifecycle details. Deletes a lifecycle. Lists all lifecycles defined in a base database. Lists lifecycle state transitions. Lists roles authorized to perform a lifecycle transition.
lifecycleImagesDemo.js | Creates new image revisions. Assigns, or deassigns, the default image revision to a lifecycle. Exports images from, or imports images to, a lifecycle image gallery. Deletes image revisions. Lists image revisions assigned to a lifecycle.
lifecycleTemplateAssignmentsDemo.js | Creates a lifecycle and browse template assignment at the design part level. Deletes a lifecycle and browse template assignment at the design part level. Lists lifecycle and browse template assignments at the design part level.
lifecycleTransitionsDemo.js | Modifies a lifecycle by adding or deleting a normal/off normal transition. Modifies a lifecycle by adding, removing or updating the list of user roles authorized to perform a lifecycle state transition. Modifies a lifecycle by removing a normal state. Modifies a lifecycle by renaming a state. Lists all lifecycles defined in a base database. Lists lifecycle state transitions. Lists roles authorized to perform a lifecycle transition.
primingRelDemo.js | Defines a priming relationship. Deletes a priming relationship. Modifies attribute mappings for a priming relationship. Lists request types that may be primed from a request type.
productDemo.js | Creates a product. Updates product details. Deletes a product. Lists products defined in a base database.
relationshipNameDemo.js | Defines an item type relationship name. Updates item type relationship name details. Deletes item type relationship names. Lists item type relationship names defined in a base database.
releaseTemplateDemo.js | Creates a release template. Modifies release template rules. Deletes a release template. Copies release template rules between release templates. Lists all release templates defined in the base database. Lists all releases using a release template.
renameAttributeDemo.js | Renames an attribute's ID within the base database.
reportsDemo.js | Creates user report definitions. Updates user report definitions. Exports or imports report file contents. Assigns and deassigns a report file to, or from, a user report definition. Deletes user report definitions. Lists user report definitions.
roleAssignmentsDemo.js | Adds or removes role assignments. Lists all role assignments for a product.
roleDemo.js | Creates a user role. Updates role details. Deletes a role. Lists all roles defined in a base database.
typesDemo.js | Creates object types. Updates object type details. Assigns, or deassigns, a lifecycle to or from a type. Deletes object types. Lists object types within a certain scope in a product.
typesUsingAttrsDemo.js | Lists all object types using an attribute definition.
validRelTypesDemo.js | Creates a valid relationship type. Updates valid relationship type details. Deletes a valid relationship type. Lists valid relationship types defined for a request type.
validsetsDemo.js | Creates valid sets. Updates valid sets. Deletes valid sets. Lists valid sets.
validsetValuesDemo.js | Appends valid set values. Replaces valid set values. Removes valid set values. Lists valid set values.

Related Topics

Using the Scripting Interface Shell