Class StorageCopyProcedure

All Implemented Interfaces:
Procedure

public class StorageCopyProcedure extends Procedure
The built-in storage copy procedure.
Version:
1.0
  • Constructor Details

    • StorageCopyProcedure

      public StorageCopyProcedure(String id, String type, Dict dict)
      Creates a new procedure from a serialized representation.
      Parameters:
      id - the object identifier
      type - the object type name
      dict - the serialized representation
  • Method Details

    • call

      public Object call(CallContext cx, Bindings bindings) throws ProcedureException
      Executes a call of this procedure in the specified context and with the specified call bindings. The semantics of what the procedure actually does, is up to each implementation. Note that the call bindings are normally inherited from the procedure bindings with arguments bound to their call values.
      Parameters:
      cx - the procedure call context
      bindings - the call bindings to use
      Returns:
      the result of the call, or null if the call produced no result
      Throws:
      ProcedureException - if the call execution caused an error
    • copy

      public static boolean copy(Path src, Path dst, boolean update, String ext)
      Copies a storage path (index or object) to a new destination.
      Parameters:
      src - the source path
      dst - the destination path
      update - the copy-only-on-newer flag
      ext - the optional file extension (data format)
      Returns:
      true if all objects were successfully copied, or false otherwise
    • copyObject

      public static boolean copyObject(Path src, Path dst, boolean update, String ext)
      Copies a single storage object to a new destination.
      Parameters:
      src - the source object path
      dst - the destination object path
      update - the copy-only-on-newer flag
      ext - the optional file extension (data format)
      Returns:
      true if the data was successfully copied, or false otherwise