Knopflerfish OSGi 5.2.0

Class BundleUserDocNavigateTask

  extended by
      extended by
          extended by org.knopflerfish.ant.taskdefs.bundle.BundleUserDocNavigateTask
All Implemented Interfaces:

public class BundleUserDocNavigateTask

This task is used when building bundle user documentation for a Knopflerfish release, it builds the navigation frame listing bundles with user documentation. If you don't intend to create a new distribution type of Knopflerfish then you're in the wrong place.

Here is a outline of how to use the task and a description of different parameters and used system properties.

Attribute Description Required
outdir Where to put the generated file (directory). Yes
tofile The relative path to where the generated file should be copied. That is the actual location of the generated file will be outdir/tofile. Yes
template The file which describes what the page should look like. Yes
title The title to use on the generated page. Yes
docdir The directory with one sub-directory for each user documentation link to create. Defaults to outdir.

All sub-directories of docdir will result in a link on the generated navigation page. The link will belong to the default category, have a title set to the name of the sub-directory and a link path pointing to the file "index.html" inside the sub-directory. The default link properties may be overridden by specifying other values in a properties file named in the sub-directory.

The following keys in the properties file are used:

The name of the category to present the link under.
The link text.
The path that the link points to. The default is a relative path pointing to the file index.html inside the sub-directory holding the properties file.
A reference part to append to the generated link. I.e., this will make a link that points a named anchor on the linked page.
String to use when sorting links. Default is the value of the title key.
Nesting depth of link presentation. Default is 1. Must be one or greater.

It is possible to generate more than one link from the same file. To do this insert a linkCount key with the number of links to create as its value. Then for each link add all the keys defined above with the link number followed by a '.' as key-prefix. Link number prefixes starts with 0 and must be strictly smaller than the value of linkCount. If there is no category value with a link number prefix the un-prefixed category value will be used. I.e., if all links belongs to the same category it suffices to write the category name once.

defaultcategory The name of the category to place links under when not specified in the doc-subdirectory. No, defaults to "bundle".

Field Summary
static java.lang.String DOC_PROPS_FILE_NAME
Fields inherited from class
target, taskName, taskType, wrapper
Fields inherited from class
description, location, project
Constructor Summary
Method Summary
 void execute()
 void setDefaultcategory(java.lang.String s)
 void setDocdir( f)
 void setOutdir( f)
 void setTemplate( f)
 void setTitle(java.lang.String s)
 void setTofile(java.lang.String s)
Methods inherited from class
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final java.lang.String DOC_PROPS_FILE_NAME
See Also:
Constant Field Values
Constructor Detail


public BundleUserDocNavigateTask()
Method Detail


public void setOutdir( f)


public void setTofile(java.lang.String s)


public void setTemplate( f)


public void setTitle(java.lang.String s)


public void setDocdir( f)


public void setDefaultcategory(java.lang.String s)


public void execute()
execute in class

Knopflerfish OSGi 5.2.0