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


Search

Advanced Search

Categories

Tag Cloud

  • 6.2.1
  • 6.2.2
  • 6.2.3
  • access services
  • accounts
  • administer
  • application
  • applications
  • broker
  • client
  • client for desktop
  • client management
  • cluster
  • collecting data
  • configuration
  • configure
  • data integrity check tools
  • database
  • db2
  • db2e
  • deleting log entries automatically
  • demo
  • demonstration
  • desktop overview
  • develop
  • device
  • device client
  • diagnosis of problems. See troubleshooting
  • diagnostic data
  • diagnostic tool
  • documentation
  • download
  • environment variables
  • error messages
  • expeditor
  • expeditor server
  • expeditor toolkit
  • files
  • fix pack
  • gettingstarted
  • Help
  • how-to
  • IBM Support
  • install
  • installation
  • integration
  • integrator
  • interaction services
  • Interrogation Windows Tab
  • introduce
  • introduction
  • log files
  • messaging
  • micro
  • mobile databases
  • mobile databases
  • mobile devices
  • mqe
  • nci
  • notes
  • OpenSpan
  • OpenSpan Scripting Container
  • OpenSpan Windows Container
  • overview
  • platform
  • portlet
  • prerequisites
  • presentation
  • problems with synchronization. See troubleshooting.
  • purging log entries automatically
  • Release Notes
  • replication
  • resources on the Web
  • rich client application
  • samples
  • scripts
  • security
  • server
  • software
  • software prerequisites
  • support
  • support troubleshooting
  • Sync Client
  • Sync Server
  • synchronization
  • synchronization problems
  • tool
  • toolkit
  • tools
  • trace files
  • trace level
  • troubleshoot
  • troubleshooting
  • tutorial
  • use
  • was
  • web services
  • What's New
  • xcm
  • xpdt
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 > Expeditor Client for Desktop > Sample: Variable Substitution
Rate this article 1 starRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Sample: Variable Substitution 

expanded Abstract
collapsed Abstract
This sample supplements the "Using Dynamic Variable Substitution in Composite Applications" found on the IBM Composite Applications Wiki.
ShowTable of Contents
HideTable of Contents
  • 1 Overview
  • 2 Create the Extension
  • 3 Create the Substitution Logic
  • 4 Using Substitution

Overview


The Using Dynamic Variable Substitution in Composite Applications article demonstrates how variable substitution can be used during runtime to dynamically supply information to Composite Applications. This article demonstrates the extension point that allows substitution to occur.

Create the Extension


Add the org.eclipse.core.variables plugin to the dependency list. The org.eclipse.core.variables supplies the org.eclipse.core.variables.dynamicVariables extension point used to add your own variable substitution logic.

Extend and add your own substitution logic by adding the following extension.

<extension
         point="org.eclipse.core.variables.dynamicVariables">
      <variable
            description="Resolves variables for eclipse preferences.  The argument is of the format {$IBM:<pluginId>/<preferenceName>}."
            name="IBM"
            resolver="com.ibm.rcp.support.variables.dynamic.DynamicVariableResolver"
            supportsArgument="true">
      </variable>
   </extension>


Create the Substitution Logic


Next, implement the logic that will perform the substitution by implementing the IDynamicVariableResolver interface. This class should be referenced in the resolver element used in the extension described previously.

public class DynamicVariableResolver implements IDynamicVariableResolver {

	@Override
	public String resolveValue(IDynamicVariable variable, String argument)
			throws CoreException {

		String[] args = argument.split("/");

		// variables are of the form
		// {$IBM:<pluginId>/<preferenceName>}
		String plugin = args[0];
		String preference = args[1];

		// do some logic to substitute
		if (preference.equals("ibm_url")) {
			return "http://www.ibm.com";
		}

		return null;
	}
}


Using Substitution


Similar to the Using Dynamic Variable Substitution in Composite Applications, add a Managed Browser component to a Composite Application. Update the intialUrl component property to the value ${IBM:com.ibm.rcp.support.variable.dynamic/ibm_url}.



When the Managed Browser component initiatlizes, the substitution code will supply the http://www.ibm.com value.

expanded Article information
collapsed Article information
Category:
Expeditor Client for Desktop
Tags:
samples

This Version: Version 6 May 12, 2011 10:47:47 AM by Van Staub  IBMer

expanded Attachments (0)
collapsed Attachments (0)

 


expanded Versions (6)
collapsed Versions (6)
Version Comparison     
Version Date Changed by               Summary of changes
This version (6) May 12, 2011 10:47:47 AM Van Staub  
5 Nov 1, 2010 2:22:06 PM Van Staub  
4 Nov 1, 2010 2:16:36 PM Van Staub  
3 Nov 1, 2010 1:59:51 PM Van Staub  
2 Nov 1, 2010 12:46:26 PM Van Staub  
1 Nov 1, 2010 12:45:47 PM Van Staub  
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