Knopflerfish OSGi 5.2.0

org.knopflerfish.ant.taskdefs.bundle
Class BundleUserDocNavigateTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.knopflerfish.ant.taskdefs.bundle.BundleUserDocNavigateTask
All Implemented Interfaces:
java.lang.Cloneable

public class BundleUserDocNavigateTask
extends org.apache.tools.ant.Task

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 doc.properties in the sub-directory.

The following keys in the properties file are used:

category
The name of the category to present the link under.
The link text.
title
linkPath
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.
linkRef
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.
sortKey
String to use when sorting links. Default is the value of the title key.
depth
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 doc.properties 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.

Yes
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 org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
BundleUserDocNavigateTask()
           
 
Method Summary
 void execute()
           
 void setDefaultcategory(java.lang.String s)
           
 void setDocdir(java.io.File f)
           
 void setOutdir(java.io.File f)
           
 void setTemplate(java.io.File f)
           
 void setTitle(java.lang.String s)
           
 void setTofile(java.lang.String s)
           
 
Methods inherited from class org.apache.tools.ant.Task
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 org.apache.tools.ant.ProjectComponent
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

DOC_PROPS_FILE_NAME

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

BundleUserDocNavigateTask

public BundleUserDocNavigateTask()
Method Detail

setOutdir

public void setOutdir(java.io.File f)

setTofile

public void setTofile(java.lang.String s)

setTemplate

public void setTemplate(java.io.File f)

setTitle

public void setTitle(java.lang.String s)

setDocdir

public void setDocdir(java.io.File f)

setDefaultcategory

public void setDefaultcategory(java.lang.String s)

execute

public void execute()
Overrides:
execute in class org.apache.tools.ant.Task

Knopflerfish OSGi 5.2.0