You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(233) |
Sep
(199) |
Oct
(206) |
Nov
(185) |
Dec
(270) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(232) |
Feb
(426) |
Mar
(623) |
Apr
(592) |
May
(506) |
Jun
(389) |
Jul
(160) |
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(5) |
2007 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(5) |
Oct
(9) |
Nov
(6) |
Dec
(6) |
2008 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
(3) |
May
(3) |
Jun
(5) |
Jul
(10) |
Aug
(2) |
Sep
(12) |
Oct
(10) |
Nov
(54) |
Dec
(49) |
2009 |
Jan
(19) |
Feb
(13) |
Mar
(20) |
Apr
(24) |
May
(44) |
Jun
(29) |
Jul
(32) |
Aug
(10) |
Sep
(7) |
Oct
(10) |
Nov
(4) |
Dec
(17) |
2010 |
Jan
(14) |
Feb
(5) |
Mar
(23) |
Apr
(50) |
May
(31) |
Jun
(9) |
Jul
(5) |
Aug
(4) |
Sep
(7) |
Oct
(5) |
Nov
(2) |
Dec
(3) |
2011 |
Jan
(12) |
Feb
(5) |
Mar
(5) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2012 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <jbo...@li...> - 2005-08-16 16:15:59
|
Author: ral...@jb... Date: 2005-08-16 12:15:50 -0400 (Tue, 16 Aug 2005) New Revision: 867 Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java Log: fixed bug for last characted of wiki links Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java 2005-08-16 16:07:37 UTC (rev 866) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java 2005-08-16 16:15:50 UTC (rev 867) @@ -673,13 +673,13 @@ // [...|externallink] { result = "<a href=\"" + link.substring(border + 1) + "\">" - + link.substring(0, border - 1) + "</a>"; + + link.substring(0, border) + "</a>"; } else //case [...|wikipagelink] { result = "<a href=\"" + portalHome + wikiHome + actionType + "action" + page + cleanLink(link.substring(border + 1)) + "\">" - + link.substring(0, border - 1) + "</a>"; + + link.substring(0, border) + "</a>"; } } else //[...] case |
From: <jbo...@li...> - 2005-08-16 16:07:51
|
Author: szimano Date: 2005-08-16 12:07:37 -0400 (Tue, 16 Aug 2005) New Revision: 866 Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java Log: again :) Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java 2005-08-16 16:06:49 UTC (rev 865) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java 2005-08-16 16:07:37 UTC (rev 866) @@ -91,7 +91,7 @@ public boolean pageExists(String pageName) { - return false; + return mediaDataSource.pageExists(pageName); } /** |
From: <jbo...@li...> - 2005-08-16 16:07:03
|
Author: szimano Date: 2005-08-16 12:06:49 -0400 (Tue, 16 Aug 2005) New Revision: 865 Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/FileDataSource.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/MediaDataSource.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPage.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPlugin.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Edit.jsp trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Wiki.jsp Log: some changes Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/FileDataSource.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/FileDataSource.java 2005-08-16 11:28:17 UTC (rev 864) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/FileDataSource.java 2005-08-16 16:06:49 UTC (rev 865) @@ -90,6 +90,8 @@ } public WikiPage getPage(String pageName) { + System.out.println("[WIKI:FileDataSource]: Getting new page: "+pageName); + WikiPage page = null; File pageFile = new File(pathToMedia + "/" + pageName + ".txt"); @@ -252,4 +254,15 @@ } } + public boolean pageExists(String pageName) { + File pageFile = new File(pathToMedia + "/" + pageName + ".txt"); + + if (pageFile.exists()) { + return true; + } + else { + return false; + } + } + } Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/MediaDataSource.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/MediaDataSource.java 2005-08-16 11:28:17 UTC (rev 864) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/MediaDataSource.java 2005-08-16 16:06:49 UTC (rev 865) @@ -71,6 +71,8 @@ public WikiPage getPageAtVersion(String pageName, String languageCode, int version); public WikiPage getPageAtVersion(String pageName, int version); + + public boolean pageExists(String pageName); } Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java 2005-08-16 11:28:17 UTC (rev 864) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java 2005-08-16 16:06:49 UTC (rev 865) @@ -88,6 +88,11 @@ // your code here return false; } + + public boolean pageExists(String pageName) { + + return false; + } /** * <p> @@ -115,9 +120,7 @@ * @param wikiContext */ public WikiPage getByName(String pageName, WikiContext wikiContext) { - - // TODO: make user authentication with wikiContext - + WikiPage ret = null; if (pages.containsKey(pageName)) { @@ -128,10 +131,14 @@ pages.put(pageName, ret); } - if (wikiContext != null) { - return wikiContext.process(ret); + if (ret != null) { + if (wikiContext != null) { + return wikiContext.process(ret); + } else { + return ret; + } } else { - return ret; + return null; } } Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPage.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPage.java 2005-08-16 11:28:17 UTC (rev 864) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPage.java 2005-08-16 16:06:49 UTC (rev 865) @@ -9,6 +9,7 @@ package org.jboss.wiki; import java.io.Serializable; +import java.util.Calendar; import java.util.Date; import java.util.HashMap; @@ -32,9 +33,13 @@ */ private static final long serialVersionUID = 1L; + /* number of minutes after which page lock will expire */ + private static final int LOCK_TIME = 30; + private Date lockTime = null; - + private String lockUser; + /** * <p> * Represents ... @@ -315,12 +320,47 @@ getPageContent(), getLastVersion(), getEditDate()); return clonedPage; } - + + public void unlock(User user) { + System.out.println("UNLOCK: "+user.getUserName()+" save user: "+lockUser); + if ((user.getUserName()).equals(lockUser)) { + System.out.println("Unlocking page"); + lockTime = null; + lockUser = null; + } + } + public Date lock(User user) { - Date lockTime = null; - - //if - return lockTime; + Date now = new Date(); + Date expDate = null; + Date retDate = lockTime; + + if (this.lockTime != null) { + // lets calculete expire date of current lock + + Calendar calExpireDate = Calendar.getInstance(); + calExpireDate.setTime(this.lockTime); + calExpireDate.add(Calendar.MINUTE, LOCK_TIME); + expDate = calExpireDate.getTime(); + + if (expDate.before(now)) { + // lock expired. take it out + lockTime = null; + lockUser = null; + } + } + + if (this.lockTime == null) { + System.out.println("LOCK: "+user.getUserName()); + + // page isn't locked or lock expired. Lets lock it. + this.lockTime = now; + this.lockUser = user.getUserName(); + System.out.println("LOCK: "+lockUser); + retDate = null; + } + + return retDate; } public String getLockUser() { Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPlugin.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPlugin.java 2005-08-16 11:28:17 UTC (rev 864) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPlugin.java 2005-08-16 16:06:49 UTC (rev 865) @@ -33,7 +33,7 @@ * @return * @param content */ - public abstract WikiPage process(WikiPage wikiPage); + public abstract WikiPage process(final WikiPage wikiPage); /** * <p>Does ...</p> Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java 2005-08-16 11:28:17 UTC (rev 864) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java 2005-08-16 16:06:49 UTC (rev 865) @@ -16,8 +16,9 @@ import org.jboss.portlet.*; /** - * The WikiPortlet.<p> - * + * The WikiPortlet. + * <p> + * * @author <a href="mailto:ds...@jb...">Damon Sicore</a> * @author <a href="mailto:tom...@jb...">Tomasz Szimanski</a> * @version $Id$ @@ -36,21 +37,28 @@ } public void processAction(JBossActionRequest rReq, JBossActionResponse rResp) { - - WikiContext wikiContext = new WikiContext(rReq.getUser(), wikiEngine.getWikiType("HTML")); - + + WikiContext wikiContext = new WikiContext(rReq.getUser(), wikiEngine + .getWikiType("HTML")); + if (rReq.getParameter("action") != null) { rResp.setRenderParameter("action", rReq.getParameter("action")); } if (rReq.getParameter("page") != null) { rResp.setRenderParameter("page", rReq.getParameter("page")); - + } if (rReq.getParameter("editAction") != null) { System.out.println("EDITING PAGE"); + // unlock page + WikiPage edPage = wikiEngine.getByName((String) rReq + .getParameter("editedPage"), wikiContext); + + edPage.unlock(rReq.getUser()); + // saving, previewing or canceling if (rReq.getParameter("editAction").equals("Save")) { @@ -60,8 +68,6 @@ System.out.println("SAVING PAGE"); // save the page - WikiPage edPage = wikiEngine.getByName(rReq - .getParameter("editedPage"), wikiContext); if (edPage == null) { edPage = new WikiPage(rReq.getParameter("editedPage"), @@ -89,51 +95,79 @@ public void doView(JBossRenderRequest rReq, JBossRenderResponse rRes) throws PortletException, java.io.IOException { + + WikiPage noSuchPage = new WikiPage("", new Credentials(""), "There is no such page. Click on EDIT to start it.", 0, null); String page = "Wiki.jsp"; - + String wikiPage = defaultPage; - + WikiPage pageToShow = null; - - WikiContext wikiContext = null ; - + + WikiContext wikiContext = null; + if (rReq.getParameter("page") != null) { wikiPage = rReq.getParameter("page"); } - + if ((rReq.getParameter("action") != null) - && (rReq.getParameter("action").equals("Edit"))) { + && (rReq.getParameter("action").equals("Edit")) + && (rReq.getUser() != null)) { page = "Edit.jsp"; + pageToShow = wikiEngine.getByName(wikiPage, wikiContext); - + + if (pageToShow == null) { + // start editing new page + // wikiPage = defaultPage; + + pageToShow = new WikiPage(wikiPage, new Credentials(rReq + .getUser().getUserName()), "", 0, new Date()); + // wikiEngine.getByName(wikiPage, wikiContext); + } + Date dateLock = pageToShow.lock(rReq.getUser()); - + if (dateLock != null) { - + rReq + .setAttribute( + "lockMsg", + "Page is locked by " + + pageToShow.getLockUser() + + " from " + + dateLock + + ".<br> I won't stop you from saving, but you or he can erease each other changes. Lock will expire: "); } - + } else { page = "Wiki.jsp"; - wikiContext = new WikiContext(rReq.getUser(), wikiEngine.getWikiType("HTML")); + wikiContext = new WikiContext(rReq.getUser(), wikiEngine + .getWikiType("HTML")); pageToShow = wikiEngine.getByName(wikiPage, wikiContext); - + + if (pageToShow == null) { + + try { + pageToShow = (WikiPage)noSuchPage.clone(); + } + catch (CloneNotSupportedException cnse){ + System.out.println(cnse); + } + + pageToShow.setName(wikiPage); + } + } - + PortletURL wikiURL = rRes.createActionURL(); rReq.setAttribute("actionURL", wikiURL.toString()); - rReq.setAttribute("wikiName", "<img src=\"/file-access/default/members/jbosswiki/images/JBossWikiLogoMedium.png\" width=\"100\" />"); + rReq + .setAttribute( + "wikiName", + "<img src=\"/file-access/default/members/jbosswiki/images/JBossWikiLogoMedium.png\" width=\"100\" />"); - if (pageToShow == null) { - // TODO MOVE IT UP !!! - - wikiPage = defaultPage; - - pageToShow = wikiEngine.getByName(wikiPage, wikiContext); - } - rReq.setAttribute("wikiContent", pageToShow.getContent()); rReq.setAttribute("wikiPage", wikiPage); @@ -142,6 +176,9 @@ rReq.setAttribute("author", pageToShow.getLastAuthor()); + rReq.setAttribute("logedIn", (rReq.getUser() != null) ? "true" + : "false"); + rRes.setTitle("Wiki"); if (javax.portlet.WindowState.NORMAL.equals(rReq.getWindowState()) || javax.portlet.WindowState.MAXIMIZED.equals(rReq Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java 2005-08-16 11:28:17 UTC (rev 864) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java 2005-08-16 16:06:49 UTC (rev 865) @@ -787,7 +787,7 @@ return clean.toString(); } - public WikiPage process(WikiPage wikiPage) { + public WikiPage process(final WikiPage wikiPage) { WikiPage newPage = null; try { Modified: trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Edit.jsp =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Edit.jsp 2005-08-16 11:28:17 UTC (rev 864) +++ trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Edit.jsp 2005-08-16 16:06:49 UTC (rev 865) @@ -11,12 +11,17 @@ String wikiName = (String)request.getAttribute("wikiName"); String wikiContent = (String)request.getAttribute("wikiContent"); String wikiPage = (String)request.getAttribute("wikiPage"); + String lockMsg = (String)request.getAttribute("lockMsg"); + + if (lockMsg == null) + lockMsg = ""; + %> <h2><%=wikiName%>: <%=wikiPage%></h2> <hr /> - +<div style="color:#FF0000"><%=lockMsg%></div> <form method="post" action="<%=actionURL%>"> <textarea name="wikiContent" rows="40" cols="80" style="width:100%;"> Modified: trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Wiki.jsp =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Wiki.jsp 2005-08-16 11:28:17 UTC (rev 864) +++ trunk/forge/portal-extensions/forge-wiki/src/web/WEB-INF/jsp/Wiki.jsp 2005-08-16 16:06:49 UTC (rev 865) @@ -41,7 +41,26 @@ <tr> <td class="wikiFooter"> <hr /> -<a href="<%=actionURL%>&action=Edit&page=<%=wikiPage%>">Edit this page</a> <a href="<%=actionURL%>">More info...</a> <a href="<%=actionURL%>">Attach file...</a> + + +<% + + String logedIn = (String)request.getAttribute("logedIn"); + + + if (logedIn.equals("true")) { + out.print("<a href='"+actionURL+"&action=Edit&page="+wikiPage+"'>Edit page</a>"); + + } + else { + out.print("<i>Login to edit pages</i>"); + } + +%> + + + +<a href="<%=actionURL%>">More info...</a> <a href="<%=actionURL%>">Attach file...</a> </td> </tr> </table> |
From: <jbo...@li...> - 2005-08-16 11:28:51
|
Author: szimano Date: 2005-08-16 07:28:17 -0400 (Tue, 16 Aug 2005) New Revision: 864 Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPage.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPlugin.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiType.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiTypeHandler.java trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java Log: plugins... Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java 2005-08-15 22:52:40 UTC (rev 863) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiEngine.java 2005-08-16 11:28:17 UTC (rev 864) @@ -6,7 +6,7 @@ * See terms of license at gnu.org. * * * *************************************************/ - package org.jboss.wiki; +package org.jboss.wiki; import java.util.Date; import java.util.HashMap; @@ -18,243 +18,280 @@ import org.xml.sax.SAXException; /** - * + * * @author <a href="mailto:ds...@jb...">Damon Sicore</a> * @author <a href="mailto:tom...@jb...">Tomasz Szymanski</a> * @version $Id$ - * - * getLink - gets a link to a given page - * getEditLink - same but link to edit that page - * save - saves page with given attributes - * getContent - retrieves the content from a wiki page and returns it in the type specified by 'type' - * Probably need to have some sort of WikiSession per request with an associated WikiContext, but maybe not--don't want to duplicate PortletSession + * + * getLink - gets a link to a given page getEditLink - same but link to edit + * that page save - saves page with given attributes getContent - retrieves the + * content from a wiki page and returns it in the type specified by 'type' + * Probably need to have some sort of WikiSession per request with an associated + * WikiContext, but maybe not--don't want to duplicate PortletSession */ public class WikiEngine { -/** - * <p>Represents ...</p> - * - */ - private String urlBase; - -/** - * <p>Represents ...</p> - * - */ - private Map wikiTypePlugins; + /** + * <p> + * Represents ... + * </p> + * + */ + private String urlBase; -/** - * <p></p> - * - */ - private HashMap<String, WikiPage> pages; - - private HashMap<String, WikiType> wikiTypes; - - private MediaDataSource mediaDataSource; + /** + * <p> + * Represents ... + * </p> + * + */ + private Map wikiTypePlugins; -/** - * <p>Does ...</p> - * - * - * @param pageName - * @return - * @param wikiContext - */ - public String get(String pageName, WikiContext wikiContext) { - // your code here - return null; - } + /** + * <p> + * </p> + * + */ + private HashMap<String, WikiPage> pages; -/** - * <p>Does ...</p> - * - * - * @param pageName - * @param content - * @param wikiContext - * @return - */ - public boolean save(String pageName, String content, WikiContext wikiContext) { - // your code here - return false; - } + private HashMap<String, WikiType> wikiTypes; -/** - * <p>Does ...</p> - * - * - * @param pageName - * @param type - * @return - */ - public String getContent(String pageName, String type) { - // your code here - return null; - } + private MediaDataSource mediaDataSource; -/** - * <p>Does ...</p> - * - * - * @param pageName - * @return - * @param wikiContext - */ - public WikiPage getByName(String pageName, WikiContext wikiContext) { - - // TODO: make user authentication with wikiContext - - WikiPage ret = null; - - if (pages.containsKey(pageName)) { - ret = pages.get(pageName); - } - else { - ret = mediaDataSource.getPage(pageName); - - pages.put(pageName, ret); - } - - return wikiContext.process(ret); - } + /** + * <p> + * Does ... + * </p> + * + * + * @param pageName + * @return + * @param wikiContext + */ + public String get(String pageName, WikiContext wikiContext) { + // your code here + return null; + } -/** - * <p>Does ...</p> - * - * - * @return - */ - public void init() { - mediaDataSource = new FileDataSource(); - pages = new HashMap<String, WikiPage>(); - wikiTypes = new HashMap<String, WikiType>(); - loadWikiTypes(); - } + /** + * <p> + * Does ... + * </p> + * + * + * @param pageName + * @param content + * @param wikiContext + * @return + */ + public boolean save(String pageName, String content, WikiContext wikiContext) { + // your code here + return false; + } -/** - * <p>Parses configuration file to get WikiTypes</p> - * - * - * @return - */ - protected void loadWikiTypes() { - try { - SAXParser sp = (SAXParserFactory.newInstance()).newSAXParser(); - sp.parse(WikiTypeHandler.class.getResourceAsStream("WikiTypes.xml"), new WikiTypeHandler(this)); - } - catch (Exception se) { - System.err.println("Error while parsing WikiType configuration: "+se); - } - } + /** + * <p> + * Does ... + * </p> + * + * + * @param pageName + * @param type + * @return + */ + public String getContent(String pageName, String type) { + // your code here + return null; + } -/** - * <p>Does ...</p> - * - * - * @return - */ - protected void loadWikiTypePlugins() { - // your code here - //return null; - } + /** + * <p> + * Does ... + * </p> + * + * + * @param pageName + * @return + * @param wikiContext + */ + public WikiPage getByName(String pageName, WikiContext wikiContext) { -/** - * <p>Does ...</p> - * - * - * @return - * @param pageName - * @param wikiContext - */ - public void lock(String pageName, WikiContext wikiContext) { - // your code here - //return null; - } + // TODO: make user authentication with wikiContext -/** - * <p>Does ...</p> - * - * - * @return - * @param pageName - * @param wikiContext - */ - public void unlock(String pageName, WikiContext wikiContext) { - // your code here - //return null; - } + WikiPage ret = null; -/** - * <p>Does ...</p> - * - * - * @return - * @param path - * @param wikiContext - */ - public void getByPath(String path, WikiContext wikiContext) { - // your code here - //return null; - } + if (pages.containsKey(pageName)) { + ret = pages.get(pageName); + } else { + ret = mediaDataSource.getPage(pageName); -/** - * <p>Does ...</p> - * - * - * @return - * @param pageName - * @param wikiContext - */ - public void setProperty(String pageName, WikiContext wikiContext) { - // your code here - //return null; - } + pages.put(pageName, ret); + } -/** - * <p>Does ...</p> - * - * - * @return - * @param wikiType - * @param userCredentials - */ - public void getWikiContext(String wikiType, Credentials userCredentials) { - // your code here - //return null; - } - - public void addWikiType(String name, WikiType wikiType) { - System.out.println("[WIKIENGINE]: Added WikiType: "+name+" Class: "+wikiType); - wikiTypes.put(name, wikiType); - } - - public WikiType getWikiType(String wikiTypeName) { - System.out.println("[WIKITYPE REQUEST]: "+wikiTypes.get(wikiTypeName)); - return wikiTypes.get(wikiTypeName); - } - /** - * <p></p> - * - */ - public WikiEngine() { - init(); - } - - - - public static void main(String[] args) { + if (wikiContext != null) { + return wikiContext.process(ret); + } else { + return ret; + } + } + + /** + * <p> + * Does ... + * </p> + * + * + * @return + */ + public void init() { + mediaDataSource = new FileDataSource(); + pages = new HashMap<String, WikiPage>(); + wikiTypes = new HashMap<String, WikiType>(); + loadWikiTypes(); + } + + /** + * <p> + * Parses configuration file to get WikiTypes + * </p> + * + * + * @return + */ + protected void loadWikiTypes() { + try { + SAXParser sp = (SAXParserFactory.newInstance()).newSAXParser(); + sp.parse( + WikiTypeHandler.class.getResourceAsStream("WikiTypes.xml"), + new WikiTypeHandler(this)); + } catch (Exception se) { + System.err.println("Error while parsing WikiType configuration: " + + se); + } + } + + /** + * <p> + * Does ... + * </p> + * + * + * @return + */ + protected void loadWikiTypePlugins() { + // your code here + // return null; + } + + /** + * <p> + * Does ... + * </p> + * + * + * @return + * @param pageName + * @param wikiContext + */ + public void lock(String pageName, WikiContext wikiContext) { + // your code here + // return null; + } + + /** + * <p> + * Does ... + * </p> + * + * + * @return + * @param pageName + * @param wikiContext + */ + public void unlock(String pageName, WikiContext wikiContext) { + // your code here + // return null; + } + + /** + * <p> + * Does ... + * </p> + * + * + * @return + * @param path + * @param wikiContext + */ + public void getByPath(String path, WikiContext wikiContext) { + // your code here + // return null; + } + + /** + * <p> + * Does ... + * </p> + * + * + * @return + * @param pageName + * @param wikiContext + */ + public void setProperty(String pageName, WikiContext wikiContext) { + // your code here + // return null; + } + + /** + * <p> + * Does ... + * </p> + * + * + * @return + * @param wikiType + * @param userCredentials + */ + public void getWikiContext(String wikiType, Credentials userCredentials) { + // your code here + // return null; + } + + public void addWikiType(String name, WikiType wikiType) { + System.out.println("[WIKIENGINE]: Added WikiType: " + name + " Class: " + + wikiType); + wikiTypes.put(name, wikiType); + } + + public WikiType getWikiType(String wikiTypeName) { + System.out + .println("[WIKITYPE REQUEST]: " + wikiTypes.get(wikiTypeName)); + return wikiTypes.get(wikiTypeName); + } + + /** + * <p> + * </p> + * + */ + public WikiEngine() { + init(); + } + + public static void main(String[] args) { WikiEngine we = new WikiEngine(); - + WikiType wt = we.getWikiType("HTML"); - + WikiContext wc = new WikiContext(null, wt); - - WikiPage wp = new WikiPage("name", new Credentials("tomek"), "[content|ble sme]", 1, new Date()); - + + WikiPage wp = new WikiPage("name", new Credentials("tomek"), + "[content|ble sme]", 1, new Date()); + wp = wc.process(wp); - + System.out.println(wp.getContent()); } - - } + +} Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPage.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPage.java 2005-08-15 22:52:40 UTC (rev 863) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPage.java 2005-08-16 11:28:17 UTC (rev 864) @@ -12,6 +12,8 @@ import java.util.Date; import java.util.HashMap; +import org.jboss.portal.core.model.User; + /** * <p> * </p> @@ -30,6 +32,9 @@ */ private static final long serialVersionUID = 1L; + private Date lockTime = null; + + private String lockUser; /** * <p> * Represents ... @@ -310,4 +315,15 @@ getPageContent(), getLastVersion(), getEditDate()); return clonedPage; } + + public Date lock(User user) { + Date lockTime = null; + + //if + return lockTime; + } + + public String getLockUser() { + return lockUser; + } } Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPlugin.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPlugin.java 2005-08-15 22:52:40 UTC (rev 863) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPlugin.java 2005-08-16 11:28:17 UTC (rev 864) @@ -18,7 +18,9 @@ * @author <a href="mailto:tom...@jb...">Tomasz Szymanski</a> * @version $Id$ */ -public interface WikiPlugin { +public abstract class WikiPlugin { + + protected WikiEngine wikiEngine; /** * <p></p> * @@ -31,7 +33,7 @@ * @return * @param content */ - public WikiPage process(WikiPage wikiPage); + public abstract WikiPage process(WikiPage wikiPage); /** * <p>Does ...</p> @@ -39,10 +41,14 @@ * * @return */ - public void next(); + public abstract void next(); /** * <p></p> * */ + + public void setWikiEngine(WikiEngine wikiEngine) { + this.wikiEngine = wikiEngine; + } } Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java 2005-08-15 22:52:40 UTC (rev 863) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java 2005-08-16 11:28:17 UTC (rev 864) @@ -94,29 +94,40 @@ String wikiPage = defaultPage; + WikiPage pageToShow = null; + + WikiContext wikiContext = null ; + + if (rReq.getParameter("page") != null) { + wikiPage = rReq.getParameter("page"); + } + if ((rReq.getParameter("action") != null) && (rReq.getParameter("action").equals("Edit"))) { page = "Edit.jsp"; + pageToShow = wikiEngine.getByName(wikiPage, wikiContext); + + Date dateLock = pageToShow.lock(rReq.getUser()); + + if (dateLock != null) { + + } + } else { page = "Wiki.jsp"; + wikiContext = new WikiContext(rReq.getUser(), wikiEngine.getWikiType("HTML")); + pageToShow = wikiEngine.getByName(wikiPage, wikiContext); + } - if (rReq.getParameter("page") != null) { - wikiPage = rReq.getParameter("page"); - } - - WikiContext wikiContext = new WikiContext(rReq.getUser(), wikiEngine.getWikiType("HTML")); - PortletURL wikiURL = rRes.createActionURL(); rReq.setAttribute("actionURL", wikiURL.toString()); rReq.setAttribute("wikiName", "<img src=\"/file-access/default/members/jbosswiki/images/JBossWikiLogoMedium.png\" width=\"100\" />"); - WikiPage pageToShow = wikiEngine.getByName(wikiPage, wikiContext); - if (pageToShow == null) { - // TODO Make this show, that page isn't there yet + // TODO MOVE IT UP !!! wikiPage = defaultPage; Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiType.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiType.java 2005-08-15 22:52:40 UTC (rev 863) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiType.java 2005-08-16 11:28:17 UTC (rev 864) @@ -26,6 +26,8 @@ public class WikiType { protected String name; + + protected WikiEngine wikiEngine; /** * <p> @@ -98,6 +100,8 @@ if (plugin != null) { plugins.put(pluginName, plugin); + + plugin.setWikiEngine(wikiEngine); System.out.println("[WikiType:" + name + "]Plugin added: " + pluginName + " class: " + pluginClass); @@ -142,4 +146,8 @@ System.out.print("Setting new WikiType name: " + name); this.name = name; } + + public void setWikiEngine(WikiEngine wikiEngine) { + this.wikiEngine = wikiEngine; + } } Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiTypeHandler.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiTypeHandler.java 2005-08-15 22:52:40 UTC (rev 863) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/WikiTypeHandler.java 2005-08-16 11:28:17 UTC (rev 864) @@ -57,6 +57,8 @@ } else if ((qName.equals("wikiType")) && (wikiType != null)) { // add WikiType + wikiType.setWikiEngine(wikiEngine); + wikiEngine.addWikiType(wikiType.getName(), wikiType); wikiType = null; wikiTypeName = null; Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java 2005-08-15 22:52:40 UTC (rev 863) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java 2005-08-16 11:28:17 UTC (rev 864) @@ -13,10 +13,11 @@ import java.util.StringTokenizer; //import org.jboss.wiki.Credentials; +import org.jboss.wiki.WikiEngine; import org.jboss.wiki.WikiPage; import org.jboss.wiki.WikiPlugin; -public class HTMLTranslator implements WikiPlugin { +public class HTMLTranslator extends WikiPlugin { private Pattern myPattern; |
From: <jbo...@li...> - 2005-08-15 22:53:56
|
Author: ral...@jb... Date: 2005-08-15 18:52:40 -0400 (Mon, 15 Aug 2005) New Revision: 863 Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java Log: HTML translator with most of the formatting done Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java 2005-08-15 20:34:06 UTC (rev 862) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/plugins/HTMLTranslator.java 2005-08-15 22:52:40 UTC (rev 863) @@ -5,221 +5,836 @@ * * */ +import java.io.*; import java.util.regex.*; import java.util.ArrayList; import java.util.Collection; -import java.util.Date; +//import java.util.Date; import java.util.StringTokenizer; -import org.jboss.wiki.Credentials; +//import org.jboss.wiki.Credentials; import org.jboss.wiki.WikiPage; import org.jboss.wiki.WikiPlugin; public class HTMLTranslator implements WikiPlugin { - private Pattern myPattern; + private Pattern myPattern; - private Matcher myMatcher; + private Matcher myMatcher; - /* URL components, later to be configurable */ - private String portalHome = "http://forge.sicore.org:8080/portal/"; + /* URL components, later to be configurable */ + private String portalHome = "http://forge.sicore.org:8080/portal/"; - private String wikiHome = "index.html?ctrl:id=window.default.WikiPortletWindow"; + private String wikiHome = "index.html?ctrl:id=window.default.WikiPortletWindow"; - private String actionType = "&ctrl:type="; + private String actionType = "&ctrl:type="; - private String page = "&page="; + private String page = "&page="; - public ArrayList mediaPatterns; + public ArrayList mediaPatterns; - public ArrayList linkPatterns; + public ArrayList linkPatterns; - public String[] textlinks; + public String[] textlinks; - public String[] notextlinks; + public String[] notextlinks; - private String[] mediaFormats = { "*.png", "*.jpeg", "*.gif" }; + private String[] mediaFormats = { "*.png", "*.jpeg", "*.gif" }; + private boolean m_allowHTML = false; - public HTMLTranslator() { - } + private boolean m_isbold = false; - /* - * compile all links to wiki pages or external pages of the form [...] or - * [...|...] - */ - public String parseLinks(String text, String actionURL) { - String translatedContent = text; - String link;// = ""; - String href1regex = "\\[.+\\|.+\\]"; - String href2regex = "\\[.+\\]"; - Pattern tLinks = Pattern.compile(href1regex); - Pattern links = Pattern.compile(href2regex); - Matcher textlinks = tLinks.matcher(text); - Matcher nontextlinks = links.matcher(text); + private boolean m_isitalic = false; - Matcher match; + private boolean m_isTypedText = false; - while ((match = tLinks.matcher(translatedContent)).find()) { - link = (translatedContent.substring(translatedContent.indexOf("|", - match.start() + 1) + 1, match.end() - 1)).trim(); - if (isExternalLink(link)) // outside link - { - translatedContent = match.replaceFirst("<a href=\"" - + link - + "\">" - + translatedContent.substring(match.start() + 1, - translatedContent.indexOf("|", - match.start() + 1)) + "</a>"); - } else - // need to implement pageExists - translatedContent = match.replaceFirst("<a href=\"" - + portalHome - + wikiHome - + actionType - + "action" - + page - + cleanLink(link) - + "\">" - + translatedContent.substring(match.start() + 1, - translatedContent.indexOf("|", - match.start() + 1)) + "</a>"); - } + private boolean m_istable = false; - while ((match = links.matcher(translatedContent)).find()) { - link = (translatedContent.substring(match.start() + 1, - match.end() - 1)); - if (isExternalLink(link)) // outside link - { - translatedContent = match.replaceFirst("<a href=\"" + link - + "\">" + link + "</a>"); - } else - translatedContent = match.replaceFirst("<a href=\"" - + portalHome + wikiHome + actionType + "action" + page - + cleanLink(link) + "\">" + link + "</a>"); - } + private boolean m_isPre = false; - translatedContent = translatedContent.replace("\n", "<BR>\n"); + private boolean m_isdefinition = false; - return translatedContent; - } + private int m_listlevel = 0; - /* a collection of all media formats allowed on wiki */ - private Collection getImagePatterns() { - ArrayList patterns = new ArrayList(); - for (int i = 0; i < mediaFormats.length; i++) { - patterns.add(mediaFormats[i]); - } + private int m_numlistlevel = 0; - return patterns; - } + /** Tag that gets closed at EOL. */ + private String m_closeTag = null; - /** - * Figures out if a link is an off-site link. This recognizes the most - * common protocols by checking how it starts. - */ - private boolean isExternalLink(String link) { - return link.startsWith("http:") || link.startsWith("ftp:") - || link.startsWith("https:") || link.startsWith("mailto:") - || link.startsWith("news:") || link.startsWith("file:"); - } + /** Allow this many characters to be pushed back in the stream. */ + private static final int PUSHBACK_BUFFER_SIZE = 8; - /** - * Cleans a Wiki name. - * <P>[ This is a link ] -> ThisIsALink - * - * @param link - * Link to be cleared. Null is safe, and causes this to return - * null. - * @return A cleaned link. - * - * @since 2.0 - */ - public String cleanLink(String link) { - StringBuffer clean = new StringBuffer(); + private PushbackReader m_in; - if (link == null) - return null; + public HTMLTranslator() { + + } - // - // Compress away all whitespace and capitalize - // all words in between. - // + /** + * Push back any character to the current input. Does not push back a read + * EOF, though. + */ + private void pushBack(int c) throws IOException { + if (c != -1) { + m_in.unread(c); + } + } - StringTokenizer st = new StringTokenizer(link, " -"); + /* + * compile all links to wiki pages or external pages of the form [...] or + * [...|...] + */ + public String parseLinks(String page) throws IOException { + m_in = new PushbackReader(new StringReader(page), PUSHBACK_BUFFER_SIZE); + String translatedContent = "";// = prepareText(text); + StringBuffer buf = new StringBuffer(); + StringBuffer word = null; + int previousCh = -2; + int start = 0; - while (st.hasMoreTokens()) { - StringBuffer component = new StringBuffer(st.nextToken()); + boolean quitReading = false; + boolean newLine = true; // FIXME: not true if reading starts in middle + // of buffer - component.setCharAt(0, Character.toUpperCase(component.charAt(0))); + while (!quitReading) { + int ch = nextToken(); + String s = null; + if (m_isPre) { + if (ch == '}') { + buf.append(handleClosebrace()); + } else if (ch == '<') { + buf.append("<"); + } else if (ch == '>') { + buf.append(">"); + } else if (ch == -1) { + quitReading = true; + } else { + buf.append((char) ch); + } - // - // We must do this, because otherwise compiling on JDK 1.4 causes - // a downwards incompatibility to JDK 1.3. - // - clean.append(component.toString()); - } + continue; + } + // + // Check if any lists need closing down. + // - // - // Remove non-alphanumeric characters that should not - // be put inside WikiNames. Note that all valid - // Unicode letters are considered okay for WikiNames. - // It is the problem of the WikiPageProvider to take - // care of actually storing that information. - // + if( newLine && ch != '*' && ch != ' ' && m_listlevel > 0 ) + { + buf.append("</LI>\n"); + for( ; m_listlevel > 0; m_listlevel-- ) + { + buf.append("</UL>\n"); + } + } - for (int i = 0; i < clean.length(); i++) { - if (!(Character.isLetterOrDigit(clean.charAt(i)) - || clean.charAt(i) == '_' || clean.charAt(i) == '.')) { - clean.deleteCharAt(i); - --i; // We just shortened this buffer. - } - } + if( newLine && ch != '#' && ch != ' ' && m_numlistlevel > 0 ) + { + buf.append("</LI>\n"); + for( ; m_numlistlevel > 0; m_numlistlevel-- ) + { + buf.append("</OL>\n"); + } + } - return clean.toString(); - } + if( newLine && ch != '|' && m_istable ) + { + buf.append("</TABLE>\n"); + m_istable = false; + m_closeTag = null; + } - public WikiPage process(WikiPage wikiPage) { - WikiPage newPage = null; - try { - newPage = (WikiPage) wikiPage.clone(); - } catch (CloneNotSupportedException cnse) { - System.out.println("cannot clone the page: " + cnse); - } + switch (ch) { + case '\r': + // DOS linefeeds we forget + s = null; + break; - String newContent = parseLinks(newPage.getContent(), "dupa"); + case '\n': + // + // Close things like headings, etc. + // + if( m_closeTag != null ) + { + buf.append( m_closeTag ); + m_closeTag = null; + } - newPage.setPageContent(newContent); + m_isdefinition = false; - return newPage; - } + if( newLine ) + { + // Paragraph change. - public void next() { - // TODO Auto-generated method stub + buf.append("<P>\n"); + } + else + { + buf.append("\n"); + newLine = true; + } - } + break; + case '\\': + s = handleBackslash(); + break; - // public static void main(String[] args) { - // String wikitext = "__Forge Portal__FORGE USER HOW TO:\\\\\n" - // + "[Add a new project and modify its - // data|http://www.NewProject.com]\\\\\n" - // + "[Add and manage project downloads|Project Downloads]\\\\\n" - // + "[Add and manage project freezone|Project *Freezone]\\\\\n" - // + "[Project Freezone]\\\\\n" - // + "[http://www.google.com]\\\\\n"; - // WikiContext wc = new WikiContext(); - // - // String elements = parseLinks(wikitext, wc); - // - // System.out.println(elements); - // } - - public static void main (String[] args) { - HTMLTranslator ht = new HTMLTranslator(); - - WikiPage wp = new WikiPage("name", new Credentials("tomek"), "content", 1, new Date()); - - wp = ht.process(wp); - } + case '_': + s = handleUnderscore(); + break; + + case '\'': + s = handleApostrophe(); + break; + case '{': + s = handleOpenbrace(); + break; + + case '}': + s = handleClosebrace(); + break; + + case '-': + s = handleDash(); + break; + + case '!': + if( newLine ) + { + s = handleHeading(); + } + else + { + s = "!"; + } + break; + + case ';': + if( newLine ) + { + s = handleDefinitionList(); + } + else + { + s = ";"; + } + break; + + case ':': + if( m_isdefinition ) + { + s = "</DT><DD>"; + m_isdefinition = false; + } + else + { + s = ":"; + } + break; + + case '[': + s = handleOpenbracket(); + break; + + case '*': + if( newLine ) + { + s = handleUnorderedList(); + } + else + { + s = "*"; + } + break; + + case '#': + if( newLine ) + { + s = handleOrderedList(); + } + else + { + s = "#"; + } + break; + + case '|': + s = handleBar( newLine ); + break; + + case '<': + s = m_allowHTML ? "<" : "<"; + break; + + case '>': + s = m_allowHTML ? ">" : ">"; + break; + + case '\"': + s = m_allowHTML ? "\"" : """; + break; + + /* + case '&': + s = "&"; + break; + */ + case '~': + s = handleTilde(); + break; + case -1: + quitReading = true; + break; + + default: + buf.append((char) ch); + newLine = false; + break; + } + if (s != null) { + buf.append(s); + + newLine = false; + } + + } + translatedContent = buf.toString(); + // translatedContent = translatedContent.replace("\n", "<BR>\n"); + // System.out.println("final string : "+ translatedContent); + + return translatedContent; + } + + /* a collection of all media formats allowed on wiki */ + private Collection getImagePatterns() { + ArrayList patterns = new ArrayList(); + for (int i = 0; i < mediaFormats.length; i++) { + patterns.add(mediaFormats[i]); + } + + return patterns; + } + + /** + * Generic escape of next character or entity. + */ + private String handleTilde() + throws IOException + { + int ch = nextToken(); + + if( ch == '|' ) + return "|"; + + if( Character.isUpperCase( (char) ch ) ) + { + return String.valueOf( (char)ch ); + } + + // No escape. + pushBack( ch ); + + return "~"; + } + + private String handleUnderscore() throws IOException { + int ch = nextToken(); + String res = "_"; + + if (ch == '_') { + res = m_isbold ? "</B>" : "<B>"; + m_isbold = !m_isbold; + } else { + pushBack(ch); + } + + return res; + } + + /** + * For example: italics. + */ + private String handleApostrophe() throws IOException { + int ch = nextToken(); + String res = "'"; + + if (ch == '\'') { + res = m_isitalic ? "</I>" : "<I>"; + m_isitalic = !m_isitalic; + } else { + m_in.unread(ch); + } + + return res; + } + + private String handleDash() throws IOException { + int ch = nextToken(); + + if (ch == '-') { + int ch2 = nextToken(); + + if (ch2 == '-') { + int ch3 = nextToken(); + + if (ch3 == '-') { + // Empty away all the rest of the dashes. + // Do not forget to return the first non-match back. + while ((ch = nextToken()) == '-') + ; + + pushBack(ch); + return "<HR />"; + } + + pushBack(ch3); + } + pushBack(ch2); + } + + pushBack(ch); + + return "-"; + } + + private String handleHeading() throws IOException { + StringBuffer buf = new StringBuffer(); + + int ch = nextToken(); + + if (ch == '!') { + int ch2 = nextToken(); + + if (ch2 == '!') { + buf.append("<H2>"); + m_closeTag = "</H2>"; + } else { + buf.append("<H3>"); + m_closeTag = "</H3>"; + pushBack(ch2); + } + } else { + buf.append("<H4>"); + m_closeTag = "</H4>"; + pushBack(ch); + } + + return buf.toString(); + } + + private String handleUnorderedList() throws IOException { + StringBuffer buf = new StringBuffer(); + + if (m_listlevel > 0) { + buf.append("</LI>\n"); + } + + int numBullets = countChars(m_in, '*') + 1; + + if (numBullets > m_listlevel) { + for (; m_listlevel < numBullets; m_listlevel++) + buf.append("<UL>\n"); + } else if (numBullets < m_listlevel) { + for (; m_listlevel > numBullets; m_listlevel--) + buf.append("</UL>\n"); + } + + buf.append("<LI>"); + + return buf.toString(); + } + + private String handleOrderedList() throws IOException { + StringBuffer buf = new StringBuffer(); + + if (m_numlistlevel > 0) { + buf.append("</LI>\n"); + } + + int numBullets = countChars(m_in, '#') + 1; + + if (numBullets > m_numlistlevel) { + for (; m_numlistlevel < numBullets; m_numlistlevel++) + buf.append("<OL>\n"); + } else if (numBullets < m_numlistlevel) { + for (; m_numlistlevel > numBullets; m_numlistlevel--) + buf.append("</OL>\n"); + } + + buf.append("<LI>"); + + return buf.toString(); + + } + + private int countChars(PushbackReader in, char c) throws IOException { + int count = 0; + int ch; + + while ((ch = in.read()) != -1) { + if ((char) ch == c) { + count++; + } else { + in.unread(ch); + break; + } + } + + return count; + } + + private String handleBar( boolean newLine ) + throws IOException +{ + StringBuffer sb = new StringBuffer(); + + if( !m_istable && !newLine ) + { + return "|"; + } + + if( newLine ) + { + if( !m_istable ) + { + sb.append("<TABLE CLASS=\"wikitable\" BORDER=\"1\">\n"); + m_istable = true; + } + + sb.append("<TR>"); + m_closeTag = "</TD></TR>"; + } + + int ch = nextToken(); + + if( ch == '|' ) + { + if( !newLine ) + { + sb.append("</TH>"); + } + sb.append("<TH>"); + m_closeTag = "</TH></TR>"; + } + else + { + if( !newLine ) + { + sb.append("</TD>"); + } + sb.append("<TD>"); + pushBack( ch ); + } + + return sb.toString(); +} + + + private String handleDefinitionList() throws IOException { + if (!m_isdefinition) { + m_isdefinition = true; + + m_closeTag = "</DD>\n</DL>"; + + return "<DL>\n<DT>"; + } + + return ";"; + } + + private String handleBackslash() throws IOException { + int ch = nextToken(); + + if (ch == '\\') { + int ch2 = nextToken(); + + if (ch2 == '\\') { + return "<BR clear=\"all\" />"; + } + + pushBack(ch2); + + return "<BR />"; + } + + pushBack(ch); + + return "\\"; + } + + private String handleOpenbracket() throws IOException { + StringBuffer sb = new StringBuffer(); + int ch; + boolean isPlugin = false; + + while ((ch = nextToken()) == '[') { + sb.append((char) ch); + } + + if (sb.length() > 0) { + return sb.toString();//not a link + } + + // + // Find end of hyperlink + // + pushBack(ch); + ch = nextToken(); + + while (ch != -1) { + if (ch == ']')//&& (!isPlugin || sb.charAt( sb.length()-1 ) == '}' + // ) ) + { + break; + } + + sb.append((char) ch); + + ch = nextToken(); + } + + if (ch == -1) { + + return sb.toString(); + } + + return handleHyperlinks(sb.toString()); + } + + private String handleOpenbrace() throws IOException { + int ch = nextToken(); + String res = "{"; + + if (ch == '{') { + int ch2 = nextToken(); + + if (ch2 == '{') { + res = "<PRE>"; + m_isPre = true; + } else { + pushBack(ch2); + + res = "<TT>"; + m_isTypedText = true; + } + } else { + pushBack(ch); + } + + return res; + } + + /** + * Handles both }} and }}} + */ + private String handleClosebrace() throws IOException { + String res = "}"; + + int ch2 = nextToken(); + + if (ch2 == '}') { + int ch3 = nextToken(); + + if (ch3 == '}') { + if (m_isPre) { + m_isPre = false; + res = "</PRE>"; + } else { + res = "}}}"; + } + } else { + pushBack(ch3); + + if (!m_isPre) { + res = "</TT>"; + m_isTypedText = false; + } else { + pushBack(ch2); + } + } + } else { + pushBack(ch2); + } + + return res; + } + + /** + * @param string + * @return + */ + private String handleHyperlinks(String link) { + String result = ""; + int border = link.indexOf('|'); + if (border != -1) { + if (isExternalLink(link.substring(border + 1)))//case + // [...|externallink] + { + result = "<a href=\"" + link.substring(border + 1) + "\">" + + link.substring(0, border - 1) + "</a>"; + } else //case [...|wikipagelink] + { + result = "<a href=\"" + portalHome + wikiHome + actionType + + "action" + page + + cleanLink(link.substring(border + 1)) + "\">" + + link.substring(0, border - 1) + "</a>"; + } + + } else //[...] case + { + if (isExternalLink(link)) { + result = "<a href=\"" + link + "\">" + link + "</a>"; + } else { + result = "<a href=\"" + portalHome + wikiHome + actionType + + "action" + page + cleanLink(link) + "\">" + link + + "</a>"; + } + } + + return result; + } + + /** + * Figures out if a link is an off-site link. This recognizes the most + * common protocols by checking how it starts. + */ + private boolean isExternalLink(String link) { + return link.startsWith("http:") || link.startsWith("ftp:") + || link.startsWith("https:") || link.startsWith("mailto:") + || link.startsWith("news:") || link.startsWith("file:"); + } + + public String prepareText(String text) { + int index; + + { + index = text.indexOf('$', 0); + } + System.out.println("index of $ " + index); + + if (index != -1) + return text.substring(0, index - 1) + '\\' + "$" + + prepareText(text.substring(index + 1)); + else { + + return text; + } + } + + private int nextToken() throws IOException { + return m_in.read(); + } + + /** + * Push back any character to the current input. Does not push back a read + * EOF, though. + */ + + /** + * Cleans a Wiki name. + * <P>[ This is a link ] -> ThisIsALink + * + * @param link + * Link to be cleared. Null is safe, and causes this to return + * null. + * @return A cleaned link. + * + * @since 2.0 + */ + public String cleanLink(String link) { + StringBuffer clean = new StringBuffer(); + + if (link == null) + return null; + + // + // Compress away all whitespace and capitalize + // all words in between. + // + + StringTokenizer st = new StringTokenizer(link, " -"); + + while (st.hasMoreTokens()) { + StringBuffer component = new StringBuffer(st.nextToken()); + + component.setCharAt(0, Character.toUpperCase(component.charAt(0))); + + // + // We must do this, because otherwise compiling on JDK 1.4 causes + // a downwards incompatibility to JDK 1.3. + // + clean.append(component.toString()); + } + + // + // Remove non-alphanumeric characters that should not + // be put inside WikiNames. Note that all valid + // Unicode letters are considered okay for WikiNames. + // It is the problem of the WikiPageProvider to take + // care of actually storing that information. + // + + for (int i = 0; i < clean.length(); i++) { + if (!(Character.isLetterOrDigit(clean.charAt(i)) + || clean.charAt(i) == '_' || clean.charAt(i) == '.')) { + clean.deleteCharAt(i); + --i; // We just shortened this buffer. + } + } + + return clean.toString(); + } + + public WikiPage process(WikiPage wikiPage) { + WikiPage newPage = null; + + try { + newPage = (WikiPage) wikiPage.clone(); + } catch (CloneNotSupportedException cnse) { + System.out.println("cannot clone the page: " + cnse); + } + + try { + String newContent = parseLinks(newPage.getContent()); + + newPage.setPageContent(newContent); + + return newPage; + } catch (IOException e) { + System.out.println(e); + newPage.setPageContent("error on page"); + } + return newPage; + } + + public void next() { + // TODO Auto-generated method stub + + } + + // public static void main(String[] args) { + // String wikitext = "__Forge Portal__FORGE USER HOW TO:\\\\\n" + // + "[Add a new project and modify its + // data|http://www.NewProject.com]\\\\\n" + // + "[Add and manage project downloads|Project Downloads]\\\\\n" + // + "[Add and manage project freezone|Project *Freezone]\\\\\n" + // + "[Project Freezone]\\\\\n" + // + "[http://www.google.com]\\\\\n"; + // WikiContext wc = new WikiContext(); + // + // String elements = parseLinks(wikitext, wc); + // + // System.out.println(elements); + // } + + // public static void main(String[] args) { + // HTMLTranslator ht = new HTMLTranslator(); + // + // WikiPage wp = new WikiPage("name", new Credentials("tomek"), "content", + // 1, new Date()); + // + // wp = ht.process(wp); + // } + } \ No newline at end of file |
Author: adamw Date: 2005-08-15 16:34:06 -0400 (Mon, 15 Aug 2005) New Revision: 862 Added: trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/navigator/ trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/navigator/table/ trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/navigator/table/header.jsp trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/secure/views/navigator/ trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/secure/views/navigator/rnotes.jsp Modified: trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/WEB-INF/classes/actions.xml Log: Release notes view Modified: trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/WEB-INF/classes/actions.xml =================================================================== --- trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/WEB-INF/classes/actions.xml 2005-08-15 16:30:57 UTC (rev 861) +++ trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/WEB-INF/classes/actions.xml 2005-08-15 20:34:06 UTC (rev 862) @@ -1293,6 +1293,7 @@ <view name="excel-current">/secure/views/navigator/navigator-excel-current.jsp</view> <view name="full">/secure/views/navigator/navigator-full.jsp</view> <view name="error">/secure/views/navigator/navigator.jsp</view> + <view name="rnotes">/secure/views/navigator/rnotes.jsp</view> </action> <action name="issue.ViewIssue" alias="ViewIssue"> Added: trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/navigator/table/header.jsp =================================================================== --- trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/navigator/table/header.jsp 2005-08-15 16:30:57 UTC (rev 861) +++ trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/navigator/table/header.jsp 2005-08-15 20:34:06 UTC (rev 862) @@ -0,0 +1,97 @@ +<%@ taglib uri="sitemesh-page" prefix="page" %> +<%@ taglib uri="webwork" prefix="webwork" %> +<page:applyDecorator name="jirapanel"> + <page:param name="title"><webwork:property value="text('navigator.title')"/><webwork:if test="searchRequest/name"> -- <webwork:property value="searchRequest/name"/></webwork:if></page:param> + <page:param name="description"> + <webwork:if test="$decorator == 'printable'"> + <jsp:include page="/includes/navigator/search-request_description.jsp" /> + <br/> + </webwork:if> + + <%-- Test if we have any issues that were found --%> + <webwork:if test="/searchResults/total == 0"> + <webwork:text name="'navigator.results.nomatchingissues'"/> + </webwork:if> + <webwork:else> + <webwork:text name="'navigator.results.displayissues'"> + <webwork:param name="'value0'"><b><webwork:property value="/searchResults/niceStart" /></b></webwork:param> + <webwork:param name="'value1'"><b><webwork:property value="/searchResults/end" /></b></webwork:param> + <webwork:param name="'value2'"><b><webwork:property value="/searchResults/total" /></b></webwork:param> + </webwork:text> <webwork:if test="'printable' == $decorator"><webwork:text name="'navigator.results.asat'"><webwork:param name="'value0'"><b><webwork:property value="/outlookDate/formatDMYHMS(/outlookDate/now)"/></b></webwork:param></webwork:text></webwork:if><br> + </webwork:else> + + </page:param> + <page:param name="width">100%</page:param> + + <jsp:include page="/includes/errormessages.jsp" /> + + <%-- Only show the views if there are issues that match the search criteria--%> + <webwork:if test="/searchResults/total > 0 && 'printable' != $decorator"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr> + <td valign="bottom" width=80%><b><webwork:text name="'navigator.results.currentview'"/>:</b><br> + <webwork:if test="'bulk' != $view && 'rnotes' != $view"> + <webwork:text name="'navigator.results.currentview.browser'"/> + </webwork:if> + <webwork:else> + <a href="<webwork:url><webwork:param name="'view'" value="''" /><webwork:param name="'tempMax'" value="'-1'" /><webwork:param name="'decorator'" value="''" /></webwork:url>"><webwork:text name="'navigator.results.currentview.browser'"/></a> + </webwork:else> + | <a href="<webwork:url><webwork:param name="'view'" value="''" /><webwork:param name="'mode'" value="'hide'" /><webwork:param name="'start'" value="'0'" /><webwork:param name="'tempMax'" value="'1000'" /><webwork:param name="'decorator'" value="'printable'" /></webwork:url>"><webwork:text name="'navigator.results.currentview.printable'"/></a> + | <a href="<%= request.getContextPath() %>/secure/IssueNavigator.jspa?view=rss&<webwork:property value="SRQueryString" />&tempMax=25&reset=true&decorator=none"><webwork:text name="'navigator.results.currentview.xml'"/></a> + <webwork:if test="'rnotes' != $view"> + | <a href="<%= request.getContextPath() %>/secure/IssueNavigator.jspa?view=rnotes"> + <webwork:text name="Release Notes"/></a> + </webwork:if> + <webwork:else> + | <webwork:text name="Release Notes"/> + </webwork:else> + | <a href="<webwork:url page="/secure/IssueNavigator.jspa"><webwork:param name="'view'" value="'full'"/><webwork:param name="'tempMax'" value="'30'"/></webwork:url>"><webwork:text name="'navigator.results.currentview.full'"/></a> + | <webwork:text name="'navigator.results.currentview.excel'"/> <span class="subText"> + (<a href="<webwork:url page="/secure/IssueNavigator.jspa"><webwork:param name="'view'" value="'excel'"/><webwork:param name="'tempMax'" value="'1000'"/></webwork:url>"><webwork:text name="'navigator.results.currentview.excel.full'"/></a> + | <a href="<webwork:url page="/secure/IssueNavigator.jspa"><webwork:param name="'view'" value="'excel-current'"/></webwork:url>"><webwork:text name="'navigator.results.currentview.excel.current'"/></a>) + </span> + <webwork:component name="'navigatorviews'" template="help.jsp"> + <webwork:param name="'align'" value="'middle'"/> + </webwork:component> + </td> + <td valign="bottom" align="left" width=20% nowrap> + <webwork:if test="hasBulkEditPermissionForSearchRequest == true"> + <img src="<%= request.getContextPath() %>/images/icons/bullet_creme.gif" height=8 width=8 border=0 align=absmiddle> + <b><webwork:text name="'navigator.results.currentview.bulkchange'"/></b> + <a id="bulkedit_all" href="<webwork:url page="/secure/views/bulkedit/BulkEdit1!default.jspa"><webwork:param name="'reset'" value="'true'"/><webwork:param name="'tempMax'" value="/searchResults/total"/></webwork:url>"><webwork:text name="'navigator.results.currentview.bulkchange.allissues'"><webwork:param name="'value0'" value="/searchResults/total"/></webwork:text></a> + <%-- Show the 'All' link if there is more than one pager --%> + <webwork:if test="/searchResults/pages/size > 1"> + | <a id="bulkedit_curr_pg" href="<webwork:url page="/secure/views/bulkedit/BulkEdit1!default.jspa"><webwork:param name="'reset'" value="'true'"/></webwork:url>"><webwork:text name="'navigator.results.currentview.bulkchange.currentpage'"/></a> + </webwork:if> + </webwork:if> + + <webwork:if test="/remoteUser != null && /hasPermission('use')"> + <webwork:if test="/showOverrideColumnLayout == false"> + <br><img src="<%= request.getContextPath() %>/images/icons/bullet_creme.gif" height=8 width=8 border=0 align=absmiddle> + <webwork:text name="'navigator.results.configurenavigator'"> + <webwork:param name="'value0'"><a href="<%= request.getContextPath() %>/secure/ViewUserIssueColumns!default.jspa"><b></webwork:param> + <webwork:param name="'value1'"></b></a></webwork:param> + </webwork:text> + </webwork:if> + <webwork:else> + <br><img src="<%= request.getContextPath() %>/images/icons/bullet_creme.gif" height=8 width=8 border=0 align=absmiddle> + <webwork:text name="'navigator.results.useyourcolumns'"> + <webwork:param name="'value0'"><a href="<%= request.getContextPath() %>/secure/IssueNavigator!columnOverride.jspa"><b></webwork:param> + <webwork:param name="'value1'"></b></a></webwork:param> + </webwork:text> + </webwork:else> + </webwork:if> + + <webwork:if test="/hasSearchRequestColumnLayout() == true && /showOverrideColumnLayout == false"> + <br><img src="<%= request.getContextPath() %>/images/icons/bullet_creme.gif" height=8 width=8 border=0 align=absmiddle> + <webwork:text name="'navigator.results.usefilterscolumns'"> + <webwork:param name="'value0'"><a href="<%= request.getContextPath() %>/secure/IssueNavigator!columnOverride.jspa"><b></webwork:param> + <webwork:param name="'value1'"></b></a></webwork:param> + </webwork:text> + </webwork:if> + </td> + </tr> + </table> + </webwork:if> + +</page:applyDecorator> Added: trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/secure/views/navigator/rnotes.jsp =================================================================== --- trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/secure/views/navigator/rnotes.jsp 2005-08-15 16:30:57 UTC (rev 861) +++ trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/secure/views/navigator/rnotes.jsp 2005-08-15 20:34:06 UTC (rev 862) @@ -0,0 +1,127 @@ +<%@ page import="com.atlassian.jira.web.component.IssueTableLayoutBean, + com.atlassian.jira.web.component.IssuePager, + java.util.*, + org.ofbiz.core.entity.GenericValue, + com.atlassian.jira.ComponentManager, + com.atlassian.jira.issue.search.util.QueryCreator, + com.atlassian.jira.web.action.issue.IssueNavigator, + com.atlassian.jira.web.component.IssueTableWebComponent, + com.atlassian.jira.issue.search.SearchResults, + com.atlassian.jira.config.ConstantsManager"%> +<%@ taglib uri="webwork" prefix="webwork" %> +<%@ taglib uri="sitemesh-page" prefix="page" %> + +<!-- JIRA PART --> + +<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="ffffff"> + <tr> + <!-- This is here to get around a rendering problem on Mozilla which manifests when viewing the page + over a relatively slow connection. The filterform is rendered to take up more than half the page. By + givving a 'relative' row to the browser first we ensure that the rest of the rows are rendered similarly and + hence the width of the filterform column is fixed. Fixes JRA-5116 --> + <webwork:if test="/mode == 'show'"> + <td width="300" bgcolor="ffffff"></td> + </webwork:if> + <webwork:else> + <td width="214" bgcolor="f0f0f0"></td> + </webwork:else> + <td width="1"><img src="<webwork:url page="/images/border/spacer.gif"/>" height="1" width="1"></td> + <td width="100%"></td> + </tr> + +<tr> + <webwork:if test="/mode == 'show'"> + <td width="300" valign="top" bgcolor="ffffff"> + <jsp:include page="/includes/navigator/filter-form.jsp" flush="false" /> + </td> + </webwork:if> + <webwork:else> + <td width="214" valign="top" bgcolor="f0f0f0"> + <jsp:include page="/includes/navigator/summary-pane.jsp" flush="false" /> + </td> + </webwork:else> + <td width="1" bgcolor="bbbbbb"><img src="<webwork:url page="/images/border/spacer.gif"/>" height="1" width="1"></td> +<td valign="top"> + <table cellspacing="0" cellpadding="10" border="0" width="100%"><tr><td> + +<webwork:if test="/searchResults"> + <jsp:include page="/includes/navigator/table/header.jsp"/> +</webwork:if> +<webwork:else> + <page:applyDecorator name="jirapanel"> + <page:param name="title"><webwork:property value="text('navigator.title')"/></page:param> + <page:param name="width">100%</page:param> + <p> + <webwork:text name="'navigator.desc1'"/> + </p> + <p> + <webwork:text name="'navigator.desc2'"/> + </p> + <jsp:include page="/includes/errormessages.jsp" /> + </page:applyDecorator> +</webwork:else> + +<!-- JBoss part --> + +<webwork:if test="/hasErrorMessages == false && /hasErrors == false" > +<webwork:property value="/" id="issueNavigator" /> +<% + IssueNavigator issueNavigator = (IssueNavigator) request.getAttribute("issueNavigator"); + SearchResults searchResults = issueNavigator.getSearchResults(); + Collection issues = searchResults.getIssues(); + + Iterator iter; + /* Map: issue type id -> (Set of issue) */ + Map issuesMap = new TreeMap(); + /* Map: issue type id -> issue name */ + Map issuesNamesMap = new HashMap(); + + List allIssueTypes = ComponentManager.getInstance().getConstantsManager().getAllIssueTypes(); + for (iter = allIssueTypes.iterator(); iter.hasNext();) { + GenericValue issueType = (GenericValue)iter.next(); + issuesNamesMap.put(issueType.getString("id"), issueType.getString("name")); + } + + /* Preparing issueMap */ + for (iter = issuesNamesMap.keySet().iterator(); iter.hasNext();) + issuesMap.put(iter.next(), new TreeSet()); + + /* Filling sets in issueMap */ + for (iter = issues.iterator(); iter.hasNext();) { + GenericValue issue = (GenericValue) iter.next(); + ((Set)issuesMap.get(issue.getString("type"))).add(issue); + } + + for (iter = issuesMap.keySet().iterator(); iter.hasNext();) { + String typeId = (String) iter.next(); + Set currIssues = (Set) issuesMap.get(typeId); + if (currIssues.size() > 0) { +%> + <h2><%= issuesNamesMap.get(typeId) %></h2> + + <ul> + <% + for (Iterator iter2 = currIssues.iterator(); iter2.hasNext();) { + GenericValue issue = (GenericValue) iter2.next(); + %> + <li> + [ <a href="<%= request.getContextPath() %>/browse/<%= issue.getString("key") %>"> + <%= issue.getString("key") %> + </a> ] + <%= issue.getString("summary") %> + </li> + <% + } + %> + </ul> +<% + } + } +%> +</webwork:if> + +<!-- JIRA PART --> + + </td></tr></table> +</td></tr> +</table> |
From: <jbo...@li...> - 2005-08-15 16:32:25
|
Author: aron.gombas Date: 2005-08-15 12:30:57 -0400 (Mon, 15 Aug 2005) New Revision: 861 Modified: trunk/labs/kosmos/conf-portlet/jboss-portal/kosmos-pages.xml Log: Page renamed Modified: trunk/labs/kosmos/conf-portlet/jboss-portal/kosmos-pages.xml =================================================================== --- trunk/labs/kosmos/conf-portlet/jboss-portal/kosmos-pages.xml 2005-08-15 16:30:21 UTC (rev 860) +++ trunk/labs/kosmos/conf-portlet/jboss-portal/kosmos-pages.xml 2005-08-15 16:30:57 UTC (rev 861) @@ -1,7 +1,7 @@ <pages> <portal-name>default</portal-name> <page> - <page-name>kosmos-page</page-name> + <page-name>Kosmos</page-name> <window> <window-name>LocalCcMonitoring</window-name> |
From: <jbo...@li...> - 2005-08-15 16:31:44
|
Author: aron.gombas Date: 2005-08-15 12:30:21 -0400 (Mon, 15 Aug 2005) New Revision: 860 Modified: trunk/labs/kosmos/xdocs/reference/reference-manual.xml Log: Deployment docs updated Modified: trunk/labs/kosmos/xdocs/reference/reference-manual.xml =================================================================== --- trunk/labs/kosmos/xdocs/reference/reference-manual.xml 2005-08-15 15:41:48 UTC (rev 859) +++ trunk/labs/kosmos/xdocs/reference/reference-manual.xml 2005-08-15 16:30:21 UTC (rev 860) @@ -675,7 +675,9 @@ portlets separately. Please note that however we listed recommended container implementations below, you can use any other product until that is compliant with the appropriate - servlet or portlet specifications.</para> + servlet or portlet specifications. You can learn more about + the compatibity issues by studying the compatibility matrix + maintained on the project website.</para> <para> @@ -683,6 +685,20 @@ <listitem> + <para>We offer deployment scripts in form of Ant build + scripts, which automatize the deployment process. If you + want to use these, you will need to install Ant. + The default target of each script is <literal>redeploy</literal>, + which deletes the old deployment (if there exists) and deploys a + new clean one. + Of course, you can still deploy manually if Ant is not available in + your environment. Even in this case, it's a good idea to + look through the deploy scripts.</para> + + </listitem> + + <listitem> + <para>The server component requires standard servlet containers (or a single container) for proper running. The containers must implement the TODO what? servlet @@ -784,6 +800,12 @@ separate database servers for this purporse. It's all up to you, your needs and possibilities.</para> + <para>In the following sections, we give detailed step-by-step instructions + for various deployment scenarios, but because of their huge variety, + we will cover just some of those. After reading these, it should be + relatively easy to find out what to do in situations not listed here. + </para> + </section> <section> @@ -826,52 +848,17 @@ <listitem> - <para>The deployment of the server component and the - portlets are similar. The binaries are not distributed as - WAR archives, because not only these, but additional - vendor-dependent configuration files must be deployed to - the container. It means that the WAR content actually - appears as extracted files which you have to copy to the - container-managed deployment directory.</para> - - <para> - - Server component deployment: - <orderedlist> - - <listitem> - - <para>Copy the <filename>kosmos-portal.war</filename> - directory from the distributed package to your JBoss - deployment directory (e.g. <filename> - $JBOSS_ROOT/server/default/deploy</filename>).</para> - - </listitem> - - <listitem> - - <para>Copy the configuration files from the <filename> - conf/jboss-portal</filename> directory of the - distributed package to the <filename> - WEB-INF</filename> directory in your JBoss deployment - directory (e.g. <filename> - $JBOSS_ROOT/server/default/deploy/kosmos-server.war/WEB-INF</filename>).</para> - - </listitem> - - </orderedlist> - + <para>Run the server deploy script as: + <programlisting>ant -f deploy-server-jboss-as.xml</programlisting> </para> </listitem> <listitem> - <para>Portlet deployment: it is same like the previous - step, but you have copy the <literal> - kosmos-portlet.war</literal> directory and the - configuration files go to <filename> - $JBOSS_ROOT/server/default/deploy/kosmos-portlet.war/WEB-INF</filename>.</para> + <para>Run the portlet deploy script as: + <programlisting>ant -f deploy-portlet-jboss-portal.xml</programlisting> + </para> </listitem> @@ -879,8 +866,8 @@ <para>Lauch JBoss AS and check the default portal page (e.g. <literal>http://localhost:8080/portal</literal>), - whether you can see the <literal>kosmos</literal> page - there.</para> + whether you can see the <literal>Kosmos</literal> page + in the page list.</para> </listitem> @@ -894,7 +881,7 @@ <section> - <title>Deployment step-by-step for Apache Pluto</title> + <title>Deployment step-by-step for Apache Tomcat and Apache Pluto</title> <para> @@ -903,30 +890,38 @@ <listitem> - <para>TODO what to do with the server component? - </para> - - </listitem> - - <listitem> - <para>Install Pluto as written in its manual. We recommend using the bundle distribution, because that contains both the Apache Tomcat servlet container and the Pluto portlet container in a single package. - You can find Pluto at <ulink url="http://portals.apache.org/pluto/"> - http://portals.apache.org/pluto/</ulink> site.</para> + You can find Pluto at <ulink url="http://portals.apache.org/pluto"> + http://portals.apache.org/pluto</ulink> site.</para> </listitem> <listitem> + <para>You can deploy the server component into the Apache Tomcat + instance used by Pluto, by running the server deploy script: + <programlisting>ant -f deploy-server-tomcat.xml</programlisting> + </para> + + </listitem> + + <listitem> + <para>Pluto has a portlet to deploy other portlets. It makes the deployment process extremely easy: just select the portlet WAR and configure the pages, Pluto will take care of all the low-level details. Don't forget to restart Pluto after you've deployed your portlets, otherwise your new portal page won't appear in the - menu!</para> + menu!</para> + + <para>If for some reason you decided to do an automated deployment + instead of using the administrative portlet, run the portlet deploy script as: + <programlisting>ant -f deploy-portlet-pluto.xml</programlisting> + </para> + </listitem> @@ -938,7 +933,7 @@ <section> - <title>Deployment step-by-step for Sun Server Portal</title> + <title>Deployment step-by-step for Sun Java System Portal Server</title> <para>TODO write this later</para> |
From: <jbo...@li...> - 2005-08-15 15:43:14
|
Author: aron.gombas Date: 2005-08-15 11:41:48 -0400 (Mon, 15 Aug 2005) New Revision: 859 Modified: trunk/labs/kosmos/xdocs/reference/reference-manual.xml Log: Updated URL Modified: trunk/labs/kosmos/xdocs/reference/reference-manual.xml =================================================================== --- trunk/labs/kosmos/xdocs/reference/reference-manual.xml 2005-08-15 15:40:58 UTC (rev 858) +++ trunk/labs/kosmos/xdocs/reference/reference-manual.xml 2005-08-15 15:41:48 UTC (rev 859) @@ -92,8 +92,8 @@ <para>You can always find the latest information about the Kosmos project, published by the community, at the JBoss Labs project - page: <ulink url="http://labs.jboss.com"> - http://labs.jboss.com</ulink>. Beside the downloads and + page: <ulink url="http://labs.jboss.com/projects/kosmos"> + http://labs.jboss.com/projects/kosmos</ulink>. Beside the downloads and documentation, we host also our Wiki and blog here, and this is our primary information resource. Come and visit us regularly.</para> @@ -924,7 +924,9 @@ <para>Pluto has a portlet to deploy other portlets. It makes the deployment process extremely easy: just select the portlet WAR and configure the pages, Pluto will take care of all the low-level - details.</para> + details. Don't forget to restart Pluto after you've deployed + your portlets, otherwise your new portal page won't appear in the + menu!</para> </listitem> |
From: <jbo...@li...> - 2005-08-15 15:42:24
|
Author: aron.gombas Date: 2005-08-15 11:40:58 -0400 (Mon, 15 Aug 2005) New Revision: 858 Modified: trunk/labs/kosmos/build-portlet.xml trunk/labs/kosmos/build-server.xml Log: Standardized build scripts Modified: trunk/labs/kosmos/build-portlet.xml =================================================================== --- trunk/labs/kosmos/build-portlet.xml 2005-08-15 15:40:22 UTC (rev 857) +++ trunk/labs/kosmos/build-portlet.xml 2005-08-15 15:40:58 UTC (rev 858) @@ -4,6 +4,7 @@ <project basedir="." default="redeploy" name="Kosmos Portlet"> <description>Kosmos Portlet Module build-script</description> - <property file="build/portlet-module.properties"/> + <property name="module.name" value="portlet"/> + <property name="container.name" value="jboss-portal"/> <import file="build/build.xml"/> </project> Modified: trunk/labs/kosmos/build-server.xml =================================================================== --- trunk/labs/kosmos/build-server.xml 2005-08-15 15:40:22 UTC (rev 857) +++ trunk/labs/kosmos/build-server.xml 2005-08-15 15:40:58 UTC (rev 858) @@ -4,6 +4,7 @@ <project basedir="." default="redeploy" name="Kosmos Server"> <description>Kosmos Server Module build-file</description> - <property file="build/server-module.properties"/> + <property name="module.name" value="server"/> + <property name="container.name" value="jboss-as"/> <import file="build/build.xml"/> </project> |
From: <jbo...@li...> - 2005-08-15 15:41:57
|
Author: aron.gombas Date: 2005-08-15 11:40:22 -0400 (Mon, 15 Aug 2005) New Revision: 857 Added: trunk/labs/kosmos/deploy-portlet-jboss-portal.xml trunk/labs/kosmos/deploy-portlet-pluto.xml trunk/labs/kosmos/deploy-server-jboss-as.xml trunk/labs/kosmos/deploy-server-tomcat.xml Log: Initial checkin for deploy scripts Added: trunk/labs/kosmos/deploy-portlet-jboss-portal.xml =================================================================== --- trunk/labs/kosmos/deploy-portlet-jboss-portal.xml 2005-08-15 15:39:18 UTC (rev 856) +++ trunk/labs/kosmos/deploy-portlet-jboss-portal.xml 2005-08-15 15:40:22 UTC (rev 857) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Kosmos Portlet deploy-script for JBoss Portal --> +<!-- $Id$ --> +<project basedir="." default="redeploy" name="Kosmos Portlet on JBoss Portal"> + <description>Kosmos Portlet Module deploy-file</description> + + <property name="module.name" value="portlet"/> + <property name="container.name" value="jboss-portal"/> + <import file="build/deploy.xml"/> +</project> Added: trunk/labs/kosmos/deploy-portlet-pluto.xml =================================================================== --- trunk/labs/kosmos/deploy-portlet-pluto.xml 2005-08-15 15:39:18 UTC (rev 856) +++ trunk/labs/kosmos/deploy-portlet-pluto.xml 2005-08-15 15:40:22 UTC (rev 857) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Kosmos Portlet deploy-script for JBoss Portal --> +<!-- $Id$ --> +<project basedir="." default="redeploy" name="Kosmos Portlet on JBoss Portal"> + <description>Kosmos Portlet Module deploy-file</description> + + <property name="module.name" value="portlet"/> + <property name="container.name" value="pluto"/> + <import file="build/deploy.xml"/> +</project> Added: trunk/labs/kosmos/deploy-server-jboss-as.xml =================================================================== --- trunk/labs/kosmos/deploy-server-jboss-as.xml 2005-08-15 15:39:18 UTC (rev 856) +++ trunk/labs/kosmos/deploy-server-jboss-as.xml 2005-08-15 15:40:22 UTC (rev 857) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Kosmos Portlet deploy-script for JBoss Portal --> +<!-- $Id$ --> +<project basedir="." default="redeploy" name="Kosmos Portlet on JBoss Portal"> + <description>Kosmos Server Module deploy-file</description> + + <property name="module.name" value="server"/> + <property name="container.name" value="jboss-as"/> + <import file="build/deploy.xml"/> +</project> Added: trunk/labs/kosmos/deploy-server-tomcat.xml =================================================================== --- trunk/labs/kosmos/deploy-server-tomcat.xml 2005-08-15 15:39:18 UTC (rev 856) +++ trunk/labs/kosmos/deploy-server-tomcat.xml 2005-08-15 15:40:22 UTC (rev 857) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Kosmos Portlet deploy-script for JBoss Portal --> +<!-- $Id$ --> +<project basedir="." default="redeploy" name="Kosmos Portlet on JBoss Portal"> + <description>Kosmos Server Module deploy-file</description> + + <property name="module.name" value="server"/> + <property name="container.name" value="tomcat"/> + <import file="build/deploy.xml"/> +</project> |
From: <jbo...@li...> - 2005-08-15 15:40:41
|
Author: aron.gombas Date: 2005-08-15 11:39:18 -0400 (Mon, 15 Aug 2005) New Revision: 856 Added: trunk/labs/kosmos/conf-server/jboss-as/ trunk/labs/kosmos/conf-server/jboss-as/readme.txt Log: Updated server config scripts Added: trunk/labs/kosmos/conf-server/jboss-as/readme.txt =================================================================== --- trunk/labs/kosmos/conf-server/jboss-as/readme.txt 2005-08-15 15:38:20 UTC (rev 855) +++ trunk/labs/kosmos/conf-server/jboss-as/readme.txt 2005-08-15 15:39:18 UTC (rev 856) @@ -0,0 +1,2 @@ +There are no special config files for JBoss AS. +Please refer to the reference manual for more details. |
From: <jbo...@li...> - 2005-08-15 15:39:43
|
Author: aron.gombas Date: 2005-08-15 11:38:20 -0400 (Mon, 15 Aug 2005) New Revision: 855 Added: trunk/labs/kosmos/conf-server/tomcat/ trunk/labs/kosmos/conf-server/tomcat/readme.txt Removed: trunk/labs/kosmos/conf-server/jboss-portal/ Log: Updated server config scripts Added: trunk/labs/kosmos/conf-server/tomcat/readme.txt =================================================================== --- trunk/labs/kosmos/conf-server/tomcat/readme.txt 2005-08-15 15:36:56 UTC (rev 854) +++ trunk/labs/kosmos/conf-server/tomcat/readme.txt 2005-08-15 15:38:20 UTC (rev 855) @@ -0,0 +1,2 @@ +There are no special config files for Apache Tomcat. +Please refer to the reference manual for more details. |
From: <jbo...@li...> - 2005-08-15 15:38:32
|
Author: aron.gombas Date: 2005-08-15 11:36:56 -0400 (Mon, 15 Aug 2005) New Revision: 854 Added: trunk/labs/kosmos/build/deploy.xml trunk/labs/kosmos/build/portlet-jboss-portal-deploy.properties trunk/labs/kosmos/build/portlet-pluto-deploy.properties trunk/labs/kosmos/build/server-jboss-as-deploy.properties trunk/labs/kosmos/build/server-tomcat-deploy.properties Modified: trunk/labs/kosmos/build/build.xml trunk/labs/kosmos/build/portlet-module.properties trunk/labs/kosmos/build/server-module.properties Log: Update build script, initial checkin for deploy script Modified: trunk/labs/kosmos/build/build.xml =================================================================== --- trunk/labs/kosmos/build/build.xml 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/build.xml 2005-08-15 15:36:56 UTC (rev 854) @@ -9,25 +9,27 @@ <!-- $Id$ --> <project basedir="." default="redeploy" name="Kosmos"> <description>Kosmos build-script template used by the module-dependent build-scripts</description> - - <property file="build/kosmos-project.properties"/> - <property name="module.name.short" value="${project.name.short}-${module.name}"/> - <property name="module.name.full" value="${project.name.short}-${module.name}-${project.version}"/> - <!-- External paths --> + <!-- external paths --> <property name="docbook.dir" location="/Java/docbook-xsl-1.69.0"/> <property name="fop.dir" location="/Java/fop-0.20.5"/> <property name="saxon.dir" location="/Java/saxonb-8.5"/> - <!-- Generated paths --> + <!-- read basic properties --> <property environment="env"/> + <property file="build/kosmos-project.properties"/> + <property file="build/${module.name}-module.properties"/> + <property name="module.name.short" value="${project.name.short}-${module.name}"/> + <property name="module.name.full" value="${project.name.short}-${module.name}-${project.version}"/> + + <!-- generated paths --> <property name="build.dir" location="build"/> <property name="conf.dir" location="conf-${module.name}"/> <property name="src.dir" location="src"/> <property name="web.dir" location="web-${module.name}"/> <property name="xdocs.dir" location="xdocs"/> - <property name="reference.dir" location="${xdocs.dir}/reference"/> + <property name="war.name" value="${module.name.short}.war"/> <property name="container.dir" location="${env.JBOSS_HOME}/server/default/deploy/${war.name}"/> @@ -35,7 +37,7 @@ <property name="dist-bin.root.dir" location=".dist-bin-${module.name}"/> <property name="dist-bin.dir" location="${dist-bin.root.dir}/${module.name.full}"/> - <property name="dist-bin.bin.dir" location="${dist-bin.dir}/${war.name}"/> + <property name="dist-bin.bin.dir" location="${dist-bin.dir}/${war.name}-expanded"/> <property name="dist-bin.classes.dir" location="${dist-bin.bin.dir}/WEB-INF/classes"/> <property name="dist-bin.docs.reference.dir" location="${dist-bin.dir}/docs/reference"/> @@ -43,7 +45,7 @@ <property name="dist-src.dir" location="${dist-src.root.dir}/${module.name.full}"/> <property name="dist-src.docs.api.dir" location="${dist-src.dir}/docs/api"/> - <!-- Targets --> + <!-- targets --> <target name="init"> <echo message="============================================================"/> <echo message="${project.name} - ${module.name} ${project.version}"/> @@ -99,7 +101,7 @@ </copy> <!-- copy container-dependent resources --> <copy todir="${container.dir}/WEB-INF"> - <fileset dir="${conf.dir}/jboss-portal"/> + <fileset dir="${conf.dir}/${container.name}"/> </copy> <!-- it doesn't restart the container! --> </target> @@ -139,42 +141,53 @@ <target name="dist-src" depends="init,clean,javadocs" description="Prepares all source distributables"> <mkdir dir="${dist-src.dir}"/> - <!-- copy all resources --> - <copy todir="${dist-src.dir}" file="build-${module.name}.xml"/> - <copy todir="${dist-src.dir}/build"> + <!-- copy other resources --> + <copy todir="${dist-src.dir}"> + <fileset dir="." includes="build-${module.name}.xml,deploy-${module.name}-*.xml"/> + </copy> + <copy todir="${dist-src.dir}/build"> <fileset dir="${build.dir}"/> </copy> - <copy todir="${dist-src.dir}/conf-${module.name}"> + <copy todir="${dist-src.dir}/conf-${module.name}"> <fileset dir="${conf.dir}"/> </copy> - <copy todir="${dist-src.dir}/src"> - <fileset dir="${src.dir}"/> + <copy todir="${dist-src.dir}/src"> + <fileset dir="${src.dir}"/> </copy> - <copy todir="${dist-src.dir}/web-${module.name}"> - <fileset dir="${web.dir}"/> + <copy todir="${dist-src.dir}/web-${module.name}"> + <fileset dir="${web.dir}"/> </copy> - <copy todir="${dist-src.dir}/xdocs"> - <fileset dir="${xdocs.dir}"/> - </copy> + <copy todir="${dist-src.dir}/xdocs"> + <fileset dir="${xdocs.dir}"/> + </copy> </target> <target name="dist-bin" depends="init,all,manual-html,manual-pdf" description="Prepares all binary distributables"> + <!-- pack to WAR --> + <war destfile="${dist-bin.dir}/${war.name}" basedir="${dist-bin.bin.dir}" webxml="web-${module.name}/WEB-INF/web.xml"/> + <delete dir="${dist-bin.bin.dir}"/> <!-- copy other resources --> + <copy todir="${dist-bin.dir}"> + <fileset dir="." includes="deploy-${module.name}-*.xml"/> + </copy> + <copy todir="${dist-bin.dir}/build"> + <fileset dir="${build.dir}" excludes="build.xml"/> + </copy> <copy todir="${dist-bin.dir}/conf"> <fileset dir="${conf.dir}"/> </copy> - <copy todir="${dist-bin.dir}"> + <copy todir="${dist-bin.dir}"> <fileset dir="${xdocs.dir}/others" includes="**/*"/> - </copy> + </copy> </target> <target name="dist" depends="dist-src,dist-bin" description="Packs all distributables"> - <mkdir dir="${dist.dir}"/> + <mkdir dir="${dist.dir}"/> <!-- pack --> <zip file="${dist.dir}/${module.name.full}-src.zip" basedir="${dist-src.root.dir}"/> <tar destfile="${dist.dir}/${module.name.full}-src.tar.gz" basedir="${dist-src.root.dir}" compression="gzip" longfile="gnu"/> <!-- pack --> <zip file="${dist.dir}/${module.name.full}.zip" basedir="${dist-bin.root.dir}"/> - <tar destfile="${dist.dir}/${module.name.full}.tar.gz" basedir="${dist-bin.root.dir}" compression="gzip" longfile="gnu"/> + <tar destfile="${dist.dir}/${module.name.full}.tar.gz" basedir="${dist-bin.root.dir}" compression="gzip" longfile="gnu"/> </target> </project> Added: trunk/labs/kosmos/build/deploy.xml =================================================================== --- trunk/labs/kosmos/build/deploy.xml 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/deploy.xml 2005-08-15 15:36:56 UTC (rev 854) @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Kosmos. + + Distributable under LGPL license. + See terms of license at gnu.org. +--> +<!-- Kosmos deploy-script template --> +<!-- $Id$ --> +<project basedir="." default="redeploy" name="Kosmos"> + <description>Kosmos deploy-script template used by the vendor-dependent deploy-scripts</description> + + <!-- read basic properties --> + <property environment="env"/> + <property file="build/kosmos-project.properties"/> + <property file="build/${module.name}-module.properties"/> + <property name="war.name" value="${project.name.short}-${module.name}.war"/> + <property file="build/${module.name}-${container.name}-deploy.properties"/> + + <!-- generated paths --> + <property name="conf.dir" location="conf"/> + + <!-- targets --> + <target name="init"> + <echo message="============================================================"/> + <echo message="${project.name} - ${module.name} ${project.version}"/> + <echo message="Copyright 2005 (C) Midori"/> + <echo message="============================================================"/> + </target> + + <target name="deploy" depends="init" description="Deploys the portlet to the container"> + <echo message="Deploying to ${container.name} at ${container.dir}"/> + <mkdir dir="${container.dir}"/> + <!-- expand WAR --> + <unzip src="${war.name}" dest="${container.dir}"/> + <!-- copy container-dependent resources --> + <copy todir="${container.dir}/WEB-INF"> + <fileset dir="${conf.dir}/${container.name}"/> + </copy> + <!-- it doesn't restart the container! --> + </target> + + <target name="undeploy" depends="init" description="Undeploys the portlet from the container"> + <!-- it doesn't stop the container! --> + <delete dir="${container.dir}"/> + </target> + + <target name="redeploy" depends="undeploy,deploy" description="Redeploys the portlet to the container"/> +</project> Added: trunk/labs/kosmos/build/portlet-jboss-portal-deploy.properties =================================================================== --- trunk/labs/kosmos/build/portlet-jboss-portal-deploy.properties 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/portlet-jboss-portal-deploy.properties 2005-08-15 15:36:56 UTC (rev 854) @@ -0,0 +1,2 @@ +container.dir=${env.JBOSS_HOME}/server/default/deploy/${war.name} + Modified: trunk/labs/kosmos/build/portlet-module.properties =================================================================== --- trunk/labs/kosmos/build/portlet-module.properties 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/portlet-module.properties 2005-08-15 15:36:56 UTC (rev 854) @@ -1,3 +1,2 @@ -module.name=portlet module.src-exclude=**/server/** Added: trunk/labs/kosmos/build/portlet-pluto-deploy.properties =================================================================== --- trunk/labs/kosmos/build/portlet-pluto-deploy.properties 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/portlet-pluto-deploy.properties 2005-08-15 15:36:56 UTC (rev 854) @@ -0,0 +1,2 @@ +container.dir=${env.CATALINA_HOME}/webapps/${war.name} + Added: trunk/labs/kosmos/build/server-jboss-as-deploy.properties =================================================================== --- trunk/labs/kosmos/build/server-jboss-as-deploy.properties 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/server-jboss-as-deploy.properties 2005-08-15 15:36:56 UTC (rev 854) @@ -0,0 +1,2 @@ +container.dir=${env.JBOSS_HOME}/server/default/deploy/${war.name} + Modified: trunk/labs/kosmos/build/server-module.properties =================================================================== --- trunk/labs/kosmos/build/server-module.properties 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/server-module.properties 2005-08-15 15:36:56 UTC (rev 854) @@ -1,3 +1,2 @@ -module.name=server module.src-exclude=**/portlet/** Added: trunk/labs/kosmos/build/server-tomcat-deploy.properties =================================================================== --- trunk/labs/kosmos/build/server-tomcat-deploy.properties 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/server-tomcat-deploy.properties 2005-08-15 15:36:56 UTC (rev 854) @@ -0,0 +1,2 @@ +container.dir=${env.CATALINA_HOME}/webapps/${war.name} + |
From: <jbo...@li...> - 2005-08-15 14:17:37
|
Author: aron.gombas Date: 2005-08-15 10:16:13 -0400 (Mon, 15 Aug 2005) New Revision: 853 Modified: trunk/labs/kosmos/xdocs/others/welcome.txt Log: Changed project URL Modified: trunk/labs/kosmos/xdocs/others/welcome.txt =================================================================== --- trunk/labs/kosmos/xdocs/others/welcome.txt 2005-08-15 14:15:25 UTC (rev 852) +++ trunk/labs/kosmos/xdocs/others/welcome.txt 2005-08-15 14:16:13 UTC (rev 853) @@ -1,3 +1,3 @@ Kosmos -Check out: http://labs.jboss.com \ No newline at end of file +Visit: http://labs.jboss.com/projects/kosmos \ No newline at end of file |
From: <jbo...@li...> - 2005-08-15 14:16:52
|
Author: aron.gombas Date: 2005-08-15 10:15:25 -0400 (Mon, 15 Aug 2005) New Revision: 852 Modified: trunk/labs/kosmos/web-portlet/pages/jira_monitoring.jsp Log: Changed warning condition Modified: trunk/labs/kosmos/web-portlet/pages/jira_monitoring.jsp =================================================================== --- trunk/labs/kosmos/web-portlet/pages/jira_monitoring.jsp 2005-08-15 10:32:26 UTC (rev 851) +++ trunk/labs/kosmos/web-portlet/pages/jira_monitoring.jsp 2005-08-15 14:15:25 UTC (rev 852) @@ -7,7 +7,7 @@ <c:set var="id" scope="page" value="${projectsIt.id}"/> <display:column style="width:20px"> <c:choose> - <c:when test="${projectsIt.openIssues > 10}"> + <c:when test="${projectsIt.openIssues > (0.5*projectsIt.totalIssues)}"> <img src="<%= renderRequest.getContextPath() %>/pages/images/warning.gif" title="<fmt:message key="legend.warning"/>"/> </c:when> <c:otherwise> |
Author: dam...@jb... Date: 2005-08-15 06:32:26 -0400 (Mon, 15 Aug 2005) New Revision: 851 Removed: qa/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/decorators/.bodytop.jsp.swp Modified: qa/forge/jira-extensions/developersinvolvement-report/src/java/pl/net/mamut/jira/DevelopersInvolvementReport.java qa/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/decorators/bodytop.jsp qa/forge/jira-extensions/junit-tests-adamw/.classpath qa/forge/jira-extensions/junit-tests-adamw/src/etc/pl/net/mamut/jira/jira_tests.properties qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/AbstractJiraTest.java qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/ReleaseNotesReportTest.java qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/UnreleasedProjectVersionsReportTest.java qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/VotingExtensionsTest.java qa/forge/jira-extensions/voting/.classpath qa/forge/jira-extensions/voting/.project qa/forge/jira-extensions/voting/src/java/com/atlassian/jira/issue/vote/DefaultVoteManager.java qa/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/AddVotesAssigment.java qa/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/DeleteScheme.java Log: MERGED: -r 824:849 https://svn.labs.jboss.com/trunk/forge/jira-extensions into qa jira-extensions Modified: qa/forge/jira-extensions/developersinvolvement-report/src/java/pl/net/mamut/jira/DevelopersInvolvementReport.java =================================================================== --- qa/forge/jira-extensions/developersinvolvement-report/src/java/pl/net/mamut/jira/DevelopersInvolvementReport.java 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/developersinvolvement-report/src/java/pl/net/mamut/jira/DevelopersInvolvementReport.java 2005-08-15 10:32:26 UTC (rev 851) @@ -39,7 +39,7 @@ private ProjectManager projectManager; private IssueManager issueManager; private ActionManager actionManager; - private String[] colours = {"green", "red", "blue", "yellow", "brown", "orange", "violet"}; + private String[] colours = {"#cc0000", "#00cc00", "#0000cc", "#C0C030", "#663300", "#bbbbbb", "#003366"}; private int COL_NUM = 7; private int GRAPH_MULT = 40; //width of one unit in drawing graphs private int TOP_TEN_SHOW = 10; Deleted: qa/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/decorators/.bodytop.jsp.swp =================================================================== (Binary files differ) Modified: qa/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/decorators/bodytop.jsp =================================================================== --- qa/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/decorators/bodytop.jsp 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/decorators/bodytop.jsp 2005-08-15 10:32:26 UTC (rev 851) @@ -114,13 +114,13 @@ </page:applyDecorator> <page:applyDecorator name="navitem"> - <page:param name="title">GLOBAL REPORTS</page:param> + <page:param name="title">REPORTS</page:param> <page:param name="id">global_reports</page:param> <page:param name="url"><%= request.getContextPath() %>/secure/views/globalreports/globalreports.jsp</page:param> <page:param name="selected">/secure/views/globalreports/globalreports.jsp</page:param> <page:param name="selected2">/secure/views/globalreports/globalreports.jsp</page:param> - <page:param name="tooltip">View available global reports</page:param> - <page:param name="accesskey">l</page:param> + <page:param name="tooltip">View available reports</page:param> + <page:param name="accesskey">g</page:param> </page:applyDecorator> <page:applyDecorator name="navitem"> Modified: qa/forge/jira-extensions/junit-tests-adamw/.classpath =================================================================== --- qa/forge/jira-extensions/junit-tests-adamw/.classpath 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/junit-tests-adamw/.classpath 2005-08-15 10:32:26 UTC (rev 851) @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry output="target/test-classes" kind="src" path="src/java"/> + <classpathentry kind="src" path="src/etc"/> <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="var" path="MAVEN_REPO/httpunit/jars/httpunit-1.6.jar"/> Modified: qa/forge/jira-extensions/junit-tests-adamw/src/etc/pl/net/mamut/jira/jira_tests.properties =================================================================== --- qa/forge/jira-extensions/junit-tests-adamw/src/etc/pl/net/mamut/jira/jira_tests.properties 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/junit-tests-adamw/src/etc/pl/net/mamut/jira/jira_tests.properties 2005-08-15 10:32:26 UTC (rev 851) @@ -1,5 +1,6 @@ # Name of the host on which jira is running (URL of the JIRA main page) -host=http://localhost:8080/jira +#host=http://localhost:8080/jira +host=http://dev03.atl.jboss.com/jira/ # Login and password of JIRA administrator #adminLogin=adamw #adminPassword=adamw Modified: qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/AbstractJiraTest.java =================================================================== --- qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/AbstractJiraTest.java 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/AbstractJiraTest.java 2005-08-15 10:32:26 UTC (rev 851) @@ -49,7 +49,12 @@ userPassword = properties.getProperty("userPassword"); host = properties.getProperty("host"); - /*adminLogin = "adamw"; + /*adminLogin = "00testuser1"; + adminPassword = "00TesTUseR1"; + userLogin = "00testuser2"; + userPassword = "00TesTUseR2"; + host = "http://dev03.atl.jboss.com/jira/"; + adminLogin = ""; adminPassword = "adamw"; userLogin = "user1"; userPassword = "user1"; @@ -88,7 +93,7 @@ link = wc.getCurrentPage().getLinkWith("Log in again"); link.click(); } - + WebForm form = wc.getCurrentPage().getFormWithName("loginform"); form.setParameter("os_username", username); form.setParameter("os_password", password); @@ -221,6 +226,7 @@ wr.setParameter("fixVersions", fixVersions); wr.setParameter("assignee", assignToAdmin ? adminLogin : userLogin); wr.setParameter("reporter", adminLogin); + wr.setParameter("duedate", ""); wc.sendRequest(wr); @@ -298,7 +304,7 @@ * @throws Exception */ protected String addProject(String name, String key, boolean leadIsAdmin) throws Exception { - goToAdministration(); + /*goToAdministration(); goToLink("Projects"); goToLink("Add Project"); @@ -306,7 +312,19 @@ form.setParameter("name", name); form.setParameter("key", key); form.setParameter("lead", leadIsAdmin ? adminLogin : userLogin); - form.submit(); + form.submit();*/ + + WebRequest wr = new GetMethodWebRequest(host+"/secure/admin/AddProject.jspa"); + wr.setParameter("key", key); + wr.setParameter("name", name); + wr.setParameter("url", ""); + wr.setParameter("lead", leadIsAdmin ? adminLogin : userLogin); + wr.setParameter("assigneeType", "2"); + wr.setParameter("notificationScheme", "-1"); + wr.setParameter("permissionScheme", "0"); + wr.setParameter("issueSecurityScheme", "-1"); + + wc.sendRequest(wr); return getProjectId(name); } @@ -339,6 +357,7 @@ wr.setParameter("pid", projectId); wr.setParameter("name", name); wr.setParameter("releaseDate", releaseDate); + wr.setParameter("scheduleAfterVersion", "-1"); wc.sendRequest(wr); @@ -348,6 +367,8 @@ wr = new GetMethodWebRequest(host+"/secure/project/EditVersionReleases!release.jspa"); wr.setParameter("versionId", versionId); wr.setParameter("pid", projectId); + wr.setParameter("commit", "true"); + wr.setParameter("affectsAction", "ignore"); wc.sendRequest(wr); } @@ -451,8 +472,8 @@ */ protected String getAllValue(String name) throws Exception { String page = wc.getCurrentPage().getText(); - page = page.substring(page.indexOf(name), page.length()); - page = page.substring(page.indexOf("<option value=\"")+16, page.length()); + page = page.substring(page.indexOf("<select multiple name=\""+name), page.length()); + page = page.substring(page.indexOf("<option value=\"")+15, page.length()); int pos = 3; while (page.charAt(pos) != '"') pos++; return page.substring(0, pos); Modified: qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/ReleaseNotesReportTest.java =================================================================== --- qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/ReleaseNotesReportTest.java 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/ReleaseNotesReportTest.java 2005-08-15 10:32:26 UTC (rev 851) @@ -42,7 +42,7 @@ issRep2 = getIssueRepresentation(prjId, "issue2"); issRep3 = getIssueRepresentation(prjId, "issue3"); - closeIssue(issId1, issRep1, "3", null, new String[] { verId1, verId2 }); + closeIssue(issId1, issRep1, "3", adminLogin, new String[] { verId1, verId2 }); } protected void tearDown() throws Exception { @@ -52,7 +52,7 @@ } public void testMultipleVersionsAllTypes() throws Exception { - goToReportConf(prjId, "pl.net.mamut:releasenotes"); + goToReportConf(prjId, "pl.net.mamut:releasenotes"); String allSections = getAllValue("sections"); WebRequest wr = getReportRequest(prjId, "pl.net.mamut:releasenotes"); Modified: qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/UnreleasedProjectVersionsReportTest.java =================================================================== --- qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/UnreleasedProjectVersionsReportTest.java 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/UnreleasedProjectVersionsReportTest.java 2005-08-15 10:32:26 UTC (rev 851) @@ -71,6 +71,7 @@ public void testMultipleProjectsAllTypesAllPrioritiesOneMonth() throws Exception { WebRequest wr = getGlobalReportRequest("pl.net.mamut.jira.roadmapreport:roadmap"); + wr.setParameter("projects", new String [] { prjIds[0], prjIds[1] }); wr.setParameter("types", allTypes); wr.setParameter("priorities", allPriorities); Modified: qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/VotingExtensionsTest.java =================================================================== --- qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/VotingExtensionsTest.java 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/VotingExtensionsTest.java 2005-08-15 10:32:26 UTC (rev 851) @@ -105,12 +105,12 @@ vsIds = new String[2]; for (int i=0; i<2; i++) vsIds[i] = addVotingScheme("WS"+i, "WS"+i+"desc"); - addVotesAssigment(vsIds[0], "21", "Single_User", "user1", ""); - addVotesAssigment(vsIds[0], "88", "Single_User", "adamw", ""); + addVotesAssigment(vsIds[0], "21", "Single_User", userLogin, ""); + addVotesAssigment(vsIds[0], "88", "Single_User", adminLogin, ""); addVotesAssigment(vsIds[0], "65", "Group_Dropdown", "jira-administrators", ""); addVotesAssigment(vsIds[1], "12", "Project_Lead", "", ""); - addVotesAssigment(vsIds[1], "7", "Single_User", "adamw", ""); + addVotesAssigment(vsIds[1], "7", "Single_User", adminLogin, ""); goToMainPage(); loginUser(); Modified: qa/forge/jira-extensions/voting/.classpath =================================================================== --- qa/forge/jira-extensions/voting/.classpath 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/voting/.classpath 2005-08-15 10:32:26 UTC (rev 851) @@ -1,352 +1,182 @@ <?xml version="1.0" encoding="UTF-8"?> + <classpath> - <classpathentry kind="src" path="src/java"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-jira/jars/atlassian-jira-3.0.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-core/jars/atlassian-core-2.2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-ofbiz/jars/atlassian-ofbiz-0.1.8.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-profiling/jars/atlassian-profiling-1.1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-configurableobjects/jars/atlassian-configurableobjects-0.4.5.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-mail/jars/atlassian-mail-1.2.13.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-scheduler/jars/atlassian-scheduler-0.6.6.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-velocity/jars/atlassian-velocity-0.1.8.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-johnson/jars/atlassian-johnson-0.5.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-plugins/jars/atlassian-plugins-0.2.7.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/seraph/jars/seraph-0.7.5.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-jira-extras/jars/atlassian-jira-extras-0.5.2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-tagutil/jars/atlassian-tagutil-0.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/oscache/jars/oscache-DEV.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/osworkflow/jars/osworkflow-17Aug2004.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/oscore/jars/oscore-2.2.4.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/osuser/jars/osuser-1.0-dev-28Jul04.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/propertyset/jars/propertyset-1.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/sitemesh/jars/sitemesh-2.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/webwork/jars/webwork-1.4.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/webwork/jars/webwork-pell-multipartrequest1.30rc1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-digester/jars/commons-digester-1.4.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-beanutils/jars/commons-beanutils-1.6.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-2.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-1.0.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.7.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/lucene/jars/lucene-1.4-final.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/oro/jars/oro-2.0.7.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-1.4.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/alt/jars/alt-0.07-jdk1.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/alt/jars/alt-0.07-j1.3-j2ee1.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-DEV.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/easymock/jars/easymock-1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/cglib/jars/cglib-full-2.0.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/easymock/jars/easymockclassextension-1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-0.07-j1.3-j2ee1.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-0.07-jdk1.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/activation/jars/activation-1.0.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/javamail/jars/javamail-1.2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/glue/jars/glue-5.0b2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/bsf/jars/bsf-2.2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/bsh/jars/bsh-1.2b7.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-share-2.1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-entity-2.1.1-atlassian-01042004.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-service-2.1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-extutil-2.1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/csv/jars/csv-20.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-xerces-serialize.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/quartz/jars/quartz-1.0.7.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/picocontainer/jars/picocontainer-1.0.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jzlib/jars/jzlib-1.0.5.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jsch/jars/jsch-0.1.16-20040721-patched.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/javacvs/jars/javacvs-20040721-patched.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/statcvs/jars/statcvs-20040721-patched.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-dbcp/jars/commons-dbcp-1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-pool/jars/commons-pool-1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/hsqldb/jars/hsqldb-1.7.1-patched.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jndi/jars/jndi-1.2.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jta/jars/jta-1.0.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/ots-jts/jars/ots-jts_1.0.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jotm-1.4.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jotm-jrmp_stubs-1.4.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jotm-iiop_stubs-1.4.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jonas_timer-1.4.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/objectweb-datasource-1.4.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/carol/jars/carol-1.5.2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/carol/jars/carol-properties.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/xapool/jars/xapool-1.3.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/xerces/jars/xerces-1.4.4.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-20030310.073407.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-junit-20030211.141731.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-util-20030211.141939.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-email-20030211.144034.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-log-20030211.142821.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-http-20030211.143043.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-soap-20030211.142401.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-sql-20030211.144816.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jexl/jars/commons-jexl-1.0-beta-2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/dom4j/jars/dom4j-1.4.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-trackback/jars/atlassian-trackback-0.7.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-2.0-beta2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/xmlrpc/jars/xmlrpc-1.2-b1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.4.2"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="output" path="target/classes"/> -</classpath> + <classpathentry excluding="" kind="src" path="src/java"> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-jira/jars/atlassian-jira-3.2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/global-reports-plugins/jars/global-reports-plugins-1.0.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-core/jars/atlassian-core-2.3.9.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-ofbiz/jars/atlassian-ofbiz-0.2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-profiling/jars/atlassian-profiling-1.1.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-configurableobjects/jars/atlassian-configurableobjects-0.4.11.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-mail/jars/atlassian-mail-1.2.30.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-scheduler/jars/atlassian-scheduler-0.6.6.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-velocity/jars/atlassian-velocity-0.3.9.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-johnson/jars/atlassian-johnson-0.5.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-plugins/jars/atlassian-plugins-0.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/seraph/jars/seraph-0.7.5.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-jira-extras/jars/atlassian-jira-extras-0.5.2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-tagutil/jars/atlassian-tagutil-0.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/oscache/jars/oscache-DEV.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/osworkflow/jars/osworkflow-17Aug2004.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/oscore/jars/oscore-2.2.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/osuser/jars/osuser-1.0-dev-28Jul04.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/propertyset/jars/propertyset-1.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/sitemesh/jars/sitemesh-2.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/webwork/jars/webwork-1.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/webwork/jars/webwork-pell-multipartrequest1.30rc1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-digester/jars/commons-digester-1.4.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-beanutils/jars/commons-beanutils-1.6.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-2.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-1.0.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.7.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/lucene/jars/lucene-1.4-final.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/oro/jars/oro-2.0.7.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-1.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/alt/jars/alt-0.07-jdk1.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/alt/jars/alt-0.07-j1.3-j2ee1.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-DEV.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/easymock/jars/easymock-1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/cglib/jars/cglib-full-2.0.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/easymock/jars/easymockclassextension-1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-0.07-j1.3-j2ee1.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-0.07-jdk1.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/activation/jars/activation-1.0.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/javamail/jars/javamail-1.2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/glue/jars/glue-5.0b2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/bsf/jars/bsf-2.2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/bsh/jars/bsh-1.2b7.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-share-2.1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-entity-2.1.1-atlassian-01042004.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-service-2.1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-extutil-2.1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/csv/jars/csv-20.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-xerces-serialize.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/quartz/jars/quartz-1.0.7.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/picocontainer/jars/picocontainer-1.0.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jzlib/jars/jzlib-1.0.5.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jsch/jars/jsch-0.1.16-20040721-patched.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/javacvs/jars/javacvs-20040721-patched.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/statcvs/jars/statcvs-20040721-patched.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-dbcp/jars/commons-dbcp-1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-pool/jars/commons-pool-1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/hsqldb/jars/hsqldb-1.7.1-patched.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jndi/jars/jndi-1.2.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jta/jars/jta-1.0.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/ots-jts/jars/ots-jts_1.0.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jotm-1.4.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jotm-jrmp_stubs-1.4.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jotm-iiop_stubs-1.4.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jonas_timer-1.4.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/objectweb-datasource-1.4.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/carol/jars/carol-1.5.2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/carol/jars/carol-properties.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/xapool/jars/xapool-1.3.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/xerces/jars/xerces-1.4.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-20030310.073407.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-junit-20030211.141731.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-util-20030211.141939.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-email-20030211.144034.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-log-20030211.142821.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-http-20030211.143043.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-soap-20030211.142401.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-sql-20030211.144816.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jexl/jars/commons-jexl-1.0-beta-2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/dom4j/jars/dom4j-1.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-trackback/jars/atlassian-trackback-0.7.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-2.0-beta2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/xmlrpc/jars/xmlrpc-1.2-b1.jar"> + </classpathentry> + <classpathentry kind="output" path="target/classes"> + </classpathentry> +</classpath> \ No newline at end of file Modified: qa/forge/jira-extensions/voting/.project =================================================================== --- qa/forge/jira-extensions/voting/.project 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/voting/.project 2005-08-15 10:32:26 UTC (rev 851) @@ -1,27 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> + <projectDescription> - <name>Voting</name> - <comment>An extended release notes plugin.</comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> - <triggers>full,incremental,</triggers> - <arguments> - <dictionary> - <key>LaunchConfigHandle</key> - <value><project>/.externalToolBuilders/MavenVoting.launch</value> - </dictionary> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> + <name>voting-extended</name> + <comment>An extended voting project.</comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> \ No newline at end of file Modified: qa/forge/jira-extensions/voting/src/java/com/atlassian/jira/issue/vote/DefaultVoteManager.java =================================================================== --- qa/forge/jira-extensions/voting/src/java/com/atlassian/jira/issue/vote/DefaultVoteManager.java 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/voting/src/java/com/atlassian/jira/issue/vote/DefaultVoteManager.java 2005-08-15 10:32:26 UTC (rev 851) @@ -5,6 +5,8 @@ import com.atlassian.jira.ManagerFactory; import com.atlassian.jira.config.properties.ApplicationProperties; import com.atlassian.jira.issue.cache.CacheManager; +import com.atlassian.jira.issue.index.IndexException; +import com.atlassian.jira.issue.index.IssueIndexManager; import com.atlassian.jira.voting.VotingManagerFactory; import com.atlassian.jira.voting.VotingSchemeManager; import com.opensymphony.user.EntityNotFoundException; @@ -131,6 +133,14 @@ return false; } cacheManager.flush("Issue_Cache", issue); + try + { + indexManager.reIndex(issue); + } + catch(IndexException e) + { + log.error("Exception re-indexing issue " + e, e); + } } return true; } @@ -145,11 +155,14 @@ return getVoters(issue).contains(user); } - public DefaultVoteManager(ApplicationProperties applicationProperties, AssociationManager associationManager, CacheManager cacheManager) + public DefaultVoteManager(ApplicationProperties applicationProperties, + AssociationManager associationManager, CacheManager cacheManager, + IssueIndexManager indexManager) { this.applicationProperties = applicationProperties; this.associationManager = associationManager; this.cacheManager = cacheManager; + this.indexManager = indexManager; votingSchemeManager = VotingManagerFactory.getVotingSchemeManager(); } @@ -158,6 +171,7 @@ private final AssociationManager associationManager; private final CacheManager cacheManager; private final VotingSchemeManager votingSchemeManager; + private final IssueIndexManager indexManager; static { @@ -182,6 +196,14 @@ issue.set("votes", new Long(votes)); issue.store(); cacheManager.flush("Issue_Cache", issue); + try + { + indexManager.reIndex(issue); + } + catch(IndexException e) + { + log.error("Exception re-indexing issue " + e, e); + } } } catch (GenericEntityException e) { Modified: qa/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/AddVotesAssigment.java =================================================================== --- qa/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/AddVotesAssigment.java 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/AddVotesAssigment.java 2005-08-15 10:32:26 UTC (rev 851) @@ -27,6 +27,12 @@ { try { + try { + if (Long.parseLong(getVotesnum()) < 0) + throw new NumberFormatException(); + } catch (NumberFormatException e) { + addErrorMessage("Number of votes must be a positive integer."); + } if(getSchemeId() == null || getScheme() == null) addErrorMessage("You must select a scheme to add the votes assigment to. Click \"Voting Schemes\" link in the left hand navigation to pick one."); if(getVotesnum() == null || !TextUtils.stringSet(getVotesnum())) Modified: qa/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/DeleteScheme.java =================================================================== --- qa/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/DeleteScheme.java 2005-08-15 10:22:12 UTC (rev 850) +++ qa/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/DeleteScheme.java 2005-08-15 10:32:26 UTC (rev 851) @@ -28,7 +28,8 @@ String ret = super.doExecute(); new DefaultVoteManager(this.getApplicationProperties(), associationManager, - ManagerFactory.getCacheManager()).recountVotes(projects); + ManagerFactory.getCacheManager(), + ManagerFactory.getIndexManager()).recountVotes(projects); return ret; } |
From: <jbo...@li...> - 2005-08-15 10:23:47
|
Author: dam...@jb... Date: 2005-08-15 06:22:12 -0400 (Mon, 15 Aug 2005) New Revision: 850 Modified: trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java Log: Commented out test. Modified: trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java 2005-08-14 23:51:06 UTC (rev 849) +++ trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java 2005-08-15 10:22:12 UTC (rev 850) @@ -57,7 +57,7 @@ } // System.out.println(text.toString()); - parsed = tr.parseLinks(text.toString(), ""); + // parsed = tr.parseLinks(text.toString(), ""); // System.out.println(parsed); } |
From: <jbo...@li...> - 2005-08-14 23:52:41
|
Author: adamw Date: 2005-08-14 19:51:06 -0400 (Sun, 14 Aug 2005) New Revision: 849 Modified: trunk/forge/jira-extensions/developersinvolvement-report/src/java/pl/net/mamut/jira/DevelopersInvolvementReport.java trunk/forge/jira-extensions/junit-tests-adamw/.classpath trunk/forge/jira-extensions/junit-tests-adamw/src/etc/pl/net/mamut/jira/jira_tests.properties trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/AbstractJiraTest.java trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/ReleaseNotesReportTest.java trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/UnreleasedProjectVersionsReportTest.java trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/VotingExtensionsTest.java trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/AddVotesAssigment.java Log: Tests & colours Modified: trunk/forge/jira-extensions/developersinvolvement-report/src/java/pl/net/mamut/jira/DevelopersInvolvementReport.java =================================================================== --- trunk/forge/jira-extensions/developersinvolvement-report/src/java/pl/net/mamut/jira/DevelopersInvolvementReport.java 2005-08-14 13:09:52 UTC (rev 848) +++ trunk/forge/jira-extensions/developersinvolvement-report/src/java/pl/net/mamut/jira/DevelopersInvolvementReport.java 2005-08-14 23:51:06 UTC (rev 849) @@ -39,7 +39,7 @@ private ProjectManager projectManager; private IssueManager issueManager; private ActionManager actionManager; - private String[] colours = {"green", "red", "blue", "yellow", "brown", "orange", "violet"}; + private String[] colours = {"#cc0000", "#00cc00", "#0000cc", "#C0C030", "#663300", "#bbbbbb", "#003366"}; private int COL_NUM = 7; private int GRAPH_MULT = 40; //width of one unit in drawing graphs private int TOP_TEN_SHOW = 10; Modified: trunk/forge/jira-extensions/junit-tests-adamw/.classpath =================================================================== --- trunk/forge/jira-extensions/junit-tests-adamw/.classpath 2005-08-14 13:09:52 UTC (rev 848) +++ trunk/forge/jira-extensions/junit-tests-adamw/.classpath 2005-08-14 23:51:06 UTC (rev 849) @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry output="target/test-classes" kind="src" path="src/java"/> + <classpathentry kind="src" path="src/etc"/> <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="var" path="MAVEN_REPO/httpunit/jars/httpunit-1.6.jar"/> Modified: trunk/forge/jira-extensions/junit-tests-adamw/src/etc/pl/net/mamut/jira/jira_tests.properties =================================================================== --- trunk/forge/jira-extensions/junit-tests-adamw/src/etc/pl/net/mamut/jira/jira_tests.properties 2005-08-14 13:09:52 UTC (rev 848) +++ trunk/forge/jira-extensions/junit-tests-adamw/src/etc/pl/net/mamut/jira/jira_tests.properties 2005-08-14 23:51:06 UTC (rev 849) @@ -1,5 +1,6 @@ # Name of the host on which jira is running (URL of the JIRA main page) -host=http://localhost:8080/jira +#host=http://localhost:8080/jira +host=http://dev03.atl.jboss.com/jira/ # Login and password of JIRA administrator #adminLogin=adamw #adminPassword=adamw Modified: trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/AbstractJiraTest.java =================================================================== --- trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/AbstractJiraTest.java 2005-08-14 13:09:52 UTC (rev 848) +++ trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/AbstractJiraTest.java 2005-08-14 23:51:06 UTC (rev 849) @@ -49,7 +49,12 @@ userPassword = properties.getProperty("userPassword"); host = properties.getProperty("host"); - /*adminLogin = "adamw"; + /*adminLogin = "00testuser1"; + adminPassword = "00TesTUseR1"; + userLogin = "00testuser2"; + userPassword = "00TesTUseR2"; + host = "http://dev03.atl.jboss.com/jira/"; + adminLogin = ""; adminPassword = "adamw"; userLogin = "user1"; userPassword = "user1"; @@ -88,7 +93,7 @@ link = wc.getCurrentPage().getLinkWith("Log in again"); link.click(); } - + WebForm form = wc.getCurrentPage().getFormWithName("loginform"); form.setParameter("os_username", username); form.setParameter("os_password", password); @@ -221,6 +226,7 @@ wr.setParameter("fixVersions", fixVersions); wr.setParameter("assignee", assignToAdmin ? adminLogin : userLogin); wr.setParameter("reporter", adminLogin); + wr.setParameter("duedate", ""); wc.sendRequest(wr); @@ -298,7 +304,7 @@ * @throws Exception */ protected String addProject(String name, String key, boolean leadIsAdmin) throws Exception { - goToAdministration(); + /*goToAdministration(); goToLink("Projects"); goToLink("Add Project"); @@ -306,7 +312,19 @@ form.setParameter("name", name); form.setParameter("key", key); form.setParameter("lead", leadIsAdmin ? adminLogin : userLogin); - form.submit(); + form.submit();*/ + + WebRequest wr = new GetMethodWebRequest(host+"/secure/admin/AddProject.jspa"); + wr.setParameter("key", key); + wr.setParameter("name", name); + wr.setParameter("url", ""); + wr.setParameter("lead", leadIsAdmin ? adminLogin : userLogin); + wr.setParameter("assigneeType", "2"); + wr.setParameter("notificationScheme", "-1"); + wr.setParameter("permissionScheme", "0"); + wr.setParameter("issueSecurityScheme", "-1"); + + wc.sendRequest(wr); return getProjectId(name); } @@ -339,6 +357,7 @@ wr.setParameter("pid", projectId); wr.setParameter("name", name); wr.setParameter("releaseDate", releaseDate); + wr.setParameter("scheduleAfterVersion", "-1"); wc.sendRequest(wr); @@ -348,6 +367,8 @@ wr = new GetMethodWebRequest(host+"/secure/project/EditVersionReleases!release.jspa"); wr.setParameter("versionId", versionId); wr.setParameter("pid", projectId); + wr.setParameter("commit", "true"); + wr.setParameter("affectsAction", "ignore"); wc.sendRequest(wr); } @@ -451,8 +472,8 @@ */ protected String getAllValue(String name) throws Exception { String page = wc.getCurrentPage().getText(); - page = page.substring(page.indexOf(name), page.length()); - page = page.substring(page.indexOf("<option value=\"")+16, page.length()); + page = page.substring(page.indexOf("<select multiple name=\""+name), page.length()); + page = page.substring(page.indexOf("<option value=\"")+15, page.length()); int pos = 3; while (page.charAt(pos) != '"') pos++; return page.substring(0, pos); Modified: trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/ReleaseNotesReportTest.java =================================================================== --- trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/ReleaseNotesReportTest.java 2005-08-14 13:09:52 UTC (rev 848) +++ trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/ReleaseNotesReportTest.java 2005-08-14 23:51:06 UTC (rev 849) @@ -42,7 +42,7 @@ issRep2 = getIssueRepresentation(prjId, "issue2"); issRep3 = getIssueRepresentation(prjId, "issue3"); - closeIssue(issId1, issRep1, "3", null, new String[] { verId1, verId2 }); + closeIssue(issId1, issRep1, "3", adminLogin, new String[] { verId1, verId2 }); } protected void tearDown() throws Exception { @@ -52,7 +52,7 @@ } public void testMultipleVersionsAllTypes() throws Exception { - goToReportConf(prjId, "pl.net.mamut:releasenotes"); + goToReportConf(prjId, "pl.net.mamut:releasenotes"); String allSections = getAllValue("sections"); WebRequest wr = getReportRequest(prjId, "pl.net.mamut:releasenotes"); Modified: trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/UnreleasedProjectVersionsReportTest.java =================================================================== --- trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/UnreleasedProjectVersionsReportTest.java 2005-08-14 13:09:52 UTC (rev 848) +++ trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/UnreleasedProjectVersionsReportTest.java 2005-08-14 23:51:06 UTC (rev 849) @@ -71,6 +71,7 @@ public void testMultipleProjectsAllTypesAllPrioritiesOneMonth() throws Exception { WebRequest wr = getGlobalReportRequest("pl.net.mamut.jira.roadmapreport:roadmap"); + wr.setParameter("projects", new String [] { prjIds[0], prjIds[1] }); wr.setParameter("types", allTypes); wr.setParameter("priorities", allPriorities); Modified: trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/VotingExtensionsTest.java =================================================================== --- trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/VotingExtensionsTest.java 2005-08-14 13:09:52 UTC (rev 848) +++ trunk/forge/jira-extensions/junit-tests-adamw/src/java/pl/net/mamut/jira/VotingExtensionsTest.java 2005-08-14 23:51:06 UTC (rev 849) @@ -105,12 +105,12 @@ vsIds = new String[2]; for (int i=0; i<2; i++) vsIds[i] = addVotingScheme("WS"+i, "WS"+i+"desc"); - addVotesAssigment(vsIds[0], "21", "Single_User", "user1", ""); - addVotesAssigment(vsIds[0], "88", "Single_User", "adamw", ""); + addVotesAssigment(vsIds[0], "21", "Single_User", userLogin, ""); + addVotesAssigment(vsIds[0], "88", "Single_User", adminLogin, ""); addVotesAssigment(vsIds[0], "65", "Group_Dropdown", "jira-administrators", ""); addVotesAssigment(vsIds[1], "12", "Project_Lead", "", ""); - addVotesAssigment(vsIds[1], "7", "Single_User", "adamw", ""); + addVotesAssigment(vsIds[1], "7", "Single_User", adminLogin, ""); goToMainPage(); loginUser(); Modified: trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/AddVotesAssigment.java =================================================================== --- trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/AddVotesAssigment.java 2005-08-14 13:09:52 UTC (rev 848) +++ trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/AddVotesAssigment.java 2005-08-14 23:51:06 UTC (rev 849) @@ -28,7 +28,8 @@ try { try { - Long.parseLong(getVotesnum()); + if (Long.parseLong(getVotesnum()) < 0) + throw new NumberFormatException(); } catch (NumberFormatException e) { addErrorMessage("Number of votes must be a positive integer."); } |
Author: adamw Date: 2005-08-13 18:50:32 -0400 (Sat, 13 Aug 2005) New Revision: 847 Removed: trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/decorators/.bodytop.jsp.swp Modified: trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/decorators/bodytop.jsp trunk/forge/jira-extensions/voting/.classpath trunk/forge/jira-extensions/voting/.project trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/issue/vote/DefaultVoteManager.java trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/AddVotesAssigment.java trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/DeleteScheme.java Log: Voting corrections Deleted: trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/decorators/.bodytop.jsp.swp =================================================================== (Binary files differ) Modified: trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/decorators/bodytop.jsp =================================================================== --- trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/decorators/bodytop.jsp 2005-08-12 23:26:44 UTC (rev 846) +++ trunk/forge/jira-extensions/jira-file-modifications/jira-3.2/edit-webapp/includes/decorators/bodytop.jsp 2005-08-13 22:50:32 UTC (rev 847) @@ -114,13 +114,13 @@ </page:applyDecorator> <page:applyDecorator name="navitem"> - <page:param name="title">GLOBAL REPORTS</page:param> + <page:param name="title">REPORTS</page:param> <page:param name="id">global_reports</page:param> <page:param name="url"><%= request.getContextPath() %>/secure/views/globalreports/globalreports.jsp</page:param> <page:param name="selected">/secure/views/globalreports/globalreports.jsp</page:param> <page:param name="selected2">/secure/views/globalreports/globalreports.jsp</page:param> - <page:param name="tooltip">View available global reports</page:param> - <page:param name="accesskey">l</page:param> + <page:param name="tooltip">View available reports</page:param> + <page:param name="accesskey">g</page:param> </page:applyDecorator> <page:applyDecorator name="navitem"> Modified: trunk/forge/jira-extensions/voting/.classpath =================================================================== --- trunk/forge/jira-extensions/voting/.classpath 2005-08-12 23:26:44 UTC (rev 846) +++ trunk/forge/jira-extensions/voting/.classpath 2005-08-13 22:50:32 UTC (rev 847) @@ -1,352 +1,182 @@ <?xml version="1.0" encoding="UTF-8"?> + <classpath> - <classpathentry kind="src" path="src/java"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-jira/jars/atlassian-jira-3.0.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-core/jars/atlassian-core-2.2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-ofbiz/jars/atlassian-ofbiz-0.1.8.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-profiling/jars/atlassian-profiling-1.1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-configurableobjects/jars/atlassian-configurableobjects-0.4.5.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-mail/jars/atlassian-mail-1.2.13.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-scheduler/jars/atlassian-scheduler-0.6.6.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-velocity/jars/atlassian-velocity-0.1.8.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-johnson/jars/atlassian-johnson-0.5.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-plugins/jars/atlassian-plugins-0.2.7.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/seraph/jars/seraph-0.7.5.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-jira-extras/jars/atlassian-jira-extras-0.5.2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-tagutil/jars/atlassian-tagutil-0.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/oscache/jars/oscache-DEV.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/osworkflow/jars/osworkflow-17Aug2004.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/oscore/jars/oscore-2.2.4.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/osuser/jars/osuser-1.0-dev-28Jul04.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/propertyset/jars/propertyset-1.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/sitemesh/jars/sitemesh-2.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/webwork/jars/webwork-1.4.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/webwork/jars/webwork-pell-multipartrequest1.30rc1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-digester/jars/commons-digester-1.4.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-beanutils/jars/commons-beanutils-1.6.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-2.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-1.0.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.7.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/lucene/jars/lucene-1.4-final.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/oro/jars/oro-2.0.7.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-1.4.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/alt/jars/alt-0.07-jdk1.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/alt/jars/alt-0.07-j1.3-j2ee1.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-DEV.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/easymock/jars/easymock-1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/cglib/jars/cglib-full-2.0.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/easymock/jars/easymockclassextension-1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-0.07-j1.3-j2ee1.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-0.07-jdk1.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/activation/jars/activation-1.0.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/javamail/jars/javamail-1.2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/glue/jars/glue-5.0b2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/bsf/jars/bsf-2.2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/bsh/jars/bsh-1.2b7.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-share-2.1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-entity-2.1.1-atlassian-01042004.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-service-2.1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-extutil-2.1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/csv/jars/csv-20.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-xerces-serialize.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/quartz/jars/quartz-1.0.7.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/picocontainer/jars/picocontainer-1.0.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jzlib/jars/jzlib-1.0.5.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jsch/jars/jsch-0.1.16-20040721-patched.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/javacvs/jars/javacvs-20040721-patched.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/statcvs/jars/statcvs-20040721-patched.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-dbcp/jars/commons-dbcp-1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-pool/jars/commons-pool-1.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/hsqldb/jars/hsqldb-1.7.1-patched.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jndi/jars/jndi-1.2.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jta/jars/jta-1.0.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/ots-jts/jars/ots-jts_1.0.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jotm-1.4.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jotm-jrmp_stubs-1.4.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jotm-iiop_stubs-1.4.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jonas_timer-1.4.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/objectweb-datasource-1.4.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/carol/jars/carol-1.5.2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/carol/jars/carol-properties.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/xapool/jars/xapool-1.3.1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/xerces/jars/xerces-1.4.4.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-20030310.073407.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-junit-20030211.141731.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-util-20030211.141939.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-email-20030211.144034.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-log-20030211.142821.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-http-20030211.143043.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-soap-20030211.142401.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-sql-20030211.144816.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-jexl/jars/commons-jexl-1.0-beta-2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/dom4j/jars/dom4j-1.4.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/atlassian-trackback/jars/atlassian-trackback-0.7.3.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-2.0-beta2.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="var" path="MAVEN_REPO/xmlrpc/jars/xmlrpc-1.2-b1.jar"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.4.2"> - <attributes> - </attributes> - </classpathentry> - <classpathentry kind="output" path="target/classes"/> -</classpath> + <classpathentry excluding="" kind="src" path="src/java"> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-jira/jars/atlassian-jira-3.2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/global-reports-plugins/jars/global-reports-plugins-1.0.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-core/jars/atlassian-core-2.3.9.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-ofbiz/jars/atlassian-ofbiz-0.2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-profiling/jars/atlassian-profiling-1.1.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-configurableobjects/jars/atlassian-configurableobjects-0.4.11.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-mail/jars/atlassian-mail-1.2.30.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-scheduler/jars/atlassian-scheduler-0.6.6.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-velocity/jars/atlassian-velocity-0.3.9.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-johnson/jars/atlassian-johnson-0.5.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-plugins/jars/atlassian-plugins-0.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/seraph/jars/seraph-0.7.5.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-jira-extras/jars/atlassian-jira-extras-0.5.2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-tagutil/jars/atlassian-tagutil-0.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/oscache/jars/oscache-DEV.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/osworkflow/jars/osworkflow-17Aug2004.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/oscore/jars/oscore-2.2.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/osuser/jars/osuser-1.0-dev-28Jul04.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/propertyset/jars/propertyset-1.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/sitemesh/jars/sitemesh-2.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/webwork/jars/webwork-1.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/webwork/jars/webwork-pell-multipartrequest1.30rc1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-digester/jars/commons-digester-1.4.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-beanutils/jars/commons-beanutils-1.6.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-collections/jars/commons-collections-2.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-1.0.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.7.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/lucene/jars/lucene-1.4-final.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/oro/jars/oro-2.0.7.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/velocity/jars/velocity-1.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/alt/jars/alt-0.07-jdk1.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/alt/jars/alt-0.07-j1.3-j2ee1.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-DEV.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/easymock/jars/easymock-1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/cglib/jars/cglib-full-2.0.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/easymock/jars/easymockclassextension-1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-0.07-j1.3-j2ee1.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/mockobjects/jars/mockobjects-0.07-jdk1.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/activation/jars/activation-1.0.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/javamail/jars/javamail-1.2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/glue/jars/glue-5.0b2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/bsf/jars/bsf-2.2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/bsh/jars/bsh-1.2b7.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-share-2.1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-entity-2.1.1-atlassian-01042004.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-service-2.1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-extutil-2.1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/csv/jars/csv-20.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/ofbcore/jars/ofbcore-xerces-serialize.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/quartz/jars/quartz-1.0.7.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/picocontainer/jars/picocontainer-1.0.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jzlib/jars/jzlib-1.0.5.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jsch/jars/jsch-0.1.16-20040721-patched.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/javacvs/jars/javacvs-20040721-patched.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/statcvs/jars/statcvs-20040721-patched.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-dbcp/jars/commons-dbcp-1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-pool/jars/commons-pool-1.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/hsqldb/jars/hsqldb-1.7.1-patched.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jndi/jars/jndi-1.2.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jta/jars/jta-1.0.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/ots-jts/jars/ots-jts_1.0.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jotm-1.4.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jotm-jrmp_stubs-1.4.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jotm-iiop_stubs-1.4.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/jonas_timer-1.4.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/jotm/jars/objectweb-datasource-1.4.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/carol/jars/carol-1.5.2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/carol/jars/carol-properties.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/xapool/jars/xapool-1.3.1.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/xerces/jars/xerces-1.4.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-20030310.073407.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-junit-20030211.141731.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-util-20030211.141939.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-email-20030211.144034.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-log-20030211.142821.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-http-20030211.143043.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-soap-20030211.142401.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-sql-20030211.144816.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-jexl/jars/commons-jexl-1.0-beta-2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/dom4j/jars/dom4j-1.4.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/atlassian-trackback/jars/atlassian-trackback-0.7.3.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-2.0-beta2.jar"> + </classpathentry> + <classpathentry kind="var" path="MAVEN_REPO/xmlrpc/jars/xmlrpc-1.2-b1.jar"> + </classpathentry> + <classpathentry kind="output" path="target/classes"> + </classpathentry> +</classpath> \ No newline at end of file Modified: trunk/forge/jira-extensions/voting/.project =================================================================== --- trunk/forge/jira-extensions/voting/.project 2005-08-12 23:26:44 UTC (rev 846) +++ trunk/forge/jira-extensions/voting/.project 2005-08-13 22:50:32 UTC (rev 847) @@ -1,27 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> + <projectDescription> - <name>Voting</name> - <comment>An extended release notes plugin.</comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> - <triggers>full,incremental,</triggers> - <arguments> - <dictionary> - <key>LaunchConfigHandle</key> - <value><project>/.externalToolBuilders/MavenVoting.launch</value> - </dictionary> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> + <name>voting-extended</name> + <comment>An extended voting project.</comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> \ No newline at end of file Modified: trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/issue/vote/DefaultVoteManager.java =================================================================== --- trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/issue/vote/DefaultVoteManager.java 2005-08-12 23:26:44 UTC (rev 846) +++ trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/issue/vote/DefaultVoteManager.java 2005-08-13 22:50:32 UTC (rev 847) @@ -5,6 +5,8 @@ import com.atlassian.jira.ManagerFactory; import com.atlassian.jira.config.properties.ApplicationProperties; import com.atlassian.jira.issue.cache.CacheManager; +import com.atlassian.jira.issue.index.IndexException; +import com.atlassian.jira.issue.index.IssueIndexManager; import com.atlassian.jira.voting.VotingManagerFactory; import com.atlassian.jira.voting.VotingSchemeManager; import com.opensymphony.user.EntityNotFoundException; @@ -131,6 +133,14 @@ return false; } cacheManager.flush("Issue_Cache", issue); + try + { + indexManager.reIndex(issue); + } + catch(IndexException e) + { + log.error("Exception re-indexing issue " + e, e); + } } return true; } @@ -145,11 +155,14 @@ return getVoters(issue).contains(user); } - public DefaultVoteManager(ApplicationProperties applicationProperties, AssociationManager associationManager, CacheManager cacheManager) + public DefaultVoteManager(ApplicationProperties applicationProperties, + AssociationManager associationManager, CacheManager cacheManager, + IssueIndexManager indexManager) { this.applicationProperties = applicationProperties; this.associationManager = associationManager; this.cacheManager = cacheManager; + this.indexManager = indexManager; votingSchemeManager = VotingManagerFactory.getVotingSchemeManager(); } @@ -158,6 +171,7 @@ private final AssociationManager associationManager; private final CacheManager cacheManager; private final VotingSchemeManager votingSchemeManager; + private final IssueIndexManager indexManager; static { @@ -182,6 +196,14 @@ issue.set("votes", new Long(votes)); issue.store(); cacheManager.flush("Issue_Cache", issue); + try + { + indexManager.reIndex(issue); + } + catch(IndexException e) + { + log.error("Exception re-indexing issue " + e, e); + } } } catch (GenericEntityException e) { Modified: trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/AddVotesAssigment.java =================================================================== --- trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/AddVotesAssigment.java 2005-08-12 23:26:44 UTC (rev 846) +++ trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/AddVotesAssigment.java 2005-08-13 22:50:32 UTC (rev 847) @@ -27,6 +27,11 @@ { try { + try { + Long.parseLong(getVotesnum()); + } catch (NumberFormatException e) { + addErrorMessage("Number of votes must be a positive integer."); + } if(getSchemeId() == null || getScheme() == null) addErrorMessage("You must select a scheme to add the votes assigment to. Click \"Voting Schemes\" link in the left hand navigation to pick one."); if(getVotesnum() == null || !TextUtils.stringSet(getVotesnum())) Modified: trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/DeleteScheme.java =================================================================== --- trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/DeleteScheme.java 2005-08-12 23:26:44 UTC (rev 846) +++ trunk/forge/jira-extensions/voting/src/java/com/atlassian/jira/web/action/admin/voting/DeleteScheme.java 2005-08-13 22:50:32 UTC (rev 847) @@ -28,7 +28,8 @@ String ret = super.doExecute(); new DefaultVoteManager(this.getApplicationProperties(), associationManager, - ManagerFactory.getCacheManager()).recountVotes(projects); + ManagerFactory.getCacheManager(), + ManagerFactory.getIndexManager()).recountVotes(projects); return ret; } |
From: <jbo...@li...> - 2005-08-12 23:28:07
|
Author: dam...@jb... Date: 2005-08-12 19:26:44 -0400 (Fri, 12 Aug 2005) New Revision: 846 Modified: trunk/forge/portal-extensions/forge-wiki/project.xml trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java Log: OK... I'm done screwing shit up. Modified: trunk/forge/portal-extensions/forge-wiki/project.xml =================================================================== --- trunk/forge/portal-extensions/forge-wiki/project.xml 2005-08-12 23:18:55 UTC (rev 845) +++ trunk/forge/portal-extensions/forge-wiki/project.xml 2005-08-12 23:26:44 UTC (rev 846) @@ -37,4 +37,9 @@ <version>1.0</version> <jar>javax.servlet.jsp.jar</jar> </dependency> + <dependency> + <groupId>junit</groupId> + <version>3.8.1</version> + <jar>javax.servlet.jsp.jar</jar> + </dependency> </project> Modified: trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java 2005-08-12 23:18:55 UTC (rev 845) +++ trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java 2005-08-12 23:26:44 UTC (rev 846) @@ -44,8 +44,9 @@ try { for (int i = 0; i < files.length; i++) { - fin = new FileReader(files[i]); - System.out.println("Processing file: " + files[i]); + File file = files[i]; + fin = new FileReader(file); + System.out.println("Processing file: " + file); final BufferedReader in = new BufferedReader(fin); int line; StringBuffer text = new StringBuffer(); |
From: <jbo...@li...> - 2005-08-12 23:20:17
|
Author: dam...@jb... Date: 2005-08-12 19:18:55 -0400 (Fri, 12 Aug 2005) New Revision: 845 Added: trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java Removed: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/test/HTMLTranslatorTest.java Log: moved again. Deleted: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/test/HTMLTranslatorTest.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/test/HTMLTranslatorTest.java 2005-08-12 23:18:42 UTC (rev 844) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/test/HTMLTranslatorTest.java 2005-08-12 23:18:55 UTC (rev 845) @@ -1,72 +0,0 @@ -package org.jboss.wiki.test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.FilenameFilter; -import java.io.IOException; - -import org.jboss.wiki.plugins.HTMLTranslator; -import junit.framework.Assert; -import junit.framework.TestCase; - -/* - * Created on Aug 12, 2005 - * - * - */ - -/** - * @author rali - */ -public class HTMLTranslatorTest extends TestCase { - - public HTMLTranslatorTest(String str) { - super(str); - } - - public void testParseLinks() { - FileReader fin = null; - HTMLTranslator tr = new HTMLTranslator(); - File dir = new File("data"); - - // The list of files can also be retrieved as File objects - File[] files = null; - // It is also possible to filter the list of returned files. - // This example does not return any files that start with `.'. - FilenameFilter filter = new FilenameFilter() { - public boolean accept(File dir, String name) { - return !name.startsWith("."); - } - }; - files = dir.listFiles(filter); - - - try { - for (int i = 0; i < files.length; i++) { - fin = new FileReader(files[i]); - System.out.println("Processing file: " + files[i]); - final BufferedReader in = new BufferedReader(fin); - int line; - StringBuffer text = new StringBuffer(); - String parsed = ""; - - while ((line = in.read()) != -1) { - text.append((char) line); - } - // System.out.println(text.toString()); - - parsed = tr.parseLinks(text.toString(), ""); - // System.out.println(parsed); - - } - } - - - catch (IOException e) { - e.printStackTrace(); - Assert.assertTrue(true); - } - - } -} Copied: trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java (from rev 844, trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/test/HTMLTranslatorTest.java) |
From: <jbo...@li...> - 2005-08-12 23:20:03
|
Author: dam...@jb... Date: 2005-08-12 19:18:42 -0400 (Fri, 12 Aug 2005) New Revision: 844 Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/test/HTMLTranslatorTest.java Log: beautify. Modified: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/test/HTMLTranslatorTest.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/test/HTMLTranslatorTest.java 2005-08-12 23:00:53 UTC (rev 843) +++ trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/test/HTMLTranslatorTest.java 2005-08-12 23:18:42 UTC (rev 844) @@ -3,8 +3,9 @@ import java.io.BufferedReader; import java.io.File; import java.io.FileReader; -import java.io. +import java.io.FilenameFilter; import java.io.IOException; + import org.jboss.wiki.plugins.HTMLTranslator; import junit.framework.Assert; import junit.framework.TestCase; @@ -17,57 +18,55 @@ /** * @author rali - * - * */ public class HTMLTranslatorTest extends TestCase { public HTMLTranslatorTest(String str) { super(str); } - - public void testParseLinks(){ - FileReader fin = null; + + public void testParseLinks() { + FileReader fin = null; HTMLTranslator tr = new HTMLTranslator(); - File dir = new File("data"); - - + File dir = new File("data"); + // The list of files can also be retrieved as File objects File[] files = null; // It is also possible to filter the list of returned files. // This example does not return any files that start with `.'. FilenameFilter filter = new FilenameFilter() { - public boolean accept(File dir, String name) { - return !name.startsWith("."); - } + public boolean accept(File dir, String name) { + return !name.startsWith("."); + } }; - files = dir.list(filter); - - - + files = dir.listFiles(filter); + + try { - for(int i=0; i<files.length;i++) - { - fin = new FileReader(files[i]); - System.out.println("Processing file: "+files[i]); - final BufferedReader in = new BufferedReader(fin); - int line; StringBuffer text = new StringBuffer(); - String parsed = ""; - - while((line=in.read())!=-1){ - text.append((char)line);} - // System.out.println(text.toString()); - - parsed = tr.parseLinks(text.toString(), ""); - // System.out.println(parsed); - - }} - - - + for (int i = 0; i < files.length; i++) { + fin = new FileReader(files[i]); + System.out.println("Processing file: " + files[i]); + final BufferedReader in = new BufferedReader(fin); + int line; + StringBuffer text = new StringBuffer(); + String parsed = ""; + + while ((line = in.read()) != -1) { + text.append((char) line); + } + // System.out.println(text.toString()); + + parsed = tr.parseLinks(text.toString(), ""); + // System.out.println(parsed); + + } + } + + catch (IOException e) { e.printStackTrace(); - Assert.assertTrue(true);} + Assert.assertTrue(true); + } + } } -} |
From: <jbo...@li...> - 2005-08-12 23:02:13
|
Author: dam...@jb... Date: 2005-08-12 19:00:53 -0400 (Fri, 12 Aug 2005) New Revision: 843 Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/test/HTMLTranslatorTest.java Removed: trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java Log: Moved test. Copied: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/test/HTMLTranslatorTest.java (from rev 842, trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java) Deleted: trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java 2005-08-12 23:00:42 UTC (rev 842) +++ trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java 2005-08-12 23:00:53 UTC (rev 843) @@ -1,73 +0,0 @@ -package org.jboss.wiki.test; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io. -import java.io.IOException; -import org.jboss.wiki.plugins.HTMLTranslator; -import junit.framework.Assert; -import junit.framework.TestCase; - -/* - * Created on Aug 12, 2005 - * - * - */ - -/** - * @author rali - * - * - */ -public class HTMLTranslatorTest extends TestCase { - - public HTMLTranslatorTest(String str) { - super(str); - } - - public void testParseLinks(){ - FileReader fin = null; - HTMLTranslator tr = new HTMLTranslator(); - File dir = new File("data"); - - - // The list of files can also be retrieved as File objects - File[] files = null; - // It is also possible to filter the list of returned files. - // This example does not return any files that start with `.'. - FilenameFilter filter = new FilenameFilter() { - public boolean accept(File dir, String name) { - return !name.startsWith("."); - } - }; - files = dir.list(filter); - - - - try { - for(int i=0; i<files.length;i++) - { - fin = new FileReader(files[i]); - System.out.println("Processing file: "+files[i]); - final BufferedReader in = new BufferedReader(fin); - int line; StringBuffer text = new StringBuffer(); - String parsed = ""; - - while((line=in.read())!=-1){ - text.append((char)line);} - // System.out.println(text.toString()); - - parsed = tr.parseLinks(text.toString(), ""); - // System.out.println(parsed); - - }} - - - - catch (IOException e) { - e.printStackTrace(); - Assert.assertTrue(true);} - -} -} |
From: <jbo...@li...> - 2005-08-12 23:02:05
|
Author: dam...@jb... Date: 2005-08-12 19:00:42 -0400 (Fri, 12 Aug 2005) New Revision: 842 Added: trunk/forge/portal-extensions/forge-wiki/src/java/org/jboss/wiki/test/ Modified: trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java Log: adding file filter. Modified: trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java =================================================================== --- trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java 2005-08-12 22:44:24 UTC (rev 841) +++ trunk/forge/portal-extensions/forge-wiki/src/test/java/org/jboss/wiki/test/HTMLTranslatorTest.java 2005-08-12 23:00:42 UTC (rev 842) @@ -3,6 +3,7 @@ import java.io.BufferedReader; import java.io.File; import java.io.FileReader; +import java.io. import java.io.IOException; import org.jboss.wiki.plugins.HTMLTranslator; import junit.framework.Assert; @@ -32,13 +33,23 @@ // The list of files can also be retrieved as File objects - File[] files = dir.listFiles(); + File[] files = null; + // It is also possible to filter the list of returned files. + // This example does not return any files that start with `.'. + FilenameFilter filter = new FilenameFilter() { + public boolean accept(File dir, String name) { + return !name.startsWith("."); + } + }; + files = dir.list(filter); try { for(int i=0; i<files.length;i++) - { fin = new FileReader(files[i]); + { + fin = new FileReader(files[i]); + System.out.println("Processing file: "+files[i]); final BufferedReader in = new BufferedReader(fin); int line; StringBuffer text = new StringBuffer(); String parsed = ""; |