public class NewsServiceImpl extends Object implements NewsService
| Modifier | Constructor and Description |
|---|---|
protected |
NewsServiceImpl()
Not instantiable.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
addLocalesToAcceptableFilenames(List<String> acceptableFilenames) |
String |
getNewsFilePath()
Get the path for the news files.
|
String |
readNewsFile(String newsFile)
Reads news from a text file.
|
void |
setAcceptableFilenames(List<String> acceptableFilenames) |
boolean |
validate(String newsName)
Check if the newsName is a valid one
|
String |
writeNewsFile(String newsFile,
String news)
Writes news to a text file.
|
protected List<String> addLocalesToAcceptableFilenames(List<String> acceptableFilenames)
public String readNewsFile(String newsFile)
NewsServicereadNewsFile in interface NewsServicenewsFile - name of the news file to read in, relative to the news file path.public String writeNewsFile(String newsFile, String news)
NewsServicewriteNewsFile in interface NewsServicenewsFile - name of the news file to read in, relative to the news file path.news - the text to be written to the file.public String getNewsFilePath()
NewsServicegetNewsFilePath in interface NewsServicepublic boolean validate(String newsName)
NewsServicevalidate in interface NewsServiceCopyright © 2016 DuraSpace. All Rights Reserved.