Installing Upgrading Designing Configuring Deploying Monitoring Administering Troubleshooting Reference JBI Components
Close Print View
Designing: Defining Project Variables
 

Classic Java CAPS

Developing Java CAPS Projects

Using SOAP Message Handlers

Creating a Runtime Environment

Designing Business Processes in the Sun Business Process Manager

Working with TCP/IP HL7 Collaborations

Developing Sun Master Indexes (Repository)

Developing Sun Master Patient Indexes

Developing OTDs for Application Adapters

Developing OTDs for Communication Adapters

Developing OTDs for Database Adapters

Developing OTDs for Web Server Adapters

Designing with Application Adapters

Designing with Communication Adapters

Designing with Web Server Adapters

SWIFT Integration Projects

Java EE Based Components

Designing with Sun JCA Adapters

About the TCP/IP JCA Adapter

Defining Constants and Variables

Defining Project Variables

Defining Project Constants

Defining Environmental Constants

Using Database Operations

Developing Sun Master Indexes

Using the JMS JCA Wizard

Using the JAXB Wizard and Code-Seeder Pallete

Defining Project Variables

Figure 1 Constant or Variable Icon
Image of a Constant or Variable Icon

Project variables function as placeholders, having values that are determined when you create a specific Deployment Profile. Project variables can be literals or Environmental constants, as described in Defining Environmental Constants.

As an example, the following figure shows a Project variable defined to represent a password of a database user in a target Environment. A system manager assigns an actual value to this variable in the Deployment Profile editor. The value of the assigned Project variable (an Environmental constant) is then used to connect to the database in the target Environment.

You can add a variable to a Project by selecting the New > Variable or Constant option from the Project context menu in the NetBeans IDE, which displays the following dialog box.

Figure 2 Creating a Project Variable
Screen capture showing the Project Variable creation dialog box.

Project Variable Options

Property
Description/Usage
Name
Your name for the Project variable.
Category
You may assign a category name, if desired.
Description
Your description for the variable.
Is a Constant
Does not apply to variables; leave unchecked.
Value Type
Does not apply to variables.
Value
Does not apply to variables.

Constants and variables are automatically added to a Variables and Constants object group within the Project, as shown in the following figure. Selecting an entry in the upper panel displays it in the lower panel, where you can modify it. By clicking OK you overwrite the previous definition with the modified version.

Figure 3 Variables and Constants Object Group
Screen capture showing the Variables and Constants Object Group user interface.

Variables and Constants Object Group Icons

Icon
Name
Function
Image of Add Constant or Variable Icon.
Add a New Constant or Variable
Adds a new variable to the list.
Image of Delete Constant or Variable Icon.
Delete a Highlighted Constant or Variable
Deletes the selected variable from the list.