Insert links to the User's Guide's argument interpretation documentation in an HTML file.
Task package: | org.schmant.task.taskpackage |
Java package: | org.schmant.task.tp.ailinks |
Category: | Documentation tasks |
Since: | 0.8 |
EntityFS-aware? | Yes* |
Implements: | ActionTaskFactory GeneratorTaskFactory ProcessTaskFactory |
Produces: | The interpreted target property. The exact type depends on the type used for the target. |
Description:
Insert links to the User's Guide's argument interpretation documentation in an HTML file. This can for instance be used for interpreted properties in task reference documentation.
The task replaces all argument interpretation link placeholders
|ai:section name;display text|
with links to the argument
interpetation documentation in the User's Guide. The section name is the anchor
name for the argument interpretation method that is referenced, and the display
text is the text that is displayed in the link.
For the valid anchor names, see the HTML source for the argument interpreter chapter in the User's Guide.
Example:
The text:
This property is interpreted by the |ai:ai_readable_file;getReadableFile()|
method.
Will be replaced with the text:
This property is interpreted by the getReadableFile()
method.
Required properties
Properties
baseDirectory (semi-required) | top |
If the source is an EFile entity and this property is set, a created relative link will be relative to the source file's location relative to this directory.
- Setter method:
setBaseDirectory(Object o)
parameters:- See also:
- docBaseUrl
bufferSize | top |
The size of temporary in-memory buffers used by this task.
- Setter method:
setBufferSize(int sz)
parameters:sz
– The buffer size, in bytes.- Default value:
- 8192 bytes.
docBaseUrl (semi-required) | top |
If this property is set and the base directory is not, the task will create links relative to this URL.
- Setter method:
setDocBaseUrl(String s)
parameters:s
– The URL.- Default value:
- http://schmant.sourceforge.net/releases/current/ug/apb.xhtml
- See also:
- baseDirectory
inputEncoding | top |
The character encoding of the input file. Use this if the input file has a non-standard encoding, i.e. an encoding different from the Java virtual machine's (platform dependent) default charset.
- Setter method:
setInputEncoding(Charset c)
parameters:c
– The input charset.- Setter method:
setInputEncoding(String s)
parameters:s
– The name of a character encoding.- Default value:
- The platform's default encoding.
linkClass | top |
The value of a created HTML link's class
attribute.
- Setter method:
setLinkClass(String c)
parameters:c
– The link class.- Default value:
- "ailink"
linkTarget | top |
The value of a created HTML link's target
attribute.
- Setter method:
setLinkTarget(String s)
parameters:s
– The link target- Default value:
_top
logFooter | top |
The message that is logged to info
level
after the task has been successfully run.
- Setter method:
setLogFooter(String s)
parameters:s
– The footer message.- Default value:
- Empty (no footer message is logged.)
- See also:
- logHeader
logHeader | top |
The message that is logged to info
level
before the task is run.
- Setter method:
setLogHeader(String s)
parameters:s
– The header message.- Default value:
- A task class specific message.
- See also:
- logFooter
outputEncoding | top |
The character encoding of the output file. Use this if the output file should have a non-standard encoding, i.e. an encoding different from the Java virtual machine's (platform dependent) default charset.
- Setter method:
setOutputEncoding(Charset c)
parameters:c
– The output charset.- Setter method:
setOutputEncoding(String s)
parameters:s
– The name of a character encoding.- Default value:
- The platform's default encoding.
- See also:
- target
overwriteStrategy | top |
The overwrite strategy decides how the task will react if there already is an entity (file or directory) in a location where it wants to create a new entity.
If the strategy is to not overwrite existing entities, the task will fail when it cannot create the entities that it wants to create.
Non-empty directories are never overwritten, regardless of the chosen strategy.
- Setter method:
setOverwrite(boolean b)
Setting this to a value ofparameters:true
means that the DoOverwriteAndLogWarning strategy is used. A value of false gives the DontOverwriteAndThrowException strategy.b
– Should an existing entity be overwritten?- Setter method:
setOverwriteStrategy(OverwriteStrategy strat)
Set the overwrite strategy.parameters:strat
– The overwrite strategy.- Default value:
- DontOverwriteAndThrowException
- See also:
- target
reportLevel | top |
This property is used to change the Report level for all task created by this task factory. The report level is changed for the thread running the task when the it is run, and is restored to its previous level when the it is done.
- Setter method:
setReportLevel(Level l)
Set the report levelparameters:l
– The new report level.
source (required) | top |
The HTML file to process.
- Setter method:
setSource(Object o)
parameters:
target (required) | top |
The file that the processed HTML page should be written to.
- Setter method:
setTarget(Object o)
Set the target.parameters:o
– A target that can be interpreted as a writable file. If the target already exists, the overwriteStrategy property determines what will happen.
Interpreted byInterpretAsNewWritableFileStrategy
.- See also:
- overwriteStrategy
tempDirectory | top |
The temporary directory to store intermediate processing results in. By default this is the default temporary files directory for TempFileUtil. Set this to a RAM directory to speed up this task somewhat.
- Setter method:
setTempDirectory(Object d)
parameters:- Default value:
- TempFileUtil's default temporary files directory.
traceLogging | top |
If trace logging is enabled for a task, it reports its configuration before it is run.
Trace logging may also be enabled globally for all tasks by calling TraceMode.setTraceMode(boolean).
- Setter method:
setTraceLogging(boolean b)
Enable or disable trace logging.parameters:b
– Enable trace logging?
Examples
Example 1
Insert links to the argument interpreter documentation
in all HTML files in the directory hierarchy under src
.
JavaScript
JRuby
Jython
* An EntityFS-aware task is implemented using EntityFS. This means that it uses the filter settings of DirectoryView:s and also that it often can work with other file system implementations than File-based, such as the RAM file system.