org.apache.lenya.cms.site.usecases
Class Clipboard

java.lang.Object
  extended by org.apache.lenya.cms.site.usecases.Clipboard

public class Clipboard
extends java.lang.Object

Clipboard for cut/copy/paste of documents. The clipping method is either METHOD_CUT or METHOD_COPY.

Version:
$Id: Clipboard.java 532642 2007-04-26 07:51:51Z andreas $

Field Summary
static int METHOD_COPY
          The "copy" method.
static int METHOD_CUT
          The "cut" method.
 
Constructor Summary
Clipboard(org.apache.lenya.cms.publication.Document document, int _method)
          Ctor.
 
Method Summary
 org.apache.lenya.cms.publication.Document getDocument(org.apache.lenya.cms.publication.DocumentFactory identityMap, org.apache.lenya.cms.publication.Publication publication)
          Returns the document for the current identity map.
 int getMethod()
          Returns the method of this clipboard.
 java.lang.String getPublicationId()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METHOD_CUT

public static final int METHOD_CUT
The "cut" method.

See Also:
Constant Field Values

METHOD_COPY

public static final int METHOD_COPY
The "copy" method.

See Also:
Constant Field Values
Constructor Detail

Clipboard

public Clipboard(org.apache.lenya.cms.publication.Document document,
                 int _method)
Ctor.

Parameters:
document - The document to put on the clipboard.
_method - The clipping method.
Method Detail

getDocument

public org.apache.lenya.cms.publication.Document getDocument(org.apache.lenya.cms.publication.DocumentFactory identityMap,
                                                             org.apache.lenya.cms.publication.Publication publication)
                                                      throws org.apache.lenya.cms.publication.DocumentBuildException
Returns the document for the current identity map.

Parameters:
identityMap - The identity map.
publication - The publication.
Returns:
A document.
Throws:
org.apache.lenya.cms.publication.DocumentBuildException - if the document could not be built.

getPublicationId

public java.lang.String getPublicationId()
Returns:
The ID of the publication the document belongs to.

getMethod

public int getMethod()
Returns the method of this clipboard.

Returns:
An integer.


Copyright $ Apache Software Foundation. All Rights Reserved.