Class ImportOptions

java.lang.Object
org.apache.sling.jcr.contentloader.ImportOptions
Direct Known Subclasses:
PathEntry

@ConsumerType public abstract class ImportOptions extends Object
Encapsulates the options for the content import.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Specifies whether versionable nodes is automatically checked out when necessary.
    abstract boolean
    Specifies whether versionable nodes is automatically checked in at the end of the import operation.
    abstract boolean
    Check if the content reader for the given file extension should be ignored.
    abstract boolean
    Check if the given entry name should require a matching registered import provider.
    boolean
    Specifies whether imported nodes should merge with existing nodes.
    abstract boolean
    Specifies whether imported nodes should overwrite existing nodes.
    boolean
    Specifies whether imported properties should merge with existing properties.
    abstract boolean
    Specifies whether imported properties should overwrite existing properties.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ImportOptions

      public ImportOptions()
  • Method Details

    • isOverwrite

      public abstract boolean isOverwrite()
      Specifies whether imported nodes should overwrite existing nodes. NOTE: this means the existing node will be deleted and a new node will be created in the same location.
      Returns:
      true to overwrite nodes, false otherwise
    • isMerge

      public boolean isMerge()
      Specifies whether imported nodes should merge with existing nodes. NOTE: this means the existing nodes that are not imported will be deleted.
      Returns:
      true to overwrite nodes, false otherwise
    • isPropertyOverwrite

      public abstract boolean isPropertyOverwrite()
      Specifies whether imported properties should overwrite existing properties.
      Returns:
      true to overwrite node properties, false otherwise
    • isPropertyMerge

      public boolean isPropertyMerge()
      Specifies whether imported properties should merge with existing properties. NOTE: this means that properties that are not imported will be removed
      Returns:
      true to overwrite nodes, false otherwise
    • isCheckin

      public abstract boolean isCheckin()
      Specifies whether versionable nodes is automatically checked in at the end of the import operation.
      Returns:
      true to checkin the versionable nodes, false otherwise
    • isAutoCheckout

      public boolean isAutoCheckout()
      Specifies whether versionable nodes is automatically checked out when necessary.
      Returns:
      true to checkout the versionable nodes, false otherwise
      Since:
      2.1.4
    • isIgnoredImportProvider

      public abstract boolean isIgnoredImportProvider(String extension)
      Check if the content reader for the given file extension should be ignored.
      Parameters:
      extension - the extension to check
      Returns:
      true to ignore the reader, false otherwise
    • isImportProviderRequired

      public abstract boolean isImportProviderRequired(@NotNull @NotNull String name)
      Check if the given entry name should require a matching registered import provider.
      Parameters:
      name - the entry name to check
      Returns:
      true to require an import provider, false otherwise