org.exoplatform.services.jcr.rmi.api.xml
Class WorkspaceImportContentHandler
java.lang.Object
org.exoplatform.services.jcr.rmi.api.xml.ImportContentHandler
org.exoplatform.services.jcr.rmi.api.xml.WorkspaceImportContentHandler
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.ErrorHandler
public class WorkspaceImportContentHandler
- extends ImportContentHandler
SAX content handler for importing XML data to a JCR Workspace. This utility
class can be used to implement the Workspace.getImportContentHandler(String, int) method in terms of the
Workspace.importXML(String,
InputStream, int) method.
|
Constructor Summary |
WorkspaceImportContentHandler(javax.jcr.Workspace workspace,
java.lang.String path,
int uuidBehaviour)
Creates a SAX content handler for importing XML data to the given workspace and path using the
given UUID behaviour. |
|
Method Summary |
protected void |
importXML(byte[] xml)
Imports the serialized XML stream using the standard
Workspace.importXML(String,
InputStream, int) method. |
| Methods inherited from class org.exoplatform.services.jcr.rmi.api.xml.ImportContentHandler |
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WorkspaceImportContentHandler
public WorkspaceImportContentHandler(javax.jcr.Workspace workspace,
java.lang.String path,
int uuidBehaviour)
throws javax.jcr.version.VersionException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.lock.LockException,
javax.jcr.RepositoryException
- Creates a SAX content handler for importing XML data to the given workspace and path using the
given UUID behaviour.
- Parameters:
workspace - repository workspacepath - import content pathuuidBehaviour - UUID behaviour
- Throws:
javax.jcr.RepositoryException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
importXML
protected void importXML(byte[] xml)
throws java.io.IOException,
javax.jcr.PathNotFoundException,
javax.jcr.ItemExistsException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.InvalidSerializedDataException,
javax.jcr.RepositoryException
- Imports the serialized XML stream using the standard
Workspace.importXML(String,
InputStream, int) method. Imports the given XML data. This method is called by the endDocument()
method after the received XML stream has been serialized.
Subclasses must implement this method to provide the actual import mechanism.
- Specified by:
importXML in class ImportContentHandler
- Parameters:
xml - the XML data to import
- Throws:
javax.jcr.RepositoryException
java.io.IOException
javax.jcr.AccessDeniedException
javax.jcr.lock.LockException
javax.jcr.InvalidSerializedDataException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.ItemExistsException
javax.jcr.PathNotFoundException
Copyright © 2010 eXo Platform SAS. All Rights Reserved.