Interface ProtectedNodeImporter

  • All Superinterfaces:
    ProtectedItemImporter

    public interface ProtectedNodeImporter
    extends ProtectedItemImporter
    ProtectedNodeImporter provides means to import protected Nodes and the subtree defined below such nodes.

    The import of a protected tree is started by the Importer by calling start(Tree). If the ProtectedNodeImporter is able to deal with that type of protected node, it is in charge of dealing with all subsequent child NodeInfos present below the protected parent until end(Tree) is called. The latter resets this importer and makes it available for another protected import.

    • Method Detail

      • start

        boolean start​(@NotNull
                      @NotNull Tree 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 reached end(Tree).
        RepositoryException - If an error occurs.
      • startChildInfo

        void startChildInfo​(@NotNull
                            @NotNull NodeInfo childInfo,
                            @NotNull
                            @NotNull List<PropInfo> propInfos)
                     throws IllegalStateException,
                            ConstraintViolationException,
                            RepositoryException
        Informs this importer about a new childInfo and it's properties. If the importer is able to successfully import the given information this method returns silently. Otherwise ConstraintViolationException 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(Tree) hasn't been called before, this method returns silently.

        Parameters:
        childInfo - The NodeInfo for the new protected child.
        propInfos - The properties of that child.
        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.