public class PropertyMappings
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addFilePattern(java.lang.String value,
java.lang.String filePattern)
Appends a file pattern to the list of associated file patterns for the script mapping
|
void |
addFilePatterns(java.lang.String value,
java.util.List<java.lang.String> filePatterns)
Appends a list of file patterns to the list of associated file patterns for the script mapping
|
java.lang.String |
getKeyName() |
java.util.List<java.lang.String> |
getMappedList(java.lang.String value,
java.io.File file)
Returns a sublist of files that are mapped the value name
|
java.util.List<java.lang.String> |
getMappedList(java.lang.String value,
java.io.File file,
java.lang.String encoding)
Returns a sublist of files that are mapped the value
|
java.util.List<java.lang.String> |
getMappedList(java.lang.String value,
java.util.List<java.lang.String> files)
Returns a sublist of files that are mapped the value name
|
java.lang.String |
getValue(java.lang.String file)
Returns the value associated to the relative path file or
NULL if no value is
found for the file. |
java.util.Set<java.lang.String> |
getValues()
Returns all the values of the map
|
boolean |
isMapped(java.lang.String value,
java.lang.String file)
Returns
true if the list contains the value mapping |
void |
setKeyName(java.lang.String newKeyName) |
void |
setValue(java.lang.String value,
java.util.List<java.lang.String> filePatterns)
Sets a value association.
|
public java.lang.String getValue(java.lang.String file)
NULL
if no value is
found for the file.file
- : The relative path of the file to search for.NULL
if none foundpublic void setValue(java.lang.String value, java.util.List<java.lang.String> filePatterns)
value
- : The name of the value to associatefilePatterns
- The list of file patterns to associate to this valuepublic void addFilePattern(java.lang.String value, java.lang.String filePattern)
value
- : The name of the valuefilePattern
- : The file pattern to add to the script mappingpublic void addFilePatterns(java.lang.String value, java.util.List<java.lang.String> filePatterns)
value
- : The name of the valuefilePatterns
- : The list of file patterns to add to the script mappingpublic boolean isMapped(java.lang.String value, java.lang.String file)
true
if the list contains the value mappingvalue
- : The name of the valuefile
- : The relative file associated to the value nametrue
if the list contains the value mappingpublic java.util.List<java.lang.String> getMappedList(java.lang.String value, java.util.List<java.lang.String> files)
value
- : The name of the value be matchedfiles
- : The list of files to matchpublic java.util.List<java.lang.String> getMappedList(java.lang.String value, java.io.File file) throws java.io.IOException
value
- : The name of the value be matchedfile
- : An external file containing a list of files to matchjava.io.IOException
- If an error occurred when reading the file.public java.util.List<java.lang.String> getMappedList(java.lang.String value, java.io.File file, java.lang.String encoding) throws java.io.IOException
value
- : The name of the value be matchedfile
- : An external file containing a list of files to matchencoding
- : The encoding of the input filejava.io.IOException
- If an error occurred when reading the file.public java.util.Set<java.lang.String> getValues()
public void setKeyName(java.lang.String newKeyName)
newKeyName
- : the new name of the BuildProperties keypublic java.lang.String getKeyName()
<IBM Copyright © 2018 IBM Corp. All Rights Reserved.