This documentation is for WSO2 Governance Registry 5.0.1. View documentation for the latest release.
||
Skip to end of metadata
Go to start of metadata

This topic provides a sample on how to create a registry extension file which introduces an Event data model. See here for information on how to use the configuration elements.

Configuration Model

<artifactType hasNamespace="true" iconSet="9" pluralLabel="Events" shortName="events"
singularLabel="Event" type="application/vnd.wso2-events+xml">
        <storagePath>/events/@{details_name}</storagePath>
        <nameAttribute>details_name</nameAttribute>
        <namespaceAttribute>details_namespace</namespaceAttribute>
        <ui>
            <list>
                <column name="Name">
                    <data href="@{storagePath}" type="path" value="details_name"/>
                </column>
                <column name="Description">
                    <data href="@{storagePath}" type="path" value="rules_description"/>
                </column>
            </list>
        </ui>
        <content>
            <table name="Details">
                <field required="true" type="text">
                    <name>Name</name>
                </field>
                <field required="true" type="text">
                    <name>Namespace</name>
                </field>
                <field required="true" type="text">
                    <name>Date</name>
                </field>
                <field required="true" type="text">
                    <name>Venue</name>
                </field>
            </table>
            <table name="Rules">
                <field type="options">
                    <name>Gender</name>
                    <values>
                        <value>male</value>
                        <value>female</value>
                    </values>
                </field>
                <field type="text-area">
                    <name>Description</name>
                </field>
                <field type="text">
                    <name>Auther</name>
                </field>
            </table>
            <table name="Participants">
                <subheading>
                    <heading>House</heading><heading>Name</heading>
                </subheading>
                <field maxoccurs="unbounded" type="option-text">
                    <name label="Contact">Contact</name>
                    <values>
                        <value>Titans</value><value>Legions</value><value>Cloud Bots</value><value>Wild Boars</value>
                    </values>
                </field>
            </table>
            <table name="Service Lifecycle">
                <field type="options">
                    <name label="Lifecycle Name">Lifecycle Name</name>
                    <values class="org.wso2.carbon.governance.services.ui.utils.LifecycleListPopulator">
                </values></field>
            </table>
            <table name="SLA" columns="3">
                <subheading>
                    <heading>Document Type</heading><heading>URL</heading><heading>Comment</heading>
                </subheading>
                <field path="true" type="text" url="true">
                    <name>SLA</name>
                </field>
                <field path="true" type="text" url="true">
                    <name>SLA1</name>
                </field>
                <field path="true" type="text" url="true">
                    <name>SLA2</name>
                </field>
            </table>
        </content>
    </artifactType>

Main Elements of the Configuration Model

To learn more information about each element and some of their attributes, please visit the Governance Artifacts Configuration Model Elements page.

Setting permissions to the parent collection path

After creating a new RXT file, you need to set permissions using the following methods to provide READWRITEDELETE, and AUTHORIZE permissions to the parent collection path.

Permissions are set by default for the default user roles and artifact types. You need to set permission for the roles created by you for the new artifact type that you are creating.

Using the management console

Follow the steps below to set permissions via the Management Console.

  1. Log in to the WSO2 G-Reg Management Console, and click Main → Resources → Browse.
  2. Navigate to the parent collection (e.g., /_system/governance/test/contacts/names) and click on it.
  3. Add the new role in the Permissions section as shown in the example below. For more information, see Role Permissions.
    set permissions to the role

Using the product binary distribution

Follow the steps below to set permissions via the product binary distribution.

  1. Open the <G-REG_Home>/repository/conf/etc/permission-mappings.xml file.
  2. Add following configurations to the end of the file.

    <mapping managementPermission="/permission/admin/manage/resources/govern/imapersonne/add" resourcePermission="http://www.wso2.org/projects/registry/actions/get" resourcePaths="/_system/governance/ima/contacts/personnes"/>
    <mapping managementPermission="/permission/admin/manage/resources/govern/imapersonne/add" resourcePermission="http://www.wso2.org/projects/registry/actions/add" resourcePaths="/_system/governance/ima/contacts/personnes"/>
    <mapping managementPermission="/permission/admin/manage/resources/govern/imapersonne/add" resourcePermission="http://www.wso2.org/projects/registry/actions/delete" resourcePaths="/_system/governance/ima/contacts/personnes"/>
    <mapping managementPermission="/permission/admin/manage/resources/govern/imapersonne/list" resourcePermission="http://www.wso2.org/projects/registry/actions/get" resourcePaths="/_system/governance/ima/contacts/personnes"/>
  • No labels