There are two environment variables that you need to ensure are configured as follows:
• |
ANT_HOME. Set it to point to the ANT installation on your computer. |
• |
FOGLIGHT_HOME. Set it to point to the Foglight® Management Server installation on your computer. |
Creating a directory structure involves extracting the contents of the ZIP file, Foglight_7.3.0_CreatingActionsFieldGuide.zip into a local directory. The following listing illustrates the directory structure that appears after extracting the contents of the ZIP file.
The build.properties file contains the following properties:
• |
name. Specifies the action name. It is set to ExampleAction by default. |
IMPORTANT: If you choose to modify this property to a different value, at a later step you will need to edit the names of the MBean interface and its implementation class (ExampleActionMBean.java and ExampleAction.java, respectively). This includes editing the file names as well as the interface/class names in ExampleActionMBean.java and ExampleAction.java, respectively. For additional information, see Defining Custom Actions .The file names use the following syntax in order to follow ANT conventions for using variables:${implementation_class}.java${interface}Bean.java |
• |
package. Specifies the package name. It is set to com.sample.action in the example shown in the Foglight_7.3.0_CreatingActionsFieldGuide.zip file. If you intend to use a different package name and hierarchy, modify this property as required. Changing the package name requires additional modifications to the directory structure. For example, if you change the default package name to com.mycompany.myaction, rename the sample directory to mycompany and the action directory to myaction. |
• |
version. Specifies the version of the target cartridge. |
1 |
Open the build.properties file for editing. |
IMPORTANT: If you made changes to the package property, ensure that those changes are reflected in the directory structure. In the above example, modifying the entry com.sample.action to com.mycompany.myaction requires that you change the name of the sample directory to mycompany and the action directory to myaction. |
A Foglight® action is comprised of two major components:
These action-specific components need to be saved in the src directory, where package_name follows the package hierarchy that is reflected in the directory structure. For example:
com/mycompany/someaction/SomeActionMBean.java (MBean interface)
com/mycompany/someaction/SomeAction.java (MBean interface implementation)
To find out more about the contents and structure of your working directory, see Creating the Directory Structure .
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Conditions d’utilisation Confidentialité Cookie Preference Center