001
014
015 package com.liferay.portlet.assetpublisher.util;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.model.Group;
020 import com.liferay.portal.model.Layout;
021 import com.liferay.portal.model.User;
022 import com.liferay.portal.security.permission.PermissionChecker;
023 import com.liferay.portal.theme.ThemeDisplay;
024 import com.liferay.portlet.asset.model.AssetEntry;
025 import com.liferay.portlet.asset.model.AssetRendererFactory;
026 import com.liferay.portlet.asset.service.persistence.AssetEntryQuery;
027
028 import java.util.List;
029 import java.util.Locale;
030 import java.util.Map;
031
032 import javax.portlet.PortletPreferences;
033 import javax.portlet.PortletRequest;
034
035
038 public interface AssetPublisher {
039
040 public static final String SCOPE_ID_CHILD_GROUP_PREFIX = "ChildGroup_";
041
042 public static final String SCOPE_ID_GROUP_PREFIX = "Group_";
043
044 public static final String SCOPE_ID_LAYOUT_PREFIX = "Layout_";
045
046 public static final String SCOPE_ID_LAYOUT_UUID_PREFIX = "LayoutUuid_";
047
048 public static final String SCOPE_ID_PARENT_GROUP_PREFIX = "ParentGroup_";
049
050 public void addAndStoreSelection(
051 PortletRequest portletRequest, String className, long classPK,
052 int assetEntryOrder)
053 throws Exception;
054
055 public void addRecentFolderId(
056 PortletRequest portletRequest, String className, long classPK);
057
058 public void addSelection(
059 PortletRequest portletRequest,
060 PortletPreferences portletPreferences, String portletId)
061 throws Exception;
062
063 public void addSelection(
064 ThemeDisplay themeDisplay, PortletPreferences portletPreferences,
065 String portletId, long assetEntryId, int assetEntryOrder,
066 String assetEntryType)
067 throws Exception;
068
069 public void addUserAttributes(
070 User user, String[] customUserAttributeNames,
071 AssetEntryQuery assetEntryQuery)
072 throws Exception;
073
074 public void checkAssetEntries() throws Exception;
075
076 public long[] getAssetCategoryIds(PortletPreferences portletPreferences)
077 throws Exception;
078
079 public List<AssetEntry> getAssetEntries(
080 PortletPreferences portletPreferences, Layout layout,
081 long scopeGroupId, int max, boolean checkPermission)
082 throws PortalException, SystemException;
083
084 public List<AssetEntry> getAssetEntries(
085 PortletRequest portletRequest,
086 PortletPreferences portletPreferences,
087 PermissionChecker permissionChecker, long[] groupIds,
088 long[] assetCategoryIds, String[] assetEntryXmls,
089 String[] assetTagNames, boolean deleteMissingAssetEntries,
090 boolean checkPermission)
091 throws Exception;
092
093 public List<AssetEntry> getAssetEntries(
094 PortletRequest portletRequest,
095 PortletPreferences portletPreferences,
096 PermissionChecker permissionChecker, long[] groupIds,
097 String[] assetEntryXmls, boolean deleteMissingAssetEntries,
098 boolean checkPermission)
099 throws Exception;
100
101 public AssetEntryQuery getAssetEntryQuery(
102 PortletPreferences portletPreferences, long[] scopeGroupIds)
103 throws PortalException, SystemException;
104
105 public String[] getAssetTagNames(
106 PortletPreferences portletPreferences, long scopeGroupId)
107 throws Exception;
108
109 public String getClassName(AssetRendererFactory assetRendererFactory);
110
111 public long[] getClassNameIds(
112 PortletPreferences portletPreferences, long[] availableClassNameIds);
113
114 public Long[] getClassTypeIds(
115 PortletPreferences portletPreferences, String className,
116 Long[] availableClassTypeIds);
117
118 public Map<Locale, String> getEmailAssetEntryAddedBodyMap(
119 PortletPreferences portletPreferences);
120
121 public boolean getEmailAssetEntryAddedEnabled(
122 PortletPreferences portletPreferences);
123
124 public Map<Locale, String> getEmailAssetEntryAddedSubjectMap(
125 PortletPreferences portletPreferences);
126
127 public String getEmailFromAddress(
128 PortletPreferences portletPreferences, long companyId)
129 throws SystemException;
130
131 public String getEmailFromName(
132 PortletPreferences portletPreferences, long companyId)
133 throws SystemException;
134
135 public long getGroupIdFromScopeId(
136 String scopeId, long siteGroupId, boolean privateLayout)
137 throws PortalException, SystemException;
138
139 public long[] getGroupIds(
140 PortletPreferences portletPreferences, long scopeGroupId,
141 Layout layout);
142
143 public long getRecentFolderId(
144 PortletRequest portletRequest, String className);
145
146 public String getScopeId(Group group, long scopeGroupId)
147 throws PortalException, SystemException;
148
149 public boolean isScopeIdSelectable(
150 PermissionChecker permissionChecker, String scopeId,
151 long companyGroupId, Layout layout)
152 throws PortalException, SystemException;
153
154 public boolean isSubscribed(
155 long companyId, long userId, long plid, String portletId)
156 throws PortalException, SystemException;
157
158 public void notifySubscribers(
159 PortletPreferences portletPreferences, long plid, String portletId,
160 List<AssetEntry> assetEntries)
161 throws PortalException, SystemException;
162
163 public void processAssetEntryQuery(
164 User user, PortletPreferences portletPreferences,
165 AssetEntryQuery assetEntryQuery)
166 throws Exception;
167
168 public void registerAssetQueryProcessor(
169 String name, AssetEntryQueryProcessor assetQueryProcessor);
170
171 public void removeAndStoreSelection(
172 List<String> assetEntryUuids, PortletPreferences portletPreferences)
173 throws Exception;
174
175 public void removeRecentFolderId(
176 PortletRequest portletRequest, String className, long classPK);
177
178 public void subscribe(
179 PermissionChecker permissionChecker, long groupId, long plid,
180 String portletId)
181 throws PortalException, SystemException;
182
183 public void unregisterAssetQueryProcessor(
184 String assetQueryProcessorClassName);
185
186 public void unsubscribe(
187 PermissionChecker permissionChecker, long plid, String portletId)
188 throws PortalException, SystemException;
189
190 }