1
22
23 package com.liferay.portal.lar;
24
25 import com.liferay.portal.PortalException;
26 import com.liferay.portal.SystemException;
27 import com.liferay.portal.kernel.zip.ZipReader;
28 import com.liferay.portal.kernel.zip.ZipWriter;
29 import com.liferay.portlet.messageboards.model.MBMessage;
30 import com.liferay.portlet.ratings.model.RatingsEntry;
31
32 import java.io.InputStream;
33 import java.io.Serializable;
34
35 import java.util.Date;
36 import java.util.List;
37 import java.util.Map;
38 import java.util.Set;
39
40
51 public interface PortletDataContext extends Serializable {
52
53 public static final String ROOT_PATH_GROUPS = "/groups/";
54
55 public static final String ROOT_PATH_LAYOUTS = "/layouts/";
56
57 public static final String ROOT_PATH_PORTLETS = "/portlets/";
58
59 public void addComments(Class<?> classObj, long classPK)
60 throws SystemException;
61
62 public void addComments(
63 String className, long classPK, List<MBMessage> messages);
64
65 public boolean addPrimaryKey(Class<?> classObj, String primaryKey);
66
67 public void addRatingsEntries(Class<?> classObj, long classPK)
68 throws SystemException;
69
70 public void addRatingsEntries(
71 String className, long classPK, List<RatingsEntry> ratingsEntries);
72
73 public void addTagsCategories(Class<?> classObj, long classPK)
74 throws SystemException;
75
76 public void addTagsCategories(
77 String className, long classPK, String[] tagsCategories);
78
79 public void addTagsEntries(Class<?> classObj, long classPK)
80 throws SystemException;
81
82 public void addTagsEntries(
83 String className, long classPK, String[] tagsEntries);
84
85 public void addZipEntry(String path, byte[] bytes) throws SystemException;
86
87 public void addZipEntry(String path, InputStream is) throws SystemException;
88
89 public void addZipEntry(String path, Object object) throws SystemException;
90
91 public void addZipEntry(String path, String s) throws SystemException;
92
93 public void addZipEntry(String name, StringBuilder sb)
94 throws SystemException;
95
96 public Object fromXML(byte[] bytes);
97
98 public Object fromXML(String xml);
99
100 public boolean getBooleanParameter(String namespace, String name);
101
102 public ClassLoader getClassLoader();
103
104 public Map<String, List<MBMessage>> getComments();
105
106 public long getCompanyId();
107
108 public String getDataStrategy();
109
110 public Date getEndDate();
111
112 public long getGroupId();
113
114 public String getLayoutPath(long layoutId);
115
116 public Map<?, ?> getNewPrimaryKeysMap(Class<?> classObj);
117
118 public long getOldPlid();
119
120 public Map<String, String[]> getParameterMap();
121
122 public long getPlid();
123
124 public String getPortletPath(String portletId);
125
126 public Set<String> getPrimaryKeys();
127
128 public Map<String, List<RatingsEntry>> getRatingsEntries();
129
130 public String getRootPath();
131
132 public long getScopeGroupId();
133
134 public long getScopeLayoutId();
135
136 public long getSourceGroupId();
137
138 public String getSourceLayoutPath(long layoutId);
139
140 public String getSourcePortletPath(String portletId);
141
142 public String getSourceRootPath();
143
144 public Date getStartDate();
145
146 public Map<String, String[]> getTagsCategories();
147
148 public String[] getTagsCategories(Class<?> classObj, long classPK);
149
150 public Map<String, String[]> getTagsEntries();
151
152 public String[] getTagsEntries(Class<?> classObj, long classPK);
153
154 public String[] getTagsEntries(String className, long classPK);
155
156 public long getUserId(String userUuid) throws SystemException;
157
158 public UserIdStrategy getUserIdStrategy() throws SystemException;
159
160 public List<String> getZipEntries();
161
162 public byte[] getZipEntryAsByteArray(String path);
163
164 public InputStream getZipEntryAsInputStream(String path);
165
166 public Object getZipEntryAsObject(String path);
167
168 public String getZipEntryAsString(String path);
169
170 public List<String> getZipFolderEntries();
171
172 public List<String> getZipFolderEntries(String path);
173
174 public ZipReader getZipReader();
175
176 public ZipWriter getZipWriter();
177
178 public boolean hasDateRange();
179
180 public boolean hasNotUniquePerLayout(String dataKey);
181
182 public boolean hasPrimaryKey(Class<?> classObj, String primaryKey);
183
184 public void importComments(
185 Class<?> classObj, long classPK, long newClassPK, long groupId)
186 throws PortalException, SystemException;
187
188 public void importRatingsEntries(
189 Class<?> classObj, long classPK, long newClassPK)
190 throws PortalException, SystemException;
191
192 public boolean isPathNotProcessed(String path);
193
194 public boolean isPrivateLayout();
195
196 public boolean isWithinDateRange(Date modifiedDate);
197
198 public void putNotUniquePerLayout(String dataKey);
199
200 public void setClassLoader(ClassLoader classLoader);
201
202 public void setGroupId(long groupId);
203
204 public void setOldPlid(long oldPlid);
205
206 public void setPlid(long plid);
207
208 public void setPrivateLayout(boolean privateLayout);
209
210 public void setScopeGroupId(long scopeGroupId);
211
212 public void setScopeLayoutId(long scopeLayoutId);
213
214 public void setSourceGroupId(long sourceGroupId);
215
216 public String toXML(Object object);
217
218 }