Class GeoprocessingDataFile

    • Constructor Detail

      • GeoprocessingDataFile

        public GeoprocessingDataFile()
        Creates an instance. The input url defaults to an empty string.
        Since:
        100.0.0
      • GeoprocessingDataFile

        public GeoprocessingDataFile​(java.lang.String inputUrl)
        Creates an instance.
        Parameters:
        inputUrl - the url of the input file
        Throws:
        java.lang.IllegalArgumentException - if inputUrl is null
        Since:
        100.0.0
    • Method Detail

      • getUrl

        public java.lang.String getUrl()
        Returns the URL.
        Returns:
        the URL
        Since:
        100.0.0
      • setUrl

        public void setUrl​(java.lang.String url)
        Sets the URL.
        Parameters:
        url - the URL
        Throws:
        java.lang.IllegalArgumentException - if url is null or empty
        Since:
        100.0.0
      • setUploadId

        public void setUploadId​(java.lang.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 of getInputFilePath() and getUrl() to be ignored.
        Parameters:
        uploadId - the upload ID
        Throws:
        java.lang.IllegalArgumentException - if the upload ID is null or empty
        Since:
        100.1.0
      • getUploadId

        public java.lang.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​(java.lang.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 of getUrl() will be ignored. Note that this property will be ignored if an upload ID is set.
        Parameters:
        inputFilePath - path to the input file
        Throws:
        java.lang.IllegalArgumentException - if input file path is null or empty
        Since:
        100.1.0
      • getInputFilePath

        public java.lang.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<java.lang.Void> fetchFileAsync​(java.lang.String fileNameWithPath)
        Asynchronously fetches the data file at the url indicated by getUrl().
        Parameters:
        fileNameWithPath - full path, including filename, to which to write the result file
        Throws:
        java.lang.IllegalArgumentException - if fileNameWithPath is null
        java.lang.IllegalArgumentException - 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:
        getCredential in interface RemoteResource
        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:
        setCredential in interface RemoteResource
        Parameters:
        credential - the credential used for authentication
        Since:
        100.0.0
      • setRequestConfiguration

        public void setRequestConfiguration​(RequestConfiguration requestConfiguration)
        Sets the configuration parameters used for sending a network request using this parameter object - See fetchFileAsync(String). The global RequestConfiguration is used if no RequestConfiguration is set which contains the default values from the getter/setter methods.
        Specified by:
        setRequestConfiguration in interface RemoteResource
        Parameters:
        requestConfiguration - contains the parameters to use
        Since:
        100.0.0
        See Also:
        RequestConfiguration