The RepositorySource for the connector that exposes an area of the local file system as content in a repository. This
source considers a workspace name to be the path to the directory on the file system that represents the root of that
workspace. New workspaces can be created, as long as the names represent valid paths to existing directories.

setCustomPropertiesFactory(String customPropertiesFactoryClassName)
Set the factory that is used to create custom properties on "nt:folder", "nt:file", and "nt:resource" nodes by specifying
the name of a class that implements the CustomPropertiesFactory interface and has a public, no-argument
constructor.

setExclusionPattern(String exclusionPattern)
Sets the regular expression that, if matched by a file or folder, indicates that the file or folder should be ignored
Only one of FilenameFilter or Inclusion/Exclusion Pattern are used at a given time.

setFilenameFilter(FilenameFilter filenameFilter)
Sets the filename filter that is used to restrict which content can be accessed by this connector
Only one of FilenameFilter or Inclusion/Exclusion Pattern are used at a given time.

void

setFilenameFilter(String filenameFilterClassName)
Sets the filename filter that is used to restrict which content can be accessed by this connector by specifying the name of
a class that implements the FilenameFilter interface and has a public, no-argument constructor.

void

setInclusionPattern(String inclusionPattern)
Sets the regular expression that, if matched by a file or folder, indicates that the file or folder should be included
Only one of FilenameFilter or Inclusion/Exclusion Pattern are used at a given time.

void

setMaxPathLength(int maxPathLength)
Set the maximum absolute path length supported by this source.

setFilenameFilter

Sets the filename filter that is used to restrict which content can be accessed by this connector by specifying the name of
a class that implements the FilenameFilter interface and has a public, no-argument constructor.

Only one of the exclusionPattern and filenameFilter properties may be non-null at any one time. Calling
this method automatically sets the exclusionPattern property to null.

Parameters:

filenameFilterClassName - the class name of the filter implementation or null if no filename filter should be used

InstantiationException - if the filename filter represents an abstract class, an interface, an array class, a
primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other
reason.

ClassCastException - if the class named by filenameFilterClassName does not implement the
FilenameFilter interface

getMaxPathLength

public int getMaxPathLength()

Get the maximum path length (in characters) allowed by the underlying file system

Returns:

the maximum path length (in characters) allowed by the underlying file system

setMaxPathLength

public void setMaxPathLength(int maxPathLength)

Set the maximum absolute path length supported by this source.

The length of any path is calculated relative to the file system root, NOT the repository root. That is, if a workspace
foo is mapped to the /tmp/foo/bar directory on the file system, then the path /node1/node2 in the
foo workspace has an effective length of 23 for the purposes of the maxPathLength calculation (
/tmp/foo/bar has length 11, /node1/node2 has length 12, 11 + 12 = 23).

Parameters:

maxPathLength - the maximum absolute path length supported by this source; must be non-negative

setCustomPropertiesFactory

Set the factory that is used to create custom properties on "nt:folder", "nt:file", and "nt:resource" nodes by specifying
the name of a class that implements the CustomPropertiesFactory interface and has a public, no-argument
constructor.

Parameters:

customPropertiesFactoryClassName - the class name of the factory implementation or null if no custom properties will
be created

InstantiationException - if the custom properties factory represents an abstract class, an interface, an array class,
a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other
reason.

ClassCastException - if the class named by customPropertiesFactoryClassName does not implement the
CustomPropertiesFactory interface

isEagerFileLoading

public boolean isEagerFileLoading()

Optional flag that defines whether the connector should eagerly read file content even before it is needed, guaranteeing
access to the content. A value of "true" may result in the file content being loaded even when it is not needed, and may
increase the memory footprint; a value of "false" will delay reading the file content until it is needed, but changes to
the underlying files may leak into the JCR sessions. The default value is "false".

Returns:

'true' if the file is to be read eagerly and preemptively, or false if the file content is to be loaded lazily.

setEagerFileLoading

public void setEagerFileLoading(boolean eagerFileLoading)

Parameters:

eagerFileLoading - Sets eagerFileLoading to the specified value.

getTemporaryStoragePath

Optional setting that allows administrators to specify a specific location for the file system connector's temporary
storage. When writing file content, this connector first writes the content to a file in the temporary storage area. After
that write succeeds in full, the temporary file is moved to its final location in the workspace. This extra step is taken
so that an error or failure while writing the file does not cause corruption in the target file.

However, if the temporary storage area is located on a different file system than the file that will ultimately be written
to, the rename operation cannot be used and a separate file copy must occur. Therefore,
administrators should set the value of this path to some path in the same file system as the
workspace root path.

The default value of this property is the value of System.getProperty("java.io.tmpdir").