001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.portlet;
016    
017    import com.liferay.portal.kernel.atom.AtomCollectionAdapter;
018    import com.liferay.portal.kernel.lar.PortletDataHandler;
019    import com.liferay.portal.kernel.poller.PollerProcessor;
020    import com.liferay.portal.kernel.pop.MessageListener;
021    import com.liferay.portal.kernel.portletdisplaytemplate.PortletDisplayTemplateHandler;
022    import com.liferay.portal.kernel.search.Indexer;
023    import com.liferay.portal.kernel.search.OpenSearch;
024    import com.liferay.portal.kernel.servlet.URLEncoder;
025    import com.liferay.portal.kernel.trash.TrashHandler;
026    import com.liferay.portal.kernel.webdav.WebDAVStorage;
027    import com.liferay.portal.kernel.workflow.WorkflowHandler;
028    import com.liferay.portal.kernel.xmlrpc.Method;
029    import com.liferay.portal.security.permission.PermissionPropagator;
030    import com.liferay.portlet.ControlPanelEntry;
031    import com.liferay.portlet.asset.model.AssetRendererFactory;
032    import com.liferay.portlet.expando.model.CustomAttributesDisplay;
033    import com.liferay.portlet.social.model.SocialActivityInterpreter;
034    import com.liferay.portlet.social.model.SocialRequestInterpreter;
035    
036    import java.util.List;
037    import java.util.Locale;
038    import java.util.Map;
039    import java.util.ResourceBundle;
040    
041    import javax.portlet.Portlet;
042    import javax.portlet.PreferencesValidator;
043    
044    import javax.servlet.ServletContext;
045    
046    /**
047     * @author Brian Wing Shun Chan
048     */
049    public interface PortletBag extends Cloneable {
050    
051            public Object clone();
052    
053            public List<AssetRendererFactory> getAssetRendererFactoryInstances();
054    
055            public List<AtomCollectionAdapter<?>> getAtomCollectionAdapterInstances();
056    
057            public ConfigurationAction getConfigurationActionInstance();
058    
059            public ControlPanelEntry getControlPanelEntryInstance();
060    
061            public List<CustomAttributesDisplay> getCustomAttributesDisplayInstances();
062    
063            public FriendlyURLMapper getFriendlyURLMapperInstance();
064    
065            public List<Indexer> getIndexerInstances();
066    
067            public OpenSearch getOpenSearchInstance();
068    
069            public PermissionPropagator getPermissionPropagatorInstance();
070    
071            public PollerProcessor getPollerProcessorInstance();
072    
073            public MessageListener getPopMessageListenerInstance();
074    
075            public PortletDataHandler getPortletDataHandlerInstance();
076    
077            public PortletDisplayTemplateHandler
078                    getPortletDisplayTemplateHandlerInstance();
079    
080            public Portlet getPortletInstance();
081    
082            public PortletLayoutListener getPortletLayoutListenerInstance();
083    
084            public String getPortletName();
085    
086            public PreferencesValidator getPreferencesValidatorInstance();
087    
088            public ResourceBundle getResourceBundle(Locale locale);
089    
090            public Map<String, ResourceBundle> getResourceBundles();
091    
092            public ServletContext getServletContext();
093    
094            public SocialActivityInterpreter getSocialActivityInterpreterInstance();
095    
096            public SocialRequestInterpreter getSocialRequestInterpreterInstance();
097    
098            public List<TrashHandler> getTrashHandlerInstances();
099    
100            public URLEncoder getURLEncoderInstance();
101    
102            public WebDAVStorage getWebDAVStorageInstance();
103    
104            public List<WorkflowHandler> getWorkflowHandlerInstances();
105    
106            public Method getXmlRpcMethodInstance();
107    
108            public void setPortletInstance(Portlet portletInstance);
109    
110            public void setPortletName(String portletName);
111    
112    }