001    /**
002     * Copyright (c) 2000-present 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    /**
022     * @author Raymond Aug??
023     * @author Miguel Pastor
024     */
025    public interface ModuleFramework {
026    
027            public long addBundle(String location) throws PortalException;
028    
029            public long addBundle(String location, InputStream inputStream)
030                    throws PortalException;
031    
032            public Object getFramework();
033    
034            public String getState(long bundleId) throws PortalException;
035    
036            public void initFramework() throws Exception;
037    
038            public void registerContext(Object context);
039    
040            public void setBundleStartLevel(long bundleId, int startLevel)
041                    throws PortalException;
042    
043            public void startBundle(long bundleId) throws PortalException;
044    
045            public void startBundle(long bundleId, int options) throws PortalException;
046    
047            public void startFramework() throws Exception;
048    
049            public void startRuntime() throws Exception;
050    
051            public void stopBundle(long bundleId) throws PortalException;
052    
053            public void stopBundle(long bundleId, int options) throws PortalException;
054    
055            public void stopFramework(long timeout) throws Exception;
056    
057            public void stopRuntime() throws Exception;
058    
059            public void uninstallBundle(long bundleId) throws PortalException;
060    
061            public void updateBundle(long bundleId) throws PortalException;
062    
063            public void updateBundle(long bundleId, InputStream inputStream)
064                    throws PortalException;
065    
066    }