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 List<AssetEntry> getAssetEntries(
077 PortletPreferences portletPreferences, Layout layout,
078 long scopeGroupId, int max, boolean checkPermission)
079 throws PortalException, SystemException;
080
081 public List<AssetEntry> getAssetEntries(
082 PortletRequest portletRequest,
083 PortletPreferences portletPreferences,
084 PermissionChecker permissionChecker, long[] groupIds,
085 long[] assetCategoryIds, String[] assetEntryXmls,
086 String[] assetTagNames, boolean deleteMissingAssetEntries,
087 boolean checkPermission)
088 throws Exception;
089
090 public List<AssetEntry> getAssetEntries(
091 PortletRequest portletRequest,
092 PortletPreferences portletPreferences,
093 PermissionChecker permissionChecker, long[] groupIds,
094 String[] assetEntryXmls, boolean deleteMissingAssetEntries,
095 boolean checkPermission)
096 throws Exception;
097
098 public AssetEntryQuery getAssetEntryQuery(
099 PortletPreferences portletPreferences, long[] scopeGroupIds)
100 throws PortalException, SystemException;
101
102 public String[] getAssetTagNames(
103 PortletPreferences portletPreferences, long scopeGroupId)
104 throws Exception;
105
106 public String getClassName(AssetRendererFactory assetRendererFactory);
107
108 public long[] getClassNameIds(
109 PortletPreferences portletPreferences, long[] availableClassNameIds);
110
111 public Long[] getClassTypeIds(
112 PortletPreferences portletPreferences, String className,
113 Long[] availableClassTypeIds);
114
115 public Map<Locale, String> getEmailAssetEntryAddedBodyMap(
116 PortletPreferences portletPreferences);
117
118 public boolean getEmailAssetEntryAddedEnabled(
119 PortletPreferences portletPreferences);
120
121 public Map<Locale, String> getEmailAssetEntryAddedSubjectMap(
122 PortletPreferences portletPreferences);
123
124 public String getEmailFromAddress(
125 PortletPreferences portletPreferences, long companyId)
126 throws SystemException;
127
128 public String getEmailFromName(
129 PortletPreferences portletPreferences, long companyId)
130 throws SystemException;
131
132 public long getGroupIdFromScopeId(
133 String scopeId, long siteGroupId, boolean privateLayout)
134 throws PortalException, SystemException;
135
136 public long[] getGroupIds(
137 PortletPreferences portletPreferences, long scopeGroupId,
138 Layout layout);
139
140 public long getRecentFolderId(
141 PortletRequest portletRequest, String className);
142
143 public String getScopeId(Group group, long scopeGroupId)
144 throws PortalException, SystemException;
145
146 public boolean isScopeIdSelectable(
147 PermissionChecker permissionChecker, String scopeId,
148 long companyGroupId, Layout layout)
149 throws PortalException, SystemException;
150
151 public boolean isSubscribed(
152 long companyId, long userId, long plid, String portletId)
153 throws PortalException, SystemException;
154
155 public void notifySubscribers(
156 PortletPreferences portletPreferences, long plid, String portletId,
157 List<AssetEntry> assetEntries)
158 throws PortalException, SystemException;
159
160 public void processAssetEntryQuery(
161 User user, PortletPreferences portletPreferences,
162 AssetEntryQuery assetEntryQuery)
163 throws Exception;
164
165 public void registerAssetQueryProcessor(
166 String name, AssetEntryQueryProcessor assetQueryProcessor);
167
168 public void removeAndStoreSelection(
169 List<String> assetEntryUuids, PortletPreferences portletPreferences)
170 throws Exception;
171
172 public void removeRecentFolderId(
173 PortletRequest portletRequest, String className, long classPK);
174
175 public void subscribe(
176 PermissionChecker permissionChecker, long groupId, long plid,
177 String portletId)
178 throws PortalException, SystemException;
179
180 public void unregisterAssetQueryProcessor(
181 String assetQueryProcessorClassName);
182
183 public void unsubscribe(
184 PermissionChecker permissionChecker, long plid, String portletId)
185 throws PortalException, SystemException;
186
187 }