org.apache.jackrabbit.core.xml
Class DefaultProtectedItemImporter

java.lang.Object
  extended by org.apache.jackrabbit.core.xml.DefaultProtectedItemImporter
All Implemented Interfaces:
ProtectedItemImporter, ProtectedNodeImporter, ProtectedPropertyImporter
Direct Known Subclasses:
DefaultProtectedNodeImporter, DefaultProtectedPropertyImporter

public class DefaultProtectedItemImporter
extends Object
implements ProtectedPropertyImporter, ProtectedNodeImporter

DefaultProtectedItemImporter...


Field Summary
protected  boolean isWorkspaceImport
           
protected  ReferenceChangeTracker referenceTracker
           
protected  NamePathResolver resolver
           
protected  JackrabbitSession session
           
protected  int uuidBehavior
           
 
Constructor Summary
DefaultProtectedItemImporter()
           
 
Method Summary
 void end(NodeImpl protectedParent)
          Does nothing.
 void end(NodeState protectedParent)
          Does nothing.
 void endChildInfo()
          Does nothing.
 boolean handlePropInfo(NodeImpl parent, PropInfo protectedPropInfo, QPropertyDefinition def)
          Always returns false.
 boolean handlePropInfo(NodeState parent, PropInfo protectedPropInfo, QPropertyDefinition def)
          Always returns false.
 boolean init(JackrabbitSession session, NamePathResolver resolver, boolean isWorkspaceImport, int uuidBehavior, ReferenceChangeTracker referenceTracker)
           
 void processReferences()
          Always returns false.
 boolean start(NodeImpl protectedParent)
          Always returns false.
 boolean start(NodeState protectedParent)
          Always returns false.
 void startChildInfo(NodeInfo childInfo, List<PropInfo> propInfos)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

session

protected JackrabbitSession session

resolver

protected NamePathResolver resolver

isWorkspaceImport

protected boolean isWorkspaceImport

uuidBehavior

protected int uuidBehavior

referenceTracker

protected ReferenceChangeTracker referenceTracker
Constructor Detail

DefaultProtectedItemImporter

public DefaultProtectedItemImporter()
Method Detail

init

public boolean init(JackrabbitSession session,
                    NamePathResolver resolver,
                    boolean isWorkspaceImport,
                    int uuidBehavior,
                    ReferenceChangeTracker referenceTracker)
Specified by:
init in interface ProtectedItemImporter
Returns:
See Also:
ProtectedItemImporter.init(org.apache.jackrabbit.api.JackrabbitSession, org.apache.jackrabbit.spi.commons.conversion.NamePathResolver, boolean, int, org.apache.jackrabbit.core.util.ReferenceChangeTracker)

start

public boolean start(NodeImpl protectedParent)
              throws RepositoryException
Always returns false.

Specified by:
start in interface ProtectedNodeImporter
Parameters:
protectedParent - A protected node that has either been created during the current XML import or that has been found to be existing without allowing same-name siblings.
Returns:
true If this importer is able to deal with the tree that may be present below the given protected Node.
Throws:
RepositoryException - If an error occurs.
See Also:
ProtectedNodeImporter.start(org.apache.jackrabbit.core.NodeImpl)

start

public boolean start(NodeState protectedParent)
              throws RepositoryException
Always returns false.

Specified by:
start in interface ProtectedNodeImporter
Parameters:
protectedParent - A protected node that has either been created during the current XML import or that has been found to be existing without allowing same-name siblings.
Returns:
true If this importer is able to deal with the tree that may be present below the given protected NodeState.
Throws:
RepositoryException - If an error occurs.
See Also:
ProtectedNodeImporter.start(org.apache.jackrabbit.core.state.NodeState)

end

public void end(NodeImpl protectedParent)
         throws RepositoryException
Does nothing.

Specified by:
end in interface ProtectedNodeImporter
Throws:
ConstraintViolationException - If the tree that was imported is incomplete.
RepositoryException - If another error occurs.
See Also:
ProtectedNodeImporter.end(NodeImpl)

end

public void end(NodeState protectedParent)
         throws RepositoryException
Does nothing.

Specified by:
end in interface ProtectedNodeImporter
Throws:
ConstraintViolationException - If the tree that was imported is incomplete.
RepositoryException - If another error occurs.
See Also:
ProtectedNodeImporter.end(NodeState)

startChildInfo

public void startChildInfo(NodeInfo childInfo,
                           List<PropInfo> propInfos)
                    throws RepositoryException
Does nothing.

Specified by:
startChildInfo in interface ProtectedNodeImporter
Throws:
ConstraintViolationException - If the given infos contain invalid or incomplete data and therefore cannot be properly handled by this importer.
RepositoryException - If another error occurs.
See Also:
ProtectedNodeImporter.startChildInfo(NodeInfo, java.util.List)

endChildInfo

public void endChildInfo()
                  throws RepositoryException
Does nothing.

Specified by:
endChildInfo in interface ProtectedNodeImporter
Throws:
ConstraintViolationException - If this method is called before all required child information has been imported.
RepositoryException - If another error occurs.
See Also:
ProtectedNodeImporter.endChildInfo()

handlePropInfo

public boolean handlePropInfo(NodeImpl parent,
                              PropInfo protectedPropInfo,
                              QPropertyDefinition def)
                       throws RepositoryException
Always returns false.

Specified by:
handlePropInfo in interface ProtectedPropertyImporter
Parameters:
parent - The affected parent node.
protectedPropInfo - The PropInfo to be imported.
def - The property definition determined by the importer that calls this method.
Returns:
true If the property could be successfully imported; false otherwise.
Throws:
RepositoryException - If an error occurs.
See Also:
ProtectedPropertyImporter.handlePropInfo(org.apache.jackrabbit.core.NodeImpl, PropInfo, org.apache.jackrabbit.spi.QPropertyDefinition)

handlePropInfo

public boolean handlePropInfo(NodeState parent,
                              PropInfo protectedPropInfo,
                              QPropertyDefinition def)
                       throws RepositoryException
Always returns false.

Specified by:
handlePropInfo in interface ProtectedPropertyImporter
Parameters:
parent - The affected parent node.
protectedPropInfo - The PropInfo to be imported.
def - The property definition determined by the importer that calls this method.
Returns:
true If the property could be successfully imported; false otherwise.
Throws:
RepositoryException - If an error occurs.
See Also:
ProtectedPropertyImporter.handlePropInfo(org.apache.jackrabbit.core.state.NodeState, PropInfo, QPropertyDefinition)

processReferences

public void processReferences()
                       throws RepositoryException
Always returns false.

Specified by:
processReferences in interface ProtectedItemImporter
Throws:
RepositoryException - If an error occurs.
See Also:
ProtectedItemImporter.processReferences()


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.