001
014
015 package com.liferay.portal.kernel.lar;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.kernel.util.KeyValuePair;
020 import com.liferay.portal.kernel.xml.Element;
021 import com.liferay.portal.kernel.zip.ZipReader;
022 import com.liferay.portal.kernel.zip.ZipWriter;
023 import com.liferay.portal.model.ClassedModel;
024 import com.liferay.portal.model.Lock;
025 import com.liferay.portal.service.ServiceContext;
026 import com.liferay.portlet.expando.model.ExpandoColumn;
027 import com.liferay.portlet.messageboards.model.MBMessage;
028 import com.liferay.portlet.ratings.model.RatingsEntry;
029
030 import java.io.InputStream;
031 import java.io.Serializable;
032
033 import java.util.Date;
034 import java.util.List;
035 import java.util.Map;
036 import java.util.Set;
037
038
047 public interface PortletDataContext extends Serializable {
048
049 public static final String ROOT_PATH_GROUPS = "/groups/";
050
051 public static final String ROOT_PATH_LAYOUTS = "/layouts/";
052
053 public static final String ROOT_PATH_PORTLETS = "/portlets/";
054
055 public void addAssetCategories(Class<?> clazz, long classPK)
056 throws SystemException;
057
058 public void addAssetCategories(
059 String className, long classPK, long[] assetCategoryIds);
060
061 public void addAssetTags(Class<?> clazz, long classPK)
062 throws SystemException;
063
064 public void addAssetTags(
065 String className, long classPK, String[] assetTagNames);
066
067 public void addClassedModel(
068 Element element, String path, ClassedModel classedModel,
069 String namespace)
070 throws PortalException, SystemException;
071
072 public void addComments(Class<?> clazz, long classPK)
073 throws SystemException;
074
075 public void addComments(
076 String className, long classPK, List<MBMessage> messages);
077
078 public void addExpando(
079 Element element, String path, ClassedModel classedModel)
080 throws PortalException, SystemException;
081
082 public void addLocks(Class<?> clazz, String key)
083 throws PortalException, SystemException;
084
085 public void addLocks(String className, String key, Lock lock);
086
087 public void addPermissions(Class<?> clazz, long classPK)
088 throws PortalException, SystemException;
089
090 public void addPermissions(String resourceName, long resourcePK)
091 throws PortalException, SystemException;
092
093 public void addPermissions(
094 String resourceName, long resourcePK, List<KeyValuePair> permissions);
095
096 public boolean addPrimaryKey(Class<?> clazz, String primaryKey);
097
098 public void addRatingsEntries(Class<?> clazz, long classPK)
099 throws SystemException;
100
101 public void addRatingsEntries(
102 String className, long classPK, List<RatingsEntry> ratingsEntries);
103
104 public void addZipEntry(String path, byte[] bytes) throws SystemException;
105
106 public void addZipEntry(String path, InputStream is) throws SystemException;
107
108 public void addZipEntry(String path, Object object) throws SystemException;
109
110 public void addZipEntry(String path, String s) throws SystemException;
111
112 public void addZipEntry(String name, StringBuilder sb)
113 throws SystemException;
114
115 public ServiceContext createServiceContext(
116 Element element, ClassedModel classedModel, String namespace);
117
118 public ServiceContext createServiceContext(
119 String path, ClassedModel classedModel, String namespace);
120
121 public Object fromXML(byte[] bytes);
122
123 public Object fromXML(String xml);
124
125 public long[] getAssetCategoryIds(Class<?> clazz, long classPK);
126
127 public Map<String, long[]> getAssetCategoryIdsMap();
128
129 public Map<String, String[]> getAssetCategoryUuidsMap();
130
131 public Map<String, String[]> getAssetLinkUuidsMap();
132
133 public String[] getAssetTagNames(Class<?> clazz, long classPK);
134
135 public String[] getAssetTagNames(String className, long classPK);
136
137 public Map<String, String[]> getAssetTagNamesMap();
138
139 public boolean getBooleanParameter(String namespace, String name);
140
141 public ClassLoader getClassLoader();
142
143 public Map<String, List<MBMessage>> getComments();
144
145 public long getCompanyId();
146
147 public String getDataStrategy();
148
149 public Date getEndDate();
150
151 public Map<String, List<ExpandoColumn>> getExpandoColumns();
152
153 public long getGroupId();
154
155 public String getLayoutPath(long layoutId);
156
157 public Map<String, Lock> getLocks();
158
159 public Map<?, ?> getNewPrimaryKeysMap(Class<?> clazz);
160
161 public Map<?, ?> getNewPrimaryKeysMap(String className);
162
163 public long getOldPlid();
164
165 public Map<String, String[]> getParameterMap();
166
167 public Map<String, List<KeyValuePair>> getPermissions();
168
169 public long getPlid();
170
171 public String getPortletPath(String portletId);
172
173 public Set<String> getPrimaryKeys();
174
175 public Map<String, List<RatingsEntry>> getRatingsEntries();
176
177 public String getRootPath();
178
179 public long getScopeGroupId();
180
181 public String getScopeLayoutUuid();
182
183 public String getScopeType();
184
185 public long getSourceGroupId();
186
187 public String getSourceLayoutPath(long layoutId);
188
189 public String getSourcePortletPath(String portletId);
190
191 public String getSourceRootPath();
192
193 public Date getStartDate();
194
195 public long getUserId(String userUuid) throws SystemException;
196
197 public UserIdStrategy getUserIdStrategy() throws SystemException;
198
199 public List<String> getZipEntries();
200
201 public byte[] getZipEntryAsByteArray(String path);
202
203 public InputStream getZipEntryAsInputStream(String path);
204
205 public Object getZipEntryAsObject(String path);
206
207 public String getZipEntryAsString(String path);
208
209 public List<String> getZipFolderEntries();
210
211 public List<String> getZipFolderEntries(String path);
212
213 public ZipReader getZipReader();
214
215 public ZipWriter getZipWriter();
216
217 public boolean hasDateRange();
218
219 public boolean hasNotUniquePerLayout(String dataKey);
220
221 public boolean hasPrimaryKey(Class<?> clazz, String primaryKey);
222
223 public void importClassedModel(
224 ClassedModel classedModel, ClassedModel newClassedModel,
225 String namespace)
226 throws PortalException, SystemException;
227
228 public void importComments(
229 Class<?> clazz, long classPK, long newClassPK, long groupId)
230 throws PortalException, SystemException;
231
232 public void importLocks(Class<?> clazz, String key, String newKey)
233 throws PortalException, SystemException;
234
235 public void importPermissions(Class<?> clazz, long classPK, long newClassPK)
236 throws PortalException, SystemException;
237
238 public void importPermissions(
239 String resourceObj, long resourcePK, long newResourcePK)
240 throws PortalException, SystemException;
241
242 public void importRatingsEntries(
243 Class<?> clazz, long classPK, long newClassPK)
244 throws PortalException, SystemException;
245
246 public boolean isDataStrategyMirror();
247
248 public boolean isDataStrategyMirrorWithOverwritting();
249
250 public boolean isPathNotProcessed(String path);
251
252 public boolean isPerformDirectBinaryImport();
253
254 public boolean isPrivateLayout();
255
256 public boolean isWithinDateRange(Date modifiedDate);
257
258 public void putNotUniquePerLayout(String dataKey);
259
260 public void setClassLoader(ClassLoader classLoader);
261
262 public void setGroupId(long groupId);
263
264 public void setOldPlid(long oldPlid);
265
266 public void setPlid(long plid);
267
268 public void setPortetDataContextListener(
269 PortletDataContextListener portletDataContextListener);
270
271 public void setPrivateLayout(boolean privateLayout);
272
273 public void setScopeGroupId(long scopeGroupId);
274
275 public void setScopeLayoutUuid(String scopeLayoutUuid);
276
277 public void setScopeType(String scopeType);
278
279 public void setSourceGroupId(long sourceGroupId);
280
281 public void setStartDate(Date startDate);
282
283 public String toXML(Object object);
284
285 }