Liferay 7.0-ce-m3

com.liferay.portlet.wiki.service.impl
Class WikiPageServiceImpl

java.lang.Object
  extended by com.liferay.portal.service.BaseServiceImpl
      extended by com.liferay.portlet.wiki.service.base.WikiPageServiceBaseImpl
          extended by com.liferay.portlet.wiki.service.impl.WikiPageServiceImpl
All Implemented Interfaces:
IdentifiableBean, BaseService, WikiPageService

public class WikiPageServiceImpl
extends WikiPageServiceBaseImpl

Provides the remote service for accessing, adding, deleting, moving, subscription handling of, trash handling of, and updating wiki pages and wiki page attachments. Its methods include permission checks.


Field Summary
 
Fields inherited from class com.liferay.portlet.wiki.service.base.WikiPageServiceBaseImpl
assetCategoryFinder, assetCategoryLocalService, assetCategoryPersistence, assetCategoryService, assetEntryFinder, assetEntryLocalService, assetEntryPersistence, assetEntryService, assetLinkLocalService, assetLinkPersistence, assetTagFinder, assetTagLocalService, assetTagPersistence, assetTagService, companyLocalService, companyPersistence, companyService, counterLocalService, expandoRowLocalService, expandoRowPersistence, groupFinder, groupLocalService, groupPersistence, groupService, layoutFinder, layoutLocalService, layoutPersistence, layoutService, mbMessageFinder, mbMessageLocalService, mbMessagePersistence, mbMessageService, portletPreferencesFinder, portletPreferencesLocalService, portletPreferencesPersistence, portletPreferencesService, resourceLocalService, socialActivityFinder, socialActivityLocalService, socialActivityPersistence, socialActivityService, subscriptionLocalService, subscriptionPersistence, systemEventLocalService, systemEventPersistence, trashEntryLocalService, trashEntryPersistence, trashEntryService, trashVersionLocalService, trashVersionPersistence, userFinder, userLocalService, userPersistence, userService, wikiNodeLocalService, wikiNodePersistence, wikiNodeService, wikiPageFinder, wikiPageLocalService, wikiPagePersistence, wikiPageResourceLocalService, wikiPageResourcePersistence, wikiPageService, workflowInstanceLinkLocalService, workflowInstanceLinkPersistence
 
Fields inherited from class com.liferay.portal.service.BaseServiceImpl
ANONYMOUS_NAMES, JRUN_ANONYMOUS, ORACLE_ANONYMOUS, SUN_ANONYMOUS, WEBLOGIC_ANONYMOUS
 
Constructor Summary
WikiPageServiceImpl()
           
 
Method Summary
 WikiPage addPage(long nodeId, String title, String content, String summary, boolean minorEdit, ServiceContext serviceContext)
           
 WikiPage addPage(long nodeId, String title, String content, String summary, boolean minorEdit, String format, String parentTitle, String redirectTitle, ServiceContext serviceContext)
           
 void addPageAttachment(long nodeId, String title, String fileName, File file, String mimeType)
           
 void addPageAttachment(long nodeId, String title, String fileName, InputStream inputStream, String mimeType)
           
 void addPageAttachments(long nodeId, String title, List<ObjectValuePair<String,InputStream>> inputStreamOVPs)
           
 void addTempFileEntry(long nodeId, String folderName, String fileName, InputStream inputStream, String mimeType)
           
 void addTempPageAttachment(long nodeId, String fileName, String tempFolderName, InputStream inputStream, String mimeType)
          Deprecated. As of 7.0.0 replaced by addTempFileEntry(long, String, String, InputStream, String)
 void changeNode(long nodeId, String title, long newNodeId, ServiceContext serviceContext)
           
 void changeParent(long nodeId, String title, String newParentTitle, ServiceContext serviceContext)
           
 void copyPageAttachments(long templateNodeId, String templateTitle, long nodeId, String title)
           
 void deletePage(long nodeId, String title)
           
 void deletePage(long nodeId, String title, double version)
          Deprecated. As of 6.2.0 replaced by discardDraft(long, String, double)
 void deletePageAttachment(long nodeId, String title, String fileName)
           
 void deletePageAttachments(long nodeId, String title)
           
 void deleteTempFileEntry(long nodeId, String folderName, String fileName)
           
 void deleteTrashPageAttachments(long nodeId, String title)
           
 void discardDraft(long nodeId, String title, double version)
           
protected  String exportToRSS(long companyId, String name, String description, String type, double version, String displayStyle, String feedURL, String entryURL, String attachmentURLPrefix, List<WikiPage> pages, boolean diff, Locale locale)
           
 WikiPage fetchPage(long nodeId, String title, double version)
           
 List<WikiPage> getChildren(long groupId, long nodeId, boolean head, String parentTitle)
           
 WikiPage getDraftPage(long nodeId, String title)
           
 List<WikiPage> getNodePages(long nodeId, int max)
           
 String getNodePagesRSS(long nodeId, int max, String type, double version, String displayStyle, String feedURL, String entryURL)
          Deprecated. As of 6.2.0, replaced by getNodePagesRSS(long, int, String, double, String, String, String, String)
 String getNodePagesRSS(long nodeId, int max, String type, double version, String displayStyle, String feedURL, String entryURL, String attachmentURLPrefix)
           
 List<WikiPage> getOrphans(long groupId, long nodeId)
           
 WikiPage getPage(long groupId, long nodeId, String title)
           
 WikiPage getPage(long nodeId, String title)
           
 WikiPage getPage(long nodeId, String title, Boolean head)
           
 WikiPage getPage(long nodeId, String title, double version)
           
 List<WikiPage> getPages(long groupId, long nodeId, boolean head, int status, int start, int end, OrderByComparator<WikiPage> obc)
           
 List<WikiPage> getPages(long groupId, long userId, long nodeId, int status, int start, int end)
           
 int getPagesCount(long groupId, long nodeId, boolean head)
           
 int getPagesCount(long groupId, long userId, long nodeId, int status)
           
 String getPagesRSS(long companyId, long nodeId, String title, int max, String type, double version, String displayStyle, String feedURL, String entryURL, Locale locale)
          Deprecated. As of 6.2.0, replaced by getPagesRSS(long, long, String, int, String, double, String, String, String, String, java.util.Locale)
 String getPagesRSS(long companyId, long nodeId, String title, int max, String type, double version, String displayStyle, String feedURL, String entryURL, String attachmentURLPrefix, Locale locale)
           
 List<WikiPage> getRecentChanges(long groupId, long nodeId, int start, int end)
           
 int getRecentChangesCount(long groupId, long nodeId)
           
 String[] getTempFileNames(long nodeId, String folderName)
           
 void movePage(long nodeId, String title, String newTitle, ServiceContext serviceContext)
          Deprecated. As of 6.2.0, replaced by renamePage(long, String, String, ServiceContext) *
 FileEntry movePageAttachmentToTrash(long nodeId, String title, String fileName)
           
 WikiPage movePageToTrash(long nodeId, String title)
           
 WikiPage movePageToTrash(long nodeId, String title, double version)
           
 void renamePage(long nodeId, String title, String newTitle, ServiceContext serviceContext)
           
 void restorePageAttachmentFromTrash(long nodeId, String title, String fileName)
           
 void restorePageFromTrash(long resourcePrimKey)
           
 WikiPage revertPage(long nodeId, String title, double version, ServiceContext serviceContext)
           
 void subscribePage(long nodeId, String title)
           
 void unsubscribePage(long nodeId, String title)
           
 WikiPage updatePage(long nodeId, String title, double version, String content, String summary, boolean minorEdit, String format, String parentTitle, String redirectTitle, ServiceContext serviceContext)
           
 
Methods inherited from class com.liferay.portlet.wiki.service.base.WikiPageServiceBaseImpl
afterPropertiesSet, destroy, getAssetCategoryFinder, getAssetCategoryLocalService, getAssetCategoryPersistence, getAssetCategoryService, getAssetEntryFinder, getAssetEntryLocalService, getAssetEntryPersistence, getAssetEntryService, getAssetLinkLocalService, getAssetLinkPersistence, getAssetTagFinder, getAssetTagLocalService, getAssetTagPersistence, getAssetTagService, getBeanIdentifier, getCompanyLocalService, getCompanyPersistence, getCompanyService, getCounterLocalService, getExpandoRowLocalService, getExpandoRowPersistence, getGroupFinder, getGroupLocalService, getGroupPersistence, getGroupService, getLayoutFinder, getLayoutLocalService, getLayoutPersistence, getLayoutService, getMBMessageFinder, getMBMessageLocalService, getMBMessagePersistence, getMBMessageService, getModelClass, getModelClassName, getPortletPreferencesFinder, getPortletPreferencesLocalService, getPortletPreferencesPersistence, getPortletPreferencesService, getResourceLocalService, getSocialActivityFinder, getSocialActivityLocalService, getSocialActivityPersistence, getSocialActivityService, getSubscriptionLocalService, getSubscriptionPersistence, getSystemEventLocalService, getSystemEventPersistence, getTrashEntryLocalService, getTrashEntryPersistence, getTrashEntryService, getTrashVersionLocalService, getTrashVersionPersistence, getUserFinder, getUserLocalService, getUserPersistence, getUserService, getWikiNodeLocalService, getWikiNodePersistence, getWikiNodeService, getWikiPageFinder, getWikiPageLocalService, getWikiPagePersistence, getWikiPageResourceLocalService, getWikiPageResourcePersistence, getWikiPageService, getWorkflowInstanceLinkLocalService, getWorkflowInstanceLinkPersistence, runSQL, setAssetCategoryFinder, setAssetCategoryLocalService, setAssetCategoryPersistence, setAssetCategoryService, setAssetEntryFinder, setAssetEntryLocalService, setAssetEntryPersistence, setAssetEntryService, setAssetLinkLocalService, setAssetLinkPersistence, setAssetTagFinder, setAssetTagLocalService, setAssetTagPersistence, setAssetTagService, setBeanIdentifier, setCompanyLocalService, setCompanyPersistence, setCompanyService, setCounterLocalService, setExpandoRowLocalService, setExpandoRowPersistence, setGroupFinder, setGroupLocalService, setGroupPersistence, setGroupService, setLayoutFinder, setLayoutLocalService, setLayoutPersistence, setLayoutService, setMBMessageFinder, setMBMessageLocalService, setMBMessagePersistence, setMBMessageService, setPortletPreferencesFinder, setPortletPreferencesLocalService, setPortletPreferencesPersistence, setPortletPreferencesService, setResourceLocalService, setSocialActivityFinder, setSocialActivityLocalService, setSocialActivityPersistence, setSocialActivityService, setSubscriptionLocalService, setSubscriptionPersistence, setSystemEventLocalService, setSystemEventPersistence, setTrashEntryLocalService, setTrashEntryPersistence, setTrashEntryService, setTrashVersionLocalService, setTrashVersionPersistence, setUserFinder, setUserLocalService, setUserPersistence, setUserService, setWikiNodeLocalService, setWikiNodePersistence, setWikiNodeService, setWikiPageFinder, setWikiPageLocalService, setWikiPagePersistence, setWikiPageResourceLocalService, setWikiPageResourcePersistence, setWikiPageService, setWorkflowInstanceLinkLocalService, setWorkflowInstanceLinkPersistence
 
Methods inherited from class com.liferay.portal.service.BaseServiceImpl
getClassLoader, getGuestOrUser, getGuestOrUserId, getPermissionChecker, getUser, getUserId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WikiPageServiceImpl

public WikiPageServiceImpl()
Method Detail

addPage

public WikiPage addPage(long nodeId,
                        String title,
                        String content,
                        String summary,
                        boolean minorEdit,
                        ServiceContext serviceContext)
                 throws PortalException
Throws:
PortalException

addPage

public WikiPage addPage(long nodeId,
                        String title,
                        String content,
                        String summary,
                        boolean minorEdit,
                        String format,
                        String parentTitle,
                        String redirectTitle,
                        ServiceContext serviceContext)
                 throws PortalException
Throws:
PortalException

addPageAttachment

public void addPageAttachment(long nodeId,
                              String title,
                              String fileName,
                              File file,
                              String mimeType)
                       throws PortalException
Throws:
PortalException

addPageAttachment

public void addPageAttachment(long nodeId,
                              String title,
                              String fileName,
                              InputStream inputStream,
                              String mimeType)
                       throws PortalException
Throws:
PortalException

addPageAttachments

public void addPageAttachments(long nodeId,
                               String title,
                               List<ObjectValuePair<String,InputStream>> inputStreamOVPs)
                        throws PortalException
Throws:
PortalException

addTempFileEntry

public void addTempFileEntry(long nodeId,
                             String folderName,
                             String fileName,
                             InputStream inputStream,
                             String mimeType)
                      throws PortalException
Throws:
PortalException

addTempPageAttachment

@Deprecated
public void addTempPageAttachment(long nodeId,
                                             String fileName,
                                             String tempFolderName,
                                             InputStream inputStream,
                                             String mimeType)
                           throws PortalException
Deprecated. As of 7.0.0 replaced by addTempFileEntry(long, String, String, InputStream, String)

Throws:
PortalException

changeNode

public void changeNode(long nodeId,
                       String title,
                       long newNodeId,
                       ServiceContext serviceContext)
                throws PortalException
Throws:
PortalException

changeParent

public void changeParent(long nodeId,
                         String title,
                         String newParentTitle,
                         ServiceContext serviceContext)
                  throws PortalException
Throws:
PortalException

copyPageAttachments

public void copyPageAttachments(long templateNodeId,
                                String templateTitle,
                                long nodeId,
                                String title)
                         throws PortalException
Throws:
PortalException

deletePage

public void deletePage(long nodeId,
                       String title)
                throws PortalException
Throws:
PortalException

deletePage

@Deprecated
public void deletePage(long nodeId,
                                  String title,
                                  double version)
                throws PortalException
Deprecated. As of 6.2.0 replaced by discardDraft(long, String, double)

Throws:
PortalException

deletePageAttachment

public void deletePageAttachment(long nodeId,
                                 String title,
                                 String fileName)
                          throws PortalException
Throws:
PortalException

deletePageAttachments

public void deletePageAttachments(long nodeId,
                                  String title)
                           throws PortalException
Throws:
PortalException

deleteTempFileEntry

public void deleteTempFileEntry(long nodeId,
                                String folderName,
                                String fileName)
                         throws PortalException
Throws:
PortalException

deleteTrashPageAttachments

public void deleteTrashPageAttachments(long nodeId,
                                       String title)
                                throws PortalException
Throws:
PortalException

discardDraft

public void discardDraft(long nodeId,
                         String title,
                         double version)
                  throws PortalException
Throws:
PortalException

fetchPage

public WikiPage fetchPage(long nodeId,
                          String title,
                          double version)
                   throws PortalException
Throws:
PortalException

getChildren

public List<WikiPage> getChildren(long groupId,
                                  long nodeId,
                                  boolean head,
                                  String parentTitle)
                           throws PortalException
Throws:
PortalException

getDraftPage

public WikiPage getDraftPage(long nodeId,
                             String title)
                      throws PortalException
Throws:
PortalException

getNodePages

public List<WikiPage> getNodePages(long nodeId,
                                   int max)
                            throws PortalException
Throws:
PortalException

getNodePagesRSS

@Deprecated
public String getNodePagesRSS(long nodeId,
                                         int max,
                                         String type,
                                         double version,
                                         String displayStyle,
                                         String feedURL,
                                         String entryURL)
                       throws PortalException
Deprecated. As of 6.2.0, replaced by getNodePagesRSS(long, int, String, double, String, String, String, String)

Throws:
PortalException

getNodePagesRSS

public String getNodePagesRSS(long nodeId,
                              int max,
                              String type,
                              double version,
                              String displayStyle,
                              String feedURL,
                              String entryURL,
                              String attachmentURLPrefix)
                       throws PortalException
Throws:
PortalException

getOrphans

public List<WikiPage> getOrphans(long groupId,
                                 long nodeId)
                          throws PortalException
Throws:
PortalException

getPage

public WikiPage getPage(long groupId,
                        long nodeId,
                        String title)
                 throws PortalException
Throws:
PortalException

getPage

public WikiPage getPage(long nodeId,
                        String title)
                 throws PortalException
Throws:
PortalException

getPage

public WikiPage getPage(long nodeId,
                        String title,
                        Boolean head)
                 throws PortalException
Throws:
PortalException

getPage

public WikiPage getPage(long nodeId,
                        String title,
                        double version)
                 throws PortalException
Throws:
PortalException

getPages

public List<WikiPage> getPages(long groupId,
                               long nodeId,
                               boolean head,
                               int status,
                               int start,
                               int end,
                               OrderByComparator<WikiPage> obc)
                        throws PortalException
Throws:
PortalException

getPages

public List<WikiPage> getPages(long groupId,
                               long userId,
                               long nodeId,
                               int status,
                               int start,
                               int end)
                        throws PortalException
Throws:
PortalException

getPagesCount

public int getPagesCount(long groupId,
                         long nodeId,
                         boolean head)
                  throws PortalException
Throws:
PortalException

getPagesCount

public int getPagesCount(long groupId,
                         long userId,
                         long nodeId,
                         int status)
                  throws PortalException
Throws:
PortalException

getPagesRSS

@Deprecated
public String getPagesRSS(long companyId,
                                     long nodeId,
                                     String title,
                                     int max,
                                     String type,
                                     double version,
                                     String displayStyle,
                                     String feedURL,
                                     String entryURL,
                                     Locale locale)
                   throws PortalException
Deprecated. As of 6.2.0, replaced by getPagesRSS(long, long, String, int, String, double, String, String, String, String, java.util.Locale)

Throws:
PortalException

getPagesRSS

public String getPagesRSS(long companyId,
                          long nodeId,
                          String title,
                          int max,
                          String type,
                          double version,
                          String displayStyle,
                          String feedURL,
                          String entryURL,
                          String attachmentURLPrefix,
                          Locale locale)
                   throws PortalException
Throws:
PortalException

getRecentChanges

public List<WikiPage> getRecentChanges(long groupId,
                                       long nodeId,
                                       int start,
                                       int end)
                                throws PortalException
Throws:
PortalException

getRecentChangesCount

public int getRecentChangesCount(long groupId,
                                 long nodeId)
                          throws PortalException
Throws:
PortalException

getTempFileNames

public String[] getTempFileNames(long nodeId,
                                 String folderName)
                          throws PortalException
Throws:
PortalException

movePage

@Deprecated
public void movePage(long nodeId,
                                String title,
                                String newTitle,
                                ServiceContext serviceContext)
              throws PortalException
Deprecated. As of 6.2.0, replaced by renamePage(long, String, String, ServiceContext) *

Throws:
PortalException

movePageAttachmentToTrash

public FileEntry movePageAttachmentToTrash(long nodeId,
                                           String title,
                                           String fileName)
                                    throws PortalException
Throws:
PortalException

movePageToTrash

public WikiPage movePageToTrash(long nodeId,
                                String title)
                         throws PortalException
Throws:
PortalException

movePageToTrash

public WikiPage movePageToTrash(long nodeId,
                                String title,
                                double version)
                         throws PortalException
Throws:
PortalException

renamePage

public void renamePage(long nodeId,
                       String title,
                       String newTitle,
                       ServiceContext serviceContext)
                throws PortalException
Throws:
PortalException

restorePageAttachmentFromTrash

public void restorePageAttachmentFromTrash(long nodeId,
                                           String title,
                                           String fileName)
                                    throws PortalException
Throws:
PortalException

restorePageFromTrash

public void restorePageFromTrash(long resourcePrimKey)
                          throws PortalException
Throws:
PortalException

revertPage

public WikiPage revertPage(long nodeId,
                           String title,
                           double version,
                           ServiceContext serviceContext)
                    throws PortalException
Throws:
PortalException

subscribePage

public void subscribePage(long nodeId,
                          String title)
                   throws PortalException
Throws:
PortalException

unsubscribePage

public void unsubscribePage(long nodeId,
                            String title)
                     throws PortalException
Throws:
PortalException

updatePage

public WikiPage updatePage(long nodeId,
                           String title,
                           double version,
                           String content,
                           String summary,
                           boolean minorEdit,
                           String format,
                           String parentTitle,
                           String redirectTitle,
                           ServiceContext serviceContext)
                    throws PortalException
Throws:
PortalException

exportToRSS

protected String exportToRSS(long companyId,
                             String name,
                             String description,
                             String type,
                             double version,
                             String displayStyle,
                             String feedURL,
                             String entryURL,
                             String attachmentURLPrefix,
                             List<WikiPage> pages,
                             boolean diff,
                             Locale locale)
                      throws PortalException
Throws:
PortalException

Liferay 7.0-ce-m3