Delete File/Folder

Operation Name

Delete File/Folder

Function overview

Delete the folder/files on Niftycloud Storage.

Data Model

XML type.

Properties

For information about using variables, refer to "variables".
Basic settings
Item name Required / Optional Use of Variables Description Remarks
Name Required Not available Enter the name on the script canvas.  
Required settings
Item name Required / Optional Use of Variables Description Remarks
Destination Required Not available Select global resource.
  • [Add]:
    Adds new global resource.
  • [Edit list]:
    Global resource settings can be edited with "Edit Resource list".
 
Bucket name Required Available Specify Bucket.
  • If specifying Bucket which large number of files exist in [Bucket name], it may takes time to update list of [Folder path].
    For avoidance method, refer to "Notes" section.
Delete bucket Optional Not available Select whether to delete the Bucket.
  • [Checked]:
    Deletes bucket.
  • [Not Checked]: (default)
    Deletes file/folder.
 
Folder path Required Available Enter Niftycloud strage folder path.
Delete folder Optional Not available Choose whether to delete the folder specified in [Folder path].
  • [Checked]:
    Deletes the folder specified in [Folder path] and all files/folders in the folder.
  • [Not Checked]: (default)
    Does not delete the folder specified in [Folder path]. Behavior against a file/folder in the folder depends on [File/folder name] and [Recursive processing] settings.
 
File/folder name Required Available Specify a file/folder.
  • If [Delete bucket] or [Delete folder] has been checked, then it will be disabled.
  • Wildcards("*" and "?") are available.
  • "/" Can not be included.
Recursive processing Optional Not available For a specified folder, select whether to delete the file/folder recursively or not.
  • [Checked]:
    If the specified folder in [File/folder name] contains folders or the specified wildcard matches folders, then deletes the file/folder recursively.
  • [Not Checked]: (default)
    If the specified folder in [File/folder name] contains files/folders, then deletes the files. If the specified wildcard matches folders, then deletes nothing.
 
Data processing method
Item name Required / Optional Use of Variables Description Remarks
Mass data processing Required Not available Select a data processing method.
  • [Use script settings]: (default)
    Apply mass data processing settings of script property to adapter.
  • [Disable]:
    Mass data processing is not performed.
  • [Enable]:
    Mass data processing is performed.
 
Comment
Item name Required / Optional Use of Variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input Schema

None.

Output Schema

When deleting files

<?xml version="1.0"?>
<server>
  <bucket errorcode="" name="" status="" >
    <file errorcode="" name="" remotepath="" status="" type="" />
  </bucket>
</server>
Element Name Attribute Name Description Remarks
server -    
bucket - Outputs the status of the retrieved bucket.  
errorcode When an error occur in Niftycloud Storage during getting a bucket, APT error code is output which is defined at Niftycloud Storage.
  • When an error does not occur in Niftycloud Storage, there is a blank.
  • For more details about API error code defined in Niftycloud Storage, refer to (http://cloud.nifty.com/api/storage/errorcode.htm).
name Outputs the name of the retrieved bucket.  
status Outputs the name of the retrieved bucket.
  • Exist: Status that the Bucket exists.
  • ErrorBucketNotFound: Status that specified Bucket does not exist in Niftycloud Storage. The specified [Bucket name] may be incorrect.
  • Error: Status that because error has occurred, Bucket could not be obtained.
 
file - Appears in each deleted file/folder.  
errorcode When an error occur in Niftycloud Storage during deleting a file/folder, APT error code is output which is defined at Niftycloud Storage.
  • When an error does not occur in Niftycloud Storage, there is a blank.
  • For more details about API error code defined in Niftycloud Storage, refer to (http://cloud.nifty.com/api/storage/errorcode.htm).
name Outputs the name of deleted file/folder.
  • If status is "ErrorRemoteFolderNotFound" then the value is blank.
  • If [Delete folder] is [Checked] then the value is blank.
remotepath Outputs file path on Niftycloud Storage of the deleted file/folder.  
status Outputs the status of deleted file/folder.
  • Deleted: Status that the file/folder is successfully deleted.
  • ErrorRemoteFolderNotFound: Status that the specified [Folder path] is not on the Niftycloud Storage, or file is specified.
  • ErrorRemoteFileNotFound: Status that on Niftycloud Storage, the specified file/folder does not exist in the specified [Folder path].
  • Error: Status that because an error occurred file/ folder could not be deleted.
 
type Outputs the classification of deleted file/folder.
  • File: File
  • Folder: Folder
 

When deleting Bucket

<?xml version="1.0"?>
<server>
  <bucket name="" status="" />
</server>
Element Name Attribute Name Description Remarks
server -    
bucket - Appears in each bucket acquired.  
name Outputs the name of the retrieved bucket.  
status Outputs the status of the retrieved bucket.
  • Deleted: Status that Bucket is successfully deleted.
  • ErrorBucketNotFound: Status that specified Bucket does not exist in Niftycloud Storage. The specified [Bucket name] may be incorrect.
  • Error: Could not delete the Bucket due to error.
 

Loading Schema on Mapper

Schema is loaded automatically.
For more details, refer to "Edit Schema".

Mass Data Processing

Mass data processing is supported.

Transaction

Transaction is not supported.

PSP Usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
count Stores the number of deleted folder and file.
  • Default value is null.
  • The value is sum of "folder_count" and "file_count".
folder_count Stores the number of deleted folder.
  • Default value is null.
file_count Stores the number of deleted file.
  • Default value is null.
message_category Stores the category of message code corresponding to the occured error.
  • Default value is null.
message_code Stores the code of message code corresponding to the occured error.
  • Default value is null.
message_level Stores the severity of message code corresponding to the occured error.
  • Default value is null.
error_type Returns the error type when error occurred.
  • Default value is null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on the DataSpider Servista version.
error_message Returns the error message when error occurred.
  • Default value is null.
  • The message may vary depending on the DataSpider Servista version.
error_trace Returns the trace information when error occurred.
  • Default value is null.
  • The message may vary depending on the DataSpider Servista version or the client application used.

Specification Limits

Main Exceptions

Exception name Cause Solution
ResourceNotFoundException
Resource definition could not be found.Name: []
[Destination] is not specified. Specify[Destination].
ResourceNotFoundException
Resource definition could not be found.Name: [<name of global resource>]
Resource definition selected in [Destination] is not found. Confirm the global resource specified in [Destination].
InvalidPropertyConfigurationException
<Property name> is required.
[<Property name>]is not specified. Specify [<Property name>].
InvalidPropertyConfigurationException
"/" is involved in file/folder name.
"/" is involved in [file/folder name]. Specify file/folder name which does not have "/" in [file/folder name].
java.lang.UnsupportedOperationException
Root folder cannot be deleted.
Rood folder is going to be deleted. If [Delete folder] is [Checked], specify folder except root folder at [Folder path].
com.nifty.cloud.ncs.service.StorageException
The Access Key Id you provided does not exist in our records.
[AccessKey] of global resource specified in [Destination] is wrong. Confirm the settings of global resource specified in [Destination].
com.nifty.cloud.ncs.service.StorageException
The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. For more information, see REST Authentication and SOAP Authentication for details.
[SecretAccessKey] of global resource specified in [Destination] is wrong. Confirm the settings of global resource specified in [Destination].
com.nifty.cloud.ncs.NiftyCloudClientException
Failed to execute HTTP request: Connect to ncss.nifty.com/ncss.nifty.com/xxx.xxx.xxx.xxx timed out
Connection with Niftycloud Storage could not be confirmed during [Timeout] of global resource specified in [Destination] . Confirm the settings of global resource specified in [Destination].
com.nifty.cloud.ncs.NiftyCloudClientException
Failed to execute HTTP request: peer not authenticated
Certification with Niftycloud Storage could not be confirmed during [Timeout] of global resource specified in [Destination] . Confirm the settings of global resource specified in [Destination].

Notes