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 it. For 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.
- 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/
- Click Click Extensions, and then click click Artifact Types in the in the Configure menu menu.
- Click the corresponding corresponding View/Edit link link of the artifact type, in which you want to enable categorization a shown below.
Add the following configuration to add an option field with the name
Category
to a newInformation
table of the rest option fields to a newCategorization
table of the SOAP service RXT using the provided Editor as shown below.Code Block language xml <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>JEE</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>HTTPSOAP</value> <value>Marketing<<value>HTTPREST</value> <value>JMSXML</value> <value>JMSJSON</value> <value>JMSBINARY</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
).- Click
Click Save, and then
clickclick Ok
inin the message which pops-up as shown below.
Add a new new
categoryField
within the thecategories
element element under the theasset.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 language actionscript3js categories: { categoryField: 'overviewCategorization_categoryBusiness', categoryField: 'Categorization_Availability', categoryField: 'Categorization_Environment', categoryField: 'information_cat' },
- 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.
You can use categorization to search for a SOAP Service in the G-Reg Publisher by its category as shown below.
Also, you can use categorization to search for a SOAP Service in the G-Reg Store by its category as shown below.
...
'Categorization_Platform', categoryField: 'Categorization_Service Type', },