Modifier and Type | Method and Description |
---|---|
protected DefinitionMetadataBuilder |
AbstractFileResourceConfigurationSource.createMetadata(Resource resource) |
protected String |
YamlReader.formatYamlExceptionMessage(Resource res,
org.yaml.snakeyaml.error.YAMLException ye) |
void |
YamlConfigurationSource.loadAndRegister(Resource resource) |
abstract void |
AbstractFileResourceConfigurationSource.loadAndRegister(Resource resource) |
protected org.yaml.snakeyaml.Yaml |
YamlReader.newSnakeYaml(Resource res) |
DefinitionMetadataBuilder |
RegexBasedPathToMetadataInferrer.populateFrom(DefinitionMetadataBuilder metadataBuilder,
Resource resource) |
DefinitionMetadataBuilder |
PathToMetadataInferrer.populateFrom(DefinitionMetadataBuilder metadataBuilder,
Resource relativePath) |
protected Object |
YamlReader.readNoCast(Resource res) |
Map<String,Object> |
YamlReader.readToMap(Resource res) |
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 . |
Modifier and Type | Method and Description |
---|---|
Resource |
Resource.getParent() |
Resource |
AbstractResource.getParent() |
Modifier and Type | Method and Description |
---|---|
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
A
Resource for ClasspathResourceOrigin . |
Modifier and Type | Method and Description |
---|---|
List<Resource> |
ClasspathResource.listChildren()
This implementation doesn't delegate parent-relationship to origin (as suggested by AbstractResource).
|
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 <S> SortedSet<LayeredResource> |
LayeredResourceOrigin.aggregateSet(List<S> sources,
com.google.common.base.Function<S,Collection<Resource>> delegatedFunction) |
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) |
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 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. |
Copyright © 2003–2015 Magnolia International Ltd.. All rights reserved.