01: /*
02: * Copyright (C) 2006 Methodhead Software LLC. All rights reserved.
03: *
04: * This file is part of TransferCM.
05: *
06: * TransferCM is free software; you can redistribute it and/or modify it under the
07: * terms of the GNU General Public License as published by the Free Software
08: * Foundation; either version 2 of the License, or (at your option) any later
09: * 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.*;
28:
29: public class MockExtension2 implements Extension {
30:
31: // constructors /////////////////////////////////////////////////////////////
32:
33: // constants ////////////////////////////////////////////////////////////////
34:
35: // classes //////////////////////////////////////////////////////////////////
36:
37: // methods //////////////////////////////////////////////////////////////////
38:
39: public String getName() {
40: return "MockExtension2";
41: }
42:
43: public void init(SiteContext siteContext) {
44:
45: init_ = true;
46: }
47:
48: public void destroy(SiteContext siteContext) {
49:
50: destroy_ = siteContext.getInt("id");
51: }
52:
53: public Module[] getModules() {
54: return null;
55: }
56:
57: public void setUpMenu(OperationContext op, FoldingTreeNode menu,
58: MessageResources messages) {
59: }
60:
61: public void setUpEditorMenu(OperationContext op,
62: FoldingTreeNode menu, MessageResources messages) {
63: }
64:
65: // properties ///////////////////////////////////////////////////////////////
66:
67: public static boolean getInit() {
68: return init_;
69: }
70:
71: public static void setInit(boolean init) {
72: init_ = init;
73: }
74:
75: public static int getDestroy() {
76: return destroy_;
77: }
78:
79: public static void setDestroy(int destroy) {
80: destroy_ = destroy;
81: }
82:
83: // attributes ///////////////////////////////////////////////////////////////
84:
85: private static boolean init_ = false;
86: private static int destroy_ = 0;
87: }
|