Class AbstractFileRuntimeComponentResolver
- java.lang.Object
-
- com._1c.g5.v8.dt.platform.services.core.runtimes.execution.impl.AbstractFileRuntimeComponentResolver
-
- All Implemented Interfaces:
IRuntimeComponentResolver
- Direct Known Subclasses:
FileRuntimeComponentResolver
public abstract class AbstractFileRuntimeComponentResolver extends Object implements IRuntimeComponentResolver
Abstract implementation ofIRuntimeComponentResolver
, based on 1C:Enterprise runtime components file existence.
-
-
Field Summary
Fields Modifier and Type Field Description protected IRuntimeComponentManager
componentManager
-
Constructor Summary
Constructors Constructor Description AbstractFileRuntimeComponentResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IRuntimeComponentType
getType(String typeId)
Return 1C:Enterprise runtime component type by given component type identifier.protected ILaunchableRuntimeComponent
resolveLaunchable(RuntimeInstallation installation, String fileName, String componentType)
Try to resolve launchable 1C:Enterprise runtime component of the given 1C:Enterprise runtime installation.protected String
withSuffix(String fileName, String suffix)
Returns file name with the given suffix appended.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.platform.services.core.runtimes.execution.IRuntimeComponentResolver
resolveComponents
-
-
-
-
Field Detail
-
componentManager
@Inject protected IRuntimeComponentManager componentManager
-
-
Method Detail
-
getType
protected IRuntimeComponentType getType(String typeId)
Return 1C:Enterprise runtime component type by given component type identifier. Can returnnull
if not found.- Parameters:
typeId
- the 1C:Enterprise runtime component type identifier, cannot benull
- Returns:
- the 1C:Enterprise runtime component type or
null
if type not found
-
withSuffix
protected String withSuffix(String fileName, String suffix)
Returns file name with the given suffix appended. Suffix will be appended before file extension of the file, if the original file name contains file extension. Otherwise suffix will be appended after entire original file name.Example of usage:
String original = "textExecutable.exe"; String witSuffix = withSuffix(original, "d"); // it will be textExecutabled.exe String original2 = "textFile"; String witSuffix2 = withSuffix(original, "d"); // it will be textFiled
- Parameters:
fileName
- the original file name to append suffix to, cannot benull
suffix
- the suffix to append, cannot benull
- Returns:
- the file name with the given suffix appended, never
null
-
resolveLaunchable
protected ILaunchableRuntimeComponent resolveLaunchable(RuntimeInstallation installation, String fileName, String componentType)
Try to resolve launchable 1C:Enterprise runtime component of the given 1C:Enterprise runtime installation. Can returnnull
if cannot resolve.- Parameters:
installation
- the 1C:Enterprise runtime installation to resolve component of, cannot benull
fileName
- the file name of component to resolve, cannot benull
- Returns:
- resolved launchable 1C:Enterprise runtime component or
null
if not resolved
-
-