public class TemplateFilesRepository extends Object implements INewsRepository
| Constructor and Description |
|---|
TemplateFilesRepository(IAppConfig appConfig,
org.spincast.core.templating.ITemplatingEngine templatingEngine)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
cleanContent(String newsEntryContent) |
protected IAppConfig |
getAppConfig() |
protected Properties |
getMetaProperties(String newsEntryContent) |
List<INewsEntry> |
getNewsEntries(boolean ascOrder)
Gets all the news entries.
|
List<INewsEntry> |
getNewsEntries(int startPos,
int endPos,
boolean ascOrder)
Gets news entries.
|
INewsEntriesAndTotalNbr |
getNewsEntriesAndTotalNbr(int startPos,
int endPos,
boolean ascOrder)
Gets news entries and the number total of entries in the data source.
|
protected Map<Long,INewsEntry> |
getNewsEntriesById() |
protected List<INewsEntry> |
getNewsEntriesLocal() |
int |
getNewsEntriesTotalNumber()
Gets news entries number.
|
INewsEntry |
getNewsEntry(long newsId)
Gets a specific news entry.
|
protected org.spincast.core.templating.ITemplatingEngine |
getTemplatingEngine() |
void |
init()
Init
|
@Inject public TemplateFilesRepository(IAppConfig appConfig, org.spincast.core.templating.ITemplatingEngine templatingEngine)
@Inject public void init()
protected IAppConfig getAppConfig()
protected org.spincast.core.templating.ITemplatingEngine getTemplatingEngine()
public int getNewsEntriesTotalNumber()
INewsRepositorygetNewsEntriesTotalNumber in interface INewsRepositorypublic List<INewsEntry> getNewsEntries(boolean ascOrder)
INewsRepositorygetNewsEntries in interface INewsRepositoryascOrder - If true, returns the entries by their
publication date in ascending order. Otherwise, in descending
order.public List<INewsEntry> getNewsEntries(int startPos, int endPos, boolean ascOrder)
INewsRepositorygetNewsEntries in interface INewsRepositorystartPos - The position of the first entry to return. The first element
is "1", not "0".endPos - The position of the last entry to return (inclusive).ascOrder - If true, returns the entries by their
publication date in ascending order. Otherwise, in descending
order.public INewsEntriesAndTotalNbr getNewsEntriesAndTotalNbr(int startPos, int endPos, boolean ascOrder)
INewsRepositorygetNewsEntriesAndTotalNbr in interface INewsRepositorystartPos - The position of the first entry to return. The first element
is "1", not "0".endPos - The position of the last entry to return (inclusive).ascOrder - If true, returns the entries by their
publication date in ascending order. Otherwise, in descending
order.public INewsEntry getNewsEntry(long newsId)
INewsRepositorygetNewsEntry in interface INewsRepositorynull if not found.protected Map<Long,INewsEntry> getNewsEntriesById()
protected List<INewsEntry> getNewsEntriesLocal()
protected Properties getMetaProperties(String newsEntryContent)
Copyright © 2016. All rights reserved.