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.lar.StagedModelDataHandler;
020    import com.liferay.portal.kernel.poller.PollerProcessor;
021    import com.liferay.portal.kernel.pop.MessageListener;
022    import com.liferay.portal.kernel.portletdisplaytemplate.PortletDisplayTemplateHandler;
023    import com.liferay.portal.kernel.search.Indexer;
024    import com.liferay.portal.kernel.search.OpenSearch;
025    import com.liferay.portal.kernel.servlet.URLEncoder;
026    import com.liferay.portal.kernel.trash.TrashHandler;
027    import com.liferay.portal.kernel.webdav.WebDAVStorage;
028    import com.liferay.portal.kernel.workflow.WorkflowHandler;
029    import com.liferay.portal.kernel.xmlrpc.Method;
030    import com.liferay.portal.security.permission.PermissionPropagator;
031    import com.liferay.portlet.ControlPanelEntry;
032    import com.liferay.portlet.asset.model.AssetRendererFactory;
033    import com.liferay.portlet.expando.model.CustomAttributesDisplay;
034    import com.liferay.portlet.social.model.SocialActivityInterpreter;
035    import com.liferay.portlet.social.model.SocialRequestInterpreter;
036    
037    import java.util.List;
038    import java.util.Locale;
039    import java.util.Map;
040    import java.util.ResourceBundle;
041    
042    import javax.portlet.Portlet;
043    import javax.portlet.PreferencesValidator;
044    
045    import javax.servlet.ServletContext;
046    
047    /**
048     * @author Brian Wing Shun Chan
049     */
050    public interface PortletBag extends Cloneable {
051    
052            public Object clone();
053    
054            public List<AssetRendererFactory> getAssetRendererFactoryInstances();
055    
056            public List<AtomCollectionAdapter<?>> getAtomCollectionAdapterInstances();
057    
058            public ConfigurationAction getConfigurationActionInstance();
059    
060            public ControlPanelEntry getControlPanelEntryInstance();
061    
062            public List<CustomAttributesDisplay> getCustomAttributesDisplayInstances();
063    
064            public FriendlyURLMapper getFriendlyURLMapperInstance();
065    
066            public List<Indexer> getIndexerInstances();
067    
068            public OpenSearch getOpenSearchInstance();
069    
070            public PermissionPropagator getPermissionPropagatorInstance();
071    
072            public PollerProcessor getPollerProcessorInstance();
073    
074            public MessageListener getPopMessageListenerInstance();
075    
076            public PortletDataHandler getPortletDataHandlerInstance();
077    
078            public PortletDisplayTemplateHandler
079                    getPortletDisplayTemplateHandlerInstance();
080    
081            public Portlet getPortletInstance();
082    
083            public PortletLayoutListener getPortletLayoutListenerInstance();
084    
085            public String getPortletName();
086    
087            public PreferencesValidator getPreferencesValidatorInstance();
088    
089            public ResourceBundle getResourceBundle(Locale locale);
090    
091            public Map<String, ResourceBundle> getResourceBundles();
092    
093            public ServletContext getServletContext();
094    
095            public SocialActivityInterpreter getSocialActivityInterpreterInstance();
096    
097            public SocialRequestInterpreter getSocialRequestInterpreterInstance();
098    
099            public List<StagedModelDataHandler<?>> getStagedModelDataHandlerInstances();
100    
101            public List<TrashHandler> getTrashHandlerInstances();
102    
103            public URLEncoder getURLEncoderInstance();
104    
105            public WebDAVStorage getWebDAVStorageInstance();
106    
107            public List<WorkflowHandler> getWorkflowHandlerInstances();
108    
109            public Method getXmlRpcMethodInstance();
110    
111            public void setPortletInstance(Portlet portletInstance);
112    
113            public void setPortletName(String portletName);
114    
115    }