Versions Compared

Key

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

G-Reg Publisher supports enabling first level of categorization for asset types that are stored in it. Once you define the categories within any <table> element in the RXT of an asset type, you can select the category of the asset, when creating itFor This feature allows you to further filter (narrow down) the results of a particular search, by selecting a specific value or a set of values for a given attribute in WSO2 G-Reg Store. You can provide the filtering criteria for multiple attributes.

You can configure this in the RXT of the asset type. For an example, you can enable categorization by adding a new field fields to a new Information new Categorization table of SOAP Services as explained below. 

  1.  Log in to the WSO2 G-Reg Management Console using the following URL and admin/admin credentials: https://<G-REG_HOST>:<G-REG_PORT>/carbon/
  2. Click Click Extensions, and then click click Artifact Types in the  in the Configure menu menu.
  3. Click the corresponding corresponding View/Edit link  link of the artifact type, in which you want to enable categorization a shown below.
    select artifact typeImage RemovedImage Added
  4. Add the following configuration to add an option field with the name Category to a new Information table of the rest option fields to a new Categorization table of the SOAP service RXT using the provided Editor as shown below. 

    Code Block
    languagexml
    <table name="InformationCategorization">
       
    <field type="options" categorization="true">
            <name label="CategoryBusiness">Cat<>Business</name>
          
     <values>
    <value>Customer Care</value>
    <value>Corporate</value>
    <value>Gas Technology</value>
    <value>Energy Supply</value>
    <value>Information     <value>None<Technology</value>
    </values>
    </field>
    <field type="options" categorization="true">
    <name label="Availability">Availability</name>
    <values>
    <value>Tier 1</value>
    <value>Tier  <value>Engineering<2</value>
    <value>Tier 3</value>
    <value>Tier 4</value>
    </values>
    </field>
    <field type="options" categorization="true">
    <name label="Environment">Environment</name>
    <values>
    <value>Finance<<value>Dev</value>
    <value>Test</value>
    <value>QA</value>
    <value>Disaster          <value>HR<Recovery</value>
    <value>Production</value>
    </values>
    </field>
    <field type="options" categorization="true">
    <name label="Platform">Platform</name>
    <values>
    <value>J­EE</value>
    <value>ETL</value>
    <value>File Transfer</value>
    <value>Sales<<value>EDI</value>
    <value>ESB</value>
    </values>
    </field>
    <field type="options" categorization="true">
    <name label="Service Type">Service Type</name>
    <values>
    <value>HTTP­SOAP</value>
    <value>Marketing<<value>HTTP­REST</value>
    <value>JMS­XML</value>
    <value>JMS­JSON</value>
          <value>JMS­BINARY</value>
    </values>
        </field>
    </table>
    Info

    You can enable categorization by adding adding an option field to any of the existing tables in the RXT of a particular type (e.g. Overview).

  5. Click

    Click Save, and then

    click

    click Ok

    in

     in the message which pops-up as shown below.

    Image Modified

  6. Add a new new categoryField within the the categories element  element under the the asset.configure function function for each field, in the the <G-REG_HOME>/repository/deployment/server/jaggeryapps/store/extensions/assets/default/asset.js file as  file as follows.

     

    Info

    Add the value of the the categoryField property  property in the following format: <TABLE_NAME>_<FIELD-NAME>. You can pick the the <TABLE_NAME> from  from the RXT of the particular asset type, and the the <FIELD-NAME> from  from the configuration you added to the RXT.

     

    Code Block
    languageactionscript3js
    categories: {
    categoryField: 'overviewCategorization_categoryBusiness',
    categoryField: 'Categorization_Availability',
    categoryField: 'Categorization_Environment',
    categoryField: 'information_cat'
    },
  7. Restart the WSO2 G-Reg server.

You view the new field you added to enable categorization when creating a SOAP Service using the G-Reg Publisher as shown below.

new category field in PublisherImage Removed

You can use categorization to search for a SOAP Service in the G-Reg Publisher by its category as shown below.

search using Categories in PublisherImage Removed

Also, you can use categorization to search for a SOAP Service in the G-Reg Store by its category as shown below.

...

  1. 'Categorization_Platform',
    categoryField: 'Categorization_Service Type',
    },