public class ContentMgr extends BaseMgr
Modifier | Constructor and Description |
---|---|
protected |
ContentMgr(com.konakart.appif.KKEngIf eng,
KKAppEng kkAppEng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
com.konakart.appif.ContentIf[] |
getContent(int maxItems,
com.konakart.appif.ContentSearchIf search) |
com.konakart.appif.ContentIf[] |
getContentForId(int maxItems,
int contentId)
Get Content by Id
|
com.konakart.appif.ContentIf[] |
getContentForType(int maxItems,
int contentTypeId)
Get Content by Type
|
com.konakart.appif.ContentIf[] |
getContentForTypeAndKey(int maxItems,
int contentTypeId,
java.lang.String searchKey)
Get Content by Type and Key
|
boolean |
isCacheContent()
Based on a configuration variable decides whether content caching is enabled.
|
boolean |
isEnabled()
Based on a configuration variable decides whether content enabled.
|
void |
refreshCaches()
Refreshes the non static content map containing user specific content.
|
void |
refreshConfigs()
Clear the content map.
|
getEng, getKkAppEng, getPages, isMgrReady, setEng, setKkAppEng
protected ContentMgr(com.konakart.appif.KKEngIf eng, KKAppEng kkAppEng) throws com.konakart.app.KKException, KKAppException
eng
- the engkkAppEng
- the kkAppEngKKAppException
- an unexpected KKAppException exceptioncom.konakart.app.KKException
- an unexpected KKException exceptionpublic void refreshConfigs()
public void refreshCaches()
public boolean isEnabled() throws KKAppException
KKAppException
- an unexpected KKAppException exceptionpublic boolean isCacheContent() throws KKAppException
KKAppException
- an unexpected KKAppException exceptionpublic com.konakart.appif.ContentIf[] getContentForTypeAndKey(int maxItems, int contentTypeId, java.lang.String searchKey)
maxItems
- maximum number of items of the specified contentType to return. If your content
has expressions defined you may not get maxItems content records back because some
may not pass the expression tests. In these cases you should add a higher maxItems
value to ensure you always retrieve the required number of content items. (The
problem is that the expressions are executed on the maxItems records returned from
the database so if any of those fail the expression tests the number returned will
be reduced by the number that fail the tests.contentTypeId
- Content type id identifying the contentsearchKey
- Search key identifying the contentpublic com.konakart.appif.ContentIf[] getContentForId(int maxItems, int contentId)
maxItems
- maximum number of items of the specified contentType to return. If your content
has expressions defined you may not get maxItems content records back because some
may not pass the expression tests. In these cases you should add a higher maxItems
value to ensure you always retrieve the required number of content items. (The
problem is that the expressions are executed on the maxItems records returned from
the database so if any of those fail the expression tests the number returned will
be reduced by the number that fail the tests.contentId
- Content id identifying the contentpublic com.konakart.appif.ContentIf[] getContentForType(int maxItems, int contentTypeId)
maxItems
- maximum number of items of the specified contentType to return. If your content
has expressions defined you may not get maxItems content records back because some
may not pass the expression tests. In these cases you should add a higher maxItems
value to ensure you always retrieve the required number of content items. (The
problem is that the expressions are executed on the maxItems records returned from
the database so if any of those fail the expression tests the number returned will
be reduced by the number that fail the tests.contentTypeId
- Content type id identifying the contentpublic com.konakart.appif.ContentIf[] getContent(int maxItems, com.konakart.appif.ContentSearchIf search)
maxItems
- maximum number of items of the specified contentType to return. If your content
has expressions defined you may not get maxItems content records back because some
may not pass the expression tests. In these cases you should add a higher maxItems
value to ensure you always retrieve the required number of content items. (The
problem is that the expressions are executed on the maxItems records returned from
the database so if any of those fail the expression tests the number returned will
be reduced by the number that fail the tests.search
- Content search object containing constraints to search for the contentCopyright © 2018 DS Data Systems UK Ltd.