KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > tools > adaptor > http > XSLTProcessorMBeanDescription


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.tools.adaptor.http;
10
11 import java.lang.reflect.Method JavaDoc;
12
13 /**
14  * Management interface descriptions for the XSLTProcessor MBean.
15  *
16  * @version $Revision: 1.3 $
17  */

18 public class XSLTProcessorMBeanDescription extends ProcessorMBeanDescription
19 {
20    public String JavaDoc getMBeanDescription()
21    {
22       return "XSLTPostProcessor which passes the XML message from the HttpAdaptor through a XSL transformation";
23    }
24
25    public String JavaDoc getAttributeDescription(String JavaDoc 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 JavaDoc getOperationDescription(Method JavaDoc operation)
63    {
64       String JavaDoc 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 JavaDoc getOperationParameterName(Method JavaDoc method, int index)
73    {
74       String JavaDoc 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 JavaDoc getOperationParameterDescription(Method JavaDoc method, int index)
89    {
90       String JavaDoc 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