Package org.dspace.core.service
Interface NewsService
-
- All Known Implementing Classes:
NewsServiceImpl
public interface NewsServiceEncapsulate access to the news texts.- Author:
- mhwood
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetNewsFilePath()Get the path for the news files.StringreadNewsFile(String newsFile)Reads news from a text file.booleanvalidate(String newsName)Check if the newsName is an acceptable file nameStringwriteNewsFile(String newsFile, String news)Writes news to a text file.
-
-
-
Method Detail
-
readNewsFile
String readNewsFile(String newsFile)
Reads news from a text file.- Parameters:
newsFile- name of the news file to read in, relative to the news file path.- Returns:
- contents
-
writeNewsFile
String writeNewsFile(String newsFile, String news)
Writes news to a text file.- Parameters:
newsFile- name of the news file to read in, relative to the news file path.news- the text to be written to the file.- Returns:
- string
-
getNewsFilePath
String getNewsFilePath()
Get the path for the news files.- Returns:
- path
-
validate
boolean validate(String newsName)
Check if the newsName is an acceptable file name- Parameters:
newsName- news name- Returns:
- true if the newsName is valid
-
-