Skip to main content link. Accesskey S
  • Anonymous
  • Log on
  • Help
  • IBM logo
  • IBM Composite Applications wiki
  • All Wikis
  • Home
  • Community Articles
  • Product Documentation
  • Learning Center


Search

Advanced Search

Categories

Tag Cloud

  • 6.2
  • 6.2.1
  • 8.0.1
  • 8.5
  • 8.5+
  • 8.5.1
  • advanced features
  • advantages
  • API
  • app dev
  • assembling
  • basics
  • benefits
  • Browser
  • CAE
  • catalog
  • changing page properties
  • changing value to another type of value
  • code snippet
  • component library
  • component properties
  • components
  • Composite Application Editor
  • Composite Applications
  • container components
  • containers
  • custom actions
  • debugging
  • demos
  • deploying
  • designing
  • developing
  • Eclipse
  • Eclipse components
  • editing properties
  • Editor
  • education
  • enablement
  • Expeditor
  • extending
  • extensions
  • FAQ
  • feature rules
  • framework
  • getting started
  • Help
  • HOD
  • host on demand
  • how to
  • Java
  • lead manager
  • linking
  • live text
  • match rules
  • new users
  • Notes
  • Notes components
  • nsf
  • NSF components
  • overview
  • page navigation
  • page properties
  • Palette
  • PBE
  • PIM
  • plugins
  • Portal
  • preference
  • product documentation
  • programming
  • properties
  • property broker
  • property broker editor
  • Property Broker Monitor tool
  • provisioning
  • resources
  • roadmap
  • samples
  • setting component properties
  • Sidebar
  • sideshelf
  • Symphony
  • Symphony view component
  • technote
  • testing
  • toolkit
  • TopologyHandler
  • troubleshooting
  • tutorial
  • update site
  • updating
  • upgrading
  • video
  • view
  • Web
  • web services
  • white lists
  • widgets
  • Wiring
  • WSDL
InformationInformation
You are currently viewing machine translated content. IBM translation might be available. Click IBM Translated Product Documentation to see what is available.X


Home > Developing Components > Accessing component data using Eclipse APIs
Rate this article 1 starRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Accessing component data using Eclipse APIs 

expanded Abstract
collapsed Abstract
No abstract provided.
In this topic we show how you can access the component data using only Eclipse APIs. Why would you want to do this? Say your component may live in an Eclipse only environment - this method allows your component to install in an Eclipse only platform and no having a binary dependency on Expeditor API's. Another reason to use this approach is that Lotus Sametime doesn't have the Topology Handler API so if you want your component to run in Notes 8 and Sametime do not make your component depend on com.ibm.rcp.topologyhandler or com.ibm.pvc.sharedBundle.

The method shown here is a helper method were you would pass in the secondary identifier of the ViewPart. Remember, ViewParts have an identifier in the format :. It is the part that gets stored in the Eclipse extenion registry. This method attempts to lookup the components data in the Eclipse extension registry - it always returns an initialized Map so if your component is not in a composite application you will simply get an empty Map.

private Map getComponentAttributes(String secondaryViewId) {
IExtensionRegistry reg = RegistryFactory.getRegistry();
IExtension ext = reg.getExtension("com.ibm.rcp.topologyhandler" + "." + secondaryViewId);
if (ext == null)
return new HashMap();;

IConfigurationElement ce = ext.getConfigurationElements()[0];

Map map = new HashMap();

List keys = Arrays.asList(ce.getAttributeNames());
Iterator i = keys.iterator();
while (i.hasNext()) {

String key = (String )i.next();
String val = ce.getAttribute(key);
map.put(key, val);

}
return map;
}

The secondary id is easily obtained from the view site so if you have a ViewPart you get the view site and then the secondary id.

ViewPart viewpart = ...;
String secondaryId = viewpart.getViewSite().getSecondaryId();


expanded Article information
collapsed Article information
Category:
Developing Components
Tags:
Eclipse, API, samples, code snippet, programming

This Version: Version 3 July 19, 2010 4:32:19 PM by Neal A Timpe  IBMer

expanded Attachments (0)
collapsed Attachments (0)

 


expanded Versions (3)
collapsed Versions (3)
Version Comparison     
Version Date Changed by               Summary of changes
This version (3) Jul 19, 2010 4:32:19 PM Neal A Timpe  
2 Oct 11, 2009 5:32:07 PM Deanna Drschiwiski  
1 May 20, 2008 10:25:17 AM Robert F Harwood  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedSubscribe to RSSHelpAbout
  • All Lotus and WebSphere Portal wikis
  • IBM developerWorks
  • IBM Software support
  • IBM Social Business User Experience Blog
  • IBMSocialBizUX on Twitter
  • IBMSocialBizUX on Facebook
  • Lotus product forums
  • IBM Social Business UX blog
  • IBM Collaboration Solutions
  • Recently added feedRecently added
  • Recently edited feedRecently edited
  • Recently added comments feedRecently Added Comments
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Contact IBM
  • IBM Terms of use
  • Wiki terms of use