Package org.dspace.core.service
Interface NewsService
- All Known Implementing Classes:
NewsServiceImpl
public interface NewsService
Encapsulate access to the news texts.
- Author:
- mhwood
-
Method Summary
Modifier and TypeMethodDescriptionGet the path for the news files.readNewsFile(String newsFile) Reads news from a text file.booleanCheck if the newsName is an acceptable file namewriteNewsFile(String newsFile, String news) Writes news to a text file.
-
Method Details
-
readNewsFile
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
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
Check if the newsName is an acceptable file name- Parameters:
newsName- news name- Returns:
- true if the newsName is valid
-