Class AccessControlImporter

    • Constructor Detail

      • AccessControlImporter

        public AccessControlImporter()
    • Method Detail

      • init

        public boolean init​(@NotNull
                            @NotNull Session session,
                            @NotNull
                            @NotNull Root root,
                            @NotNull
                            @NotNull NamePathMapper namePathMapper,
                            boolean isWorkspaceImport,
                            int uuidBehavior,
                            @NotNull
                            @NotNull ReferenceChangeTracker referenceTracker,
                            @NotNull
                            @NotNull SecurityProvider securityProvider)
        Description copied from interface: ProtectedItemImporter
        Initializes the importer.
        Specified by:
        init in interface ProtectedItemImporter
        Parameters:
        session - The session that is running the import.
        root - The root associated with the import.
        namePathMapper - The name/path mapper used to translate names between their jcr and oak form.
        isWorkspaceImport - A flag indicating whether the import has been started from the Workspace or from the Session. Implementations are free to implement both types of imports or only a single one. For example it doesn't make sense to allow for importing versions along with a Session import as version operations are required to never leave transient changes behind.
        uuidBehavior - The uuid behavior specified with the import call.
        referenceTracker - The uuid/reference helper.
        securityProvider - The security provider.
        Returns:
        true if this importer was successfully initialized and is able to handle an import with the given setup; false otherwise.
      • processReferences

        public void processReferences()
        Description copied from interface: ProtectedItemImporter
        Post processing protected reference properties underneath a protected or non-protected parent node. If the parent is protected it has been handled by this importer already.
        Specified by:
        processReferences in interface ProtectedItemImporter
      • start

        public boolean start​(@NotNull
                             @NotNull Tree protectedParent)
                      throws RepositoryException
        Description copied from interface: ProtectedNodeImporter
        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.
        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.
      • startChildInfo

        public void startChildInfo​(@NotNull
                                   @NotNull NodeInfo childInfo,
                                   @NotNull
                                   @NotNull java.util.List<PropInfo> propInfos)
                            throws RepositoryException
        Description copied from interface: ProtectedNodeImporter
        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 ProtectedNodeImporter.start(Tree) hasn't been called before, this method returns silently.

        Specified by:
        startChildInfo in interface ProtectedNodeImporter
        Parameters:
        childInfo - The NodeInfo for the new protected child.
        propInfos - The properties of that child.
        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.