cai URL under the covers

Mikkel wrote about the CAI url posting Niklas put on the Composite Application wiki. These are all good comments about the format of the URL so I am not going to address the ugliness – I will just say there is a method to the madness.

What I can show you is, you can actually create the URL in code fairly easy (if you are on the Java side of the house of course). Since the page id is the perspective identifier you can use the Eclipse Workbench API's to get that. Then, you can use the method I wrote about in the wiki to get the meta-data associated with the page. Once you get the page object, the application the page is contained in is stored in the property “applicationGUID”. You now have the GUID and the page ID for the cai url.

You can also use the OSGI console to see this same information. Start with using the “thsh p” command on the osgi console. Then use the “thsh nctx ” to get the properties that are written to the extension registry for the page. Lastly, you can do the same thing with components: get the list of components on a page with “thsh sc ” and that will show the properties for that component.

See the sample console output below.

Topology OSGI commmands:

---Topology Handler Commands---
thsh n - Show all navigation elements
thsh p - Show all Pages
thsh l - Show all Labels
thsh f - Show all topology files
thsh apps - Show all application GUIDs
thsh e - Show all registered extensions under the given namespace
thsh dp - Show all dirty pages
thsh nattr - Show all navigation preferences
thsh nctx - Show navigation context
thsh sc - Show components for a page
thsh b - Show copies of the specified page

Sample console output:


osgi> thsh p
------------------------------------------------
Topology Handler All Page Elements
------------------------------------------------
Application GUID: 11_5JMPDRH1000980269G784H2GO41209749441490
--------------------------------
TYPE_PERSPECTIVE; NAME = test application; ID = 6_5JMPDRH1000980269G784H2GO11209749441490; Application GUID = 11_5JMPDRH1000980269G784H2GO41209749441490

Application GUID: 11_ITM9DGL1087KE02MQFOQ5C2GK3
--------------------------------
TYPE_PERSPECTIVE; NAME = Browser sample; ID = 6_ITM9DGL1087KE02MQFOQ5C2G26; Application GUID = 11_ITM9DGL1087KE02MQFOQ5C2GK3
TYPE_PERSPECTIVE; NAME = Portlet to Portlet Communication sample; ID = 6_ITM9DGL1087KE02MQFOQ5C2GQ6; Application GUID = 11_ITM9DGL1087KE02MQFOQ5C2GK3
TYPE_PERSPECTIVE; NAME = Portlet to SWT Communication sample; ID = 6_ITM9DGL1087KE02MQFOQ5C2GE5; Application GUID = 11_ITM9DGL1087KE02MQFOQ5C2GK3
TYPE_PERSPECTIVE; NAME = SWT to Portlet Communication sample; ID = 6_ITM9DGL1087KE02MQFOQ5C2BB1; Application GUID = 11_ITM9DGL1087KE02MQFOQ5C2GK3
TYPE_PERSPECTIVE; NAME = Double Browser sample; ID = 6_ITM9DGL1087KE02MQFOQ5C2GP7; Application GUID = 11_ITM9DGL1087KE02MQFOQ5C2GK3
TYPE_PERSPECTIVE; NAME = URL Selector to Launch Dynamic Action Page; ID = nav_CrossPageSource1; Application GUID = 11_ITM9DGL1087KE02MQFOQ5C2GK3
TYPE_PERSPECTIVE; NAME = Dynamic Action Accepts a URL; ID = nav_CrossPage_ShowURL1; Application GUID = 11_ITM9DGL1087KE02MQFOQ5C2GK3

Application GUID: 1F_3KE527R20OGG702ELBAT9T10P0
--------------------------------
TYPE_PERSPECTIVE; NAME = Getting Started; ID = 6_3KE527R20OGG702ELBAT9T1091; Application GUID = 1F_3KE527R20OGG702ELBAT9T10P0

Application GUID: 1F_3KE527R20OGG702ELBAT9T10K7
--------------------------------
TYPE_PERSPECTIVE; NAME = Home; ID = 6_3KE527R20OGG702ELBAT9T10K6; Application GUID = 1F_3KE527R20OGG702ELBAT9T10K7

Application GUID: 11_5JMPDRH1000980269G784H2GO41209697938390
--------------------------------
TYPE_PERSPECTIVE; NAME = testApp; ID = 6_5JMPDRH1000980269G784H2GO11209697938390; Application GUID = 11_5JMPDRH1000980269G784H2GO41209697938390

Application GUID: BD973A4E8C0FCDED54C69CB23940B5FC_1F_3KE527R200VQ502MGJOIMC2096
--------------------------------
TYPE_PERSPECTIVE; NAME = Mail; ID = BD973A4E8C0FCDED54C69CB23940B5FC_6_3KE527R200VQ502MGJOIMC20H7; Application GUID = BD973A4E8C0FCDED54C69CB23940B5FC_1F_3KE527R200VQ502MGJOIMC2096
TYPE_PERSPECTIVE; NAME = Calendar; ID = BD973A4E8C0FCDED54C69CB23940B5FC_6_3KE527R200VQ502MGJOIMC20T2; Application GUID = BD973A4E8C0FCDED54C69CB23940B5FC_1F_3KE527R200VQ502MGJOIMC2096
TYPE_PERSPECTIVE; NAME = To Do; ID = BD973A4E8C0FCDED54C69CB23940B5FC_6_3KE527R200VQ502MGJOIMC20T7; Application GUID = BD973A4E8C0FCDED54C69CB23940B5FC_1F_3KE527R200VQ502MGJOIMC2096

osgi> thsh nctx BD973A4E8C0FCDED54C69CB23940B5FC_6_3KE527R200VQ502MGJOIMC20H7
------------------------------------------------
Topology Handler Navigation Element Context
------------------------------------------------
Context values for navigation BD973A4E8C0FCDED54C69CB23940B5FC_6_3KE527R200VQ502MGJOIMC20H7
com.ibm.portal.app.input.launchUrl = notes:///852568BD0051EF1E/MailFS?OpenFrameset&or1flg=32&hashId=BD973A4E8C0FCDED54C69CB23940B5FC
requestUrl = nrpc:/__852568BD0051EF1E/composite.xml?file=mail%5Cbbalfe.nsf&name=NotesMailApps.xml&launchUrl=notes%3A%2F%2F%2F852568BD0051EF1E%2FMailFS%3FOpenFrameset%26or1flg%3D32%26hashId%3DBD973A4E8C0FCDED54C69CB23940B5FC
com.ibm.portal.app.input.name = NotesMailApps.xml
com.ibm.portal.app.input.file = mailbbalfe.nsf
applicationGUID = BD973A4E8C0FCDED54C69CB23940B5FC_1F_3KE527R200VQ502MGJOIMC2096

osgi> thsh sc BD973A4E8C0FCDED54C69CB23940B5FC_6_3KE527R200VQ502MGJOIMC20H7
Component data for component id = BD973A4E8C0FCDED54C69CB23940B5FC_5_3KE527R208CCC02M6C5LO53091
----------------------------------------------------
portletname = Notes 8.0 Mail Nav
portletwindowid = BD973A4E8C0FCDED54C69CB23940B5FC_5_3KE527R208CCC02M6C5LO53091
com.ibm.portal.app.input.launchUrl = notes:///852568BD0051EF1E/MailFS?OpenFrameset&or1flg=32&hashId=BD973A4E8C0FCDED54C69CB23940B5FC
com.ibm.rcp.id = TMP_10006
com.ibm.rcp.ratio = 0.5
com.ibm.rcp.viewId = com.ibm.rcp.csiviews.viewpart.CSINavViewPart
com.ibm.rcp.fastView = false
applicationGUID = BD973A4E8C0FCDED54C69CB23940B5FC_1F_3KE527R200VQ502MGJOIMC2096
com.ibm.rcp.closeable = false
com.ibm.rcp.csiviews.viewpart.dburl = notes:///852568BD0051EF1E/MailFS?OpenFrameset
requestUrl = nrpc:/__852568BD0051EF1E/composite.xml?file=mail%5Cbbalfe.nsf&name=NotesMailApps.xml&launchUrl=notes%3A%2F%2F%2F852568BD0051EF1E%2FMailFS%3FOpenFrameset%26or1flg%3D32%26hashId%3DBD973A4E8C0FCDED54C69CB23940B5FC
com.ibm.rcp.moveable = true
com.ibm.rcp.title = Notes Mail Navigator
com.ibm.rcp.extensionType = simple view
com.ibm.rcp.showTitle = true
com.ibm.rcp.showquota = true
com.ibm.portal.app.input.file = mailbbalfe.nsf
com.ibm.rcp.objectId = BD973A4E8C0FCDED54C69CB23940B5FC_5_3KE527R208CCC02M6C5LO53091
com.ibm.portal.app.input.name = N otesMailApps.xml
com.ibm.rcp.standalone = true
com.ibm.rcp.visible = true

Tags: : :

Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.