KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > methodhead > transfer > Extension


1 /*
2  * Copyright (C) 2006 Methodhead Software LLC. All rights reserved.
3  *
4  * This file is part of TransferCM.
5  *
6  * TransferCM is free software; you can redistribute it and/or modify it under the
7  * terms of the GNU General Public License as published by the Free Software
8  * Foundation; either version 2 of the License, or (at your option) any later
9  * version.
10  *
11  * TransferCM is distributed in the hope that it will be useful, but WITHOUT ANY
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU General Public License along with
17  * TransferCM; if not, write to the Free Software Foundation, Inc., 51 Franklin St,
18  * Fifth Floor, Boston, MA 02110-1301 USA
19  */

20
21 package com.methodhead.transfer;
22
23 import com.methodhead.shim.Module;
24 import com.methodhead.util.OperationContext;
25 import com.methodhead.sitecontext.SiteContext;
26 import com.methodhead.tree.FoldingTreeNode;
27 import org.apache.struts.util.MessageResources;
28
29 /**
30  * An extension to built-in functionality.
31  */

32 public interface Extension {
33
34   // constants ////////////////////////////////////////////////////////////////
35

36   // constructors /////////////////////////////////////////////////////////////
37

38   // methods //////////////////////////////////////////////////////////////////
39

40   /**
41    * Returns a user-friendly name for the extension.
42    */

43   public String JavaDoc getName();
44
45   /**
46    * Initializes the extension for <tt>siteContext</tt>.
47    */

48   public void init(
49     SiteContext siteContext );
50
51   /**
52    * Destroys the extension for <tt>siteContext</tt>.
53    */

54   public void destroy(
55     SiteContext siteContext );
56
57   /**
58    * Returns the modules provided by this extension (if any).
59    */

60   public Module[] getModules();
61
62   /**
63    * Adds any menu items for this extension to <tt>menu</tt>.
64    */

65   public void setUpMenu(
66     OperationContext op,
67     FoldingTreeNode menu,
68     MessageResources resources );
69
70   /**
71    * Adds any menu items for this extension to <tt>menu</tt>, displayed when a
72    * particular page is being viewed in Transfer.
73    */

74   public void setUpEditorMenu(
75     OperationContext op,
76     FoldingTreeNode menu,
77     MessageResources resources );
78 }
79
80
Popular Tags