Skip to main content

Posts

Showing posts from 2016

Overriding default look and feel of GREG - 5.3.0

Following list explains what are the best approach for different use cases. 1 ) - You created a new asset type, and you need to change the look and feel of the details page in the listing page just for that new asset type. To create a new asset type you need to login to the carbon console (username:admin, password:admin) https:// :9443/carbon/ Navigate to Extensions > Configure > Artifacts Click "Add new Artifact" link at the bottom of the page. By default in the "Generic Artifact" area "application" asset type is loaded. Note the shortName="applications" in the root node. "applications" is the name of the asset type. Browse in to /repository/deployment/server/jaggeryapps/store/extensions/assets Create a folder with name "applications"    Now we can override the files in /repository/deployment/server/jaggeryapps/store/extensions/app/greg-store-defaults   Since we are overriding the details page we need to

Understanding GREG extension hierarchy

GREG is developed on to of Enterprise Store. So the GREG is married to the ES Extension model. By default ES ships few extensions. Following are the list of extensions shipped with ES. Following is the list of additional extensions available with GREG. Following listing have GREG extensions in the left and ES extensions shipped by default on the right hand side GREG - Store & ES - Store (A) - App Extensions GREG ES greg-apis   greg-diff   greg-diff-api   greg_impact   greg_store  greg-store-defaults   greg_swagger   soap-viewer 9.   social-reviews 10. store-apis 11. store-common  (B) - Asset Extensions GREG ES endpoint   policy   restservice   schema   soapservice   swagger   wadl   wsdl 9.   default 10. gadget 11. site GREG - Publisher & ES - Publisher (C) - App Extensions GREG ES greg-apis   greg-associations   greg-diff   greg-diff-api   greg_impact   greg-permissions   greg_publisher   greg-publish

Role of GREG permission-mappings.xml

 GREG has a permission-mapping.xml. We can find it at /home/chanaka/Desktop/greg/wso2greg-5.2.0/repository/conf/etc/permission-mappings.xml Each entry has three attributes. managementPermission resourcePermission resourcePaths  Ex: managementPermission="/permission/admin/manage/resources/govern/server/list" resourcePermission="http://www.wso2.org/projects/registry/actions/get" resourcePaths="/_system/governance/trunk/servers" /> There are default configurations in this file. These entries are mapping each permission in the permission tree in to resource paths and assign them permissions. With the above line in the permission-mappings.xml, an admin user who assign the permission " /permission/admin/manage/resources/govern/server/list " will be able to do get operations on registry resources stored at " /_system/governance/trunk/servers ". We can provide multiple resource paths by separating them by comas. There

Adding custom validations to WSO2 Enterprice Store - Publisher asset creation page.

Writing an asset extension Asset extensions allows to create custom functionalities and look and feel to a certain asset type in WSO2 Enterprise Store. With this example, I am going to create a new asset type and add a custom validation to the asset creation page. Download WSO2ES product distribution from wso2.com and extract it to your local drive. Start the server and fire up browser with the admin console url. https:// :9443/carbon/ Navigate to Extensions > Configure > Artifact Types and click the "Add new Artifact" link. This will load the UI with a new default artifact. Notice that it has following attributes in it's root node. shortName="applications" singularLabel="Enterprise Application" pluralLabel="Enterprise Applications" "applications" is the name of new asset type we are going to add. In our example we are going to do a custom validation to the asset creation page.