-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Plugins | ||
|
||
Various use cases of JavaRosa can be extended with plugins. | ||
|
||
## Parse | ||
|
||
Intercept parts of the process and attach data to the created `FormDef` through its extras. | ||
|
||
### API | ||
- `XFormParser#addProcessor` | ||
- `FormDef#getExtras` | ||
|
||
The default `XFormParser` can be overridden by creating an implementation of `IXFormParserFactory` (`IXFormParserFactory.Wrapper` if you want to chain multiple plugins) and calling `XFormUtils.setXFormParserFactory` with it. | ||
|
||
## Finalization | ||
|
||
Inspect the `FormEntryModel` after finalization (or "post processing") and attach data via its extras. | ||
|
||
### API | ||
- `FormEntryController#addPostProcessor` | ||
- `FormEntryModel#getExtras` | ||
|
||
## Instance | ||
|
||
Inspect external instances (their ID and parsed XML) after parsing or provide custom parsers for specific instances or file types. | ||
|
||
### API | ||
- `ExternalInstanceParser#addFileInstanceParser` | ||
- `ExternalInstanceparsser#addProcessor` | ||
|
||
The default `ExternalInstanceParser` can be overridden by creating an implementation of `ExternalInstanceParserFactory` and calling `XFormUtils.setExternalInstanceParserFactory` with it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters