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 java.lang.Object implements Builder<PosixViewAttributeAction>
Builder for the POSIX view attribute action.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringbasePathprivate Configurationconfigurationprivate java.lang.StringfileGroupprivate java.lang.StringfileOwnerprivate java.util.Set<java.nio.file.attribute.PosixFilePermission>filePermissionsprivate java.lang.StringfilePermissionsStringprivate booleanfollowLinksprivate intmaxDepthprivate PathCondition[]pathConditionsprivate StrSubstitutorsubst
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PosixViewAttributeActionbuild()Builds the object after all configuration has been set.PosixViewAttributeAction.BuilderwithBasePath(java.lang.String basePath)Define base path to apply condition before execute POSIX file attribute action.PosixViewAttributeAction.BuilderwithConfiguration(Configuration configuration)Define required configuration, used to retrieve string substituter.PosixViewAttributeAction.BuilderwithFileGroup(java.lang.String fileGroup)Define file group to apply during action execution eligible files.PosixViewAttributeAction.BuilderwithFileOwner(java.lang.String fileOwner)Define file owner to apply during action execution eligible files.PosixViewAttributeAction.BuilderwithFilePermissions(java.util.Set<java.nio.file.attribute.PosixFilePermission> filePermissions)Define file permissions to apply during action execution eligible files.PosixViewAttributeAction.BuilderwithFilePermissionsString(java.lang.String filePermissionsString)Define file permissions in POSIX format to apply during action execution eligible files.PosixViewAttributeAction.BuilderwithFollowLinks(boolean followLinks)True to allow synonyms links during search of eligible files.PosixViewAttributeAction.BuilderwithMaxDepth(int maxDepth)Define max folder depth to search for eligible files to apply POSIX attribute view.PosixViewAttributeAction.BuilderwithPathConditions(PathCondition[] pathConditions)Define path conditions to filter files inAbstractPathAction.getBasePath().PosixViewAttributeAction.BuilderwithSubst(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
-
-
-
-
Field Detail
-
configuration
@PluginConfiguration private Configuration configuration
-
subst
private StrSubstitutor subst
-
basePath
@PluginBuilderAttribute @Required(message="No base path provided") private java.lang.String basePath
-
followLinks
@PluginBuilderAttribute private boolean followLinks
-
maxDepth
@PluginBuilderAttribute private int maxDepth
-
pathConditions
@PluginElement("PathConditions") private PathCondition[] pathConditions
-
filePermissionsString
@PluginBuilderAttribute("filePermissions") private java.lang.String filePermissionsString
-
filePermissions
private java.util.Set<java.nio.file.attribute.PosixFilePermission> filePermissions
-
fileOwner
@PluginBuilderAttribute private java.lang.String fileOwner
-
fileGroup
@PluginBuilderAttribute private java.lang.String fileGroup
-
-
Method Detail
-
build
public PosixViewAttributeAction 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.
-
withConfiguration
public PosixViewAttributeAction.Builder withConfiguration(Configuration configuration)
Define required configuration, used to retrieve string substituter.- Parameters:
configuration-AbstractPathAction.getStrSubstitutor()- Returns:
- This builder
-
withSubst
public PosixViewAttributeAction.Builder withSubst(StrSubstitutor subst)
Define string substituter.- Parameters:
subst-AbstractPathAction.getStrSubstitutor()- Returns:
- This builder
-
withBasePath
public PosixViewAttributeAction.Builder withBasePath(java.lang.String basePath)
Define base path to apply condition before execute POSIX file attribute action.- Parameters:
basePath-AbstractPathAction.getBasePath()- Returns:
- This builder
-
withFollowLinks
public PosixViewAttributeAction.Builder withFollowLinks(boolean followLinks)
True to allow synonyms links during search of eligible files.- Parameters:
followLinks- Follow synonyms links- Returns:
- This builder
-
withMaxDepth
public PosixViewAttributeAction.Builder withMaxDepth(int maxDepth)
Define max folder depth to search for eligible files to apply POSIX attribute view.- Parameters:
maxDepth- Max search depth- Returns:
- This builder
-
withPathConditions
public PosixViewAttributeAction.Builder withPathConditions(PathCondition[] pathConditions)
Define path conditions to filter files inAbstractPathAction.getBasePath().- Parameters:
pathConditions-AbstractPathAction.getPathConditions()- Returns:
- This builder
-
withFilePermissionsString
public PosixViewAttributeAction.Builder withFilePermissionsString(java.lang.String filePermissionsString)
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(java.util.Set<java.nio.file.attribute.PosixFilePermission> filePermissions)
Define file permissions to apply during action execution eligible files.- Parameters:
filePermissions- Permissions to apply- Returns:
- This builder
-
withFileOwner
public PosixViewAttributeAction.Builder withFileOwner(java.lang.String fileOwner)
Define file owner to apply during action execution eligible files.- Parameters:
fileOwner- File owner- Returns:
- This builder
-
withFileGroup
public PosixViewAttributeAction.Builder withFileGroup(java.lang.String fileGroup)
Define file group to apply during action execution eligible files.- Parameters:
fileGroup- File group- Returns:
- This builder
-
-