Skip to main content

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

GREGES
  1. greg-apis  
  2. greg-diff  
  3. greg-diff-api  
  4. greg_impact  
  5. greg_store 
  6. greg-store-defaults  
  7. greg_swagger  
  8. soap-viewer
9.   social-reviews
10. store-apis
11. store-common 
(B) - Asset Extensions

GREGES
  1. endpoint  
  2. policy  
  3. restservice  
  4. schema  
  5. soapservice  
  6. swagger  
  7. wadl  
  8. wsdl
9.   default
10. gadget
11. site
GREG - Publisher & ES - Publisher

(C) - App Extensions

GREGES
  1. greg-apis  
  2. greg-associations  
  3. greg-diff  
  4. greg-diff-api  
  5. greg_impact  
  6. greg-permissions  
  7. greg_publisher  
  8. greg-publisher-defaults  
  9. greg_swagger 
  10. soap-viewer
11. publisher-apis
12. publisher-common
 (D) - App Extensions

GREGES
  1. endpoint  
  2. note  
  3. policy  
  4. restservice  
  5. schema  
  6. server  
  7. site  
  8. soapservice  
  9. swagger  
  10. wadl  
  11. wsdl
12. default
13. gadget
14. site

What is the difference between asset extensions and app extensions ?

App extensions can facilitate common functionality applicable through out each asset type.

Asset extensions defines asset type specific functionality.


Where does the common functionality to both application exists?

/modules

 What is the overriding hierarchy of the extensions? How do we define it?

When we simply create a folder in the extensions/app or extensions/asset folders it becomes an app or asset extension. But we can define which extension it overrides by including a app.js or asset.js with the following line.

app.dependencies = ['default'];

The 'default' key word is the name of the folder/extension it overrides.

For an example, (A)-5 overrides (A)-11 ("greg-store" overrides "store-common"). If we open the file "store/extensions/app/greg_store/app.js" the following line is visible in the top.

app.dependencies=['store-common'];

(A)-6 overrides (B)-9. "greg-store-defaults" overrides "default" asset extension. Yes, it's possible to override asset extensions from app extensions.





Comments

Popular posts from this blog

Using javascript to Include a html file inside another html file

When there is no server side functionality needed we create the whole site in plain html. Usually these sites have left/right side menu, top header, footer etc.. If the site grows in to 20, 30 pages, it will be a headache to do a simple change like changing footer text. We will have to change each page. If we were using a server side technology like PHP, JSP, etc.., we will have the chance to keep the common areas in the site in different pages and include these parts in each page using a “include” statements. We can do the same thing with the plain old html and javascript. But how? First you need to create the site main layout using divs and give them unique ids. <html> <title>HTML Includes</title> <script language="javascript" src="js/main.js"></script> <script src="js/prototype.js" type="text/javascript"></script> <script language="javascript" xml:space="preserve"> // <

APIM 3.0 - populate multiple apis - bash script

Created a bash script to create, tag and publish multiple APIs. This is useful to populate data for the landing page. #!/bin/bash # get the URL consumer key clientId=$(curl -k -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -d @payload.json https://localhost:9443/client-registration/v0.14/register | jq -r '.clientId') clientSecret=$(curl -k -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -d @payload.json https://localhost:9443/client-registration/v0.14/register | jq -r '.clientSecret') echo $clientId echo $clientSecret encoded=$(echo -ne $clientId:$clientSecret | base64) echo $encoded # get access token accessToken=$(curl -k -d "grant_type=password&username=admin&password=admin&scope=apim:api_view,apim:api_create" -H "Authorization: Basic $encoded" https://localhost:9443/oauth2/token | jq -r '.access_token'

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