public class ActionProjectFile extends Object implements ProjectFile
Constructor and Description |
---|
ActionProjectFile(String loadActionId,
String loadProviderId,
Map<String,Value> loadParameters,
String saveActionId,
String saveProviderId,
Map<String,Value> saveParameters,
ServiceProvider serviceProvider)
Create a project file based on an I/O action
|
Modifier and Type | Method and Description |
---|---|
void |
apply()
Apply the (loaded) configuration.
|
protected IOAdvisor<?> |
getLoadAdvisor(String loadActionId,
ServiceProvider serviceProvider)
Get the advisor for loading the file.
|
void |
load(InputStream in)
Load the file from an input stream when loading a project.
|
void |
reset()
Reset the file when a project is loaded but no data for the file was
present or loading the file failed.
|
void |
store(LocatableOutputSupplier<OutputStream> target)
Store the file to an output stream when saving a project.
|
public ActionProjectFile(String loadActionId, String loadProviderId, Map<String,Value> loadParameters, String saveActionId, String saveProviderId, Map<String,Value> saveParameters, ServiceProvider serviceProvider)
loadActionId
- the action identifier for loading the fileloadProviderId
- the provider identifier to use for loading the
file, may be null
to use auto-detectionloadParameters
- the parameters for the I/O provider used for
loading the filesaveActionId
- the action identifier for saving the filesaveProviderId
- the provider identifier to use for saving the filesaveParameters
- the parameters for the I/O provider used for saving
the fileserviceProvider
- the service provider the I/O advisor should
retrieve services throughpublic void load(InputStream in) throws Exception
ProjectFile
load
in interface ProjectFile
in
- the input streamException
- if an error occurs loading the fileProjectFile.load(InputStream)
public void apply()
ProjectFile
ProjectFile.load(InputStream)
or ProjectFile.apply()
haven't been called after
the main project file has been loaded.apply
in interface ProjectFile
ProjectFile.apply()
protected IOAdvisor<?> getLoadAdvisor(String loadActionId, ServiceProvider serviceProvider)
IOAdvisorExtension
to look for a matching advisor.loadActionId
- the action ID for loading the project fileserviceProvider
- the service provider for the advisorpublic void reset()
ProjectFile
reset
in interface ProjectFile
ProjectFile.reset()
public void store(LocatableOutputSupplier<OutputStream> target) throws Exception
ProjectFile
store
in interface ProjectFile
target
- the targetException
- if an error occurs saving the fileProjectFile.store(LocatableOutputSupplier)
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a