info.magnolia.commands.impl
Class ImportCommand

java.lang.Object
  extended by info.magnolia.commands.MgnlCommand
      extended by info.magnolia.commands.impl.BaseRepositoryCommand
          extended by info.magnolia.commands.impl.ExportCommand
              extended by info.magnolia.commands.impl.ImportCommand
All Implemented Interfaces:
Command

public class ImportCommand
extends ExportCommand

Generic Import Command.
Based on an InputStream representing a XML node structure, create the Node tree under the
specified workspace and path.


Field Summary
static String IMPORT_IDENTIFIER_BEHAVIOR
           
static String IMPORT_XML_FILE_NAME
           
static String IMPORT_XML_STREAM
           
 
Fields inherited from class info.magnolia.commands.impl.ExportCommand
EXPORT_EXTENSION, EXPORT_FILE_NAME, EXPORT_FORMAT, EXPORT_KEEP_HISTORY, EXPORT_MIME_EXTENSION, EXPORT_OUTPUT_STREAM, MIME_APPLICATION_ZIP, MIME_GZIP, MIME_TEXT_XML
 
Fields inherited from interface info.magnolia.commands.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
ImportCommand()
           
 
Method Summary
 boolean execute(Context context)
          This is the actual method to be overridden in descendant classes.
 int getIdentifierBehavior()
           
 String getXmlFileName()
           
 InputStream getXmlStream()
           
 void setIdentifierBehavior(int identifierBehavior)
          See ImportUUIDBehavior constants definition.
 void setXmlFileName(String xmlFileName)
           
 void setXmlStream(InputStream xmlStream)
           
 
Methods inherited from class info.magnolia.commands.impl.ExportCommand
checkPermissions, getExt, getFileName, getMimeExtension, getOutputStream, isFormat, isKeepHistory, setExt, setFileName, setFormat, setKeepHistory, setMimeExtension, setOutputStream
 
Methods inherited from class info.magnolia.commands.impl.BaseRepositoryCommand
copy, getJCRNode, getNode, getPath, getRepository, getUuid, release, setPath, setRepository, setUuid
 
Methods inherited from class info.magnolia.commands.MgnlCommand
execute, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMPORT_XML_STREAM

public static final String IMPORT_XML_STREAM
See Also:
Constant Field Values

IMPORT_XML_FILE_NAME

public static final String IMPORT_XML_FILE_NAME
See Also:
Constant Field Values

IMPORT_IDENTIFIER_BEHAVIOR

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

ImportCommand

public ImportCommand()
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.

Overrides:
execute in class ExportCommand
Throws:
Exception

getXmlStream

public InputStream getXmlStream()
Returns:
the xmlStream

setXmlStream

public void setXmlStream(InputStream xmlStream)
Parameters:
xmlStream - the xmlStream to set

getXmlFileName

public String getXmlFileName()
Returns:
the xmlFileName

setXmlFileName

public void setXmlFileName(String xmlFileName)
Parameters:
xmlFileName - the xmlFileName to set

getIdentifierBehavior

public int getIdentifierBehavior()
Returns:
the identifierBehavior

setIdentifierBehavior

public void setIdentifierBehavior(int identifierBehavior)
See ImportUUIDBehavior constants definition.

Parameters:
identifierBehavior - the identifierBehavior to set


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