You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(217) |
Nov
(180) |
Dec
(71) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(58) |
Feb
(370) |
Mar
(105) |
Apr
(165) |
May
(93) |
Jun
(37) |
Jul
|
Aug
(21) |
Sep
(131) |
Oct
(40) |
Nov
(113) |
Dec
(401) |
2007 |
Jan
(180) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2008 |
Jan
(163) |
Feb
(78) |
Mar
|
Apr
(4) |
May
(28) |
Jun
(2) |
Jul
|
Aug
|
Sep
(96) |
Oct
(189) |
Nov
(413) |
Dec
(121) |
2009 |
Jan
(34) |
Feb
(18) |
Mar
(24) |
Apr
(16) |
May
(3) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(13) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(3) |
Oct
(16) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
(35) |
Jun
|
Jul
(17) |
Aug
(7) |
Sep
|
Oct
(9) |
Nov
|
Dec
|
From: Marky G. <mar...@us...> - 2005-10-27 20:13:52
|
Update of /cvsroot/itracker/itracker/web/reports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30022/web/reports Modified Files: Tag: itrackerhibernate issue_severity.jsp Log Message: Update of 3.0 theme. A major release needs some new feeling. Under construction. Index: issue_severity.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/reports/issue_severity.jsp,v retrieving revision 1.18 retrieving revision 1.18.4.1 diff -C2 -d -r1.18 -r1.18.4.1 *** issue_severity.jsp 22 Aug 2005 11:41:30 -0000 1.18 --- issue_severity.jsp 27 Oct 2005 20:13:40 -0000 1.18.4.1 *************** *** 25,33 **** <%@ include file="/includes/header.jsp" %> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle" colspan="7"><it:message key="itracker.web.attr.projects"/>:</td> </tr> ! <tr align="center" class="listHeading"> <td valign="bottom"><it:message key="itracker.web.attr.name"/></td> <% --- 25,33 ---- <%@ include file="/includes/header.jsp" %> ! <table border="0" cellspacing="0" cellspacing="1" width="100%"align="left"> <tr> <td class="editColumnTitle" colspan="7"><it:message key="itracker.web.attr.projects"/>:</td> </tr> ! <tr align="left" class="listHeading"> <td valign="bottom"><it:message key="itracker.web.attr.name"/></td> <% *************** *** 36,51 **** %> <td valign="top"> ! <table border="0" cellspacing="0" cellpadding="0" width="100%" align="center"> ! <tr align="center" class="listHeading"> ! <td align="center" valign="top" colspan="2"><%= IssueUtilities.getSeverityName(i, currLocale) %></td> </tr> ! <tr align="center" class="listSubHeading"> ! <td align="center" valign="bottom" width="50%"><it:message key="itracker.web.reports.issuesev.open"/></td> ! <td align="center" valign="bottom" width="50%"><it:message key="itracker.web.reports.issuesev.resolved"/></td> </tr> </table> </td> <% } %> ! <td align="center" valign="bottom"><it:message key="itracker.web.attr.total"/></td> </tr> --- 36,51 ---- %> <td valign="top"> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> ! <tr align="left" class="listHeading"> ! <td align="left" valign="top" colspan="2"><%= IssueUtilities.getSeverityName(i, currLocale) %></td> </tr> ! <tr align="left" class="listSubHeading"> ! <td align="left" valign="bottom" width="50%"><it:message key="itracker.web.reports.issuesev.open"/></td> ! <td align="left" valign="bottom" width="50%"><it:message key="itracker.web.reports.issuesev.resolved"/></td> </tr> </table> </td> <% } %> ! <td align="left" valign="bottom"><it:message key="itracker.web.attr.total"/></td> </tr> *************** *** 110,122 **** %> <td> ! <table border="0" cellspacing="0" cellpadding="0" width="100%" align="center"> <tr class="<%= (i % 2 == 1 ? "listRowShaded" : "listRowUnshaded" ) %>"> ! <td align="center" width="50%"><span <%= (numOld[j] == 1 ? "style=\"color: red;\"" : "") %>><%= numOpen[j] %></span></td> ! <td align="center" width="50%"><%= numResolved[j] %></td> </tr> </table> </td> <% } %> ! <td align="center"><%= issues.length %></td> </tr> <% --- 110,122 ---- %> <td> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr class="<%= (i % 2 == 1 ? "listRowShaded" : "listRowUnshaded" ) %>"> ! <td align="left" width="50%"><span <%= (numOld[j] == 1 ? "style=\"color: red;\"" : "") %>><%= numOpen[j] %></span></td> ! <td align="left" width="50%"><%= numResolved[j] %></td> </tr> </table> </td> <% } %> ! <td align="left"><%= issues.length %></td> </tr> <% *************** *** 130,139 **** if(! hasProjects) { %> ! <tr><td colspan="7" class="listRowUnshaded" align="center"><it:message key="itracker.web.error.noprojects"/></td></tr> <% } else { %> <tr><td><html:img page="/images/blank.gif" height="8" width="1"/></td></tr> <tr><td colspan="99" class="tableNote"><it:message key="itracker.web.reports.issuesev.datenote"/></td></tr> <tr><td><html:img page="/images/blank.gif" height="15" width="1"/></td></tr> ! <tr><td colspan="99" align="center"> <img src="<html:rewrite page="/servlets/ReportChartController"/>?chartType=severityOpen&locale=<%= currLocale.toString() %>"> <img src="<html:rewrite page="/servlets/ReportChartController"/>?chartType=severityResolved&locale=<%= currLocale.toString() %>"> --- 130,139 ---- if(! hasProjects) { %> ! <tr><td colspan="7" class="listRowUnshaded" align="left"><it:message key="itracker.web.error.noprojects"/></td></tr> <% } else { %> <tr><td><html:img page="/images/blank.gif" height="8" width="1"/></td></tr> <tr><td colspan="99" class="tableNote"><it:message key="itracker.web.reports.issuesev.datenote"/></td></tr> <tr><td><html:img page="/images/blank.gif" height="15" width="1"/></td></tr> ! <tr><td colspan="99" align="left"> <img src="<html:rewrite page="/servlets/ReportChartController"/>?chartType=severityOpen&locale=<%= currLocale.toString() %>"> <img src="<html:rewrite page="/servlets/ReportChartController"/>?chartType=severityResolved&locale=<%= currLocale.toString() %>"> |
Update of /cvsroot/itracker/itracker/web/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30022/web/admin Modified Files: Tag: itrackerhibernate edit_customfield.jsp edit_configuration.jsp list_workflow.jsp edit_language.jsp list_projects.jsp edit_customfieldvalue.jsp list_tasks.jsp list_groups.jsp edit_group.jsp edit_report.jsp list_attachments.jsp list_reports.jsp edit_version.jsp list_configuration.jsp edit_workflowscript.jsp create_language_key.jsp edit_component.jsp edit_user.jsp import_data_verify.jsp import_data.jsp list_users.jsp list_languages.jsp edit_project.jsp edit_task.jsp edit_user_permissions.jsp index.jsp Log Message: Update of 3.0 theme. A major release needs some new feeling. Under construction. Index: list_users.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/list_users.jsp,v retrieving revision 1.18.4.1 retrieving revision 1.18.4.2 diff -C2 -d -r1.18.4.1 -r1.18.4.2 *** list_users.jsp 13 Oct 2005 14:42:16 -0000 1.18.4.1 --- list_users.jsp 27 Oct 2005 20:13:40 -0000 1.18.4.2 *************** *** 36,40 **** %> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle" colspan="7"><it:message key="itracker.web.attr.users"/>: (<it:message key="itracker.web.admin.listusers.numactive" arg0="<%= Integer.toString(SessionManager.getNumActiveSessions()) %>"/>)</td> --- 36,40 ---- %> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle" colspan="7"><it:message key="itracker.web.attr.users"/>: (<it:message key="itracker.web.admin.listusers.numactive" arg0="<%= Integer.toString(SessionManager.getNumActiveSessions()) %>"/>)</td> *************** *** 45,49 **** <% } %> </tr> ! <tr align="center" class="listHeading"> <td width="1"></td> <td><html:img page="/images/blank.gif" width="4"/></td> --- 45,49 ---- <% } %> </tr> ! <tr align="left" class="listHeading"> <td width="1"></td> <td><html:img page="/images/blank.gif" width="4"/></td> *************** *** 84,88 **** <td><%= users[i].getFirstName() %> <%= users[i].getLastName() %></td> <td><%= users[i].getEmail() %></td> ! <td align="center"><%= (users[i].isSuperUser() ? ITrackerResources.getString("itracker.web.generic.yes", currLocale) : ITrackerResources.getString("itracker.web.generic.no", currLocale)) %></td> <td><it:formatDate date="<%= users[i].getLastModifiedDate() %>" format="notime"/></td> <td><it:formatDate date="<%= lastAccess %>" format="short" emptyKey="itracker.web.generic.no"/></td> --- 84,88 ---- <td><%= users[i].getFirstName() %> <%= users[i].getLastName() %></td> <td><%= users[i].getEmail() %></td> ! <td align="left"><%= (users[i].isSuperUser() ? ITrackerResources.getString("itracker.web.generic.yes", currLocale) : ITrackerResources.getString("itracker.web.generic.no", currLocale)) %></td> <td><it:formatDate date="<%= users[i].getLastModifiedDate() %>" format="notime"/></td> <td><it:formatDate date="<%= lastAccess %>" format="short" emptyKey="itracker.web.generic.no"/></td> Index: edit_customfield.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/edit_customfield.jsp,v retrieving revision 1.10.4.2 retrieving revision 1.10.4.3 diff -C2 -d -r1.10.4.2 -r1.10.4.3 *** edit_customfield.jsp 22 Oct 2005 16:03:59 -0000 1.10.4.2 --- edit_customfield.jsp 27 Oct 2005 20:13:40 -0000 1.10.4.3 *************** *** 52,56 **** <html:hidden property="action"/> <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <% SystemConfiguration sc = new SystemConfigurationBean(); --- 52,56 ---- <html:hidden property="action"/> <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <% SystemConfiguration sc = new SystemConfigurationBean(); *************** *** 118,122 **** <tr> <td colspan="2" valign="top"> ! <table width="100% cellspacing="0" cellpadding="0" border="0"> <tr><td colspan="4" class="editColumnTitle"><it:message key="itracker.web.attr.translations"/>:</td></tr> <tr class="listHeading"><td colspan="4"><html:img page="/images/blank.gif" height="2" width="1"/></td></tr> --- 118,122 ---- <tr> <td colspan="2" valign="top"> ! <table width="100% cellspacing="0" cellspacing="1" border="0"> <tr><td colspan="4" class="editColumnTitle"><it:message key="itracker.web.attr.translations"/>:</td></tr> <tr class="listHeading"><td colspan="4"><html:img page="/images/blank.gif" height="2" width="1"/></td></tr> *************** *** 168,172 **** <% if(field.getFieldType() == CustomFieldUtilities.TYPE_LIST) { %> <td colspan="2" valign="top"> ! <table width="100% cellspacing="0" cellpadding="0" border="0"> <tr> <td colspan="2" class="editColumnTitle"><it:message key="itracker.web.attr.fieldoptions"/>:</td> --- 168,172 ---- <% if(field.getFieldType() == CustomFieldUtilities.TYPE_LIST) { %> <td colspan="2" valign="top"> ! <table width="100% cellspacing="0" cellspacing="1" border="0"> <tr> <td colspan="2" class="editColumnTitle"><it:message key="itracker.web.attr.fieldoptions"/>:</td> *************** *** 200,206 **** <tr><td colspan="5"><html:img page="/images/blank.gif" width="1" height="12"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="5" align="center"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="5" align="center"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> --- 200,206 ---- <tr><td colspan="5"><html:img page="/images/blank.gif" width="1" height="12"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="5" align="left"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="5" align="left"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> Index: list_groups.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/list_groups.jsp,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** list_groups.jsp 20 Feb 2005 03:29:23 -0000 1.1 --- list_groups.jsp 27 Oct 2005 20:13:40 -0000 1.1.4.1 *************** *** 36,40 **** %> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td align="right"> --- 36,40 ---- %> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td align="right"> *************** *** 42,46 **** </td> </tr> ! <tr align="center" class="listHeading"> <td width="1"></td> <td><html:img page="/images/blank.gif" width="4"/></td> --- 42,46 ---- </td> </tr> ! <tr align="left" class="listHeading"> <td width="1"></td> <td><html:img page="/images/blank.gif" width="4"/></td> Index: create_language_key.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/create_language_key.jsp,v retrieving revision 1.6.4.2 retrieving revision 1.6.4.3 diff -C2 -d -r1.6.4.2 -r1.6.4.3 *** create_language_key.jsp 22 Oct 2005 16:03:59 -0000 1.6.4.2 --- create_language_key.jsp 27 Oct 2005 20:13:40 -0000 1.6.4.3 *************** *** 22,26 **** <html:form action="/createlanguagekey"> <html:hidden property="action" value="create"/> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <% SystemConfiguration sc = new SystemConfigurationBean(); --- 22,26 ---- <html:form action="/createlanguagekey"> <html:hidden property="action" value="create"/> ! <table border="0" cellspacing="0" cellspacing="1" width="100%"align="left"> <% SystemConfiguration sc = new SystemConfigurationBean(); *************** *** 72,76 **** } %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> </table> </html:form> --- 72,76 ---- } %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> </table> </html:form> Index: import_data.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/import_data.jsp,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** import_data.jsp 16 Mar 2004 13:19:20 -0000 1.2 --- import_data.jsp 27 Oct 2005 20:13:40 -0000 1.2.4.1 *************** *** 34,38 **** <html:form action="/importdataverify" enctype="multipart/form-data"> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td colspan="2" width="50%"></td> --- 34,38 ---- <html:form action="/importdataverify" enctype="multipart/form-data"> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td colspan="2" width="50%"></td> *************** *** 50,54 **** <tr> <td colspan="2" valign="top"> ! <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="25"></td> --- 50,54 ---- <tr> <td colspan="2" valign="top"> ! <table width="100%" cellspacing="0" cellspacing="1" border="0"> <tr> <td width="25"></td> *************** *** 70,74 **** </td> <td colspan="2" valign="top"> ! <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="25"></td> --- 70,74 ---- </td> <td colspan="2" valign="top"> ! <table width="100%" cellspacing="0" cellspacing="1" border="0"> <tr> <td width="25"></td> *************** *** 89,93 **** <tr><td colspan="4"><html:img page="/images/blank.gif" height="12" width="1"/></td></tr> <tr> ! <td align="center" colspan="4"><html:submit styleClass="button" altKey="itracker.web.button.import.alt" titleKey="itracker.web.button.import.alt"><it:message key="itracker.web.button.import"/></html:submit></td> </tr> </table> --- 89,93 ---- <tr><td colspan="4"><html:img page="/images/blank.gif" height="12" width="1"/></td></tr> <tr> ! <td align="left" colspan="4"><html:submit styleClass="button" altKey="itracker.web.button.import.alt" titleKey="itracker.web.button.import.alt"><it:message key="itracker.web.button.import"/></html:submit></td> </tr> </table> Index: list_languages.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/list_languages.jsp,v retrieving revision 1.12.4.2 retrieving revision 1.12.4.3 diff -C2 -d -r1.12.4.2 -r1.12.4.3 *** list_languages.jsp 22 Oct 2005 16:03:59 -0000 1.12.4.2 --- list_languages.jsp 27 Oct 2005 20:13:40 -0000 1.12.4.3 *************** *** 20,24 **** ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <% SystemConfiguration sc = new SystemConfigurationBean(); --- 20,24 ---- ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <% SystemConfiguration sc = new SystemConfigurationBean(); Index: edit_workflowscript.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/edit_workflowscript.jsp,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** edit_workflowscript.jsp 23 Aug 2004 19:59:00 -0000 1.2 --- edit_workflowscript.jsp 27 Oct 2005 20:13:40 -0000 1.2.4.1 *************** *** 50,54 **** <html:hidden property="action"/> <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td colspan="2" width="48%"><html:img page="/images/blank.gif" width="15" height="1"/></td> --- 50,54 ---- <html:hidden property="action"/> <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td colspan="2" width="48%"><html:img page="/images/blank.gif" width="15" height="1"/></td> *************** *** 94,100 **** <tr><td colspan="5"><html:img page="/images/blank.gif" width="1" height="12"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="5" align="center"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="5" align="center"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> --- 94,100 ---- <tr><td colspan="5"><html:img page="/images/blank.gif" width="1" height="12"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="5" align="left"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="5" align="left"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> Index: list_projects.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/list_projects.jsp,v retrieving revision 1.18.4.1 retrieving revision 1.18.4.2 diff -C2 -d -r1.18.4.1 -r1.18.4.2 *** list_projects.jsp 13 Oct 2005 14:42:16 -0000 1.18.4.1 --- list_projects.jsp 27 Oct 2005 20:13:40 -0000 1.18.4.2 *************** *** 20,24 **** <%@ include file="/includes/header.jsp" %> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle" colspan="6"><it:message key="itracker.web.attr.projects"/>:</td> --- 20,24 ---- <%@ include file="/includes/header.jsp" %> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle" colspan="6"><it:message key="itracker.web.attr.projects"/>:</td> *************** *** 30,34 **** <% } %> </tr> ! <tr align="center" class="listHeading"> <td width="1"></td> <td><html:img page="/images/blank.gif" width="4"/></td> --- 30,34 ---- <% } %> </tr> ! <tr align="left" class="listHeading"> <td width="1"></td> <td><html:img page="/images/blank.gif" width="4"/></td> *************** *** 37,41 **** <td><it:message key="itracker.web.attr.created"/></td> <td><it:message key="itracker.web.attr.lastmodified"/></td> ! <td align="center"><it:message key="itracker.web.attr.issues"/></td> </tr> --- 37,41 ---- <td><it:message key="itracker.web.attr.created"/></td> <td><it:message key="itracker.web.attr.lastmodified"/></td> ! <td align="left"><it:message key="itracker.web.attr.issues"/></td> </tr> *************** *** 72,76 **** <td><it:formatDate date="<%= projects[i].getCreateDate() %>"/></td> <td><it:formatDate date="<%= projects[i].getLastModifiedDate() %>"/></td> ! <td align="center"><%= ph.getTotalNumberIssuesByProject(projects[i].getId()) %></td> </tr> <% --- 72,76 ---- <td><it:formatDate date="<%= projects[i].getCreateDate() %>"/></td> <td><it:formatDate date="<%= projects[i].getLastModifiedDate() %>"/></td> ! <td align="left"><%= ph.getTotalNumberIssuesByProject(projects[i].getId()) %></td> </tr> <% Index: edit_project.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/edit_project.jsp,v retrieving revision 1.36.4.1 retrieving revision 1.36.4.2 diff -C2 -d -r1.36.4.1 -r1.36.4.2 *** edit_project.jsp 22 Oct 2005 15:30:22 -0000 1.36.4.1 --- edit_project.jsp 27 Oct 2005 20:13:40 -0000 1.36.4.2 *************** *** 63,67 **** <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.name"/>:</td> --- 63,67 ---- <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.name"/>:</td> *************** *** 127,131 **** <tr> <td colspan="2" valign="top"> ! <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="25"></td> --- 127,131 ---- <tr> <td colspan="2" valign="top"> ! <table width="100%" cellspacing="0" cellspacing="1" border="0"> <tr> <td width="25"></td> *************** *** 153,157 **** </td> <td colspan="2" valign="top"> ! <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="25"></td> --- 153,157 ---- </td> <td colspan="2" valign="top"> ! <table width="100%" cellspacing="0" cellspacing="1" border="0"> <tr> <td width="25"></td> *************** *** 188,192 **** <tr> <td colspan="2" valign="top"> ! <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="25"></td> --- 188,192 ---- <tr> <td colspan="2" valign="top"> ! <table width="100%" cellspacing="0" cellspacing="1" border="0"> <tr> <td width="25"></td> *************** *** 204,208 **** </td> <td colspan="2" valign="top"> ! <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td width="25"></td> --- 204,208 ---- </td> <td colspan="2" valign="top"> ! <table width="100%" cellspacing="0" cellspacing="1" border="0"> <tr> <td width="25"></td> *************** *** 226,232 **** <% if(isUpdate) { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> --- 226,232 ---- <% if(isUpdate) { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> *************** *** 236,250 **** <% if(isUpdate) { %> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle" colspan="5"><it:message key="itracker.web.attr.scripts"/>:</td> <td align="right"><it:formatImageAction action="editprojectscriptform" paramName="pid" paramValue="<%= project.getId() %>" targetAction="create" src="/images/create.gif" altKey="itracker.web.image.create.projectscript.alt" arg0="<%= project.getName() %>" textActionKey="itracker.web.image.create.texttag"/></td> </tr> ! <tr align="center" class="listHeading"> <td width="40"></td> <td><html:img page="/images/blank.gif" width="4"/></td> <td><it:message key="itracker.web.attr.field"/></td> <td><it:message key="itracker.web.attr.script"/></td> ! <td align="center"><it:message key="itracker.web.attr.priority"/></td> <td><it:message key="itracker.web.attr.event"/></td> </tr> --- 236,250 ---- <% if(isUpdate) { %> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle" colspan="5"><it:message key="itracker.web.attr.scripts"/>:</td> <td align="right"><it:formatImageAction action="editprojectscriptform" paramName="pid" paramValue="<%= project.getId() %>" targetAction="create" src="/images/create.gif" altKey="itracker.web.image.create.projectscript.alt" arg0="<%= project.getName() %>" textActionKey="itracker.web.image.create.texttag"/></td> </tr> ! <tr align="left" class="listHeading"> <td width="40"></td> <td><html:img page="/images/blank.gif" width="4"/></td> <td><it:message key="itracker.web.attr.field"/></td> <td><it:message key="itracker.web.attr.script"/></td> ! <td align="left"><it:message key="itracker.web.attr.priority"/></td> <td><it:message key="itracker.web.attr.event"/></td> </tr> *************** *** 270,274 **** <td><%= scripts[i].getScript().getName() %></td> <td><%= WorkflowUtilities.getEventName(scripts[i].getScript().getEvent(), currLocale) %></td> ! <td align="center"><%= scripts[i].getPriority() %></td> </tr> <% } %> --- 270,274 ---- <td><%= scripts[i].getScript().getName() %></td> <td><%= WorkflowUtilities.getEventName(scripts[i].getScript().getEvent(), currLocale) %></td> ! <td align="left"><%= scripts[i].getPriority() %></td> </tr> <% } %> *************** *** 279,283 **** <td align="right"><it:formatImageAction action="editversionform" paramName="pid" paramValue="<%= project.getId() %>" targetAction="create" src="/images/create.gif" altKey="itracker.web.image.create.version.alt" arg0="<%= project.getName() %>" textActionKey="itracker.web.image.createtexttag"/></td> </tr> ! <tr align="center" class="listHeading"> <td width="40"></td> <td><html:img page="/images/blank.gif" width="4"/></td> --- 279,283 ---- <td align="right"><it:formatImageAction action="editversionform" paramName="pid" paramValue="<%= project.getId() %>" targetAction="create" src="/images/create.gif" altKey="itracker.web.image.create.version.alt" arg0="<%= project.getName() %>" textActionKey="itracker.web.image.createtexttag"/></td> </tr> ! <tr align="left" class="listHeading"> <td width="40"></td> <td><html:img page="/images/blank.gif" width="4"/></td> *************** *** 285,289 **** <td><it:message key="itracker.web.attr.description"/></td> <td><it:message key="itracker.web.attr.lastmodified"/></td> ! <td align="center"><it:message key="itracker.web.attr.issues"/></td> </tr> --- 285,289 ---- <td><it:message key="itracker.web.attr.description"/></td> <td><it:message key="itracker.web.attr.lastmodified"/></td> ! <td align="left"><it:message key="itracker.web.attr.issues"/></td> </tr> *************** *** 306,310 **** <td><%= versions[i].getDescription() %></td> <td><it:formatDate date="<%= versions[i].getLastModifiedDate() %>"/></td> ! <td align="center"><%= ph.getTotalNumberIssuesByVersion(versions[i].getId()) %></td> </tr> <% } %> --- 306,310 ---- <td><%= versions[i].getDescription() %></td> <td><it:formatDate date="<%= versions[i].getLastModifiedDate() %>"/></td> ! <td align="left"><%= ph.getTotalNumberIssuesByVersion(versions[i].getId()) %></td> </tr> <% } %> *************** *** 315,319 **** <td align="right"><it:formatImageAction action="editcomponentform" paramName="pid" paramValue="<%= project.getId() %>" targetAction="create" src="/images/create.gif" altKey="itracker.web.image.create.component.alt" arg0="<%= project.getName() %>" textActionKey="itracker.web.image.create.texttag"/></td> </tr> ! <tr align="center" class="listHeading"> <td width="40"></td> <td><html:img page="/images/blank.gif" width="4"/></td> --- 315,319 ---- <td align="right"><it:formatImageAction action="editcomponentform" paramName="pid" paramValue="<%= project.getId() %>" targetAction="create" src="/images/create.gif" altKey="itracker.web.image.create.component.alt" arg0="<%= project.getName() %>" textActionKey="itracker.web.image.create.texttag"/></td> </tr> ! <tr align="left" class="listHeading"> <td width="40"></td> <td><html:img page="/images/blank.gif" width="4"/></td> *************** *** 321,325 **** <td><it:message key="itracker.web.attr.description"/></td> <td><it:message key="itracker.web.attr.lastmodified"/></td> ! <td align="center"><it:message key="itracker.web.attr.issues"/></td> </tr> --- 321,325 ---- <td><it:message key="itracker.web.attr.description"/></td> <td><it:message key="itracker.web.attr.lastmodified"/></td> ! <td align="left"><it:message key="itracker.web.attr.issues"/></td> </tr> *************** *** 343,347 **** <td><%= components[i].getDescription() %></td> <td><it:formatDate date="<%= components[i].getLastModifiedDate() %>"/></td> ! <td align="center"><%= ph.getTotalNumberIssuesByComponent(components[i].getId()) %></td> </tr> <% } %> --- 343,347 ---- <td><%= components[i].getDescription() %></td> <td><it:formatDate date="<%= components[i].getLastModifiedDate() %>"/></td> ! <td align="left"><%= ph.getTotalNumberIssuesByComponent(components[i].getId()) %></td> </tr> <% } %> Index: edit_configuration.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/edit_configuration.jsp,v retrieving revision 1.9.4.3 retrieving revision 1.9.4.4 diff -C2 -d -r1.9.4.3 -r1.9.4.4 *** edit_configuration.jsp 23 Oct 2005 14:55:53 -0000 1.9.4.3 --- edit_configuration.jsp 27 Oct 2005 20:13:40 -0000 1.9.4.4 *************** *** 46,50 **** <html:hidden property="action"/> <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <% --- 46,50 ---- <html:hidden property="action"/> <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <% *************** *** 111,117 **** <tr><td colspan="4"><html:img page="/images/blank.gif" width="1" height="12"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> --- 111,117 ---- <tr><td colspan="4"><html:img page="/images/blank.gif" width="1" height="12"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> Index: import_data_verify.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/import_data_verify.jsp,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** import_data_verify.jsp 12 Mar 2004 19:57:42 -0000 1.1 --- import_data_verify.jsp 27 Oct 2005 20:13:40 -0000 1.1.4.1 *************** *** 45,49 **** <html:form action="/importdataprocess"> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr><td class="editColumnTitle" colspan="3"><it:message key="itracker.web.admin.import.verify.heading"/>:</td></tr> <tr class="listHeading"> --- 45,49 ---- <html:form action="/importdataprocess"> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr><td class="editColumnTitle" colspan="3"><it:message key="itracker.web.admin.import.verify.heading"/>:</td></tr> <tr class="listHeading"> *************** *** 90,94 **** <tr><td colspan="3"><html:img page="/images/blank.gif" height="12" width="1"/></td></tr> <tr> ! <td colspan="3" align="center"><html:submit styleClass="button" altKey="itracker.web.button.import.alt" titleKey="itracker.web.button.import.alt"><it:message key="itracker.web.button.import"/></html:submit></td> </tr> </table> --- 90,94 ---- <tr><td colspan="3"><html:img page="/images/blank.gif" height="12" width="1"/></td></tr> <tr> ! <td colspan="3" align="left"><html:submit styleClass="button" altKey="itracker.web.button.import.alt" titleKey="itracker.web.button.import.alt"><it:message key="itracker.web.button.import"/></html:submit></td> </tr> </table> Index: list_workflow.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/list_workflow.jsp,v retrieving revision 1.5.4.2 retrieving revision 1.5.4.3 diff -C2 -d -r1.5.4.2 -r1.5.4.3 *** list_workflow.jsp 22 Oct 2005 16:03:59 -0000 1.5.4.2 --- list_workflow.jsp 27 Oct 2005 20:13:40 -0000 1.5.4.3 *************** *** 30,34 **** </logic:messagesPresent> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle" colspan="8"><it:message key="itracker.web.attr.workflowscripts"/>:</td> --- 30,34 ---- </logic:messagesPresent> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle" colspan="8"><it:message key="itracker.web.attr.workflowscripts"/>:</td> *************** *** 37,41 **** </td> </tr> ! <tr align="center" class="listHeading"> <td width="1"></td> <td><html:img page="/images/blank.gif" width="4" height="1"/></td> --- 37,41 ---- </td> </tr> ! <tr align="left" class="listHeading"> <td width="1"></td> <td><html:img page="/images/blank.gif" width="4" height="1"/></td> Index: list_attachments.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/list_attachments.jsp,v retrieving revision 1.17.4.2 retrieving revision 1.17.4.3 diff -C2 -d -r1.17.4.2 -r1.17.4.3 *** list_attachments.jsp 22 Oct 2005 16:03:59 -0000 1.17.4.2 --- list_attachments.jsp 27 Oct 2005 20:13:40 -0000 1.17.4.3 *************** *** 20,29 **** <%@ include file="/includes/header.jsp" %> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle" colspan="7"><it:message key="itracker.web.attr.attachments"/>:</td> <td align="right"><it:formatImageAction action="exportattachments" src="/images/export.png" altKey="itracker.web.image.export.attachments.alt" textActionKey="itracker.web.image.export.texttag"/></td> </tr> ! <tr align="center" class="listHeading"> <td width="1"></td> <td><html:img page="/images/blank.gif" width="4"/></td> --- 20,29 ---- <%@ include file="/includes/header.jsp" %> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle" colspan="7"><it:message key="itracker.web.attr.attachments"/>:</td> <td align="right"><it:formatImageAction action="exportattachments" src="/images/export.png" altKey="itracker.web.image.export.attachments.alt" textActionKey="itracker.web.image.export.texttag"/></td> </tr> ! <tr align="left" class="listHeading"> <td width="1"></td> <td><html:img page="/images/blank.gif" width="4"/></td> *************** *** 67,71 **** if(attachments.length == 0) { %> ! <tr><td colspan="8" class="listRowText" align="center"><it:message key="itracker.web.error.noattachments"/></td></tr> <% } --- 67,71 ---- if(attachments.length == 0) { %> ! <tr><td colspan="8" class="listRowText" align="left"><it:message key="itracker.web.error.noattachments"/></td></tr> <% } Index: edit_group.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/edit_group.jsp,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** edit_group.jsp 20 Feb 2005 03:29:23 -0000 1.1 --- edit_group.jsp 27 Oct 2005 20:13:40 -0000 1.1.4.1 *************** *** 59,63 **** <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.description"/>:</td> --- 59,63 ---- <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.description"/>:</td> *************** *** 67,71 **** </table> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle" colspan="8"><it:message key="itracker.web.attr.permissions"/>:</td> --- 67,71 ---- </table> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle" colspan="8"><it:message key="itracker.web.attr.permissions"/>:</td> *************** *** 125,133 **** </table> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <% if(isUpdate) { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> --- 125,133 ---- </table> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <% if(isUpdate) { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> Index: edit_language.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/edit_language.jsp,v retrieving revision 1.6 retrieving revision 1.6.4.1 diff -C2 -d -r1.6 -r1.6.4.1 *** edit_language.jsp 25 Mar 2004 19:33:50 -0000 1.6 --- edit_language.jsp 27 Oct 2005 20:13:40 -0000 1.6.4.1 *************** *** 69,73 **** <% } %> ! <table border="0" cellspacing="0" cellpadding="0" width="95%" align="center"> <% if(! isUpdate) { %> <tr> --- 69,73 ---- <% } %> ! <table border="0" cellspacing="0" cellspacing="1" width="95%" align="left"> <% if(! isUpdate) { %> <tr> *************** *** 129,135 **** <tr><td colspan="4"><html:img page="/images/blank.gif" height="12" width="1"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> --- 129,135 ---- <tr><td colspan="4"><html:img page="/images/blank.gif" height="12" width="1"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> Index: edit_customfieldvalue.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/edit_customfieldvalue.jsp,v retrieving revision 1.6.4.1 retrieving revision 1.6.4.2 diff -C2 -d -r1.6.4.1 -r1.6.4.2 *** edit_customfieldvalue.jsp 22 Oct 2005 15:30:22 -0000 1.6.4.1 --- edit_customfieldvalue.jsp 27 Oct 2005 20:13:40 -0000 1.6.4.2 *************** *** 49,53 **** <html:hidden property="action"/> <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <% SystemConfiguration sc = new SystemConfigurationBean(); --- 49,53 ---- <html:hidden property="action"/> <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <% SystemConfiguration sc = new SystemConfigurationBean(); *************** *** 112,118 **** <tr><td colspan="4"><html:img page="/images/blank.gif" width="1" height="12"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> --- 112,118 ---- <tr><td colspan="4"><html:img page="/images/blank.gif" width="1" height="12"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> Index: list_configuration.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/list_configuration.jsp,v retrieving revision 1.10.4.2 retrieving revision 1.10.4.3 diff -C2 -d -r1.10.4.2 -r1.10.4.3 *** list_configuration.jsp 22 Oct 2005 16:03:59 -0000 1.10.4.2 --- list_configuration.jsp 27 Oct 2005 20:13:40 -0000 1.10.4.3 *************** *** 39,46 **** </logic:messagesPresent> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td width="47%" valign="top"> ! <table border="0" cellspacing="0" cellpadding="0" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.statuses"/>:</td> --- 39,46 ---- </logic:messagesPresent> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td width="47%" valign="top"> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.statuses"/>:</td> *************** *** 62,66 **** <td width="6%"> </td> <td width="47%" valign="top"> ! <table border="0" cellspacing="0" cellpadding="0" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.severities"/>:</td> --- 62,66 ---- <td width="6%"> </td> <td width="47%" valign="top"> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.severities"/>:</td> *************** *** 91,95 **** <tr> <td width="47%"> ! <table border="0" cellspacing="0" cellpadding="0" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.resolutions"/>:</td> --- 91,95 ---- <tr> <td width="47%"> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.resolutions"/>:</td> *************** *** 118,122 **** <td width="6%"> </td> <td width="47%" valign="top"> ! <table border="0" cellspacing="0" cellpadding="0" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.customfields"/>:</td> --- 118,122 ---- <td width="6%"> </td> <td width="47%" valign="top"> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.customfields"/>:</td> Index: edit_report.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/edit_report.jsp,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -C2 -d -r1.8 -r1.8.4.1 *** edit_report.jsp 1 Apr 2004 13:07:10 -0000 1.8 --- edit_report.jsp 27 Oct 2005 20:13:40 -0000 1.8.4.1 *************** *** 56,60 **** <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.name"/>:</td> --- 56,60 ---- <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.name"/>:</td> *************** *** 104,110 **** <tr><td colspan="4"><html:img page="/images/blank.gif" height="10" width="1"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> --- 104,110 ---- <tr><td colspan="4"><html:img page="/images/blank.gif" height="10" width="1"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> Index: edit_task.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/edit_task.jsp,v retrieving revision 1.10 retrieving revision 1.10.4.1 diff -C2 -d -r1.10 -r1.10.4.1 *** edit_task.jsp 18 Feb 2004 17:48:45 -0000 1.10 --- edit_task.jsp 27 Oct 2005 20:13:40 -0000 1.10.4.1 *************** *** 47,51 **** <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.predefinedtask"/>:</td> --- 47,51 ---- <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellspacing="1" width="100%"align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.predefinedtask"/>:</td> *************** *** 95,101 **** <tr><td colspan="4"><html:img page="/images/blank.gif" height="10" width="1"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> --- 95,101 ---- <tr><td colspan="4"><html:img page="/images/blank.gif" height="10" width="1"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> Index: index.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/index.jsp,v retrieving revision 1.20.4.1 retrieving revision 1.20.4.2 diff -C2 -d -r1.20.4.1 -r1.20.4.2 *** index.jsp 11 Oct 2005 01:21:06 -0000 1.20.4.1 --- index.jsp 27 Oct 2005 20:13:40 -0000 1.20.4.2 *************** *** 59,63 **** </logic:messagesPresent> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <% SimpleDateFormat sdf = new SimpleDateFormat(ITrackerResources.getString("itracker.dateformat.full"), currLocale); %> <% long[] sizeAndCount = ih.getAllIssueAttachmentsSizeAndCount(); %> --- 59,63 ---- </logic:messagesPresent> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <% SimpleDateFormat sdf = new SimpleDateFormat(ITrackerResources.getString("itracker.dateformat.full"), currLocale); %> <% long[] sizeAndCount = ih.getAllIssueAttachmentsSizeAndCount(); %> Index: list_reports.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/list_reports.jsp,v retrieving revision 1.11.4.4 retrieving revision 1.11.4.5 diff -C2 -d -r1.11.4.4 -r1.11.4.5 *** list_reports.jsp 22 Oct 2005 16:03:59 -0000 1.11.4.4 --- list_reports.jsp 27 Oct 2005 20:13:40 -0000 1.11.4.5 *************** *** 31,35 **** </logic:messagesPresent> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle" colspan="10"><it:message key="itracker.web.attr.reports"/>:</td> --- 31,35 ---- </logic:messagesPresent> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle" colspan="10"><it:message key="itracker.web.attr.reports"/>:</td> *************** *** 38,42 **** </td> </tr> ! <tr align="center" class="listHeading"> <td width="1"></td> <td><html:img page="/images/blank.gif" width="4" height="1"/></td> --- 38,42 ---- </td> </tr> ! <tr align="left" class="listHeading"> <td width="1"></td> <td><html:img page="/images/blank.gif" width="4" height="1"/></td> *************** *** 45,53 **** <td><it:message key="itracker.web.attr.description"/></td> <td><html:img page="/images/blank.gif" width="4" height="1"/></td> ! <td align="center"><it:message key="itracker.web.attr.reporttype"/></td> <td><html:img page="/images/blank.gif" width="4" height="1"/></td> ! <td align="center"><it:message key="itracker.web.attr.datatype"/></td> <td><html:img page="/images/blank.gif" width="4" height="1"/></td> ! <td align="center"><it:message key="itracker.web.attr.lastmodified"/></td> </tr> --- 45,53 ---- <td><it:message key="itracker.web.attr.description"/></td> <td><html:img page="/images/blank.gif" width="4" height="1"/></td> ! <td align="left"><it:message key="itracker.web.attr.reporttype"/></td> <td><html:img page="/images/blank.gif" width="4" height="1"/></td> ! <td align="left"><it:message key="itracker.web.attr.datatype"/></td> <td><html:img page="/images/blank.gif" width="4" height="1"/></td> ! <td align="left"><it:message key="itracker.web.attr.lastmodified"/></td> </tr> *************** *** 92,98 **** <td><it:formatDescription truncateLength="60"><%= reports[i].getDescription() %></it:formatDescription></td> <td></td> ! <td align="center"><%= reportTypeString %></td> <td></td> ! <td align="center"><%= dataTypeString %></td> <td></td> <td align="right"><it:formatDate date="<%= reports[i].getLastModifiedDate() %>"/></td> --- 92,98 ---- <td><it:formatDescription truncateLength="60"><%= reports[i].getDescription() %></it:formatDescription></td> <td></td> ! <td align="left"><%= reportTypeString %></td> <td></td> ! <td align="left"><%= dataTypeString %></td> <td></td> <td align="right"><it:formatDate date="<%= reports[i].getLastModifiedDate() %>"/></td> Index: edit_version.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/edit_version.jsp,v retrieving revision 1.14 retrieving revision 1.14.4.1 diff -C2 -d -r1.14 -r1.14.4.1 *** edit_version.jsp 18 Feb 2004 17:48:45 -0000 1.14 --- edit_version.jsp 27 Oct 2005 20:13:40 -0000 1.14.4.1 *************** *** 46,50 **** <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.number"/>:</td> --- 46,50 ---- <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.number"/>:</td> *************** *** 61,67 **** <tr><td colspan="4"><html:img page="/images/blank.gif" height="10" width="1"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> --- 61,67 ---- <tr><td colspan="4"><html:img page="/images/blank.gif" height="10" width="1"/></td></tr> <% if(isUpdate) { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> Index: edit_user_permissions.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/edit_user_permissions.jsp,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** edit_user_permissions.jsp 26 Oct 2005 16:36:34 -0000 1.1.4.1 --- edit_user_permissions.jsp 27 Oct 2005 20:13:40 -0000 1.1.4.2 *************** *** 68,72 **** <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.login"/>:</td> --- 68,72 ---- <html:hidden property="id"/> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle"><it:message key="itracker.web.attr.login"/>:</td> *************** *** 131,135 **** </table> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle" colspan="8"><it:message key="itracker.web.attr.permissions"/>:</td> --- 131,135 ---- </table> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <tr> <td class="editColumnTitle" colspan="8"><it:message key="itracker.web.attr.permissions"/>:</td> *************** *** 208,216 **** </table> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <% if(isUpdate) { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="center"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> --- 208,216 ---- </table> ! <table border="0" cellspacing="0" cellspacing="1" width="100%" align="left"> <% if(isUpdate) { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.update.alt" titleKey="itracker.web.button.update.alt"><it:message key="itracker.web.button.update"/></html:submit></td></tr> <% } else { %> ! <tr><td colspan="4" align="left"><html:submit styleClass="button" altKey="itracker.web.button.create.alt" titleKey="itracker.web.button.create.alt"><it:message key="itracker.web.button.create"/></html:submit></td></tr> <% } %> </table> Index: list_tasks.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/list_tasks.jsp,v retrieving revision 1.10.4.1 retrieving revision 1.10.4.2 diff -C2 -d -r1.10.4.1 -r1.10.4.2 *** list_tasks.jsp 22 Oct 2005 16:12:31 -0000 1.10.4.1 --- list_tasks.jsp 27 Oct 2005 20:13:40 -0000 1.10.4.2 *************** *** 32,36 **** </logic:messagesPresent> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> <tr> <td class="editColumnTitle" colspan="8"><it:message key="itracker.web.attr.tasks"/>: <... [truncated message content] |
From: Marky G. <mar...@us...> - 2005-10-27 18:22:51
|
Update of /cvsroot/itracker/itracker/web/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30935/web/includes Modified Files: Tag: itrackerhibernate footer.jsp Log Message: little iteration on jsp... just visual. Index: footer.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/includes/footer.jsp,v retrieving revision 1.7.4.3 retrieving revision 1.7.4.4 diff -C2 -d -r1.7.4.3 -r1.7.4.4 *** footer.jsp 26 Oct 2005 08:00:32 -0000 1.7.4.3 --- footer.jsp 27 Oct 2005 18:22:43 -0000 1.7.4.4 *************** *** 1,5 **** <br/> <br/> ! <hr noshade width="75%" height="1"> <br/> <table width="90%" align="center" class="footer"> --- 1,5 ---- <br/> <br/> ! <hr noshade width="100%" height="1"> <br/> <table width="90%" align="center" class="footer"> *************** *** 7,11 **** <td align="left" width="50%" style="text-align: left;"> <it:message key="itracker.web.attr.copyright"/> 2002, 2003, 2004 by Jason Carroll</a>, ! 2005 by itracker.org, Version 3.0</td> <td align="right" width="50%" style="text-align: right;"> <% java.util.Date currentDate = new java.util.Date(); %> --- 7,11 ---- <td align="left" width="50%" style="text-align: left;"> <it:message key="itracker.web.attr.copyright"/> 2002, 2003, 2004 by Jason Carroll</a>, ! 2005 by <a href="http://www.sourceforge.net/projects/itracker/" target="_blank">itracker.org</a> Version 3.0</td> <td align="right" width="50%" style="text-align: right;"> <% java.util.Date currentDate = new java.util.Date(); %> |
From: Marky G. <mar...@us...> - 2005-10-26 16:36:46
|
Update of /cvsroot/itracker/itracker/web/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32571/web/admin Modified Files: Tag: itrackerhibernate edit_user_permissions.jsp Log Message: this one still needs a fix... (sorry, but I am committing something which is not yet fine...) Index: edit_user_permissions.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/admin/edit_user_permissions.jsp,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** edit_user_permissions.jsp 24 Feb 2005 03:31:54 -0000 1.1 --- edit_user_permissions.jsp 26 Oct 2005 16:36:34 -0000 1.1.4.1 *************** *** 24,29 **** <% } else { ! UserHandlerLocal uh = UserHandlerUtil.getLocalHome().create(); ! ProjectHandlerLocal ph = ProjectHandlerUtil.getLocalHome().create(); boolean isUpdate = false; --- 24,31 ---- <% } else { ! UserHandler uh = ServletContextUtils.getItrackerServices(request.getSession().getServletContext()); ! ! // UserHandlerLocal uh = UserHandlerUtil.getLocalHome().create(); ! // ProjectHandlerLocal ph = ProjectHandlerUtil.getLocalHome().create(); boolean isUpdate = false; |
From: Marky G. <mar...@us...> - 2005-10-26 16:36:46
|
Update of /cvsroot/itracker/itracker/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32534/web Modified Files: Tag: itrackerhibernate view_issue_activity.jsp Log Message: this one still needs a fix... (sorry, but I am committing something which is not yet fine...) Index: view_issue_activity.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/view_issue_activity.jsp,v retrieving revision 1.13 retrieving revision 1.13.4.1 diff -C2 -d -r1.13 -r1.13.4.1 *** view_issue_activity.jsp 22 Aug 2005 11:41:29 -0000 1.13 --- view_issue_activity.jsp 26 Oct 2005 16:36:21 -0000 1.13.4.1 *************** *** 21,27 **** InitialContext ic = new InitialContext(); ! Object ihRef = ic.lookup("java:comp/env/" + IssueHandler.JNDI_NAME); ! IssueHandlerHome ihHome = (IssueHandlerHome) PortableRemoteObject.narrow(ihRef, IssueHandlerHome.class); ! IssueHandler ih = ihHome.create(); Integer issueId = new Integer((request.getParameter("id") == null ? "-1" : (request.getParameter("id")))); --- 21,25 ---- InitialContext ic = new InitialContext(); ! IssueHandler ih = new IssueHandlerBean(); Integer issueId = new Integer((request.getParameter("id") == null ? "-1" : (request.getParameter("id")))); |
From: Marky G. <mar...@us...> - 2005-10-26 08:01:12
|
Update of /cvsroot/itracker/itracker/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12368/web Modified Files: Tag: itrackerhibernate index.jsp Log Message: corrected some errors in index.jsp (homepage) Index: index.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/index.jsp,v retrieving revision 1.34.4.2 retrieving revision 1.34.4.3 diff -C2 -d -r1.34.4.2 -r1.34.4.3 *** index.jsp 23 Oct 2005 22:32:49 -0000 1.34.4.2 --- index.jsp 26 Oct 2005 08:01:03 -0000 1.34.4.3 *************** *** 1,437 **** ! <%@ page language="java" contentType="text/html;charset=UTF-8" %> ! <%@ taglib uri="/itracker.tld" prefix="it" %> ! <%@ taglib uri="/struts-bean.tld" prefix="bean" %> ! <%@ taglib uri="/struts-html.tld" prefix="html" %> ! <%@ taglib uri="/struts-logic.tld" prefix="logic" %> ! ! <%@ page import="java.util.Arrays" %> ! <%@ page import="javax.naming.*" %> ! <%@ page import="javax.rmi.*" %> ! <%@ page import="cowsultants.itracker.ejb.client.models.*" %> ! <%@ page import="cowsultants.itracker.ejb.client.util.*" %> ! <%@ page import="cowsultants.itracker.ejb.client.interfaces.*" %> ! <%@ page import="cowsultants.itracker.ejb.client.resources.ITrackerResources" %> ! <%@ page import="org.springframework.beans.factory.access.*" %> ! <%@ page import="cowsultants.itracker.ejb.beans.session.*" %> ! ! <it:checkLogin/> ! ! <%@ include file="/includes/page_init.jsp" %> ! <bean:define id="pageTitleKey" value="itracker.web.index.title"/> ! <bean:define id="pageTitleArg" value=""/> ! <%@ include file="/includes/header.jsp" %> ! ! <% ! IssueHandler ih = new IssueHandlerBean(); ! ProjectHandler ph = new ProjectHandlerBean(); ! UserHandler uh = new UserHandlerBean(); ! Integer currUserId = currUser.getId(); ! UserPreferencesModel userPrefs = (UserPreferencesModel) session.getAttribute("preferences"); ! ! int hiddenSections = 0; ! if(! "all".equalsIgnoreCase(request.getParameter("sections"))) { ! hiddenSections = userPrefs.getHiddenIndexSections(); ! } ! ! IssueModel[] createdIssues = new IssueModel[0]; ! IssueModel[] ownedIssues = new IssueModel[0]; ! IssueModel[] unassignedIssues = new IssueModel[0]; ! IssueModel[] watchedIssues = new IssueModel[0]; ! ! if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_CREATED, hiddenSections)) { ! createdIssues = ih.getIssuesCreatedByUser(currUserId); ! } ! if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_ASSIGNED, hiddenSections)) { ! ownedIssues = ih.getIssuesOwnedByUser(currUserId); ! } ! if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_UNASSIGNED, hiddenSections)) { ! unassignedIssues = ih.getUnassignedIssues(); ! } ! if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_WATCHED, hiddenSections)) { ! watchedIssues = ih.getIssuesWatchedByUser(currUserId); ! } ! ! String order = userPrefs.getSortColumnOnIssueList(); ! ! if("id".equals(order)) { ! Arrays.sort(createdIssues, new IssueModel.CompareById()); ! Arrays.sort(ownedIssues, new IssueModel.CompareById()); ! Arrays.sort(unassignedIssues, new IssueModel.CompareById()); ! Arrays.sort(watchedIssues, new IssueModel.CompareById()); ! } else if("sev".equals(order)) { ! Arrays.sort(createdIssues, new IssueModel.CompareBySeverity()); ! Arrays.sort(ownedIssues, new IssueModel.CompareBySeverity()); ! Arrays.sort(unassignedIssues, new IssueModel.CompareBySeverity()); ! Arrays.sort(watchedIssues, new IssueModel.CompareBySeverity()); ! } else if("stat".equals(order)) { ! Arrays.sort(createdIssues, new IssueModel()); ! Arrays.sort(ownedIssues, new IssueModel.CompareBySeverity()); ! Arrays.sort(unassignedIssues, new IssueModel()); ! Arrays.sort(watchedIssues, new IssueModel()); ! } else if("lm".equals(order)) { ! Arrays.sort(createdIssues, new IssueModel.CompareByDate(false)); ! Arrays.sort(ownedIssues, new IssueModel.CompareByDate(false)); ! Arrays.sort(unassignedIssues, new IssueModel.CompareByDate(false)); ! Arrays.sort(watchedIssues, new IssueModel.CompareByDate(false)); ! } else if("own".equals(order)) { ! Arrays.sort(createdIssues, new IssueModel.CompareByOwnerAndStatus()); ! Arrays.sort(ownedIssues, new IssueModel.CompareBySeverity()); ! Arrays.sort(unassignedIssues, new IssueModel.CompareByOwnerAndStatus()); ! Arrays.sort(watchedIssues, new IssueModel.CompareByOwnerAndStatus()); ! } else { ! Arrays.sort(createdIssues, new IssueModel()); ! Arrays.sort(ownedIssues, new IssueModel.CompareBySeverity()); ! Arrays.sort(unassignedIssues, new IssueModel()); ! Arrays.sort(watchedIssues, new IssueModel()); ! } ! ! ! int j = 0; ! %> ! ! <logic:messagesPresent> ! <center> ! <span class="formError"> ! <html:messages id="error"> ! <bean:write name="error"/><br/> ! </html:messages> ! </span> ! </center> ! <br> ! </logic:messagesPresent> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> ! <% if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_ASSIGNED, hiddenSections)) { %> ! <tr> ! <td class="editColumnTitle" colspan="15"><it:message key="itracker.web.index.assigned"/>:</td> ! </tr> ! <tr align="center" class="listHeading"> ! <td width="50"></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.id"/></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.project"/></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.status"/></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.severity"/></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.description"/></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.owner"/></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.lastmodified"/></td> ! </tr> ! <% ! for(int i = 0; i < ownedIssues.length; i++) { ! if(userPrefs.getNumItemsOnIndex() > 0 && i >= userPrefs.getNumItemsOnIndex() && ! "true".equals(request.getParameter("showAll"))) { ! %> ! <tr class="listRowUnshaded"><td align="center" colspan="15"><html:link page="/index.jsp?showAll=true"><it:message key="itracker.web.index.moreissues"/></html:link></td></tr> ! <% ! break; ! } ! ! UserModel owner = ih.getIssueOwner(ownedIssues[i].getId()); ! %> ! <tr align="right" class="<%= (i % 2 == 1 ? "listRowShaded" : "listRowUnshaded" ) %>"> ! <td> ! <it:formatImageAction forward="viewissue" paramName="id" paramValue="<%= ownedIssues[i].getId() %>" src="/images/view.gif" altKey="itracker.web.image.view.issue.alt" arg0="<%= ownedIssues[i].getId() %>" textActionKey="itracker.web.image.view.texttag"/> ! <% if(IssueUtilities.canEditIssue(ownedIssues[i], currUserId, currPermissions)) { %> ! <it:formatImageAction action="editissueform" paramName="id" paramValue="<%= ownedIssues[i].getId() %>" caller="index" src="/images/edit.gif" altKey="itracker.web.image.edit.issue.alt" arg0="<%= ownedIssues[i].getId() %>" textActionKey="itracker.web.image.edit.texttag"/> ! <% } %> ! </td> ! <td></td> ! <td align="left"><%= ownedIssues[i].getId() %></td> ! <td></td> ! <td><%= ownedIssues[i].getProjectName() %></td> ! <td></td> ! <td><%= IssueUtilities.getStatusName(ownedIssues[i].getStatus(), currLocale) %></td> ! <td></td> ! <td><%= IssueUtilities.getSeverityName(ownedIssues[i].getSeverity(), currLocale) %></td> ! <td></td> ! <td><it:formatDescription><%= ownedIssues[i].getDescription() %></it:formatDescription></td> ! <td></td> ! <td><it:formatIssueOwner issue="<%= ownedIssues[i] %>" format="short"/></td> ! <td></td> ! <td><it:formatDate date="<%= ownedIssues[i].getLastModifiedDate() %>"/></td> ! </tr> ! <% } %> ! <tr><td><html:img page="/images/blank.gif" width="1" height="20"/></td></tr> ! <% } %> ! ! ! <% if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_UNASSIGNED, hiddenSections)) { %> ! <tr> ! <td class="editColumnTitle" colspan="15"><it:message key="itracker.web.index.unassigned"/>:</td> ! </tr> ! <tr align="center" class="listHeading"> ! <td></td> ! <td></td> ! <td><it:message key="itracker.web.attr.id"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.project"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.status"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.severity"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.description"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.owner"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.lastmodified"/></td> ! </tr> ! ! <% ! j = 0; ! HashMap possibleOwnersMap = new HashMap(); ! HashMap usersWithEditOwnMap = new HashMap(); ! for(int i = 0; i < unassignedIssues.length; i++) { ! if(! IssueUtilities.canViewIssue(unassignedIssues[i], currUserId, currPermissions)) { ! continue; ! } ! j++; ! if(userPrefs.getNumItemsOnIndex() > 0 && j >= userPrefs.getNumItemsOnIndex() && ! "true".equals(request.getParameter("showAll"))) { ! %> ! <tr class="listRowUnshaded"><td align="center" colspan="15"><html:link page="/index.jsp?showAll=true"><it:message key="itracker.web.index.moreissues"/></html:link></td></tr> ! <% ! break; ! } ! %> ! <tr align="right" class="<%= (i % 2 == 1 ? "listRowShaded" : "listRowUnshaded" ) %>"> ! <td> ! <it:formatImageAction forward="viewissue" paramName="id" paramValue="<%= unassignedIssues[i].getId() %>" src="/images/view.gif" altKey="itracker.web.image.view.issue.alt" arg0="<%= unassignedIssues[i].getId() %>" textActionKey="itracker.web.image.view.texttag"/> ! <% if(IssueUtilities.canEditIssue(unassignedIssues[i], currUserId, currPermissions)) { %> ! <it:formatImageAction action="editissueform" paramName="id" paramValue="<%= unassignedIssues[i].getId() %>" caller="index" src="/images/edit.gif" altKey="itracker.web.image.edit.issue.alt" arg0="<%= unassignedIssues[i].getId() %>" textActionKey="itracker.web.image.edit.texttag"/> ! <% ! } ! if(! IssueUtilities.hasIssueNotification(unassignedIssues[i], currUserId)) { ! %> ! <it:formatImageAction forward="watchissue" paramName="id" paramValue="<%= unassignedIssues[i].getId() %>" caller="index" src="/images/watch.gif" altKey="itracker.web.image.watch.issue.alt" arg0="<%= unassignedIssues[i].getId() %>" textActionKey="itracker.web.image.watch.texttag"/> ! <% } %> ! </td> ! <td></td> ! <td align="left"><%= unassignedIssues[i].getId() %></td> ! <td></td> ! <td><%= unassignedIssues[i].getProjectName() %></td> ! <td></td> ! <td><%= IssueUtilities.getStatusName(unassignedIssues[i].getStatus(), currLocale) %></td> ! <td></td> ! <td><%= IssueUtilities.getSeverityName(unassignedIssues[i].getSeverity(), currLocale) %></td> ! <td></td> ! <td><it:formatDescription><%= unassignedIssues[i].getDescription() %></it:formatDescription></td> ! <td></td> ! <% if(UserUtilities.hasPermission(currPermissions, unassignedIssues[i].getProjectId(), UserUtilities.PERMISSION_ASSIGN_OTHERS)) { %> ! <html:form action="/assignissue"> ! <html:hidden property="issueId" value="<%= unassignedIssues[i].getId().toString() %>"/> ! <html:hidden property="projectId" value="<%= unassignedIssues[i].getProjectId().toString() %>"/> ! <td><html:select property="userId" styleClass="<%= (i % 2 == 1 ? \"listRowShaded\" : \"listRowUnshaded\") %>" > ! <%= (unassignedIssues[i].getOwnerId().intValue() == -1 ? "<option value=\"-1\">" + ITrackerResources.getString("itracker.web.generic.unassigned", currLocale) + "</option>" : "<option value=\"" + unassignedIssues[i].getOwnerId() + "\">" + UserUtilities.getInitial(unassignedIssues[i].getOwnerFirstName()) + " " + unassignedIssues[i].getOwnerLastName() + "</option>") %> ! <% ! // Because of the potentially large number of issues, and a multitude of projects, the ! // possible owners for a project are stored in a Map. This doesn't take into account the ! // creator of the issue though since they may only have EDIT_USERS permission. So if the ! // creator isn't already in the project list, check to see if the creator has EDIT_USERS ! // permissions, if so then add them to the lsit of owners and resort. ! UserModel[] tempOwners = new UserModel[0]; ! UserModel[] possibleOwners = (UserModel[]) possibleOwnersMap.get(unassignedIssues[i].getProjectId()); ! if(possibleOwners == null) { ! possibleOwners = uh.getPossibleOwners(null, unassignedIssues[i].getProjectId(), null); ! Arrays.sort(possibleOwners, new UserModel.CompareByName()); ! possibleOwnersMap.put(unassignedIssues[i].getProjectId(), possibleOwners); ! } ! UserModel[] editOwnUsers = (UserModel[]) usersWithEditOwnMap.get(unassignedIssues[i].getProjectId()); ! if(editOwnUsers == null) { ! editOwnUsers = uh.getUsersWithProjectPermission(unassignedIssues[i].getProjectId(), UserUtilities.PERMISSION_EDIT_USERS, true); ! usersWithEditOwnMap.put(unassignedIssues[i].getProjectId(), editOwnUsers); ! } ! boolean creatorPresent = false; ! for(int k = 0; k < possibleOwners.length; k++) { ! if(possibleOwners[k].getId().equals(unassignedIssues[i].getCreatorId())) { ! creatorPresent = true; ! break; ! } ! } ! if(! creatorPresent) { ! creatorPresent = true; ! for(int k = 0; k < editOwnUsers.length; k++) { ! if(editOwnUsers[k].getId().equals(unassignedIssues[i].getCreatorId())) { ! tempOwners = new UserModel[possibleOwners.length + 1]; ! for(int m = 0; m < possibleOwners.length; m++) { ! tempOwners[m] = possibleOwners[m]; ! } ! tempOwners[tempOwners.length - 1] = editOwnUsers[k]; ! Arrays.sort(tempOwners, new UserModel.CompareByName()); ! creatorPresent = false; ! } ! } ! } ! ! if(creatorPresent) { ! for(int k = 0; k < possibleOwners.length; k++) { ! %> ! <option value="<%= possibleOwners[k].getId() %>" <%= (unassignedIssues[i].getOwnerId() == possibleOwners[k].getId() ? "selected" : "") %>><%= possibleOwners[k].getFirstInitial() + " " + possibleOwners[k].getLastName() %></option> ! <% ! } ! } else { ! for(int k = 0; k < tempOwners.length; k++) { ! %> ! <option value="<%= tempOwners[k].getId() %>" <%= (unassignedIssues[i].getOwnerId() == tempOwners[k].getId() ? "selected" : "") %>><%= tempOwners[k].getFirstInitial() + " " + tempOwners[k].getLastName() %></option> ! <% ! } ! } ! %> ! </html:select></td> ! </html:form> ! <% } else if(UserUtilities.hasPermission(currPermissions, unassignedIssues[i].getProjectId(), UserUtilities.PERMISSION_ASSIGN_SELF)) { %> ! <html:form action="/assignissue"> ! <html:hidden property="issueId" value="<%= unassignedIssues[i].getId().toString() %>"/> ! <html:hidden property="projectId" value="<%= unassignedIssues[i].getProjectId().toString() %>"/> ! <td><html:select property="userId" styleClass="<%= (i % 2 == 1 ? \"listRowShaded\" : \"listRowUnshaded\") %>" > ! <%= (unassignedIssues[i].getOwnerId().intValue() == -1 ? "<option value=\"-1\">" + ITrackerResources.getString("itracker.web.generic.unassigned", currLocale) + "</option>" : "<option value=\"" + unassignedIssues[i].getOwnerId() + "\">" + UserUtilities.getInitial(unassignedIssues[i].getOwnerFirstName()) + " " + unassignedIssues[i].getOwnerLastName() + "</option>") %> ! <option value="<%= currUser.getId() %>" <%= (unassignedIssues[i].getOwnerId() == currUser.getId() ? "selected" : "") %>><%= currUser.getFirstInitial() + " " + currUser.getLastName() %></option> ! </html:select></td> ! </html:form> ! <% } else { %> ! <td><it:formatIssueOwner issue="<%= unassignedIssues[i] %>" format="short"/></td> ! <% } %> ! <td></td> ! <td><it:formatDate date="<%= unassignedIssues[i].getLastModifiedDate() %>"/></td> ! </tr> ! <% } %> ! <tr><td><html:img page="/images/blank.gif" width="1" height="20"/></td></tr> ! <% } %> ! ! ! <% if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_CREATED, hiddenSections)) { %> ! <tr> ! <td class="editColumnTitle" colspan="15"><it:message key="itracker.web.index.created"/>:</td> ! </tr> ! <tr align="center" class="listHeading"> ! <td></td> ! <td></td> ! <td><it:message key="itracker.web.attr.id"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.project"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.status"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.severity"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.description"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.owner"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.lastmodified"/></td> ! </tr> ! ! <% ! for(int i = 0; i < createdIssues.length; i++) { ! if(userPrefs.getNumItemsOnIndex() > 0 && i >= userPrefs.getNumItemsOnIndex() && ! "true".equals(request.getParameter("showAll"))) { ! %> ! <tr class="listRowUnshaded"><td align="center" colspan="15"><html:link page="/index.jsp?showAll=true"><it:message key="itracker.web.index.moreissues"/></html:link></td></tr> ! <% ! break; ! } ! ! UserModel owner = ih.getIssueOwner(createdIssues[i].getId()); ! %> ! <tr align="right" class="<%= (i % 2 == 1 ? "listRowShaded" : "listRowUnshaded" ) %>"> ! <td> ! <it:formatImageAction forward="viewissue" paramName="id" paramValue="<%= createdIssues[i].getId() %>" src="/images/view.gif" altKey="itracker.web.image.view.issue.alt" arg0="<%= createdIssues[i].getId() %>" textActionKey="itracker.web.image.view.texttag"/> ! <% if(IssueUtilities.canEditIssue(createdIssues[i], currUserId, currPermissions)) { %> ! <it:formatImageAction action="editissueform" paramName="id" paramValue="<%= createdIssues[i].getId() %>" caller="index" src="/images/edit.gif" altKey="itracker.web.image.edit.issue.alt" arg0="<%= createdIssues[i].getId() %>" textActionKey="itracker.web.image.edit.texttag"/> ! <% } %> ! </td> ! <td></td> ! <td align="left"><%= createdIssues[i].getId() %></td> ! <td></td> ! <td><%= createdIssues[i].getProjectName() %></td> ! <td></td> ! <td><%= IssueUtilities.getStatusName(createdIssues[i].getStatus(), currLocale) %></td> ! <td></td> ! <td><%= IssueUtilities.getSeverityName(createdIssues[i].getSeverity(), currLocale) %></td> ! <td></td> ! <td><it:formatDescription><%= createdIssues[i].getDescription() %></it:formatDescription></td> ! <td></td> ! <td><it:formatIssueOwner issue="<%= createdIssues[i] %>" format="short"/></td> ! <td></td> ! <td><it:formatDate date="<%= createdIssues[i].getLastModifiedDate() %>"/></td> ! </tr> ! <% } %> ! <tr><td><html:img page="/images/blank.gif" width="1" height="20"/></td></tr> ! <% } %> ! ! ! <% ! // I could make this all the issues that have changed since the last login. Wonder if that would be ! // better than the watches? No then you lose them. ! %> ! ! <% if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_WATCHED, hiddenSections)) { %> ! <tr> ! <td class="editColumnTitle" colspan="15"><it:message key="itracker.web.index.watched"/>:</td> ! </tr> ! <tr align="center" class="listHeading"> ! <td></td> ! <td></td> ! <td><it:message key="itracker.web.attr.id"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.project"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.status"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.severity"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.description"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.owner"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.lastmodified"/></td> ! </tr> ! <% ! for(int i = 0; i < watchedIssues.length; i++) { ! if(userPrefs.getNumItemsOnIndex() > 0 && i >= userPrefs.getNumItemsOnIndex() && ! "true".equals(request.getParameter("showAll"))) { ! %> ! <tr class="listRowUnshaded"><td align="center" colspan="15"><html:link page="/index.jsp?showAll=true"><it:message key="itracker.web.index.moreissues"/></html:link></td></tr> ! <% ! break; ! } ! ! UserModel owner = ih.getIssueOwner(watchedIssues[i].getId()); ! %> ! <tr align="right" class="<%= (i % 2 == 1 ? "listRowShaded" : "listRowUnshaded" ) %>"> ! <td> ! <it:formatImageAction forward="viewissue" paramName="id" paramValue="<%= watchedIssues[i].getId() %>" src="/images/view.gif" altKey="itracker.web.image.view.issue.alt" arg0="<%= watchedIssues[i].getId() %>" textActionKey="itracker.web.image.view.texttag"/> ! <% if(IssueUtilities.canEditIssue(watchedIssues[i], currUserId, currPermissions)) { %> ! <it:formatImageAction action="editissueform" paramName="id" paramValue="<%= watchedIssues[i].getId() %>" caller="index" src="/images/edit.gif" altKey="itracker.web.image.edit.issue.alt" arg0="<%= watchedIssues[i].getId() %>" textActionKey="itracker.web.image.edit.texttag"/> ! <% } %> ! </td> ! <td></td> ! <td align="left"><%= watchedIssues[i].getId() %></td> ! <td></td> ! <td><%= watchedIssues[i].getProjectName() %></td> ! <td></td> ! <td><%= IssueUtilities.getStatusName(watchedIssues[i].getStatus(), currLocale) %></td> ! <td></td> ! <td><%= IssueUtilities.getSeverityName(watchedIssues[i].getSeverity(), currLocale) %></td> ! <td></td> ! <td><it:formatDescription><%= watchedIssues[i].getDescription() %></it:formatDescription></td> ! <td></td> ! <td><it:formatIssueOwner issue="<%= watchedIssues[i] %>" format="short"/></td> ! <td></td> ! <td><it:formatDate date="<%= watchedIssues[i].getLastModifiedDate() %>"/></td> ! </tr> ! <% } %> ! <tr><td><html:img page="/images/blank.gif" width="1" height="20"/></td></tr> ! <% } %> ! ! <% if(hiddenSections > 0) { %> ! <tr align="center" class="listRowUnshaded"> ! <td colspan="15" align="center"><html:link page="/index.jsp?sections=all"><it:message key="itracker.web.index.viewhidden"/></html:link></td> ! </tr> ! <tr><td><html:img page="/images/blank.gif" width="1" height="20"/></td></tr> ! <% } %> ! ! </table> ! ! <%@ include file="/includes/footer.jsp" %> --- 1,440 ---- ! <%@ page language="java" contentType="text/html;charset=UTF-8" %> ! <%@ taglib uri="/itracker.tld" prefix="it" %> ! <%@ taglib uri="/struts-bean.tld" prefix="bean" %> ! <%@ taglib uri="/struts-html.tld" prefix="html" %> ! <%@ taglib uri="/struts-logic.tld" prefix="logic" %> ! ! <%@ page import="java.util.Arrays" %> ! <%@ page import="javax.naming.*" %> ! <%@ page import="javax.rmi.*" %> ! <%@ page import="cowsultants.itracker.ejb.client.models.*" %> ! <%@ page import="cowsultants.itracker.ejb.client.util.*" %> ! <%@ page import="cowsultants.itracker.ejb.client.interfaces.*" %> ! <%@ page import="cowsultants.itracker.ejb.client.resources.ITrackerResources" %> ! <%@ page import="org.springframework.beans.factory.access.*" %> ! <%@ page import="cowsultants.itracker.ejb.beans.session.*" %> ! ! <it:checkLogin/> ! ! <%@ include file="/includes/page_init.jsp" %> ! <bean:define id="pageTitleKey" value="itracker.web.index.title"/> ! <bean:define id="pageTitleArg" value=""/> ! <%@ include file="/includes/header.jsp" %> ! ! <% ! IssueHandler ih = new IssueHandlerBean(); ! ProjectHandler ph = new ProjectHandlerBean(); ! UserHandler uh = new UserHandlerBean(); ! Integer currUserId = currUser.getId(); ! UserPreferencesModel userPrefs = (UserPreferencesModel) session.getAttribute("preferences"); ! ! int hiddenSections = 0; ! if(! "all".equalsIgnoreCase(request.getParameter("sections"))) { ! hiddenSections = userPrefs.getHiddenIndexSections(); ! } ! ! IssueModel[] createdIssues = new IssueModel[0]; ! IssueModel[] ownedIssues = new IssueModel[0]; ! IssueModel[] unassignedIssues = new IssueModel[0]; ! IssueModel[] watchedIssues = new IssueModel[0]; ! ! if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_CREATED, hiddenSections)) { ! createdIssues = ih.getIssuesCreatedByUser(currUserId); ! } ! if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_ASSIGNED, hiddenSections)) { ! ownedIssues = ih.getIssuesOwnedByUser(currUserId); ! } ! if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_UNASSIGNED, hiddenSections)) { ! unassignedIssues = ih.getUnassignedIssues(); ! } ! if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_WATCHED, hiddenSections)) { ! watchedIssues = ih.getIssuesWatchedByUser(currUserId); ! } ! ! String order = userPrefs.getSortColumnOnIssueList(); ! ! if("id".equals(order)) { ! Arrays.sort(createdIssues, new IssueModel.CompareById()); ! Arrays.sort(ownedIssues, new IssueModel.CompareById()); ! Arrays.sort(unassignedIssues, new IssueModel.CompareById()); ! Arrays.sort(watchedIssues, new IssueModel.CompareById()); ! } else if("sev".equals(order)) { ! Arrays.sort(createdIssues, new IssueModel.CompareBySeverity()); ! Arrays.sort(ownedIssues, new IssueModel.CompareBySeverity()); ! Arrays.sort(unassignedIssues, new IssueModel.CompareBySeverity()); ! Arrays.sort(watchedIssues, new IssueModel.CompareBySeverity()); ! } else if("stat".equals(order)) { ! Arrays.sort(createdIssues, new IssueModel()); ! Arrays.sort(ownedIssues, new IssueModel.CompareBySeverity()); ! Arrays.sort(unassignedIssues, new IssueModel()); ! Arrays.sort(watchedIssues, new IssueModel()); ! } else if("lm".equals(order)) { ! Arrays.sort(createdIssues, new IssueModel.CompareByDate(false)); ! Arrays.sort(ownedIssues, new IssueModel.CompareByDate(false)); ! Arrays.sort(unassignedIssues, new IssueModel.CompareByDate(false)); ! Arrays.sort(watchedIssues, new IssueModel.CompareByDate(false)); ! } else if("own".equals(order)) { ! Arrays.sort(createdIssues, new IssueModel.CompareByOwnerAndStatus()); ! Arrays.sort(ownedIssues, new IssueModel.CompareBySeverity()); ! Arrays.sort(unassignedIssues, new IssueModel.CompareByOwnerAndStatus()); ! Arrays.sort(watchedIssues, new IssueModel.CompareByOwnerAndStatus()); ! } else { ! Arrays.sort(createdIssues, new IssueModel()); ! Arrays.sort(ownedIssues, new IssueModel.CompareBySeverity()); ! Arrays.sort(unassignedIssues, new IssueModel()); ! Arrays.sort(watchedIssues, new IssueModel()); ! } ! ! ! int j = 0; ! %> ! ! <logic:messagesPresent> ! <center> ! <span class="formError"> ! <html:messages id="error"> ! <bean:write name="error"/><br/> ! </html:messages> ! </span> ! </center> ! <br> ! </logic:messagesPresent> ! <table border="0" cellspacing="0" cellpadding="0" width="90%" align="center"> ! <% if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_ASSIGNED, hiddenSections)) { %> ! <tr> ! <td class="editColumnTitle" colspan="15"><it:message key="itracker.web.index.assigned"/>:</td> ! </tr> ! <tr align="center" class="listHeading"> ! <td width="50"></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.id"/></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.project"/></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.status"/></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.severity"/></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.description"/></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.owner"/></td> ! <td><html:img page="/images/blank.gif" width="3"/></td> ! <td><it:message key="itracker.web.attr.lastmodified"/></td> ! </tr> ! <% ! for(int i = 0; i < ownedIssues.length; i++) { ! if(userPrefs.getNumItemsOnIndex() > 0 && i >= userPrefs.getNumItemsOnIndex() && ! "true".equals(request.getParameter("showAll"))) { ! %> ! <tr class="listRowUnshaded"><td align="center" colspan="15"><html:link page="/index.jsp?showAll=true"><it:message key="itracker.web.index.moreissues"/></html:link></td></tr> ! <% ! break; ! } ! ! UserModel owner = ih.getIssueOwner(ownedIssues[i].getId()); ! %> ! <tr align="right" class="<%= (i % 2 == 1 ? "listRowShaded" : "listRowUnshaded" ) %>"> ! <td> ! <it:formatImageAction forward="viewissue" paramName="id" paramValue="<%= ownedIssues[i].getId() %>" src="/images/view.gif" altKey="itracker.web.image.view.issue.alt" arg0="<%= ownedIssues[i].getId() %>" textActionKey="itracker.web.image.view.texttag"/> ! <% if(IssueUtilities.canEditIssue(ownedIssues[i], currUserId, currPermissions)) { %> ! <it:formatImageAction action="editissueform" paramName="id" paramValue="<%= ownedIssues[i].getId() %>" caller="index" src="/images/edit.gif" altKey="itracker.web.image.edit.issue.alt" arg0="<%= ownedIssues[i].getId() %>" textActionKey="itracker.web.image.edit.texttag"/> ! <% } %> ! </td> ! <td></td> ! <td align="left"><%= ownedIssues[i].getId() %></td> ! <td></td> ! <td><%= ownedIssues[i].getProjectName() %></td> ! <td></td> ! <td><%= IssueUtilities.getStatusName(ownedIssues[i].getStatus(), currLocale) %></td> ! <td></td> ! <td><%= IssueUtilities.getSeverityName(ownedIssues[i].getSeverity(), currLocale) %></td> ! <td></td> ! <td><it:formatDescription><%= ownedIssues[i].getDescription() %></it:formatDescription></td> ! <td></td> ! <td><it:formatIssueOwner issue="<%= ownedIssues[i] %>" format="short"/></td> ! <td></td> ! <td><it:formatDate date="<%= ownedIssues[i].getLastModifiedDate() %>"/></td> ! </tr> ! <% } %> ! <tr><td><html:img page="/images/blank.gif" width="1" height="20"/></td></tr> ! <% } %> ! ! ! <% if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_UNASSIGNED, hiddenSections)) { %> ! <tr> ! <td class="editColumnTitle" colspan="15"><it:message key="itracker.web.index.unassigned"/>:</td> ! </tr> ! <tr align="center" class="listHeading"> ! <td></td> ! <td></td> ! <td><it:message key="itracker.web.attr.id"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.project"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.status"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.severity"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.description"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.owner"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.lastmodified"/></td> ! </tr> ! ! <% ! j = 0; ! HashMap possibleOwnersMap = new HashMap(); ! HashMap usersWithEditOwnMap = new HashMap(); ! for(int i = 0; i < unassignedIssues.length; i++) { ! if(! IssueUtilities.canViewIssue(unassignedIssues[i], currUserId, currPermissions)) { ! continue; ! } ! j++; ! if(userPrefs.getNumItemsOnIndex() > 0 && j >= userPrefs.getNumItemsOnIndex() && ! "true".equals(request.getParameter("showAll"))) { ! %> ! <tr class="listRowUnshaded"><td align="center" colspan="15"><html:link page="/index.jsp?showAll=true"><it:message key="itracker.web.index.moreissues"/></html:link></td></tr> ! <% ! break; ! } ! %> ! <tr align="right" class="<%= (i % 2 == 1 ? "listRowShaded" : "listRowUnshaded" ) %>"> ! <td> ! <it:formatImageAction forward="viewissue" paramName="id" paramValue="<%= unassignedIssues[i].getId() %>" src="/images/view.gif" altKey="itracker.web.image.view.issue.alt" arg0="<%= unassignedIssues[i].getId() %>" textActionKey="itracker.web.image.view.texttag"/> ! <% if(IssueUtilities.canEditIssue(unassignedIssues[i], currUserId, currPermissions)) { %> ! <it:formatImageAction action="editissueform" paramName="id" paramValue="<%= unassignedIssues[i].getId() %>" caller="index" src="/images/edit.gif" altKey="itracker.web.image.edit.issue.alt" arg0="<%= unassignedIssues[i].getId() %>" textActionKey="itracker.web.image.edit.texttag"/> ! <% ! } ! if(! IssueUtilities.hasIssueNotification(unassignedIssues[i], currUserId)) { ! %> ! <it:formatImageAction forward="watchissue" paramName="id" paramValue="<%= unassignedIssues[i].getId() %>" caller="index" src="/images/watch.gif" altKey="itracker.web.image.watch.issue.alt" arg0="<%= unassignedIssues[i].getId() %>" textActionKey="itracker.web.image.watch.texttag"/> ! <% } %> ! </td> ! <td></td> ! <td align="left"><%= unassignedIssues[i].getId() %></td> ! <td></td> ! <td><%= unassignedIssues[i].getProjectName() %></td> ! <td></td> ! <td><%= IssueUtilities.getStatusName(unassignedIssues[i].getStatus(), currLocale) %></td> ! <td></td> ! <td><%= IssueUtilities.getSeverityName(unassignedIssues[i].getSeverity(), currLocale) %></td> ! <td></td> ! <td><it:formatDescription><%= unassignedIssues[i].getDescription() %></it:formatDescription></td> ! <td></td> ! <% if(UserUtilities.hasPermission(currPermissions, unassignedIssues[i].getProjectId(), UserUtilities.PERMISSION_ASSIGN_OTHERS)) { %> ! <html:form action="/assignissue"> ! <html:hidden property="issueId" value="<%= unassignedIssues[i].getId().toString() %>"/> ! <html:hidden property="projectId" value="<%= unassignedIssues[i].getProjectId().toString() %>"/> ! <%! String styleClass1 = "(i % 2 == 1 ? \"listRowShaded\" : \"listRowUnshaded\")"; %> ! <td><html:select property="userId" styleClass="<%=styleClass1 %>" > ! <%= (unassignedIssues[i].getOwnerId().intValue() == -1 ? "<option value=\"-1\">" + ITrackerResources.getString("itracker.web.generic.unassigned", currLocale) + "</option>" : "<option value=\"" + unassignedIssues[i].getOwnerId() + "\">" + UserUtilities.getInitial(unassignedIssues[i].getOwnerFirstName()) + " " + unassignedIssues[i].getOwnerLastName() + "</option>") %> ! <% ! // Because of the potentially large number of issues, and a multitude of projects, the ! // possible owners for a project are stored in a Map. This doesn't take into account the ! // creator of the issue though since they may only have EDIT_USERS permission. So if the ! // creator isn't already in the project list, check to see if the creator has EDIT_USERS ! // permissions, if so then add them to the lsit of owners and resort. ! UserModel[] tempOwners = new UserModel[0]; ! UserModel[] possibleOwners = (UserModel[]) possibleOwnersMap.get(unassignedIssues[i].getProjectId()); ! if(possibleOwners == null) { ! possibleOwners = uh.getPossibleOwners(null, unassignedIssues[i].getProjectId(), null); ! Arrays.sort(possibleOwners, new UserModel.CompareByName()); ! possibleOwnersMap.put(unassignedIssues[i].getProjectId(), possibleOwners); ! } ! UserModel[] editOwnUsers = (UserModel[]) usersWithEditOwnMap.get(unassignedIssues[i].getProjectId()); ! if(editOwnUsers == null) { ! editOwnUsers = uh.getUsersWithProjectPermission(unassignedIssues[i].getProjectId(), UserUtilities.PERMISSION_EDIT_USERS, true); ! usersWithEditOwnMap.put(unassignedIssues[i].getProjectId(), editOwnUsers); ! } ! boolean creatorPresent = false; ! for(int k = 0; k < possibleOwners.length; k++) { ! if(possibleOwners[k].getId().equals(unassignedIssues[i].getCreatorId())) { ! creatorPresent = true; ! break; ! } ! } ! if(! creatorPresent) { ! creatorPresent = true; ! for(int k = 0; k < editOwnUsers.length; k++) { ! if(editOwnUsers[k].getId().equals(unassignedIssues[i].getCreatorId())) { ! tempOwners = new UserModel[possibleOwners.length + 1]; ! for(int m = 0; m < possibleOwners.length; m++) { ! tempOwners[m] = possibleOwners[m]; ! } ! tempOwners[tempOwners.length - 1] = editOwnUsers[k]; ! Arrays.sort(tempOwners, new UserModel.CompareByName()); ! creatorPresent = false; ! } ! } ! } ! ! if(creatorPresent) { ! for(int k = 0; k < possibleOwners.length; k++) { ! %> ! <option value="<%= possibleOwners[k].getId() %>" <%= (unassignedIssues[i].getOwnerId() == possibleOwners[k].getId() ? "selected" : "") %>><%= possibleOwners[k].getFirstInitial() + " " + possibleOwners[k].getLastName() %></option> ! <% ! } ! } else { ! for(int k = 0; k < tempOwners.length; k++) { ! %> ! <option value="<%= tempOwners[k].getId() %>" <%= (unassignedIssues[i].getOwnerId() == tempOwners[k].getId() ? "selected" : "") %>><%= tempOwners[k].getFirstInitial() + " " + tempOwners[k].getLastName() %></option> ! <% ! } ! } ! %> ! </html:select></td> ! </html:form> ! <% } else if(UserUtilities.hasPermission(currPermissions, unassignedIssues[i].getProjectId(), UserUtilities.PERMISSION_ASSIGN_SELF)) { %> ! <html:form action="/assignissue"> ! <html:hidden property="issueId" value="<%= unassignedIssues[i].getId().toString() %>"/> ! <html:hidden property="projectId" value="<%= unassignedIssues[i].getProjectId().toString() %>"/> ! ! <%! String styleClass2="(i % 2 == 1 ? \"listRowShaded\" : \"listRowUnshaded\")"; %> ! <td><html:select property="userId" styleClass="<%=styleClass2 %>" > ! <%= (unassignedIssues[i].getOwnerId().intValue() == -1 ? "<option value=\"-1\">" + ITrackerResources.getString("itracker.web.generic.unassigned", currLocale) + "</option>" : "<option value=\"" + unassignedIssues[i].getOwnerId() + "\">" + UserUtilities.getInitial(unassignedIssues[i].getOwnerFirstName()) + " " + unassignedIssues[i].getOwnerLastName() + "</option>") %> ! <option value="<%= currUser.getId() %>" <%= (unassignedIssues[i].getOwnerId() == currUser.getId() ? "selected" : "") %>><%= currUser.getFirstInitial() + " " + currUser.getLastName() %></option> ! </html:select></td> ! </html:form> ! <% } else { %> ! <td><it:formatIssueOwner issue="<%= unassignedIssues[i] %>" format="short"/></td> ! <% } %> ! <td></td> ! <td><it:formatDate date="<%= unassignedIssues[i].getLastModifiedDate() %>"/></td> ! </tr> ! <% } %> ! <tr><td><html:img page="/images/blank.gif" width="1" height="20"/></td></tr> ! <% } %> ! ! ! <% if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_CREATED, hiddenSections)) { %> ! <tr> ! <td class="editColumnTitle" colspan="15"><it:message key="itracker.web.index.created"/>:</td> ! </tr> ! <tr align="center" class="listHeading"> ! <td></td> ! <td></td> ! <td><it:message key="itracker.web.attr.id"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.project"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.status"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.severity"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.description"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.owner"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.lastmodified"/></td> ! </tr> ! ! <% ! for(int i = 0; i < createdIssues.length; i++) { ! if(userPrefs.getNumItemsOnIndex() > 0 && i >= userPrefs.getNumItemsOnIndex() && ! "true".equals(request.getParameter("showAll"))) { ! %> ! <tr class="listRowUnshaded"><td align="center" colspan="15"><html:link page="/index.jsp?showAll=true"><it:message key="itracker.web.index.moreissues"/></html:link></td></tr> ! <% ! break; ! } ! ! UserModel owner = ih.getIssueOwner(createdIssues[i].getId()); ! %> ! <tr align="right" class="<%= (i % 2 == 1 ? "listRowShaded" : "listRowUnshaded" ) %>"> ! <td> ! <it:formatImageAction forward="viewissue" paramName="id" paramValue="<%= createdIssues[i].getId() %>" src="/images/view.gif" altKey="itracker.web.image.view.issue.alt" arg0="<%= createdIssues[i].getId() %>" textActionKey="itracker.web.image.view.texttag"/> ! <% if(IssueUtilities.canEditIssue(createdIssues[i], currUserId, currPermissions)) { %> ! <it:formatImageAction action="editissueform" paramName="id" paramValue="<%= createdIssues[i].getId() %>" caller="index" src="/images/edit.gif" altKey="itracker.web.image.edit.issue.alt" arg0="<%= createdIssues[i].getId() %>" textActionKey="itracker.web.image.edit.texttag"/> ! <% } %> ! </td> ! <td></td> ! <td align="left"><%= createdIssues[i].getId() %></td> ! <td></td> ! <td><%= createdIssues[i].getProjectName() %></td> ! <td></td> ! <td><%= IssueUtilities.getStatusName(createdIssues[i].getStatus(), currLocale) %></td> ! <td></td> ! <td><%= IssueUtilities.getSeverityName(createdIssues[i].getSeverity(), currLocale) %></td> ! <td></td> ! <td><it:formatDescription><%= createdIssues[i].getDescription() %></it:formatDescription></td> ! <td></td> ! <td><it:formatIssueOwner issue="<%= createdIssues[i] %>" format="short"/></td> ! <td></td> ! <td><it:formatDate date="<%= createdIssues[i].getLastModifiedDate() %>"/></td> ! </tr> ! <% } %> ! <tr><td><html:img page="/images/blank.gif" width="1" height="20"/></td></tr> ! <% } %> ! ! ! <% ! // I could make this all the issues that have changed since the last login. Wonder if that would be ! // better than the watches? No then you lose them. ! %> ! ! <% if(! UserUtilities.hideIndexSection(UserUtilities.PREF_HIDE_WATCHED, hiddenSections)) { %> ! <tr> ! <td class="editColumnTitle" colspan="15"><it:message key="itracker.web.index.watched"/>:</td> ! </tr> ! <tr align="center" class="listHeading"> ! <td></td> ! <td></td> ! <td><it:message key="itracker.web.attr.id"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.project"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.status"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.severity"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.description"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.owner"/></td> ! <td></td> ! <td><it:message key="itracker.web.attr.lastmodified"/></td> ! </tr> ! <% ! for(int i = 0; i < watchedIssues.length; i++) { ! if(userPrefs.getNumItemsOnIndex() > 0 && i >= userPrefs.getNumItemsOnIndex() && ! "true".equals(request.getParameter("showAll"))) { ! %> ! <tr class="listRowUnshaded"><td align="center" colspan="15"><html:link page="/index.jsp?showAll=true"><it:message key="itracker.web.index.moreissues"/></html:link></td></tr> ! <% ! break; ! } ! ! UserModel owner = ih.getIssueOwner(watchedIssues[i].getId()); ! %> ! <tr align="right" class="<%= (i % 2 == 1 ? "listRowShaded" : "listRowUnshaded" ) %>"> ! <td> ! <it:formatImageAction forward="viewissue" paramName="id" paramValue="<%= watchedIssues[i].getId() %>" src="/images/view.gif" altKey="itracker.web.image.view.issue.alt" arg0="<%= watchedIssues[i].getId() %>" textActionKey="itracker.web.image.view.texttag"/> ! <% if(IssueUtilities.canEditIssue(watchedIssues[i], currUserId, currPermissions)) { %> ! <it:formatImageAction action="editissueform" paramName="id" paramValue="<%= watchedIssues[i].getId() %>" caller="index" src="/images/edit.gif" altKey="itracker.web.image.edit.issue.alt" arg0="<%= watchedIssues[i].getId() %>" textActionKey="itracker.web.image.edit.texttag"/> ! <% } %> ! </td> ! <td></td> ! <td align="left"><%= watchedIssues[i].getId() %></td> ! <td></td> ! <td><%= watchedIssues[i].getProjectName() %></td> ! <td></td> ! <td><%= IssueUtilities.getStatusName(watchedIssues[i].getStatus(), currLocale) %></td> ! <td></td> ! <td><%= IssueUtilities.getSeverityName(watchedIssues[i].getSeverity(), currLocale) %></td> ! <td></td> ! <td><it:formatDescription><%= watchedIssues[i].getDescription() %></it:formatDescription></td> ! <td></td> ! <td><it:formatIssueOwner issue="<%= watchedIssues[i] %>" format="short"/></td> ! <td></td> ! <td><it:formatDate date="<%= watchedIssues[i].getLastModifiedDate() %>"/></td> ! </tr> ! <% } %> ! <tr><td><html:img page="/images/blank.gif" width="1" height="20"/></td></tr> ! <% } %> ! ! <% if(hiddenSections > 0) { %> ! <tr align="center" class="listRowUnshaded"> ! <td colspan="15" align="center"><html:link page="/index.jsp?sections=all"><it:message key="itracker.web.index.viewhidden"/></html:link></td> ! </tr> ! <tr><td><html:img page="/images/blank.gif" width="1" height="20"/></td></tr> ! <% } %> ! ! </table> ! ! <%@ include file="/includes/footer.jsp" %> |
From: Marky G. <mar...@us...> - 2005-10-26 08:00:41
|
Update of /cvsroot/itracker/itracker/web/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12281/web/includes Modified Files: Tag: itrackerhibernate footer.jsp header.jsp Log Message: little changes in header and footer to markup the ongoing change process ;-> Index: header.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/includes/header.jsp,v retrieving revision 1.26.4.5 retrieving revision 1.26.4.6 diff -C2 -d -r1.26.4.5 -r1.26.4.6 *** header.jsp 25 Oct 2005 09:43:06 -0000 1.26.4.5 --- header.jsp 26 Oct 2005 08:00:32 -0000 1.26.4.6 *************** *** 46,52 **** <td> <% if(alternateLogo != null && ! alternateLogo.equals("")) { %> ! <img src="<%= alternateLogo %>"> <% } else { %> ! <html:img page="/images/logo.gif"/> <% } %> </td> --- 46,52 ---- <td> <% if(alternateLogo != null && ! alternateLogo.equals("")) { %> ! <!-- <img src="<%= alternateLogo %>">-->itracker.org<br> <% } else { %> ! <!-- <html:img page="/images/logo.gif"/>-->itracker.org<br> <% } %> </td> Index: footer.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/includes/footer.jsp,v retrieving revision 1.7.4.2 retrieving revision 1.7.4.3 diff -C2 -d -r1.7.4.2 -r1.7.4.3 *** footer.jsp 25 Oct 2005 09:43:06 -0000 1.7.4.2 --- footer.jsp 26 Oct 2005 08:00:32 -0000 1.7.4.3 *************** *** 7,12 **** <td align="left" width="50%" style="text-align: left;"> <it:message key="itracker.web.attr.copyright"/> 2002, 2003, 2004 by Jason Carroll</a>, ! 2005 by itracker.org ! </td> <td align="right" width="50%" style="text-align: right;"> <% java.util.Date currentDate = new java.util.Date(); %> --- 7,11 ---- <td align="left" width="50%" style="text-align: left;"> <it:message key="itracker.web.attr.copyright"/> 2002, 2003, 2004 by Jason Carroll</a>, ! 2005 by itracker.org, Version 3.0</td> <td align="right" width="50%" style="text-align: right;"> <% java.util.Date currentDate = new java.util.Date(); %> |
From: Marky G. <mar...@us...> - 2005-10-26 07:59:07
|
Update of /cvsroot/itracker/itracker/web/WEB-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11936/web/WEB-INF Modified Files: Tag: itrackerhibernate struts-config.xml Log Message: corrected some issues in struts-config.xml Index: struts-config.xml =================================================================== RCS file: /cvsroot/itracker/itracker/web/WEB-INF/Attic/struts-config.xml,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** struts-config.xml 25 Oct 2005 09:44:09 -0000 1.1.2.2 --- struts-config.xml 26 Oct 2005 07:58:56 -0000 1.1.2.3 *************** *** 211,216 **** <forward name="report_issueseverity" path="/reports/issue_severity.jsp"/> ! <forward name="report_avgtime" path="/reports/avg_time_per_user.jsp"/> ! <forward name="adminindex" path="/admin/index.jsp"/> <forward name="editcomponent" path="/editcomponentform.do"/> --- 211,215 ---- <forward name="report_issueseverity" path="/reports/issue_severity.jsp"/> ! <forward name="adminindex" path="/admin/index.jsp"/> <forward name="editcomponent" path="/editcomponentform.do"/> *************** *** 236,240 **** name="assignIssueForm" scope="request" input="/index.jsp"/> <action path="/addissuerelation" type="cowsultants.itracker.web.actions.AddIssueRelationAction" ! name="issueRelationForm" scope="request"> <forward name="index" path="/index.jsp" redirect="true"/> <forward name="editissue" path="/editissueform.do" redirect="true"/> --- 235,239 ---- name="assignIssueForm" scope="request" input="/index.jsp"/> <action path="/addissuerelation" type="cowsultants.itracker.web.actions.AddIssueRelationAction" ! name="issueRelationForm" scope="request" validate="false"> <forward name="index" path="/index.jsp" redirect="true"/> <forward name="editissue" path="/editissueform.do" redirect="true"/> *************** *** 385,390 **** </controller> ! <message-resources factory="cowsultants.itracker.web.resources.ITrackerMessageResourcesFactory" ! parameter="UNUSED" null="false"/> <plug-in className="org.apache.struts.plugins.ModuleConfigVerifier"/> --- 384,388 ---- </controller> ! <message-resources factory="cowsultants.itracker.web.resources.ITrackerMessageResourcesFactory" parameter="UNUSED" null="false" /> <plug-in className="org.apache.struts.plugins.ModuleConfigVerifier"/> |
From: Marc B. <mb...@us...> - 2005-10-26 00:01:26
|
Update of /cvsroot/itracker/itracker/src/cowsultants/itracker/web/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5664 Modified Files: Tag: itrackerhibernate AttachmentUtilities.java Log Message: replace old code with naming lookup for home interface by intermediary solution Index: AttachmentUtilities.java =================================================================== RCS file: /cvsroot/itracker/itracker/src/cowsultants/itracker/web/util/AttachmentUtilities.java,v retrieving revision 1.10.4.2 retrieving revision 1.10.4.3 diff -C2 -d -r1.10.4.2 -r1.10.4.3 *** AttachmentUtilities.java 13 Oct 2005 12:19:41 -0000 1.10.4.2 --- AttachmentUtilities.java 26 Oct 2005 00:01:15 -0000 1.10.4.3 *************** *** 18,24 **** package cowsultants.itracker.web.util; ! ! import javax.naming.InitialContext; ! import javax.rmi.PortableRemoteObject; import org.apache.struts.upload.FormFile; --- 18,22 ---- package cowsultants.itracker.web.util; ! import cowsultants.itracker.ejb.beans.session.IssueHandlerBean; import org.apache.struts.upload.FormFile; *************** *** 26,33 **** import cowsultants.itracker.ejb.beans.session.SystemConfigurationBean; import cowsultants.itracker.ejb.client.interfaces.IssueHandler; - import cowsultants.itracker.ejb.client.interfaces.IssueHandlerHome; import cowsultants.itracker.ejb.client.interfaces.SystemConfiguration; import cowsultants.itracker.ejb.client.util.Logger; - public class AttachmentUtilities { private static boolean initialized = false; --- 24,29 ---- *************** *** 79,91 **** if(! initialized) { try { - InitialContext ic = new InitialContext(); - Object scRef = ic.lookup("java:comp/env/" + SystemConfiguration.JNDI_NAME); - //SystemConfigurationHome scHome = (SystemConfigurationHome) PortableRemoteObject.narrow(scRef, SystemConfigurationHome.class); SystemConfiguration sc = new SystemConfigurationBean(); ! ! Object ihRef = ic.lookup("java:comp/env/" + IssueHandler.JNDI_NAME); ! IssueHandlerHome ihHome = (IssueHandlerHome) PortableRemoteObject.narrow(ihRef, IssueHandlerHome.class); ! IssueHandler ih = ihHome.create(); ! maxFileSize = sc.getLongProperty("max_attachment_size", MAX_FILE_SIZE_KB) * 1024L; maxTotalFileSize = sc.getLongProperty("max_total_attachment_size", MAX_TOTAL_FILE_SIZE_KB) * 1024L; --- 75,81 ---- if(! initialized) { try { SystemConfiguration sc = new SystemConfigurationBean(); ! IssueHandler ih = new IssueHandlerBean(); ! maxFileSize = sc.getLongProperty("max_attachment_size", MAX_FILE_SIZE_KB) * 1024L; maxTotalFileSize = sc.getLongProperty("max_total_attachment_size", MAX_TOTAL_FILE_SIZE_KB) * 1024L; |
From: Ricardo T. <rj...@us...> - 2005-10-25 22:18:01
|
Update of /cvsroot/itracker/itracker/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14001 Modified Files: Tag: itrackerhibernate edit_issue.jsp Log Message: no longer instantiating service layer objects Index: edit_issue.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/edit_issue.jsp,v retrieving revision 1.62.4.2 retrieving revision 1.62.4.3 diff -C2 -d -r1.62.4.2 -r1.62.4.3 *** edit_issue.jsp 23 Oct 2005 22:32:22 -0000 1.62.4.2 --- edit_issue.jsp 25 Oct 2005 22:17:53 -0000 1.62.4.3 *************** *** 17,21 **** <% ! IssueHandler ih = new IssueHandlerBean(); IssueModel issue = (IssueModel) session.getAttribute(Constants.ISSUE_KEY); --- 17,21 ---- <% ! IssueHandler ih = ServletContextUtils.getItrackerServices(getServletContext()).getIssueHandler(); IssueModel issue = (IssueModel) session.getAttribute(Constants.ISSUE_KEY); |
From: Ricardo T. <rj...@us...> - 2005-10-25 22:16:59
|
Update of /cvsroot/itracker/itracker/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13700 Modified Files: Tag: itrackerhibernate itrackerApplication.properties Log Message: removed no longer used entries. activated optional features, like retrieving password, so we won't forget to test them Index: itrackerApplication.properties =================================================================== RCS file: /cvsroot/itracker/itracker/src/Attic/itrackerApplication.properties,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** itrackerApplication.properties 25 Oct 2005 09:42:24 -0000 1.1.2.4 --- itrackerApplication.properties 25 Oct 2005 22:16:51 -0000 1.1.2.5 *************** *** 17,25 **** # This number is the number of minutes that can elapse before the users # session times out due to inactivity. ! #web_session_timeout=30 # Set this if you wish to use an alternate image logo in the header of all # pages. It must be a resolvable url. ! #alternate_logo=/images/logo_gs.gif # Set to the default locale of the server. This controls the default language --- 17,25 ---- # This number is the number of minutes that can elapse before the users # session times out due to inactivity. ! web_session_timeout=30 # Set this if you wish to use an alternate image logo in the header of all # pages. It must be a resolvable url. ! #alternate_logo=/images/logo.gif # Set to the default locale of the server. This controls the default language *************** *** 34,38 **** # Set to true to allow users to recover their passwords ! allow_forgot_password=false # Set to true to allow users to self register for your sever. This is a global --- 34,38 ---- # Set to true to allow users to recover their passwords ! allow_forgot_password=true # Set to true to allow users to self register for your sever. This is a global *************** *** 42,51 **** # available (view own is automatically granted), if you want other permissions, you # must grant them using the normal user administration procedures. ! allow_self_register=false # Set to true to allow users to save their login in a cookie on their machine # for auto login. Setting this to false will not allow any user on the system # to use this feature. ! allow_save_login=false # This parameter sets the class to use for authentication. The class must be resident --- 42,51 ---- # available (view own is automatically granted), if you want other permissions, you # must grant them using the normal user administration procedures. ! allow_self_register=true # Set to true to allow users to save their login in a cookie on their machine # for auto login. Setting this to false will not allow any user on the system # to use this feature. ! allow_save_login=true # This parameter sets the class to use for authentication. The class must be resident *************** *** 54,66 **** #authenticator_class=com.emation.itracker.authentication.WindowsSSONAuthenticatorADInfo - # First id number to use when allocation ids - #idcache_firstid=0 - - # Group size to use when allocation ids - idcache_groupsize=10 - - # Table name to use to store the idgenerator information - #idcache_tablename=IDSTORE - # From address for email notifications to use notification_from_address=notification_from_address=itr...@it... --- 54,57 ---- *************** *** 84,92 **** #notification_smtp_password=password - # The datasource defined for the itracker application - # WL6.1 java:/ITrackerDS - # Jboss ITrackerDS - default_ds=java:/ITrackerDS - # All attachments are now stored in the database, but you can still # control the maximum size of any one attachment, and the total --- 75,78 ---- |
From: Ricardo T. <rj...@us...> - 2005-10-25 22:15:16
|
Update of /cvsroot/itracker/itracker/src/cowsultants/itracker/web/servlets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12939/cowsultants/itracker/web/servlets Modified Files: Tag: itrackerhibernate ApplicationInitialization.java Log Message: no longer a servlet, now a plain class Index: ApplicationInitialization.java =================================================================== RCS file: /cvsroot/itracker/itracker/src/cowsultants/itracker/web/servlets/ApplicationInitialization.java,v retrieving revision 1.31.4.5 retrieving revision 1.31.4.6 diff -C2 -d -r1.31.4.5 -r1.31.4.6 *** ApplicationInitialization.java 24 Oct 2005 23:25:50 -0000 1.31.4.5 --- ApplicationInitialization.java 25 Oct 2005 22:15:07 -0000 1.31.4.6 *************** *** 28,34 **** import javax.naming.InitialContext; import javax.rmi.PortableRemoteObject; - import javax.servlet.ServletException; - import javax.servlet.http.HttpServletRequest; - import javax.servlet.http.HttpServletResponse; import net.sf.hibernate.HibernateException; --- 28,31 ---- *************** *** 63,67 **** import cowsultants.itracker.ejb.client.util.UserUtilities; ! public class ApplicationInitialization extends GenericController { public ApplicationInitialization(SpringFactories springFactories) { --- 60,64 ---- import cowsultants.itracker.ejb.client.util.UserUtilities; ! public class ApplicationInitialization { public ApplicationInitialization(SpringFactories springFactories) { *************** *** 101,104 **** --- 98,102 ---- // seperate thread to speed up the // rest of the startup. + // TODO I think this should be removed... why do we need to pre-init ? (rjst) Thread initFontThread = new Thread() { public void run() { *************** *** 157,163 **** } - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - } - private void processAttachmentFiles(String attachmentDirectory) { if (attachmentDirectory == null || attachmentDirectory.equals("")) { --- 155,158 ---- |
From: Ricardo T. <rj...@us...> - 2005-10-25 22:14:27
|
Update of /cvsroot/itracker/itracker/src/cowsultants/itracker/ejb/beans/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12690/cowsultants/itracker/ejb/beans/session Modified Files: Tag: itrackerhibernate SystemConfigurationBean.java Log Message: cleanup Index: SystemConfigurationBean.java =================================================================== RCS file: /cvsroot/itracker/itracker/src/cowsultants/itracker/ejb/beans/session/SystemConfigurationBean.java,v retrieving revision 1.31.4.4 retrieving revision 1.31.4.5 diff -C2 -d -r1.31.4.4 -r1.31.4.5 *** SystemConfigurationBean.java 24 Oct 2005 23:25:50 -0000 1.31.4.4 --- SystemConfigurationBean.java 25 Oct 2005 22:14:18 -0000 1.31.4.5 *************** *** 1 **** ! /* * This software was designed and created by Jason Carroll. * Copyright (c) 2002, 2003, 2004 Jason Carroll. * The author can be reached at jca...@co... * ITracker website: http://www.cowsultants.com * ITracker forums: http://www.cowsultants.com/phpBB/index.php * * This program is free software; you can redistribute it and/or modify * it only under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ package cowsultants.itracker.ejb.beans.session; import java.sql.Timestamp; import java.util.Arrays; import java.util.Date; import java.util.Collection; import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.Locale; import java.util.Properties; import java.util.Vector; import javax.naming.InitialContext; import cowsultants.itracker.ejb.beans.entity.ConfigurationBean; import cowsultants.itracker.ejb.beans.entity.CustomFieldBean; import cowsultants.itracker.ejb.beans.entity.CustomFieldValueBean; import cowsultants.itracker.ejb.beans.entity.LanguageBean; import cowsultants.itracker.ejb.beans.entity.WorkflowScriptBean; import cowsultants.itracker.ejb.client.exceptions.SystemConfigurationException; import cowsultants.itracker.ejb.client.interfaces.SystemConfiguration; import cowsultants.itracker.ejb.client.models.ConfigurationModel; import cowsultants.itracker.ejb.client.models.CustomFieldModel; import cowsultants.itracker.ejb.client.models.CustomFieldValueModel; import cowsultants.itracker.ejb.client.models.LanguageModel; import cowsultants.itracker.ejb.client.models.NameValuePairModel; import cowsultants.itracker.ejb.client.models.SystemConfigurationModel; import cowsultants.itracker.ejb.client.models.WorkflowScriptModel; import cowsultants.itracker.ejb.client.resources.ITrackerResources; import cowsultants.itracker.ejb.client.util.IssueUtilities; import cowsultants.itracker.ejb.client.util.Logger; import cowsultants.itracker.ejb.client.util.SystemConfigurationUtilities; import cowsultants.itracker.ejb.util.PropertiesFileHandler; /** * * Implimetation of the SystemConfiguration Interface. * * @see SystemConfiguration * */ public class SystemConfigurationBean implements SystemConfiguration { private static Properties props = null; InitialContext ic = null; ConfigurationFactory cHome = null; CustomFieldFactory cfHome = null; CustomFieldValueFactory cfvHome = null; LanguageFactory lHome = null; WorkflowScriptFactory wsHome = null; public SystemConfigurationBean() { if (props == null) { props = new Properties(); // try { // ic = new InitialContext(); // NamingEnumeration bindings = ic.listBindings("java:comp/env"); // while(bindings.hasMoreElements()) { // try { // Binding namePair = (Binding) bindings.nextElement(); // Logger.logDebug("Setting property " + namePair.getName() + " from // env-entry to value '" + ((Object) // namePair.getObject()).toString() + "'"); // props.setProperty(namePair.getName(), ((Object) // namePair.getObject()).toString()); // } catch(ClassCastException cce) { // Logger.logError("ClassCastException while loading application // properties.", cce); // } // } // } catch(NamingException ne) { // Logger.logError("NamingException while loading application // properties.", ne); // } PropertiesFileHandler filePropertiesHandler = new PropertiesFileHandler(); filePropertiesHandler.addProperties("/itrackerApplication.properties"); filePropertiesHandler.addProperties("/itrackerVersion.properties"); Properties fileProps = filePropertiesHandler.getProperties(); for (Enumeration e = fileProps.propertyNames(); e.hasMoreElements();) { String propName = (String) e.nextElement(); Logger.logDebug("Setting property " + propName + " from file to value '" + fileProps.getProperty(propName) + "'"); props.setProperty(propName, fileProps.getProperty(propName)); } props.setProperty("start_time_millis", Long.toString(new java.util.Date().getTime())); /* * try { * * InitialContext ic = new InitialContext(); * * try { * * DataSource ds = (DataSource) * ic.lookup(props.getProperty("default_ds", * SystemConfigurationUtilities.DEFAULT_DATASOURCE)); } * catch(NamingException testne) { * * DataSource ds = (DataSource) ic.lookup("java:/" + * props.getProperty("default_ds")); * * props.setProperty("default_ds", "java:/" + * props.getProperty("default_ds")); * * Logger.logWarn("Error in datasource, changed to '" + * props.getProperty("default_ds") + "'"); } } catch(NamingException * ne) { * * Logger.logError("NamingException while checking DataSource.", * ne); } */ } // initialize Factories... cHome = SpringFactories.getConfigurationFactory(); lHome = SpringFactories.getLanguageFactory(); cfHome = SpringFactories.getCustomFieldFactory(); wsHome = SpringFactories.getWorkflowScriptFactory(); } public String getProperty(String name) { return props.getProperty(name); } public String getProperty(String name, String defaultValue) { return props.getProperty(name, defaultValue); } public boolean getBooleanProperty(String name, boolean defaultValue) { String value = props.getProperty(name); return (value == null ? defaultValue : new Boolean(value).booleanValue()); } public int getIntegerProperty(String name, int defaultValue) { String value = props.getProperty(name); try { return (value == null ? defaultValue : Integer.parseInt(value)); } catch (NumberFormatException nfe) { return defaultValue; } } public long getLongProperty(String name, long defaultValue) { String value = props.getProperty(name); try { return (value == null ? defaultValue : Long.parseLong(value)); } catch (NumberFormatException nfe) { return defaultValue; } } public Properties getProperties() { return props; } public ConfigurationModel getConfigurationItem(Integer id) { ConfigurationBean configItem = cHome.findByPrimaryKey(id); return configItem.getModel(); } public ConfigurationModel[] getConfigurationItemsByType(int type) throws DataException { ConfigurationModel[] items = new ConfigurationModel[0]; Collection configItems = cHome.findByType(type); items = new ConfigurationModel[configItems.size()]; int i = 0; for (Iterator iter = configItems.iterator(); iter.hasNext(); i++) { items[i] = ((ConfigurationBean) iter.next()).getModel(); } Arrays.sort(items, new ConfigurationModel()); return items; } public ConfigurationModel[] getConfigurationItemsByType(int type, Locale locale) throws DataException { ConfigurationModel[] items = getConfigurationItemsByType(type); for (int i = 0; i < items.length; i++) { if (items[i].getType() == SystemConfigurationUtilities.TYPE_STATUS) { items[i].setName(IssueUtilities.getStatusName(items[i].getValue(), locale)); } else if (items[i].getType() == SystemConfigurationUtilities.TYPE_SEVERITY) { items[i].setName(IssueUtilities.getSeverityName(items[i].getValue(), locale)); } else if (items[i].getType() == SystemConfigurationUtilities.TYPE_RESOLUTION) { items[i].setName(IssueUtilities.getResolutionName(items[i].getValue(), locale)); } } return items; } public ConfigurationModel createConfigurationItem(ConfigurationModel model) { ConfigurationBean configurationItem = new ConfigurationBean(); configurationItem.setModel(model); configurationItem.setCreateDate( new Timestamp( new Date().getTime())); cHome.saveOrUpdate(configurationItem); return configurationItem.getModel(); // Logger.logDebug("Unable to create new configuration item."); } public ConfigurationModel updateConfigurationItem(ConfigurationModel model) { if (model != null) { ConfigurationBean configurationItem = cHome.findByPrimaryKey(model.getId()); configurationItem.setModel(model); return configurationItem.getModel(); } return (null); } public ConfigurationModel[] updateConfigurationItems(ConfigurationModel[] models, int type) throws DataException { removeConfigurationItems(type); for (int i = 0; i < models.length; i++) { ConfigurationBean configurationItem = new ConfigurationBean(); configurationItem.setModel(models[i]); models[i] = configurationItem.getModel(); } Arrays.sort(models, new ConfigurationModel()); return models; // Logger.logDebug("Unable to create new language item."); // return new ConfigurationModel[0]; } public void removeConfigurationItem(Integer id) { // cHome.remove(id); // Logger.logDebug("Unable to remove configuration item " + id + "."); } public void removeConfigurationItems(int type) throws DataException { Collection currentItems = cHome.findByType(type); for (Iterator iter = currentItems.iterator(); iter.hasNext();) { ConfigurationBean config = (ConfigurationBean) iter.next(); // config.remove(); } } public void removeConfigurationItems(ConfigurationModel model) throws DataException { Vector currentIds = new Vector(); Collection currentItems = cHome.findByTypeAndValue(model.getType(), model.getValue()); for (Iterator iter = currentItems.iterator(); iter.hasNext();) { ConfigurationBean configItem = (ConfigurationBean) iter.next(); cHome.delete(configItem); } } public boolean configurationItemExists(ConfigurationModel model) throws DataException { if (model != null && model.getVersion() != null) { Collection configItems = cHome.findByTypeAndValue(model.getType(), model.getValue()); if (configItems != null && configItems.size() > 0) { return true; } } return false; } public boolean configurationItemUpToDate(ConfigurationModel model) throws DataException { long currentVersion = 0; if (model != null && model.getVersion() != null) { Collection configItems = cHome.findByTypeAndValue(model.getType(), model.getValue()); for (Iterator iter = configItems.iterator(); iter.hasNext();) { ConfigurationBean configItem = (ConfigurationBean) iter.next(); if (configItem != null) { currentVersion = Math.max(SystemConfigurationUtilities.getVersionAsLong(configItem.getVersion()), currentVersion); } } if (currentVersion >= SystemConfigurationUtilities.getVersionAsLong(model.getVersion())) { return true; } } return false; } public void resetConfigurationCache() throws DataException { IssueUtilities.setResolutions(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION)); IssueUtilities.setSeverities(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY)); IssueUtilities.setStatuses(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS)); IssueUtilities.setCustomFields(getCustomFields()); } public void resetConfigurationCache(int type) throws DataException { if (type == SystemConfigurationUtilities.TYPE_RESOLUTION) { IssueUtilities.setResolutions(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION)); } else if (type == SystemConfigurationUtilities.TYPE_SEVERITY) { IssueUtilities.setSeverities(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY)); } else if (type == SystemConfigurationUtilities.TYPE_STATUS) { IssueUtilities.setStatuses(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS)); } else if (type == SystemConfigurationUtilities.TYPE_CUSTOMFIELD) { IssueUtilities.setCustomFields(getCustomFields()); } } public WorkflowScriptModel getWorkflowScript(Integer id) { WorkflowScriptBean workflowScript = wsHome.findByPrimaryKey(id); return workflowScript.getModel(); } public WorkflowScriptModel[] getWorkflowScripts() { WorkflowScriptModel[] scripts = new WorkflowScriptModel[0]; Collection workflowScripts = wsHome.findAll(); scripts = new WorkflowScriptModel[workflowScripts.size()]; int i = 0; for (Iterator iter = workflowScripts.iterator(); iter.hasNext(); i++) { scripts[i] = ((WorkflowScriptBean) iter.next()).getModel(); } return scripts; } public WorkflowScriptModel createWorkflowScript(WorkflowScriptModel model) { // try { WorkflowScriptBean workflowScript = new WorkflowScriptBean(); workflowScript.setModel(model); model.setId(workflowScript.getId()); return workflowScript.getModel(); // } catch(CreateException ce) { // Logger.logDebug("Unable to create new workflow script.", ce); // } // return null; } public WorkflowScriptModel updateWorkflowScript(WorkflowScriptModel model) { if (model != null) { WorkflowScriptBean workflowScript = wsHome.findByPrimaryKey(model.getId()); workflowScript.setModel(model); return workflowScript.getModel(); } return null; } public CustomFieldModel getCustomField(Integer id) throws DataException { CustomFieldBean customField = cfHome.findByPrimaryKey(id); return customField.getModel(); } public CustomFieldModel[] getCustomFields() throws DataException { CustomFieldModel[] fields = new CustomFieldModel[0]; Collection customFields = cfHome.findAll(); fields = new CustomFieldModel[customFields.size()]; int i = 0; for (Iterator iter = customFields.iterator(); iter.hasNext(); i++) { fields[i] = ((CustomFieldBean) iter.next()).getModel(); } return fields; } public CustomFieldModel[] getCustomFields(Locale locale) throws DataException { CustomFieldModel[] fields = getCustomFields(); for (int i = 0; i < fields.length; i++) { fields[i].setLabels(locale); } return fields; } public CustomFieldModel createCustomField(CustomFieldModel model) throws DataException { CustomFieldBean customField = new CustomFieldBean(); customField.setModel(model); model.setId(customField.getId()); if (model.getOptions().length > 0) { removeCustomFieldValues(customField.getId()); CustomFieldValueModel[] newOptions = model.getOptions(); for (int i = 0; i < newOptions.length; i++) { newOptions[i].setCustomFieldId(customField.getId()); createCustomFieldValue(newOptions[i]); } } return customField.getModel(); // Logger.logDebug("Unable to create new custom field.", ce); } public CustomFieldModel updateCustomField(CustomFieldModel model) throws DataException { if (model != null) { CustomFieldBean customField = cfHome.findByPrimaryKey(model.getId()); customField.setModel(model); if (model.getOptions().length > 0) { removeCustomFieldValues(customField.getId()); CustomFieldValueModel[] newOptions = model.getOptions(); for (int i = 0; i < newOptions.length; i++) { createCustomFieldValue(newOptions[i]); } } return customField.getModel(); } return null; } public void removeCustomField(Integer customFieldId) throws DataException { CustomFieldBean customField = cfHome.findByPrimaryKey(customFieldId); // customField.remove(); } public CustomFieldValueModel getCustomFieldValue(Integer id) { // CustomFieldValueBean customFieldValue = cfvHome.findByPrimaryKey(id); // return customFieldValue.getModel(); return (null); } public CustomFieldValueModel createCustomFieldValue(CustomFieldValueModel model) throws DataException { if (model == null || model.getCustomFieldId() == null) { return null; } CustomFieldBean customField = cfHome.findByPrimaryKey(model.getCustomFieldId()); CustomFieldValueBean customFieldValue = new CustomFieldValueBean(); customFieldValue.setModel(model); customFieldValue.setCustomField(customField); return customFieldValue.getModel(); // Logger.logDebug("Unable to create new custom field value: " + // ce.getMessage()); // Logger.logDebug("Unable to create new custom field value, custom // field not found: " + fe.getMessage()); } public CustomFieldValueModel updateCustomFieldValue(CustomFieldValueModel model) { // if(model != null) { // CustomFieldValueBean customFieldValue = // cfvHome.findByPrimaryKey(model.getId()); // customFieldValue.setModel(model); // return customFieldValue.getModel(); // } return null; } public CustomFieldValueModel[] updateCustomFieldValues(Integer customFieldId, CustomFieldValueModel[] models) throws DataException { CustomFieldValueModel[] values = new CustomFieldValueModel[0]; if (customFieldId != null) { CustomFieldBean customField = cfHome.findByPrimaryKey(customFieldId); Collection currValues = customField.getValues(); for (Iterator iter = currValues.iterator(); iter.hasNext();) { if (models == null || models.length == 0) { // ((CustomFieldValueBean) iter.next()).remove(); } else { CustomFieldValueBean value = (CustomFieldValueBean) iter.next(); for (int i = 0; i < models.length; i++) { if (value.getId().equals(models[i].getId())) { value.setModel(models[i]); models[i] = value.getModel(); break; } } } } } Arrays.sort(models, new CustomFieldValueModel()); return models; } public void removeCustomFieldValue(Integer customFieldValueId) { // CustomFieldValueBean customFieldValue = // cfvHome.findByPrimaryKey(customFieldValueId); // customFieldValue.remove(); } public void removeCustomFieldValues(Integer customFieldId) { // Collection currentValues = cfvHome.findByCustomField(customFieldId); // for(Iterator iter = currentValues.iterator(); iter.hasNext(); ) { // // //((CustomFieldValueBean) iter.next()).remove(); // } } public LanguageModel getLanguageItemByKey(String key, Locale locale) throws DataException { LanguageModel model = null; if (key != null) { LanguageBean languageItem = lHome.findByKeyAndLocale(key, ITrackerResources.BASE_LOCALE); model = languageItem.getModel(); if (locale != null && !"".equals(locale.getLanguage())) { languageItem = lHome.findByKeyAndLocale(key, locale.getLanguage()); model = languageItem.getModel(); if (!"".equals(locale.getCountry())) { languageItem = lHome.findByKeyAndLocale(key, locale.toString()); model = languageItem.getModel(); } } } return model; } public LanguageModel[] getLanguageItemsByKey(String key) throws DataException { LanguageModel[] items = new LanguageModel[0]; Collection languageItems = lHome.findByKey(key); items = new LanguageModel[languageItems.size()]; int i = 0; for (Iterator iter = languageItems.iterator(); iter.hasNext(); i++) { items[i] = ((LanguageBean) iter.next()).getModel(); } return items; } public LanguageModel updateLanguageItem(LanguageModel model) throws DataException { LanguageBean languageItem; try { languageItem = lHome.findByKeyAndLocale(model.getResourceKey(), model.getLocale()); languageItem.setModel(model); } catch (NoSuchEntityException fe) { languageItem = new LanguageBean(); languageItem.setCreateDate(new Timestamp(new Date().getTime())); languageItem.setModel(model); lHome.saveOrUpdate(languageItem); } return languageItem.getModel(); } public void removeLanguageKey(String key) throws DataException { Vector currentIds = new Vector(); Collection languageItems = lHome.findByKey(key); for (Iterator iter = languageItems.iterator(); iter.hasNext();) { currentIds.add(((LanguageBean) iter.next()).getId()); } for (int i = 0; i < currentIds.size(); i++) { // lHome.remove((Integer) currentIds.elementAt(i)); } // } catch(FinderException ce) { // Logger.logDebug("Unable to find any language items with key" + key + // " for removal."); // } } public void removeLanguageItem(LanguageModel model) throws DataException { LanguageBean languageItem = lHome.findByKeyAndLocale(model.getResourceKey(), model.getLocale()); // lHome.remove(languageItem.getId()); // Logger.logDebug("Unable to remove language item " + model.toString() // + "."); } public String[] getSortedKeys() throws DataException { String[] sortedKeys = new String[0]; int i = 0; Collection items = lHome.findByLocale(ITrackerResources.BASE_LOCALE); sortedKeys = new String[items.size()]; for (Iterator iter = items.iterator(); iter.hasNext(); i++) { LanguageBean item = (LanguageBean) iter.next(); sortedKeys[i] = item.getResourceKey(); } // Now sort the list of keys in a logical manner Arrays.sort(sortedKeys); return sortedKeys; } public HashMap getDefinedKeys(String locale) throws DataException { HashMap keys = new HashMap(); if (locale == null || locale.equals("")) { locale = ITrackerResources.BASE_LOCALE; } Collection items = lHome.findByLocale(locale); for (Iterator iter = items.iterator(); iter.hasNext();) { LanguageBean item = (LanguageBean) iter.next(); keys.put(item.getResourceKey(), item.getResourceValue()); } return keys; } public NameValuePairModel[] getDefinedKeysAsArray(String locale) throws DataException { NameValuePairModel[] keys = new NameValuePairModel[0]; if (locale == null || locale.equals("")) { locale = ITrackerResources.BASE_LOCALE; } int i = 0; Collection items = lHome.findByLocale(locale); keys = new NameValuePairModel[items.size()]; for (Iterator iter = items.iterator(); iter.hasNext(); i++) { LanguageBean item = (LanguageBean) iter.next(); keys[i] = new NameValuePairModel(item.getResourceKey(), item.getResourceValue()); } Arrays.sort(keys, new NameValuePairModel()); return keys; } public int getNumberDefinedKeys(String locale) throws DataException { return getDefinedKeys(locale).size(); } public LanguageModel[] getLanguage(Locale locale) throws DataException { LanguageModel[] languageArray = new LanguageModel[0]; HashMap language = new HashMap(); Collection baseItems = lHome.findByLocale(ITrackerResources.BASE_LOCALE); for (Iterator iterator = baseItems.iterator(); iterator.hasNext();) { LanguageBean item = (LanguageBean) iterator.next(); language.put(item.getResourceKey(), item.getResourceValue()); } if (locale != null && !"".equals(locale.getLanguage())) { Collection languageItems = lHome.findByLocale(locale.getLanguage()); for (Iterator iterator = languageItems.iterator(); iterator.hasNext();) { LanguageBean item = (LanguageBean) iterator.next(); language.put(item.getResourceKey(), item.getResourceValue()); } if (!"".equals(locale.getCountry())) { Collection countryItems = lHome.findByLocale(locale.toString()); for (Iterator iterator = countryItems.iterator(); iterator.hasNext();) { LanguageBean item = (LanguageBean) iterator.next(); language.put(item.getResourceKey(), item.getResourceValue()); } } } languageArray = new LanguageModel[language.size()]; int i = 0; String localeString = (locale == null ? ITrackerResources.BASE_LOCALE : locale.toString()); for (Iterator iterator = language.keySet().iterator(); iterator.hasNext(); i++) { String key = (String) iterator.next(); languageArray[i] = new LanguageModel(localeString, key, (String) language.get(key)); } return languageArray; } public HashMap getAvailableLanguages() throws DataException { HashMap languages = new HashMap(); ConfigurationModel[] locales = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_LOCALE); for (int i = 0; i < locales.length; i++) { if (ITrackerResources.BASE_LOCALE.equalsIgnoreCase(locales[i].getValue())) { continue; } if (locales[i].getValue().length() == 2) { languages.put(locales[i].getValue(), new Vector()); } } for (int i = 0; i < locales.length; i++) { if (ITrackerResources.BASE_LOCALE.equalsIgnoreCase(locales[i].getValue())) { continue; } String locale = locales[i].getValue(); if (locale.length() == 5 && locale.indexOf('_') == 2) { String baseLanguage = locale.substring(0, 2); Vector languageVector = (Vector) languages.get(baseLanguage); if (languageVector != null) { languageVector.addElement(locale); } } } return languages; } public int getNumberAvailableLanguages() throws DataException { int numLanguages = 0; HashMap availableLanguages = getAvailableLanguages(); for (Iterator iter = availableLanguages.keySet().iterator(); iter.hasNext();) { Vector language = (Vector) availableLanguages.get((String) iter.next()); if (language != null && language.size() > 0) { numLanguages += language.size(); } else { numLanguages += 1; } } return numLanguages; } public void updateLanguage(Locale locale, LanguageModel[] items) throws DataException { if (locale != null && items != null) { ConfigurationModel configItem = new ConfigurationModel(SystemConfigurationUtilities.TYPE_LOCALE, locale .toString(), props.getProperty("version")); updateLanguage(locale, items, configItem); } } public void updateLanguage(Locale locale, LanguageModel[] items, ConfigurationModel configItem) throws DataException { if (items == null || locale == null || configItem == null) { return; } for (int i = 0; i < items.length; i++) { if (items[i] != null) { if (items[i].getAction() == SystemConfigurationUtilities.ACTION_REMOVE) { removeLanguageItem(items[i]); } else { updateLanguageItem(items[i]); } } } removeConfigurationItems(configItem); createConfigurationItem(configItem); } public SystemConfigurationModel getSystemConfiguration(Locale locale) throws DataException { SystemConfigurationModel config = new SystemConfigurationModel(); // Load the basic system configuration ConfigurationModel[] resolutions = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION); for (int i = 0; i < resolutions.length; i++) { resolutions[i].setName(ITrackerResources.getString(SystemConfigurationUtilities .getLanguageKey(resolutions[i]), locale)); } config.setResolutions(resolutions); ConfigurationModel[] severities = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY); for (int i = 0; i < severities.length; i++) { severities[i].setName(ITrackerResources.getString(SystemConfigurationUtilities .getLanguageKey(severities[i]), locale)); } config.setSeverities(severities); ConfigurationModel[] statuses = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS); for (int i = 0; i < statuses.length; i++) { statuses[i].setName(ITrackerResources.getString(SystemConfigurationUtilities.getLanguageKey(statuses[i]), locale)); } config.setStatuses(statuses); // Now load the CustomFields config.setCustomFields(IssueUtilities.getCustomFields(locale)); // Now set the system version config.setVersion(props.getProperty("version")); return config; } public boolean initializeLocale(String locale, boolean forceReload) throws DataException { boolean result = false; ConfigurationModel localeConfig = new ConfigurationModel(SystemConfigurationUtilities.TYPE_LOCALE, locale, props.getProperty("version")); if (!configurationItemUpToDate(localeConfig) || forceReload) { Logger.logDebug("Loading database with locale " + locale); PropertiesFileHandler localePropertiesHandler = new PropertiesFileHandler( "/cowsultants/itracker/ejb/client/resources/ITracker" + (ITrackerResources.BASE_LOCALE.equals(locale) ? "" : "_" + locale) + ".properties"); if (localePropertiesHandler.hasProperties()) { Properties localeProperties = localePropertiesHandler.getProperties(); Logger.logDebug("Locale " + locale + " contains " + localeProperties.size() + " properties."); for (Enumeration propertiesEnumeration = localeProperties.propertyNames(); propertiesEnumeration .hasMoreElements();) { String key = (String) propertiesEnumeration.nextElement(); String value = localeProperties.getProperty(key); updateLanguageItem(new LanguageModel(locale, key, value)); } removeConfigurationItems(localeConfig); createConfigurationItem(localeConfig); ITrackerResources.clearBundle(ITrackerResources.getLocale(locale)); result = true; } else { Logger.logInfo("Locale " + locale + " contained no properties."); } } return result; } public void initializeConfiguration() { // Need to eventually add in code that detects the current version of // the config and update // if necessary try { ConfigurationModel[] initialized = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_INITIALIZED); if (initialized == null || initialized.length != 1) { Logger.logDebug("System does not appear to be initialized, initializing system configuration."); LanguageModel[] baseLanguage = getLanguage(ITrackerResources.getLocale(ITrackerResources.BASE_LOCALE)); if (baseLanguage == null || baseLanguage.length == 0) { throw new SystemConfigurationException( "Languages must be initialized before the system configuration can be loaded."); } // Remove any previous configuration information, possibly left // over from previous failed initialization Logger.logDebug("Removing previous incomplete initialization information."); removeConfigurationItems(SystemConfigurationUtilities.TYPE_STATUS); removeConfigurationItems(SystemConfigurationUtilities.TYPE_SEVERITY); removeConfigurationItems(SystemConfigurationUtilities.TYPE_RESOLUTION); for (int i = 0; i < baseLanguage.length; i++) { if (baseLanguage[i].getResourceKey().startsWith(ITrackerResources.KEY_BASE_RESOLUTION)) { try { String resolutionString = baseLanguage[i].getResourceKey().substring(20); Logger.logDebug("Adding new configuration resolution value: " + resolutionString); int resolutionNumber = Integer.parseInt(resolutionString); createConfigurationItem(new ConfigurationModel( SystemConfigurationUtilities.TYPE_RESOLUTION, resolutionString, props .getProperty("version"), resolutionNumber)); } catch (Exception e) { Logger.logError("Unable to load resolution value: " + baseLanguage[i].getResourceKey(), e); } } if (baseLanguage[i].getResourceKey().startsWith(ITrackerResources.KEY_BASE_SEVERITY)) { try { String severityString = baseLanguage[i].getResourceKey().substring(18); Logger.logDebug("Adding new configuration severity value: " + severityString); int severityNumber = Integer.parseInt(severityString); createConfigurationItem(new ConfigurationModel(SystemConfigurationUtilities.TYPE_SEVERITY, severityString, props.getProperty("version"), severityNumber)); } catch (Exception e) { Logger.logError("Unable to load severity value: " + baseLanguage[i].getResourceKey(), e); } } if (baseLanguage[i].getResourceKey().startsWith(ITrackerResources.KEY_BASE_STATUS)) { try { String statusString = baseLanguage[i].getResourceKey().substring(16); Logger.logDebug("Adding new configuration status value: " + statusString); int statusNumber = Integer.parseInt(statusString); createConfigurationItem(new ConfigurationModel(SystemConfigurationUtilities.TYPE_STATUS, statusString, props.getProperty("version"), statusNumber)); } catch (Exception e) { Logger.logError("Unable to load status value: " + baseLanguage[i].getResourceKey(), e); } } } createConfigurationItem(new ConfigurationModel(SystemConfigurationUtilities.TYPE_INITIALIZED, "1", props.getProperty("version"))); } } catch (Exception e) { Logger.logError("Unable to initialize system configuration.", e); } } } \ No newline at end of file --- 1 ---- ! /* * This software was designed and created by Jason Carroll. * Copyright (c) 2002, 2003, 2004 Jason Carroll. * The author can be reached at jca...@co... * ITracker website: http://www.cowsultants.com * ITracker forums: http://www.cowsultants.com/phpBB/index.php * * This program is free software; you can redistribute it and/or modify * it only under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ package cowsultants.itracker.ejb.beans.session; import java.sql.Timestamp; import java.util.Arrays; import java.util.Date; import java.util.Collection; import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.Locale; import java.util.Properties; import java.util.Vector; import javax.naming.InitialContext; import cowsultants.itracker.ejb.beans.entity.ConfigurationBean; import cowsultants.itracker.ejb.beans.entity.CustomFieldBean; import cowsultants.itracker.ejb.beans.entity.CustomFieldValueBean; import cowsultants.itracker.ejb.beans.entity.LanguageBean; import cowsultants.itracker.ejb.beans.entity.WorkflowScriptBean; import cowsultants.itracker.ejb.client.exceptions.SystemConfigurationException; import cowsultants.itracker.ejb.client.interfaces.SystemConfiguration; import cowsultants.itracker.ejb.client.models.ConfigurationModel; import cowsultants.itracker.ejb.client.models.CustomFieldModel; import cowsultants.itracker.ejb.client.models.CustomFieldValueModel; import cowsultants.itracker.ejb.client.models.LanguageModel; import cowsultants.itracker.ejb.client.models.NameValuePairModel; import cowsultants.itracker.ejb.client.models.SystemConfigurationModel; import cowsultants.itracker.ejb.client.models.WorkflowScriptModel; import cowsultants.itracker.ejb.client.resources.ITrackerResources; import cowsultants.itracker.ejb.client.util.IssueUtilities; import cowsultants.itracker.ejb.client.util.Logger; import cowsultants.itracker.ejb.client.util.SystemConfigurationUtilities; import cowsultants.itracker.ejb.util.PropertiesFileHandler; /** * * Implimetation of the SystemConfiguration Interface. * * @see SystemConfiguration * */ public class SystemConfigurationBean implements SystemConfiguration { private static Properties props = null; InitialContext ic = null; ConfigurationFactory cHome = null; CustomFieldFactory cfHome = null; CustomFieldValueFactory cfvHome = null; LanguageFactory lHome = null; WorkflowScriptFactory wsHome = null; public SystemConfigurationBean() { if (props == null) { props = new Properties(); // try { // ic = new InitialContext(); // NamingEnumeration bindings = ic.listBindings("java:comp/env"); // while(bindings.hasMoreElements()) { // try { // Binding namePair = (Binding) bindings.nextElement(); // Logger.logDebug("Setting property " + namePair.getName() + " from // env-entry to value '" + ((Object) // namePair.getObject()).toString() + "'"); // props.setProperty(namePair.getName(), ((Object) // namePair.getObject()).toString()); // } catch(ClassCastException cce) { // Logger.logError("ClassCastException while loading application // properties.", cce); // } // } // } catch(NamingException ne) { // Logger.logError("NamingException while loading application // properties.", ne); // } PropertiesFileHandler filePropertiesHandler = new PropertiesFileHandler(); filePropertiesHandler.addProperties("/itrackerApplication.properties"); filePropertiesHandler.addProperties("/itrackerVersion.properties"); Properties fileProps = filePropertiesHandler.getProperties(); for (Enumeration e = fileProps.propertyNames(); e.hasMoreElements();) { String propName = (String) e.nextElement(); Logger.logDebug("Setting property " + propName + " from file to value '" + fileProps.getProperty(propName) + "'"); props.setProperty(propName, fileProps.getProperty(propName)); } props.setProperty("start_time_millis", Long.toString(new java.util.Date().getTime())); /* * try { * * InitialContext ic = new InitialContext(); * * try { * * DataSource ds = (DataSource) * ic.lookup(props.getProperty("default_ds", * SystemConfigurationUtilities.DEFAULT_DATASOURCE)); } * catch(NamingException testne) { * * DataSource ds = (DataSource) ic.lookup("java:/" + * props.getProperty("default_ds")); * * props.setProperty("default_ds", "java:/" + * props.getProperty("default_ds")); * * Logger.logWarn("Error in datasource, changed to '" + * props.getProperty("default_ds") + "'"); } } catch(NamingException * ne) { * * Logger.logError("NamingException while checking DataSource.", * ne); } */ } // initialize Factories... cHome = SpringFactories.getConfigurationFactory(); lHome = SpringFactories.getLanguageFactory(); cfHome = SpringFactories.getCustomFieldFactory(); wsHome = SpringFactories.getWorkflowScriptFactory(); } public String getProperty(String name) { return props.getProperty(name); } public String getProperty(String name, String defaultValue) { return props.getProperty(name, defaultValue); } public boolean getBooleanProperty(String name, boolean defaultValue) { String value = props.getProperty(name); return (value == null ? defaultValue : new Boolean(value).booleanValue()); } public int getIntegerProperty(String name, int defaultValue) { String value = props.getProperty(name); try { return (value == null ? defaultValue : Integer.parseInt(value)); } catch (NumberFormatException nfe) { return defaultValue; } } public long getLongProperty(String name, long defaultValue) { String value = props.getProperty(name); try { return (value == null ? defaultValue : Long.parseLong(value)); } catch (NumberFormatException nfe) { return defaultValue; } } public Properties getProperties() { return props; } public ConfigurationModel getConfigurationItem(Integer id) { ConfigurationBean configItem = cHome.findByPrimaryKey(id); return configItem.getModel(); } public ConfigurationModel[] getConfigurationItemsByType(int type) throws DataException { ConfigurationModel[] items = new ConfigurationModel[0]; Collection configItems = cHome.findByType(type); items = new ConfigurationModel[configItems.size()]; int i = 0; for (Iterator iter = configItems.iterator(); iter.hasNext(); i++) { items[i] = ((ConfigurationBean) iter.next()).getModel(); } Arrays.sort(items, new ConfigurationModel()); return items; } public ConfigurationModel[] getConfigurationItemsByType(int type, Locale locale) throws DataException { ConfigurationModel[] items = getConfigurationItemsByType(type); for (int i = 0; i < items.length; i++) { if (items[i].getType() == SystemConfigurationUtilities.TYPE_STATUS) { items[i].setName(IssueUtilities.getStatusName(items[i].getValue(), locale)); } else if (items[i].getType() == SystemConfigurationUtilities.TYPE_SEVERITY) { items[i].setName(IssueUtilities.getSeverityName(items[i].getValue(), locale)); } else if (items[i].getType() == SystemConfigurationUtilities.TYPE_RESOLUTION) { items[i].setName(IssueUtilities.getResolutionName(items[i].getValue(), locale)); } } return items; } public ConfigurationModel createConfigurationItem(ConfigurationModel model) { ConfigurationBean configurationItem = new ConfigurationBean(); configurationItem.setModel(model); configurationItem.setCreateDate( new Timestamp( new Date().getTime())); cHome.saveOrUpdate(configurationItem); return configurationItem.getModel(); } public ConfigurationModel updateConfigurationItem(ConfigurationModel model) { if (model != null) { ConfigurationBean configurationItem = cHome.findByPrimaryKey(model.getId()); configurationItem.setModel(model); return configurationItem.getModel(); } return (null); } public ConfigurationModel[] updateConfigurationItems(ConfigurationModel[] models, int type) throws DataException { removeConfigurationItems(type); for (int i = 0; i < models.length; i++) { ConfigurationBean configurationItem = new ConfigurationBean(); configurationItem.setModel(models[i]); models[i] = configurationItem.getModel(); } Arrays.sort(models, new ConfigurationModel()); return models; // Logger.logDebug("Unable to create new language item."); // return new ConfigurationModel[0]; } public void removeConfigurationItem(Integer id) { // cHome.remove(id); // Logger.logDebug("Unable to remove configuration item " + id + "."); } public void removeConfigurationItems(int type) throws DataException { Collection currentItems = cHome.findByType(type); for (Iterator iter = currentItems.iterator(); iter.hasNext();) { ConfigurationBean config = (ConfigurationBean) iter.next(); // config.remove(); } } public void removeConfigurationItems(ConfigurationModel model) throws DataException { Vector currentIds = new Vector(); Collection currentItems = cHome.findByTypeAndValue(model.getType(), model.getValue()); for (Iterator iter = currentItems.iterator(); iter.hasNext();) { ConfigurationBean configItem = (ConfigurationBean) iter.next(); cHome.delete(configItem); } } public boolean configurationItemExists(ConfigurationModel model) throws DataException { if (model != null && model.getVersion() != null) { Collection configItems = cHome.findByTypeAndValue(model.getType(), model.getValue()); if (configItems != null && configItems.size() > 0) { return true; } } return false; } public boolean configurationItemUpToDate(ConfigurationModel model) throws DataException { long currentVersion = 0; if (model != null && model.getVersion() != null) { Collection configItems = cHome.findByTypeAndValue(model.getType(), model.getValue()); for (Iterator iter = configItems.iterator(); iter.hasNext();) { ConfigurationBean configItem = (ConfigurationBean) iter.next(); if (configItem != null) { currentVersion = Math.max(SystemConfigurationUtilities.getVersionAsLong(configItem.getVersion()), currentVersion); } } if (currentVersion >= SystemConfigurationUtilities.getVersionAsLong(model.getVersion())) { return true; } } return false; } public void resetConfigurationCache() throws DataException { IssueUtilities.setResolutions(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION)); IssueUtilities.setSeverities(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY)); IssueUtilities.setStatuses(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS)); IssueUtilities.setCustomFields(getCustomFields()); } public void resetConfigurationCache(int type) throws DataException { if (type == SystemConfigurationUtilities.TYPE_RESOLUTION) { IssueUtilities.setResolutions(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION)); } else if (type == SystemConfigurationUtilities.TYPE_SEVERITY) { IssueUtilities.setSeverities(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY)); } else if (type == SystemConfigurationUtilities.TYPE_STATUS) { IssueUtilities.setStatuses(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS)); } else if (type == SystemConfigurationUtilities.TYPE_CUSTOMFIELD) { IssueUtilities.setCustomFields(getCustomFields()); } } public WorkflowScriptModel getWorkflowScript(Integer id) { WorkflowScriptBean workflowScript = wsHome.findByPrimaryKey(id); return workflowScript.getModel(); } public WorkflowScriptModel[] getWorkflowScripts() { WorkflowScriptModel[] scripts = new WorkflowScriptModel[0]; Collection workflowScripts = wsHome.findAll(); scripts = new WorkflowScriptModel[workflowScripts.size()]; int i = 0; for (Iterator iter = workflowScripts.iterator(); iter.hasNext(); i++) { scripts[i] = ((WorkflowScriptBean) iter.next()).getModel(); } return scripts; } public WorkflowScriptModel createWorkflowScript(WorkflowScriptModel model) { // try { WorkflowScriptBean workflowScript = new WorkflowScriptBean(); workflowScript.setModel(model); model.setId(workflowScript.getId()); return workflowScript.getModel(); // } catch(CreateException ce) { // Logger.logDebug("Unable to create new workflow script.", ce); // } // return null; } public WorkflowScriptModel updateWorkflowScript(WorkflowScriptModel model) { if (model != null) { WorkflowScriptBean workflowScript = wsHome.findByPrimaryKey(model.getId()); workflowScript.setModel(model); return workflowScript.getModel(); } return null; } public CustomFieldModel getCustomField(Integer id) throws DataException { CustomFieldBean customField = cfHome.findByPrimaryKey(id); return customField.getModel(); } public CustomFieldModel[] getCustomFields() throws DataException { CustomFieldModel[] fields = new CustomFieldModel[0]; Collection customFields = cfHome.findAll(); fields = new CustomFieldModel[customFields.size()]; int i = 0; for (Iterator iter = customFields.iterator(); iter.hasNext(); i++) { fields[i] = ((CustomFieldBean) iter.next()).getModel(); } return fields; } public CustomFieldModel[] getCustomFields(Locale locale) throws DataException { CustomFieldModel[] fields = getCustomFields(); for (int i = 0; i < fields.length; i++) { fields[i].setLabels(locale); } return fields; } public CustomFieldModel createCustomField(CustomFieldModel model) throws DataException { CustomFieldBean customField = new CustomFieldBean(); customField.setModel(model); model.setId(customField.getId()); if (model.getOptions().length > 0) { removeCustomFieldValues(customField.getId()); CustomFieldValueModel[] newOptions = model.getOptions(); for (int i = 0; i < newOptions.length; i++) { newOptions[i].setCustomFieldId(customField.getId()); createCustomFieldValue(newOptions[i]); } } return customField.getModel(); // Logger.logDebug("Unable to create new custom field.", ce); } public CustomFieldModel updateCustomField(CustomFieldModel model) throws DataException { if (model != null) { CustomFieldBean customField = cfHome.findByPrimaryKey(model.getId()); customField.setModel(model); if (model.getOptions().length > 0) { removeCustomFieldValues(customField.getId()); CustomFieldValueModel[] newOptions = model.getOptions(); for (int i = 0; i < newOptions.length; i++) { createCustomFieldValue(newOptions[i]); } } return customField.getModel(); } return null; } public void removeCustomField(Integer customFieldId) throws DataException { CustomFieldBean customField = cfHome.findByPrimaryKey(customFieldId); // customField.remove(); } public CustomFieldValueModel getCustomFieldValue(Integer id) { // CustomFieldValueBean customFieldValue = cfvHome.findByPrimaryKey(id); // return customFieldValue.getModel(); return (null); } public CustomFieldValueModel createCustomFieldValue(CustomFieldValueModel model) throws DataException { if (model == null || model.getCustomFieldId() == null) { return null; } CustomFieldBean customField = cfHome.findByPrimaryKey(model.getCustomFieldId()); CustomFieldValueBean customFieldValue = new CustomFieldValueBean(); customFieldValue.setModel(model); customFieldValue.setCustomField(customField); return customFieldValue.getModel(); // Logger.logDebug("Unable to create new custom field value: " + // ce.getMessage()); // Logger.logDebug("Unable to create new custom field value, custom // field not found: " + fe.getMessage()); } public CustomFieldValueModel updateCustomFieldValue(CustomFieldValueModel model) { // if(model != null) { // CustomFieldValueBean customFieldValue = // cfvHome.findByPrimaryKey(model.getId()); // customFieldValue.setModel(model); // return customFieldValue.getModel(); // } return null; } public CustomFieldValueModel[] updateCustomFieldValues(Integer customFieldId, CustomFieldValueModel[] models) throws DataException { CustomFieldValueModel[] values = new CustomFieldValueModel[0]; if (customFieldId != null) { CustomFieldBean customField = cfHome.findByPrimaryKey(customFieldId); Collection currValues = customField.getValues(); for (Iterator iter = currValues.iterator(); iter.hasNext();) { if (models == null || models.length == 0) { // ((CustomFieldValueBean) iter.next()).remove(); } else { CustomFieldValueBean value = (CustomFieldValueBean) iter.next(); for (int i = 0; i < models.length; i++) { if (value.getId().equals(models[i].getId())) { value.setModel(models[i]); models[i] = value.getModel(); break; } } } } } Arrays.sort(models, new CustomFieldValueModel()); return models; } public void removeCustomFieldValue(Integer customFieldValueId) { // CustomFieldValueBean customFieldValue = // cfvHome.findByPrimaryKey(customFieldValueId); // customFieldValue.remove(); } public void removeCustomFieldValues(Integer customFieldId) { // Collection currentValues = cfvHome.findByCustomField(customFieldId); // for(Iterator iter = currentValues.iterator(); iter.hasNext(); ) { // // //((CustomFieldValueBean) iter.next()).remove(); // } } public LanguageModel getLanguageItemByKey(String key, Locale locale) throws DataException { LanguageModel model = null; if (key != null) { LanguageBean languageItem = lHome.findByKeyAndLocale(key, ITrackerResources.BASE_LOCALE); model = languageItem.getModel(); if (locale != null && !"".equals(locale.getLanguage())) { languageItem = lHome.findByKeyAndLocale(key, locale.getLanguage()); model = languageItem.getModel(); if (!"".equals(locale.getCountry())) { languageItem = lHome.findByKeyAndLocale(key, locale.toString()); model = languageItem.getModel(); } } } return model; } public LanguageModel[] getLanguageItemsByKey(String key) throws DataException { LanguageModel[] items = new LanguageModel[0]; Collection languageItems = lHome.findByKey(key); items = new LanguageModel[languageItems.size()]; int i = 0; for (Iterator iter = languageItems.iterator(); iter.hasNext(); i++) { items[i] = ((LanguageBean) iter.next()).getModel(); } return items; } public LanguageModel updateLanguageItem(LanguageModel model) throws DataException { LanguageBean languageItem; try { languageItem = lHome.findByKeyAndLocale(model.g... [truncated message content] |
From: Ricardo T. <rj...@us...> - 2005-10-25 22:14:27
|
Update of /cvsroot/itracker/itracker/src/cowsultants/itracker/web/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12690/cowsultants/itracker/web/util Modified Files: Tag: itrackerhibernate LoginUtilities.java SessionTracker.java Log Message: cleanup Index: LoginUtilities.java =================================================================== RCS file: /cvsroot/itracker/itracker/src/cowsultants/itracker/web/util/LoginUtilities.java,v retrieving revision 1.4.4.2 retrieving revision 1.4.4.3 diff -C2 -d -r1.4.4.2 -r1.4.4.3 *** LoginUtilities.java 13 Oct 2005 12:19:41 -0000 1.4.4.2 --- LoginUtilities.java 25 Oct 2005 22:14:18 -0000 1.4.4.3 *************** *** 19,28 **** package cowsultants.itracker.web.util; ! import java.util.*; ! import javax.servlet.http.*; ! import cowsultants.itracker.ejb.client.resources.*; ! import cowsultants.itracker.ejb.client.util.*; public class LoginUtilities { --- 19,31 ---- package cowsultants.itracker.web.util; ! import java.util.Locale; ! import javax.servlet.http.Cookie; ! import javax.servlet.http.HttpServletRequest; ! import javax.servlet.http.HttpSession; ! import cowsultants.itracker.ejb.client.resources.ITrackerResources; ! import cowsultants.itracker.ejb.client.util.AuthenticationConstants; ! import cowsultants.itracker.ejb.client.util.Logger; public class LoginUtilities { Index: SessionTracker.java =================================================================== RCS file: /cvsroot/itracker/itracker/src/cowsultants/itracker/web/util/SessionTracker.java,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 *** SessionTracker.java 11 Oct 2005 01:21:05 -0000 1.3.4.1 --- SessionTracker.java 25 Oct 2005 22:14:18 -0000 1.3.4.2 *************** *** 19,25 **** package cowsultants.itracker.web.util; ! import java.util.*; ! import cowsultants.itracker.ejb.client.util.*; public class SessionTracker { --- 19,25 ---- package cowsultants.itracker.web.util; ! import java.util.Date; ! import cowsultants.itracker.ejb.client.util.Logger; public class SessionTracker { |
From: Ricardo T. <rj...@us...> - 2005-10-25 22:13:08
|
Update of /cvsroot/itracker/itracker/src/cowsultants/itracker/web/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12334/cowsultants/itracker/web/util Added Files: Tag: itrackerhibernate ServletContextUtils.java Log Message: helper class to get service layer objetcs injected into servlet context, for use by JSPs --- NEW FILE: ServletContextUtils.java --- package cowsultants.itracker.web.util; import javax.servlet.ServletContext; import org.springframework.web.context.WebApplicationContext; import cowsultants.itracker.ejb.beans.session.ITrackerServices; /** * Gets access to ITracker services layer from a servlet context * Since actions already have it done in the top level ITrackerAction, this is mostly * to be used in JSPs. * TODO In fact this shouldn't be needed, ITracker's JSP have way too much java code * * @author ricardo * */ public class ServletContextUtils { public static ITrackerServices getItrackerServices(ServletContext servletContext) { WebApplicationContext wac = org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); ITrackerServices itrackerServices = (ITrackerServices) wac.getBean("itrackerServices"); return itrackerServices; } } |
From: Marc B. <mb...@us...> - 2005-10-25 21:43:27
|
Update of /cvsroot/itracker/itracker/src/cowsultants/itracker/ejb/beans/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3937 Modified Files: Tag: itrackerhibernate ProjectFactory.java Log Message: ProjectFactory extends BaseFactory now Index: ProjectFactory.java =================================================================== RCS file: /cvsroot/itracker/itracker/src/cowsultants/itracker/ejb/beans/session/Attic/ProjectFactory.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** ProjectFactory.java 11 Oct 2005 01:36:08 -0000 1.1.2.1 --- ProjectFactory.java 25 Oct 2005 21:43:19 -0000 1.1.2.2 *************** *** 5,9 **** import cowsultants.itracker.ejb.beans.entity.ProjectBean; ! public interface ProjectFactory { public ProjectBean findByPrimaryKey(Integer projectId) throws DataException; --- 5,9 ---- import cowsultants.itracker.ejb.beans.entity.ProjectBean; ! public interface ProjectFactory extends BaseFactory { public ProjectBean findByPrimaryKey(Integer projectId) throws DataException; |
From: Marc B. <mb...@us...> - 2005-10-25 21:42:08
|
Update of /cvsroot/itracker/itracker/src/cowsultants/itracker/ejb/beans/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3605 Modified Files: Tag: itrackerhibernate ProjectFactoryImpl.java Log Message: extending BaseHibernateFactoryImpl enables saving a Project Index: ProjectFactoryImpl.java =================================================================== RCS file: /cvsroot/itracker/itracker/src/cowsultants/itracker/ejb/beans/session/Attic/ProjectFactoryImpl.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** ProjectFactoryImpl.java 11 Oct 2005 01:36:08 -0000 1.1.2.1 --- ProjectFactoryImpl.java 25 Oct 2005 21:41:58 -0000 1.1.2.2 *************** *** 10,14 **** import cowsultants.itracker.ejb.beans.entity.ProjectBean; ! public class ProjectFactoryImpl extends HibernateDaoSupport implements ProjectFactory { public ProjectBean findByPrimaryKey(Integer projectId) throws DataException { --- 10,14 ---- import cowsultants.itracker.ejb.beans.entity.ProjectBean; ! public class ProjectFactoryImpl extends BaseHibernateFactoryImpl implements ProjectFactory { public ProjectBean findByPrimaryKey(Integer projectId) throws DataException { |
From: Marky G. <mar...@us...> - 2005-10-25 09:44:46
|
Update of /cvsroot/itracker/itracker/web/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1943/web/includes Removed Files: Tag: itrackerhibernate header_minimal.jsp Log Message: removed header minimal --- header_minimal.jsp DELETED --- |
From: Marky G. <mar...@us...> - 2005-10-25 09:44:18
|
Update of /cvsroot/itracker/itracker/web/WEB-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1855/web/WEB-INF Modified Files: Tag: itrackerhibernate struts-config.xml Log Message: introduced new actions to convert to a more proper mvc model, where no links should point to jsp pages directly. all links should point to the controller .do Index: struts-config.xml =================================================================== RCS file: /cvsroot/itracker/itracker/web/WEB-INF/Attic/struts-config.xml,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** struts-config.xml 11 Oct 2005 01:43:47 -0000 1.1.2.1 --- struts-config.xml 25 Oct 2005 09:44:09 -0000 1.1.2.2 *************** *** 194,201 **** <forward name="error" path="/error.jsp"/> <forward name="forgotpassword" path="/forgot_password.jsp"/> ! <forward name="help" path="/help.jsp"/> <forward name="index" path="/index.jsp"/> <forward name="listissues" path="/list_issues.jsp"/> ! <forward name="listprojects" path="/list_projects.jsp"/> <forward name="listreports" path="/list_reports.jsp"/> <forward name="logoff" path="/logoff.do"/> --- 194,201 ---- <forward name="error" path="/error.jsp"/> <forward name="forgotpassword" path="/forgot_password.jsp"/> ! <forward name="help" path="/help/show_help.jsp"/> <forward name="index" path="/index.jsp"/> <forward name="listissues" path="/list_issues.jsp"/> ! <forward name="listprojects" path="/listprojectsaction.do"/> <forward name="listreports" path="/list_reports.jsp"/> <forward name="logoff" path="/logoff.do"/> *************** *** 232,246 **** <action-mappings> <action path="/assignissue" type="cowsultants.itracker.web.actions.AssignIssueAction" name="assignIssueForm" scope="request" input="/index.jsp"/> <action path="/addissuerelation" type="cowsultants.itracker.web.actions.AddIssueRelationAction" name="issueRelationForm" scope="request"> ! <forward name="index" path="/index.jsp" redirect="true"/> ! <forward name="editissue" path="/editissueform.do" redirect="true"/> ! <forward name="viewissue" path="/view_issue.jsp" redirect="true"/> </action> <action path="/createissue" type="cowsultants.itracker.web.actions.CreateIssueAction" name="issueForm" scope="request" input="/create_issue.jsp"> ! <forward name="listissues" path="/list_issues.jsp" redirect="true"/> </action> <action path="/createissueform" type="cowsultants.itracker.web.actions.CreateIssueFormAction" --- 232,247 ---- <action-mappings> + <action path="/adminlistprojects" forward="/admin/list_projects.jsp"/> <action path="/assignissue" type="cowsultants.itracker.web.actions.AssignIssueAction" name="assignIssueForm" scope="request" input="/index.jsp"/> <action path="/addissuerelation" type="cowsultants.itracker.web.actions.AddIssueRelationAction" name="issueRelationForm" scope="request"> ! <forward name="index" path="/index.jsp" redirect="true"/> ! <forward name="editissue" path="/editissueform.do" redirect="true"/> ! <forward name="viewissue" path="/view_issue.jsp" redirect="true"/> </action> <action path="/createissue" type="cowsultants.itracker.web.actions.CreateIssueAction" name="issueForm" scope="request" input="/create_issue.jsp"> ! <forward name="listissues" path="/list_issues.jsp" redirect="true"/> </action> <action path="/createissueform" type="cowsultants.itracker.web.actions.CreateIssueFormAction" *************** *** 248,257 **** <action path="/displayreport" type="cowsultants.itracker.web.actions.DisplayReportAction" name="displayReportForm" scope="request" input="/search_issues.jsp"> ! <forward name="imagesurl" path="/servlets/ReportChartController"/> </action> <action path="/editissue" type="cowsultants.itracker.web.actions.EditIssueAction" name="issueForm" scope="request" input="/edit_issue.jsp"> ! <forward name="index" path="/index.jsp" redirect="true"/> ! <forward name="listissues" path="/list_issues.jsp" redirect="true"/> </action> <action path="/editissueform" type="cowsultants.itracker.web.actions.EditIssueFormAction" --- 249,258 ---- <action path="/displayreport" type="cowsultants.itracker.web.actions.DisplayReportAction" name="displayReportForm" scope="request" input="/search_issues.jsp"> ! <forward name="imagesurl" path="/servlets/ReportChartController"/> </action> <action path="/editissue" type="cowsultants.itracker.web.actions.EditIssueAction" name="issueForm" scope="request" input="/edit_issue.jsp"> ! <forward name="index" path="/index.jsp" redirect="true"/> ! <forward name="listissues" path="/list_issues.jsp" redirect="true"/> </action> <action path="/editissueform" type="cowsultants.itracker.web.actions.EditIssueFormAction" *************** *** 265,269 **** <action path="/login" type="cowsultants.itracker.web.actions.LoginAction" name="loginForm" scope="request" input="/login.jsp"> ! <forward name="index" path="/index.jsp" redirect="true"/> </action> <action path="/loginauto" type="cowsultants.itracker.web.actions.LoginAction" --- 266,270 ---- <action path="/login" type="cowsultants.itracker.web.actions.LoginAction" name="loginForm" scope="request" input="/login.jsp"> ! <forward name="index" path="/index.jsp" redirect="true"/> </action> <action path="/loginauto" type="cowsultants.itracker.web.actions.LoginAction" *************** *** 272,278 **** <action path="/moveissue" type="cowsultants.itracker.web.actions.MoveIssueAction" name="moveIssueForm" scope="request" input="/move_issue.jsp"> ! <forward name="index" path="/index.jsp" redirect="true"/> ! <forward name="editissue" path="/editissueform.do" redirect="true"/> ! <forward name="viewissue" path="/view_issue.jsp" redirect="true"/> </action> <action path="/moveissueform" type="cowsultants.itracker.web.actions.MoveIssueFormAction" --- 273,279 ---- <action path="/moveissue" type="cowsultants.itracker.web.actions.MoveIssueAction" name="moveIssueForm" scope="request" input="/move_issue.jsp"> ! <forward name="index" path="/index.jsp" redirect="true"/> ! <forward name="editissue" path="/editissueform.do" redirect="true"/> ! <forward name="viewissue" path="/view_issue.jsp" redirect="true"/> </action> <action path="/moveissueform" type="cowsultants.itracker.web.actions.MoveIssueFormAction" *************** *** 288,292 **** <action path="/watchissue" type="cowsultants.itracker.web.actions.WatchIssueAction" name="watchIssueForm" scope="request" input="/index.jsp" validate="false"/> - <action path="/createlanguagekey" type="cowsultants.itracker.web.actions.CreateLanguageKeyAction" name="languageForm" scope="request" input="/admin/create_language_key.jsp"/> --- 289,292 ---- *************** *** 369,373 **** <action path="/unlockuser" type="cowsultants.itracker.web.actions.UnlockUserAction" name="adminActionForm" scope="request" input="/admin/list_users.jsp"/> - <action path="/importdata" type="cowsultants.itracker.web.actions.ImportDataFormAction" name="importForm" scope="request" input="/admin/import_data.jsp" validate="false"> --- 369,372 ---- *************** *** 375,382 **** <action path="/importdataverify" type="cowsultants.itracker.web.actions.ImportDataVerifyAction" name="importForm" scope="request" input="/admin/import_data.jsp" validate="true"> ! <forward name="importdataverify" path="/admin/import_data_verify.jsp"/> </action> <action path="/importdataprocess" type="cowsultants.itracker.web.actions.ImportDataProcessAction" name="adminActionForm" scope="request" input="/admin/import_data_verify.jsp" validate="false"/> </action-mappings> --- 374,382 ---- <action path="/importdataverify" type="cowsultants.itracker.web.actions.ImportDataVerifyAction" name="importForm" scope="request" input="/admin/import_data.jsp" validate="true"> ! <forward name="importdataverify" path="/admin/import_data_verify.jsp"/> </action> <action path="/importdataprocess" type="cowsultants.itracker.web.actions.ImportDataProcessAction" name="adminActionForm" scope="request" input="/admin/import_data_verify.jsp" validate="false"/> + <action path="/listprojectsaction" forward="/list_projects.jsp"/> </action-mappings> |
From: Marky G. <mar...@us...> - 2005-10-25 09:43:15
|
Update of /cvsroot/itracker/itracker/web/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1703/web/includes Modified Files: Tag: itrackerhibernate footer.jsp header.jsp Log Message: little corrections in jsp Index: header.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/includes/header.jsp,v retrieving revision 1.26.4.4 retrieving revision 1.26.4.5 diff -C2 -d -r1.26.4.4 -r1.26.4.5 *** header.jsp 23 Oct 2005 14:27:45 -0000 1.26.4.4 --- header.jsp 25 Oct 2005 09:43:06 -0000 1.26.4.5 *************** *** 89,93 **** <% } else if(UserUtilities.hasPermission(currPermissions, UserUtilities.PERMISSION_PRODUCT_ADMIN)) { %> | ! <html:link page="/admin/list_projects.jsp" styleClass="headerLinks" titleKey="itracker.web.header.menu.projectadmin.alt"> <it:message key="itracker.web.header.menu.projectadmin"/></html:link> <% } %> --- 89,93 ---- <% } else if(UserUtilities.hasPermission(currPermissions, UserUtilities.PERMISSION_PRODUCT_ADMIN)) { %> | ! <html:link page="/adminlistprojects.do" styleClass="headerLinks" titleKey="itracker.web.header.menu.projectadmin.alt"> <it:message key="itracker.web.header.menu.projectadmin"/></html:link> <% } %> Index: footer.jsp =================================================================== RCS file: /cvsroot/itracker/itracker/web/includes/footer.jsp,v retrieving revision 1.7.4.1 retrieving revision 1.7.4.2 diff -C2 -d -r1.7.4.1 -r1.7.4.2 *** footer.jsp 11 Oct 2005 01:21:06 -0000 1.7.4.1 --- footer.jsp 25 Oct 2005 09:43:06 -0000 1.7.4.2 *************** *** 6,11 **** <tr> <td align="left" width="50%" style="text-align: left;"> ! <it:message key="itracker.web.attr.copyright"/> 2002, 2003, 2004 by Jason Carroll</a> ! </td> <td align="right" width="50%" style="text-align: right;"> <% java.util.Date currentDate = new java.util.Date(); %> --- 6,12 ---- <tr> <td align="left" width="50%" style="text-align: left;"> ! <it:message key="itracker.web.attr.copyright"/> 2002, 2003, 2004 by Jason Carroll</a>, ! 2005 by itracker.org ! </td> <td align="right" width="50%" style="text-align: right;"> <% java.util.Date currentDate = new java.util.Date(); %> |
From: Marky G. <mar...@us...> - 2005-10-25 09:42:34
|
Update of /cvsroot/itracker/itracker/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1520/src Modified Files: Tag: itrackerhibernate itrackerApplication.properties Log Message: setting it to default en_us language, thanks ricardo. Index: itrackerApplication.properties =================================================================== RCS file: /cvsroot/itracker/itracker/src/Attic/itrackerApplication.properties,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** itrackerApplication.properties 21 Oct 2005 11:14:40 -0000 1.1.2.3 --- itrackerApplication.properties 25 Oct 2005 09:42:24 -0000 1.1.2.4 *************** *** 27,31 **** # page before they are logged in. This MUST be in the format # language_country (eg. en_US, de_DE, pt_PT, it_IT) ! default_locale=pt_PT # Set to true to create a default admin user if no other users exist in the --- 27,31 ---- # page before they are logged in. This MUST be in the format # language_country (eg. en_US, de_DE, pt_PT, it_IT) ! default_locale=en_US # Set to true to create a default admin user if no other users exist in the |
From: Ricardo T. <rj...@us...> - 2005-10-24 23:26:03
|
Update of /cvsroot/itracker/itracker/src/cowsultants/itracker/web/servlets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13361/cowsultants/itracker/web/servlets Modified Files: Tag: itrackerhibernate ApplicationInitialization.java Log Message: languages are now initialized if they aren't up to date (and aren't if they are up to date) configuration items can now be added and deleted (needed for smart language updates) Index: ApplicationInitialization.java =================================================================== RCS file: /cvsroot/itracker/itracker/src/cowsultants/itracker/web/servlets/ApplicationInitialization.java,v retrieving revision 1.31.4.4 retrieving revision 1.31.4.5 diff -C2 -d -r1.31.4.4 -r1.31.4.5 *** ApplicationInitialization.java 21 Oct 2005 11:14:28 -0000 1.31.4.4 --- ApplicationInitialization.java 24 Oct 2005 23:25:50 -0000 1.31.4.5 *************** *** 85,90 **** Logger.logInfo("Checking and initializing languages in the database."); SystemConfigurationUtilities.initializeAllLanguages(sc, false); - // SystemConfigurationUtilities.initializeAllLanguages(sc, true); // - // TMP CHANGE BY RJST Logger.logInfo("Checking and initializing default system configuration in the database."); --- 85,88 ---- |
From: Ricardo T. <rj...@us...> - 2005-10-24 23:26:03
|
Update of /cvsroot/itracker/itracker/src/cowsultants/itracker/ejb/beans/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13361/cowsultants/itracker/ejb/beans/session Modified Files: Tag: itrackerhibernate BaseFactory.java BaseHibernateFactoryImpl.java ConfigurationFactory.java ConfigurationFactoryImpl.java SystemConfigurationBean.java Log Message: languages are now initialized if they aren't up to date (and aren't if they are up to date) configuration items can now be added and deleted (needed for smart language updates) Index: BaseHibernateFactoryImpl.java =================================================================== RCS file: /cvsroot/itracker/itracker/src/cowsultants/itracker/ejb/beans/session/Attic/BaseHibernateFactoryImpl.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** BaseHibernateFactoryImpl.java 23 Oct 2005 15:33:52 -0000 1.1.2.2 --- BaseHibernateFactoryImpl.java 24 Oct 2005 23:25:50 -0000 1.1.2.3 *************** *** 5,8 **** --- 5,9 ---- import net.sf.hibernate.HibernateException; + import org.springframework.dao.DataAccessResourceFailureException; import org.springframework.orm.hibernate.support.HibernateDaoSupport; *************** *** 44,46 **** --- 45,59 ---- } + public void delete(Object object) throws DataException { + try { + getSession().delete(object); + } catch (DataAccessResourceFailureException e) { + throw new DataException(e); + } catch (HibernateException e) { + throw new DataException(e); + } catch (IllegalStateException e) { + throw new DataException(e); + } + } + } Index: ConfigurationFactoryImpl.java =================================================================== RCS file: /cvsroot/itracker/itracker/src/cowsultants/itracker/ejb/beans/session/Attic/ConfigurationFactoryImpl.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** ConfigurationFactoryImpl.java 11 Oct 2005 01:36:08 -0000 1.1.2.1 --- ConfigurationFactoryImpl.java 24 Oct 2005 23:25:50 -0000 1.1.2.2 *************** *** 6,15 **** import net.sf.hibernate.HibernateException; import net.sf.hibernate.expression.Expression; - - import org.springframework.orm.hibernate.support.HibernateDaoSupport; - import cowsultants.itracker.ejb.beans.entity.ConfigurationBean; ! public class ConfigurationFactoryImpl extends HibernateDaoSupport implements ConfigurationFactory { /* (non-Javadoc) --- 6,12 ---- import net.sf.hibernate.HibernateException; import net.sf.hibernate.expression.Expression; import cowsultants.itracker.ejb.beans.entity.ConfigurationBean; ! public class ConfigurationFactoryImpl extends BaseHibernateFactoryImpl implements ConfigurationFactory { /* (non-Javadoc) Index: ConfigurationFactory.java =================================================================== RCS file: /cvsroot/itracker/itracker/src/cowsultants/itracker/ejb/beans/session/Attic/ConfigurationFactory.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** ConfigurationFactory.java 11 Oct 2005 01:36:08 -0000 1.1.2.1 --- ConfigurationFactory.java 24 Oct 2005 23:25:50 -0000 1.1.2.2 *************** *** 5,9 **** import cowsultants.itracker.ejb.beans.entity.ConfigurationBean; ! public interface ConfigurationFactory { public abstract ConfigurationBean findByPrimaryKey(Integer id); --- 5,9 ---- import cowsultants.itracker.ejb.beans.entity.ConfigurationBean; ! public interface ConfigurationFactory extends BaseFactory { public abstract ConfigurationBean findByPrimaryKey(Integer id); Index: SystemConfigurationBean.java =================================================================== RCS file: /cvsroot/itracker/itracker/src/cowsultants/itracker/ejb/beans/session/SystemConfigurationBean.java,v retrieving revision 1.31.4.3 retrieving revision 1.31.4.4 diff -C2 -d -r1.31.4.3 -r1.31.4.4 *** SystemConfigurationBean.java 22 Oct 2005 16:37:28 -0000 1.31.4.3 --- SystemConfigurationBean.java 24 Oct 2005 23:25:50 -0000 1.31.4.4 *************** *** 1 **** ! /* * This software was designed and created by Jason Carroll. * Copyright (c) 2002, 2003, 2004 Jason Carroll. * The author can be reached at jca...@co... * ITracker website: http://www.cowsultants.com * ITracker forums: http://www.cowsultants.com/phpBB/index.php * * This program is free software; you can redistribute it and/or modify * it only under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ package cowsultants.itracker.ejb.beans.session; import java.sql.Timestamp; import java.util.Arrays; import java.util.Date; import java.util.Collection; import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.Locale; import java.util.Properties; import java.util.Vector; import javax.naming.InitialContext; import cowsultants.itracker.ejb.beans.entity.ConfigurationBean; import cowsultants.itracker.ejb.beans.entity.CustomFieldBean; import cowsultants.itracker.ejb.beans.entity.CustomFieldValueBean; import cowsultants.itracker.ejb.beans.entity.LanguageBean; import cowsultants.itracker.ejb.beans.entity.WorkflowScriptBean; import cowsultants.itracker.ejb.client.exceptions.SystemConfigurationException; import cowsultants.itracker.ejb.client.interfaces.SystemConfiguration; import cowsultants.itracker.ejb.client.models.ConfigurationModel; import cowsultants.itracker.ejb.client.models.CustomFieldModel; import cowsultants.itracker.ejb.client.models.CustomFieldValueModel; import cowsultants.itracker.ejb.client.models.LanguageModel; import cowsultants.itracker.ejb.client.models.NameValuePairModel; import cowsultants.itracker.ejb.client.models.SystemConfigurationModel; import cowsultants.itracker.ejb.client.models.WorkflowScriptModel; import cowsultants.itracker.ejb.client.resources.ITrackerResources; import cowsultants.itracker.ejb.client.util.IssueUtilities; import cowsultants.itracker.ejb.client.util.Logger; import cowsultants.itracker.ejb.client.util.SystemConfigurationUtilities; import cowsultants.itracker.ejb.util.PropertiesFileHandler; /** * * Implimetation of the SystemConfiguration Interface. * * @see SystemConfiguration * */ public class SystemConfigurationBean implements SystemConfiguration { private static Properties props = null; InitialContext ic = null; ConfigurationFactory cHome = null; CustomFieldFactory cfHome = null; CustomFieldValueFactory cfvHome = null; LanguageFactory lHome = null; WorkflowScriptFactory wsHome = null; public SystemConfigurationBean() { if (props == null) { props = new Properties(); // try { // ic = new InitialContext(); // NamingEnumeration bindings = ic.listBindings("java:comp/env"); // while(bindings.hasMoreElements()) { // try { // Binding namePair = (Binding) bindings.nextElement(); // Logger.logDebug("Setting property " + namePair.getName() + " from // env-entry to value '" + ((Object) // namePair.getObject()).toString() + "'"); // props.setProperty(namePair.getName(), ((Object) // namePair.getObject()).toString()); // } catch(ClassCastException cce) { // Logger.logError("ClassCastException while loading application // properties.", cce); // } // } // } catch(NamingException ne) { // Logger.logError("NamingException while loading application // properties.", ne); // } PropertiesFileHandler filePropertiesHandler = new PropertiesFileHandler(); filePropertiesHandler.addProperties("/itrackerApplication.properties"); filePropertiesHandler.addProperties("/itrackerVersion.properties"); Properties fileProps = filePropertiesHandler.getProperties(); for (Enumeration e = fileProps.propertyNames(); e.hasMoreElements();) { String propName = (String) e.nextElement(); Logger.logDebug("Setting property " + propName + " from file to value '" + fileProps.getProperty(propName) + "'"); props.setProperty(propName, fileProps.getProperty(propName)); } props.setProperty("start_time_millis", Long.toString(new java.util.Date().getTime())); /* * try { * * InitialContext ic = new InitialContext(); * * try { * * DataSource ds = (DataSource) * ic.lookup(props.getProperty("default_ds", * SystemConfigurationUtilities.DEFAULT_DATASOURCE)); * } catch(NamingException testne) { * * DataSource ds = (DataSource) ic.lookup("java:/" + * props.getProperty("default_ds")); * * props.setProperty("default_ds", "java:/" + * props.getProperty("default_ds")); * * Logger.logWarn("Error in datasource, changed to '" + * props.getProperty("default_ds") + "'"); * } * } catch(NamingException ne) { * * Logger.logError("NamingException while checking DataSource.", * ne); * } */ } // initialize Factories... cHome = SpringFactories.getConfigurationFactory(); lHome = SpringFactories.getLanguageFactory(); cfHome = SpringFactories.getCustomFieldFactory(); wsHome = SpringFactories.getWorkflowScriptFactory(); } public String getProperty(String name) { return props.getProperty(name); } public String getProperty(String name, String defaultValue) { return props.getProperty(name, defaultValue); } public boolean getBooleanProperty(String name, boolean defaultValue) { String value = props.getProperty(name); return (value == null ? defaultValue : new Boolean(value).booleanValue()); } public int getIntegerProperty(String name, int defaultValue) { String value = props.getProperty(name); try { return (value == null ? defaultValue : Integer.parseInt(value)); } catch (NumberFormatException nfe) { return defaultValue; } } public long getLongProperty(String name, long defaultValue) { String value = props.getProperty(name); try { return (value == null ? defaultValue : Long.parseLong(value)); } catch (NumberFormatException nfe) { return defaultValue; } } public Properties getProperties() { return props; } public ConfigurationModel getConfigurationItem(Integer id) { ConfigurationBean configItem = cHome.findByPrimaryKey(id); return configItem.getModel(); } public ConfigurationModel[] getConfigurationItemsByType(int type) throws DataException { ConfigurationModel[] items = new ConfigurationModel[0]; Collection configItems = cHome.findByType(type); items = new ConfigurationModel[configItems.size()]; int i = 0; for (Iterator iter = configItems.iterator(); iter.hasNext(); i++) { items[i] = ((ConfigurationBean) iter.next()).getModel(); } Arrays.sort(items, new ConfigurationModel()); return items; } public ConfigurationModel[] getConfigurationItemsByType(int type, Locale locale) throws DataException { ConfigurationModel[] items = getConfigurationItemsByType(type); for (int i = 0; i < items.length; i++) { if (items[i].getType() == SystemConfigurationUtilities.TYPE_STATUS) { items[i].setName(IssueUtilities.getStatusName(items[i].getValue(), locale)); } else if (items[i].getType() == SystemConfigurationUtilities.TYPE_SEVERITY) { items[i].setName(IssueUtilities.getSeverityName(items[i].getValue(), locale)); } else if (items[i].getType() == SystemConfigurationUtilities.TYPE_RESOLUTION) { items[i].setName(IssueUtilities.getResolutionName(items[i].getValue(), locale)); } } return items; } public ConfigurationModel createConfigurationItem(ConfigurationModel model) { ConfigurationBean configurationItem = new ConfigurationBean(); configurationItem.setModel(model); return configurationItem.getModel(); // Logger.logDebug("Unable to create new configuration item."); } public ConfigurationModel updateConfigurationItem(ConfigurationModel model) { if (model != null) { ConfigurationBean configurationItem = cHome.findByPrimaryKey(model.getId()); configurationItem.setModel(model); return configurationItem.getModel(); } return (null); } public ConfigurationModel[] updateConfigurationItems(ConfigurationModel[] models, int type) throws DataException { removeConfigurationItems(type); for (int i = 0; i < models.length; i++) { ConfigurationBean configurationItem = new ConfigurationBean(); configurationItem.setModel(models[i]); models[i] = configurationItem.getModel(); } Arrays.sort(models, new ConfigurationModel()); return models; // Logger.logDebug("Unable to create new language item."); // return new ConfigurationModel[0]; } public void removeConfigurationItem(Integer id) { // cHome.remove(id); // Logger.logDebug("Unable to remove configuration item " + id + "."); } public void removeConfigurationItems(int type) throws DataException { Collection currentItems = cHome.findByType(type); for (Iterator iter = currentItems.iterator(); iter.hasNext();) { ConfigurationBean config = (ConfigurationBean) iter.next(); // config.remove(); } } public void removeConfigurationItems(ConfigurationModel model) throws DataException { Vector currentIds = new Vector(); Collection currentItems = cHome.findByTypeAndValue(model.getType(), model.getValue()); for (Iterator iter = currentItems.iterator(); iter.hasNext();) { // ((ConfigurationBean) iter.next()).remove(); } } public boolean configurationItemExists(ConfigurationModel model) throws DataException { if (model != null && model.getVersion() != null) { Collection configItems = cHome.findByTypeAndValue(model.getType(), model.getValue()); if (configItems != null && configItems.size() > 0) { return true; } } return false; } public boolean configurationItemUpToDate(ConfigurationModel model) throws DataException { long currentVersion = 0; if (model != null && model.getVersion() != null) { Collection configItems = cHome.findByTypeAndValue(model.getType(), model.getValue()); for (Iterator iter = configItems.iterator(); iter.hasNext();) { ConfigurationBean configItem = (ConfigurationBean) iter.next(); if (configItem != null) { currentVersion = Math.max(SystemConfigurationUtilities.getVersionAsLong(configItem.getVersion()), currentVersion); } } if (currentVersion >= SystemConfigurationUtilities.getVersionAsLong(model.getVersion())) { return true; } } return false; } public void resetConfigurationCache() throws DataException { IssueUtilities.setResolutions(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION)); IssueUtilities.setSeverities(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY)); IssueUtilities.setStatuses(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS)); IssueUtilities.setCustomFields(getCustomFields()); } public void resetConfigurationCache(int type) throws DataException { if (type == SystemConfigurationUtilities.TYPE_RESOLUTION) { IssueUtilities.setResolutions(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION)); } else if (type == SystemConfigurationUtilities.TYPE_SEVERITY) { IssueUtilities.setSeverities(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY)); } else if (type == SystemConfigurationUtilities.TYPE_STATUS) { IssueUtilities.setStatuses(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS)); } else if (type == SystemConfigurationUtilities.TYPE_CUSTOMFIELD) { IssueUtilities.setCustomFields(getCustomFields()); } } public WorkflowScriptModel getWorkflowScript(Integer id) { WorkflowScriptBean workflowScript = wsHome.findByPrimaryKey(id); return workflowScript.getModel(); } public WorkflowScriptModel[] getWorkflowScripts() { WorkflowScriptModel[] scripts = new WorkflowScriptModel[0]; Collection workflowScripts = wsHome.findAll(); scripts = new WorkflowScriptModel[workflowScripts.size()]; int i = 0; for (Iterator iter = workflowScripts.iterator(); iter.hasNext(); i++) { scripts[i] = ((WorkflowScriptBean) iter.next()).getModel(); } return scripts; } public WorkflowScriptModel createWorkflowScript(WorkflowScriptModel model) { // try { WorkflowScriptBean workflowScript = new WorkflowScriptBean(); workflowScript.setModel(model); model.setId(workflowScript.getId()); return workflowScript.getModel(); // } catch(CreateException ce) { // Logger.logDebug("Unable to create new workflow script.", ce); // } // return null; } public WorkflowScriptModel updateWorkflowScript(WorkflowScriptModel model) { if (model != null) { WorkflowScriptBean workflowScript = wsHome.findByPrimaryKey(model.getId()); workflowScript.setModel(model); return workflowScript.getModel(); } return null; } public CustomFieldModel getCustomField(Integer id) throws DataException { CustomFieldBean customField = cfHome.findByPrimaryKey(id); return customField.getModel(); } public CustomFieldModel[] getCustomFields() throws DataException { CustomFieldModel[] fields = new CustomFieldModel[0]; Collection customFields = cfHome.findAll(); fields = new CustomFieldModel[customFields.size()]; int i = 0; for (Iterator iter = customFields.iterator(); iter.hasNext(); i++) { fields[i] = ((CustomFieldBean) iter.next()).getModel(); } return fields; } public CustomFieldModel[] getCustomFields(Locale locale) throws DataException { CustomFieldModel[] fields = getCustomFields(); for (int i = 0; i < fields.length; i++) { fields[i].setLabels(locale); } return fields; } public CustomFieldModel createCustomField(CustomFieldModel model) throws DataException { CustomFieldBean customField = new CustomFieldBean(); customField.setModel(model); model.setId(customField.getId()); if (model.getOptions().length > 0) { removeCustomFieldValues(customField.getId()); CustomFieldValueModel[] newOptions = model.getOptions(); for (int i = 0; i < newOptions.length; i++) { newOptions[i].setCustomFieldId(customField.getId()); createCustomFieldValue(newOptions[i]); } } return customField.getModel(); // Logger.logDebug("Unable to create new custom field.", ce); } public CustomFieldModel updateCustomField(CustomFieldModel model) throws DataException { if (model != null) { CustomFieldBean customField = cfHome.findByPrimaryKey(model.getId()); customField.setModel(model); if (model.getOptions().length > 0) { removeCustomFieldValues(customField.getId()); CustomFieldValueModel[] newOptions = model.getOptions(); for (int i = 0; i < newOptions.length; i++) { createCustomFieldValue(newOptions[i]); } } return customField.getModel(); } return null; } public void removeCustomField(Integer customFieldId) throws DataException { CustomFieldBean customField = cfHome.findByPrimaryKey(customFieldId); // customField.remove(); } public CustomFieldValueModel getCustomFieldValue(Integer id) { // CustomFieldValueBean customFieldValue = cfvHome.findByPrimaryKey(id); // return customFieldValue.getModel(); return (null); } public CustomFieldValueModel createCustomFieldValue(CustomFieldValueModel model) throws DataException { if (model == null || model.getCustomFieldId() == null) { return null; } CustomFieldBean customField = cfHome.findByPrimaryKey(model.getCustomFieldId()); CustomFieldValueBean customFieldValue = new CustomFieldValueBean(); customFieldValue.setModel(model); customFieldValue.setCustomField(customField); return customFieldValue.getModel(); // Logger.logDebug("Unable to create new custom field value: " + // ce.getMessage()); // Logger.logDebug("Unable to create new custom field value, custom // field not found: " + fe.getMessage()); } public CustomFieldValueModel updateCustomFieldValue(CustomFieldValueModel model) { // if(model != null) { // CustomFieldValueBean customFieldValue = // cfvHome.findByPrimaryKey(model.getId()); // customFieldValue.setModel(model); // return customFieldValue.getModel(); // } return null; } public CustomFieldValueModel[] updateCustomFieldValues(Integer customFieldId, CustomFieldValueModel[] models) throws DataException { CustomFieldValueModel[] values = new CustomFieldValueModel[0]; if (customFieldId != null) { CustomFieldBean customField = cfHome.findByPrimaryKey(customFieldId); Collection currValues = customField.getValues(); for (Iterator iter = currValues.iterator(); iter.hasNext();) { if (models == null || models.length == 0) { // ((CustomFieldValueBean) iter.next()).remove(); } else { CustomFieldValueBean value = (CustomFieldValueBean) iter.next(); for (int i = 0; i < models.length; i++) { if (value.getId().equals(models[i].getId())) { value.setModel(models[i]); models[i] = value.getModel(); break; } } } } } Arrays.sort(models, new CustomFieldValueModel()); return models; } public void removeCustomFieldValue(Integer customFieldValueId) { // CustomFieldValueBean customFieldValue = // cfvHome.findByPrimaryKey(customFieldValueId); // customFieldValue.remove(); } public void removeCustomFieldValues(Integer customFieldId) { // Collection currentValues = cfvHome.findByCustomField(customFieldId); // for(Iterator iter = currentValues.iterator(); iter.hasNext(); ) { // // //((CustomFieldValueBean) iter.next()).remove(); // } } public LanguageModel getLanguageItemByKey(String key, Locale locale) throws DataException { LanguageModel model = null; if (key != null) { LanguageBean languageItem = lHome.findByKeyAndLocale(key, ITrackerResources.BASE_LOCALE); model = languageItem.getModel(); if (locale != null && !"".equals(locale.getLanguage())) { languageItem = lHome.findByKeyAndLocale(key, locale.getLanguage()); model = languageItem.getModel(); if (!"".equals(locale.getCountry())) { languageItem = lHome.findByKeyAndLocale(key, locale.toString()); model = languageItem.getModel(); } } } return model; } public LanguageModel[] getLanguageItemsByKey(String key) throws DataException { LanguageModel[] items = new LanguageModel[0]; Collection languageItems = lHome.findByKey(key); items = new LanguageModel[languageItems.size()]; int i = 0; for (Iterator iter = languageItems.iterator(); iter.hasNext(); i++) { items[i] = ((LanguageBean) iter.next()).getModel(); } return items; } public LanguageModel updateLanguageItem(LanguageModel model) throws DataException { LanguageBean languageItem; try { languageItem = lHome.findByKeyAndLocale(model.getResourceKey(), model.getLocale()); languageItem.setModel(model); } catch (NoSuchEntityException fe) { languageItem = new LanguageBean(); languageItem.setCreateDate(new Timestamp(new Date().getTime())); languageItem.setModel(model); lHome.saveOrUpdate(languageItem); } return languageItem.getModel(); } public void removeLanguageKey(String key) throws DataException { Vector currentIds = new Vector(); Collection languageItems = lHome.findByKey(key); for (Iterator iter = languageItems.iterator(); iter.hasNext();) { currentIds.add(((LanguageBean) iter.next()).getId()); } for (int i = 0; i < currentIds.size(); i++) { // lHome.remove((Integer) currentIds.elementAt(i)); } // } catch(FinderException ce) { // Logger.logDebug("Unable to find any language items with key" + key + // " for removal."); // } } public void removeLanguageItem(LanguageModel model) throws DataException { LanguageBean languageItem = lHome.findByKeyAndLocale(model.getResourceKey(), model.getLocale()); // lHome.remove(languageItem.getId()); // Logger.logDebug("Unable to remove language item " + model.toString() // + "."); } public String[] getSortedKeys() throws DataException { String[] sortedKeys = new String[0]; int i = 0; Collection items = lHome.findByLocale(ITrackerResources.BASE_LOCALE); sortedKeys = new String[items.size()]; for (Iterator iter = items.iterator(); iter.hasNext(); i++) { LanguageBean item = (LanguageBean) iter.next(); sortedKeys[i] = item.getResourceKey(); } // Now sort the list of keys in a logical manner Arrays.sort(sortedKeys); return sortedKeys; } public HashMap getDefinedKeys(String locale) throws DataException { HashMap keys = new HashMap(); if (locale == null || locale.equals("")) { locale = ITrackerResources.BASE_LOCALE; } Collection items = lHome.findByLocale(locale); for (Iterator iter = items.iterator(); iter.hasNext();) { LanguageBean item = (LanguageBean) iter.next(); keys.put(item.getResourceKey(), item.getResourceValue()); } return keys; } public NameValuePairModel[] getDefinedKeysAsArray(String locale) throws DataException { NameValuePairModel[] keys = new NameValuePairModel[0]; if (locale == null || locale.equals("")) { locale = ITrackerResources.BASE_LOCALE; } int i = 0; Collection items = lHome.findByLocale(locale); keys = new NameValuePairModel[items.size()]; for (Iterator iter = items.iterator(); iter.hasNext(); i++) { LanguageBean item = (LanguageBean) iter.next(); keys[i] = new NameValuePairModel(item.getResourceKey(), item.getResourceValue()); } Arrays.sort(keys, new NameValuePairModel()); return keys; } public int getNumberDefinedKeys(String locale) throws DataException { return getDefinedKeys(locale).size(); } public LanguageModel[] getLanguage(Locale locale) throws DataException { LanguageModel[] languageArray = new LanguageModel[0]; HashMap language = new HashMap(); Collection baseItems = lHome.findByLocale(ITrackerResources.BASE_LOCALE); for (Iterator iterator = baseItems.iterator(); iterator.hasNext();) { LanguageBean item = (LanguageBean) iterator.next(); language.put(item.getResourceKey(), item.getResourceValue()); } if (locale != null && !"".equals(locale.getLanguage())) { Collection languageItems = lHome.findByLocale(locale.getLanguage()); for (Iterator iterator = languageItems.iterator(); iterator.hasNext();) { LanguageBean item = (LanguageBean) iterator.next(); language.put(item.getResourceKey(), item.getResourceValue()); } if (!"".equals(locale.getCountry())) { Collection countryItems = lHome.findByLocale(locale.toString()); for (Iterator iterator = countryItems.iterator(); iterator.hasNext();) { LanguageBean item = (LanguageBean) iterator.next(); language.put(item.getResourceKey(), item.getResourceValue()); } } } languageArray = new LanguageModel[language.size()]; int i = 0; String localeString = (locale == null ? ITrackerResources.BASE_LOCALE : locale.toString()); for (Iterator iterator = language.keySet().iterator(); iterator.hasNext(); i++) { String key = (String) iterator.next(); languageArray[i] = new LanguageModel(localeString, key, (String) language.get(key)); } return languageArray; } public HashMap getAvailableLanguages() throws DataException { HashMap languages = new HashMap(); ConfigurationModel[] locales = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_LOCALE); for (int i = 0; i < locales.length; i++) { if (ITrackerResources.BASE_LOCALE.equalsIgnoreCase(locales[i].getValue())) { continue; } if (locales[i].getValue().length() == 2) { languages.put(locales[i].getValue(), new Vector()); } } for (int i = 0; i < locales.length; i++) { if (ITrackerResources.BASE_LOCALE.equalsIgnoreCase(locales[i].getValue())) { continue; } String locale = locales[i].getValue(); if (locale.length() == 5 && locale.indexOf('_') == 2) { String baseLanguage = locale.substring(0, 2); Vector languageVector = (Vector) languages.get(baseLanguage); if (languageVector != null) { languageVector.addElement(locale); } } } return languages; } public int getNumberAvailableLanguages() throws DataException { int numLanguages = 0; HashMap availableLanguages = getAvailableLanguages(); for (Iterator iter = availableLanguages.keySet().iterator(); iter.hasNext();) { Vector language = (Vector) availableLanguages.get((String) iter.next()); if (language != null && language.size() > 0) { numLanguages += language.size(); } else { numLanguages += 1; } } return numLanguages; } public void updateLanguage(Locale locale, LanguageModel[] items) throws DataException { if (locale != null && items != null) { ConfigurationModel configItem = new ConfigurationModel(SystemConfigurationUtilities.TYPE_LOCALE, locale .toString(), props.getProperty("version")); updateLanguage(locale, items, configItem); } } public void updateLanguage(Locale locale, LanguageModel[] items, ConfigurationModel configItem) throws DataException { if (items == null || locale == null || configItem == null) { return; } for (int i = 0; i < items.length; i++) { if (items[i] != null) { if (items[i].getAction() == SystemConfigurationUtilities.ACTION_REMOVE) { removeLanguageItem(items[i]); } else { updateLanguageItem(items[i]); } } } removeConfigurationItems(configItem); createConfigurationItem(configItem); } public SystemConfigurationModel getSystemConfiguration(Locale locale) throws DataException { SystemConfigurationModel config = new SystemConfigurationModel(); // Load the basic system configuration ConfigurationModel[] resolutions = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION); for (int i = 0; i < resolutions.length; i++) { resolutions[i].setName(ITrackerResources.getString(SystemConfigurationUtilities .getLanguageKey(resolutions[i]), locale)); } config.setResolutions(resolutions); ConfigurationModel[] severities = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY); for (int i = 0; i < severities.length; i++) { severities[i].setName(ITrackerResources.getString(SystemConfigurationUtilities .getLanguageKey(severities[i]), locale)); } config.setSeverities(severities); ConfigurationModel[] statuses = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS); for (int i = 0; i < statuses.length; i++) { statuses[i].setName(ITrackerResources.getString(SystemConfigurationUtilities.getLanguageKey(statuses[i]), locale)); } config.setStatuses(statuses); // Now load the CustomFields config.setCustomFields(IssueUtilities.getCustomFields(locale)); // Now set the system version config.setVersion(props.getProperty("version")); return config; } public boolean initializeLocale(String locale, boolean forceReload) throws DataException { boolean result = false; ConfigurationModel localeConfig = new ConfigurationModel(SystemConfigurationUtilities.TYPE_LOCALE, locale, props.getProperty("version")); if (!configurationItemUpToDate(localeConfig) || forceReload) { Logger.logDebug("Loading database with locale " + locale); PropertiesFileHandler localePropertiesHandler = new PropertiesFileHandler( "/cowsultants/itracker/ejb/client/resources/ITracker" + (ITrackerResources.BASE_LOCALE.equals(locale) ? "" : "_" + locale) + ".properties"); if (localePropertiesHandler.hasProperties()) { Properties localeProperties = localePropertiesHandler.getProperties(); Logger.logDebug("Locale " + locale + " contains " + localeProperties.size() + " properties."); for (Enumeration propertiesEnumeration = localeProperties.propertyNames(); propertiesEnumeration .hasMoreElements();) { String key = (String) propertiesEnumeration.nextElement(); String value = localeProperties.getProperty(key); updateLanguageItem(new LanguageModel(locale, key, value)); } removeConfigurationItems(localeConfig); createConfigurationItem(localeConfig); ITrackerResources.clearBundle(ITrackerResources.getLocale(locale)); result = true; } else { Logger.logInfo("Locale " + locale + " contained no properties."); } } return result; } public void initializeConfiguration() { // Need to eventually add in code that detects the current version of // the config and update // if necessary try { ConfigurationModel[] initialized = getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_INITIALIZED); if (initialized == null || initialized.length != 1) { Logger.logDebug("System does not appear to be initialized, initializing system configuration."); LanguageModel[] baseLanguage = getLanguage(ITrackerResources.getLocale(ITrackerResources.BASE_LOCALE)); if (baseLanguage == null || baseLanguage.length == 0) { throw new SystemConfigurationException( "Languages must be initialized before the system configuration can be loaded."); } // Remove any previous configuration information, possibly left // over from previous failed initialization Logger.logDebug("Removing previous incomplete initialization information."); removeConfigurationItems(SystemConfigurationUtilities.TYPE_STATUS); removeConfigurationItems(SystemConfigurationUtilities.TYPE_SEVERITY); removeConfigurationItems(SystemConfigurationUtilities.TYPE_RESOLUTION); for (int i = 0; i < baseLanguage.length; i++) { if (baseLanguage[i].getResourceKey().startsWith(ITrackerResources.KEY_BASE_RESOLUTION)) { try { String resolutionString = baseLanguage[i].getResourceKey().substring(20); Logger.logDebug("Adding new configuration resolution value: " + resolutionString); int resolutionNumber = Integer.parseInt(resolutionString); createConfigurationItem(new ConfigurationModel( SystemConfigurationUtilities.TYPE_RESOLUTION, resolutionString, props .getProperty("version"), resolutionNumber)); } catch (Exception e) { Logger.logError("Unable to load resolution value: " + baseLanguage[i].getResourceKey(), e); } } if (baseLanguage[i].getResourceKey().startsWith(ITrackerResources.KEY_BASE_SEVERITY)) { try { String severityString = baseLanguage[i].getResourceKey().substring(18); Logger.logDebug("Adding new configuration severity value: " + severityString); int severityNumber = Integer.parseInt(severityString); createConfigurationItem(new ConfigurationModel(SystemConfigurationUtilities.TYPE_SEVERITY, severityString, props.getProperty("version"), severityNumber)); } catch (Exception e) { Logger.logError("Unable to load severity value: " + baseLanguage[i].getResourceKey(), e); } } if (baseLanguage[i].getResourceKey().startsWith(ITrackerResources.KEY_BASE_STATUS)) { try { String statusString = baseLanguage[i].getResourceKey().substring(16); Logger.logDebug("Adding new configuration status value: " + statusString); int statusNumber = Integer.parseInt(statusString); createConfigurationItem(new ConfigurationModel(SystemConfigurationUtilities.TYPE_STATUS, statusString, props.getProperty("version"), statusNumber)); } catch (Exception e) { Logger.logError("Unable to load status value: " + baseLanguage[i].getResourceKey(), e); } } } createConfigurationItem(new ConfigurationModel(SystemConfigurationUtilities.TYPE_INITIALIZED, "1", props.getProperty("version"))); } } catch (Exception e) { Logger.logError("Unable to initialize system configuration.", e); } } } \ No newline at end of file --- 1 ---- ! /* * This software was designed and created by Jason Carroll. * Copyright (c) 2002, 2003, 2004 Jason Carroll. * The author can be reached at jca...@co... * ITracker website: http://www.cowsultants.com * ITracker forums: http://www.cowsultants.com/phpBB/index.php * * This program is free software; you can redistribute it and/or modify * it only under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ package cowsultants.itracker.ejb.beans.session; import java.sql.Timestamp; import java.util.Arrays; import java.util.Date; import java.util.Collection; import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.Locale; import java.util.Properties; import java.util.Vector; import javax.naming.InitialContext; import cowsultants.itracker.ejb.beans.entity.ConfigurationBean; import cowsultants.itracker.ejb.beans.entity.CustomFieldBean; import cowsultants.itracker.ejb.beans.entity.CustomFieldValueBean; import cowsultants.itracker.ejb.beans.entity.LanguageBean; import cowsultants.itracker.ejb.beans.entity.WorkflowScriptBean; import cowsultants.itracker.ejb.client.exceptions.SystemConfigurationException; import cowsultants.itracker.ejb.client.interfaces.SystemConfiguration; import cowsultants.itracker.ejb.client.models.ConfigurationModel; import cowsultants.itracker.ejb.client.models.CustomFieldModel; import cowsultants.itracker.ejb.client.models.CustomFieldValueModel; import cowsultants.itracker.ejb.client.models.LanguageModel; import cowsultants.itracker.ejb.client.models.NameValuePairModel; import cowsultants.itracker.ejb.client.models.SystemConfigurationModel; import cowsultants.itracker.ejb.client.models.WorkflowScriptModel; import cowsultants.itracker.ejb.client.resources.ITrackerResources; import cowsultants.itracker.ejb.client.util.IssueUtilities; import cowsultants.itracker.ejb.client.util.Logger; import cowsultants.itracker.ejb.client.util.SystemConfigurationUtilities; import cowsultants.itracker.ejb.util.PropertiesFileHandler; /** * * Implimetation of the SystemConfiguration Interface. * * @see SystemConfiguration * */ public class SystemConfigurationBean implements SystemConfiguration { private static Properties props = null; InitialContext ic = null; ConfigurationFactory cHome = null; CustomFieldFactory cfHome = null; CustomFieldValueFactory cfvHome = null; LanguageFactory lHome = null; WorkflowScriptFactory wsHome = null; public SystemConfigurationBean() { if (props == null) { props = new Properties(); // try { // ic = new InitialContext(); // NamingEnumeration bindings = ic.listBindings("java:comp/env"); // while(bindings.hasMoreElements()) { // try { // Binding namePair = (Binding) bindings.nextElement(); // Logger.logDebug("Setting property " + namePair.getName() + " from // env-entry to value '" + ((Object) // namePair.getObject()).toString() + "'"); // props.setProperty(namePair.getName(), ((Object) // namePair.getObject()).toString()); // } catch(ClassCastException cce) { // Logger.logError("ClassCastException while loading application // properties.", cce); // } // } // } catch(NamingException ne) { // Logger.logError("NamingException while loading application // properties.", ne); // } PropertiesFileHandler filePropertiesHandler = new PropertiesFileHandler(); filePropertiesHandler.addProperties("/itrackerApplication.properties"); filePropertiesHandler.addProperties("/itrackerVersion.properties"); Properties fileProps = filePropertiesHandler.getProperties(); for (Enumeration e = fileProps.propertyNames(); e.hasMoreElements();) { String propName = (String) e.nextElement(); Logger.logDebug("Setting property " + propName + " from file to value '" + fileProps.getProperty(propName) + "'"); props.setProperty(propName, fileProps.getProperty(propName)); } props.setProperty("start_time_millis", Long.toString(new java.util.Date().getTime())); /* * try { * * InitialContext ic = new InitialContext(); * * try { * * DataSource ds = (DataSource) * ic.lookup(props.getProperty("default_ds", * SystemConfigurationUtilities.DEFAULT_DATASOURCE)); } * catch(NamingException testne) { * * DataSource ds = (DataSource) ic.lookup("java:/" + * props.getProperty("default_ds")); * * props.setProperty("default_ds", "java:/" + * props.getProperty("default_ds")); * * Logger.logWarn("Error in datasource, changed to '" + * props.getProperty("default_ds") + "'"); } } catch(NamingException * ne) { * * Logger.logError("NamingException while checking DataSource.", * ne); } */ } // initialize Factories... cHome = SpringFactories.getConfigurationFactory(); lHome = SpringFactories.getLanguageFactory(); cfHome = SpringFactories.getCustomFieldFactory(); wsHome = SpringFactories.getWorkflowScriptFactory(); } public String getProperty(String name) { return props.getProperty(name); } public String getProperty(String name, String defaultValue) { return props.getProperty(name, defaultValue); } public boolean getBooleanProperty(String name, boolean defaultValue) { String value = props.getProperty(name); return (value == null ? defaultValue : new Boolean(value).booleanValue()); } public int getIntegerProperty(String name, int defaultValue) { String value = props.getProperty(name); try { return (value == null ? defaultValue : Integer.parseInt(value)); } catch (NumberFormatException nfe) { return defaultValue; } } public long getLongProperty(String name, long defaultValue) { String value = props.getProperty(name); try { return (value == null ? defaultValue : Long.parseLong(value)); } catch (NumberFormatException nfe) { return defaultValue; } } public Properties getProperties() { return props; } public ConfigurationModel getConfigurationItem(Integer id) { ConfigurationBean configItem = cHome.findByPrimaryKey(id); return configItem.getModel(); } public ConfigurationModel[] getConfigurationItemsByType(int type) throws DataException { ConfigurationModel[] items = new ConfigurationModel[0]; Collection configItems = cHome.findByType(type); items = new ConfigurationModel[configItems.size()]; int i = 0; for (Iterator iter = configItems.iterator(); iter.hasNext(); i++) { items[i] = ((ConfigurationBean) iter.next()).getModel(); } Arrays.sort(items, new ConfigurationModel()); return items; } public ConfigurationModel[] getConfigurationItemsByType(int type, Locale locale) throws DataException { ConfigurationModel[] items = getConfigurationItemsByType(type); for (int i = 0; i < items.length; i++) { if (items[i].getType() == SystemConfigurationUtilities.TYPE_STATUS) { items[i].setName(IssueUtilities.getStatusName(items[i].getValue(), locale)); } else if (items[i].getType() == SystemConfigurationUtilities.TYPE_SEVERITY) { items[i].setName(IssueUtilities.getSeverityName(items[i].getValue(), locale)); } else if (items[i].getType() == SystemConfigurationUtilities.TYPE_RESOLUTION) { items[i].setName(IssueUtilities.getResolutionName(items[i].getValue(), locale)); } } return items; } public ConfigurationModel createConfigurationItem(ConfigurationModel model) { ConfigurationBean configurationItem = new ConfigurationBean(); configurationItem.setModel(model); configurationItem.setCreateDate( new Timestamp( new Date().getTime())); cHome.saveOrUpdate(configurationItem); return configurationItem.getModel(); // Logger.logDebug("Unable to create new configuration item."); } public ConfigurationModel updateConfigurationItem(ConfigurationModel model) { if (model != null) { ConfigurationBean configurationItem = cHome.findByPrimaryKey(model.getId()); configurationItem.setModel(model); return configurationItem.getModel(); } return (null); } public ConfigurationModel[] updateConfigurationItems(ConfigurationModel[] models, int type) throws DataException { removeConfigurationItems(type); for (int i = 0; i < models.length; i++) { ConfigurationBean configurationItem = new ConfigurationBean(); configurationItem.setModel(models[i]); models[i] = configurationItem.getModel(); } Arrays.sort(models, new ConfigurationModel()); return models; // Logger.logDebug("Unable to create new language item."); // return new ConfigurationModel[0]; } public void removeConfigurationItem(Integer id) { // cHome.remove(id); // Logger.logDebug("Unable to remove configuration item " + id + "."); } public void removeConfigurationItems(int type) throws DataException { Collection currentItems = cHome.findByType(type); for (Iterator iter = currentItems.iterator(); iter.hasNext();) { ConfigurationBean config = (ConfigurationBean) iter.next(); // config.remove(); } } public void removeConfigurationItems(ConfigurationModel model) throws DataException { Vector currentIds = new Vector(); Collection currentItems = cHome.findByTypeAndValue(model.getType(), model.getValue()); for (Iterator iter = currentItems.iterator(); iter.hasNext();) { ConfigurationBean configItem = (ConfigurationBean) iter.next(); cHome.delete(configItem); } } public boolean configurationItemExists(ConfigurationModel model) throws DataException { if (model != null && model.getVersion() != null) { Collection configItems = cHome.findByTypeAndValue(model.getType(), model.getValue()); if (configItems != null && configItems.size() > 0) { return true; } } return false; } public boolean configurationItemUpToDate(ConfigurationModel model) throws DataException { long currentVersion = 0; if (model != null && model.getVersion() != null) { Collection configItems = cHome.findByTypeAndValue(model.getType(), model.getValue()); for (Iterator iter = configItems.iterator(); iter.hasNext();) { ConfigurationBean configItem = (ConfigurationBean) iter.next(); if (configItem != null) { currentVersion = Math.max(SystemConfigurationUtilities.getVersionAsLong(configItem.getVersion()), currentVersion); } } if (currentVersion >= SystemConfigurationUtilities.getVersionAsLong(model.getVersion())) { return true; } } return false; } public void resetConfigurationCache() throws DataException { IssueUtilities.setResolutions(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION)); IssueUtilities.setSeverities(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY)); IssueUtilities.setStatuses(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS)); IssueUtilities.setCustomFields(getCustomFields()); } public void resetConfigurationCache(int type) throws DataException { if (type == SystemConfigurationUtilities.TYPE_RESOLUTION) { IssueUtilities.setResolutions(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_RESOLUTION)); } else if (type == SystemConfigurationUtilities.TYPE_SEVERITY) { IssueUtilities.setSeverities(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_SEVERITY)); } else if (type == SystemConfigurationUtilities.TYPE_STATUS) { IssueUtilities.setStatuses(getConfigurationItemsByType(SystemConfigurationUtilities.TYPE_STATUS)); } else if (type == SystemConfigurationUtilities.TYPE_CUSTOMFIELD) { IssueUtilities.setCustomFields(getCustomFields()); } } public WorkflowScriptModel getWorkflowScript(Integer id) { WorkflowScriptBean workflowScript = wsHome.findByPrimaryKey(id); return workflowScript.getModel(); } public WorkflowScriptModel[] getWorkflowScripts() { WorkflowScriptModel[] scripts = new WorkflowScriptModel[0]; Collection workflowScripts = wsHome.findAll(); scripts = new WorkflowScriptModel[workflowScripts.size()]; int i = 0; for (Iterator iter = workflowScripts.iterator(); iter.hasNext(); i++) { scripts[i] = ((WorkflowScriptBean) iter.next()).getModel(); } return scripts; } public WorkflowScriptModel createWorkflowScript(WorkflowScriptModel model) { // try { WorkflowScriptBean workflowScript = new WorkflowScriptBean(); workflowScript.setModel(model); model.setId(workflowScript.getId()); return workflowScript.getModel(); // } catch(CreateException ce) { // Logger.logDebug("Unable to create new workflow script.", ce); // } // return null; } public WorkflowScriptModel updateWorkflowScript(WorkflowScriptModel model) { if (model != null) { WorkflowScriptBean workflowScript = wsHome.findByPrimaryKey(model.getId()); workflowScript.setModel(model); return workflowScript.getModel(); } return null; } public CustomFieldModel getCustomField(Integer id) throws DataException { CustomFieldBean customField = cfHome.findByPrimaryKey(id); return customField.getModel(); } public CustomFieldModel[] getCustomFields() throws DataException { CustomFieldModel[] fields = new CustomFieldModel[0]; Collection customFields = cfHome.findAll(); fields = new CustomFieldModel[customFields.size()]; int i = 0; for (Iterator iter = customFields.iterator(); iter.hasNext(); i++) { fields[i] = ((CustomFieldBean) iter.next()).getModel(); } return fields; } public CustomFieldModel[] getCustomFields(Locale locale) throws DataException { CustomFieldModel[] fields = getCustomFields(); for (int i = 0; i < fields.length; i++) { fields[i].setLabels(locale); } return fields; } public CustomFieldModel createCustomField(CustomFieldModel model) throws DataException { CustomFieldBean customField = new CustomFieldBean(); customField.setModel(model); model.setId(customField.getId()); if (model.getOptions().length > 0) { removeCustomFieldValues(customField.getId()); CustomFieldValueModel[] newOptions = model.getOptions(); for (int i = 0; i < newOptions.length; i++) { newOptions[i].setCustomFieldId(customField.getId()); createCustomFieldValue(newOptions[i]); } } return customField.getModel(); // Logger.logDebug("Unable to create new custom field.", ce); } public CustomFieldModel updateCustomField(CustomFieldModel model) throws DataException { if (model != null) { CustomFieldBean customField = cfHome.findByPrimaryKey(model.getId()); customField.setModel(model); if (model.getOptions().length > 0) { removeCustomFieldValues(customField.getId()); CustomFieldValueModel[] newOptions = model.getOptions(); for (int i = 0; i < newOptions.length; i++) { createCustomFieldValue(newOptions[i]); } } return customField.getModel(); } return null; } public void removeCustomField(Integer customFieldId) throws DataException { CustomFieldBean customField = cfHome.findByPrimaryKey(customFieldId); // customField.remove(); } public CustomFieldValueModel getCustomFieldValue(Integer id) { // CustomFieldValueBean customFieldValue = cfvHome.findByPrimaryKey(id); // return customFieldValue.getModel(); return (null); } public CustomFieldValueModel createCustomFieldValue(CustomFieldValueModel model) throws DataException { if (model == null || model.getCustomFieldId() == null) { return null; } CustomFieldBean customField = cfHome.findByPrimaryKey(model.getCustomFieldId()); CustomFieldValueBean customFieldValue = new CustomFieldValueBean(); customFieldValue.setModel(model); customFieldValue.setCustomField(customField); return customFieldValue.getModel(); // Logger.logDebug("Unable to create new custom field value: " + // ce.getMessage()); // Logger.logDebug("Unable to create new custom field value, custom // field not found: " + fe.getMessage()); } public CustomFieldValueModel updateCustomFieldValue(CustomFieldValueModel model) { // if(model != null) { ... [truncated message content] |
From: Ricardo T. <rj...@us...> - 2005-10-24 23:24:59
|
Update of /cvsroot/itracker/itracker/web/WEB-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13274/WEB-INF Modified Files: Tag: itrackerhibernate applicationContext.xml Added Files: Tag: itrackerhibernate server.properties Log Message: turned on spring property override by default --- NEW FILE: server.properties --- dataSource.url=jdbc:mysql://localhost:3306/itrackerdev Index: applicationContext.xml =================================================================== RCS file: /cvsroot/itracker/itracker/web/WEB-INF/Attic/applicationContext.xml,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** applicationContext.xml 24 Oct 2005 23:14:17 -0000 1.1.2.4 --- applicationContext.xml 24 Oct 2005 23:24:52 -0000 1.1.2.5 *************** *** 477,481 **** <bean id="myOverride" class="org.springframework.beans.factory.config.PropertyOverrideConfigurer"> <property name="location"> ! <value>/server.properties</value> </property> </bean> --- 477,481 ---- <bean id="myOverride" class="org.springframework.beans.factory.config.PropertyOverrideConfigurer"> <property name="location"> ! <value>/WEB-INF/server.properties</value> </property> </bean> |
From: Ricardo T. <rj...@us...> - 2005-10-24 23:16:41
|
Update of /cvsroot/itracker/itracker/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12123 Modified Files: Tag: itrackerhibernate itrackerVersion.properties Log Message: updated itracker version. required to check if languages are up to date Index: itrackerVersion.properties =================================================================== RCS file: /cvsroot/itracker/itracker/src/Attic/itrackerVersion.properties,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** itrackerVersion.properties 11 Oct 2005 01:36:07 -0000 1.1.2.1 --- itrackerVersion.properties 24 Oct 2005 23:16:33 -0000 1.1.2.2 *************** *** 1,2 **** ! project=@project@ ! version=@version@ --- 1,2 ---- ! project=itracker ! version=3.0.0 |