1 /* 2 * Copyright (C) 2003-2010 eXo Platform SAS. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Affero General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, see<http://www.gnu.org/licenses/>. 16 */ 17 package org.exoplatform.social.core.space.spi; 18 19 import org.exoplatform.container.component.ComponentPlugin; 20 import org.exoplatform.social.core.space.SpaceApplicationConfigPlugin; 21 import org.exoplatform.social.core.space.SpaceTemplate; 22 import org.exoplatform.social.core.space.SpaceTemplateConfigPlugin; 23 import org.exoplatform.social.core.space.SpaceException; 24 import org.exoplatform.social.core.space.model.Space; 25 26 /** 27 * Handler for working with space applications: install, activate, deactivate, uninstall... 28 * 29 * @author <a href="mailto:tungcnw@gmail.com">dang.tung</a> 30 * @author <a href="http://hoatle.net">hoatle (hoatlevan at gmail dot com)</a> 31 * @since Oct 17, 2008 32 */ 33 34 public interface SpaceApplicationHandler extends ComponentPlugin { 35 36 /** 37 * Initializes home space applications and space applications. 38 * 39 * @param space 40 * @param spaceApplicationConfigPlugin 41 * @throws SpaceException 42 * @since 1.2.0-GA 43 */ 44 // @Deprecated 45 // public void initApps(Space space, SpaceApplicationConfigPlugin spaceApplicationConfigPlugin) throws SpaceException; 46 47 /** 48 * Initializes home space applications and space applications. 49 * 50 * @param space 51 * @param spaceTemplate 52 * @throws SpaceException 53 * @since 1.2.0-GA 54 */ 55 public void initApps(Space space, SpaceTemplate spaceTemplate) throws SpaceException; 56 57 /** 58 * De-initializes a space application. 59 * 60 * @param space 61 * @throws SpaceException 62 */ 63 public void deInitApp(Space space) throws SpaceException; 64 65 /** 66 * Installs an application to a space. 67 * 68 * @param space 69 * @param appId 70 * @throws SpaceException 71 */ 72 public void installApplication(Space space, String appId) throws SpaceException; 73 74 /** 75 * Activates an installed application in a space. 76 * 77 * @param space 78 * @param appId 79 * @throws SpaceException 80 */ 81 public void activateApplication(Space space, String appId, String appName) throws SpaceException; 82 83 /** 84 * Deactivates an installed application in a space. 85 * 86 * @param space 87 * @param appId 88 * @throws SpaceException 89 */ 90 public void deactiveApplication(Space space, String appId) throws SpaceException; 91 92 /** 93 * Removes an application in a space. 94 * 95 * @param space 96 * @param appId 97 * @throws SpaceException 98 */ 99 public void removeApplication(Space space, String appId, String appName) throws SpaceException; 100 101 /** 102 * Remove all applications in a space. 103 * 104 * @param space 105 * @throws SpaceException 106 */ 107 public void removeApplications(Space space) throws SpaceException; 108 109 /** 110 * Gets name. 111 * 112 * @return 113 */ 114 public String getName(); 115 116 }