Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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.

Add different remote registry instances

  1. Select WSO2 registry perspective

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

  2. Add a remote registry instance

    Right click on the WSO2 Registry Browser view and fill the necessary information in the dialog box. The default information for WSO2 Governance Registry has been automatically filled in. 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.

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

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

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

Add, edit, delete collections, resources

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 operation.

  1. Add a new collection

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

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


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

  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 for the collection. You have three ways to add a resource.

    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 the file you want to add from the file system. Resource name and media type will be filled accordingly. You can change those default values according to your preference as well.

    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.

    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 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.

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.

It is also possible to edit the provided information later. To edit media type or resource description, select the resource, right click on it and select Information from the menu. 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.

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

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

  1. Metadata
  2. Community Features

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

  1. Add metadata


    1. Add a property

      Right click on the collection or resource to which 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. 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. 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 undo the action you did by using the Undelete Property option. If not, the property will be removed when you save the editor.

    2. Add a dependency

      Right click on the collection or resource to which you want to add a property and select 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.


      Note that the path you are giving should be valid registry paths. Otherwise an error message pops up 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 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. Note that the path you are giving should be valid registry paths. Otherwise an error message pops up when you click Save.

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

  2. Add community features

    1. Add comment

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

      Now you can see an editor to add comments, edit comments and delete comments. You can edit the fields you entered later as well. 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 .

      You have the ability to undo the action you did by using the Undelete Property option. 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 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 can give any string value as a tag.

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

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

Link with 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 Repositroy level, since it is a global function. To activate the Link With Editor option, select Repository, right click and click Link With Editor. Same functionality is available in the toolbar of the WSO2 Registry Browser view as well.

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

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. 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. Folders

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

Import/Export 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 for a Collection since you cannot import a collection or resource under a Resource.

  1. Import From

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


    A confirmation dialog box appears. After the confirmation, the imported resource will be added under the selected collection.

  2. Export To

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

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

Drag/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 functionality. After confirming, the 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, right click and select Modify Permissions.

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

From the management console:

From the tool:

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 Refresh by right clicking as well as from the toolbar of the WSO2 Registry Browser view.

View information per resource and collection

You can view information related to a resource or collection by right clicking and selecting 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.

Check-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 and select 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 check-out.

A checked-out resource can have several states.

  1. Synched
  2. Updated
  3. Conflicted
  4. Added
  5. Resolved

When you check-out, it is at the sync state so the folder will have a green icon.

If you double click a resource, edit and then save, the state will change to Updated and the folder icon will be yellow.

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

Do changes and commit back to registry, update with 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 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 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.

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 five latest versions.

You can either view or Restore version. When you click View, it will display the content of the version. The Restore option 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 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.

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.

Change role permissions of resources

With this feature, you can change resoources and set permissions to those resources of the given role. This feature is availble for non-admin 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 can make multiple selections from this registry browser.

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 FinishThe selected permissions will be added to the resources you choose.

  • No labels