Class VersionHistoryHandler

    • Constructor Detail

      • VersionHistoryHandler

        public VersionHistoryHandler()
      • VersionHistoryHandler

        public VersionHistoryHandler​(IOManager ioManager)
    • Method Detail

      • getIOManager

        public IOManager getIOManager()
        Description copied from interface: IOHandler
        Returns the IOManager that called this handler or null.
        Specified by:
        getIOManager in interface IOHandler
      • setIOManager

        public void setIOManager​(IOManager ioManager)
        Description copied from interface: IOHandler
        Sets the IOManager that called this handler.
        Specified by:
        setIOManager in interface IOHandler
      • getName

        public String getName()
        Description copied from interface: IOHandler
        Returns a human readable name for this IOHandler.
        Specified by:
        getName in interface IOHandler
      • canImport

        public boolean canImport​(ImportContext context,
                                 boolean isCollection)
        Description copied from interface: IOHandler
        Returns true, if this handler can run a successful import based on the specified context.
        Specified by:
        canImport in interface IOHandler
      • canImport

        public boolean canImport​(ImportContext context,
                                 org.apache.jackrabbit.webdav.DavResource resource)
        Description copied from interface: IOHandler
        Returns true, if this handler can run a successful import based on the specified context and resource. A simple implementation may choose to return the same as IOHandler.canImport(ImportContext, boolean) where the isCollection flag is determined by DavResource.isCollection().
        Specified by:
        canImport in interface IOHandler
      • importContent

        public boolean importContent​(ImportContext context,
                                     boolean isCollection)
                              throws IOException
        Description copied from interface: IOHandler
        Runs the import for the given context and indicates by a boolean return value, if the import could be completed successfully. If the specified ImportContext does not provide a stream the implementation is free, to only import properties of to refuse the import.

        Please note, that it is the responsibility of the specified ImportContext to assert, that its stream is not consumed multiple times when being passed to a chain of IOHandlers.

        Specified by:
        importContent in interface IOHandler
        Returns:
        true if the import was successful.
        Throws:
        IOException - if an unexpected error occurs or if this method has been called although IOHandler.canImport(ImportContext, boolean) returns false.
      • importContent

        public boolean importContent​(ImportContext context,
                                     org.apache.jackrabbit.webdav.DavResource resource)
                              throws IOException
        Description copied from interface: IOHandler
        Runs the import for the given context and resource. It indicates by a boolean return value, if the import could be completed successfully. If the specified ImportContext does not provide a stream the implementation is free, to only import properties of to refuse the import. A simple implementation may return the same as IOHandler.importContent(ImportContext, boolean) where the isCollection flag is determined by DavResource.isCollection()

        Please note, that it is the responsibility of the specified ImportContext to assert, that its stream is not consumed multiple times when being passed to a chain of IOHandlers.

        Specified by:
        importContent in interface IOHandler
        Returns:
        Throws:
        IOException - if an unexpected error occurs or if this method has been called although IOHandler.canImport(ImportContext, DavResource) returns false.
        See Also:
        IOHandler.importContent(ImportContext, boolean)
      • canExport

        public boolean canExport​(ExportContext context,
                                 boolean isCollection)
        Description copied from interface: IOHandler
        Returns true, if this handler can run a successful export based on the specified context.
        Specified by:
        canExport in interface IOHandler
      • canExport

        public boolean canExport​(ExportContext context,
                                 org.apache.jackrabbit.webdav.DavResource resource)
        Description copied from interface: IOHandler
        Returns true, if this handler can run a successful export based on the specified context and resource. A simple implementation may choose to return the same as IOHandler.canExport(ExportContext, boolean) where the isCollection flag is determined by DavResource.isCollection().
        Specified by:
        canExport in interface IOHandler
      • exportContent

        public boolean exportContent​(ExportContext context,
                                     boolean isCollection)
                              throws IOException
        Description copied from interface: IOHandler
        Runs the export for the given context. It indicates by a boolean return value, if the export could be completed successfully. If the specified ExportContext does not provide a stream the implementation should set the properties only and ignore the content to be exported. A simple implementation may return the same as IOHandler.exportContent(ExportContext, boolean) where the isCollection flag is determined by DavResource.isCollection()

        Please note, that it is the responsibility of the specified ExportContext to assert, that its stream is not written multiple times when being passed to a chain of IOHandlers.

        Specified by:
        exportContent in interface IOHandler
        Returns:
        Throws:
        IOException - if an unexpected error occurs or if this method has been called although IOHandler.canExport(ExportContext, boolean) returns false.
      • exportContent

        public boolean exportContent​(ExportContext context,
                                     org.apache.jackrabbit.webdav.DavResource resource)
                              throws IOException
        Description copied from interface: IOHandler
        Runs the export for the given context and resource. It indicates by a boolean return value, if the export could be completed successfully. If the specified ExportContext does not provide a stream the implementation should set the properties only and ignore the content to be exported. A simple implementation may return the same as IOHandler.exportContent(ExportContext, boolean) where the isCollection flag is determined by DavResource.isCollection()

        Please note, that it is the responsibility of the specified ExportContext to assert, that its stream is not written multiple times when being passed to a chain of IOHandlers.

        Specified by:
        exportContent in interface IOHandler
        Returns:
        Throws:
        IOException - if an unexpected error occurs or if this method has been called although IOHandler.canExport(ExportContext, DavResource) returns false.
      • canImport

        public boolean canImport​(PropertyImportContext context,
                                 boolean isCollection)
        Description copied from interface: PropertyHandler
        Returns true, if this handler can run a property import based on the specified context.
        Specified by:
        canImport in interface PropertyHandler
        Returns:
        true if this PropertyHandler can import properties given the specified parameters.
      • importProperties

        public Map<? extends org.apache.jackrabbit.webdav.property.PropEntry,​?> importProperties​(PropertyImportContext importContext,
                                                                                                       boolean isCollection)
                                                                                                throws RepositoryException
        Description copied from interface: PropertyHandler
        Imports, modifies or removes properties according the the change list available from the import context. Note, that according to JSR 170 setting a property value to null is equivalent to its removal.

        The return value of this method must be used to provided detailed information about any kind of failures.

        Specified by:
        importProperties in interface PropertyHandler
        Returns:
        Map listing those properties that failed to be updated. An empty map indicates a successful import for all properties listed in the context.
        Throws:
        RepositoryException - If PropertyHandler.canImport(PropertyImportContext, boolean) returns false for the given parameters or if some other unrecoverable error occurred. Note, that normal failure of a property update must be reported with the return value and should not result in an exception.
      • canExport

        public boolean canExport​(PropertyExportContext context,
                                 boolean isCollection)
        Description copied from interface: PropertyHandler
        Returns true, if this handler can run a successful export based on the specified context.
        Specified by:
        canExport in interface PropertyHandler
        Returns:
        true if this PropertyHandler is export properties given the specified parameters.