A customized document format is used to provide an intuitive configuration format for EAC script developers and system administrators.

However, this customization restricts the flexibility of the configuration document. The following sections describe elements available in the custom namespace defined by the eacToolkit.xsd XML schema. Each element name is followed by a brief description and an example configuration excerpt. For details, refer to the eacToolkit.xsd schema file distributed within the file eacHandlers.jar.

This section describes the component elements available in the custom namespace defined by the eacToolkit.xsd XML schema.

For more details, refer to the eacToolkit.xsd schema file distributed within the file eacHandlers.jar.

Element

Description

forge

This element defines a Forge component, including attributes that define the functionality of the Forge process as well as custom properties and directories used to configure the functionality of the Forge object's methods. Multiple forge elements can be defined.

<forge id="Forge" host-id="ITLHost">
  <properties>
    <property name="numStateBackups" value="10" />
    <property name="numLogBackups" value="10" />
  </properties>
  <directories>
    <directory name="incomingDataDir">./data/incoming</directory>
    <directory name="configDir">./data/complete_config</directory>
    <directory name="wsTempDir">./data/web_studio_temp_dir</directory>
  </directories>
  <args>
    <arg>-vw</arg>
  </args>
  <input-dir>./data/processing</input-dir>
  <output-dir>./data/forge_output</output-dir>
  <state-dir>./data/state</state-dir>
  <temp-dir>./data/temp</temp-dir>
  <num-partitions>1</num-partitions>
  <pipeline-file>./data/processing/pipeline.epx</pipeline-file>
</forge>

forge-cluster

This element defines a Forge cluster, including a list of ID references to the Forge components that belong to this cluster. This object can be configured to distribute data to Forge servers serially or in parallel.

<forge-cluster id="ForgeCluster" getDataInParallel="true">
  <forge ref="ForgeServer" />
  <forge ref="ForgeClient1" />
  <forge ref="ForgeClient2" />
</forge-cluster>

dgidx

This element defines a Dgidx component, including attributes that define the functionality of the Dgidx process as well as custom properties and directories used to configure the functionality of the Dgidx object's methods. Multiple dgidx elements can be defined.

<dgidx id="Dgidx" host-id="ITLHost">
  <args>
    <arg>-v</arg>
  </args>
  <input-dir>./data/forge_output</input-dir>
  <output-dir>./data/dgidx_output</output-dir>
  <temp-dir>./data/temp</temp-dir>
  <run-aspell>true</run-aspell>
</dgidx>

indexing-cluster

This element defines an indexing cluster, including a list of ID references to the Dgidx components that belong to this cluster. This object can be configured to distribute data to indexing servers serially or in parallel.

<indexing-cluster id="IndexingCluster" getDataInParallel="true">
  <dgidx ref="Dgidx1" />
  <dgidx ref="Dgidx2" />
</indexing-cluster>

dgraph

This element defines a Dgraph component, including attributes that define the functionality of the Dgraph process as well as custom properties and directories used to configure the functionality of the Dgraph object's methods. Multiple dgraph elements can be defined. Each dgraph element inherits, and potentially overrides, configuration specified in the dgraph-defaults element (see below).

<dgraph id="Dgraph1" host-id="MDEXHost" port="15000">
  <properties>
    <property name="restartGroup" value="A" />
    <property name="updateGroup" value="a" />
  </properties>
  <log-dir>./logs/dgraphs/Dgraph1</log-dir>
  <input-dir>./data/dgraphs/Dgraph1/dgraph_input</input-dir>
  <update-dir>./data/dgraphs/Dgraph1/dgraph_input/updates</update-dir>
  </dgraph>

dgraph-defaults

This element defines the default settings inherited by all dgraph elements specified in the document. This enables a single point of configuration for common Dgraph configuration such as command line arguments, and script directory configuration. Only one dgraph-defaults element can be defined.

<dgraph-defaults>
  <properties>
    <property name="srcIndexDir" value="./data/dgidx_output" />
    <property name="srcIndexHostId" value="ITLHost" />
    <property name="numLogBackups" value="10" />
  </properties>
  <directories>
    <directory name="localIndexDir">
      ./data/dgraphs/local_dgraph_input
    </directory>
  </directories>
  <args>
    <arg>--threads</arg>
    <arg>2</arg>
    <arg>--spl</arg>
    <arg>--dym</arg>
  </args>
  <startup-timeout>120</startup-timeout>
</dgraph-defaults>

dgraph-cluster

This element defines a Dgraph cluster, including a list of ID references to the Dgraph components that belong to this cluster. This object can be configured to distribute data to Dgraph servers serially or in parallel.

<dgraph-cluster id="DgraphCluster" getDataInParallel="true">
  <dgraph ref="Dgraph1" />
  <dgraph ref="Dgraph2" />
</dgraph-cluster>

logserver

This element defines a LogServer component, including attributes that define the functionality of the LogServer process as well as custom properties and directories used to configure the functionality of the LogServer object's methods. Multiple logserver elements can be defined.

<logserver id="LogServer" host-id="ITLHost" port="15002">
  <properties>
    <property name="numLogBackups" value="10" />
    <property name="targetReportGenDir" value="./reports/input" />
    <property name="targetReportGenHostId" value="ITLHost" />
  </properties>
  <log-dir>./logs/logserver</log-dir>
  <output-dir>./logs/logserver_output</output-dir>
  <startup-timeout>120</startup-timeout>
  <gzip>false</gzip>
</logserver>

report-generator

This element defines a ReportGenerator component, including attributes that define the functionality of the ReportGenerator process as well as custom properties and directories used to configure the functionality of the ReportGenerator object's methods. Multiple report-generator elements can be defined.

<report-generator id="WeeklyReportGenerator" host-id="ITLHost">
  <properties>
    <property name="webStudioReportDir"
value="C:\Endeca\MDEXEngine\workspace/reports/MyApp" />
    <property name="webStudioReportHostId" value="ITLHost" />
  </properties>
  <log-dir>./logs/report_generators/WeeklyReportGenerator</log-dir>
  <input-dir>./reports/input</input-dir>
  <output-file>./reports/weekly/report.xml</output-file>
  <stylesheet-file>
    ./config/report_templates/tools_report_stylesheet.xsl
  </stylesheet-file>
  <settings-file>
    ./config/report_templates/report_settings.xml
  </settings-file>
  <time-range>LastWeek</time-range>
  <time-series>Daily</time-series>
  <charts-enabled>true</charts-enabled>
</report-generator>

custom-component

This element defines a custom component, including custom properties and directories used to configure the functionality of the custom component object's methods. Multiple custom-component elements can be defined, though each must specify the name of the implemented class that extends com.Endeca.soleng.eac.toolkit.component.CustomComponent.

The custom component is also used to implement the IFCR components.

<custom-component id="IFCR" host-id="ITLHost" class="com.endeca.soleng.eac.toolkit.component.IFCRComponent">
    <properties>
      <property name="repositoryUrl" value="http://localhost:8006/ifcr" />
      <property name="username" value="admin" />
      <property name="password" value="admin" />
      <property name="numExportBackups" value="3" />
    </properties>
  </custom-component>

This section describes the utility elements available in the custom namespace defined by the eacToolkit.xsd XML schema.

For more details, refer to the eacToolkit.xsd schema file distributed within the file eacHandlers.jar.

Most configuration tasks are performed by simply altering an element in the configuration document, by adding elements to the document, or by removing elements from the configuration.

These three actions enable users to alter the behavior of objects in their application, change which objects make up their application and change the way scripts acts on the objects in their application.

In addition to these simple actions, users can customize the behavior of objects in their application or create new objects while continuing to use the EAC development toolkit's XML configuration document format. The following are examples of customization that are possible within the constructs of the XML schema defined in the eacToolkit.xsd schema file.

Users can implement customizations on top of existing objects by creating a new class that extends an object in the toolkit. Most elements in the configuration document (with the notable exception of the "app" element, which specifies global configuration, but does not directly correspond to an object instance) can specify a class attribute to override the default class associated with each element. For example, a user could implement a MyForgeComponent class by extending the toolkit's ForgeComponent class.

package com.Endeca.soleng.eac.toolkit.component;

import java.util.logging.Logger;

import com.Endeca.soleng.eac.toolkit.exception.AppConfigurationException;
import com.Endeca.soleng.eac.toolkit.exception.EacCommunicationException;
import com.Endeca.soleng.eac.toolkit.exception.EacComponentControlException;

public class MyForgeComponent extends ForgeComponent
{
  private static Logger log = 
    Logger.getLogger(MyForgeComponent.class.getName());
  
  protected void getIncomingData() throws AppConfigurationException, 
      EacCommunicationException, EacComponentControlException, 
      InterruptedException
  {
    
  // custom data retrieval implementation

  }
}

The new class can override method functionality to customize the behavior of the object. As long as the new object does not require configuration elements unknown to the ForgeComponent from which it inherits, it can continue to use the forge element in the XML document to specify object configuration.

<forge class="com.Endeca.soleng.eac.toolkit.component.MyForgeComponent"  
  id="CustomForge" host-id="ITLHost">
...
</forge>


Copyright © Legal Notices