|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GraphLoader<G extends Graph>
Interface for loading process definitions into a GraphRepository
.
Should not be considered thread-safe.
Method Summary | ||
---|---|---|
boolean |
isLoaded(String name)
Returns true if the graph has been loaded into the associated GraphRepository , false otherwise. |
|
void |
load(File file)
Loads the given XML process definition file. |
|
void |
loadDefinition(ProcessDefinition procDef)
Loads the given process definition. |
|
void |
loadDefinition(ProcessDefinition procDef,
String customId)
Loads the given process definition, giving it the passed in custom identifier. |
|
|
loadDefinition(ProcessDefinitionTranslator<T> translator,
T source)
Takes a ProcessDefinitionTranslator , applies it to the given source and loads the resulting
ProcessDefinition . |
|
|
loadDefinition(ProcessDefinitionTranslator<T> translator,
T source,
String customId)
Takes a ProcessDefinitionTranslator , applies it to the given source and loads the resulting
ProcessDefinition . |
|
List<LoadResult> |
loadNewAndChanged(File baseDir)
Loads all new and changed process definitions under the given base directory. |
|
List<LoadResult> |
loadNewAndChanged(File baseDir,
FilenameFilter filter)
Loads all new and changed process definitions under the given base directory that match the given file name filter. |
|
List<LoadResult> |
loadWithDependencies(String name,
ProcessDefinitionResolver resolver)
Loads the named process definition. |
Method Detail |
---|
void loadDefinition(ProcessDefinition procDef) throws SarasvatiLoadException
Equivalent to loadDefinition( procDef, null )
SarasvatiLoadException
loadDefinition(ProcessDefinition, String)
void loadDefinition(ProcessDefinition procDef, String customId) throws SarasvatiLoadException
procDef
- The process definition to loadcustomId
- The custom identifier to give the loaded process definition
SarasvatiLoadException
- Thrown if an error occurs during load, or the loader
has a validator which throws an exception.boolean isLoaded(String name)
GraphRepository
, false otherwise.
name
- The name of the graph being searched for
GraphRepository
, false otherwise.List<LoadResult> loadNewAndChanged(File baseDir) throws SarasvatiLoadException
Equivalent to loadNewAndChanged( baseDir, null );
SarasvatiLoadException
loadNewAndChanged(File, FilenameFilter)
List<LoadResult> loadNewAndChanged(File baseDir, FilenameFilter filter) throws SarasvatiLoadException
This method works as follows:
GraphRepository
,
it will be marked for load
Graph.getCustomId()
for the new graph of the same name in the repository,
it will be marked for load.
baseDir
- The directory under which to recursively search for process definitionsfilter
- The filename filter to use to find process definition files. May be null,
in which case the default filter is used. The default filter matches all
files with the .wf.xml extension.
SarasvatiLoadException
- Thrown if an error occurs during the load or if the
GraphValidator
throws an exception.<T> void loadDefinition(ProcessDefinitionTranslator<T> translator, T source) throws SarasvatiLoadException
ProcessDefinitionTranslator
, applies it to the given source and loads the resulting
ProcessDefinition
.
Equivalent to loadDefinition( translator, source, null )
SarasvatiLoadException
loadDefinition(ProcessDefinitionTranslator, Object, String)
<T> void loadDefinition(ProcessDefinitionTranslator<T> translator, T source, String customId) throws SarasvatiLoadException
ProcessDefinitionTranslator
, applies it to the given source and loads the resulting
ProcessDefinition
.
T
- The type of input that the process definition translator takes.translator
- Class which takes an input and returns a ProcessDefinition
source
- The input for the translator (usually an XML file).customId
- The custom ID to give the graph. Example usage is a SHA-1 hash of the process definition.
SarasvatiLoadException
- Thrown if an error occurs during the load or if the
GraphValidator
throws an exception.List<LoadResult> loadWithDependencies(String name, ProcessDefinitionResolver resolver) throws SarasvatiLoadException
name
- The name of the process definition to loadresolver
- The resolver to use in finding the process definition and its dependencies.
SarasvatiLoadException
- Thrown if an error occurs during the load or if the
GraphValidator
throws an exception.void load(File file) throws SarasvatiLoadException
Equivalent to loadDefinition( new XmlLoader(), file );
file
- The xml file to load
SarasvatiLoadException
- Thrown if an error occurs during the load or if the
GraphValidator
throws an exception.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |