public class ConfigFileBuilder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
ConfigRevision |
create(ConfigFileData cff,
User user,
ConfigChannel channel)
Creates a new config file using the information provided
in the config file form.
|
ConfigRevision |
createOrUpdate(ConfigFileData form,
User user,
ConfigChannel cc)
Creates Or Updates a config file
depending on the data in the given configFileForm..
|
static ConfigFileBuilder |
getInstance() |
ConfigRevision |
update(ConfigFileData form,
User user,
ConfigFile file)
Updates a config file
depending on the data in the given configFileForm..
|
public static ConfigFileBuilder getInstance()
public ConfigRevision create(ConfigFileData cff, User user, ConfigChannel channel) throws java.io.IOException, ValidatorException
cff
- the config file from holding input datauser
- the logged in user.channel
- the channel to create file in.java.io.IOException
- in the case of issues with content stream reading.ValidatorException
- in the case of invalid data passed in.public ConfigRevision update(ConfigFileData form, User user, ConfigFile file) throws ValidatorException
form
- the ConfigFileData form containing the input datauser
- the logged in user.file
- the config file to update.ValidatorException
- in the case of invalid data.public ConfigRevision createOrUpdate(ConfigFileData form, User user, ConfigChannel cc) throws java.io.IOException, ValidatorException
form
- the config file form with the input datauser
- the logged in user.cc
- the config channel of the filejava.io.IOException
- in the case of issues due to parsing of contents.ValidatorException
- in the case of invalid data.