Versions Compared

Key

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

This sample explains how to create Accessible URLs for reports. You might also find the URL Accessibility For Searches Sample useful. We will be reusing the code of the Handler Sample and reusing logic of the Asset Models Sample in this example. This sample requires Apache Maven. See Installing Apache Maven for Governance Registry on Windows or Installing Apache Maven for Governance Registry on Linux. 

Instructions

1. Navigate to GREG_HOME/ samples/handler/src to find the source code of the Handler Sample.

...

Info
titleNote

The command mvn clean install will trigger an Apache Maven Build in your command line. This requires you having installed Apache Maven. See Installing Apache Maven for Governance Registry on Windows or Installing Apache Maven for Governance Registry on Linux.

A successful run of Apache Maven will generate a report similar to the following:

...

Code Block
languagehtml/xml
<handler class="org.wso2.carbon.registry.samples.handler.URIForReportHandler">
    <filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.URLMatcher">
        <property name="pattern">/_system/governance/reports/.*</property>
    </filter>
    <property name="registryURL">https://localhost:9443/registry</property>
</handler>

See also Handler Configuration Details.

7. Start the WSO2 Governance Registry. See Starting Governance Registry Management Console Installing on Windows or Starting Governance Registry Management Console Installing on Linux and Solaris.

8. Run the Asset Models Sample for Applications and create a few Applications in Governance Registry (to facilitate the generation of meaningful reports).

9. Navigate to the Manage Reports page, and Schedule the Application Report.

Image RemovedImage Added

10. Fill in the following parameters and schedule the report generation:

  1. Cron Expression - 0/10 * * * * ?
  2. Registry URL - https://localhost:9443/registry
  3. Username - admin
  4. Password - admin
  5. Resource Path - /_system/governance/reports/ApplicationReport.pdf

Image RemovedImage Added

Click the "Schedule" button to finish scheduling the report.

...

11. Finally navigate to the List URI page to see your URI added.

Image RemovedImage Added

See also Managing URIs.

Excerpt
hiddentrue

Instructions on how to create Accessible URLs for reports.