T - this instance concrete type. It allows to extend this class while allowing setter chainsAttributes - The concrete implementation of FileAttributes that this builder uses to assert the file propertiespublic abstract class FilePredicateBuilder<T extends FilePredicateBuilder,Attributes extends FileAttributes> extends Object
Predicate which verifies that a FileAttributes instance is compliant with a number of criterias. This
builder is stateful and not thread-safe. A new instance should be use per each desired Predicate.
This builder can either be used programmatically or through Mule's SDK since its internal state is annotated with the
Parameter annotation.
Criterias are evaluated using an AND operator, meaning that for the predicate to accept a file, ALL the criterias must
be complied with.
None of the criteria fields are mandatory. If a particular criteria is not specified, then it's simply not applied on the evaluation.
The class is also given the "matcher" alias to make it DSL/XML friendly.
| Modifier and Type | Field and Description |
|---|---|
protected static TimeSinceFunction |
FILE_TIME_SINCE |
protected static TimeUntilFunction |
FILE_TIME_UNTIL |
| Constructor and Description |
|---|
FilePredicateBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected Predicate<Attributes> |
addConditions(Predicate<Attributes> predicate)
|
Predicate<Attributes> |
build()
Builds a
Predicate from the criterias in this builder's state. |
Boolean |
getDirectory() |
String |
getFilenamePattern() |
Long |
getMaxSize() |
Long |
getMinSize() |
String |
getPathPattern() |
Boolean |
getRegularFile() |
Boolean |
getSymbolicLink() |
T |
setDirectory(Boolean directory) |
T |
setFilenamePattern(String filenamePattern) |
T |
setMaxSize(Long maxSize) |
T |
setMinSize(Long minSize) |
T |
setPathPattern(String pathPattern) |
T |
setRegularFile(Boolean regularFile) |
T |
setSymbolicLink(Boolean symbolicLink) |
protected static final TimeUntilFunction FILE_TIME_UNTIL
protected static final TimeSinceFunction FILE_TIME_SINCE
public Predicate<Attributes> build()
Predicate from the criterias in this builder's state.Predicateprotected Predicate<Attributes> addConditions(Predicate<Attributes> predicate)
public String getFilenamePattern()
public String getPathPattern()
public Boolean getDirectory()
public Boolean getRegularFile()
public Boolean getSymbolicLink()
public Long getMinSize()
public Long getMaxSize()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.