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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the object after all configuration has been set.setBasePath(String basePath) Define base path to apply condition before execute POSIX file attribute action.setConfiguration(Configuration configuration) Define required configuration, used to retrieve string substituter.setFileGroup(String fileGroup) Define file group to apply during action execution eligible files.setFileOwner(String fileOwner) Define file owner to apply during action execution eligible files.setFilePermissions(Set<PosixFilePermission> filePermissions) Define file permissions to apply during action execution eligible files.setFilePermissionsString(String filePermissionsString) Define file permissions in POSIX format to apply during action execution eligible files.setFollowLinks(boolean followLinks) True to allow synonyms links during search of eligible files.setMaxDepth(int maxDepth) Define max folder depth to search for eligible files to apply POSIX attribute view.setPathConditions(PathCondition[] pathConditions) Define path conditions to filter files inAbstractPathAction.getBasePath().setSubst(StrSubstitutor subst) Define string substituter.withBasePath(String basePath) Deprecated.withConfiguration(Configuration configuration) Deprecated.since 2.26.0 usesetConfiguration(Configuration).withFileGroup(String fileGroup) Deprecated.since 2.26.0 usesetFileGroup(String).withFileOwner(String fileOwner) Deprecated.since 2.26.0 usesetFileOwner(String).withFilePermissions(Set<PosixFilePermission> filePermissions) Deprecated.since 2.26.0 usesetFilePermissions(Set<PosixFilePermission>).withFilePermissionsString(String filePermissionsString) Deprecated.since 2.26.0 usesetFilePermissionsString(String).withFollowLinks(boolean followLinks) Deprecated.since 2.26.0 usesetFollowLinks(boolean).withMaxDepth(int maxDepth) Deprecated.since 2.26.0 usesetMaxDepth(int).withPathConditions(PathCondition[] pathConditions) Deprecated.since 2.26.0 usesetPathConditions(PathCondition[]).withSubst(StrSubstitutor subst) Deprecated.since 2.26.0 usesetSubst(StrSubstitutor).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.logging.log4j.core.util.Builder
getErrorPrefix, isValid
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Description copied from interface:BuilderBuilds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.- Specified by:
buildin interfaceBuilder<PosixViewAttributeAction>- Returns:
- the configured instance.
-
setConfiguration
Define required configuration, used to retrieve string substituter.- Parameters:
configuration-AbstractPathAction.getStrSubstitutor()- Returns:
- This builder
- Since:
- 2.26.0
-
setSubst
Define string substituter.- Parameters:
subst-AbstractPathAction.getStrSubstitutor()- Returns:
- This builder
- Since:
- 2.26.0
-
setBasePath
Define base path to apply condition before execute POSIX file attribute action.- Parameters:
basePath-AbstractPathAction.getBasePath()- Returns:
- This builder
- Since:
- 2.26.0
-
setFollowLinks
True to allow synonyms links during search of eligible files.- Parameters:
followLinks- Follow synonyms links- Returns:
- This builder
- Since:
- 2.26.0
-
setMaxDepth
Define max folder depth to search for eligible files to apply POSIX attribute view.- Parameters:
maxDepth- Max search depth- Returns:
- This builder
- Since:
- 2.26.0
-
setPathConditions
Define path conditions to filter files inAbstractPathAction.getBasePath().- Parameters:
pathConditions-AbstractPathAction.getPathConditions()- Returns:
- This builder
- Since:
- 2.26.0
-
setFilePermissionsString
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
- Since:
- 2.26.0
-
setFilePermissions
public PosixViewAttributeAction.Builder setFilePermissions(Set<PosixFilePermission> filePermissions) Define file permissions to apply during action execution eligible files.- Parameters:
filePermissions- Permissions to apply- Returns:
- This builder
- Since:
- 2.26.0
-
setFileOwner
Define file owner to apply during action execution eligible files.- Parameters:
fileOwner- File owner- Returns:
- This builder
- Since:
- 2.26.0
-
setFileGroup
Define file group to apply during action execution eligible files.- Parameters:
fileGroup- File group- Returns:
- This builder
- Since:
- 2.26.0
-
withConfiguration
Deprecated.since 2.26.0 usesetConfiguration(Configuration). -
withSubst
Deprecated.since 2.26.0 usesetSubst(StrSubstitutor). -
withBasePath
Deprecated.since 2.26.0 usesetBasePath(String). -
withFollowLinks
Deprecated.since 2.26.0 usesetFollowLinks(boolean). -
withMaxDepth
Deprecated.since 2.26.0 usesetMaxDepth(int). -
withPathConditions
@Deprecated public PosixViewAttributeAction.Builder withPathConditions(PathCondition[] pathConditions) Deprecated.since 2.26.0 usesetPathConditions(PathCondition[]). -
withFilePermissionsString
@Deprecated public PosixViewAttributeAction.Builder withFilePermissionsString(String filePermissionsString) Deprecated.since 2.26.0 usesetFilePermissionsString(String). -
withFilePermissions
@Deprecated public PosixViewAttributeAction.Builder withFilePermissions(Set<PosixFilePermission> filePermissions) Deprecated.since 2.26.0 usesetFilePermissions(Set<PosixFilePermission>). -
withFileOwner
Deprecated.since 2.26.0 usesetFileOwner(String). -
withFileGroup
Deprecated.since 2.26.0 usesetFileGroup(String).
-
setBasePath(String).