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.module.framework;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    
019    import java.io.InputStream;
020    
021    import java.net.URL;
022    
023    import java.util.List;
024    import java.util.Map;
025    
026    /**
027     * @author Raymond Aug??
028     * @author Miguel Pastor
029     */
030    public interface ModuleFramework {
031    
032            public Object addBundle(String location) throws PortalException;
033    
034            public Object addBundle(String location, InputStream inputStream)
035                    throws PortalException;
036    
037            public Map<String, List<URL>> getExtraPackageMap();
038    
039            public List<URL> getExtraPackageURLs();
040    
041            public Object getFramework();
042    
043            public String getState(long bundleId) throws PortalException;
044    
045            public void registerContext(Object context);
046    
047            public void setBundleStartLevel(long bundleId, int startLevel)
048                    throws PortalException;
049    
050            public void startBundle(long bundleId) throws PortalException;
051    
052            public void startBundle(long bundleId, int options) throws PortalException;
053    
054            public void startFramework() throws Exception;
055    
056            public void startRuntime() throws Exception;
057    
058            public void stopBundle(long bundleId) throws PortalException;
059    
060            public void stopBundle(long bundleId, int options) throws PortalException;
061    
062            public void stopFramework() throws Exception;
063    
064            public void stopRuntime() throws Exception;
065    
066            public void uninstallBundle(long bundleId) throws PortalException;
067    
068            public void updateBundle(long bundleId) throws PortalException;
069    
070            public void updateBundle(long bundleId, InputStream inputStream)
071                    throws PortalException;
072    
073    }