public class NewsServiceImpl extends Object implements NewsService
| Modifier and Type | Field and Description |
|---|---|
static String |
APPLICATION_DATA_PATH |
static String |
NEWS_NODES_FOLDER |
static String |
PINNED_NEWS_NODES_FOLDER |
| Constructor and Description |
|---|
NewsServiceImpl(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.space.spi.SpaceService spaceService,
org.exoplatform.social.core.manager.ActivityManager activityManager,
org.exoplatform.social.core.manager.IdentityManager identityManager,
org.exoplatform.upload.UploadService uploadService,
org.exoplatform.social.ckeditor.HTMLUploadImageProcessor imageProcessor,
org.exoplatform.services.cms.link.LinkManager linkManager) |
| Modifier and Type | Method and Description |
|---|---|
News |
createNews(News news)
Create a News
A news is composed of an activity and a CMS node containing the data
|
News |
getNews(String id)
Get a news by id
|
void |
pinNews(String newsId)
Pin a news
|
void |
shareNews(SharedNews sharedNews,
List<org.exoplatform.social.core.space.model.Space> spaces)
Share a news to a list of spaces
|
void |
updateNews(News news)
Update a news
If the uploadId of the news is null, the illustration is not updated.
|
public static final String NEWS_NODES_FOLDER
public static final String PINNED_NEWS_NODES_FOLDER
public static final String APPLICATION_DATA_PATH
public NewsServiceImpl(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.space.spi.SpaceService spaceService,
org.exoplatform.social.core.manager.ActivityManager activityManager,
org.exoplatform.social.core.manager.IdentityManager identityManager,
org.exoplatform.upload.UploadService uploadService,
org.exoplatform.social.ckeditor.HTMLUploadImageProcessor imageProcessor,
org.exoplatform.services.cms.link.LinkManager linkManager)
public News createNews(News news) throws Exception
createNews in interface NewsServicenews - The news to createjavax.jcr.RepositoryExceptionExceptionpublic News getNews(String id) throws Exception
getNews in interface NewsServiceid - Id of the newsExceptionpublic void updateNews(News news) throws Exception
updateNews in interface NewsServicenews - The new newsExceptionpublic void pinNews(String newsId) throws Exception
pinNews in interface NewsServicenewsId - The id of the news to be pinnedExceptionpublic void shareNews(SharedNews sharedNews, List<org.exoplatform.social.core.space.model.Space> spaces) throws Exception
shareNews in interface NewsServicesharedNews - Data of the shared newsspaces - List of spaces to share the news withExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.