Refactoring a Shared Resource or Policy Package

Follow these steps to refactor a resource or policy.

Renaming a Resource or a Policy Package

Follow these steps to change the name of a resource, or a policy, package and to update its corresponding references in the project.

Procedure

  1. To rename a resource package, right-click the package under the Resources folder and select Refactor > Rename Resource Package. To rename a policy package, expand the Policies folder, right-click the policy package, and select Refactor > Rename Policy Package.
  2. Enter a new name for the resource, or policy, package and select OK.
  3. Optional. In the Rename Package Name dialog, confirm the changes that will happen, and the resource references that will be updated, by ensuring the correct resources are selected.
  4. Select OK.

Changing the Location of a Resource or a Policy

Follow these steps to change the location of a resource, or a policy, and to update its corresponding references in the project.

Procedure

  1. To update the location of a resource, right-click the package under the Resources folder and select Refactor > Rename Resource Package. To update the location a policy, expand the Policies folder, right-click the package containing the policy you want to rename, and select Refactor > Rename Policy Package.
  2. Enter a new location for the resource, or policy, and select OK. For example, to change the location of a Basic Authentication policy residing in refactoringproject.TestPackage, modify the package name to refactoringproject.NewPackage.TestPackage.
  3. Optional. In the Rename Package Name dialog, confirm the changes that will happen, and the resource references that will be updated, by ensuring the correct resources are selected.
  4. Select OK .
    A new folder structure under the Resources, or Policies, folder is created, and the resource is moved to the newly created location.