001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.kernel.lar;
022:
023: import com.liferay.portal.PortalException;
024: import com.liferay.portal.SystemException;
025: import com.liferay.portal.kernel.zip.ZipReader;
026: import com.liferay.portal.kernel.zip.ZipWriter;
027:
028: import java.io.Serializable;
029:
030: import java.util.List;
031: import java.util.Map;
032: import java.util.Set;
033:
034: /**
035: * <a href="PortletDataContext.java.html"><b><i>View Source</i></b></a>
036: *
037: * <p>
038: * Holds context information that is used during exporting adn importing portlet
039: * data.
040: * </p>
041: *
042: * @author Brian Wing Shun Chan
043: * @author Raymond Augé
044: *
045: */
046: public interface PortletDataContext extends Serializable {
047:
048: public long getCompanyId();
049:
050: public long getGroupId();
051:
052: public long getPlid();
053:
054: public void setPlid(long plid);
055:
056: public Map getParameterMap();
057:
058: public boolean getBooleanParameter(String namespace, String name);
059:
060: public Set getPrimaryKeys();
061:
062: public boolean addPrimaryKey(Class classObj, Object primaryKey);
063:
064: public boolean hasPrimaryKey(Class classObj, Object primaryKey);
065:
066: public Map getComments();
067:
068: public void addComments(Class classObj, Object primaryKey)
069: throws PortalException, SystemException;
070:
071: public void addComments(String className, Object primaryKey,
072: List messages) throws PortalException, SystemException;
073:
074: public void importComments(Class classObj, Object primaryKey,
075: Object newPrimaryKey, long groupId) throws PortalException,
076: SystemException;
077:
078: public Map getRatingsEntries();
079:
080: public void addRatingsEntries(Class classObj, Object primaryKey)
081: throws PortalException, SystemException;
082:
083: public void addRatingsEntries(String className, Object primaryKey,
084: List entries) throws PortalException, SystemException;
085:
086: public void importRatingsEntries(Class classObj, Object primaryKey,
087: Object newPrimaryKey) throws PortalException,
088: SystemException;
089:
090: public String[] getTagsEntries(Class classObj, Object primaryKey);
091:
092: public String[] getTagsEntries(String className, Object primaryKey);
093:
094: public Map getTagsEntries();
095:
096: public void addTagsEntries(Class classObj, Object classPK)
097: throws PortalException, SystemException;
098:
099: public void addTagsEntries(String className, Object classPK,
100: String[] values) throws PortalException, SystemException;
101:
102: public String getDataStrategy();
103:
104: public UserIdStrategy getUserIdStrategy() throws SystemException;
105:
106: public long getUserId(String userUuid) throws SystemException;
107:
108: public ZipReader getZipReader();
109:
110: public ZipWriter getZipWriter();
111:
112: }
|