C - as Content typepublic interface ContentSource<C extends Content<CA,CF>,CA extends AbstractContentAttribute,CF extends AbstractContentFacet> extends GenericDao<C>
| Modifier and Type | Method and Description |
|---|---|
Long |
count(Query<C> query)
See Implementation/Implementing Source Adapter for more details on how to construct the query.
|
int |
deleteContent(String name,
boolean deleteChildren)
Delete a content and all associated content for all locales etc.
|
int |
deleteFacet(Long id) |
int |
deleteFacet(String name)
Delete a
ContentFacet |
int |
deleteFacet(String name,
Integer index)
Delete a
ContentFacet @ the index position |
C |
getContent(String name,
Locale locale,
Status status)
Get content for Default name and specified locale and Status
|
Map<Locale,Map<Status,C>> |
getContents(String name)
Get Content for all the locales this content exists for.
|
Map<Status,C> |
getContents(String name,
Locale locale)
Get content for specified name and locale.
|
List<C> |
getContentsList(String name)
Get contents across
Status, Locales etc. |
List<CF> |
getFacetArray(Long contentId,
String facetName,
Collection<Integer> indeces)
Fetch specific facets in order of their natural index.
|
List<Integer> |
getFacetArrayIndeces(Long contentId,
String facetName)
The indeces is guaranteed to be in order of its index position which can be any positive, 0 or negative number even.
|
List<CF> |
getFacets(C proxyContentQueryObject,
String facetName)
Fetch a particular content for a
AbstractContent query object;
where based on how specific the details within the AbstractContent object are
it will return the result. |
Collection<CF> |
getFacets(Long contentId) |
Collection<CF> |
getFacets(Query<CF> qry)
To keep payload minimal and to support most use case scenarios, the Impl may want
to lazy load the facets in the
C on explicit request.This method allows that explicit request to be fullfilled. |
Page<C> |
loadPage(Query<C> query)
See Implementation/Implementing Source Adapter for more details on how to construct the query.
|
C |
publish(C content)
Clone Preview
C record (& related ContentFacets, attributes) to publish |
void |
publish(Collection<C> contents)
Clone Preview
C record(s) (& related ContentFacets, attributes) to publish |
List<C> |
query(Query<C> query)
|
Page<C> |
queryPage(Query<C> query)
|
CF |
saveFacet(CF cf)
Save a Facet
|
C |
setContent(C content) |
void |
unPublish(C content)
Delete published version from source.
|
void |
updateContentMetaAll(C content,
String[] selectedAttribs)
Will update the aspects of
C displayName, attributes & Bit mask across
all copies of the Content(for each Status), but not across languages |
void |
updateContentName(String oldName,
String newName)
Update
C#setName(String) |
int |
updateContentStatus(String name,
Locale locale,
Status oldStatus,
Status newStatus)
This will cause an update to the Content state.
|
Page<C> loadPage(Query<C> query)
query - as Query for CCthis#reloadFacets(C)}Long count(Query<C> query)
query - as Query for CCthis#reloadFacets(C)}C getContent(String name, Locale locale, Status status)
Map<Status,C> getContents(String name, Locale locale)
Status.name - as the identifier of ContentStatus , Cthis#reloadFacets(C)}Map<Locale,Map<Status,C>> getContents(String name)
name - identifier of Contentlocale - for the locales @nullable trueStatus, C) )this#reloadFacets(C)}List<C> getContentsList(String name)
Status, Locales etc. for a given unique (across locale & Status) NameIdname - Collection<CF> getFacets(Query<CF> qry)
C on explicit request.qry - List<CF> getFacetArray(Long contentId, String facetName, Collection<Integer> indeces)
contentId - as LongfacetName - as Stringindeces - as optional (Nullable), List of index numbers to fetch. If null will netch all.ContentFacetList<Integer> getFacetArrayIndeces(Long contentId, String facetName)
contentId - as LongfacetName - as StringCollection<CF> getFacets(Long contentId)
contentId - as LongContentFacetList<CF> getFacets(C proxyContentQueryObject, String facetName)
AbstractContent query object;
where based on how specific the details within the AbstractContent object are
it will return the result.
List as AbstractContentFacet support arrays and for the same
facet name, there can be multiple AbstractContentFacets for the same AbstractContent.contentName - as StringfacetName - as StringContentFacet type int deleteContent(String name, boolean deleteChildren)
name - of Content as StringdeleteChildren - as boolean; will delete sub-hierarchy to this contentContentAttribute, ContentFacet etc are not counted, just core content entity objects)int deleteFacet(String name)
ContentFacetname - as Stringint deleteFacet(Long id)
int deleteFacet(String name, Integer index)
ContentFacet @ the index positionname - as Stringindex - as Integer (@Nullable)int updateContentStatus(String name, Locale locale, Status oldStatus, Status newStatus) throws Exception
Status.DRAFT, and is being updated to Status.PUBLISH
while another Status.PUBLISH one already exists. Then it should update the PUBLISH record for the content and
mute the Status.DRAFT one (in concept).CF saveFacet(CF cf)
cf - as ContentFacetC publish(C content) throws Exception
C record (& related ContentFacets, attributes) to publishcontent - (this should be a record with C#getStatus() as Status.DRAFT)Exceptionvoid unPublish(C content) throws Exception
content - Exceptionvoid publish(Collection<C> contents) throws Exception
C record(s) (& related ContentFacets, attributes) to publishcontent - (these should be records with C#getStatus() as Status.DRAFT)Exceptionvoid updateContentMetaAll(C content, String[] selectedAttribs)
C displayName, attributes & Bit mask across
all copies of the Content(for each Status), but not across languagescontent - (Only Those attributes are updated that are in the content object; Supports partial Attribute update)String[] - if specified, only specified attributes will be updated @nullable truevoid updateContentName(String oldName, String newName)
C#setName(String)content - as C@Transactional(readOnly=true) Page<C> queryPage(Query<C> query) throws Exception
Query and on Queryable fields only.
Query.setNullSet(Set)
Queryable fields will face problems.Copyright © 2018. All rights reserved.