public class FileExecutionResources extends java.lang.Object implements ExecutionResources
File| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
DEFAULT_EXECUTION_RESOURCES_DIRNAME |
static java.lang.String |
DEFAULT_EXECUTION_RESOURCES_TMP_PATH |
| Constructor and Description |
|---|
FileExecutionResources() |
| Modifier and Type | Method and Description |
|---|---|
protected java.io.File |
fileFromResource(org.springframework.core.io.Resource resource)
Extract the underlying file from the resource.
|
java.lang.String |
getAsOsPath(org.springframework.core.io.Resource resource,
java.lang.Boolean overwrite)
Returns the resource as a file path.
|
java.io.File |
getBaseDir() |
ExecutionContext |
getExecutionContext() |
protected java.io.File |
getFile(java.lang.String relativePath) |
java.lang.String |
getPrefixDatePattern() |
java.io.File |
getWritableBaseDir()
The base directory where this execution can write
|
java.io.File |
getWritableOsFile(java.lang.String relativePath)
Allocates a local file in the writable area and return it as a
File. |
java.lang.String |
getWritableOsPath(java.lang.String relativePath)
Allocates a local file in the writable area and return it as a fully
qualified OS path.
|
org.springframework.core.io.Resource |
getWritableResource(java.lang.String relativePath)
Allocates a local file in the writable area and return it as a resource.
|
protected java.lang.String |
removeFilePrefix(java.lang.String url) |
protected java.text.SimpleDateFormat |
sdf() |
void |
setBaseDir(java.io.File baseDir) |
void |
setExecutionContext(ExecutionContext executionContext) |
void |
setPrefixDatePattern(java.lang.String prefixDatePattern) |
void |
setWithExecutionSubdirectory(java.lang.Boolean withExecutionSubdirectory)
Default is true.
|
protected static final java.lang.String DEFAULT_EXECUTION_RESOURCES_DIRNAME
public static final java.lang.String DEFAULT_EXECUTION_RESOURCES_TMP_PATH
protected java.text.SimpleDateFormat sdf()
public org.springframework.core.io.Resource getWritableResource(java.lang.String relativePath)
ExecutionResourcesgetWritableResource in interface ExecutionResourcespublic java.lang.String getWritableOsPath(java.lang.String relativePath)
ExecutionResourcesgetWritableOsPath in interface ExecutionResourcespublic java.io.File getWritableOsFile(java.lang.String relativePath)
ExecutionResourcesFile.getWritableOsFile in interface ExecutionResourcespublic java.lang.String getAsOsPath(org.springframework.core.io.Resource resource,
java.lang.Boolean overwrite)
ExecutionResourcesgetAsOsPath in interface ExecutionResourcesprotected java.io.File fileFromResource(org.springframework.core.io.Resource resource)
protected java.io.File getFile(java.lang.String relativePath)
public java.io.File getWritableBaseDir()
ExecutionResourcesgetWritableBaseDir in interface ExecutionResourcesprotected java.lang.String removeFilePrefix(java.lang.String url)
public void setBaseDir(java.io.File baseDir)
public void setExecutionContext(ExecutionContext executionContext)
public void setPrefixDatePattern(java.lang.String prefixDatePattern)
public java.io.File getBaseDir()
public ExecutionContext getExecutionContext()
public java.lang.String getPrefixDatePattern()
public void setWithExecutionSubdirectory(java.lang.Boolean withExecutionSubdirectory)
Copyright © 2007–2020. All rights reserved.