Class CopyPasteDocsUtils
java.lang.Object
org.gvsig.app.project.documents.actions.CopyPasteDocsUtils
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 Summary
Modifier and TypeMethodDescriptionstatic voidclearClipboard(String docTypeName) Clears clipboard of the provided doc type, or clears all document clipboard if parameter is null.getClipboardDocuments(String typeName) 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 typegetClipboardFiles(String typeName) Gets all if parameter is nullstatic Stringstatic voidsaveToClipboard(List<Document> docs) Stores doc list to their clipboard to clipboard
-
Method Details
-
getClipboardFiles
Gets all if parameter is null -
clearClipboard
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.PersistenceExceptionIOException
-
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.PersistenceExceptionIOException
-
getLastMessage
-