Interface ProtectedNodeImporter
-
- All Superinterfaces:
ProtectedItemImporter
public interface ProtectedNodeImporter extends ProtectedItemImporter
ProtectedNodeImporterprovides means to import protectedNodes and the subtree defined below such nodes.The import of a protected tree is started by the
Importerby callingstart(Tree). If theProtectedNodeImporteris able to deal with that type of protected node, it is in charge of dealing with all subsequent childNodeInfos present below the protected parent untilend(Tree)is called. The latter resets this importer and makes it available for another protected import.
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.spi.xml.ProtectedItemImporter
PARAM_IMPORT_BEHAVIOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidend(@NotNull Tree protectedParent)Informs this importer that the tree to be imported belowprotectedParenthas bee completed.voidendChildInfo()Informs this importer about the end of a child info.booleanstart(@NotNull Tree protectedParent)Notifies this importer about the existence of a protected node that has either been created (NEW) or has been found to be existing.voidstartChildInfo(@NotNull NodeInfo childInfo, @NotNull java.util.List<PropInfo> propInfos)Informs this importer about a newchildInfoand it's properties.-
Methods inherited from interface org.apache.jackrabbit.oak.spi.xml.ProtectedItemImporter
init, processReferences
-
-
-
-
Method Detail
-
start
boolean start(@NotNull @NotNull Tree protectedParent) throws java.lang.IllegalStateException, RepositoryExceptionNotifies 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:
trueIf this importer is able to deal with the tree that may be present below the given protected Node.- Throws:
java.lang.IllegalStateException- If this method is called on this importer without having reachedend(Tree).RepositoryException- If an error occurs.
-
end
void end(@NotNull @NotNull Tree protectedParent) throws java.lang.IllegalStateException, ConstraintViolationException, RepositoryExceptionInforms this importer that the tree to be imported belowprotectedParenthas bee completed. This allows the importer to be reset in order to be able to deal with another call tostart(Tree).If
start(Tree)hasn't been called before, this method returns silently.- Parameters:
protectedParent- The protected parent tree.- Throws:
java.lang.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(@NotNull @NotNull NodeInfo childInfo, @NotNull @NotNull java.util.List<PropInfo> propInfos) throws java.lang.IllegalStateException, ConstraintViolationException, RepositoryExceptionInforms this importer about a newchildInfoand it's properties. If the importer is able to successfully import the given information this method returns silently. OtherwiseConstraintViolationExceptionis 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(Tree)hasn't been called before, this method returns silently.- Parameters:
childInfo- TheNodeInfofor the new protected child.propInfos- The properties of that child.- Throws:
java.lang.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 RepositoryExceptionInforms this importer about the end of a child info.If
start(Tree)hasn't been called before, this method returns silently.- Throws:
java.lang.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.
-
-