Searching is a fundamental requirement of a repository. Governance Registry allows searching in previous versions using the Governance API and/or using the management console.
Using the Governance API
You can use the
findGenericArtifact (String query, Registry registry, String mediaType) method in the
GovernanceUtils as well as in the
GenericArtifactManager to query for the results. The first parameter is the the query string. The second parameter is the governance user registry instance. The third parameter is the media type of the artifacts being searched. If you pass an empty string ("") the search is a cross type search unless you specifically include a media type in the query string itself.
Some example queries are shown below:
xyz - Searches for artifacts with the name xyz
xyz&version=1.3.5 - Searches for artifacts with the name xyz with version 1.3.5
tags=abc - Searches for artifacts with the tag 'abc'
lcState=development&lcName=ServiceLifeCycle - Searches for artifacts with an associated lifecycle name and the
ServiceLifeCycleset to 'development' state
country=usa - Searches for all artifacts with the value 'usa' in the country attribute. This internally handles whether country is an rxt attribute or a property.
version=1.3.5&mediaType=application/vnd.wso2-soap-service+xml - Searches only for soap services with version 1.3.5
Using the management console
The G-Reg publisher/store displays assets and each asset type has a search box in the publisher and store. You can type in the query in a similar syntax as above to search for respective artifacts, but replace the equals sign (=) with the colon (:) and the ampersand (&) with a space.