User Guide

This document explains how WSO2 Governance Registry Eclipse Plugin should be installed in to Eclipse and how you can get the functionality provided by the plugin.

Content

Introduction

WSO2 Governance Registry Eclipse Plugin provides you a light weight user friendly registry functionalities such as creating resources, collections, managing versions and other properties related to resources etc.

Prerequisites

You need to have basic prerequisites that are associated with installing WSO2 Governanace Registry Eclipse Plugin in Eclipse. Please refer to Prerequisites section of the Installation Guide for more information. Apart from them, you need to have latest WSO2 Governance Registry running in your local machine or any other remote location.

Installation

Please refer the Installation Guide for details on how to install WSO2 Governance Registry Eclipse Plugin.

Add different remote registry instances

1. Select WSO2 Registry Perspective

After successfully install the plugin, you have to select WSO2 Registry perspective first. Go to Window -> Open Perspective -> Other -> WSO2 Registry. In this perspective you will get a WSO2 Registry Browser view.



New Server Runtime







New Server Runtime



Now your Eclipse workspace will be as below.



New Server Runtime



2. Add a remote registry instance

Right click on the WSO2 Registry Browser view and fill necessary information for the dialog. Default information for WSO2 Governance Registry has been filled for you. In the path text box, you can give the path you want registry from. You can either specify root (/) or any other valid registry path for a collection (eg : /_system/local, /_system etc). Elements down the given path will be loaded in the Registry Browser view.



New Server Runtime



If you select root (/) as path, below is the registry tree that you will get.



New Server Runtime



If you select /_system/local as path, below is the registry tree that you will get.



New Server Runtime



When you expand the added regisrty instance, you will see two main sections called USER and HEAD. When you expand the USER node, you will get functionalities regarding to User Management. Similarly you will get the registry related functionalities when you expand the HEAD node.



New Server Runtime







Add, edit, delete collections, resources

1. Add a new collection

Expand HEAD node and select root collection. Then right click on the collection and you will functionalities available. Select Add a new Collection and you will get an editor where you can enter a name, media type and description for the collection.



New Server Runtime







New Server Runtime



This editor will act as a normal editor and to add the collction, you have to save the changes done in the editor. To save press cntrl+s and a new collection with the given name will be added to the node that you select to Add a new Collection option.





New Server Runtime



In the media type combo box, you have the ability to creata your own media type by selecting ,Other option.





New Server Runtime







2. Add a new resource

Select a collection and right click on it and choose Add a new resource option from the menu. You will get a same editor as you get for collection. You have three ways to add a resource.

  1. Upload Content From file
  2. Create custom content
  3. Import Content from URL




New Server Runtime



2.1 Upload Content From file

This is the default method to add a resource. Browse the file you want to add from the file system. Resource name and media type will be filled accordingly. You can change those default value as your preferance as well.



New Server Runtime



2.2 Create custom content

This is the method to create your own resource files from the editor. Give a name, mediatype, description and content for the file. User can edit content according to the specified media type.





New Server Runtime



2.3 Import Content from URL

By this method, you can import content from a URL. When you give the URL, make sure it does not contain characters like ~ since it is considered as an invalid character for abdera. Name field and media type field will be filled according to the given URL. You have to ability to modify them as your preference as well.





New Server Runtime



You can edit the information you provided later as well. To edit media type, resource description select the resource, right click on it and select Information from the menu.





New Server Runtime







You can delete the collection or resource you added by Delete option of the right click menu of the selected resource or collection.





New Server Runtime







When you select delete option, it will pop up a confirmation dialog to delete the resource.





New Server Runtime



Add, edit, delete properties, associations, dependencies, comments, tags for a resource or collection

For a collection or resource there are two main field of properties you can add.

  1. Metadata
  2. Community Featueres
In the Metadata category, you can add Properties, Associations and Dependencies. In the Community Features catagory, you can add Comments and Tags.

1. Add Metadata





New Server Runtime







1.1 Add a Property

Right click on the collection or resource you want to add a property and select Add a Property from the Metadata section of the context menu. Now you can see an editor to add properties, edit properties and delete properties.





New Server Runtime



There are two fields called Property Name and Property Value. You can enter values for these fields and save them.





New Server Runtime







You can edit the fields you entered afterward as well. To delete a property, select the property and click Delete Property button. When you click the delte button, you will see the the property you have selected has been greyed.





New Server Runtime



You have the ability to undo the action you did by Undelete Property option. Property will be removed when you save the editor.





New Server Runtime



1.2 Add a Dependency

Right click on the collection or resource you want to add a property and select Add a Dependency from the Metadata section of the context menu.





New Server Runtime







Then you will get a same editor as you get for properties where you can add dependencies to the selected resource.





New Server Runtime



Note that the path you are giving should be valid registry paths. Otherwise it will pop up a error message when you click Save.





New Server Runtime



You can edit the values you gave, delete dependencies, and undo delete as you did for property editor.





1.3 Add an Association

Right click on the collection or resource you want to add an association and select Add an Association from the Metadata section of the context menu.





New Server Runtime







Now you can see an editor to add associations, edit associations and delete associations.





New Server Runtime



Note that the path you are giving should be valide registry paths. Otherwise it will pop up a error message when you click Save.





New Server Runtime



You can edit the values you gave, delete associations, and undo delete as you did for property editor.

2. Add Community Features





New Server Runtime







2.1 Add Comment

Right click on the collection or resource you want to add a comment and select Add Comment from the Community section of the context menu.





New Server Runtime



Now you can see an editor to add comments, edit comments and delete comments.





New Server Runtime







You can edit the fields you entered afterward as well. To delete a comment, select the comment and click Delete Comment button. When you click the delte button, you will see the the comment you have selected has been greyed.





New Server Runtime



You have the ability to undo the action you did by Undelete Property option. Comment will be removed when you save the editor.

1.2 Add a Tag

Right click on the collection or resource you want to add a tag and select Add a Tag from the Community section of the context menu. Now you can see an editor to add tags, edit tags and delete tags.





New Server Runtime







Then you will get a same editor as you get for Add comments where you can add tags to the selected resource.





New Server Runtime



You can give any string value as a tag.





New Server Runtime



But you can not have two tags with the same name.





New Server Runtime



You can edit the values you gave, delete tags, and undo delete as you did for comments editor.

Link with editor

This is a similar feature that is available in Eclipse IDE. If you click on the Link with Editor option. mouse pointer will be focus to the path of the active editor of the WSO2 Registry Browser.

Link With Editor option is available only in the HEAD level, since it is a global function. To activate the Link With Editor option, select the HEAD and select Link With Editor option from right click menu. Same functionality is available in the toolbar of the WSO2 Registry Browser view as well.





New Server Runtime



Now open several resources in seperate editors by double click on the resource.





New Server Runtime







Now swap among different editors. You will see correct path related to the selected resource will be focused in the WSO2 Registry Browser view.





New Server Runtime







Add multiple files and folder from file system

You can add multiple folders and files from the local file system. This option is availabe for a collection. Go to the collection you want to add multiple files and folders and select Add local resources and choose the option you want.

  1. Multiple files
  2. Folders




New Server Runtime



Select multiple files or folders that you want to add and click ok.





New Server Runtime



Then you will get a confirmation box to confirm your decision.





New Server Runtime



Selected multiple resources will be added under the collection.





New Server Runtime



Import/Export resources and collections

With this functionality, you can import resource and collection from the same registry instance or a different registry instance that you have added. Similarly you can export resource or collection to the same registry instance or a different registry instance. Import From is only for a Collection since you cannot import collection or resource under a Resource.

1. Import From

Go to collection you want to import resources and select Import From in the right click menu.





New Server Runtime



Then you will get a dialog box where you can select resources that you want to import from available registry instances.





New Server Runtime



You can browse through the registy instance and select the resource or collection you need and click OK.





New Server Runtime





Then it will pop up a confirmation dialog as below.



New Server Runtime





After the confirmation, imported resource will be added under the selected collection.



New Server Runtime



2. Export To

Go to the collection or resource you want to export to another location. Select Export To from right click menu.





New Server Runtime



Then you will get the same Registry Tree Browser dialog to choose the location you want to import the resource to. Browse the registry, select the path and click OK.

Press OK to the confirmation dialog box as well. Now you will see selected resource has been imported to the given location.



New Server Runtime



Drag/Drop resources and collections

With this functionality, you can drag any resource or collection and drop it to a location of same registry instance or different registry instance that is available.

Before dropping the resource, you will get a confirmation dialog as you get for Import / Export functionality. After confirming, resource will be added to the dropped location.

Modify permission for a resource, collection

With this functionality you can modify the permission of the resource or the collection. Go to the collection or resource and select Modify Permission from the right click menu.





New Server Runtime



Now you will get a dialog for changing permissions. In the dialog, you will see availble roles and their permissions. You can define the permissions and press OK.





New Server Runtime



You can check whether the permission has been changed from the management console as well as from the tool.

From management console



New Server Runtime



From the tool



New Server Runtime



Refresh registry

You can refresh the registry instance which will enable to sync with the latest updates. This option is available in all stages. You can select it from the right click menu as well as from the toolbar of WSO2 Registry Browser view.





New Server Runtime



View information per resource and collection

You can view information related to a resource or collection by selecting Information from the right click menu.





New Server Runtime



It is multi-tab editor which includes general information, properties, associations, dependencies, tags and comments. You have the ability to edit them at the same time.





New Server Runtime



Check-out a collection to local project

You can check-out a resource or a collection to a local project in the workspace. Select Checkout from the right click menu.





New Server Runtime



Then it will ask for the location to check out. If you have any projects in the workspace, it will show them. But if there are no projects in the workspace, it will show a blank dialog box. As a result, you have to create a project in the workspace before check-out.





New Server Runtime



There are several states for a checked-out resource.

  1. Synched
  2. Updated
  3. Conflicted
  4. Added
  5. Resolved
When you checked-out, it is at the sync state so the folder will be decorated as green.



New Server Runtime



If you double clck on a resource, do some change and save, state will become as Updated which will turn the decorator in to yellow.



New Server Runtime



If you add a new file, it will go to the Added state and it will have a seperate decorator.





New Server Runtime



Do changes and commit back to registry, update with registry

Changes you did for the checked-out folder can be checkin to registry. When you check-in, you can not check-in in resource wise. You have to check-in whole folder.

To check-in, right click the folder that has been updated, which will be decorated with yellow and select Commit changes as user from the WSO2 Registry category.





New Server Runtime



Then it will pop up a dialog to choose as what user you want to commit changes. If you have several registry instances with different users you can choose what user you want to commit the folder.





New Server Runtime



Give the correct credentials and you will get a message saying if the commit is successful.





New Server Runtime



After commiting changes, folder will be changed to Sync stage again which will turn the folder in to green again.





New Server Runtime



Show in Registry Browser

In the checked-out folder, you can view resources and collections in the registry browser. Select Show in Registry from the WSO2 Registry of the right click menu of the resource or collection.





New Server Runtime



Now the selected resource will be open in the WSO2 Registry Browser view.





New Server Runtime



View versions, restore versions

Go back to the WSO2 Registry perspective. Resources have different versions. If there are versions available for the resource, it will be displayed in the right click menu of the resource. We display the latest five versions.





New Server Runtime



You can either view or Restore version. When you click View, it will display the content of the version. By Restore option, we will reset the selected version to the previous version.

Double click on a resource to open the resource in the relevant editor of Eclipse

By double clcking on a resource, you can view it in the supported editor.

Add, modify, delete users

You can add, modify and delete users. Expand USER node and right click on the Users and select Add users.





New Server Runtime



Now you will get a form where you have to enter name, password and roles related to the user. Password should be more than six characters long.





New Server Runtime



Fill necessary information for the fields and press OK.





New Server Runtime



Now you will see the added user under Users.





New Server Runtime



You can modify user information you have given before by clicking on the Modify User Info option of the right click menu of the selected user.





New Server Runtime



Change role permissions of resources

With this feature, you can change resoources and set permissions to those resource of the given role. This feature is availble for non-admin roles. Go to non-admin role such as everyone or wso2.annonymous.role and select Change Permission from the right click menu.





New Server Runtime



Then it will pop up a wizard where you can select resources or collections from available registry instances.





New Server Runtime



You can do multiple selections from this registry browser.





New Server Runtime



In the next page of the wizard, you can assign permissions to the selected resources. Permission will be grayed if you select multiple resources and not all of them are already assigned to that permission. Select the permissions you want to add and click Finish.





New Server Runtime



Selected permissions will be added to the resources you choose.