Package org.exoplatform.news.storage.jcr
Class JcrNewsStorage
java.lang.Object
org.exoplatform.news.storage.jcr.JcrNewsStorage
- All Implemented Interfaces:
NewsStorage
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String[] -
Constructor Summary
ConstructorsConstructorDescriptionJcrNewsStorage(org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator, org.exoplatform.services.jcr.ext.distribution.DataDistributionManager dataDistributionManager, org.exoplatform.social.core.manager.ActivityManager activityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.upload.UploadService uploadService, org.exoplatform.services.ecm.publication.PublicationService publicationService, org.exoplatform.services.wcm.extensions.publication.PublicationManager publicationManager, NewsAttachmentsStorage newsAttachmentsService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.services.cms.link.LinkManager linkManager, NewsSearchConnector newsSearchConnector, org.exoplatform.services.wcm.publication.WCMPublicationService wCMPublicationService) -
Method Summary
Modifier and TypeMethodDescriptionvoidarchiveNews(String newsId) Archive a newscreateNews(News news) Create the exo:news draft node in CMSvoiddeleteNews(String newsId, boolean isDraft) getNews(NewsFilter newsFilter) Get all newsgetNewsById(String newsId, boolean editMode) intgetNewsCount(NewsFilter newsFilter) getNewsIllustration(News news) javax.jcr.NodegetNodeById(String newsId, org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider) booleanisCurrentUserInNewsViewers(String newsId, String userId) voidmarkAsRead(News news, String userId) voidpublishNews(News news) Publish a newsscheduleNews(News news) searchNews(NewsFilter filter, String lang) Search news with the given textvoidshareNews(News news, org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.identity.model.Identity userIdentity, String sharedActivityId) substituteUsernames(String portalOwner, String message) voidunarchiveNews(String newsId) Unarchive a newsvoidunpublishNews(String newsId) unScheduleNews(News news) updateNews(News news, String updater) voidupdateNewsActivities(String newsActivityId, News news)
-
Field Details
-
APPLICATION_DATA_PATH
- See Also:
-
MIX_NEWS_MODIFIERS
- See Also:
-
MIX_NEWS_MODIFIERS_PROP
- See Also:
-
NEWS_ACTIVITY_POSTING_MIXIN_TYPE
- See Also:
-
NEWS_ACTIVITY_POSTED_MIXIN_PROP
- See Also:
-
NEWS_DRAFT_VISIBILE_MIXIN_PROP
- See Also:
-
NEWS_DRAFT_VISIBILITY_MIXIN_TYPE
- See Also:
-
NEWS_NODES_FOLDER
- See Also:
-
PUBLISHED_NEWS_NODES_FOLDER
- See Also:
-
EXO_NEWS_LAST_MODIFIER
- See Also:
-
NEWS_MODIFICATION_MIXIN
- See Also:
-
EXO_PRIVILEGEABLE
- See Also:
-
NEWS_AUDIENCE_PROP
- See Also:
-
SHARE_NEWS_PERMISSIONS
-
-
Constructor Details
-
JcrNewsStorage
public JcrNewsStorage(org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator, org.exoplatform.services.jcr.ext.distribution.DataDistributionManager dataDistributionManager, org.exoplatform.social.core.manager.ActivityManager activityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.upload.UploadService uploadService, org.exoplatform.services.ecm.publication.PublicationService publicationService, org.exoplatform.services.wcm.extensions.publication.PublicationManager publicationManager, NewsAttachmentsStorage newsAttachmentsService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.services.cms.link.LinkManager linkManager, NewsSearchConnector newsSearchConnector, org.exoplatform.services.wcm.publication.WCMPublicationService wCMPublicationService)
-
-
Method Details
-
createNews
Create the exo:news draft node in CMS- Specified by:
createNewsin interfaceNewsStorage- Parameters:
news- the news- Returns:
- News draft id
- Throws:
Exception- when error
-
getNews
Get all news- Specified by:
getNewsin interfaceNewsStorage- Returns:
- all news
- Throws:
Exception- when error
-
getNewsCount
- Specified by:
getNewsCountin interfaceNewsStorage- Throws:
Exception
-
publishNews
Publish a news- Specified by:
publishNewsin interfaceNewsStorage- Parameters:
news- The news to be published- Throws:
Exception- when error
-
getNewsById
- Specified by:
getNewsByIdin interfaceNewsStorage- Throws:
Exception
-
getNewsIllustration
- Specified by:
getNewsIllustrationin interfaceNewsStorage- Throws:
Exception
-
updateNews
- Specified by:
updateNewsin interfaceNewsStorage- Throws:
Exception
-
deleteNews
- Specified by:
deleteNewsin interfaceNewsStorage- Throws:
Exception
-
scheduleNews
- Specified by:
scheduleNewsin interfaceNewsStorage- Throws:
Exception
-
updateNewsActivities
- Specified by:
updateNewsActivitiesin interfaceNewsStorage- Throws:
Exception
-
substituteUsernames
-
markAsRead
- Specified by:
markAsReadin interfaceNewsStorage- Throws:
Exception
-
isCurrentUserInNewsViewers
- Specified by:
isCurrentUserInNewsViewersin interfaceNewsStorage- Throws:
Exception
-
unpublishNews
- Specified by:
unpublishNewsin interfaceNewsStorage- Throws:
Exception
-
unScheduleNews
- Specified by:
unScheduleNewsin interfaceNewsStorage- Throws:
Exception
-
archiveNews
Archive a news- Specified by:
archiveNewsin interfaceNewsStorage- Parameters:
newsId- The id of the news to be archived- Throws:
Exception- when error
-
unarchiveNews
Unarchive a news- Specified by:
unarchiveNewsin interfaceNewsStorage- Parameters:
newsId- The id of the news to be unarchived- Throws:
Exception- when error
-
searchNews
Search news with the given text- Specified by:
searchNewsin interfaceNewsStorage- Parameters:
filter- news filterlang- language- Throws:
Exception- when error
-
getNodeById
public javax.jcr.Node getNodeById(String newsId, org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider) throws javax.jcr.RepositoryException - Throws:
javax.jcr.RepositoryException
-