A Variable Package (VarPack) is essentially a set of name-value pairs stored on the Application. VarPacks are mainly used to store the values from an xml file (e.g., PT_HOME\settings\portal\j_config.xml, n_config.xml, or device.xml) in memory so the data can be used easily without directly accessing the xml file.
AquaLogic Interaction (formerly called the Plumtree Portal) ships with a variety of VarPacks that are used throughout the portal. These are loaded into the portal through the PT_HOME\settings\portal\VarPacks.xml file. For an example, see PTConfigVarPack (com.plumtree.portaluiinfrastructure.application.varpacks).
As with Models, Views, and Controls, VarPacks can be deployed using Dynamic Discovery, which allows the framework to be completely extensible. All you need to do is extend the XMLBaseVarPack or BaseVarPack class, as shown in Step 1: Implementing the VarPack. Custom VarPacks can be used in PEIs or custom Views, among other things, to simplify the details of accessing an xml data file.
Note: Custom VarPacks are only supported in portal 5.0.2 and above.
Prerequisite:
These pages provide examples and instructions on how to use a custom VarPack, and include step-by-step instructions and sample code for creating and implementing a new Hello World VarPack.
Next: Example VarPack Uses