1 8 9 package mx4j.tools.adaptor.http; 10 11 import java.lang.reflect.Method ; 12 13 18 public class XSLTProcessorMBeanDescription extends ProcessorMBeanDescription 19 { 20 public String getMBeanDescription() 21 { 22 return "XSLTPostProcessor which passes the XML message from the HttpAdaptor through a XSL transformation"; 23 } 24 25 public String getAttributeDescription(String attribute) 26 { 27 if (attribute.equals("File")) 28 { 29 return "The jar/zip file or the directory where to find the XSL files"; 30 } 31 if (attribute.equals("PathInJar")) 32 { 33 return "The path of the XSL templates inside a jar file"; 34 } 35 if (attribute.equals("DefaultPage")) 36 { 37 return "The default start page"; 38 } 39 if (attribute.equals("UseJar")) 40 { 41 return "Indicates whether XSL files are contained in an external jar/zip file"; 42 } 43 if (attribute.equals("UsePath")) 44 { 45 return "Indicates whether XSL files are contained in an external path"; 46 } 47 if (attribute.equals("UseCache")) 48 { 49 return "Indicates whether the XSL Templates are cached"; 50 } 51 if (attribute.equals("Locale")) 52 { 53 return "The locale used to internationalize the output"; 54 } 55 if (attribute.equals("LocaleString")) 56 { 57 return "Sets the locale used to internationalize the output, as a string"; 58 } 59 return super.getAttributeDescription(attribute); 60 } 61 62 public String getOperationDescription(Method operation) 63 { 64 String name = operation.getName(); 65 if (name.equals("addMimeType")) 66 { 67 return "Adds a MIME type to the default list"; 68 } 69 return super.getOperationDescription(operation); 70 } 71 72 public String getOperationParameterName(Method method, int index) 73 { 74 String name = method.getName(); 75 if (name.equals("addMimeType")) 76 { 77 switch (index) 78 { 79 case 0: 80 return "extension"; 81 case 1: 82 return "mimeType"; 83 } 84 } 85 return super.getOperationParameterName(method, index); 86 } 87 88 public String getOperationParameterDescription(Method method, int index) 89 { 90 String name = method.getName(); 91 if (name.equals("addMimeType")) 92 { 93 switch (index) 94 { 95 case 0: 96 return "The extension of the file"; 97 case 1: 98 return "The MIME type for the extension"; 99 } 100 } 101 return super.getOperationParameterDescription(method, index); 102 } 103 } 104 | Popular Tags |