Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

WSO2 Developer Studio can be used to manage a remote Governance Registry server from inside eclipse IDE. This document explains how to get this functionality.

Table of Contents

...

maxLevel4
minLevel3

Adding different remote registry instances

  1. Open the WSO2 registry perspective

    You can either open the Developer Studio dashboard and click Switch to registry perspective or click Window > Open Perspective > Other > WSO2 Registry. In this perspective you will get a WSO2 Registry Browser view.

    Image RemovedImage Added

  2. Add a remote registry instance

    On the WSO2 Registry Browser view, click the Add Registry icon.



    In the dialog box that appears, fill in the necessary information. The default information for WSO2 Governance Registry has been automatically filled in. 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.

    If you selected root (/) as the path, you will get the following registry tree:

    If you selected /_system/local as the path, you will get the following registry tree:

...

Adding collections and resources

Info

Do not set the media type for WSDLs and WSDL resources (it is then automatically set to application/xml). This is done to ensure that the WSDL handler does not intercept the Registry Put PUT operation.

  1. Add a new collection

    Expand the Repository node and select the root collection. Then right , right-click on the root (/) collection and you will see the functionalities available. Clickclick Add a new Collection and you will get an editor .

    Image Added

    An editor appears where you can enter a name, media type and description for the collection.

    This editor will act as a normal editor so to To add the collection, you have to save the changes (CTRL + S) done in the editor. To save press ctrl+s and a new A new collection with the given name will be added to the selected node that you selected.
    Image Removed 

    Image Added


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

    Image RemovedImage Added

  2. Add a new resource

    Select a collection, right-click on it and click Add a new resource. You will get the same editor as you get got for the collection. You have three ways to can add a resource .in the following ways:

    1. Upload content from file
    2. Create custom content
    3. Import content from URL
    1. Upload content from file
      This is the default method to add a resource. Browse to the file you want to add from the file system. Resource name and media type will be filled accordingly. You can change those the default values according to your preference as well.
      Image Removedif required. 

      Image Added
    2. Create custom content

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

      Image Removed Image Added

    3. Import content from URL

      Using 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 The name and media type field will be filled according to the given URL. You have to ability to modify them according to your preference as well.Image Removedcan change the values if required.

      Image Added

After adding a resource to your G-Reg project, the resource editor appears. If you close the editor and want to open it again at any point, simply select your registry resource project from the Project Explorer, right-click and click Registry Resources Editor.

Image RemovedImage Added

It is also possible to edit the provided information later. To edit media type or resource description, select the resource, right-click on it the resource and select click Information from the menu. You  You can delete the collection or resource you added by right-clicking on the resource or collection and clicking DeleteWhen you select the delete option, a confirmation dialog box pops up. Click Yes to proceed.

...

Adding properties, associations, dependencies, comments

...

and tags for a resource or collection

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

...

In the Metadata category, you can add Properties, Associations and Dependenciesadd properties, associations and dependencies. In the Community Features category, you can add Comments and Tagsadd comments and tags.

  1. Add metadata
     

    Image RemovedImage Added
    1. Add a property

      Right-click on the collection or resource to which you want to add a property and select click Metadata > Add a Property from the Metadata section of the context menu. Now you can see an editor to add properties, edit properties . On the editor that appears, you can add, edit and delete properties. There are two fields called Property Name  and  Property Value . You can enter values for these fields and save them.You can edit the fields later as well.

      Image Added 

      To delete a property, select the property and click Delete Property. When you click the delete button, you will see the the property you have selected has been greyed. You have the ability to . You can undo the action you did by using the clicking Undelete Property option. If not, the property will be removed when you save the editor.

      Image Removed

    2. Add a dependency
       
      Right-click on the collection or resource to which you want to add a property and select dependency and click Metadata > Add a Dependency from the Metadata section of the context menu.
      Then you will get the same editor as you get for properties where you can add dependencies to the selected resource.
      Image Removed. On the editor that appears, add the dependencies you need.

      Image Added


      Note that the path you are giving should be valid registry paths. Otherwise If not, an error message pops up appears when you click Save.
       

    3. Add an association

      Right click on the collection or resource to which you want to add an association and select click Metadata > Add an Association from the Metadata section of the context menu.
       
      Now you can see an editor to add associations, edit associations and delete associations.
      On the editor that appears, add the associations necessary. Note that the path you are giving should be valid registry paths. Otherwise If not, an error message pops up appears when you click Save.
      You  You can edit the values you gave, delete associations, and undo delete as you did in the property editorrequired.
      Image Removed
      Image Added
  2. Add community features

    Image RemovedImage Added

    1. Add comment

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

      Now On the editor that appears, you can see an editor to add comments, edit comments and delete comments. You can edit the fields you entered later as well. To  To delete a comment, select the comment and click Delete Comment . When you click the delete button, you will see the the comment you have selected has been greyed .

      Image RemovedImage Added

      You have the ability to can undo the action you did by using the clicking Undelete Property optionComment. If not, the comment will be removed when you save the editor.

    2. Add a tag

      Right click on the collection or resource to which you want to add a tag and select click Community > 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.Then you will get the same editor as you get for Add comments where you can add tags to the selected resource. You . On the editor that appears, you can add, edit and delete (or undelete) tags. You can give any string value as a tag.

      Image RemovedImage Added

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

      Image Removed

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

...

    1. Image Added

Linking with the editor

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

Link With Editor option is available only in the RepositroyRepository level, since it is a global function. To activate the Link With Editor option, select Repository, right-click on Repository and click Link With Editor. Same The same functionality is available in the toolbar of the WSO2 Registry Browser view as well.

Image RemovedImage Added

Now you can open several resources in seperate editors by double clicking on the resource. Swap You can swap among different editors. You will see the correct path related to the selected resource focused in the WSO2 Registry Browser view. 

...

Adding multiple files and

...

folders from file system

You can add multiple folders and files from the local file system. This option is availabe for a collection. Right-click on the collection to which you want to add multiple files and folders, and click Add local resources and choose the option you want.

  1. Multiple files
  2. FoldersFolder

Select multiple files or folders that you want to add and click OK. You will get a confirmation box to confirm your decision Click OK on the confirmation message.  The selected multiple resources will be added under the collection.

...

Importing/

...

exporting resources and collections

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

  1. Import From

    Go to the collection to which you want to import resources, right-click and select click Import From. Then you will get a dialog box where you can  On the dialog box that appears, select the resources that you want to import from the available registry instances.  You can browse Browse through the registry instance and , select the resource or collection you need and click  click OK.

    Image Removed


    A confirmation dialog box appears. After the confirmation, the Click OK on the confirmation message that appears. The imported resource will be added under the selected collection. Image Removed
  2. Export To

    Go to the collection or resource you want to export to another location. Right-click and click Export To. Then you will get the same Registry Tree Browser dialog box to  On the dialog box that appears, choose the location to which you want to export the resource. Browse the registry, select the path and click click OK.

    Press Click OK on the confirmation dialog box as wellmessage that appears. Now you will see the selected resource has been exported to the given location.

Drag

...

and drop resources and collections

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

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

...

Modifying permission for a resource

...

or collection

With this functionality, you You can modify the permission of the a resource or the collection. Go to the collection or resource, right click and select collection by right-clicking on the resource or collection and clicking Modify Permissions.

Now you will get a dialog box for changing permissions. In the dialog box that appears, you will see availble available roles and their permissions. You can define the permissions and press click OK. You  You can check whether the permission has been changed from the management console as well as from the tool.

From the management console:

Image RemovedImage Added

From the tool:

...

Refreshing the registry

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

...

Viewing information per resource and collection

You can view information related to a resource or collection by right-clicking and selecting clicking Information.

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

...

Checking-out a collection to a local project

You can check-out a resource or a collection to a local project in the workspace. Right-click on the resource or collection and select click Checkout.

Select the checkout location. If you have any projects in the workspace, they are shown in the dialog box. If not, the dialog box is blank. As a result, you have to create a project in the workspace before checkchecking-out.

A checked-out resource can have several states.

...

If you add a new file, the state will change to Added and the folder will have a star icon.

...

Updating the registry

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

To check-in, right-click the folder that has been updated, which will have an icon in yellow, and click Commit click WSO2 Registry > Commit changes as user from the WSO2 Registry category.

If you have several registry instances with different users, you can choose as to what user you want to commit the folder. Give  Give the correct credentials and you will get a message confirming that the commit was successful.

After committing the changes, the folder will be changed to the Sync stage again where the folder icon will be green again.

...

Viewing and restoring 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 The five latest versions are displayed.

Image RemovedImage Added

You can either view or Restore either view or restore a version. When you click View, it will display the content of the version is displayed. The Restore option will reset the selected version to the previous version.

...

Opening 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 the UserStore node, right click on Users and click Add users.

Now you will get a form where you have to enter the name, password and roles related to the user. Password should be more than six characters long. Fill the necessary information in the fields and click Finish.

Image Removed

Now you will see the added user under Users. You can modify the user information you have given by clicking on the Modify User Info option of the right click menu of the selected user.

Image Removed

...

Changing role permissions of resources

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

A wizard appears where you can select resources or collections from available registry instances. You  You can make multiple selections from this registry browser.

Image Removed

In the next page of the wizard, you 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. The  The selected permissions will be added to the resources you choose.