|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.server.io.AbstractCommand
org.apache.jackrabbit.server.io.ZIPImportCommand
This Class implements an import command that reads entries from a zip input stream and delegates the extracted file back to the import chain.
Field Summary | |
static String |
ZIP_CONTENT_TYPE
the zip content type |
Fields inherited from interface org.apache.jackrabbit.JcrConstants |
JCR_AUTOCREATED, JCR_BASEVERSION, JCR_CHILD, JCR_CHILDNODEDEFINITION, JCR_CONTENT, JCR_CREATED, JCR_DATA, JCR_DEFAULTPRIMARYTYPE, JCR_DEFAULTVALUES, JCR_ENCODING, JCR_FROZENMIXINTYPES, JCR_FROZENNODE, JCR_FROZENPRIMARYTYPE, JCR_FROZENUUID, JCR_HASORDERABLECHILDNODES, JCR_ISCHECKEDOUT, JCR_ISMIXIN, JCR_LANGUAGE, JCR_LASTMODIFIED, JCR_LOCKISDEEP, JCR_LOCKOWNER, JCR_MANDATORY, JCR_MERGEFAILED, JCR_MIMETYPE, JCR_MIXINTYPES, JCR_MULTIPLE, JCR_NAME, JCR_NODETYPENAME, JCR_ONPARENTVERSION, JCR_PATH, JCR_PREDECESSORS, JCR_PRIMARYITEMNAME, JCR_PRIMARYTYPE, JCR_PROPERTYDEFINITION, JCR_PROTECTED, JCR_REQUIREDPRIMARYTYPES, JCR_REQUIREDTYPE, JCR_ROOTVERSION, JCR_SAMENAMESIBLINGS, JCR_SCORE, JCR_STATEMENT, JCR_SUCCESSORS, JCR_SUPERTYPES, JCR_SYSTEM, JCR_UUID, JCR_VALUECONSTRAINTS, JCR_VERSIONABLEUUID, JCR_VERSIONHISTORY, JCR_VERSIONLABELS, JCR_VERSIONSTORAGE, MIX_LOCKABLE, MIX_REFERENCEABLE, MIX_VERSIONABLE, NT_BASE, NT_CHILDNODEDEFINITION, NT_FILE, NT_FOLDER, NT_FROZENNODE, NT_HIERARCHYNODE, NT_LINKEDFILE, NT_NODETYPE, NT_PROPERTYDEFINITION, NT_QUERY, NT_RESOURCE, NT_UNSTRUCTURED, NT_VERSION, NT_VERSIONEDCHILD, NT_VERSIONHISTORY, NT_VERSIONLABELS |
Constructor Summary | |
ZIPImportCommand()
|
Method Summary | |
boolean |
canHandle(String contentType)
Returns true if the given content type is equal to
ZIP_CONTENT_TYPE . |
boolean |
execute(AbstractContext context)
Executes this command by calling importResource(org.apache.jackrabbit.server.io.ImportContext, javax.jcr.Node, java.io.InputStream) if
the given context is of the correct class. |
boolean |
execute(ImportContext context)
Override default behaviour and abort chain if input is processed. |
boolean |
importResource(ImportContext context,
Node parentNode,
InputStream in)
Imports a resource by extracting the input stream and delegating to import chain. |
static String |
makeValidJCRPath(String label)
Creates a valid jcr label from the given one |
void |
setRecursive(boolean recursive)
Sets if the zips should be extracted again |
Methods inherited from class org.apache.jackrabbit.server.io.AbstractCommand |
execute, getId, setEnabled, setId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String ZIP_CONTENT_TYPE
Constructor Detail |
public ZIPImportCommand()
Method Detail |
public boolean execute(AbstractContext context) throws Exception
importResource(org.apache.jackrabbit.server.io.ImportContext, javax.jcr.Node, java.io.InputStream)
if
the given context is of the correct class.
execute
in class AbstractCommand
context
- the (import) context.
Exception
- in an error occurrspublic boolean execute(ImportContext context) throws Exception
context
-
Exception
public boolean importResource(ImportContext context, Node parentNode, InputStream in) throws Exception
parentNode
- the parent nodein
- the input stream
Exception
- in an error occurrspublic boolean canHandle(String contentType)
true
if the given content type is equal to
ZIP_CONTENT_TYPE
.
contentType
- the content type to check.
true
if equal to ZIP_CONTENT_TYPE
.public void setRecursive(boolean recursive)
recursive
- public static String makeValidJCRPath(String label)
label
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |