Extending Cartridge Packs and Cartridges

You can extend cartridge packs and cartridges to include new specifications, characteristics, and rulesets. You can also introduce new behaviors into the model provided by a cartridge pack by taking advantage of stub rulesets.

Important:

To ensure that extensions are upgradeable and supportable, follow the guidelines and policies described in UIM Developer's Guide. In most cases, you extend cartridge packs by adding content in supplemental cartridges that you create.

When extending cartridge packs, see the following topics:

Extending Cartridge Packs and Cartridges by Adding Content

You can extend cartridge packs and cartridges by creating new, related content in a separate project. When you install the cartridge pack or cartridge into UIM and then install your supplemental cartridge, the additional content becomes available.

There are several ways to add content:

  • By creating new specifications to represent additional resources in the model. For example, if the cartridge pack or cartridge does not include specifications for all of the specific types of equipment and physical devices you use, you can create specifications for them. If the new specifications are similar to specifications in the cartridge pack or cartridge, you can copy the existing specifications into your project and make any necessary modifications. Design Studio forces you to rename the copies. See "Copying Specifications" for more information.

  • By creating new specifications that are upwardly related to specifications in the cartridge pack or cartridge. Three types of upward relationships are possible:

    • From an entity specification to another entity specification in a cartridge pack or cartridge. For example, you can create an upward relationship from a Device Interface specification you create to a Logical Device specification in a cartridge pack or cartridge.

    • From an entity specification to a configuration item in the cartridge pack or cartridge. For example, you can create an upward relationship from a Telephone Number specification you create to a configuration item in a configuration specification that is part of a cartridge pack or cartridge. See "Defining Configuration Specification Usage" for more information.

    • From an configuration specification to a parent entity specification in a cartridge pack. For example, you can create an ADSL2Plus Service Configuration specification and relate it to a DSL Service specification in a cartridge pack.

    See "Defining Specification Relationships" for more information about relating specifications.

  • By creating new entity-level characteristics for an IP Address Resource or Property Location Extension entity. When you define entity-level characteristics for these extension entities, those characteristics apply to all instances of the entity in the run-time environment. See "Extending Predefined Specifications" for more information.

When you create a dependency between a specification in your own cartridge and a specification in a cartridge pack or cartridge, both cartridges must exist in the same workspace. Additionally, you must import into the workspace all cartridges on which the cartridge pack or cartridge depends.

Extending Predefined Specifications

Some UIM entities are defined by a single predefined specification rather than by specifications that you design. To extend these entities, you can define entity-level characteristics. You add the entity-level characteristics to extension specifications for these entities:

  • Channelized Connectivity Extension (included for backward compatibility with previous versions)

  • Managed Project Extension

  • IP Address Resource Extension

  • Property Location Extension entities

When you define entity-level characteristics for these specifications and deploy the cartridge that contains them to UIM, the characteristics apply to all entities based on the specifications.

Note:

You must import the ora_uim_basespecifications cartridge before you define characteristics for the extension entities. See UIM Cartridge Guide for information about the ora_uim_basespecifications cartridge.

To extend Design Studio for Inventory entities:

  1. From the Studio menu, select New, then select Inventory, then select Extend Entity, and then select the type of entity to extend.

    You can extend Channelized Connectivity Extension, IP Address Resource Extension, or Property Location Extension entities. After you make a selection, the Entity Extension Wizard appears.

  2. In the Project field, select the name of the project to which the new specification should be added.

  3. (IP Address Resource Extension only) From the IP Resource Type list, select IPv4Network, IPv4Subnet, IPv4Address, IPv6Network, IPv6Subnet, or IPv6Address.

  4. (Optional) Select a location for the new specification.

    By default, Design Studio saves the entity to your default workspace location. You can enter a folder name in the Folder field or select a location different from the system-provided default. To select a different location:

    1. Click the Folder field Browse button.

    2. Navigate to the directory in which to save the entity.

    3. Click OK.

  5. Click Finish.

    Design Studio creates the new entity and displays its information in an Entity Extension editor.

  6. In the Entity Extension editor Characteristics tab, right-click and select Add Characteristic or Select Characteristic.

    See "Creating Characteristics from the Specification Editor" for information about creating new characteristics, and see "Adding Characteristics to Specifications" for information about selecting existing characteristics.

  7. (Optional) Define the layout for the entity extension.

    See "Specification Editor Layouts Tab" for more information.

  8. (Optional) Define user interface hints for the entity-level characteristics for the entity extension.

    See "Specification Editor Layouts Tab" for more information.

  9. (Optional) If a characteristic is defined with enumerations, define a set of data values for the entity-level characteristic.

    You can exclude enumerations defined at the schema level or add additional enumerations. See "Characteristics Tab Data Values Subtab" for more information.

  10. (Property Location Extension only) In the Entity Extension editor Rules tab, do one of the following:

    • Click Select to select an existing ruleset extension point.

    • Click Add to create and select a new ruleset extension point. See "Creating Ruleset Extension Points" for more information.

    • Select a ruleset extension point in the table and click Open to view the ruleset extension point in the Ruleset Extension Point editor.

    • Select a ruleset extension point in the table and click Remove to delete the association.

  11. Click Save.

Entity Extension Editor

You use the Entity Extension editor to create new entity-level characteristics for a Channelized Connectivity Extension, IP Address Resource Extension, or Property Location Extension entity.

When extending these entities, see the following topics:

(The Rules tab is not available for Channelized Connectivity Extension.)

Extending Cartridge Packs and Cartridges by Replacing Stub Rulesets

You can extend a cartridge pack or cartridge by replacing stub rulesets with rulesets you create. Stub rulesets have no default logic associated with them. When you replace a stub, your logic executes at the extension point associated with the ruleset. Stub rulesets typically provide opportunities to extended validation and auto-allocation.

You give your ruleset the same name as the original in the cartridge pack. When you install your cartridge into UIM, your version of the stub ruleset overwrites the stub ruleset installed with the cartridge pack. Because Design Studio requires unique names within a workspace, you must create your ruleset in a workspace that does not include the cartridge pack project with the stub.

Alternatively, instead of having a separate workspace, you can just close the other project that includes the entity with the same name.

See "Working with Rulesets" for more information about working with rulesets.

Extending Cartridge Packs and Cartridges by Renaming

You can extend cartridge packs and cartridges by renaming the original cartridge pack or cartridge and refactoring all existing objects. Oracle recommends that you use this method only when you are not able to extend the cartridge pack or cartridge by adding new content to your own project.

Important:

When you intend to rename a cartridge pack or cartridge, do not deploy the original cartridge pack or cartridge into UIM.

To extend cartridge packs and cartridges by renaming:

  1. Create a backup of the cartridge pack or cartridge.

  2. Import all dependent projects into the workspace, then import the cartridge pack or cartridge.

    See ”Importing Projects” for more information.

  3. Build the cartridge pack or cartridge and all dependent projects and resolve all problem markers.

    See ”Building and Packaging Projects” for more information.

  4. From the Studio menu, select Show Design Perspective.

  5. From the Studio Projects view, double-click the Project entity for the cartridge pack or cartridge.

    The entity opens in the Project editor.

  6. On the Properties tab, click Unseal.

    The Unseal Project confirmation dialog box appears.

  7. Click OK.

  8. Build the unsealed cartridge pack or cartridge project.

  9. From the Studio Projects view, right-click the cartridge pack or cartridge and select Rename.

    The Refactoring dialog box appears.

    Important:

    Always rename cartridge packs or cartridges from the Studio Projects view.
  10. In the Name field, enter a new name for the cartridge pack or cartridge then click Next.

    Design Studio lists all of the changes to be performed. Ensure that all of the instances are selected.

  11. Click Finish and when prompted click OK.

    Design Studio closes and restarts.

  12. After Design Studio reopens, build all sample and dependent cartridges and fix all problem markers.

  13. Change the package reference to remove ”Oracle” from the class packaging.

    Removing this reference ensures that there are no collisions at run time.

    1. From the Window menu, select Open Perspective and then select Java.

      The Java perspective appears.

    2. In the Package Explorer view, navigate to and open the cartridge src folder.

    3. Remove the Oracle reference from the class packaging.

  14. (Optional) If projects in the workspace have dependencies on the original cartridge, import the original cartridge back into the workspace.