public class PoliciesCache extends java.lang.Object implements java.lang.Iterable<PolicyCollection>
Modifier and Type | Method and Description |
---|---|
static PoliciesCache |
fromDir(java.io.File rootDir)
Create a cache from a directory source
|
static PoliciesCache |
fromDir(java.io.File rootDir,
java.util.Set<Attribute> forcedContext)
Create a cache from a directory source
|
static PoliciesCache |
fromFile(java.io.File singleFile)
Create a cache from a single file source
|
static PoliciesCache |
fromFile(java.io.File singleFile,
java.util.Set<Attribute> forcedContext)
Create a cache from a single file source
|
static PoliciesCache |
fromSourceProvider(SourceProvider provider)
Create from a provider
|
static PoliciesCache |
fromSourceProvider(SourceProvider provider,
java.util.Set<Attribute> forcedContext)
Create from a provider with a forced context
|
static PoliciesCache |
fromSources(java.lang.Iterable<CacheableYamlSource> sources)
Create a cache from cacheable sources
|
static PoliciesCache |
fromSources(java.lang.Iterable<CacheableYamlSource> sources,
java.util.Set<Attribute> context)
Create a cache from cacheable sources
|
PolicyCollection |
getDocument(CacheableYamlSource source) |
java.util.Iterator<PolicyCollection> |
iterator() |
public PolicyCollection getDocument(CacheableYamlSource source) throws PoliciesParseException
source
- sourcePoliciesParseException
public java.util.Iterator<PolicyCollection> iterator()
iterator
in interface java.lang.Iterable<PolicyCollection>
public static PoliciesCache fromFile(java.io.File singleFile)
singleFile
- filepublic static PoliciesCache fromFile(java.io.File singleFile, java.util.Set<Attribute> forcedContext)
singleFile
- filepublic static PoliciesCache fromSourceProvider(SourceProvider provider)
provider
- source providerpublic static PoliciesCache fromSourceProvider(SourceProvider provider, java.util.Set<Attribute> forcedContext)
provider
- source providerforcedContext
- forced contextpublic static PoliciesCache fromDir(java.io.File rootDir)
rootDir
- base directorpublic static PoliciesCache fromDir(java.io.File rootDir, java.util.Set<Attribute> forcedContext)
rootDir
- base directorpublic static PoliciesCache fromSources(java.lang.Iterable<CacheableYamlSource> sources)
sources
- sourcepublic static PoliciesCache fromSources(java.lang.Iterable<CacheableYamlSource> sources, java.util.Set<Attribute> context)
sources
- source