info.magnolia.commands.impl
Class ExportCommand

java.lang.Object
  extended by info.magnolia.commands.MgnlCommand
      extended by info.magnolia.commands.impl.BaseRepositoryCommand
          extended by info.magnolia.commands.impl.ExportCommand
All Implemented Interfaces:
Command, Cloneable
Direct Known Subclasses:
ImportCommand

public class ExportCommand
extends BaseRepositoryCommand

Generic Export Command.

Get as Input parameter:
Workspace and node path to export

Set as output:
Fill the OutputStream with an XML representation of the Node structure
Define the MimeType and File name.


Field Summary
static String EXPORT_EXTENSION
           
static String EXPORT_FILE_NAME
           
static String EXPORT_FORMAT
           
static String EXPORT_KEEP_HISTORY
           
static String EXPORT_MIME_EXTENSION
           
static String EXPORT_OUTPUT_STREAM
           
static String MIME_APPLICATION_ZIP
           
static String MIME_GZIP
           
static String MIME_TEXT_XML
           
 
Fields inherited from interface info.magnolia.commands.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
ExportCommand()
           
 
Method Summary
 boolean checkPermissions(String repository, String basePath, long permissionType)
          Uses access manager to authorize this request.
 boolean execute(Context context)
          This is the actual method to be overridden in descendant classes.
 String getExt()
           
 String getFileName()
           
 String getMimeExtension()
           
 OutputStream getOutputStream()
           
 boolean isFormat()
           
 boolean isKeepHistory()
           
 void setExt(String ext)
           
 void setFileName(String fileName)
           
 void setFormat(boolean format)
           
 void setKeepHistory(boolean keepHistory)
           
 void setMimeExtension(String mimeExtension)
           
 void setOutputStream(OutputStream outputStream)
           
 
Methods inherited from class info.magnolia.commands.impl.BaseRepositoryCommand
getJCRNode, getNode, getPath, getRepository, getUuid, release, setPath, setRepository, setUuid
 
Methods inherited from class info.magnolia.commands.MgnlCommand
clone, execute, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIME_TEXT_XML

public static final String MIME_TEXT_XML
See Also:
Constant Field Values

MIME_GZIP

public static final String MIME_GZIP
See Also:
Constant Field Values

MIME_APPLICATION_ZIP

public static final String MIME_APPLICATION_ZIP
See Also:
Constant Field Values

EXPORT_EXTENSION

public static final String EXPORT_EXTENSION
See Also:
Constant Field Values

EXPORT_FORMAT

public static final String EXPORT_FORMAT
See Also:
Constant Field Values

EXPORT_KEEP_HISTORY

public static final String EXPORT_KEEP_HISTORY
See Also:
Constant Field Values

EXPORT_FILE_NAME

public static final String EXPORT_FILE_NAME
See Also:
Constant Field Values

EXPORT_MIME_EXTENSION

public static final String EXPORT_MIME_EXTENSION
See Also:
Constant Field Values

EXPORT_OUTPUT_STREAM

public static final String EXPORT_OUTPUT_STREAM
See Also:
Constant Field Values
Constructor Detail

ExportCommand

public ExportCommand()
Method Detail

execute

public boolean execute(Context context)
                throws Exception
Description copied from class: MgnlCommand
This is the actual method to be overridden in descendant classes.

Specified by:
execute in class MgnlCommand
Throws:
Exception

checkPermissions

public boolean checkPermissions(String repository,
                                String basePath,
                                long permissionType)
Uses access manager to authorize this request.

Returns:
boolean true if read access is granted

getExt

public String getExt()
Returns:
the ext

setExt

public void setExt(String ext)
Parameters:
ext - the ext to set

isFormat

public boolean isFormat()
Returns:
the format

setFormat

public void setFormat(boolean format)
Parameters:
format - the format to set

isKeepHistory

public boolean isKeepHistory()
Returns:
the keepHistory

setKeepHistory

public void setKeepHistory(boolean keepHistory)
Parameters:
keepHistory - the keepHistory to set

getFileName

public String getFileName()
Returns:
the fileName

setFileName

public void setFileName(String fileName)
Parameters:
fileName - the fileName to set

getOutputStream

public OutputStream getOutputStream()
Returns:
the outputStream

setOutputStream

public void setOutputStream(OutputStream outputStream)
Parameters:
outputStream - the outputStream to set

getMimeExtension

public String getMimeExtension()
Returns:
the mimeExtension

setMimeExtension

public void setMimeExtension(String mimeExtension)
Parameters:
mimeExtension - the mimeExtension to set


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.