Description | API | Development Configuration | Deployment Configuration | FAQ

STK Java API - STK Access Constraint Plugin

Description

Access Constraints are used to model visibility between objects during access computations. Access Constraints can be defined by developers and users of STK via a plugin architecture in many software programming languages including Java.

What's included in this API?

The API to develop, run, amd deploy an STK Access Constraint Java Plugin based on the STK Java API includes the following lists of libraries, packages, and javadocs:

JAR libraries:

JNI native libraries:

Packages:

Documentation

Documentation for including Javadocs in Eclipse IDE

The following STK Access Constraint Java Plugin samples are provided within the STK and STK engine install:

To use these samples:

  1. Build these samples in Eclipse by referring to the Eclipse samples configuration page.
  2. Locate the STK installation's Access Constraints.xml. The default installation location for instance:
  3. Platform Path
    Windows 32bit C:\Program Files\AGI\<STKVERSION>\CodeSamples\Extend\Constraints\Access Constraints.xml
    Windows 64bit C:\Program Files\AGI\<STKVERSION>\CodeSamples\Extend\Constraints\Access Constraints.xml
    Windows 32bit on 64bit C:\Program Files (x86)\AGI\<STKVERSION>\CodeSamples\Extend\Constraints\Access Constraints.xml
    Linux 32/64 <STK_INSTALL_DIR>/CodeSamples/Extend/Constraints/Access Constraints.xml
  4. Copy this file to your STK plugin configuration user directory, which typically is C:\Documents and Settings\<user account name>\My Documents\<STKVERSION>\Config\Plugins on windows and <STK_CONFIG_DIR>/<STKVERSION>/Config/Plugins on LINUX.
  5. Locate the three sample Access Constraint JavaPlugin entries for your chosen platform in the comment block that start with the following:
  6. <JavaPlugin DisplayName="Java ...

  7. Copy the three entries seen above to the uncommented section under the Access Constraint Plugins category element within the XML file.
  8. In the copied JavaPlugin element entries, if the sample plugin's compiled .class files (and package structure) are not located in the directory specified by the ClassPath entry, then change it to the directory location of the plugin's *.class file's base package space.
  9. Refer to STK documentation for configuration of Access Constraints during computation to use the above plugin samples.

Development/Runtime Configuration

Development Environments

Use the above listed JAR and JNI native libraries as input to the following development environment configurations:

Use the samples listed above as reference for implementing the IAgAccessConstraintPlugin and IAgUtPluginConfig interfaces.

Deployment

Deployment instructions for a STK Access Constraint Java Plugin application:

  1. Follow the appropriate installation instructions for the STK or STK Engine product.
  2. Install your STK Access Constraint Java Plugin JAR file and its dependent JAR files to your preferred installation location.
  3. Create an Access Constraint Plugin XML file.
  4. Note: Make sure the name of your Access Constraint XML file is unique as to not conflict with other plugin xml files.

    Note: Do NOT include the AGI Plugin JARs, as these are automatically configured/loaded by STK at runtime.

  5. Copy your Access Constraint Plugin XML file to the STK or STK Engine installation's Plugins directory if it is writable. The default installation location for instance:
  6. Platform Path
    Windows 32bit C:\Program Files\AGI\<STKVERSION>\Plugins\<Name of plugin xml file>.xml
    Windows 64bit C:\Program Files\AGI\<STKVERSION>\Plugins\<Name of plugin xml file>.xml
    Windows 32bit on 64bit C:\Program Files (x86)\AGI\<STKVERSION>\Plugins\<Name of plugin xml file>.xml
    Linux 32/64 <STK_INSTALL_DIR>/Plugins/<Name of plugin xml file>.xml

    If this is not a writable location, copy your Access Constraint Plugin XML file to the STK Plugin configuration user directory, which typically is C:\Documents and Settings\<user account name>\My Documents\<STKVERSION>\Config\Plugins on windows and <STK_CONFIG_DIR>/<STKVERSION>/Config/Plugins on LINUX.

  7. Refer to the STK documentation on how to configure your scenario to use your Access Constraint Java plugin during Access computations.

FAQ

A set of frequently asked questions/issues and their answers/solutions.

Topics

How/when do I run my Access Constraint Java plugin application?

STK is responsible for creating and initializing your plugin when necessary during an Access Computation. Please refer to Access Constraint Plugin Lifecycle for details.

Do I need a main method declared?

You do NOT need to declare a main method within your plugin. The latest installed JRE on the deployed machine and your Java plugin class (which you indicated in the ClassName attribute of your JavaPlugin entry within your plugin xml file) will be embedded/started within STK.

How do I provide configurable variable within my plugin via the STK GUI?

For an example, refer to the Extend_Plugin_AccessConstraint_Config.

How do I provide configurable variable within my plugin via the Object Model?

For an example refer to Extend_Plugin_AccessConstraint_Config.

STK Programming Interface 11.0.1