Index: lams_tool_daco/.classpath
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_daco/.classpath,v
diff -u -r1.6 -r1.6.8.1
--- lams_tool_daco/.classpath 30 Oct 2008 03:48:31 -0000 1.6
+++ lams_tool_daco/.classpath 13 May 2009 12:00:04 -0000 1.6.8.1
@@ -3,12 +3,15 @@
-
-
-
+
+
+
+
+
+
-
+
Index: lams_tool_daco/src/java/org/lamsfoundation/lams/tool/daco/dao/hibernate/DacoAnswerDAOHibernate.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_daco/src/java/org/lamsfoundation/lams/tool/daco/dao/hibernate/DacoAnswerDAOHibernate.java,v
diff -u -r1.5 -r1.5.8.1
--- lams_tool_daco/src/java/org/lamsfoundation/lams/tool/daco/dao/hibernate/DacoAnswerDAOHibernate.java 14 Nov 2008 04:05:26 -0000 1.5
+++ lams_tool_daco/src/java/org/lamsfoundation/lams/tool/daco/dao/hibernate/DacoAnswerDAOHibernate.java 13 May 2009 12:00:04 -0000 1.5.8.1
@@ -95,8 +95,8 @@
QuestionSummarySingleAnswerDTO singleAnswer = new QuestionSummarySingleAnswerDTO();
singleAnswer.setAnswer(row[DacoConstants.QUESTION_DB_ANSWER_ENUMERATION_SUMMARY_ANSWER]);
singleAnswer.setCount(row[DacoConstants.QUESTION_DB_ANSWER_ENUMERATION_SUMMARY_COUNT]);
- Integer answerCount = (Integer) getHibernateTemplate().find(DacoAnswerDAOHibernate.FIND_ANSWER_COUNT,
- currentUid).get(0);
+ Long answerCount = (Long) getHibernateTemplate().find(DacoAnswerDAOHibernate.FIND_ANSWER_COUNT, currentUid)
+ .get(0);
singleAnswer.setAverage(Math.round(Float.parseFloat(singleAnswer.getCount()) / answerCount * 100) + "%");
if (Short.parseShort(row[DacoConstants.QUESTION_DB_ANSWER_ENUMERATION_SUMMARY_QUESTION_TYPE]) == DacoConstants.QUESTION_TYPE_NUMBER) {
@@ -154,11 +154,12 @@
}
public Integer getGroupRecordCount(Long sessionId) {
- return (Integer) getHibernateTemplate().find(DacoAnswerDAOHibernate.FIND_TOTAL_RECORD_COUNT, sessionId).get(0);
+ return ((Number) getHibernateTemplate().find(DacoAnswerDAOHibernate.FIND_TOTAL_RECORD_COUNT, sessionId).get(0))
+ .intValue();
}
public Integer getUserRecordCount(Long userId, Long sessionId) {
- return (Integer) getHibernateTemplate().findByNamedParam(DacoAnswerDAOHibernate.FIND_USER_RECORD_COUNT,
- new String[] { "userId", "sessionId" }, new Object[] { userId, sessionId }).get(0);
+ return ((Number) getHibernateTemplate().findByNamedParam(DacoAnswerDAOHibernate.FIND_USER_RECORD_COUNT,
+ new String[] { "userId", "sessionId" }, new Object[] { userId, sessionId }).get(0)).intValue();
}
}
\ No newline at end of file
Index: lams_tool_daco/web/WEB-INF/web.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_daco/web/WEB-INF/web.xml,v
diff -u -r1.6 -r1.6.4.1
--- lams_tool_daco/web/WEB-INF/web.xml 26 Mar 2009 10:00:37 -0000 1.6
+++ lams_tool_daco/web/WEB-INF/web.xml 13 May 2009 12:00:04 -0000 1.6.4.1
@@ -9,13 +9,18 @@
javax.servlet.jsp.jstl.fmt.localizationContext
org.lamsfoundation.lams.tool.daco.ApplicationResources
+
+
+ contextClass
+ org.jboss.spring.factory.VFSXmlWebApplicationContext
+
contextConfigLocation
classpath:/org/lamsfoundation/lams/tool/daco/dbupdates/autopatchContext.xml
locatorFactorySelector
- classpath*:/org/lamsfoundation/lams/**/beanRefContext.xml
+ classpath:/org/lamsfoundation/lams/beanRefContext.xml
parentContextKey
Index: lams_tool_deploy/src/java/org/lamsfoundation/lams/tool/deploy/AddWebAppToApplicationXmlTask.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_deploy/src/java/org/lamsfoundation/lams/tool/deploy/AddWebAppToApplicationXmlTask.java,v
diff -u -r1.9.6.1 -r1.9.6.1.2.1
--- lams_tool_deploy/src/java/org/lamsfoundation/lams/tool/deploy/AddWebAppToApplicationXmlTask.java 29 Apr 2009 06:10:33 -0000 1.9.6.1
+++ lams_tool_deploy/src/java/org/lamsfoundation/lams/tool/deploy/AddWebAppToApplicationXmlTask.java 13 May 2009 12:00:09 -0000 1.9.6.1.2.1
@@ -26,78 +26,55 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
/**
* Task to add a web application entry to an EAR application XML
+ *
* @author chris
*/
-public class AddWebAppToApplicationXmlTask extends UpdateApplicationXmlTask
-{
-
-
-
+public class AddWebAppToApplicationXmlTask extends UpdateApplicationXmlTask {
+
/** Creates a new instance of AddWebAppToApplicationXmlTask */
- public AddWebAppToApplicationXmlTask()
- {
+ public AddWebAppToApplicationXmlTask() {
}
-
+
/**
* Add the web uri and context root elements ot the Application xml
*/
- protected void updateApplicationXml(Document doc) throws DeployException
- {
-
- //find & remove web uri element
- Element moduleElement = findElementWithWebURI(doc);
- if ( moduleElement != null ) {
- doc.getDocumentElement().removeChild(moduleElement);
- }
+ @Override
+ protected void updateApplicationXml(Document doc) throws DeployException {
- //create new module
- moduleElement = doc.createElement("module");
- Element webElement = doc.createElement("web");
- moduleElement.appendChild(webElement);
- //create new web-uri element in the web element
- Element webUriElement = doc.createElement("web-uri");
- webUriElement.appendChild(doc.createTextNode(webUri));
- webElement.appendChild(webUriElement);
-
- //create new context root element in the web element
- Element contextRootElement = doc.createElement("context-root");
- contextRootElement.appendChild(doc.createTextNode(contextRoot));
- webElement.appendChild(contextRootElement);
-
- doc.getDocumentElement().appendChild(moduleElement);
-
+ // find & remove web uri element
+ Element moduleElement = findElementWithWebURI(doc);
+ if (moduleElement != null) {
+ doc.getDocumentElement().removeChild(moduleElement);
+ }
+
+ // create new module
+ moduleElement = doc.createElement("module");
+ Element webElement = doc.createElement("web");
+ moduleElement.appendChild(webElement);
+ // create new web-uri element in the web element
+ Element webUriElement = doc.createElement("web-uri");
+ webUriElement.appendChild(doc.createTextNode(webUri));
+ webElement.appendChild(webUriElement);
+
+ // create new context root element in the web element
+ Element contextRootElement = doc.createElement("context-root");
+ contextRootElement.appendChild(doc.createTextNode(contextRoot));
+ webElement.appendChild(contextRootElement);
+
+ // insert new module in the correct position, before "security-role" elements
+
+ NodeList docNodes = doc.getDocumentElement().getChildNodes();
+ for (int nodeIndex = 0; nodeIndex < docNodes.getLength(); nodeIndex++) {
+ Node node = docNodes.item(nodeIndex);
+ if ("security-role".equalsIgnoreCase(node.getNodeName())) {
+ doc.getDocumentElement().insertBefore(moduleElement, node);
+ break;
+ }
+ }
}
-
- /**
- * Add the given web app to the application.xml file
- * @param args
- * @throws Exception
- */
- public static void main(String[] args) throws Exception
- {
-
- if ((args.length < 3) || (args[0] == null))
- {
- throw new IllegalArgumentException("Usage: AddModuleToApplicationXmlTask ");
- }
- try
- {
- System.out.println("Attempting to update " + args[0] + "/META-INF/application.xml");
- AddWebAppToApplicationXmlTask addModuleTask = new AddWebAppToApplicationXmlTask();
- addModuleTask.setLamsEarPath(args[0]);
- addModuleTask.setWebUri(args[1]);
- addModuleTask.setContextRoot(args[2]);
- addModuleTask.execute();
- System.out.println("application.xml update completed");
- }
- catch (Exception ex)
- {
- System.out.println("Application.xml update failed: " + ex.getMessage());
- ex.printStackTrace();
- }
- }
-
-}
+}
\ No newline at end of file
Index: lams_tool_dimdim/.classpath
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/.classpath,v
diff -u -r1.2 -r1.2.8.1
--- lams_tool_dimdim/.classpath 12 Sep 2008 08:05:49 -0000 1.2
+++ lams_tool_dimdim/.classpath 13 May 2009 12:04:29 -0000 1.2.8.1
@@ -3,12 +3,11 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
Index: lams_tool_dimdim/conf/xdoclet/web-settings.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/conf/xdoclet/Attic/web-settings.xml,v
diff -u -r1.3 -r1.3.4.1
--- lams_tool_dimdim/conf/xdoclet/web-settings.xml 26 Mar 2009 10:00:37 -0000 1.3
+++ lams_tool_dimdim/conf/xdoclet/web-settings.xml 13 May 2009 12:04:30 -0000 1.3.4.1
@@ -5,13 +5,17 @@
org.lamsfoundation.lams.tool.dimdim.ApplicationResources
+
+ contextClass
+ org.jboss.spring.factory.VFSXmlWebApplicationContext
+
contextConfigLocation
classpath:/org/lamsfoundation/lams/tool/dimdim/dbupdates/autopatchContext.xml
locatorFactorySelector
- classpath*:/org/lamsfoundation/lams/**/beanRefContext.xml
+ classpath:/org/lamsfoundation/lams/beanRefContext.xml
parentContextKey
Index: lams_tool_forum/.classpath
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/.classpath,v
diff -u -r1.14.4.1 -r1.14.4.1.2.1
--- lams_tool_forum/.classpath 22 Apr 2009 08:41:38 -0000 1.14.4.1
+++ lams_tool_forum/.classpath 13 May 2009 12:04:49 -0000 1.14.4.1.2.1
@@ -4,15 +4,17 @@
-
-
-
-
-
+
+
+
+
+
+
+
Index: lams_tool_forum/build.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/build.xml,v
diff -u -r1.55 -r1.55.6.1
--- lams_tool_forum/build.xml 21 Jan 2009 08:49:49 -0000 1.55
+++ lams_tool_forum/build.xml 13 May 2009 12:04:49 -0000 1.55.6.1
@@ -102,11 +102,14 @@
+
Index: lams_tool_forum/conf/xdoclet/web-settings.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/conf/xdoclet/web-settings.xml,v
diff -u -r1.12 -r1.12.4.1
--- lams_tool_forum/conf/xdoclet/web-settings.xml 26 Mar 2009 10:00:37 -0000 1.12
+++ lams_tool_forum/conf/xdoclet/web-settings.xml 13 May 2009 12:04:49 -0000 1.12.4.1
@@ -9,13 +9,17 @@
+
+ contextClass
+ org.jboss.spring.factory.VFSXmlWebApplicationContext
+
contextConfigLocation
classpath:/org/lamsfoundation/lams/tool/forum/dbupdates/autopatchContext.xml
locatorFactorySelector
- classpath*:/org/lamsfoundation/lams/**/beanRefContext.xml
+ classpath:/org/lamsfoundation/lams/beanRefContext.xml
parentContextKey
Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/MessageSeqDao.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/MessageSeqDao.java,v
diff -u -r1.5 -r1.5.8.1
--- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/MessageSeqDao.java 9 May 2008 04:21:31 -0000 1.5
+++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/MessageSeqDao.java 13 May 2009 12:04:48 -0000 1.5.8.1
@@ -21,7 +21,7 @@
* ****************************************************************
*/
-/* $$Id$$ */
+/* $$Id$$ */
package org.lamsfoundation.lams.tool.forum.persistence;
@@ -30,42 +30,44 @@
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
public class MessageSeqDao extends HibernateDaoSupport {
- private static final String SQL_QUERY_FIND_TOPIC_THREAD = "from " + MessageSeq.class.getName()
- + " where root_message_uid = ?";
- private static final String SQL_QUERY_FIND_TOPIC_ID = "from " + MessageSeq.class.getName()
- + " where message_uid = ?";
-
- private static final String SQL_QUERY_NUM_POSTS_BY_TOPIC = "select count(*) from "
- + MessageSeq.class.getName() + " ms where ms.message.createdBy.userId=? and ms.message.isAuthored = false and ms.rootMessage=?";
-
- public List getTopicThread(Long rootTopicId) {
- return this.getHibernateTemplate().find(SQL_QUERY_FIND_TOPIC_THREAD,rootTopicId);
- }
+ private static final String SQL_QUERY_FIND_TOPIC_THREAD = "from " + MessageSeq.class.getName()
+ + " where root_message_uid = ?";
+ private static final String SQL_QUERY_FIND_TOPIC_ID = "from " + MessageSeq.class.getName()
+ + " where message_uid = ?";
- public MessageSeq getByTopicId(Long messageId) {
- List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_TOPIC_ID,messageId);
- if(list == null || list.isEmpty())
- return null;
- return (MessageSeq) list.get(0);
+ private static final String SQL_QUERY_NUM_POSTS_BY_TOPIC = "select count(*) from " + MessageSeq.class.getName()
+ + " ms where ms.message.createdBy.userId=? and ms.message.isAuthored = false and ms.rootMessage.uid=?";
+
+ public List getTopicThread(Long rootTopicId) {
+ return this.getHibernateTemplate().find(SQL_QUERY_FIND_TOPIC_THREAD, rootTopicId);
+ }
+
+ public MessageSeq getByTopicId(Long messageId) {
+ List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_TOPIC_ID, messageId);
+ if (list == null || list.isEmpty()) {
+ return null;
}
+ return (MessageSeq) list.get(0);
+ }
- public void save(MessageSeq msgSeq) {
- this.getHibernateTemplate().save(msgSeq);
+ public void save(MessageSeq msgSeq) {
+ this.getHibernateTemplate().save(msgSeq);
+ }
+
+ public void deleteByTopicId(Long topicUid) {
+ MessageSeq seq = getByTopicId(topicUid);
+ if (seq != null) {
+ this.getHibernateTemplate().delete(seq);
}
+ }
- public void deleteByTopicId(Long topicUid) {
- MessageSeq seq = getByTopicId(topicUid);
- if(seq != null)
- this.getHibernateTemplate().delete(seq);
+ public int getNumOfPostsByTopic(Long userID, Long topicID) {
+ List list = this.getHibernateTemplate().find(SQL_QUERY_NUM_POSTS_BY_TOPIC, new Object[] { userID, topicID });
+ if (list != null && list.size() > 0) {
+ return ((Number) list.get(0)).intValue();
+ } else {
+ return 0;
}
-
- public int getNumOfPostsByTopic(Long userID, Long topicID) {
- List list = this.getHibernateTemplate().find(SQL_QUERY_NUM_POSTS_BY_TOPIC, new Object[]{userID,topicID});
- if(list != null && list.size() > 0)
- return ((Number)list.get(0)).intValue();
- else
- return 0;
- }
+ }
-
}
Fisheye: Tag 1.3.2.1 refers to a dead (removed) revision in file `lams_tool_forum/web/WEB-INF/struts/validator-rules.xml'.
Fisheye: No comparison available. Pass `N' to diff?