Class ImportOptions
- java.lang.Object
 - 
- org.apache.jackrabbit.vault.fs.io.ImportOptions
 
 
- 
public class ImportOptions extends java.lang.ObjectOption that control the package import. 
- 
- 
Constructor Summary
Constructors Constructor Description ImportOptions()Default constructor.ImportOptions(ImportOptions base)Deprecated.usecopy()instead. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImportOptionscopy()Creates a copy of this import options.AccessControlHandlinggetAccessControlHandling()Returns the default access control handling.intgetAutoSaveThreshold()Returns the auto-save threshold.java.util.regex.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.java.lang.ClassLoadergetHookClassLoader()Returns the hook class loader.ImportModegetImportMode()Returns the import mode.ProgressTrackerListenergetListener()Returns the progress tracker listener.java.io.FilegetPatchDirectory()Returns the patch directoryjava.lang.StringgetPatchParentPath()Returns the patch parent pathPathMappinggetPathMapping()Defines a path mapping that is applied to the incoming package paths and filter when installing the package.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()Returns the 'strict' flag.voidsetAccessControlHandling(AccessControlHandling acHandling)Sets the access control handling.voidsetAutoSaveThreshold(int threshold)Sets the auto-save threshold.voidsetCndPattern(java.lang.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(java.lang.ClassLoader hookClassLoader)Sets the hook class loader.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.voidsetPatchDirectory(java.io.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(java.lang.String patchParentPath)Sets the parent path of the patch node.voidsetPathMapping(PathMapping pathMapping)Sets the path mappingvoidsetStrict(boolean strict)Sets the 'strict' flag. 
 - 
 
- 
- 
Constructor Detail
- 
ImportOptions
public ImportOptions()
Default constructor. 
- 
ImportOptions
@Deprecated public ImportOptions(ImportOptions base)
Deprecated.usecopy()instead.- Parameters:
 base- base options
 
 - 
 
- 
Method Detail
- 
copy
public ImportOptions copy()
Creates a copy of this import options.- Returns:
 - a copy of this.
 
 
- 
isStrict
public boolean isStrict()
Returns the 'strict' flag.- Returns:
 - the 'strict' flag.
 
 
- 
setStrict
public void setStrict(boolean strict)
Sets the 'strict' flag.- Parameters:
 strict- the flag
 
- 
getListener
public ProgressTrackerListener getListener()
Returns the progress tracker listener.- Returns:
 - the progress tracker listener.
 
 
- 
setListener
public void setListener(ProgressTrackerListener listener)
Sets the progress tracker listener that receives messages during package installation.- Parameters:
 listener- The listener
 
- 
getPatchParentPath
public java.lang.String getPatchParentPath()
Returns the patch parent path- Returns:
 - the patch parent path
 
 
- 
setPatchParentPath
public void setPatchParentPath(java.lang.String patchParentPath)
Sets the parent path of the patch node.- Parameters:
 patchParentPath- the path
 
- 
getPatchDirectory
public java.io.File getPatchDirectory()
Returns the patch directory- Returns:
 - the patch directory
 
 
- 
setPatchDirectory
public void setPatchDirectory(java.io.File patchDirectory) throws java.io.IOExceptionSets 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:
 java.io.IOException- if an i/o error occurrs during obtaining the canonical file of this directory.
 
- 
isPatchKeepInRepo
public boolean isPatchKeepInRepo()
Returns the 'patch-keep-in-repo' flag.- Returns:
 - the 'patch-keep-in-repo' flag.
 
 
- 
setPatchKeepInRepo
public 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
 
- 
getAccessControlHandling
public AccessControlHandling getAccessControlHandling()
Returns the default access control handling.- Returns:
 - the default access control handling.
 
 
- 
setAccessControlHandling
public void setAccessControlHandling(AccessControlHandling acHandling)
Sets the access control handling.- Parameters:
 acHandling- the ACL handling.
 
- 
getCugHandling
public 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. 
 
- 
setCugHandling
public 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.
 
- 
isNonRecursive
public 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.
 
- 
setNonRecursive
public void setNonRecursive(boolean nonRecursive)
Sets the flag to ignore sub packages.- Parameters:
 nonRecursive-trueto set non recursive- See Also:
 isNonRecursive()
 
- 
getCndPattern
public java.util.regex.Pattern getCndPattern()
Returns the CND pattern- Returns:
 - the CND pattern
 
 
- 
setCndPattern
public void setCndPattern(java.lang.String cndPattern) throws java.util.regex.PatternSyntaxExceptionSets the CND file pattern.- Parameters:
 cndPattern- the cnd pattern- Throws:
 java.util.regex.PatternSyntaxException- If the pattern is not valid
 
- 
isDryRun
public boolean isDryRun()
Returns the dry run flag.- Returns:
 - the dry run flag.
 - Since:
 - 2.2.14
 
 
- 
setDryRun
public void setDryRun(boolean dryRun)
Sets the dry run flag.- Parameters:
 dryRun- the dry run flag.- Since:
 - 2.2.14
 
 
- 
setAutoSaveThreshold
public void setAutoSaveThreshold(int threshold)
Sets the auto-save threshold. SeeAutoSave- Parameters:
 threshold- the threshold in number of nodes.- Since:
 - 2.2.16
 
 
- 
getAutoSaveThreshold
public int getAutoSaveThreshold()
Returns the auto-save threshold.- Returns:
 - the auto-save threshold.
 - Since:
 - 2.2.16
 
 
- 
getImportMode
public ImportMode getImportMode()
Returns the import mode.- Returns:
 - the import mode.
 - Since:
 - 2.3
 
 
- 
setImportMode
public void setImportMode(ImportMode importMode)
Sets the default import mode.- Parameters:
 importMode- The import mode.- Since:
 - 2.3
 
 
- 
getFilter
public WorkspaceFilter getFilter()
Returns the default workspace filter.- Returns:
 - the default workspace filter.
 - Since:
 - 2.3.20
 
 
- 
setFilter
public void setFilter(WorkspaceFilter filter)
Sets the default workspace filter.- Parameters:
 filter- the filter- Since:
 - 2.3.20
 
 
- 
getHookClassLoader
public java.lang.ClassLoader getHookClassLoader()
Returns the hook class loader.- Returns:
 - the hook class loader.
 - Since:
 - 2.3.22
 
 
- 
setHookClassLoader
public void setHookClassLoader(java.lang.ClassLoader hookClassLoader)
Sets the hook class loader.- Parameters:
 hookClassLoader- the class loader- Since:
 - 2.3.22
 
 
- 
getPathMapping
public 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
 
 
- 
setPathMapping
public void setPathMapping(PathMapping pathMapping)
Sets the path mapping- Parameters:
 pathMapping- The path mapping- Since:
 - 3.1.14
 - See Also:
 getPathMapping()
 
- 
getDependencyHandling
public DependencyHandling getDependencyHandling()
Defines how package dependencies affect package installation and un-installation.- Returns:
 - the dependency handling.
 
 
- 
setDependencyHandling
public void setDependencyHandling(DependencyHandling dependencyHandling)
Sets the dependency handling.- Parameters:
 dependencyHandling- the dependency handling.- Since:
 - 3.1.32
 - See Also:
 getDependencyHandling()
 
 - 
 
 -