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