org.jboss.dna.connector.federation
Class Projection.Rule
java.lang.Object
org.jboss.dna.connector.federation.Projection.Rule
- All Implemented Interfaces:
- Comparable<Projection.Rule>
- Direct Known Subclasses:
- Projection.PathRule
- Enclosing class:
- Projection
@Immutable
public abstract static class Projection.Rule
- extends Object
- implements Comparable<Projection.Rule>
A rule used within a project do define how content within a source is projected into the federated repository. This mapping
is bi-directional, meaning it's possible to determine
- the path in repository given a path in source; and
- the path in source given a path in repository.
- Author:
- Randall Hauch
Projection.Rule
public Projection.Rule()
getTopLevelPathsInRepository
public abstract List<Path> getTopLevelPathsInRepository(PathFactory factory)
- Get the paths in the repository that serve as top-level nodes exposed by this rule.
- Parameters:
factory
- the path factory that can be used to create new paths; may not be null
- Returns:
- the list of top-level paths, which are ordered and which must be unique; never null
getPathInSource
public abstract Path getPathInSource(Path pathInRepository,
PathFactory factory)
- Get the path in source that is projected from the supplied repository path, or null if the supplied repository path is
not projected into the source.
- Parameters:
pathInRepository
- the path in the repository; may not be nullfactory
- the path factory; may not be null
- Returns:
- the path in source if it is projected by this rule, or null otherwise
getPathInRepository
public abstract Path getPathInRepository(Path pathInSource,
PathFactory factory)
- Get the path in repository that is projected from the supplied source path, or null if the supplied source path is not
projected into the repository.
- Parameters:
pathInSource
- the path in the source; may not be nullfactory
- the path factory; may not be null
- Returns:
- the path in repository if it is projected by this rule, or null otherwise
getString
public abstract String getString(NamespaceRegistry registry,
TextEncoder encoder)
getString
public abstract String getString(TextEncoder encoder)
getString
public abstract String getString()
Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.