Author: mvitenkov
Date: 2008-11-04 11:22:04 -0500 (Tue, 04 Nov 2008)
New Revision: 11019
Modified:
trunk/test-applications/automator/src/main/java/parser/TLDParser.java
Log:
+getAllHandlers()
Modified: trunk/test-applications/automator/src/main/java/parser/TLDParser.java
===================================================================
--- trunk/test-applications/automator/src/main/java/parser/TLDParser.java 2008-11-04
16:12:17 UTC (rev 11018)
+++ trunk/test-applications/automator/src/main/java/parser/TLDParser.java 2008-11-04
16:22:04 UTC (rev 11019)
@@ -121,4 +121,32 @@
}
return richfacesUI;
}
+
+ public ArrayList<String> getAllHandlers() {
+ tld = getRichfacesUI().getJarEntry("META-INF/richfaces.tld");
+ InputStream input = null;
+ ArrayList<String> handlers = new ArrayList<String>();
+
+ try {
+ input = richfacesUI.getInputStream(tld);
+ InputStreamReader isr = new InputStreamReader(input);
+ BufferedReader reader = new BufferedReader(isr);
+ String line, temp;
+ int start, end;
+ while ((line = reader.readLine()) != null) {
+ if ((start = line.indexOf("<name>")) != -1) {
+ end = line.indexOf("</name>");
+ temp = line.substring(start + 6, end).trim();
+ if (temp.startsWith("on") && !handlers.contains(temp)) {
+ handlers.add(temp);
+ }
+ }
+ }
+ return handlers;
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
}
Show replies by date