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.

Note:

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.

    Note:

    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.