Class GeoprocessingDataFile
- java.lang.Object
-
- com.esri.arcgisruntime.tasks.geoprocessing.GeoprocessingParameter
-
- com.esri.arcgisruntime.tasks.geoprocessing.GeoprocessingDataFile
-
- All Implemented Interfaces:
RemoteResource
- Direct Known Subclasses:
GeoprocessingRaster
public class GeoprocessingDataFile extends GeoprocessingParameter implements RemoteResource
Corresponds to GPDataFile parameter type in the service REST specification.- Since:
- 100.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.esri.arcgisruntime.tasks.geoprocessing.GeoprocessingParameter
GeoprocessingParameter.Type
-
-
Constructor Summary
Constructors Constructor Description GeoprocessingDataFile()Creates an instance.GeoprocessingDataFile(String inputUrl)Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListenableFuture<Void>fetchFileAsync(String fileNameWithPath)Asynchronously fetches the data file at the url indicated bygetUrl().CredentialgetCredential()Gets the credential used to authenticate the user with the geoprocessing service.StringgetInputFilePath()Gets the input file path set on this data file parameter.RequestConfigurationgetRequestConfiguration()Gets the RequestConfiguration object that contains parameters used when making a request by this parameter - SeefetchFileAsync(String).StringgetUploadId()Gets the upload ID of this parameter.StringgetUrl()Returns the URL.voidsetCredential(Credential credential)Sets the credential used to authenticate the user with the geoprocessing service.voidsetInputFilePath(String inputFilePath)Sets the input file path of this parameter.voidsetRequestConfiguration(RequestConfiguration requestConfiguration)Sets the configuration parameters used for sending a network request using this parameter object - SeefetchFileAsync(String).voidsetUploadId(String uploadId)Sets the upload item ID of this parameter.voidsetUrl(String url)Sets the URL.
-
-
-
Constructor Detail
-
GeoprocessingDataFile
public GeoprocessingDataFile()
Creates an instance. The input url defaults to an empty string.- Since:
- 100.0.0
-
GeoprocessingDataFile
public GeoprocessingDataFile(String inputUrl)
Creates an instance.- Parameters:
inputUrl- the url of the input file- Throws:
IllegalArgumentException- if inputUrl is null- Since:
- 100.0.0
-
-
Method Detail
-
getUrl
public String getUrl()
Returns the URL.- Returns:
- the URL
- Since:
- 100.0.0
-
setUrl
public void setUrl(String url)
Sets the URL.- Parameters:
url- the URL- Throws:
IllegalArgumentException- if url is null or empty- Since:
- 100.0.0
-
setUploadId
public void setUploadId(String uploadId)
Sets the upload item ID of this parameter. This should be the ID of an item in the geoprocessing service's uploads resource. This will be the upload ID of an item previously uploaded to the server. Note that if this property is set it will cause both the values ofgetInputFilePath()andgetUrl()to be ignored.- Parameters:
uploadId- the upload ID- Throws:
IllegalArgumentException- if the upload ID is null or empty- Since:
- 100.1.0
-
getUploadId
public String getUploadId()
Gets the upload ID of this parameter. This will match the ID of an item in the geoprocessing service's uploads resource.- Returns:
- the upload ID
- Since:
- 100.1.0
-
setInputFilePath
public void setInputFilePath(String inputFilePath)
Sets the input file path of this parameter. This should be the location on disk of a file that will be uploaded to the server that the geoprocessing task will run on. Setting this will mean that the value ofgetUrl()will be ignored. Note that this property will be ignored if an upload ID is set.- Parameters:
inputFilePath- path to the input file- Throws:
IllegalArgumentException- if input file path is null or empty- Since:
- 100.1.0
-
getInputFilePath
public String getInputFilePath()
Gets the input file path set on this data file parameter.- Returns:
- the input file path
- Since:
- 100.1.0
-
fetchFileAsync
public ListenableFuture<Void> fetchFileAsync(String fileNameWithPath)
Asynchronously fetches the data file at the url indicated bygetUrl().- Parameters:
fileNameWithPath- full path, including filename, to which to write the result file- Throws:
IllegalArgumentException- if fileNameWithPath is nullIllegalArgumentException- if fileNameWithPath is empty- Since:
- 100.0.0
-
getCredential
public Credential getCredential()
Gets the credential used to authenticate the user with the geoprocessing service.- Specified by:
getCredentialin interfaceRemoteResource- Returns:
- the credential used for authentication
- Since:
- 100.0.0
-
setCredential
public void setCredential(Credential credential)
Sets the credential used to authenticate the user with the geoprocessing service.- Specified by:
setCredentialin interfaceRemoteResource- Parameters:
credential- the credential used for authentication- Since:
- 100.0.0
-
getRequestConfiguration
public RequestConfiguration getRequestConfiguration()
Gets the RequestConfiguration object that contains parameters used when making a request by this parameter - SeefetchFileAsync(String).- Specified by:
getRequestConfigurationin interfaceRemoteResource- Returns:
- the RequestConfiguration object or default values if nothing was set
- Since:
- 100.0.0
- See Also:
setRequestConfiguration(com.esri.arcgisruntime.io.RequestConfiguration)
-
setRequestConfiguration
public void setRequestConfiguration(RequestConfiguration requestConfiguration)
Sets the configuration parameters used for sending a network request using this parameter object - SeefetchFileAsync(String). The global RequestConfiguration is used if no RequestConfiguration is set which contains the default values from the getter/setter methods.- Specified by:
setRequestConfigurationin interfaceRemoteResource- Parameters:
requestConfiguration- contains the parameters to use- Since:
- 100.0.0
- See Also:
RequestConfiguration
-
-