Class PosixViewAttributeAction.Builder
java.lang.Object
org.apache.logging.log4j.core.appender.rolling.action.PosixViewAttributeAction.Builder
- All Implemented Interfaces:
Builder<PosixViewAttributeAction>
- Enclosing class:
- PosixViewAttributeAction
public static class PosixViewAttributeAction.Builder
extends Object
implements Builder<PosixViewAttributeAction>
Builder for the POSIX view attribute action.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the object after all configuration has been set.withBasePath
(String basePath) Define base path to apply condition before execute POSIX file attribute action.withConfiguration
(Configuration configuration) Define required configuration, used to retrieve string substituter.withFileGroup
(String fileGroup) Define file group to apply during action execution eligible files.withFileOwner
(String fileOwner) Define file owner to apply during action execution eligible files.withFilePermissions
(Set<PosixFilePermission> filePermissions) Define file permissions to apply during action execution eligible files.withFilePermissionsString
(String filePermissionsString) Define file permissions in POSIX format to apply during action execution eligible files.withFollowLinks
(boolean followLinks) True to allow synonyms links during search of eligible files.withMaxDepth
(int maxDepth) Define max folder depth to search for eligible files to apply POSIX attribute view.withPathConditions
(PathCondition[] pathConditions) Define path conditions to filter files inAbstractPathAction.getBasePath()
.withSubst
(StrSubstitutor subst) Define string substituter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.logging.log4j.core.util.Builder
getErrorPrefix, isValid
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Description copied from interface:Builder
Builds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.- Specified by:
build
in interfaceBuilder<PosixViewAttributeAction>
- Returns:
- the configured instance.
-
withConfiguration
Define required configuration, used to retrieve string substituter.- Parameters:
configuration
-AbstractPathAction.getStrSubstitutor()
- Returns:
- This builder
-
withSubst
Define string substituter.- Parameters:
subst
-AbstractPathAction.getStrSubstitutor()
- Returns:
- This builder
-
withBasePath
Define base path to apply condition before execute POSIX file attribute action.- Parameters:
basePath
-AbstractPathAction.getBasePath()
- Returns:
- This builder
-
withFollowLinks
True to allow synonyms links during search of eligible files.- Parameters:
followLinks
- Follow synonyms links- Returns:
- This builder
-
withMaxDepth
Define max folder depth to search for eligible files to apply POSIX attribute view.- Parameters:
maxDepth
- Max search depth- Returns:
- This builder
-
withPathConditions
Define path conditions to filter files inAbstractPathAction.getBasePath()
.- Parameters:
pathConditions
-AbstractPathAction.getPathConditions()
- Returns:
- This builder
-
withFilePermissionsString
Define file permissions in POSIX format to apply during action execution eligible files. Example:rw-rw-rw
r--r--r--
- Parameters:
filePermissionsString
- Permissions to apply- Returns:
- This builder
-
withFilePermissions
public PosixViewAttributeAction.Builder withFilePermissions(Set<PosixFilePermission> filePermissions) Define file permissions to apply during action execution eligible files.- Parameters:
filePermissions
- Permissions to apply- Returns:
- This builder
-
withFileOwner
Define file owner to apply during action execution eligible files.- Parameters:
fileOwner
- File owner- Returns:
- This builder
-
withFileGroup
Define file group to apply during action execution eligible files.- Parameters:
fileGroup
- File group- Returns:
- This builder
-