Class SessionImporter
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.xml.SessionImporter
-
- All Implemented Interfaces:
SessionListener
,Importer
public class SessionImporter extends Object implements Importer, SessionListener
SessionImporter
...
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.jcr2spi.xml.Importer
Importer.NodeInfo, Importer.PropInfo, Importer.TextValue
-
-
Constructor Summary
Constructors Constructor Description SessionImporter(Path parentPath, SessionImpl session, SessionItemStateManager stateManager, int uuidBehavior)
Creates a newWorkspaceImporter
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
end()
void
endNode(Importer.NodeInfo nodeInfo)
void
loggedOut(Session session)
Called when aSession
has been 'closed' by calling
.Session.logout()
void
loggingOut(Session session)
Called when aSession
is about to be 'closed' by calling
.Session.logout()
void
start()
void
startNode(Importer.NodeInfo nodeInfo, List<Importer.PropInfo> propInfos, NamePathResolver resolver)
-
-
-
Constructor Detail
-
SessionImporter
public SessionImporter(Path parentPath, SessionImpl session, SessionItemStateManager stateManager, int uuidBehavior) throws PathNotFoundException, ConstraintViolationException, VersionException, LockException, RepositoryException
Creates a newWorkspaceImporter
instance.- Parameters:
parentPath
- Path of target node where to add the imported subtree.session
-uuidBehavior
- Flag that governs how incoming UUIDs are handled.- Throws:
PathNotFoundException
- If no node exists atparentPath
or if the current session is not granted read access.ConstraintViolationException
- If the node atparentPath
is protected.VersionException
- If the node atparentPath
is not checked-out.LockException
- If a lock prevents the addition of the subtree.RepositoryException
- If another error occurs.
-
-
Method Detail
-
start
public void start() throws RepositoryException
- Specified by:
start
in interfaceImporter
- Throws:
RepositoryException
-
startNode
public void startNode(Importer.NodeInfo nodeInfo, List<Importer.PropInfo> propInfos, NamePathResolver resolver) throws RepositoryException
- Specified by:
startNode
in interfaceImporter
propInfos
- list ofPropInfo
instancesresolver
- NamePathResolver dealing with prefix mappings of current context.- Throws:
RepositoryException
-
endNode
public void endNode(Importer.NodeInfo nodeInfo) throws RepositoryException
- Specified by:
endNode
in interfaceImporter
- Throws:
RepositoryException
-
end
public void end() throws RepositoryException
- Specified by:
end
in interfaceImporter
- Throws:
RepositoryException
-
loggingOut
public void loggingOut(Session session)
Description copied from interface:SessionListener
Called when aSession
is about to be 'closed' by calling
. At this moment the session is still valid.Session.logout()
- Specified by:
loggingOut
in interfaceSessionListener
- Parameters:
session
-- See Also:
SessionListener.loggingOut(Session)
-
loggedOut
public void loggedOut(Session session)
Description copied from interface:SessionListener
Called when aSession
has been 'closed' by calling
.Session.logout()
- Specified by:
loggedOut
in interfaceSessionListener
- Parameters:
session
-- See Also:
SessionListener.loggedOut(Session)
-
-