Class ImportOptions
- java.lang.Object
- 
- org.apache.jackrabbit.vault.fs.io.ImportOptions
 
- 
 public class ImportOptions extends Object Option that control the package import.
- 
- 
Constructor SummaryConstructors Constructor Description ImportOptions()Default constructor.ImportOptions(ImportOptions base)Deprecated.usecopy()instead.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ImportOptionscopy()Creates a copy of this import options.booleanequals(Object obj)AccessControlHandlinggetAccessControlHandling()Returns the default access control handling.intgetAutoSaveThreshold()Returns the auto-save threshold.PatterngetCndPattern()Returns the CND patternAccessControlHandlinggetCugHandling()Returns closed user group handling.DependencyHandlinggetDependencyHandling()Defines how package dependencies affect package installation and un-installation.WorkspaceFiltergetFilter()Returns the default workspace filter.ClassLoadergetHookClassLoader()Returns the hook class loader.@NotNull IdConflictPolicygetIdConflictPolicy()ImportModegetImportMode()Returns the import mode.ProgressTrackerListenergetListener()Returns the progress tracker listener.FilegetPatchDirectory()Returns the patch directoryStringgetPatchParentPath()Returns the patch parent pathPathMappinggetPathMapping()Defines a path mapping that is applied to the incoming package paths and filter when installing the package.inthashCode()booleanhasIdConflictPolicyBeenSet()booleanisDryRun()Returns the dry run flag.booleanisNonRecursive()Defines the package installation should recursively install sub packages.booleanisPatchKeepInRepo()Returns the 'patch-keep-in-repo' flag.booleanisStrict()Deprecated.UseisStrict(boolean)instead.booleanisStrict(boolean isStrictByDefault)booleanoverwritePrimaryTypesOfFolders()booleanoverwritePrimaryTypesOfFolders(boolean overwritePrimaryTypesOfFoldersByDefault)voidsetAccessControlHandling(AccessControlHandling acHandling)Sets the access control handling.voidsetAutoSaveThreshold(int autoSaveThreshold)Sets the auto-save threshold.voidsetCndPattern(String cndPattern)Sets the CND file pattern.voidsetCugHandling(AccessControlHandling cugHandling)Sets closed user group handling.voidsetDependencyHandling(DependencyHandling dependencyHandling)Sets the dependency handling.voidsetDryRun(boolean dryRun)Sets the dry run flag.voidsetFilter(WorkspaceFilter filter)Sets the default workspace filter.voidsetHookClassLoader(ClassLoader hookClassLoader)Sets the hook class loader.voidsetIdConflictPolicy(@NotNull IdConflictPolicy idConflictPolicy)Sets the id conflict policy (in case of unresolveable conflicts).voidsetImportMode(ImportMode importMode)Sets the default import mode.voidsetListener(ProgressTrackerListener listener)Sets the progress tracker listener that receives messages during package installation.voidsetNonRecursive(boolean nonRecursive)Sets the flag to ignore sub packages.voidsetOverwritePrimaryTypesOfFolders(boolean overwritePrimaryTypesOfFolders)voidsetPatchDirectory(File patchDirectory)Sets the patch directory.voidsetPatchKeepInRepo(boolean patchKeepInRepo)Sets the flag if patches should be kept in the repository after there were copied to the disk.voidsetPatchParentPath(String patchParentPath)Sets the parent path of the patch node.voidsetPathMapping(PathMapping pathMapping)Sets the path mappingvoidsetStrict(boolean strict)Sets the 'strict' flag.StringtoString()
 
- 
- 
- 
Constructor Detail- 
ImportOptionspublic ImportOptions() Default constructor.
 - 
ImportOptions@Deprecated public ImportOptions(ImportOptions base) Deprecated.usecopy()instead.- Parameters:
- base- base options
 
 
- 
 - 
Method Detail- 
copypublic ImportOptions copy() Creates a copy of this import options.- Returns:
- a copy of this.
 
 - 
setOverwritePrimaryTypesOfFolderspublic void setOverwritePrimaryTypesOfFolders(boolean overwritePrimaryTypesOfFolders) 
 - 
overwritePrimaryTypesOfFolderspublic boolean overwritePrimaryTypesOfFolders() 
 - 
overwritePrimaryTypesOfFolderspublic boolean overwritePrimaryTypesOfFolders(boolean overwritePrimaryTypesOfFoldersByDefault) 
 - 
isStrictpublic boolean isStrict(boolean isStrictByDefault) 
 - 
isStrict@Deprecated public boolean isStrict() Deprecated.UseisStrict(boolean)instead.Returns the 'strict' flag.- Returns:
- the 'strict' flag or nullin case this is not set
 
 - 
setStrictpublic void setStrict(boolean strict) Sets the 'strict' flag.- Parameters:
- strict- the flag
 
 - 
getListenerpublic ProgressTrackerListener getListener() Returns the progress tracker listener.- Returns:
- the progress tracker listener.
 
 - 
setListenerpublic void setListener(ProgressTrackerListener listener) Sets the progress tracker listener that receives messages during package installation.- Parameters:
- listener- The listener
 
 - 
getPatchParentPathpublic String getPatchParentPath() Returns the patch parent path- Returns:
- the patch parent path
 
 - 
setPatchParentPathpublic void setPatchParentPath(String patchParentPath) Sets the parent path of the patch node.- Parameters:
- patchParentPath- the path
 
 - 
getPatchDirectorypublic File getPatchDirectory() Returns the patch directory- Returns:
- the patch directory
 
 - 
setPatchDirectorypublic void setPatchDirectory(File patchDirectory) throws IOException Sets the patch directory. The nt:file nodes that are placed below thegetPatchParentPath()will be copied into this directory during extraction.- Parameters:
- patchDirectory- The directory
- Throws:
- IOException- if an i/o error occurrs during obtaining the canonical file of this directory.
 
 - 
isPatchKeepInRepopublic boolean isPatchKeepInRepo() Returns the 'patch-keep-in-repo' flag.- Returns:
- the 'patch-keep-in-repo' flag.
 
 - 
setPatchKeepInRepopublic void setPatchKeepInRepo(boolean patchKeepInRepo) Sets the flag if patches should be kept in the repository after there were copied to the disk.- Parameters:
- patchKeepInRepo- the flag
 
 - 
getAccessControlHandlingpublic AccessControlHandling getAccessControlHandling() Returns the default access control handling.- Returns:
- the default access control handling.
 
 - 
setAccessControlHandlingpublic void setAccessControlHandling(AccessControlHandling acHandling) Sets the access control handling.- Parameters:
- acHandling- the ACL handling.
 
 - 
getCugHandlingpublic AccessControlHandling getCugHandling() Returns closed user group handling.- Returns:
- CUG handling value. nullvalue indicates that CUG handling is controlled by acHandling value which maintains backwards compatibility.
 
 - 
setCugHandlingpublic void setCugHandling(AccessControlHandling cugHandling) Sets closed user group handling. For backwards compatibility, when cugHandling is set to nullnullthen acHandling is used is used to control handling of CUG nodes.- Parameters:
- cugHandling- the CUG handling.
 
 - 
isNonRecursivepublic boolean isNonRecursive() Defines the package installation should recursively install sub packages. Note that if this flag is enabled, theSubPackageHandlingconfiguration has no effect, as sub packages are not evaluated at all.- Returns:
- trueif package installation should not install sub packages.
 
 - 
setNonRecursivepublic void setNonRecursive(boolean nonRecursive) Sets the flag to ignore sub packages.- Parameters:
- nonRecursive-- trueto set non recursive
- See Also:
- isNonRecursive()
 
 - 
getCndPatternpublic Pattern getCndPattern() Returns the CND pattern- Returns:
- the CND pattern
 
 - 
setCndPatternpublic void setCndPattern(String cndPattern) throws PatternSyntaxException Sets the CND file pattern.- Parameters:
- cndPattern- the cnd pattern
- Throws:
- PatternSyntaxException- If the pattern is not valid
 
 - 
isDryRunpublic boolean isDryRun() Returns the dry run flag.- Returns:
- the dry run flag.
- Since:
- 2.2.14
 
 - 
setDryRunpublic void setDryRun(boolean dryRun) Sets the dry run flag.- Parameters:
- dryRun- the dry run flag.
- Since:
- 2.2.14
 
 - 
setAutoSaveThresholdpublic void setAutoSaveThreshold(int autoSaveThreshold) Sets the auto-save threshold. SeeAutoSave- Parameters:
- autoSaveThreshold- the threshold in number of nodes.
- Since:
- 2.2.16
 
 - 
getAutoSaveThresholdpublic int getAutoSaveThreshold() Returns the auto-save threshold. IfInteger.MAX_VALUEbothSession.save()andSession.refresh(boolean)must not be executed duringImporter.run(Archive, Session, String).- Returns:
- the auto-save threshold.
- Since:
- 2.2.16
 
 - 
getImportModepublic ImportMode getImportMode() Returns the import mode.- Returns:
- the import mode.
- Since:
- 2.3
 
 - 
setImportModepublic void setImportMode(ImportMode importMode) Sets the default import mode.- Parameters:
- importMode- The import mode.
- Since:
- 2.3
 
 - 
getFilterpublic WorkspaceFilter getFilter() Returns the default workspace filter.- Returns:
- the default workspace filter.
- Since:
- 2.3.20
 
 - 
setFilterpublic void setFilter(WorkspaceFilter filter) Sets the default workspace filter.- Parameters:
- filter- the filter
- Since:
- 2.3.20
 
 - 
getHookClassLoaderpublic ClassLoader getHookClassLoader() Returns the hook class loader.- Returns:
- the hook class loader.
- Since:
- 2.3.22
 
 - 
setHookClassLoaderpublic void setHookClassLoader(ClassLoader hookClassLoader) Sets the hook class loader.- Parameters:
- hookClassLoader- the class loader
- Since:
- 2.3.22
 
 - 
getPathMappingpublic PathMapping getPathMapping() Defines a path mapping that is applied to the incoming package paths and filter when installing the package.- Returns:
- nullif no path mapping is defined.
- Since:
- 3.1.14
 
 - 
setPathMappingpublic void setPathMapping(PathMapping pathMapping) Sets the path mapping- Parameters:
- pathMapping- The path mapping
- Since:
- 3.1.14
- See Also:
- getPathMapping()
 
 - 
getDependencyHandlingpublic DependencyHandling getDependencyHandling() Defines how package dependencies affect package installation and un-installation.- Returns:
- the dependency handling.
 
 - 
setDependencyHandlingpublic void setDependencyHandling(DependencyHandling dependencyHandling) Sets the dependency handling.- Parameters:
- dependencyHandling- the dependency handling.
- Since:
- 3.1.32
- See Also:
- getDependencyHandling()
 
 - 
getIdConflictPolicy@NotNull public @NotNull IdConflictPolicy getIdConflictPolicy() - Returns:
- the id conflict policy if one is set, otherwise IdConflictPolicy.FAIL
- Since:
- 3.5.1
 
 - 
hasIdConflictPolicyBeenSetpublic boolean hasIdConflictPolicyBeenSet() - Returns:
- trueif- setIdConflictPolicy(IdConflictPolicy)has been called otherwise- false
- Since:
- 3.6.0
 
 - 
setIdConflictPolicypublic void setIdConflictPolicy(@NotNull @NotNull IdConflictPolicy idConflictPolicy)Sets the id conflict policy (in case of unresolveable conflicts).- Parameters:
- idConflictPolicy- the conflict policy
- Since:
- 3.5.2
 
 
- 
 
-