Class RuntimeExecutionCommandBuilder
- java.lang.Object
-
- com._1c.g5.v8.dt.platform.services.core.runtimes.execution.impl.AbstractExecutionCommandBuilder<RuntimeExecutionCommandBuilder>
-
- com._1c.g5.v8.dt.platform.services.core.runtimes.execution.impl.RuntimeExecutionCommandBuilder
-
public class RuntimeExecutionCommandBuilder extends AbstractExecutionCommandBuilder<RuntimeExecutionCommandBuilder>
1C:Enterprise runtime execution command builder. Clients maystart
process after building.Instances of
RuntimeExecutionCommandBuilder
are stateful and are not safe for use by multiple threads.Example of usage:
Process process = new RuntimeCommandBuilder(launchFile, Mode.DESIGNER) .forInfobase(infobase).dumpConfigurationToXml(ConfigurationFilesFormat.PLAIN, destinationFolder) .userName(userName).userPassword(userPassword).logTo(logFile).start(); int returnCode = process.waitFor();
- See Also:
ProcessBuilder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RuntimeExecutionCommandBuilder.ThickClientMode
1C:Enterprise runtime thick client execution mode.
-
Constructor Summary
Constructors Constructor Description RuntimeExecutionCommandBuilder(RuntimeExecutionCommandBuilder.ThickClientMode mode)
Creates an instance ofRuntimeExecutionCommandBuilder
.RuntimeExecutionCommandBuilder(File thickClient, RuntimeExecutionCommandBuilder.ThickClientMode mode)
Creates an instance ofRuntimeExecutionCommandBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuntimeExecutionCommandBuilder
agentMode(Path baseLocation)
Add SSH agent start mode option.RuntimeExecutionCommandBuilder
agentPort(int port)
Add SSH agent port option.protected void
appendOption(List<String> commands, String string)
Append the provided option to the the command builder.protected void
appendOptionParameter(List<String> commands, String string)
Append the provided option parameter to the command builder.RuntimeExecutionCommandBuilder
archive(String archiveName)
Add loading infobase configuration as XML files from the source parameter that forces command to assume source as archive zip-file.RuntimeExecutionCommandBuilder
autoCheckVersion()
Add running 1C:Enterprise runtime auto version selection option.RuntimeExecutionCommandBuilder
checkConfigurationExtensionsApplicability(String extensionsName)
Add checking configuration extensions applicability option to constructing command.RuntimeExecutionCommandBuilder
clientType(ClientType clientType)
Set running 1C:Enterprise runtime client type.RuntimeExecutionCommandBuilder
createInfobase(InfobaseReference infobase, CreateInfobaseArguments arguments, boolean addReference)
Add Infobase creation option to constructing command.RuntimeExecutionCommandBuilder
deleteConfigurationExtension(String extensionsName)
Add deleting the given configuration extension option to constructing command.RuntimeExecutionCommandBuilder
deleteConfigurationExtensions()
Add deleting all configuration extensions option to constructing command.RuntimeExecutionCommandBuilder
disableDistributionSupport(boolean force)
Add disable distribution configuration support option.RuntimeExecutionCommandBuilder
disableLoadValidation()
Add loading infobase configuration as XML files from the source parameter that forces load command skip load files validation.RuntimeExecutionCommandBuilder
dumpConfigurationToCf(String destinationFile)
Add exporting Configuration to given destination *.cf file option to constructing command.RuntimeExecutionCommandBuilder
dumpConfigurationToMobileXml(Path destinationFile)
Add dumping infobase configuration to the destination file as mobile XML option to constructing command.RuntimeExecutionCommandBuilder
dumpConfigurationToXml(Path destinationFolder)
Add dumping infobase configuration to the destination folder option to constructing command.RuntimeExecutionCommandBuilder
dumpExternalDataToFiles(ConfigurationFilesFormat format, String rootSourceFile, String extarnalDataFile)
Add dumping an external report or data processor to a set of files option to constructing command.RuntimeExecutionCommandBuilder
dumpInfobase(String destinationFile)
Add dumping Infobase to given destination file option to constructing command.RuntimeExecutionCommandBuilder
emulateDeplay(Double callDelay, Double dataSendingDelay, Double dataReceivingDelay)
Add server delay emulation option to launched 1C:Enterprise client.RuntimeExecutionCommandBuilder
fileList(Path fileList)
Add infobase configuration object file list scope command option tthe o constructing command.RuntimeExecutionCommandBuilder
files(File... files)
Add infobase configuration object files scope command option tthe o constructing command.RuntimeExecutionCommandBuilder
forAllExtensions()
Add customization for the configuring command that command will be used for all configuration extensions.RuntimeExecutionCommandBuilder
forExtension(String extensionName)
Add customization for the configuring command that command will be used for the provided extension.RuntimeExecutionCommandBuilder
forInfobase(IConnectionString infobaseConnection, boolean split)
Add an infobase connection option to the constructing command.RuntimeExecutionCommandBuilder
forInfobase(InfobaseReference infobase, boolean split)
Add an infobase connection option to the constructing command.RuntimeExecutionCommandBuilder
getChanges(Path destinationFile)
Add exporting configuration object changes to the provided file option to constructing command.RuntimeExecutionCommandBuilder
listConfigurationExtensions()
Add listing all configuration extensions option to constructing command.RuntimeExecutionCommandBuilder
loadConfigurationFromCf(String sourceFile)
Add importing Configuration from given *.cf file option to constructing command.RuntimeExecutionCommandBuilder
loadConfigurationFromXml(Path sourceFolder)
Add loading infobase configuration as XML files from the source folder option to the constructing command.RuntimeExecutionCommandBuilder
loadExternalDataFromFiles(String rootSourceFile, String extarnalDataFile)
Add loading of an external report or data processor from a set of files option to constructing command.RuntimeExecutionCommandBuilder
logTo(File logFile, boolean clear)
Add logging 1C:Enterprise runtime process execution to given file option to constructing command.RuntimeExecutionCommandBuilder
restoreInfobase(String sourceFile)
Add restoring Infobase from given source file option to constructing command.Process
start()
Starts runtime process, based on constructed commands.ProcessBuilder
toProcessBuilder()
Returns process builder, based on constructed commands.String
toString()
RuntimeExecutionCommandBuilder
update()
Add update option to the constructing command.RuntimeExecutionCommandBuilder
updateConfigDumpInfo()
Add update configuration dump info option to the constructing command.RuntimeExecutionCommandBuilder
updateInfobase()
Add updating Infobase option to constructing command.RuntimeExecutionCommandBuilder
usingTemplate(Path templateLocation)
Add Infobase template usage option to constructing command.RuntimeExecutionCommandBuilder
withConfigDumpInfo(Path dumpInfoFile)
Add configuration dump info option to the constructing command.RuntimeExecutionCommandBuilder
withFormat(ConfigurationFilesFormat format)
Add XML format option parameter to the constructing command.-
Methods inherited from class com._1c.g5.v8.dt.platform.services.core.runtimes.execution.impl.AbstractExecutionCommandBuilder
append, appendOption, appendOptionParameter, commands, dataSeparation, disableHomePageForms, disableStartupDialogs, disableStartupMessages, displayAllFunctions, displayPerformance, enableCheckExtensionsAndAddInsSyncCalls, enableCheckModal, enableDebug, execute, interfaceLanguage, mainWindowMode, osAuthentication, pwaAppName, self, sessionLocale, startupOption, technicalSpecialistMode, urlFragment, userName, userPassword, withConnectionSpeed
-
-
-
-
Constructor Detail
-
RuntimeExecutionCommandBuilder
public RuntimeExecutionCommandBuilder(RuntimeExecutionCommandBuilder.ThickClientMode mode)
Creates an instance ofRuntimeExecutionCommandBuilder
.- Parameters:
mode
- the 1C:Enterprise runtime thick client launching mode, cannot benull
-
RuntimeExecutionCommandBuilder
public RuntimeExecutionCommandBuilder(File thickClient, RuntimeExecutionCommandBuilder.ThickClientMode mode)
Creates an instance ofRuntimeExecutionCommandBuilder
.- Parameters:
thickClient
- the 1C:Enterprise runtime thick client execution file, cannot benull
mode
- the 1C:Enterprise runtime thick client launching mode, cannot benull
-
-
Method Detail
-
forInfobase
public RuntimeExecutionCommandBuilder forInfobase(InfobaseReference infobase, boolean split)
Add an infobase connection option to the constructing command. The infobase additional parameters will also be added to the constructing command.- Parameters:
infobase
- the infobase to use, cannot benull
split
- whether need to split infobase name from infobase command option- Returns:
- a reference to this command builder, never
null
-
forInfobase
public RuntimeExecutionCommandBuilder forInfobase(IConnectionString infobaseConnection, boolean split)
Add an infobase connection option to the constructing command.- Parameters:
infobase
- the infobase connection to use, cannot benull
split
- whether need to split infobase name from infobase command option- Returns:
- a reference to this command builder, never
null
-
dumpConfigurationToXml
public RuntimeExecutionCommandBuilder dumpConfigurationToXml(Path destinationFolder)
Add dumping infobase configuration to the destination folder option to constructing command. Configuration objects scope to load may be specified withfiles
orfileList
options.- Parameters:
destinationFolder
- the destination folder to dump to, cannot benull
- Returns:
- a reference to this command builder, never
null
-
dumpConfigurationToMobileXml
public RuntimeExecutionCommandBuilder dumpConfigurationToMobileXml(Path destinationFile)
Add dumping infobase configuration to the destination file as mobile XML option to constructing command.- Parameters:
destinationFile
- the destination file to dump to, cannot benull
- Returns:
- a reference to this command builder, never
null
-
loadConfigurationFromXml
public RuntimeExecutionCommandBuilder loadConfigurationFromXml(Path sourceFolder)
Add loading infobase configuration as XML files from the source folder option to the constructing command. Configuration objects scope to load may be specified withfiles
orfileList
options.- Parameters:
sourceFolder
- the source folder to restore from, cannot benull
- Returns:
- a reference to this command builder, never
null
-
archive
public RuntimeExecutionCommandBuilder archive(String archiveName)
Add loading infobase configuration as XML files from the source parameter that forces command to assume source as archive zip-file.- Parameters:
archiveName
- the archive name in the source folder to load from, cannot benull
- Returns:
- a reference to this command builder, never
null
-
disableLoadValidation
public RuntimeExecutionCommandBuilder disableLoadValidation()
Add loading infobase configuration as XML files from the source parameter that forces load command skip load files validation.- Returns:
- a reference to this command builder, never
null
-
files
public RuntimeExecutionCommandBuilder files(File... files)
Add infobase configuration object files scope command option tthe o constructing command.- Parameters:
files
- a list of exporting files for incremental XML load or dump, cannot benull
or empty- Returns:
- a reference to this command builder, never
null
-
fileList
public RuntimeExecutionCommandBuilder fileList(Path fileList)
Add infobase configuration object file list scope command option tthe o constructing command.- Parameters:
fileList
- a file, that contains list of exporting files for incremental XML load or dump, cannot benull
- Returns:
- a reference to this command builder, never
null
-
withFormat
public RuntimeExecutionCommandBuilder withFormat(ConfigurationFilesFormat format)
Add XML format option parameter to the constructing command.- Parameters:
format
- the formal of XML files - plain or hierarchical, nevernull
- Returns:
- a reference to this command builder, never
null
-
getChanges
public RuntimeExecutionCommandBuilder getChanges(Path destinationFile)
Add exporting configuration object changes to the provided file option to constructing command.- Parameters:
destinationFile
- the destination file to dump to, cannot benull
- Returns:
- a reference to this command builder, never
null
-
withConfigDumpInfo
public RuntimeExecutionCommandBuilder withConfigDumpInfo(Path dumpInfoFile)
Add configuration dump info option to the constructing command.- Parameters:
dumpInfoFile
- the dump info file, cannot benull
- Returns:
- a reference to this command builder, never
null
-
updateConfigDumpInfo
public RuntimeExecutionCommandBuilder updateConfigDumpInfo()
Add update configuration dump info option to the constructing command.- Returns:
- a reference to this command builder, never
null
-
update
public RuntimeExecutionCommandBuilder update()
Add update option to the constructing command.- Returns:
- a reference to this command builder, never
null
-
checkConfigurationExtensionsApplicability
public RuntimeExecutionCommandBuilder checkConfigurationExtensionsApplicability(String extensionsName)
Add checking configuration extensions applicability option to constructing command.- Parameters:
an
- extension name to check ornull
to check all extensions- Returns:
- a reference to this command builder, never
null
-
listConfigurationExtensions
public RuntimeExecutionCommandBuilder listConfigurationExtensions()
Add listing all configuration extensions option to constructing command.- Returns:
- a reference to this command builder, never
null
-
deleteConfigurationExtension
public RuntimeExecutionCommandBuilder deleteConfigurationExtension(String extensionsName)
Add deleting the given configuration extension option to constructing command.- Parameters:
an
- extension name to delete, cannot benull
- Returns:
- a reference to this command builder, never
null
-
deleteConfigurationExtensions
public RuntimeExecutionCommandBuilder deleteConfigurationExtensions()
Add deleting all configuration extensions option to constructing command.- Returns:
- a reference to this command builder, never
null
-
forExtension
public RuntimeExecutionCommandBuilder forExtension(String extensionName)
Add customization for the configuring command that command will be used for the provided extension.- Parameters:
extensionName
- the name of the configuration extension, cannot benull
- Returns:
- a reference to this command builder, never
null
-
forAllExtensions
public RuntimeExecutionCommandBuilder forAllExtensions()
Add customization for the configuring command that command will be used for all configuration extensions.- Returns:
- a reference to this command builder, never
null
-
updateInfobase
public RuntimeExecutionCommandBuilder updateInfobase()
Add updating Infobase option to constructing command.- Returns:
- a reference to this command builder, never
null
-
dumpInfobase
public RuntimeExecutionCommandBuilder dumpInfobase(String destinationFile)
Add dumping Infobase to given destination file option to constructing command.- Parameters:
destinationFile
- destination file to dump to, cannot benull
- Returns:
- a reference to this command builder, never
null
-
restoreInfobase
public RuntimeExecutionCommandBuilder restoreInfobase(String sourceFile)
Add restoring Infobase from given source file option to constructing command.- Parameters:
sourceFile
- source file to restore from, cannot benull
- Returns:
- a reference to this command builder, never
null
-
dumpConfigurationToCf
public RuntimeExecutionCommandBuilder dumpConfigurationToCf(String destinationFile)
Add exporting Configuration to given destination *.cf file option to constructing command.- Parameters:
destinationFile
- destination file to dump to, cannot benull
- Returns:
- a reference to this command builder, never
null
-
loadConfigurationFromCf
public RuntimeExecutionCommandBuilder loadConfigurationFromCf(String sourceFile)
Add importing Configuration from given *.cf file option to constructing command.- Parameters:
sourceFile
- *.cf file to restore from, cannot benull
- Returns:
- a reference to this command builder, never
null
-
dumpExternalDataToFiles
public RuntimeExecutionCommandBuilder dumpExternalDataToFiles(ConfigurationFilesFormat format, String rootSourceFile, String extarnalDataFile)
Add dumping an external report or data processor to a set of files option to constructing command.- Parameters:
format
- formal of XML files - plain or hierarchical, ornull
if not neededrootSourceFile
- the root file of platform XML etxernal data presentation, cannot benull
extarnalDataFile
- the external data dump file, cannot benull
- Returns:
- a reference to this command builder, never
null
-
loadExternalDataFromFiles
public RuntimeExecutionCommandBuilder loadExternalDataFromFiles(String rootSourceFile, String extarnalDataFile)
Add loading of an external report or data processor from a set of files option to constructing command.- Parameters:
rootSourceFile
- the root file of platform XML etxernal data presentation, cannot benull
extarnalDataFile
- the external data dump file, cannot benull
- Returns:
- a reference to this command builder, never
null
-
createInfobase
public RuntimeExecutionCommandBuilder createInfobase(InfobaseReference infobase, CreateInfobaseArguments arguments, boolean addReference)
Add Infobase creation option to constructing command.This command option is only supported in "create infobase" mode of 1C:Enterprise runtime execution.
- Parameters:
infobase
- infobase instance to create, cannot benull
arguments
- create Infobase arguments, cannot benull
addReference
- add reference to created infobase to infobases configuration file- Returns:
- a reference to this command builder, never
null
-
usingTemplate
public RuntimeExecutionCommandBuilder usingTemplate(Path templateLocation)
Add Infobase template usage option to constructing command.This command option is only supported in "create infobase" mode of 1C:Enterprise runtime execution.
- Parameters:
templateLocation
- the locaton of the infobase template, must have extension*.cf
,*.cfu
or*.dt
, cannot benull
- Returns:
- a reference to this command builder, never
null
-
emulateDeplay
public RuntimeExecutionCommandBuilder emulateDeplay(Double callDelay, Double dataSendingDelay, Double dataReceivingDelay)
Add server delay emulation option to launched 1C:Enterprise client.- Parameters:
callDelay
- the server call delay in seconds, can benull
then will not be appended as option parameterdataSendingDelay
- the data sending delay in KB per seconds, can benull
then will not be appended as option parameterdataReceivingDelay
- the data receiving delay in KB per seconds, can benull
then will not be appended as option parameter- Returns:
- a reference to this command builder, never
null
-
clientType
public RuntimeExecutionCommandBuilder clientType(ClientType clientType)
Set running 1C:Enterprise runtime client type.- Parameters:
clientType
- the launching client type, cannot benull
- Returns:
- a reference to this command builder, never
null
-
autoCheckVersion
public RuntimeExecutionCommandBuilder autoCheckVersion()
Add running 1C:Enterprise runtime auto version selection option.- Returns:
- a reference to this command builder, never
null
-
disableDistributionSupport
public RuntimeExecutionCommandBuilder disableDistributionSupport(boolean force)
Add disable distribution configuration support option.- Parameters:
force
- whether need to disable configuration support even if changing the configuration is not allowed- Returns:
- a reference to this command builder, never
null
-
agentMode
public RuntimeExecutionCommandBuilder agentMode(Path baseLocation)
Add SSH agent start mode option.- Parameters:
baseLocation
- the base directory for the SFTP server and for the dump and restore configuration commands, cannot benull
- Returns:
- a reference to this command builder, never
null
-
agentPort
public RuntimeExecutionCommandBuilder agentPort(int port)
Add SSH agent port option.- Parameters:
port
- the port to run agent on- Returns:
- a reference to this command builder, never
null
-
logTo
public RuntimeExecutionCommandBuilder logTo(File logFile, boolean clear)
Add logging 1C:Enterprise runtime process execution to given file option to constructing command.- Parameters:
logFile
- log file to write log to, cannot benull
clear
- whether need to clear log file before startup- Returns:
- a reference to this command builder, never
null
-
start
public Process start() throws IOException
Starts runtime process, based on constructed commands.Shortcut to
commandBuilder.toProcessBuilder().start();
- Returns:
- started process instance, never
null
- Throws:
IOException
- if an I/O error occurs during process start
-
toProcessBuilder
public ProcessBuilder toProcessBuilder()
Returns process builder, based on constructed commands.- Returns:
- process builder, based on constructed commands, never
null
-
appendOption
protected void appendOption(List<String> commands, String string)
Description copied from class:AbstractExecutionCommandBuilder
Append the provided option to the the command builder. Subclass must implement.- Specified by:
appendOption
in classAbstractExecutionCommandBuilder<RuntimeExecutionCommandBuilder>
string
- option to append, cannot benull
-
appendOptionParameter
protected void appendOptionParameter(List<String> commands, String string)
Description copied from class:AbstractExecutionCommandBuilder
Append the provided option parameter to the command builder. Subclass must implement.- Specified by:
appendOptionParameter
in classAbstractExecutionCommandBuilder<RuntimeExecutionCommandBuilder>
string
- option parameter to append, cannot benull
-
-