Novell Home

Sentinel Development Environment

From Developer Community

Contents

Sentinel Plug-in SDK Development Environment

The SDK requires the following tools to support development of plug-ins:

  • Eclipse
  • Aptana (Collectors and Actions only)
  • OpenOffice
  • Ant
  • Crystal Reports Developer (Reports in Solution Packs)
  • iReport (Report plug-ins)

In addition to the above, some extension packages are required.


Installing Eclipse

Eclipse is available from the Eclipse website. The SDK requires versions Europa (3.3) or Ganymede (3.4) with only the basic components (Eclipse for Java Developers).

If you are not familiar with Eclipse, it is a comprehensive Integrated Development Environment that will manage the development and build of the SDK plug-ins. We will be using the built-in Ant build scripting tool to perform many of the development tasks.

  1. In order to properly compile the reports during the "ant build" process, the following JARs need to be added to the Eclipse Ant Runtime classpath:
    1. Copy the following files from your Sentinel installation:
      • From {Sentinel Install Dir}/lib to /proj/content/dev/sdk/build:
        • commons-beanutils-1.7.jar
        • commons-collections-3.1.jar
        • commons-logging-1.0.3.jar
        • reports.jar
    2. Go to Window > Preferences
    3. Expand 'Ant' and select 'Runtime'
    4. Select "Ant Home Entries" in list at right
    5. Click on "Add External JAR" and add the following JARs to the classpath (multi-selecting jars is available)
      • /proj/content/dev/sdk/build/ant-contrib-1.0b3-modified.jar
      • /proj/content/dev/sdk/build/commons-beanutils-1.7.jar
      • /proj/content/dev/sdk/build/commons-collections-3.1.jar
      • /proj/content/dev/sdk/build/commons-digester-1.7.jar
      • /proj/content/dev/sdk/build/commons-logging-1.0.3.jar
      • /proj/content/dev/sdk/build/jasperreports-3.5.1.jar
      • /proj/content/dev/sdk/build/jcommon-1.0.15.jar
      • /proj/content/dev/sdk/build/jfreechart-1.0.12.jar
      • /proj/content/dev/sdk/build/libuuid.jar
      • /proj/content/dev/sdk/build/reports.jar
      • /proj/content/dev/sdk/build/sentinel-tasks.jar
      • /proj/content/dev/sdk/build/xmltask-v1.15.1.jar
    6. Click OK


Installing Aptana

Aptana is an Eclipse plug-in that provide enhanced JavaScript editing for Action and Collector plug-ins; documentation is available on their website. Installation, however, is via the automated Eclipse plug-in framework (instructions seem to vary, check the Aptana website or follow the below for Eclipse 3.4):

  1. Start Eclipse and from the Help menu, select Software Updates > Find and Install... to open an Install/Update pop-up window.
  2. In the Software Updates window, choose the "Available Software" tab and click "Add Site"
  3. Set up a new remote site to scan for updates:
    1. Click the Add Site... button
    2. In the Location text box, type the URL http://update.aptana.com/update/studio/3.2/ for the update site.
    3. Click OK and the Aptana update site should be added to the Available Software list
  4. Expand the new update site and select:
    • Eclipse Integration > Aptana Web Development Tools
    • Features > (all but Studio Professional)
  5. Click the Install button
  6. Choose the option to accept the terms of the license agreement, and click the Next button.
  7. Click the Finish button.
  8. Click the Install All button.


Installing OpenOffice

OpenOffice is optional, but is used to auto-create documentation for inclusion in the plugins (help files and plugin documentation). It can be downloaded from OpenOffice and is free software.

Follow the installation instructions on that site for your platform. The "soffice" application will need to be in your path so that Eclipse can find it. If you can start a shell or command prompt and, without changing directories, type the bare word "soffice" to start OpenOffice, then you should be all set.


PDF Conversion Macro

The build scripts use a macro to load and save the documents as PDFs in the background. You will need to (in OpenOffice):

  1. Tools > Macros > Organize Macros > OOo Basic
  2. Click "Organizer..." button, then "New"
  3. Create a new macro group called "Collectors"
  4. Click on "Edit"
  5. Cut and past the PDF Conversion macro
  6. Save the macro


Crystal Reports Developer

This application is used for the development of Crystal Reports that are included in Solution Packs.

NOTE: this application is only available under Microsoft Windows.

This is provided via OEM agreement on the Sentinel media. Follow the instructions on the CD for installation. It is not integrated with the development environment, but reports can be added to the Eclipse projects once they are developed.


Installing iReport

iReport is used to develop parts of the Jasper Report plug-ins for use by Sentinel RD, Sentinel Log Manager, and Identity Audit.

  1. Downloaded iReport from sourceforge
  2. Need JDK and javac in the path
  3. Select the checkbox: Options (menu) > Settings... > Compiler > Use Reports Directory to Compile
  4. Add required jars and directories to the iReport classpath
    1. In iReport, select the Options->Classpath menu item.
    2. Click the Add JAR button.
    3. Select all jars in the /proj/content/dev/sdk/build folder and then click Open. This will add all of the jars to the classpath.
    4. Select all jars in the /proj/content/dev/sdk/6.1/Report/static folder and then click Open. This will add all of the jars to the classpath.
    5. Click the Add Folder button.
    6. Select the /proj/content/dev/sdk/6.1/Report/static folder and then click Choose. This will add the directory to the classpath.
    7. Select the /proj/content/dev/reports/AA-common/src folder and then click Choose. This will add the directory to the classpath.
      • It appears iReport has a bug, resulting in the folders saved in the classpath getting unset. Therefore you may need to reset them after you restart iReport.
    8. Select "Save Classpath" to save the classpath changes.
  5. Previewing reports within iReport can help save development time by making it easier to test your reports. In order to enable previewing of reports, follow the instructions in the sections below.


Enabling Previewing Reports That Query The Database

To setup iReport to allow you to preview reports within iReport using live data from Sentinel RD, Sentinel Log Manager (config data only), or Identity Audit, setup the connection to the Sentinel database as follows:

    • Sentinel Log Manager does not use a database to store events. Therefore, to preview reports that query for events from Sentinel Log Manager, follow the instructions further down.
    1. Add database connection - right-click on Services > Drivers > Oracle > Connect Using..., fill in the connection params
    2. Add report datasource; Tools > Report Datasource > New > Netbeans Database JDBC connection > fill in params


Enabling Previewing Reports That Query The Sentinel Log Manager Event Store

To setup iReport to allow you to preview reports within iReport using live event data from Sentinel Log Manager, setup the connection to the Sentinel Log Manager server as follows:

    • These instructions apply only to Sentinel Log Manager.
    1. Set your ESEC_HOME environment variable to the /proj/content/dev/sdk/build directory. For example: C:\SentinelPluginSDK\content\dev\sdk\build
      • iReport will need to use this environment variable in order to load settings that will enable it to connect to your Log Manager when you run your report. Therefore, make sure the environment variable is set in such a way that the iReport process will have access to it (e.g., make sure the session you are using to launch iReport has the environment variable set). You can test this by running "echo $ESEC_HOME" on the cmd line.
      • To ensure you've set the environment variable to the correct location, check the location to make sure the file config/sentinelreport.properties is located within it.
    2. Within the extracted SDK there is a file named config/sentinelreport.properties, which is read by the iReport LUCENE_EVENT driver in order load configuration settings for connecting the Log Manager. All properties can remain set to their default values:
      • novell.sentinel.reports.initiatinguser: Set the user that you want the query in iReport to run as. For example: admin
      • com.esecurity.configurationfile: Path to the configuration.xml file. The default path contains the ESEC_HOME environment variable, so setting the environment variable properly will allow the driver to run properly
      • esecurity.dataobjects.config.file: The only valid value is: /xml/iReportMetaData.xml
      • esecurity.remote.timeout: The default 180 seconds. Increase this value if your test query takes a long time and you receive timeout exceptions.
      • esecurity.communication.service: The only valid value is: WebUI
    3. Configuration Sentinel Log Manager communication settings in the config/configuration.xml file:
      1. Open the /proj/content/dev/sdk/build/config/configuration.xml file for edit in the text editor.
      2. Find the strategy element with id sentinel_client and make the following changes to it.
        • Replace ##SERVER_IP## with the IP address or hostname of your Sentinel Log Manager. The port 61616 is used to connect to the Log Manager, so make sure remote connections from your iReport machines are allowed to this port.
        • Replace ##JMS_PASSWORD## with the password for the _system_ user of activemq on your Log Manager. This password can be found by looking in the config/activemqusers.properties file on the Log Manager.
      3. Copy the config/.activemqclientkeystore.jks file from your Log Manager into the /proj/content/dev/sdk/build/config/configuration.xml file is located.
      4. Update the keystore attribute, setting it to the path to the .activemqclientkeystore.jks file. All "\"'s must be escaped with "\\"
      5. If you haven't already, upgrade Sentinel Log Manager to version 1.0.0.3 or higher.
        • SLM 1.0.0.3 has not yet been officially released. It is scheduled to be released soon.
    4. Copy the following files from your Sentinel Log Manager installation:
      • From {Sentinel or SLM Install Dir}/lib to /proj/content/dev/sdk/build:
        • ccsapp.jar
        • ccsbase.jar
        • communications.jar
        • dataobjects.jar
        • reports.jar
        • sentinel-logging.jar
        • activation.jar
        • activemq-all-5.2.0.jar
        • concurrent.jar
        • JACE.jar
        • serializer.jar
        • xalan.jar
        • commons-net-1.4.1.jar
      • From {Sentinel or SLM Install Dir}/lib/axis2 to /proj/content/dev/sdk/build:
        • tools.jar
    5. Test the settings you've made for far using by executing the following command:<verbatim>
      • On Linux:java -cp $ESEC_HOME/ccsbase.jar:$ESEC_HOME/reports.jar:$ESEC_HOME/jasperreports-3.5.1.jar com.novell.reports.jasper.data.event.ConnectionCheck
      • On Windows:java -cp %ESEC_HOME%\ccsbase.jar;%ESEC_HOME%\reports.jar;%ESEC_HOME%\jasperreports-3.5.1.jar com.novell.reports.jasper.data.event.ConnectionCheck
    6. Restart iReport in order to make sure classpath changes are fully loaded.
    7. Create a query executer for LUCENE_EVENT
      1. In iReport, select the Options->Query executers menu item.
      2. Click on the New button
        • Language: LUCENE_EVENT
        • Factory Class: com.novell.reports.jasper.data.event.LuceneEventQueryExecutorFactory
        • Fields Provider: com.novell.reports.jasper.data.event.LuceneEventQueryFieldsProvider
    8. Create a data source for LUCENE_EVENT
      1. In iReport, click on the Data->Connections/Data Sources menu item.
      2. Click on the New button
      3. Select "Query Executer mode", then click Next.
      4. Type in a name (any name you like, such as "Sentinel Log Manager Events"), then click Save.
      5. Select the new data source you just created and click on the "Set as Default" button.
    9. At this point, iReport is configured to allow you to preview a Log Manager report within iReport and iReport will remotely connect to the Log Manager server to run the query to retrieve the events to populate the report preview.

Novell® Making IT Work As One

© 2009 Novell, Inc. All Rights Reserved.