Interface ProtectedNodeImporter
-
- All Superinterfaces:
ProtectedItemImporter
- All Known Implementing Classes:
AccessControlImporter
,DefaultProtectedItemImporter
,DefaultProtectedNodeImporter
,DefaultProtectedPropertyImporter
,UserImporter
public interface ProtectedNodeImporter extends ProtectedItemImporter
ProtectedNodeImporter
provides means to import protectedNode
s and the subtree defined below such nodes.The import of a protected tree is started by the
Importer
by callingstart(NodeImpl)
. If theProtectedNodeImporter
is able to deal with that type of protected node, it is in charge of dealing with all subsequent childNodeInfo
s present below the protected parent untilend(NodeImpl)
is called. The latter resets this importer and makes it available for another protected import.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
end(NodeImpl protectedParent)
Informs this importer that the tree to be imported belowprotectedParent
has bee completed.void
end(NodeState protectedParent)
Informs this importer that the tree to be imported belowprotectedParent
has bee completed.void
endChildInfo()
Informs this importer about the end of a child info.boolean
start(NodeImpl protectedParent)
Notifies this importer about the existence of a protected node that has either been created (NEW) or has been found to be existing.boolean
start(NodeState protectedParent)
Notifies this importer about the existence of a protected node that has either been created (NEW) or has been found to be existing.void
startChildInfo(NodeInfo childInfo, List<PropInfo> propInfos)
Informs this importer about a newchildInfo
and it's properties.-
Methods inherited from interface org.apache.jackrabbit.core.xml.ProtectedItemImporter
init, processReferences
-
-
-
-
Method Detail
-
start
boolean start(NodeImpl protectedParent) throws IllegalStateException, RepositoryException
Notifies this importer about the existence of a protected node that has either been created (NEW) or has been found to be existing. This importer implementation is in charge of evaluating the nature of that protected node in order to determine, if it is able to handle subsequent protected or non-protected child nodes in the tree below that parent.- 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:
IllegalStateException
- If this method is called on this importer without having reachedend(NodeImpl)
.RepositoryException
- If an error occurs.
-
start
boolean start(NodeState protectedParent) throws IllegalStateException, RepositoryException
Notifies this importer about the existence of a protected node that has either been created (NEW) or has been found to be existing. This importer implementation is in charge of evaluating the nature of that protected node in order to determine, if it is able to handle subsequent protected or non-protected child nodes in the tree below that parent.- 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:
IllegalStateException
- If this method is called on this importer without having reachedend(NodeState)
.RepositoryException
- If an error occurs.
-
end
void end(NodeImpl protectedParent) throws IllegalStateException, ConstraintViolationException, RepositoryException
Informs this importer that the tree to be imported belowprotectedParent
has bee completed. This allows the importer to be reset in order to be able to deal with another call tostart(NodeImpl)
.If
start(NodeImpl)
hasn't been called before, this method returns silently.- Parameters:
protectedParent
-- Throws:
IllegalStateException
- If end is called in an illegal state.ConstraintViolationException
- If the tree that was imported is incomplete.RepositoryException
- If another error occurs.
-
end
void end(NodeState protectedParent) throws IllegalStateException, ConstraintViolationException, RepositoryException
Informs this importer that the tree to be imported belowprotectedParent
has bee completed. This allows the importer to be reset in order to be able to deal with another call tostart(NodeState)
.If
start(NodeState)
hasn't been called before, this method returns silently.- Parameters:
protectedParent
-- Throws:
IllegalStateException
- If end is called in an illegal state.ConstraintViolationException
- If the tree that was imported is incomplete.RepositoryException
- If another error occurs.
-
startChildInfo
void startChildInfo(NodeInfo childInfo, List<PropInfo> propInfos) throws IllegalStateException, ConstraintViolationException, RepositoryException
Informs this importer about a newchildInfo
and it's properties. If the importer is able to successfully import the given information this method returns silently. OtherwiseConstraintViolationException
is thrown, in which case the whole import fails.In case this importer deals with multiple levels of nodes, it is in charge of maintaining the hierarchical structure (see also {#link endChildInfo()}.
If
start(NodeImpl)
hasn't been called before, this method returns silently.- Parameters:
childInfo
-propInfos
-- Throws:
IllegalStateException
- If called in an illegal state.ConstraintViolationException
- If the given infos contain invalid or incomplete data and therefore cannot be properly handled by this importer.RepositoryException
- If another error occurs.
-
endChildInfo
void endChildInfo() throws RepositoryException
Informs this importer about the end of a child info.If
start(NodeImpl)
hasn't been called before, this method returns silently.- Throws:
IllegalStateException
- If end is called in an illegal state.ConstraintViolationException
- If this method is called before all required child information has been imported.RepositoryException
- If another error occurs.
-
-