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.util.ObjectValuePair;
28 import com.liferay.portal.kernel.zip.ZipReader;
29 import com.liferay.portal.kernel.zip.ZipWriter;
30 import com.liferay.portlet.messageboards.model.MBMessage;
31 import com.liferay.portlet.ratings.model.RatingsEntry;
32
33 import java.io.InputStream;
34 import java.io.Serializable;
35
36 import java.util.Date;
37 import java.util.List;
38 import java.util.Map;
39 import java.util.Set;
40
41
53 public interface PortletDataContext extends Serializable {
54
55 public static final String ROOT_PATH_GROUPS = "/groups/";
56
57 public static final String ROOT_PATH_LAYOUTS = "/layouts/";
58
59 public static final String ROOT_PATH_PORTLETS = "/portlets/";
60
61 public void addComments(Class<?> classObj, long classPK)
62 throws SystemException;
63
64 public void addComments(
65 String className, long classPK, List<MBMessage> messages);
66
67 public boolean addPrimaryKey(Class<?> classObj, String primaryKey);
68
69 public void addRatingsEntries(Class<?> classObj, long classPK)
70 throws SystemException;
71
72 public void addRatingsEntries(
73 String className, long classPK, List<RatingsEntry> entries);
74
75 public void addTagsEntries(Class<?> classObj, long classPK)
76 throws PortalException, SystemException;
77
78 public void addTagsEntries(String className, long classPK, String[] values);
79
80 public void addZipEntry(String path, byte[] bytes) throws SystemException;
81
82 public void addZipEntry(String path, InputStream is) throws SystemException;
83
84 public void addZipEntry(String path, Object object) throws SystemException;
85
86 public void addZipEntry(String path, String s) throws SystemException;
87
88 public void addZipEntry(String name, StringBuilder sb)
89 throws SystemException;
90
91 public Object fromXML(byte[] bytes);
92
93 public Object fromXML(String xml);
94
95 public boolean getBooleanParameter(String namespace, String name);
96
97 public Map<String, List<MBMessage>> getComments();
98
99 public long getCompanyId();
100
101 public String getDataStrategy();
102
103 public Date getEndDate();
104
105 public long getGroupId();
106
107 public long getImportGroupId();
108
109 public String getImportLayoutPath(long layoutId);
110
111 public String getImportPortletPath(String portletId);
112
113 public String getImportRootPath();
114
115 public String getLayoutPath(long layoutId);
116
117 public Map<?, ?> getNewPrimaryKeysMap(Class<?> classObj);
118
119 public long getOldPlid();
120
121 public Map<String, String[]> getParameterMap();
122
123 public long getPlid();
124
125 public String getPortletPath(String portletId);
126
127 public Set<String> getPrimaryKeys();
128
129 public Map<String, List<RatingsEntry>> getRatingsEntries();
130
131 public String getRootPath();
132
133 public Date getStartDate();
134
135 public Map<String, String[]> getTagsEntries();
136
137 public String[] getTagsEntries(Class<?> classObj, long classPK);
138
139 public String[] getTagsEntries(String className, long classPK);
140
141 public long getUserId(String userUuid) throws SystemException;
142
143 public UserIdStrategy getUserIdStrategy() throws SystemException;
144
145 public Map<String, byte[]> getZipEntries();
146
147 public byte[] getZipEntryAsByteArray(String path);
148
149 public Object getZipEntryAsObject(String path);
150
151 public String getZipEntryAsString(String path);
152
153 public Map<String, List<ObjectValuePair<String, byte[]>>>
154 getZipFolderEntries();
155
156 public List<ObjectValuePair<String, byte[]>> getZipFolderEntries(
157 String path);
158
159 public ZipReader getZipReader();
160
161 public ZipWriter getZipWriter();
162
163 public boolean hasDateRange();
164
165 public boolean hasNotUniquePerLayout(String portletId);
166
167 public boolean hasPrimaryKey(Class<?> classObj, String primaryKey);
168
169 public void importComments(
170 Class<?> classObj, long classPK, long newClassPK, long groupId)
171 throws PortalException, SystemException;
172
173 public void importRatingsEntries(
174 Class<?> classObj, long classPK, long newClassPK)
175 throws PortalException, SystemException;
176
177 public boolean isPathNotProcessed(String path);
178
179 public boolean isWithinDateRange(Date modifiedDate);
180
181 public void putNotUniquePerLayout(String portletId);
182
183 public void setImportGroupId(long importGroupId);
184
185 public void setOldPlid(long oldPlid);
186
187 public void setPlid(long plid);
188
189 public String toXML(Object object);
190
191 }