1 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 30 implements 31 Extension { 32 33 35 37 39 41 public String getName() { 42 return "MockExtension2"; 43 } 44 45 public void init( 46 SiteContext siteContext ) { 47 48 init_ = true; 49 } 50 51 public void destroy( 52 SiteContext siteContext ) { 53 54 destroy_ = siteContext.getInt( "id" ); 55 } 56 57 public Module[] getModules() { 58 return null; 59 } 60 61 public void setUpMenu( 62 OperationContext op, 63 FoldingTreeNode menu, 64 MessageResources messages ) { 65 } 66 67 public void setUpEditorMenu( 68 OperationContext op, 69 FoldingTreeNode menu, 70 MessageResources messages ) { 71 } 72 73 75 public static boolean getInit() { 76 return init_; 77 } 78 79 public static void setInit( 80 boolean init ) { 81 init_ = init; 82 } 83 84 public static int getDestroy() { 85 return destroy_; 86 } 87 88 public static void setDestroy( 89 int destroy ) { 90 destroy_ = destroy; 91 } 92 93 95 private static boolean init_ = false; 96 private static int destroy_ = 0; 97 } 98 | Popular Tags |