|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.yarn.fs.AbstractLocalResourcesSelector
public abstract class AbstractLocalResourcesSelector
Base implementation for LocalResourcesSelector supporting simple
use cases where user needs to localise properties, zip and jar files.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.springframework.yarn.fs.LocalResourcesSelector |
|---|
LocalResourcesSelector.Entry |
| Constructor Summary | |
|---|---|
AbstractLocalResourcesSelector()
|
|
| Method Summary | |
|---|---|
void |
addPattern(String pattern)
Adds a pattern to be returned selected. |
void |
addPatterns(List<String> patterns)
Adds a patterns to be returned as selected. |
void |
addPatterns(String... patterns)
Adds a patterns to be returned as selected. |
List<String> |
getPatterns()
Gets the patterns. |
String[] |
getPropertiesNames()
Gets the properties fiels base names. |
String[] |
getPropertiesSuffixes()
Gets the properties files suffixes. |
String |
getZipArchivePattern()
Gets the current zip archive pattern. |
protected boolean |
isZipArchive(String name)
Matching if argument is determined to be a zip archive. |
List<LocalResourcesSelector.Entry> |
select(String dir)
Select a List of LocalResourcesSelector.Entrys. |
protected List<LocalResourcesSelector.Entry> |
selectInternal(String dir)
Select internal. |
void |
setPropertiesNames(List<String> propertiesNames)
Sets the properties names. |
void |
setPropertiesNames(String... propertiesNames)
Sets the properties names. |
void |
setPropertiesSuffixes(List<String> propertiesSuffixes)
Sets the properties suffixes. |
void |
setPropertiesSuffixes(String... propertiesSuffixes)
Sets the properties suffixes. |
void |
setZipArchivePattern(String zipArchivePattern)
Sets the zip archive pattern. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractLocalResourcesSelector()
| Method Detail |
|---|
public final List<LocalResourcesSelector.Entry> select(String dir)
LocalResourcesSelectorList of LocalResourcesSelector.Entrys.
This method cannot not return NULL.
select in interface LocalResourcesSelectordir - the base directory
public void addPattern(String pattern)
pattern - the patternpublic void addPatterns(String... patterns)
patterns - the patternsaddPattern(String)public void addPatterns(List<String> patterns)
patterns - the patternsaddPattern(String)public List<String> getPatterns()
public void setZipArchivePattern(String zipArchivePattern)
DEFAULT_PATTERN_ZIP_ARCHIVE. Setting this
pattern as NULL effectively disables
zip matching.
zipArchivePattern - the new zip archive patternpublic String getZipArchivePattern()
public void setPropertiesNames(String... propertiesNames)
getPropertiesSuffixes().
propertiesNames - the new properties namespublic void setPropertiesNames(List<String> propertiesNames)
propertiesNames - the new properties namessetPropertiesNames(String...)public String[] getPropertiesNames()
public void setPropertiesSuffixes(String... propertiesSuffixes)
getPropertiesNames().
propertiesSuffixes - the new properties suffixespublic void setPropertiesSuffixes(List<String> propertiesSuffixes)
propertiesSuffixes - the new properties suffixessetPropertiesSuffixes(String...)public String[] getPropertiesSuffixes()
protected List<LocalResourcesSelector.Entry> selectInternal(String dir)
dir - the dir
select(String)protected boolean isZipArchive(String name)
PatternMatchUtils.simpleMatch(String, String)
for actual matching. Match pattern is defined in variable
zipArchivePattern and can be altered using method
setZipArchivePattern(String).
name - the name to match
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||