From: <dr...@us...> - 2003-07-03 05:30:58
|
Update of /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki In directory sc8-pr-cvs1:/tmp/cvs-serv7466a/src/org/tcdi/opensource/wiki Modified Files: Wiki.java WikiDataTypes.java WikiSystem.java Log Message: - fixed rendering issues with DiffPage - add begin() and done() notifications to the page builder - add parser/renderer supported for numbered lists - fix rendering bug with: ~~ - fix bugs where one could create a page with all lower-case letters (also cleaned up filesystem of production webserver) - add ability to Preview before Saving a page edit - cleanup "thank you for registering" page a little bit - don't show the "Diff to Previous" link if we're not actually viewing a valid page - attempt to convince WMServlet to log my exception stack traces so I can hunt down the cause of a few NPE's I've seen in the error log on the production server Index: Wiki.java =================================================================== RCS file: /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki/Wiki.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Wiki.java 2 Jul 2003 15:34:05 -0000 1.11 --- Wiki.java 3 Jul 2003 05:20:09 -0000 1.12 *************** *** 388,398 **** private Hashtable createStore(String name) throws Exception { Properties props = new Properties(); ! props.put("ProxyImplementation", (String) _properties.get(name + ".ProxyImplementation")); ! props.put("PartitionKey", (String) _properties.get(name + ".PartitionKey")); ! props.put("ImmutableCertificate", (String) _properties.get(name + ".ImmutableCertificate")); ! props.put("MutableCertificate", (String) _properties.get(name + ".MutableCertificate")); ! props.put("Creator", (String) _properties.get(name + ".Creator")); ! props.put("Server", (String) _properties.get(name + ".Server")); ! props.put("Port", (String) _properties.get(name + ".Port")); VLHProvider provider = VLHProvider.getInstance(); --- 388,398 ---- private Hashtable createStore(String name) throws Exception { Properties props = new Properties(); ! props.put("ProxyImplementation", _properties.get(name + ".ProxyImplementation")); ! props.put("PartitionKey", _properties.get(name + ".PartitionKey")); ! props.put("ImmutableCertificate", _properties.get(name + ".ImmutableCertificate")); ! props.put("MutableCertificate", _properties.get(name + ".MutableCertificate")); ! props.put("Creator", _properties.get(name + ".Creator")); ! props.put("Server", _properties.get(name + ".Server")); ! props.put("Port", _properties.get(name + ".Port")); VLHProvider provider = VLHProvider.getInstance(); *************** *** 432,448 **** /** - * reparse a page - */ - private void reparsePage(WikiPage page) throws Exception { - WikiPageBuilder builder = (WikiPageBuilder) this._pageBuilderClass.newInstance(); - builder.setWikiTermMatcher(this); - WikiParser parser = new WikiParser(new ByteArrayInputStream(page.getUnparsedData().getBytes())); - WikiPage tmp = parser.parse(builder); - - page.setWikiData(tmp.getData()); - this.savePage(page); - } - - /** * Is the specified String a Wiki page reference? */ --- 432,435 ---- *************** *** 509,513 **** return _pageTree; } ! private void addChildren(List pages, Map lookup, WikiPage root, int depth) { WikiData[] data = root.getData(); --- 496,511 ---- return _pageTree; } ! ! public int getPageCount() { ! return getCurrentPageNames().length; ! } ! ! /** ! * TODO: WHY DOES THIS ALWAYS RETURN 4? I don't understand. ! */ ! public int getUserCount() { ! return _userStore.size(); ! } ! private void addChildren(List pages, Map lookup, WikiPage root, int depth) { WikiData[] data = root.getData(); Index: WikiDataTypes.java =================================================================== RCS file: /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki/WikiDataTypes.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WikiDataTypes.java 27 Nov 2002 07:06:32 -0000 1.2 --- WikiDataTypes.java 3 Jul 2003 05:20:10 -0000 1.3 *************** *** 54,110 **** * @author Eric B. Ridge */ ! public interface WikiDataTypes ! { ! public static final int UNKNOWN = -1; ! public static final int PLAIN_TEXT = 0; ! public static final int HORIZ_LINE = 1; ! public static final int PAGE_REFERENCE = 2; ! public static final int LINE_BREAK = 3; ! public static final int PARAGRAPH_BREAK = 4; ! public static final int URL = 5; ! public static final int JAVADOC = 6; ! public static final int IMAGE = 7; ! public static final int INDENT = 8; ! ! public static final int START_INDENT = 10; ! public static final int END_INDENT = 11; ! public static final int START_INDENT_BLOCK = 12; ! public static final int END_INDENT_BLOCK = 13; ! ! public static final int START_BOLD = 20; ! public static final int END_BOLD = 21; ! ! public static final int START_UNDERLINE = 30; ! public static final int END_UNDERLINE = 31; ! ! public static final int START_ITALIC = 40; ! public static final int END_ITALIC = 41; ! ! public static final int START_URL = 50; ! public static final int END_URL = 51; ! ! public static final int START_IMAGE = 60; ! public static final int END_IMAGE = 61; ! ! public static final int START_JAVADOC = 70; ! public static final int END_JAVADOC = 71; ! ! public static final int START_COLOR = 80; ! public static final int END_COLOR = 81; ! ! public static final int START_NAMED_HEADER = 90; ! public static final int END_NAMED_HEADER = 91; ! ! public static final int START_QUOTE = 100; ! public static final int END_QUOTE = 101; ! public final static int START_LIST = 110; ! public final static int LI = 111; ! public final static int END_LIST = 112; ! public static final int EMAIL = 200; ! public static final int QUOTED_BLOCK = 201; ! public static final int SPACE = 202; ! public static final int LT = 203; ! public static final int GT = 204; } --- 54,112 ---- * @author Eric B. Ridge */ ! public interface WikiDataTypes { ! public static final int UNKNOWN = -1; ! public static final int PLAIN_TEXT = 0; ! public static final int HORIZ_LINE = 1; ! public static final int PAGE_REFERENCE = 2; ! public static final int LINE_BREAK = 3; ! public static final int PARAGRAPH_BREAK = 4; ! public static final int URL = 5; ! public static final int JAVADOC = 6; ! public static final int IMAGE = 7; ! public static final int INDENT = 8; ! public static final int START_INDENT = 10; ! public static final int END_INDENT = 11; ! public static final int START_INDENT_BLOCK = 12; ! public static final int END_INDENT_BLOCK = 13; ! public static final int START_BOLD = 20; ! public static final int END_BOLD = 21; ! ! public static final int START_UNDERLINE = 30; ! public static final int END_UNDERLINE = 31; ! ! public static final int START_ITALIC = 40; ! public static final int END_ITALIC = 41; ! ! public static final int START_URL = 50; ! public static final int END_URL = 51; ! ! public static final int START_IMAGE = 60; ! public static final int END_IMAGE = 61; ! ! public static final int START_JAVADOC = 70; ! public static final int END_JAVADOC = 71; ! ! public static final int START_COLOR = 80; ! public static final int END_COLOR = 81; ! ! public static final int START_NAMED_HEADER = 90; ! public static final int END_NAMED_HEADER = 91; ! ! public static final int START_QUOTE = 100; ! public static final int END_QUOTE = 101; ! ! public final static int START_LIST = 110; ! public final static int LI = 111; ! public final static int END_LIST = 112; ! ! public final static int START_NUMBERED_LIST = 113; ! public final static int END_NUMBERED_LIST = 114; ! ! public static final int EMAIL = 200; ! public static final int QUOTED_BLOCK = 201; ! public static final int SPACE = 202; ! public static final int LT = 203; ! public static final int GT = 204; } Index: WikiSystem.java =================================================================== RCS file: /cvsroot/webmacro/wiki/src/org/tcdi/opensource/wiki/WikiSystem.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** WikiSystem.java 2 Jul 2003 03:01:52 -0000 1.5 --- WikiSystem.java 3 Jul 2003 05:20:10 -0000 1.6 *************** *** 75,78 **** --- 75,83 ---- /** + * How many "current" pages do we have? + */ + public int getPageCount(); + + /** * @param title the title of the WikiPage to retrieve. This should be a propertly formed WikiTerm * @return the WikiPage of the specified title *************** *** 151,154 **** --- 156,161 ---- public boolean containsPage(String title); + /** How many users do we have? */ + public int getUserCount(); /** |