Package org.dspace.core
Class NewsServiceImpl
java.lang.Object
org.dspace.core.NewsServiceImpl
- All Implemented Interfaces:
NewsService
Encapsulate access to the news texts.
- Author:
- mhwood
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLocalesToAcceptableFilenames(List<String> acceptableFilenames) Get the path for the news files.readNewsFile(String newsFile) Reads news from a text file.voidsetAcceptableFilenames(List<String> acceptableFilenames) booleanCheck if the newsName is an acceptable file namewriteNewsFile(String newsFile, String news) Writes news to a text file.
-
Constructor Details
-
NewsServiceImpl
protected NewsServiceImpl()Not instantiable.
-
-
Method Details
-
setAcceptableFilenames
-
addLocalesToAcceptableFilenames
-
readNewsFile
Description copied from interface:NewsServiceReads news from a text file.- Specified by:
readNewsFilein interfaceNewsService- Parameters:
newsFile- name of the news file to read in, relative to the news file path.- Returns:
- contents
-
writeNewsFile
Description copied from interface:NewsServiceWrites news to a text file.- Specified by:
writeNewsFilein interfaceNewsService- 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
Description copied from interface:NewsServiceGet the path for the news files.- Specified by:
getNewsFilePathin interfaceNewsService- Returns:
- path
-
validate
Description copied from interface:NewsServiceCheck if the newsName is an acceptable file name- Specified by:
validatein interfaceNewsService- Parameters:
newsName- news name- Returns:
- true if the newsName is valid
-