Class CopyPasteDocsUtils

java.lang.Object
org.gvsig.app.project.documents.actions.CopyPasteDocsUtils

public class CopyPasteDocsUtils extends Object
This class provides utility methods to manage the clipboard for documents (it's file-based, it's not the system clipboard) which will contain one or more documents for copy/cut/paste operations. It is currently implemented using persistence Each document type uses it's own "clipboard". Some actions can affect all those clipboards at the same time
Author:
jldominguez
  • Method Details

    • getClipboardFiles

      public static List<File> getClipboardFiles(String typeName)
      Gets all if parameter is null
    • clearClipboard

      public static void clearClipboard(String docTypeName) throws IOException
      Clears clipboard of the provided doc type, or clears all document clipboard if parameter is null.
      Parameters:
      docTypeName -
      Throws:
      IOException
    • getClipboardDocuments

      public static List<Document> getClipboardDocuments(String typeName) throws IOException, org.gvsig.tools.persistence.exception.PersistenceException
      Returns the content of the clipboard as a list of documents or null if clipboard is empty or does not contain documents of the specified type
      Returns:
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException
      IOException
    • saveToClipboard

      public static void saveToClipboard(List<Document> docs) throws IOException, org.gvsig.tools.persistence.exception.PersistenceException
      Stores doc list to their clipboard to clipboard
      Parameters:
      st -
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException
      IOException
    • getLastMessage

      public static String getLastMessage(Throwable ex)