1
22
23 package com.liferay.portlet.journal.service.impl;
24
25 import com.liferay.portal.PortalException;
26 import com.liferay.portal.SystemException;
27 import com.liferay.portal.security.permission.ActionKeys;
28 import com.liferay.portlet.journal.model.JournalFeed;
29 import com.liferay.portlet.journal.service.base.JournalFeedServiceBaseImpl;
30 import com.liferay.portlet.journal.service.permission.JournalFeedPermission;
31 import com.liferay.portlet.journal.service.permission.JournalPermission;
32
33
39 public class JournalFeedServiceImpl extends JournalFeedServiceBaseImpl {
40
41 public JournalFeed addFeed(
42 long groupId, String feedId, boolean autoFeedId, String name,
43 String description, String type, String structureId,
44 String templateId, String rendererTemplateId, int delta,
45 String orderByCol, String orderByType,
46 String targetLayoutFriendlyUrl, String targetPortletId,
47 String contentField, String feedType, double feedVersion,
48 boolean addCommunityPermissions, boolean addGuestPermissions)
49 throws PortalException, SystemException {
50
51 JournalPermission.check(
52 getPermissionChecker(), groupId, ActionKeys.ADD_FEED);
53
54 return journalFeedLocalService.addFeed(
55 getUserId(), groupId, feedId, autoFeedId, name, description, type,
56 structureId, templateId, rendererTemplateId, delta, orderByCol,
57 orderByType, targetLayoutFriendlyUrl, targetPortletId, contentField,
58 feedType, feedVersion, addCommunityPermissions,
59 addGuestPermissions);
60 }
61
62 public JournalFeed addFeed(
63 long groupId, String feedId, boolean autoFeedId, String name,
64 String description, String type, String structureId,
65 String templateId, String rendererTemplateId, int delta,
66 String orderByCol, String orderByType,
67 String targetLayoutFriendlyUrl, String targetPortletId,
68 String contentField, String feedType, double feedVersion,
69 String[] communityPermissions, String[] guestPermissions)
70 throws PortalException, SystemException {
71
72 JournalPermission.check(
73 getPermissionChecker(), groupId, ActionKeys.ADD_FEED);
74
75 return journalFeedLocalService.addFeed(
76 getUserId(), groupId, feedId, autoFeedId, name, description, type,
77 structureId, templateId, rendererTemplateId, delta, orderByCol,
78 orderByType, targetLayoutFriendlyUrl, targetPortletId, contentField,
79 feedType, feedVersion, communityPermissions, guestPermissions);
80 }
81
82 public void deleteFeed(long groupId, long feedId)
83 throws PortalException, SystemException {
84
85 JournalFeedPermission.check(
86 getPermissionChecker(), feedId, ActionKeys.DELETE);
87
88 journalFeedLocalService.deleteFeed(feedId);
89 }
90
91 public void deleteFeed(long groupId, String feedId)
92 throws PortalException, SystemException {
93
94 JournalFeedPermission.check(
95 getPermissionChecker(), groupId, feedId, ActionKeys.DELETE);
96
97 journalFeedLocalService.deleteFeed(groupId, feedId);
98 }
99
100 public JournalFeed getFeed(long groupId, long feedId)
101 throws PortalException, SystemException {
102
103 JournalFeedPermission.check(
104 getPermissionChecker(), feedId, ActionKeys.VIEW);
105
106 return journalFeedLocalService.getFeed(feedId);
107 }
108
109 public JournalFeed getFeed(long groupId, String feedId)
110 throws PortalException, SystemException {
111
112 JournalFeedPermission.check(
113 getPermissionChecker(), groupId, feedId, ActionKeys.VIEW);
114
115 return journalFeedLocalService.getFeed(groupId, feedId);
116 }
117
118 public JournalFeed updateFeed(
119 long groupId, String feedId, String name, String description,
120 String type, String structureId, String templateId,
121 String rendererTemplateId, int delta, String orderByCol,
122 String orderByType, String targetLayoutFriendlyUrl,
123 String targetPortletId, String contentField, String feedType,
124 double feedVersion)
125 throws PortalException, SystemException {
126
127 JournalFeedPermission.check(
128 getPermissionChecker(), groupId, feedId, ActionKeys.UPDATE);
129
130 return journalFeedLocalService.updateFeed(
131 groupId, feedId, name, description, type, structureId, templateId,
132 rendererTemplateId, delta, orderByCol, orderByType,
133 targetLayoutFriendlyUrl, targetPortletId, contentField, feedType,
134 feedVersion);
135 }
136
137 }