| Class | Line # | Actions | |||||
|---|---|---|---|---|---|---|---|
| PackagePlugin | 27 | 7 | 0% | 6 | 1 |
| 1 | /* | |
| 2 | * See the NOTICE file distributed with this work for additional | |
| 3 | * information regarding copyright ownership. | |
| 4 | * | |
| 5 | * This is free software; you can redistribute it and/or modify it | |
| 6 | * under the terms of the GNU Lesser General Public License as | |
| 7 | * published by the Free Software Foundation; either version 2.1 of | |
| 8 | * the License, or (at your option) any later version. | |
| 9 | * | |
| 10 | * This software is distributed in the hope that it will be useful, | |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 13 | * Lesser General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU Lesser General Public | |
| 16 | * License along with this software; if not, write to the Free | |
| 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
| 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
| 19 | */ | |
| 20 | package com.xpn.xwiki.plugin.packaging; | |
| 21 | ||
| 22 | import com.xpn.xwiki.XWikiContext; | |
| 23 | import com.xpn.xwiki.api.Api; | |
| 24 | import com.xpn.xwiki.plugin.XWikiDefaultPlugin; | |
| 25 | import com.xpn.xwiki.plugin.XWikiPluginInterface; | |
| 26 | ||
| 27 | public class PackagePlugin extends XWikiDefaultPlugin implements XWikiPluginInterface | |
| 28 | { | |
| 29 | 2 | public PackagePlugin(String name, String className, XWikiContext context) |
| 30 | { | |
| 31 | 2 | super(name, className, context); |
| 32 | 2 | init(context); |
| 33 | } | |
| 34 | ||
| 35 | 4 | @Override |
| 36 | public String getName() | |
| 37 | { | |
| 38 | 4 | return "package"; |
| 39 | } | |
| 40 | ||
| 41 | 224 | @Override |
| 42 | public Api getPluginApi(XWikiPluginInterface plugin, XWikiContext context) | |
| 43 | { | |
| 44 | 224 | try { |
| 45 | 224 | return new PackageAPI(new Package(), context); |
| 46 | } catch (PackageException e) { | |
| 47 | 15 | return null; |
| 48 | } | |
| 49 | } | |
| 50 | ||
| 51 | 0 | @Override |
| 52 | public void flushCache() | |
| 53 | { | |
| 54 | } | |
| 55 | ||
| 56 | 4 | @Override |
| 57 | public void init(XWikiContext context) | |
| 58 | { | |
| 59 | 4 | super.init(context); |
| 60 | } | |
| 61 | } |