Extensions

wauter

An extension is a JAR file which may contain web content and triggers to execute Java code.

On start-up, CoDAK searches for extensions in the extensions directory and loads all extensions it finds. By default, the extensions directory is /usr/lib/codak/extensions, but this can be changed in the [Configuration].

An extension must contain a descriptor file, which is located in the JAR file in META-INF/codak-extension.xml. An basic descriptor file:

<?xml version="1.0" encoding="UTF-8"?>
<extension>
  <!--
    The name should be chosen such that it is unique within a CoDAK setup, as it
    identifies the extension.
  -->
  <name>org.example.package</name>

  <!--
    A short but descriptive, human readable title of the extension.
  -->
  <title>My First Extension</title>

  <!--
    A free text description of the extension.
  -->
  <description>This is a dummy extension. Please add content.</description>

  <!--
    Adding an entry point is optional, but it will let you add Java code.
  -->
  <!--
  <entryPoint>org.example.package.EntryPoint</entryPoint>
  -->
</extension>

Site content

An extension can provide [SiteContent] in the form of velocity templates, which will be accessible via the CoDAK web interface. CoDAK will look for them in the 'pages' directory in the JAR.

Tools

Entry point


Related

Home: Configuration
Home: codak-core (source)

MongoDB Logo MongoDB