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