Modifier and Type | Interface and Description |
---|---|
interface |
ResourceOrigin<P extends Resource>
Common interface for all resource file origins (e.g.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractResource
A convenient class to extend by subclasses of
AbstractResourceOrigin . |
class |
ResourceStub
Deprecated.
since 5.4.6 - new
ResourceOrigin.registerResourceChangeHandler(ResourceChangeHandler) allows for registering more sophisticated
resource change handlers rendering this class obsolete. |
Modifier and Type | Method and Description |
---|---|
Resource |
ResourceStub.getParent()
Deprecated.
|
Resource |
Resource.getParent() |
Resource |
AbstractResource.getParent() |
Modifier and Type | Method and Description |
---|---|
List<Resource> |
ResourceStub.listChildren()
Deprecated.
|
List<Resource> |
Resource.listChildren() |
List<Resource> |
AbstractResource.listChildren() |
Modifier and Type | Method and Description |
---|---|
boolean |
ResourceVisitor.visitDirectory(Resource resource)
Determines if we should visit this directory resource.
|
void |
ResourceVisitor.visitFile(Resource resource)
Implementations can decide to do anything with the file; note that
ResourceVisitor.visitDirectory(Resource) is
NOT called for files. |
Modifier and Type | Class and Description |
---|---|
class |
ClasspathResource<T extends ClasspathEntry>
A
Resource for ClasspathResourceOrigin . |
Modifier and Type | Class and Description |
---|---|
class |
FileSystemResource
A
Resource for FileSystemResourceOrigin . |
Modifier and Type | Class and Description |
---|---|
class |
JcrResource
A
Resource for JcrResourceOrigin . |
Modifier and Type | Class and Description |
---|---|
class |
LayeredResource
A
Resource for LayeredResourceOrigin . |
Modifier and Type | Method and Description |
---|---|
Resource |
LayeredResource.getFirst() |
Modifier and Type | Method and Description |
---|---|
List<Resource> |
LayeredResource.getLayers() |
Modifier and Type | Method and Description |
---|---|
protected LayeredResource |
LayeredResourceOrigin.newLayeredResource(List<Resource> resources) |
Modifier and Type | Method and Description |
---|---|
static <R extends Resource> |
Functions.compareByHandle() |
Modifier and Type | Method and Description |
---|---|
static com.google.common.base.Predicate<Resource> |
Functions.always()
Convenient Predicate which simply delegates to
Predicates.alwaysTrue() , avoids verbose type parameter declaration and provides a (debatably) better name. |
static com.google.common.base.Function<ResourceOrigin,Resource> |
Functions.getByPath(String path) |
Collection<Resource> |
FileResourceCollectorVisitor.getCollectedResources() |
protected com.google.common.base.Function<Resource,Void> |
PredicatedResourceVisitor.getFunction()
Can be useful to e.g.
|
static com.google.common.base.Function<Resource,Resource> |
Functions.getParent() |
static com.google.common.base.Function<Resource,Resource> |
Functions.getParent() |
static com.google.common.base.Function<Resource,String> |
Functions.getPath() |
static com.google.common.base.Function<ResourceOrigin,Resource> |
Functions.getRoot() |
static com.google.common.base.Predicate<Resource> |
Functions.isDirectory() |
static com.google.common.base.Predicate<Resource> |
Functions.isFile() |
static com.google.common.base.Predicate<Resource> |
Functions.never()
Convenient Predicate which simply delegates to
Predicates.alwaysFalse() , avoids verbose type parameter declaration, and provides a (debatably) better name. |
static com.google.common.base.Predicate<Resource> |
Functions.pathEquals(CharSequence path) |
static com.google.common.base.Predicate<Resource> |
Functions.pathMatches(Pattern pattern)
Matches if the input
Resource 's handle matches the given pattern. |
static com.google.common.base.Predicate<Resource> |
Functions.pathMatches(com.google.common.base.Predicate<CharSequence> predicate) |
static com.google.common.base.Predicate<Resource> |
Functions.pathMatches(String pattern) |
static com.google.common.base.Predicate<Resource> |
Functions.pathStartsWith(CharSequence pathPrefix) |
Modifier and Type | Method and Description |
---|---|
void |
ResourceTreeWalker.traverse(Resource resource) |
boolean |
PredicatedResourceVisitor.visitDirectory(Resource resource) |
boolean |
LoggingResourceVisitor.visitDirectory(Resource resource) |
void |
PredicatedResourceVisitor.visitFile(Resource resource) |
void |
LoggingResourceVisitor.visitFile(Resource resource) |
Modifier and Type | Method and Description |
---|---|
static FileResourceCollectorVisitor |
FileResourceCollectorVisitor.on(com.google.common.base.Predicate<Resource> applyToFile) |
static FileResourceCollectorVisitor |
FileResourceCollectorVisitor.on(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyToFile) |
static FileResourceCollectorVisitor |
FileResourceCollectorVisitor.on(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyToFile) |
static PredicatedResourceVisitor |
PredicatedResourceVisitor.onAllMatchingFiles(com.google.common.base.Predicate<Resource> applyToFile,
com.google.common.base.Function<Resource,Void> function)
Traverses all directories, and applies the given
Function to all files, according to applyToFile . |
static PredicatedResourceVisitor |
PredicatedResourceVisitor.onAllMatchingFiles(com.google.common.base.Predicate<Resource> applyToFile,
com.google.common.base.Function<Resource,Void> function)
Traverses all directories, and applies the given
Function to all files, according to applyToFile . |
static PredicatedResourceVisitor |
PredicatedResourceVisitor.with(com.google.common.base.Function<Resource,Void> function)
Visits everything and applies the given
Function to everything. |
static PredicatedResourceVisitor |
PredicatedResourceVisitor.with(com.google.common.base.Predicate<Resource> visitAndApply,
com.google.common.base.Function<Resource,Void> function)
Visits according to the given
visitAndApply predicate and applies the given Function according to visitAndApply . |
static PredicatedResourceVisitor |
PredicatedResourceVisitor.with(com.google.common.base.Predicate<Resource> visitAndApply,
com.google.common.base.Function<Resource,Void> function)
Visits according to the given
visitAndApply predicate and applies the given Function according to visitAndApply . |
static PredicatedResourceVisitor |
PredicatedResourceVisitor.with(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyFunction,
com.google.common.base.Function<Resource,Void> function)
Visits according to the given
visitDirectory predicate and applies the given Function according to applyFunction . |
static PredicatedResourceVisitor |
PredicatedResourceVisitor.with(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyFunction,
com.google.common.base.Function<Resource,Void> function)
Visits according to the given
visitDirectory predicate and applies the given Function according to applyFunction . |
static PredicatedResourceVisitor |
PredicatedResourceVisitor.with(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyFunction,
com.google.common.base.Function<Resource,Void> function)
Visits according to the given
visitDirectory predicate and applies the given Function according to applyFunction . |
static PredicatedResourceVisitor |
PredicatedResourceVisitor.with(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyToDirectory,
com.google.common.base.Predicate<Resource> applyToFile,
com.google.common.base.Function<Resource,Void> function)
Visits according to the given
visitDirectory predicate and applies the given Function according to applyToDirectory and applyToFile depending on the resource's type. |
static PredicatedResourceVisitor |
PredicatedResourceVisitor.with(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyToDirectory,
com.google.common.base.Predicate<Resource> applyToFile,
com.google.common.base.Function<Resource,Void> function)
Visits according to the given
visitDirectory predicate and applies the given Function according to applyToDirectory and applyToFile depending on the resource's type. |
static PredicatedResourceVisitor |
PredicatedResourceVisitor.with(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyToDirectory,
com.google.common.base.Predicate<Resource> applyToFile,
com.google.common.base.Function<Resource,Void> function)
Visits according to the given
visitDirectory predicate and applies the given Function according to applyToDirectory and applyToFile depending on the resource's type. |
static PredicatedResourceVisitor |
PredicatedResourceVisitor.with(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyToDirectory,
com.google.common.base.Predicate<Resource> applyToFile,
com.google.common.base.Function<Resource,Void> function)
Visits according to the given
visitDirectory predicate and applies the given Function according to applyToDirectory and applyToFile depending on the resource's type. |
Constructor and Description |
---|
FileResourceCollectorVisitor(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyToFile) |
FileResourceCollectorVisitor(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyToFile) |
PredicatedResourceVisitor(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyToDirectory,
com.google.common.base.Predicate<Resource> applyToFile,
com.google.common.base.Function<Resource,Void> function) |
PredicatedResourceVisitor(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyToDirectory,
com.google.common.base.Predicate<Resource> applyToFile,
com.google.common.base.Function<Resource,Void> function) |
PredicatedResourceVisitor(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyToDirectory,
com.google.common.base.Predicate<Resource> applyToFile,
com.google.common.base.Function<Resource,Void> function) |
PredicatedResourceVisitor(com.google.common.base.Predicate<Resource> visitDirectory,
com.google.common.base.Predicate<Resource> applyToDirectory,
com.google.common.base.Predicate<Resource> applyToFile,
com.google.common.base.Function<Resource,Void> function) |
Copyright © 2003–2017 Magnolia International Ltd.. All rights reserved.