Built-in Template Handlers

The following table lists the current built-in template handlers of the Invicta Project. The table also describes the usage of the handler (both Map and List usage).

Refer to Custom Template Handlers for more details.

Handler Name

Description

Parameters

product

Returns the file of a product of the component.

Map:
 component - Optional, String - Component name. Use the current component if not specified.
 type - Optional, String - Product type. Return any product type if not specified.
 name - Optional, String - Product name. Return a product with any name if not specified.
 defaultFile - Optional, String - Use this file name if the product has no file defined.
 onlyBaseName, Optional, boolean, default=false - If true, return only the file's base name (instead of a full path)
 includeSuffix, Optional, boolean, default=false - If true, return only the file name with its suffix extension.

List: N/A

productName

Returns the name of a product of a component.

Map:
 appName - Optional, boolean, default=false - if true, return the appName instead of name.
 type - Optional, String, default=jar  

List: N/A

property

Returns a reference to a property defined for a component, while checking that the property is defined.

Map:
 name - Required, String - Property name.
 component - Optional, String - Name of a component to get its property. In default, use the current component.

List:
 0 - Required, String - Property name.
 1 - Optional, String - Name of a component to get its property. In default, use the current component.

setProperties

Returns settings lines for all properties of a component.

Map: No parameters.

List: N/A

setGeneralProperties

Returns settings lines of all the general properties of the project.

Map: No parameters.

List: N/A

setProjectProperties

Returns settings lines of all the project properties.

Map: No parameters.

List: N/A

actualPropertyValue

Returns the actual value of a property of any type.

Map:
 name - Required, String - Property name.
 component - Optional, String - The component to return an actual property value for. Use the Current component if not specified.

List:
 0 - Required, String - Property name.

pathElements

Returns path elements settings lines for products defined for components of the project.

Map:
 ignoreExport - Optional, boolean, default=false - Name of a property that specifies whether to include also products that are not exported.
 componentName - Optional, String - Name of a property that specifies the name of the component to include its products. Use the current component if not specified.
 productName - Optional, String - Name of a property that specifies the name of the product to include.
 fileSetFormat - Optional, boolean, default=true - Whether to return the result as a fileset definition.
 separator - Optional, String, default=" " - Specified the separator between products, when the format is not a fileSet format.

List: N/A

dependList

Returns a comma-separated list of targets of components that the current component depends on.

 

Map:
 target - Optional, String, default="BUILD" - Target of components to depend on. Can either be a free string or one of the following: BUILD, CLEAN, DIST, INIT.
 all - Optional, boolean, default=false - Whether to depend on all components or only on dependent ones.
 exclude - Optional, boolean, default=false -  Whether to exclude from the depend list all component that have the exclude flag on. 

List: No parameters. Using defaults.

globalComponentDepend

Returns the name of the build target of the global component of the project.

Map: No parameters.

List: No parameters.

dependFileset

Returns a fileset of files (mainly products).

Map:
 element - Required, String - The name of the ANT element. Examples 'fileset', 'lib'.
 attribute - Required, String - The name of the attribute for the value. Examples: 'dir', 'includes'. 
 locationProperty - Optional, String - A property of the depend component that should be copied. If the property is not given, then get the exported Jars of all components.
 includeProperty - Optional, String
 excludeType - Optional, String

List: N/A

relatedProductList

Returns a list of product files that the current components depends on directly of indirectly.

Map:
 includeSelf - Optional, boolean, default=false

List: No parameters. Using defaults.

distCopyCommands

Returns commands for copying source files to a destination directory.

Map:
 distDirProperty - Required, String - Property name of the distribution destination directory.
 addComponentName - Optional, boolean, default=false - Whether to add the name of the component to the destination directory.

 srcListProperty - Optional, String - A comma-separated list of source files.
or 
 srcDirProperty - Optional, String - Property name of the source file. 
 flatten - Optional, boolean, default=false - Whether to flatten the source files when copying, or create the directory structure.

List: N/A

dependAppModules

Returns instructions for creating an application.xml file.

Map: No parameters.

   List: No parameters.