You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(233) |
Sep
(199) |
Oct
(206) |
Nov
(185) |
Dec
(270) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(232) |
Feb
(426) |
Mar
(623) |
Apr
(592) |
May
(506) |
Jun
(389) |
Jul
(160) |
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(5) |
| 2007 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(5) |
Oct
(9) |
Nov
(6) |
Dec
(6) |
| 2008 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
(3) |
May
(3) |
Jun
(5) |
Jul
(10) |
Aug
(2) |
Sep
(12) |
Oct
(10) |
Nov
(54) |
Dec
(49) |
| 2009 |
Jan
(19) |
Feb
(13) |
Mar
(20) |
Apr
(24) |
May
(44) |
Jun
(29) |
Jul
(32) |
Aug
(10) |
Sep
(7) |
Oct
(10) |
Nov
(4) |
Dec
(17) |
| 2010 |
Jan
(14) |
Feb
(5) |
Mar
(23) |
Apr
(50) |
May
(31) |
Jun
(9) |
Jul
(5) |
Aug
(4) |
Sep
(7) |
Oct
(5) |
Nov
(2) |
Dec
(3) |
| 2011 |
Jan
(12) |
Feb
(5) |
Mar
(5) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2012 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Author: adamw Date: 2006-07-10 16:42:31 -0400 (Mon, 10 Jul 2006) New Revision: 4990 Added: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/bin/ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/bin/pluggable-instrumentor.jar labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/bin/run.conf labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/conf/ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/deploy/ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/deploy/JBLabs-ds.xml.sample labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/deploy/ear-deployer.xml labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/deploy/jboss-aop-jdk50.deployer/ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/deploy/jboss-portal.sar/ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/deploy/mail-service.xml Removed: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy-bin/ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/JBLabs-ds.xml.sample labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/ear-deployer.xml labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/jboss-aop-jdk50.deployer/ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/jboss-portal.sar/ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/mail-service.xml Modified: labs/jbosslabs/trunk/portal-extensions/configuration/maven.xml Log: http://jira.jboss.org/jira/browse/JBLAB-712 Modified: labs/jbosslabs/trunk/portal-extensions/configuration/maven.xml =================================================================== --- labs/jbosslabs/trunk/portal-extensions/configuration/maven.xml 2006-07-10 20:31:42 UTC (rev 4989) +++ labs/jbosslabs/trunk/portal-extensions/configuration/maven.xml 2006-07-10 20:42:31 UTC (rev 4990) @@ -17,16 +17,11 @@ </goal> <goal name="deploy"> - <ant:copy todir="${local.deploy.dir}" overwrite="true"> + <ant:copy todir="${local.server.dir}" overwrite="true"> <ant:fileset dir="to-copy"> <exclude name="**/*.sample"/> </ant:fileset> </ant:copy> - <ant:copy todir="${local.server.dir}/bin" overwrite="true"> - <ant:fileset dir="to-copy-bin"> - <exclude name="**/*.sample"/> - </ant:fileset> - </ant:copy> <ant:delete file="${local.deploy.dir}/jboss-portal.sar/conf/data/default-object.xml" /> <ant:delete dir="${local.deploy.dir}/jboss-portal.sar/portal-samples.war" /> <ant:delete dir="${local.deploy.dir}/jbossweb-tomcat55.sar/ROOT.war" /> Deleted: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/JBLabs-ds.xml.sample =================================================================== --- labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/JBLabs-ds.xml.sample 2006-07-10 20:31:42 UTC (rev 4989) +++ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/JBLabs-ds.xml.sample 2006-07-10 20:42:31 UTC (rev 4990) @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<datasources> - <local-tx-datasource> - <jndi-name>LabsDS</jndi-name> - <connection-url> - jdbc:mysql://localhost:3306/dotorgdata?useServerPrepStmts=false - </connection-url> - <driver-class>org.gjt.mm.mysql.Driver</driver-class> - <user-name>dotorgdata</user-name> - <password></password> - </local-tx-datasource> -</datasources> Copied: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/bin/pluggable-instrumentor.jar (from rev 4986, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy-bin/pluggable-instrumentor.jar) Copied: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/bin/run.conf (from rev 4986, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy-bin/run.conf) Deleted: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/ear-deployer.xml =================================================================== --- labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/ear-deployer.xml 2006-07-10 20:31:42 UTC (rev 4989) +++ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/ear-deployer.xml 2006-07-10 20:42:31 UTC (rev 4990) @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- The JBoss service configuration file for the EAR deployer service. -$Id: ear-deployer.xml,v 1.1 2004/09/05 15:50:06 starksm Exp $ ---> -<server> - <!-- EAR deployer, remove if you are not using ear deployments --> - <mbean code="org.jboss.deployment.EARDeployer" - name="jboss.j2ee:service=EARDeployer"> - <!-- A flag indicating if ear deployments should have their own scoped - class loader to isolate their classes from other deployments. - --> - <attribute name="Isolated">false</attribute> - <!-- A flag indicating if the ear components should have in VM call - optimization disabled. - --> - <attribute name="CallByValue">false</attribute> - </mbean> -</server> Deleted: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/mail-service.xml =================================================================== --- labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/mail-service.xml 2006-07-10 20:31:42 UTC (rev 4989) +++ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/mail-service.xml 2006-07-10 20:42:31 UTC (rev 4990) @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE server> -<!-- $Id: mail-service.xml,v 1.5.6.1 2005/06/01 06:20:43 starksm Exp $ --> - -<server> - - <!-- ==================================================================== --> - <!-- Mail Connection Factory --> - <!-- ==================================================================== --> - - <mbean code="org.jboss.mail.MailService" - name="jboss:service=Mail"> - <attribute name="JNDIName">java:/Mail</attribute> - <attribute name="User">nobody</attribute> - <attribute name="Password">password</attribute> - <attribute name="Configuration"> - <!-- Test --> - <configuration> - <!-- Change to your mail server prototocol --> - <property name="mail.store.protocol" value="pop3"/> - <property name="mail.transport.protocol" value="smtp"/> - - <!-- Change to the user who will receive mail --> - <property name="mail.user" value="nobody"/> - - <!-- Change to the mail server --> - <property name="mail.pop3.host" value="pop3.nosuchhost.nosuchdomain.com"/> - - <!-- Change to the SMTP gateway server --> - <property name="mail.smtp.host" value="localhost"/> - - <!-- Change to the address mail will be from --> - <property name="mail.from" value="do-...@jb..."/> - - <!-- Enable debugging output from the javamail classes --> - <property name="mail.debug" value="false"/> - </configuration> - <depends>jboss:service=Naming</depends> - </attribute> - </mbean> - -</server> Copied: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/deploy/JBLabs-ds.xml.sample (from rev 4986, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/JBLabs-ds.xml.sample) Copied: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/deploy/ear-deployer.xml (from rev 4986, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/ear-deployer.xml) Copied: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/deploy/jboss-aop-jdk50.deployer (from rev 4986, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/jboss-aop-jdk50.deployer) Copied: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/deploy/jboss-portal.sar (from rev 4986, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/jboss-portal.sar) Copied: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/server/all/deploy/mail-service.xml (from rev 4986, labs/jbosslabs/trunk/portal-extensions/configuration/to-copy/mail-service.xml) |
|
From: <jbo...@li...> - 2006-07-10 20:31:45
|
Author: adamw Date: 2006-07-10 16:31:42 -0400 (Mon, 10 Jul 2006) New Revision: 4989 Modified: labs/shotoku/trunk/shotoku-tags/src/etc/META-INF/persistence.xml Log: http://jira.jboss.org/jira/browse/JBLAB-712 Modified: labs/shotoku/trunk/shotoku-tags/src/etc/META-INF/persistence.xml =================================================================== --- labs/shotoku/trunk/shotoku-tags/src/etc/META-INF/persistence.xml 2006-07-10 20:20:47 UTC (rev 4988) +++ labs/shotoku/trunk/shotoku-tags/src/etc/META-INF/persistence.xml 2006-07-10 20:31:42 UTC (rev 4989) @@ -1,9 +1,10 @@ -<entity-manager> - <name>tags</name> - <jta-data-source>java:/LabsDS</jta-data-source> - <properties> - <property name="hibernate.connection.datasource" value="JBossDS" /> - <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /> - <property name="hibernate.hbm2ddl.auto" value="update" /> - </properties> -</entity-manager> +<?xml version="1.0" encoding="UTF-8"?> +<persistence> + <persistence-unit name="tags"> + <jta-data-source>java:/LabsDS</jta-data-source> + <properties> + <property name="hibernate.hbm2ddl.auto" value="create-drop"/> + <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /> + </properties> + </persistence-unit> +</persistence> |
|
From: <jbo...@li...> - 2006-07-10 20:31:16
|
Author: jas...@jb...
Date: 2006-07-10 16:31:12 -0400 (Mon, 10 Jul 2006)
New Revision: 587
Modified:
trunk/src/main/java/org/jboss/ws/integration/catalina/TomcatHttpServer.java
Log:
fix build
Modified: trunk/src/main/java/org/jboss/ws/integration/catalina/TomcatHttpServer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/catalina/TomcatHttpServer.java 2006-07-10 17:12:51 UTC (rev 586)
+++ trunk/src/main/java/org/jboss/ws/integration/catalina/TomcatHttpServer.java 2006-07-10 20:31:12 UTC (rev 587)
@@ -48,4 +48,10 @@
{
}
+
+ @Override
+ public void destroy(Endpoint endpoint)
+ {
+
+ }
}
|
|
From: <jbo...@li...> - 2006-07-10 20:17:10
|
Author: adamw Date: 2006-07-10 16:17:00 -0400 (Mon, 10 Jul 2006) New Revision: 4987 Added: labs/jbosslabs/trunk/portal-extensions/jboss-as-binaries/to-copy/server/all/lib/hibernate-entitymanager.jar Log: http://jira.jboss.org/jira/browse/JBLAB-712 Added: labs/jbosslabs/trunk/portal-extensions/jboss-as-binaries/to-copy/server/all/lib/hibernate-entitymanager.jar =================================================================== (Binary files differ) Property changes on: labs/jbosslabs/trunk/portal-extensions/jboss-as-binaries/to-copy/server/all/lib/hibernate-entitymanager.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
|
From: <jbo...@li...> - 2006-07-10 19:53:25
|
Author: adamw Date: 2006-07-10 15:51:35 -0400 (Mon, 10 Jul 2006) New Revision: 4986 Added: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/jboss-aop-jdk50.jar Removed: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/aslibs/jars/log4j.jar Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/aslibs/jars/javax.servlet.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/aslibs/jars/javax.servlet.jsp.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/activation.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/hibernate3.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/jboss.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/jbosssx.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/jgroups.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/mail.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-bridge-lib.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-common-lib.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-core-lib.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-faces-lib.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-format-lib.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-portlet-lib.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-security-lib.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-server-lib.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-theme-lib.jar labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portlet-api-lib.jar Log: http://jira.jboss.org/jira/browse/JBLAB-712 Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/aslibs/jars/javax.servlet.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/aslibs/jars/javax.servlet.jsp.jar =================================================================== (Binary files differ) Deleted: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/aslibs/jars/log4j.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/activation.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/hibernate3.jar =================================================================== (Binary files differ) Added: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/jboss-aop-jdk50.jar =================================================================== (Binary files differ) Property changes on: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/jboss-aop-jdk50.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/jboss.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/jbosssx.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/jgroups.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/mail.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-bridge-lib.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-common-lib.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-core-lib.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-faces-lib.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-format-lib.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-portlet-lib.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-security-lib.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-server-lib.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portal-theme-lib.jar =================================================================== (Binary files differ) Modified: labs/jbosslabs/trunk/portal-extensions/binaries/maven-repo-addons/jboss/jars/portlet-api-lib.jar =================================================================== (Binary files differ) |
|
From: <jbo...@li...> - 2006-07-10 19:51:31
|
Author: szimano
Date: 2006-07-10 15:51:28 -0400 (Mon, 10 Jul 2006)
New Revision: 4985
Added:
labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/SearchListener.java
Modified:
labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/TagMeServlet.java
labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/TagMeShowPopupListener.java
labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/TaggingService.java
labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/TaggingServiceAsync.java
labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/services/ShotokuTaggingService.java
labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/services/TagMeTagger.java
Log:
tagging service JBLAB-704
Modified: labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/TagMeServlet.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/TagMeServlet.java 2006-07-10 19:39:28 UTC (rev 4984)
+++ labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/TagMeServlet.java 2006-07-10 19:51:28 UTC (rev 4985)
@@ -160,4 +160,26 @@
}
+ public Vector search(String tags, String author, String keyword, String clas) {
+ Vector vect = null;
+
+ try {
+ TagMeTagger tagger = (TagMeTagger) Class.forName(clas)
+ .newInstance();
+
+ vect = tagger.search(tags, author, keyword);
+ } catch (InstantiationException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (ClassNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ return vect;
+ }
+
}
Added: labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/SearchListener.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/SearchListener.java 2006-07-10 19:39:28 UTC (rev 4984)
+++ labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/SearchListener.java 2006-07-10 19:51:28 UTC (rev 4985)
@@ -0,0 +1,70 @@
+package org.jboss.labs.tagme.gwt.client;
+
+import java.util.Vector;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.TextBox;
+import com.google.gwt.user.client.ui.Widget;
+
+public class SearchListener implements ClickListener {
+
+ private String clas;
+
+ private HorizontalPanel results;
+
+ private TextBox tags;
+
+ private TextBox author;
+
+ private TextBox keyword;
+
+ public SearchListener(HorizontalPanel results, TextBox tags,
+ TextBox author, TextBox keyword, String clas) {
+ this.results = results;
+ this.clas = clas;
+ this.tags = tags;
+ this.keyword = keyword;
+ this.author = author;
+ }
+
+ public void onClick(Widget sender) {
+ results.clear();
+
+ TaggingServiceAsync tagging = (TaggingServiceAsync) GWT
+ .create(TaggingService.class);
+
+ ServiceDefTarget endpoint = (ServiceDefTarget) tagging;
+ endpoint.setServiceEntryPoint("/tagme-servlet/tag/");
+
+ AsyncCallback callback = new AsyncCallback() {
+ public void onSuccess(Object result) {
+ Vector res = (Vector) result;
+
+ for (int i = 0; i < res.size(); i++) {
+ results.add(new Label(res.get(i).toString()));
+ }
+ }
+
+ public void onFailure(Throwable caught) {
+ Window.alert("Error ! " + caught.getMessage() + " Throwable: "
+ + caught);
+ }
+ };
+
+ Window.alert("'" + tags.getText() + "' '" + author.getText() + "' '"
+ + keyword.getText() + "'");
+
+ // call AJAX methos, after that callback is going to be executed
+ tagging.search((tags.getText() == null) ? "" : tags.getText(), (author
+ .getText() == null) ? "" : author.getText(),
+ (keyword.getText() == null) ? "" : keyword.getText(), clas,
+ callback);
+ }
+
+}
Modified: labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/TagMeShowPopupListener.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/TagMeShowPopupListener.java 2006-07-10 19:39:28 UTC (rev 4984)
+++ labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/TagMeShowPopupListener.java 2006-07-10 19:51:28 UTC (rev 4985)
@@ -33,7 +33,6 @@
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.ClickListener;
-import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
@@ -301,20 +300,39 @@
.add(new Label(
"Search for tagged content by tag name, author or keyword search of the description"));
searchPanel.add(new Label("Tag"));
- searchPanel.add(new TextBox());
+ TextBox tags = new TextBox();
+ tags.setText("");
+ searchPanel.add(tags);
searchPanel.add(new Label("Author"));
- searchPanel.add(new TextBox());
+ TextBox author = new TextBox();
+ author.setText("");
+ searchPanel.add(author);
searchPanel.add(new Label("Keyword"));
- searchPanel.add(new TextBox());
+ TextBox keyword = new TextBox();
+ keyword.setText("");
+ searchPanel.add(keyword);
searchPanel.add(new Label("Search results"));
- searchPanel.add(new Button("Close", new ClickListener() {
+
+ HorizontalPanel results = new HorizontalPanel();
+
+ searchPanel.add(results);
+
+ VerticalPanel buttons = new VerticalPanel();
+
+ buttons.add(new Button("Search", new SearchListener(results, tags, author, keyword, clas)));
+
+ searchPanel.add(buttons);
+
+ buttons.add(new Button("Close", new ClickListener() {
public void onClick(Widget sender) {
dialog.hide();
}
}));
+
+ searchPanel.add(buttons);
tabs.add(searchPanel, "Tag Search");
Modified: labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/TaggingService.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/TaggingService.java 2006-07-10 19:39:28 UTC (rev 4984)
+++ labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/TaggingService.java 2006-07-10 19:51:28 UTC (rev 4985)
@@ -48,4 +48,6 @@
public Vector getSugestions(String path, String clas);
public Vector getAllTags(String clas);
+
+ public Vector search(String tags, String author, String keyword, String clas);
}
Modified: labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/TaggingServiceAsync.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/TaggingServiceAsync.java 2006-07-10 19:39:28 UTC (rev 4984)
+++ labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/gwt/client/TaggingServiceAsync.java 2006-07-10 19:51:28 UTC (rev 4985)
@@ -42,4 +42,6 @@
public void getSugestions(String path, String clas, AsyncCallback callback);
public void getAllTags(String clas, AsyncCallback callback);
+
+ public void search(String tags, String author, String keyword, String clas, AsyncCallback callback);
}
Modified: labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/services/ShotokuTaggingService.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/services/ShotokuTaggingService.java 2006-07-10 19:39:28 UTC (rev 4984)
+++ labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/services/ShotokuTaggingService.java 2006-07-10 19:51:28 UTC (rev 4985)
@@ -200,7 +200,7 @@
public Vector getAllTags() {
Vector<String> ret = new Vector<String>();
try {
- List<String> tags = service.getAllTags();
+ List<String> tags = service.getAllTagsNames();
for (String tag : tags) {
ret.add(tag);
@@ -213,4 +213,17 @@
return ret;
}
+ public Vector search(String tags, String author, String keyword) {
+ log.info("Search started");
+ List<Tag> allTags = service.searchTags(tags, author, keyword);
+
+ Vector result = new Vector();
+
+ for (Tag tag : allTags) {
+ result.add(tag.getName());
+ }
+
+ return result;
+ }
+
}
Modified: labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/services/TagMeTagger.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/services/TagMeTagger.java 2006-07-10 19:39:28 UTC (rev 4984)
+++ labs/jbosslabs/trunk/portal-extensions/forge-tagme/src/java/org/jboss/labs/tagme/services/TagMeTagger.java 2006-07-10 19:51:28 UTC (rev 4985)
@@ -33,4 +33,6 @@
public Vector getSuggestions(String path);
public Vector getAllTags();
+
+ public Vector search(String tags, String author, String keyword);
}
|
|
From: <jbo...@li...> - 2006-07-10 19:39:48
|
Author: adamw Date: 2006-07-10 15:39:28 -0400 (Mon, 10 Jul 2006) New Revision: 4984 Modified: labs/shotoku/trunk/lib/portal/portal-cms-lib.jar labs/shotoku/trunk/lib/portal/portal-common-lib.jar labs/shotoku/trunk/lib/portal/portal-core-lib.jar Log: http://jira.jboss.org/jira/browse/JBLAB-712 Modified: labs/shotoku/trunk/lib/portal/portal-cms-lib.jar =================================================================== (Binary files differ) Modified: labs/shotoku/trunk/lib/portal/portal-common-lib.jar =================================================================== (Binary files differ) Modified: labs/shotoku/trunk/lib/portal/portal-core-lib.jar =================================================================== (Binary files differ) |
|
From: <jbo...@li...> - 2006-07-10 19:37:02
|
Author: adamw Date: 2006-07-10 15:35:43 -0400 (Mon, 10 Jul 2006) New Revision: 4983 Added: labs/shotoku/trunk/lib/jboss/jboss-aop-jdk50.jar Removed: labs/shotoku/trunk/lib/jboss/jboss-aop.jar Modified: labs/shotoku/trunk/lib/jboss/activation.jar labs/shotoku/trunk/lib/jboss/javax.servlet.jar labs/shotoku/trunk/lib/jboss/javax.servlet.jsp.jar labs/shotoku/trunk/lib/jboss/jboss-annotations-ejb3.jar labs/shotoku/trunk/lib/jboss/jboss-common.jar labs/shotoku/trunk/lib/jboss/jboss-ejb3.jar labs/shotoku/trunk/lib/jboss/jboss-ejb3x.jar labs/shotoku/trunk/lib/jboss/jboss-j2ee.jar labs/shotoku/trunk/lib/jboss/jboss-jmx.jar labs/shotoku/trunk/lib/jboss/jboss-system.jar labs/shotoku/trunk/project.properties Log: http://jira.jboss.org/jira/browse/JBLAB-712 Modified: labs/shotoku/trunk/lib/jboss/activation.jar =================================================================== (Binary files differ) Modified: labs/shotoku/trunk/lib/jboss/javax.servlet.jar =================================================================== (Binary files differ) Modified: labs/shotoku/trunk/lib/jboss/javax.servlet.jsp.jar =================================================================== (Binary files differ) Modified: labs/shotoku/trunk/lib/jboss/jboss-annotations-ejb3.jar =================================================================== (Binary files differ) Added: labs/shotoku/trunk/lib/jboss/jboss-aop-jdk50.jar =================================================================== (Binary files differ) Property changes on: labs/shotoku/trunk/lib/jboss/jboss-aop-jdk50.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: labs/shotoku/trunk/lib/jboss/jboss-aop.jar =================================================================== (Binary files differ) Modified: labs/shotoku/trunk/lib/jboss/jboss-common.jar =================================================================== (Binary files differ) Modified: labs/shotoku/trunk/lib/jboss/jboss-ejb3.jar =================================================================== (Binary files differ) Modified: labs/shotoku/trunk/lib/jboss/jboss-ejb3x.jar =================================================================== (Binary files differ) Modified: labs/shotoku/trunk/lib/jboss/jboss-j2ee.jar =================================================================== (Binary files differ) Modified: labs/shotoku/trunk/lib/jboss/jboss-jmx.jar =================================================================== (Binary files differ) Modified: labs/shotoku/trunk/lib/jboss/jboss-system.jar =================================================================== (Binary files differ) Modified: labs/shotoku/trunk/project.properties =================================================================== --- labs/shotoku/trunk/project.properties 2006-07-10 19:31:02 UTC (rev 4982) +++ labs/shotoku/trunk/project.properties 2006-07-10 19:35:43 UTC (rev 4983) @@ -14,7 +14,7 @@ maven.jar.activation=${shotoku.root.dir}lib/jboss/activation.jar maven.jar.javax.servlet=${shotoku.root.dir}lib/jboss/javax.servlet.jar maven.jar.javax.servlet.jsp=${shotoku.root.dir}lib/jboss/javax.servlet.jsp.jar -maven.jar.jboss-aop=${shotoku.root.dir}lib/jboss/jboss-aop.jar +maven.jar.jboss-aop=${shotoku.root.dir}lib/jboss/jboss-aop-jdk50.jar maven.jar.jboss-annotations-ejb3=${shotoku.root.dir}lib/jboss/jboss-annotations-ejb3.jar maven.jar.jboss-ejb3=${shotoku.root.dir}lib/jboss/jboss-ejb3.jar maven.jar.jboss-ejb3x=${shotoku.root.dir}lib/jboss/jboss-ejb3x.jar |
|
From: <jbo...@li...> - 2006-07-10 19:31:05
|
Author: adamw Date: 2006-07-10 15:31:02 -0400 (Mon, 10 Jul 2006) New Revision: 4982 Added: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy-bin/ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy-bin/pluggable-instrumentor.jar labs/jbosslabs/trunk/portal-extensions/configuration/to-copy-bin/run.conf Log: http://jira.jboss.org/jira/browse/JBLAB-712 Added: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy-bin/pluggable-instrumentor.jar =================================================================== (Binary files differ) Property changes on: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy-bin/pluggable-instrumentor.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: labs/jbosslabs/trunk/portal-extensions/configuration/to-copy-bin/run.conf =================================================================== --- labs/jbosslabs/trunk/portal-extensions/configuration/to-copy-bin/run.conf 2006-07-10 19:03:53 UTC (rev 4981) +++ labs/jbosslabs/trunk/portal-extensions/configuration/to-copy-bin/run.conf 2006-07-10 19:31:02 UTC (rev 4982) @@ -0,0 +1,52 @@ +## -*- shell-script -*- ###################################################### +## ## +## JBoss Bootstrap Script Configuration ## +## ## +############################################################################## + +### $Id: run.conf,v 1.6.4.5 2006/05/12 10:40:36 dimitris Exp $ + +# +# This file is optional; it may be removed if not needed. +# + +# +# Specify the maximum file descriptor limit, use "max" or "maximum" to use +# the default, as queried by the system. +# +# Defaults to "maximum" +# +#MAX_FD="maximum" + +# +# Specify the profiler configuration file to load. +# +# Default is to not load profiler configuration file. +# +#PROFILER="" + +# +# Specify the location of the Java home directory. If set then $JAVA will +# be defined to $JAVA_HOME/bin/java, else $JAVA will be "java". +# +#JAVA_HOME="/opt/java/jdk" + +# +# Specify the exact Java VM executable to use. +# +#JAVA="" + +# +# Specify options to pass to the Java VM. +# +if [ "x$JAVA_OPTS" = "x" ]; then + JAVA_OPTS="-server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000" +fi + +# Sample JPDA settings for remote socket debuging +#JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y" + +# Sample JPDA settings for shared memory debugging +#JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss" + +JAVA_OPTS="$JAVA_OPTS -javaagent:pluggable-instrumentor.jar" \ No newline at end of file |
|
From: <jbo...@li...> - 2006-07-10 19:27:24
|
Author: szimano
Date: 2006-07-10 15:27:16 -0400 (Mon, 10 Jul 2006)
New Revision: 4980
Modified:
labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java
Log:
JBSHOTOKU-86 search
Modified: labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java
===================================================================
--- labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java 2006-07-10 19:12:03 UTC (rev 4979)
+++ labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java 2006-07-10 19:27:16 UTC (rev 4980)
@@ -366,7 +366,7 @@
}
public List<Tag> getAllTags() throws TagGetException {
- List<Tag> result = manager.createQuery("SELECT * FROM TagEntity")
+ List<Tag> result = manager.createQuery("from TagEntity")
.getResultList();
return result;
|
|
From: <jbo...@li...> - 2006-07-10 19:12:07
|
Author: estebanschifman Date: 2006-07-10 15:12:03 -0400 (Mon, 10 Jul 2006) New Revision: 4979 Modified: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/EJB/JbossEsbBatchHandlerBean.java labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/EJB/JbossEsbPersistHandlerBean.java Log: Changed imports. Adjust to repackaging of BobjStore Modified: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/EJB/JbossEsbBatchHandlerBean.java =================================================================== --- labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/EJB/JbossEsbBatchHandlerBean.java 2006-07-10 19:08:30 UTC (rev 4978) +++ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/EJB/JbossEsbBatchHandlerBean.java 2006-07-10 19:12:03 UTC (rev 4979) @@ -33,8 +33,8 @@ import org.apache.log4j.*; import org.jboss.soa.esb.util.*; import org.jboss.soa.esb.helpers.persist.*; +import org.jboss.soa.esb.internal.core.objectstore.*; import org.jboss.soa.esb.common.bizclasses.*; -import org.jboss.soa.esb.services.dbtables.*; /** * @ejb.bean * name="JbossEsbBatchHandler" Modified: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/EJB/JbossEsbPersistHandlerBean.java =================================================================== --- labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/EJB/JbossEsbPersistHandlerBean.java 2006-07-10 19:08:30 UTC (rev 4978) +++ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/EJB/JbossEsbPersistHandlerBean.java 2006-07-10 19:12:03 UTC (rev 4979) @@ -33,7 +33,7 @@ import org.jboss.soa.esb.util.*; import org.jboss.soa.esb.helpers.persist.*; -import org.jboss.soa.esb.services.dbtables.*; +import org.jboss.soa.esb.internal.core.objectstore.*; import org.apache.log4j.*; |
|
From: <jbo...@li...> - 2006-07-10 19:08:39
|
Author: estebanschifman Date: 2006-07-10 15:08:30 -0400 (Mon, 10 Jul 2006) New Revision: 4978 Added: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/AbstractBobjStore.java labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/ItfStorable.java Removed: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/SqlDbTable.java labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/SqlField.java Modified: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/BobjStore.java labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/DaoBatchTable.java labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/DaoIndexTable.java labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/DaoSnapTable.java labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/DaoUidTable.java labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/RowBatch.java Log: Repackage BobjStore class and all persistence details Copied: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore (from rev 4907, labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/dbtables) Copied: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/AbstractBobjStore.java (from rev 4907, labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/helpers/persist/AbstractBobjStore.java) =================================================================== --- labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/helpers/persist/AbstractBobjStore.java 2006-07-05 10:16:58 UTC (rev 4907) +++ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/AbstractBobjStore.java 2006-07-10 19:08:30 UTC (rev 4978) @@ -0,0 +1,193 @@ +/* +* JBoss, Home of Professional Open Source +* Copyright 2006, JBoss Inc., and individual contributors as indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.soa.esb.internal.core.objectstore; + +import org.jboss.soa.esb.util.BaseBusinessObject; + +public abstract class AbstractBobjStore +{ + public static AbstractBobjStore getInstance() + { throw new UnsupportedOperationException( + "getInstance() must be implemented in the derived class"); + } //__________________________________ + + /** + * Array of BobjStore objects. + * @return AbstractBobjStore[] + */ + public abstract AbstractBobjStore[] getBobjStoreTable(); + + /** + * String names for BobjStoreTable. + * @return String[] + */ + public abstract String[] getBobjStoreIndex(); + + protected String m_sSnapType , m_sSnapTbl , m_sLocTbl, m_sClass; + protected boolean m_bEncrypt=false; + + /** + * Snapshot type getter - The value assigned to this attribute will help if + * standard SQL queries are required to surf the Object Store's snapshot tables + * @return String - Value of snapshot type + */ + public String getSnapType() { return m_sSnapType; } + /** + * Snapshot tablename getter - The value assigned to this attribute is the + * name of the snapshot table for this object + * @return String - name of SQL table where snapshots of objects will be stored + */ + public String getSnapTable() { return m_sSnapTbl; } + /** + * Locator tablename getter - Locator table are also called index tables. + * The value assigned to this attribute is the name of the locator table for + * this object + * @return String - name of SQL table where locators for objects will be stored + * @see BusinessObject#getObjLocator() + */ + public String getLocatorTable() { return m_sLocTbl; } + /** + * Encryption requirement getter + * @return boolean - true if Objects stored using this descriptor have to be + * encrypted - decrypted at storage/retrieval time + */ + public boolean isEncrypted() { return m_bEncrypt; } + /** + * Static helper method to obtain the snapshot type by index mnemonic + * @param p_i int - Index of descriptor in static descriptor table + * @return String + * @see BobjStore#getSnapType() + * @see BobjStore#getIndex(Class) + */ + public String getSnapType(int p_i) { return getBobjStoreTable()[p_i].m_sSnapType; } + /** + * Static helper method to obtain the snapshot SQL tablename by index mnemonic + * @param p_i int - Index of descriptor in static descriptor table + * @return String + * @see BobjStore#getSnapTable() + * @see BobjStore#getIndex(Class) + */ + public String getSnapTable(int p_i) { return getBobjStoreTable()[p_i].m_sSnapTbl; } + /** + * Static helper method to obtain the locator SQL tablename by index mnemonic + * @param p_i int - Index of descriptor in static descriptor table + * @return String + * @see BobjStore#getLocatorTable() + * @see BobjStore#getIndex(Class) + */ + public String getLocatorTable(int p_i){ return getBobjStoreTable()[p_i].m_sLocTbl; } + + /** + * + */ + protected AbstractBobjStore() {} + + /** + * Constructor using all fields required by a BobjStore object + * @param p_sSnapType String - Snapshot type + * @param p_sSnapTbl String - Snapshot SQL tablename + * @param p_sLocTbl String - Locator SQL tablename (may be null - No locator table) + * @param p_sCls String - Class name excluding package prefix + * @param p_bCrypt boolean - Does data have to be encrypted in the snap table ? + * @see BusinessObject#classNm() + */ + protected AbstractBobjStore (String p_sSnapType,String p_sSnapTbl, String p_sLocTbl + ,String p_sCls, boolean p_bCrypt) + { m_sSnapType = p_sSnapType; + m_sSnapTbl = p_sSnapTbl; + m_sLocTbl = p_sLocTbl; + m_sClass = p_sCls; + m_bEncrypt = p_bCrypt; + } //________________________________ + + /** + * Constructor for non encrypted BobjStore + * @param p_sSnapType String + * @param p_sSnapTbl String + * @param p_sLocTbl String + * @param p_sCls String + * @see BobjStore#BobjStore(String,String,String,String,boolean) + */ + protected AbstractBobjStore (String p_sSnapType,String p_sSnapTbl, String p_sLocTbl + ,String p_sCls) + { this(p_sSnapType,p_sSnapTbl,p_sLocTbl,p_sCls,false); + } //________________________________ + + /** + * Index in static descriptor table for objects of class <arg 1> + * @param p_oCls Class - BusinessObject class to search for in descriptor table + * @throws Exception + * @return int - index in static descriptor table + */ + public int getIndex (Class p_oCls) throws Exception + { String sClassName = p_oCls.getName() + .substring(1+p_oCls.getName().lastIndexOf(".")); + for (int i1 = 0; i1 < getBobjStoreTable().length; i1++) + if (getBobjStoreIndex()[i1].equals(sClassName)) return i1; + throw new Exception("No BobjStore for class "+p_oCls.getName()); + } //__________________________________ + /** + * Get a BobjStore object that describes persistence details for objects of + * class <arg 1> + * @param p_sClassName String Classname to search for in descriptor table + * @return BobjStore - A descriptor that will provide persistence info + * @see PersistHandler + * @see BobjStore#getStore(BusinessObject) + */ + public AbstractBobjStore getStore (String p_sClassName) + { if (null == p_sClassName) return null; + for (int i1 = 0; i1 < getBobjStoreTable().length; i1++) + { String sTblCls = getBobjStoreIndex()[i1]; + if (p_sClassName.equals(sTblCls)) return getStore(i1); + } + return null; + } //__________________________________ + + /** + * Get a BobjStore object that describes persistence details for the + * object specified in arg 1 + * @param p_o BusinessObject The object whose storage descriptor is requested + * @return BobjStore - A descriptor that will provide persistence info + * @see PersistHandler + * @see BobjStore#getStore(String) + */ + public AbstractBobjStore getStore (BaseBusinessObject p_o) + { return (null != p_o) ? getStore(p_o.classNm()) : null; + } //__________________________________ + + /** + * Get a BobjStore object by mnemonic name (index in the static descriptor table) + * @param p_i int - typically a mnemonic name will be used (see CQ3 constants) + * @return BobjStore - A descriptor that will provide persistence info + * @see PersistHandler + * @see BobjStore#getStore(String) + */ + public AbstractBobjStore getStore (int p_i) + { + AbstractBobjStore oRet = getBobjStoreTable()[p_i]; + + try { return (AbstractBobjStore)oRet.clone(); } + catch (Exception e) {return oRet;} + } //________________________________ + +} //____________________________________________________________________________ Modified: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/BobjStore.java =================================================================== --- labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/dbtables/BobjStore.java 2006-07-05 10:16:58 UTC (rev 4907) +++ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/BobjStore.java 2006-07-10 19:08:30 UTC (rev 4978) @@ -21,7 +21,7 @@ */ -package org.jboss.soa.esb.services.dbtables; +package org.jboss.soa.esb.internal.core.objectstore; import java.util.*; Modified: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/DaoBatchTable.java =================================================================== --- labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/dbtables/DaoBatchTable.java 2006-07-05 10:16:58 UTC (rev 4907) +++ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/DaoBatchTable.java 2006-07-10 19:08:30 UTC (rev 4978) @@ -20,7 +20,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.soa.esb.services.dbtables; +package org.jboss.soa.esb.internal.core.objectstore; import java.sql.*; import org.apache.log4j.*; Modified: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/DaoIndexTable.java =================================================================== --- labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/dbtables/DaoIndexTable.java 2006-07-05 10:16:58 UTC (rev 4907) +++ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/DaoIndexTable.java 2006-07-10 19:08:30 UTC (rev 4978) @@ -20,7 +20,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.soa.esb.services.dbtables; +package org.jboss.soa.esb.internal.core.objectstore; import org.jboss.soa.esb.util.*; import org.jboss.soa.esb.helpers.persist.*; Modified: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/DaoSnapTable.java =================================================================== --- labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/dbtables/DaoSnapTable.java 2006-07-05 10:16:58 UTC (rev 4907) +++ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/DaoSnapTable.java 2006-07-10 19:08:30 UTC (rev 4978) @@ -20,7 +20,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.soa.esb.services.dbtables; +package org.jboss.soa.esb.internal.core.objectstore; import org.jboss.soa.esb.util.*; import org.jboss.soa.esb.helpers.persist.*; Modified: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/DaoUidTable.java =================================================================== --- labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/dbtables/DaoUidTable.java 2006-07-05 10:16:58 UTC (rev 4907) +++ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/DaoUidTable.java 2006-07-10 19:08:30 UTC (rev 4978) @@ -21,7 +21,7 @@ */ -package org.jboss.soa.esb.services.dbtables; +package org.jboss.soa.esb.internal.core.objectstore; import org.jboss.soa.esb.helpers.persist.*; import org.jboss.soa.esb.util.*; Copied: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/ItfStorable.java (from rev 4907, labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/helpers/persist/ItfStorable.java) =================================================================== --- labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/helpers/persist/ItfStorable.java 2006-07-05 10:16:58 UTC (rev 4907) +++ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/ItfStorable.java 2006-07-10 19:08:30 UTC (rev 4978) @@ -0,0 +1,38 @@ +/* +* JBoss, Home of Professional Open Source +* Copyright 2006, JBoss Inc., and individual contributors as indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software 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 +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.soa.esb.internal.core.objectstore; + +/** + * Provides methods to learn about how and where a BusinessObject will be stored + * and retrieved from a BobjStore + * @see BobjStore + */ + +public interface ItfStorable +{ + public String getSnapType (); + public String getSnapTable (); + public String getLocatorTable (); + public String getLocatorTable (int p_i); + public boolean isEncrypted (); +} // ___________________________________________________________________________ Modified: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/RowBatch.java =================================================================== --- labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/dbtables/RowBatch.java 2006-07-05 10:16:58 UTC (rev 4907) +++ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/RowBatch.java 2006-07-10 19:08:30 UTC (rev 4978) @@ -20,7 +20,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.soa.esb.services.dbtables; +package org.jboss.soa.esb.internal.core.objectstore; public class RowBatch { Deleted: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/SqlDbTable.java =================================================================== --- labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/dbtables/SqlDbTable.java 2006-07-05 10:16:58 UTC (rev 4907) +++ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/SqlDbTable.java 2006-07-10 19:08:30 UTC (rev 4978) @@ -1,178 +0,0 @@ -/* -* JBoss, Home of Professional Open Source -* Copyright 2006, JBoss Inc., and individual contributors as indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software 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 -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ - - -package org.jboss.soa.esb.services.dbtables; - -import org.jboss.soa.esb.helpers.persist.*; - -import java.sql.*; - -public abstract class SqlDbTable -{ - protected String m_sTableName; - protected SqlField [] m_oaFields; - - protected PreparedStatement[] m_oaPS; - private JdbcCleanConn m_oConn; - public JdbcCleanConn getConn() { return m_oConn; } - - - public final String getTableName() { return m_sTableName; } - public final SqlField[] getAllFields() { return m_oaFields; } - - private String m_sInsertSql, m_sUpdateSql, m_sDeleteSql; - protected String m_sSelectSql; - - public SqlDbTable(JdbcCleanConn p_oC, String p_sTblNm) throws Exception - { m_oConn = p_oC; - m_sTableName = p_sTblNm; - initFields(); - } //________________________________ - - /** - * Sets values of all columns in underlying table - * - * <p>Developers should use this class's setObject or setLong methods - * @param p_PS PreparedStatement - * @param bobj BusinessObject - * @return the number of fields that were set - * @throws Exception - */ - public abstract int setInsValues(PreparedStatement p_PS,Object bobj) - throws Exception; - public abstract Object getFromRS(ResultSet p_oRS) - throws Exception; - - protected abstract String getSelectFields(); - - public String getFldName(int p_i) - { return (null ==m_oaFields) ? null - : (p_i < 0) ? null - : (p_i >= m_oaFields.length) ? null - : m_oaFields[p_i].getFieldName(); - } //________________________________ - - public String getSelectStatement() - { if ( m_sSelectSql != null ) return m_sSelectSql; - StringBuffer sb=new StringBuffer("select ").append(getSelectFields()); - m_sSelectSql = sb.append(" from ").append(getTableName()).toString(); - return m_sSelectSql; - } //________________________________ - - public String getInsertStatement() - { - if ( m_sInsertSql != null ) return m_sInsertSql; - - StringBuffer sb=new StringBuffer(256); - sb.append("insert into ").append(getTableName()); - - sb.append(" values ("); - for (int i = 0; i <m_oaFields.length; i++) ((i<1)?sb:sb.append(",")).append('?'); - sb.append(')'); - - return (m_sInsertSql = sb.toString()); - } //________________________________ - - public String getUpdateStatement() - { - if ( m_sUpdateSql != null ) return m_sUpdateSql; - - StringBuffer sb=new StringBuffer(256); - sb.append("update ").append(getTableName()).append(" set "); - - StringBuffer sbWhere = new StringBuffer(" where "); - - int iVal = 0; - int iWh = 0; - for (int i = 0; i <m_oaFields.length; i++) - { SqlField oCurr = m_oaFields[i]; - if (oCurr.isPrimaryKey()) - ((iWh++<1)?sbWhere:sbWhere.append(" and ")) - .append(oCurr.getFieldName()).append(" = ?"); - else - ((iVal++<1)?sb:sb.append(",")) - .append(oCurr.getFieldName()).append(" = ?"); - } - sb.append(sbWhere); - - return (m_sUpdateSql = sb.toString()); - } //________________________________ - - public String getDeleteStatement() - { - if ( m_sDeleteSql != null ) return m_sDeleteSql; - - StringBuffer sb=new StringBuffer(256); - sb.append("delete from ").append(getTableName()) - .append(" where "); - - int iWh = 0; - for (int i = 0; i <m_oaFields.length; i++) - { SqlField oCurr = m_oaFields[i]; - if (! oCurr.isPrimaryKey()) continue; - ((iWh++<1)?sb:sb.append(" and ")) - .append(oCurr.getFieldName()).append(" = ?"); - } - - return (m_sDeleteSql = sb.toString()); - } //________________________________ - - public void setObject(PreparedStatement p_PS, int p_iFld, Object p_sFldVal) - throws SQLException - { if (null!=p_sFldVal) - if (p_sFldVal instanceof String) - { String sTr = ((String)p_sFldVal).trim(); - p_sFldVal = (sTr.length()>0) ? sTr : null; - } - ; - int iSqlIdx = 1 + p_iFld; - if (null==p_sFldVal)p_PS.setNull (iSqlIdx, m_oaFields[p_iFld].getSqlType()); - else p_PS.setObject (iSqlIdx, p_sFldVal); - } //________________________________ - - public void setLong(PreparedStatement p_PS, int p_iFld, long p_lVal) - throws SQLException - { p_PS.setLong(1+p_iFld,p_lVal); - } //________________________________ - - public void setInt(PreparedStatement p_PS, int p_iFld, int p_iVal) - throws SQLException - { p_PS.setInt(1+p_iFld,p_iVal); - } //________________________________ - - private void initFields() throws Exception - { PreparedStatement PS = m_oConn.prepareStatement(getSelectStatement()); - - ResultSetMetaData MD = m_oConn.execQueryWait(PS,3).getMetaData(); - m_oaFields = new SqlField[MD.getColumnCount()]; - for (int i1=0; i1<m_oaFields.length;i1++) - { int iCol = 1+i1; - String sFN = MD.getColumnName(iCol); - Class oCL = Class.forName(MD.getColumnClassName(iCol)); - int iTP = MD.getColumnType(iCol); - int iSZ = MD.getColumnDisplaySize(iCol); - m_oaFields[i1] = new SqlField(sFN,oCL,iTP,iSZ,false); - } - PS.close(); - } //________________________________ -} //____________________________________________________________________________ Deleted: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/SqlField.java =================================================================== --- labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/services/dbtables/SqlField.java 2006-07-05 10:16:58 UTC (rev 4907) +++ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/objectstore/SqlField.java 2006-07-10 19:08:30 UTC (rev 4978) @@ -1,64 +0,0 @@ -/* -* JBoss, Home of Professional Open Source -* Copyright 2006, JBoss Inc., and individual contributors as indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software 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 -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ - - -package org.jboss.soa.esb.services.dbtables; - -public class SqlField -{ - private int m_sqlType; - private Class m_javaType; - private int m_sqlLength; - private String m_fieldName; - private boolean m_primaryKey; - - /** - * SqlField - * - * @param pFldName String - * @param pJavaType Class - * @param pSqlType int - * @param pFieldLength int - * @param pk boolean Is primary key ? - */ - public SqlField(String pFldName,Class pJavaType,int pSqlType - ,int pFieldLength, boolean pk) - { - m_fieldName = pFldName; - m_javaType = pJavaType; - m_sqlType = pSqlType; - m_sqlLength = pFieldLength; - m_primaryKey = pk; - } - - public int getSqlType() { return m_sqlType; } - public Class getJavaType() { return m_javaType; } - public int getSqlLength() { return this.m_sqlLength; } - public String getFieldName() { return this.m_fieldName; } - public boolean isPrimaryKey() { return this.m_primaryKey; } - - public void setSqlType(int pSqlType) { m_sqlType = pSqlType; } - public void setJavaType(Class pJavaType) { m_javaType = pJavaType; } - public void setSqlLength(int pSqlLength) { m_sqlLength = pSqlLength; } - public void setFieldName(String pFieldName) { m_fieldName = pFieldName; } - public void setPrimaryKey(boolean pPrimaryKey) { m_primaryKey = pPrimaryKey; } -} //____________________________________________________________________________ |
|
From: <jbo...@li...> - 2006-07-10 19:08:31
|
Author: estebanschifman Date: 2006-07-10 15:08:26 -0400 (Mon, 10 Jul 2006) New Revision: 4977 Added: labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/ labs/jbossesb/trunk/ESBCore/services/src/org/jboss/soa/esb/internal/core/ Log: Repackage BobjStore class and all persistence details |
|
From: <jbo...@li...> - 2006-07-10 19:05:32
|
Author: estebanschifman
Date: 2006-07-10 15:05:27 -0400 (Mon, 10 Jul 2006)
New Revision: 4976
Modified:
labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/util/BaseBusinessObject.java
Log:
References to ItfStorable removed.
Now BaseBusinessObject knows NOTHING about it's own persistence
Modified: labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/util/BaseBusinessObject.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/util/BaseBusinessObject.java 2006-07-10 19:04:06 UTC (rev 4975)
+++ labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/util/BaseBusinessObject.java 2006-07-10 19:05:27 UTC (rev 4976)
@@ -25,8 +25,6 @@
import java.util.*;
import java.lang.reflect.*;
-import org.jboss.soa.esb.helpers.persist.ItfStorable;
-
public class BaseBusinessObject
{
public BobjStdDTO toDTO() throws Exception { return getBaseDTO(); }
@@ -177,8 +175,8 @@
protected void putStdAtts(BobjStdDTO p_oRet)
{ try
{ p_oRet.addAttr(ATTRIB.rol.toString(),getRole());
- if (this instanceof ItfStorable)
- p_oRet.addAttr(HIDDEN.type.toString(),((ItfStorable)this).getSnapType());
+// if (this instanceof XtfStorable)
+// p_oRet.addAttr(HIDDEN.type.toString(),((XtfStorable)this).getSnapType());
if (m_lStamp > 0) p_oRet.addAttr(HIDDEN.stamp.toString()
,Long.toString(m_lStamp));
if (m_lLastSnap > 0) p_oRet.addAttr(HIDDEN.snap.toString()
|
|
From: <jbo...@li...> - 2006-07-10 19:04:15
|
Author: estebanschifman Date: 2006-07-10 15:04:06 -0400 (Mon, 10 Jul 2006) New Revision: 4975 Removed: labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/helpers/persist/ItfStorable.java Log: Interface ItfStorable moved to 'services' directory and repackaged (org.jboss.soa.esb.internal.core.objectstore) Deleted: labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/helpers/persist/ItfStorable.java =================================================================== --- labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/helpers/persist/ItfStorable.java 2006-07-10 19:03:52 UTC (rev 4974) +++ labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/helpers/persist/ItfStorable.java 2006-07-10 19:04:06 UTC (rev 4975) @@ -1,37 +0,0 @@ -/* -* JBoss, Home of Professional Open Source -* Copyright 2006, JBoss Inc., and individual contributors as indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software 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 -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ - -package org.jboss.soa.esb.helpers.persist; - -/** - * Provides methods to learn about how and where a BusinessObject will be stored - * and retrieved from a BobjStore - * @see BobjStore - */ - -public interface ItfStorable -{ - public String getSnapType(); - public String getSnapTable(); - public String getLocatorTable(); - public boolean isEncrypted(); -} // ___________________________________________________________________________ |
|
From: <jbo...@li...> - 2006-07-10 19:03:59
|
Author: szimano
Date: 2006-07-10 15:03:52 -0400 (Mon, 10 Jul 2006)
New Revision: 4974
Modified:
labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java
Log:
JBSHOTOKU-86 search modify
Modified: labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java
===================================================================
--- labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java 2006-07-10 19:02:01 UTC (rev 4973)
+++ labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java 2006-07-10 19:03:52 UTC (rev 4974)
@@ -375,6 +375,8 @@
public List<Tag> searchTags(String tag, String author, String keyword) {
List<Tag> searchResult = new ArrayList<Tag>();
+ log.info("'" + tag + "' '" + author + "' '" + keyword + "'");
+
TagSearch tagSearch = new TagSearch(tag, author, keyword);
try {
|
|
From: <jbo...@li...> - 2006-07-10 19:02:07
|
Author: estebanschifman Date: 2006-07-10 15:02:01 -0400 (Mon, 10 Jul 2006) New Revision: 4973 Removed: labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/helpers/persist/AbstractBobjStore.java Log: Remove unnecessary references to internal objects used in the object store Deleted: labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/helpers/persist/AbstractBobjStore.java =================================================================== --- labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/helpers/persist/AbstractBobjStore.java 2006-07-10 18:27:02 UTC (rev 4972) +++ labs/jbossesb/trunk/ESBCore/common/src/org/jboss/soa/esb/helpers/persist/AbstractBobjStore.java 2006-07-10 19:02:01 UTC (rev 4973) @@ -1,197 +0,0 @@ -/* -* JBoss, Home of Professional Open Source -* Copyright 2006, JBoss Inc., and individual contributors as indicated -* by the @authors tag. See the copyright.txt in the distribution for a -* full listing of individual contributors. -* -* This is free software; you can redistribute it and/or modify it -* under the terms of the GNU Lesser General Public License as -* published by the Free Software Foundation; either version 2.1 of -* the License, or (at your option) any later version. -* -* This software 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 -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this software; if not, write to the Free -* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -* 02110-1301 USA, or see the FSF site: http://www.fsf.org. -*/ - -package org.jboss.soa.esb.helpers.persist; - -import org.jboss.soa.esb.util.BaseBusinessObject; - -public abstract class AbstractBobjStore -{ - public static AbstractBobjStore getInstance() - { throw new UnsupportedOperationException( - "getInstance() must be implemented in the derived class"); - } //__________________________________ - - /** - * Array of BobjStore objects. - * @return AbstractBobjStore[] - */ - public abstract AbstractBobjStore[] getBobjStoreTable(); - - /** - * String names for BobjStoreTable. - * @return String[] - */ - public abstract String[] getBobjStoreIndex(); - - protected String m_sSnapType , m_sSnapTbl , m_sLocTbl, m_sClass; - protected boolean m_bEncrypt=false; - - /** - * Snapshot type getter - The value assigned to this attribute will help if - * standard SQL queries are required to surf the Object Store's snapshot tables - * @return String - Value of snapshot type - * @see ItfStorable#getSnapType() - */ - public String getSnapType() { return m_sSnapType; } - /** - * Snapshot tablename getter - The value assigned to this attribute is the - * name of the snapshot table for this object - * @return String - name of SQL table where snapshots of objects will be stored - * @see ItfStorable#getSnapTable() - */ - public String getSnapTable() { return m_sSnapTbl; } - /** - * Locator tablename getter - Locator table are also called index tables. - * The value assigned to this attribute is the name of the locator table for - * this object - * @return String - name of SQL table where locators for objects will be stored - * @see ItfStorable#getLocatorTable() - * @see BusinessObject#getObjLocator() - */ - public String getLocatorTable() { return m_sLocTbl; } - /** - * Encryption requirement getter - * @return boolean - true if Objects stored using this descriptor have to be - * encrypted - decrypted at storage/retrieval time - */ - public boolean isEncrypted() { return m_bEncrypt; } - /** - * Static helper method to obtain the snapshot type by index mnemonic - * @param p_i int - Index of descriptor in static descriptor table - * @return String - * @see BobjStore#getSnapType() - * @see BobjStore#getIndex(Class) - */ - public String getSnapType(int p_i) { return getBobjStoreTable()[p_i].m_sSnapType; } - /** - * Static helper method to obtain the snapshot SQL tablename by index mnemonic - * @param p_i int - Index of descriptor in static descriptor table - * @return String - * @see BobjStore#getSnapTable() - * @see BobjStore#getIndex(Class) - */ - public String getSnapTable(int p_i) { return getBobjStoreTable()[p_i].m_sSnapTbl; } - /** - * Static helper method to obtain the locator SQL tablename by index mnemonic - * @param p_i int - Index of descriptor in static descriptor table - * @return String - * @see BobjStore#getLocatorTable() - * @see BobjStore#getIndex(Class) - */ - public String getLocatorTable(int p_i){ return getBobjStoreTable()[p_i].m_sLocTbl; } - - /** - * - */ - protected AbstractBobjStore() {} - - /** - * Constructor using all fields required by a BobjStore object - * @param p_sSnapType String - Snapshot type - * @param p_sSnapTbl String - Snapshot SQL tablename - * @param p_sLocTbl String - Locator SQL tablename (may be null - No locator table) - * @param p_sCls String - Class name excluding package prefix - * @param p_bCrypt boolean - Does data have to be encrypted in the snap table ? - * @see ItfStorable - * @see BusinessObject#classNm() - */ - protected AbstractBobjStore (String p_sSnapType,String p_sSnapTbl, String p_sLocTbl - ,String p_sCls, boolean p_bCrypt) - { m_sSnapType = p_sSnapType; - m_sSnapTbl = p_sSnapTbl; - m_sLocTbl = p_sLocTbl; - m_sClass = p_sCls; - m_bEncrypt = p_bCrypt; - } //________________________________ - - /** - * Constructor for non encrypted BobjStore - * @param p_sSnapType String - * @param p_sSnapTbl String - * @param p_sLocTbl String - * @param p_sCls String - * @see BobjStore#BobjStore(String,String,String,String,boolean) - */ - protected AbstractBobjStore (String p_sSnapType,String p_sSnapTbl, String p_sLocTbl - ,String p_sCls) - { this(p_sSnapType,p_sSnapTbl,p_sLocTbl,p_sCls,false); - } //________________________________ - - /** - * Index in static descriptor table for objects of class <arg 1> - * @param p_oCls Class - BusinessObject class to search for in descriptor table - * @throws Exception - * @return int - index in static descriptor table - */ - public int getIndex (Class p_oCls) throws Exception - { String sClassName = p_oCls.getName() - .substring(1+p_oCls.getName().lastIndexOf(".")); - for (int i1 = 0; i1 < getBobjStoreTable().length; i1++) - if (getBobjStoreIndex()[i1].equals(sClassName)) return i1; - throw new Exception("No BobjStore for class "+p_oCls.getName()); - } //__________________________________ - /** - * Get a BobjStore object that describes persistence details for objects of - * class <arg 1> - * @param p_sClassName String Classname to search for in descriptor table - * @return BobjStore - A descriptor that will provide persistence info - * @see PersistHandler - * @see BobjStore#getStore(BusinessObject) - */ - public AbstractBobjStore getStore (String p_sClassName) - { if (null == p_sClassName) return null; - for (int i1 = 0; i1 < getBobjStoreTable().length; i1++) - { String sTblCls = getBobjStoreIndex()[i1]; - if (p_sClassName.equals(sTblCls)) return getStore(i1); - } - return null; - } //__________________________________ - - /** - * Get a BobjStore object that describes persistence details for the - * object specified in arg 1 - * @param p_o BusinessObject The object whose storage descriptor is requested - * @return BobjStore - A descriptor that will provide persistence info - * @see PersistHandler - * @see BobjStore#getStore(String) - */ - public AbstractBobjStore getStore (BaseBusinessObject p_o) - { return (null != p_o) ? getStore(p_o.classNm()) : null; - } //__________________________________ - - /** - * Get a BobjStore object by mnemonic name (index in the static descriptor table) - * @param p_i int - typically a mnemonic name will be used (see CQ3 constants) - * @return BobjStore - A descriptor that will provide persistence info - * @see PersistHandler - * @see BobjStore#getStore(String) - */ - public AbstractBobjStore getStore (int p_i) - { - AbstractBobjStore oRet = getBobjStoreTable()[p_i]; - - try { return (AbstractBobjStore)oRet.clone(); } - catch (Exception e) {return oRet;} - } //________________________________ - -} //____________________________________________________________________________ |
|
From: <jbo...@li...> - 2006-07-10 18:27:06
|
Author: arvinder Date: 2006-07-10 14:27:02 -0400 (Mon, 10 Jul 2006) New Revision: 4972 Added: labs/jbossesb/branches/refactor/lib/ext/junit.jar Log: Added junit.jar as it is required for running the unit tests Added: labs/jbossesb/branches/refactor/lib/ext/junit.jar =================================================================== (Binary files differ) Property changes on: labs/jbossesb/branches/refactor/lib/ext/junit.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
|
From: <jbo...@li...> - 2006-07-10 18:15:43
|
Author: arvinder Date: 2006-07-10 14:15:39 -0400 (Mon, 10 Jul 2006) New Revision: 4971 Removed: labs/jbossesb/branches/refactor/ESBCore/tests/bin/ Log: Removed bin directory as this should not exist here |
|
From: <jbo...@li...> - 2006-07-10 18:15:01
|
Author: arvinder
Date: 2006-07-10 14:14:58 -0400 (Mon, 10 Jul 2006)
New Revision: 4970
Removed:
labs/jbossesb/branches/refactor/ESBCore/tests/realbuild.xml
Log:
Removed unused file
Deleted: labs/jbossesb/branches/refactor/ESBCore/tests/realbuild.xml
===================================================================
--- labs/jbossesb/branches/refactor/ESBCore/tests/realbuild.xml 2006-07-10 18:08:18 UTC (rev 4969)
+++ labs/jbossesb/branches/refactor/ESBCore/tests/realbuild.xml 2006-07-10 18:14:58 UTC (rev 4970)
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<project name="BuildEsbTests" default="org.jboss.esb.tests.compile" basedir=".">
-
- <property name="org.jboss.esb.tests.bin.dir" value="${org.jboss.esb.internal.dest}/tests"/>
- <property name="org.jboss.esb.core.bin.dir" value="${org.jboss.esb.internal.dest}/classes"/>
- <property name="org.jboss.esb.tests.src.dir" value="${basedir}/src"/>
- <property name="org.jboss.esb.root.dir" value="../.."/>
- <property environment="env"/>
-
- <property name="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.root.dir}/lib/ext"/>
- <condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/client">
- <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
- </condition>
-
- <path id="org.jboss.esb.tests.base.classpath">
- <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
- <pathelement location="${org.jboss.esb.core.bin.dir}"/>
- </path>
-
- <target name="org.jboss.esb.tests.init">
- <tstamp>
- <format property="TODAY" pattern="d-MM-yy"/>
- </tstamp>
-
- <mkdir dir="${org.jboss.esb.tests.bin.dir}"/>
- </target>
-
- <target name="clean"/>
-
- <target name="purge" depends="clean">
- <delete dir="${org.jboss.esb.tests.bin.dir}"/>
- </target>
-
- <target name="org.jboss.esb.tests.compile" if="org.jboss.esb.buildtests" depends="org.jboss.esb.tests.init">
-
- <javac
- destdir="${org.jboss.esb.tests.bin.dir}"
- classpathref="org.jboss.esb.tests.base.classpath"
- debug="${org.jboss.esb.debug}"
- optimize="${org.jboss.esb.optimize}"
- >
- <src path="${org.jboss.esb.tests.src.dir}"/>
- </javac>
-
- </target>
-
-</project>
|
|
From: <jbo...@li...> - 2006-07-10 18:08:21
|
Author: arvinder
Date: 2006-07-10 14:08:18 -0400 (Mon, 10 Jul 2006)
New Revision: 4969
Modified:
labs/jbossesb/branches/refactor/ESBCore/tests/build.xml
Log:
Moved contents of realbuild.xml into build.xml
Modified: labs/jbossesb/branches/refactor/ESBCore/tests/build.xml
===================================================================
--- labs/jbossesb/branches/refactor/ESBCore/tests/build.xml 2006-07-10 18:03:13 UTC (rev 4968)
+++ labs/jbossesb/branches/refactor/ESBCore/tests/build.xml 2006-07-10 18:08:18 UTC (rev 4969)
@@ -1,63 +1,47 @@
<?xml version="1.0"?>
-<project name="BuildTestClasses" default="compile" basedir=".">
+<project name="BuildEsbTests" default="org.jboss.esb.tests.compile" basedir=".">
- <property name="jar.name" value="jboss_esb_tests"/>
- <property name="distrib.dir" value="../dist"/>
- <property name="bin.dir" value="${basedir}/bin"/>
- <property name="src.dir" value="${basedir}/src"/>
+ <property name="org.jboss.esb.tests.bin.dir" value="${org.jboss.esb.internal.dest}/tests"/>
+ <property name="org.jboss.esb.core.bin.dir" value="${org.jboss.esb.internal.dest}/classes"/>
+ <property name="org.jboss.esb.tests.src.dir" value="${basedir}/src"/>
+ <property name="org.jboss.esb.root.dir" value="../.."/>
<property environment="env"/>
- <path id="base.class.path">
- <fileset dir="${env.JBOSS_HOME}/client" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
- </path>
+ <property name="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.root.dir}/lib/ext"/>
+ <condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/client">
+ <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+ </condition>
- <path id="default.class.path">
- <path refid="base.class.path"/>
- <pathelement location="../EsbCommon/bin"/>
- <pathelement location="../EsbServices/bin"/>
+ <path id="org.jboss.esb.tests.base.classpath">
+ <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
+ <pathelement location="${org.jboss.esb.core.bin.dir}"/>
</path>
- <target name="init">
+ <target name="org.jboss.esb.tests.init">
<tstamp>
<format property="TODAY" pattern="d-MM-yy"/>
</tstamp>
- </target>
- <target name="prepare" depends="init">
- <mkdir dir="${bin.dir}"/>
- <mkdir dir="${distrib.dir}"/>
+ <mkdir dir="${org.jboss.esb.tests.bin.dir}"/>
</target>
- <target name="clean" description="Remove bin directory">
- <delete dir="${bin.dir}"/>
- </target>
+ <target name="clean"/>
- <target name="compile" depends="prepare"
- description="Compile all classes">
+ <target name="purge" depends="clean">
+ <delete dir="${org.jboss.esb.tests.bin.dir}"/>
+ </target>
+ <target name="org.jboss.esb.tests.compile" if="org.jboss.esb.buildtests" depends="org.jboss.esb.tests.init">
+
<javac
- destdir="${bin.dir}"
- classpathref="default.class.path"
- debug="on"
- optimize="off"
+ destdir="${org.jboss.esb.tests.bin.dir}"
+ classpathref="org.jboss.esb.tests.base.classpath"
+ debug="${org.jboss.esb.debug}"
+ optimize="${org.jboss.esb.optimize}"
>
- <src path="${src.dir}"/>
+ <src path="${org.jboss.esb.tests.src.dir}"/>
</javac>
</target>
- <target name="recompile" depends="clean,compile"
- description="Clean and compile"/>
-
- <target name="jar" depends="compile" description="Assemble jar files">
- <delete file="${distrib.dir}/${jar.name}.jar" />
- <jar destfile="${distrib.dir}/${jar.name}.jar"
- basedir="${bin.dir}"
- includes="**/*.class"
- excludes="test/**"
- />
- </target>
-
- <target name="all" depends="recompile,jar" />
-
</project>
|
Author: arvinder
Date: 2006-07-10 14:03:13 -0400 (Mon, 10 Jul 2006)
New Revision: 4968
Added:
labs/jbossesb/branches/refactor/ESBCore/tests/
labs/jbossesb/branches/refactor/ESBCore/tests/bin/
labs/jbossesb/branches/refactor/ESBCore/tests/build.xml
labs/jbossesb/branches/refactor/ESBCore/tests/realbuild.xml
labs/jbossesb/branches/refactor/ESBCore/tests/src/
labs/jbossesb/branches/refactor/ESBCore/tests/src/org/
labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/
labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/
labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/
labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/
labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/Controller.java
labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/DrainQueuesAndTopics.java
labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestNotification.java
labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestObjStore.java
labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestParamsRepository.java
labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestPersonAddrPhone.java
Log:
Delete Tests directory and renamed to tests
Added: labs/jbossesb/branches/refactor/ESBCore/tests/build.xml
===================================================================
--- labs/jbossesb/branches/refactor/ESBCore/tests/build.xml 2006-07-10 18:01:44 UTC (rev 4967)
+++ labs/jbossesb/branches/refactor/ESBCore/tests/build.xml 2006-07-10 18:03:13 UTC (rev 4968)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<project name="BuildTestClasses" default="compile" basedir=".">
+
+ <property name="jar.name" value="jboss_esb_tests"/>
+ <property name="distrib.dir" value="../dist"/>
+ <property name="bin.dir" value="${basedir}/bin"/>
+ <property name="src.dir" value="${basedir}/src"/>
+ <property environment="env"/>
+
+ <path id="base.class.path">
+ <fileset dir="${env.JBOSS_HOME}/client" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
+ </path>
+
+ <path id="default.class.path">
+ <path refid="base.class.path"/>
+ <pathelement location="../EsbCommon/bin"/>
+ <pathelement location="../EsbServices/bin"/>
+ </path>
+
+ <target name="init">
+ <tstamp>
+ <format property="TODAY" pattern="d-MM-yy"/>
+ </tstamp>
+ </target>
+
+ <target name="prepare" depends="init">
+ <mkdir dir="${bin.dir}"/>
+ <mkdir dir="${distrib.dir}"/>
+ </target>
+
+ <target name="clean" description="Remove bin directory">
+ <delete dir="${bin.dir}"/>
+ </target>
+
+ <target name="compile" depends="prepare"
+ description="Compile all classes">
+
+ <javac
+ destdir="${bin.dir}"
+ classpathref="default.class.path"
+ debug="on"
+ optimize="off"
+ >
+ <src path="${src.dir}"/>
+ </javac>
+
+ </target>
+
+ <target name="recompile" depends="clean,compile"
+ description="Clean and compile"/>
+
+ <target name="jar" depends="compile" description="Assemble jar files">
+ <delete file="${distrib.dir}/${jar.name}.jar" />
+ <jar destfile="${distrib.dir}/${jar.name}.jar"
+ basedir="${bin.dir}"
+ includes="**/*.class"
+ excludes="test/**"
+ />
+ </target>
+
+ <target name="all" depends="recompile,jar" />
+
+</project>
Added: labs/jbossesb/branches/refactor/ESBCore/tests/realbuild.xml
===================================================================
--- labs/jbossesb/branches/refactor/ESBCore/tests/realbuild.xml 2006-07-10 18:01:44 UTC (rev 4967)
+++ labs/jbossesb/branches/refactor/ESBCore/tests/realbuild.xml 2006-07-10 18:03:13 UTC (rev 4968)
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<project name="BuildEsbTests" default="org.jboss.esb.tests.compile" basedir=".">
+
+ <property name="org.jboss.esb.tests.bin.dir" value="${org.jboss.esb.internal.dest}/tests"/>
+ <property name="org.jboss.esb.core.bin.dir" value="${org.jboss.esb.internal.dest}/classes"/>
+ <property name="org.jboss.esb.tests.src.dir" value="${basedir}/src"/>
+ <property name="org.jboss.esb.root.dir" value="../.."/>
+ <property environment="env"/>
+
+ <property name="org.jboss.esb.ext.lib.dir" value="${org.jboss.esb.root.dir}/lib/ext"/>
+ <condition property="org.jboss.esb.ext.lib.dir" value="{org.jboss.esb.jboss.home}/client">
+ <equals arg1="${org.jboss.esb.frominstall}" arg2="yes"/>
+ </condition>
+
+ <path id="org.jboss.esb.tests.base.classpath">
+ <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="activation.jar jbossall-client.jar log4j.jar mail.jar"/>
+ <pathelement location="${org.jboss.esb.core.bin.dir}"/>
+ </path>
+
+ <target name="org.jboss.esb.tests.init">
+ <tstamp>
+ <format property="TODAY" pattern="d-MM-yy"/>
+ </tstamp>
+
+ <mkdir dir="${org.jboss.esb.tests.bin.dir}"/>
+ </target>
+
+ <target name="clean"/>
+
+ <target name="purge" depends="clean">
+ <delete dir="${org.jboss.esb.tests.bin.dir}"/>
+ </target>
+
+ <target name="org.jboss.esb.tests.compile" if="org.jboss.esb.buildtests" depends="org.jboss.esb.tests.init">
+
+ <javac
+ destdir="${org.jboss.esb.tests.bin.dir}"
+ classpathref="org.jboss.esb.tests.base.classpath"
+ debug="${org.jboss.esb.debug}"
+ optimize="${org.jboss.esb.optimize}"
+ >
+ <src path="${org.jboss.esb.tests.src.dir}"/>
+ </javac>
+
+ </target>
+
+</project>
Property changes on: labs/jbossesb/branches/refactor/ESBCore/tests/realbuild.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/Controller.java
===================================================================
--- labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/Controller.java 2006-07-10 18:01:44 UTC (rev 4967)
+++ labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/Controller.java 2006-07-10 18:03:13 UTC (rev 4968)
@@ -0,0 +1,56 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.tests;
+
+import java.lang.reflect.*;
+
+public class Controller
+{
+ private static String[] s_saArgs;
+ static String[] getArgs() { return s_saArgs; }
+ public static void main(String[] args) throws Exception
+ { s_saArgs = args; new Controller(); }
+
+ private Controller() throws Exception
+ {
+ // build this Class[] with the list of classes you wish to test
+ // Tested classes should have a public constructor with no arguments
+
+ Class[] oaTest =
+ {
+// TestParamsRepository.class
+// ,TestPersonAddrPhone.class
+// ,TestObjStore.class
+// ,TestNotification.class
+ DrainQueuesAndTopics.class
+ };
+
+ for (Class oCls : oaTest)
+ {
+ Constructor oConst = oCls.getConstructor(new Class[] {});
+ oConst.newInstance(new Object[] {});
+ }
+
+ Thread.sleep(500);
+ } //________________________________
+
+} //____________________________________________________________________________
Added: labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/DrainQueuesAndTopics.java
===================================================================
--- labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/DrainQueuesAndTopics.java 2006-07-10 18:01:44 UTC (rev 4967)
+++ labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/DrainQueuesAndTopics.java 2006-07-10 18:03:13 UTC (rev 4968)
@@ -0,0 +1,92 @@
+package org.jboss.soa.esb.tests;
+
+import javax.jms.*;
+import javax.naming.*;
+
+import org.jboss.soa.esb.helpers.*;
+
+public class DrainQueuesAndTopics
+{
+ private static final int MAX_TIMES_NOMSG = 10;
+ private static final String JNDI_URL = "localhost";
+ private static final String JNDI_TYPE
+ = AppServerContext.SERVER_TYPE.jboss.toString();
+
+ private Context m_oCtx;
+
+ public DrainQueuesAndTopics() throws Exception
+ {
+ purgeQueueTopic("queue/A");
+ purgeQueueTopic("queue/B");
+ purgeQueueTopic("topic/testTopic");
+ } //__________________________________
+
+ public int purgeQueueTopic(String p_sName) throws Exception
+ {
+ int iRet = 0;
+ m_oCtx = AppServerContext.getServerContext(JNDI_TYPE,JNDI_URL);
+
+ System.out.println(p_sName);
+ MessageConsumer oCns = null;
+ switch(p_sName.toLowerCase().charAt(0))
+ { case 't' : oCns = getTopic(p_sName); break;
+ case 'q' : oCns = getQueue(p_sName); break;
+ }
+ if (null==oCns)
+ return 0;
+
+ for (int iNoRcv=0; iNoRcv < MAX_TIMES_NOMSG; )
+ { Message oMsg = oCns.receive(200);
+ if (null==oMsg)
+ { iNoRcv++;
+ System.out.print(".");
+ continue;
+ }
+ iRet++;
+ dumpMessage(oMsg);
+ iNoRcv = 0;
+ }
+ System.out.println();
+ return iRet;
+ } //__________________________________
+
+ void dumpMessage(Message pM)
+ {
+ System.out.println(pM);
+ } //__________________________________
+
+ QueueReceiver getQueue(String p_sJndi) throws Exception
+ {
+ QueueConnection oQconn = null;
+ QueueSession oQsess = null;
+ QueueConnectionFactory qcf = (QueueConnectionFactory) m_oCtx
+ .lookup("ConnectionFactory");
+
+ oQconn = qcf.createQueueConnection();
+ oQsess = oQconn.createQueueSession(false
+ ,QueueSession.AUTO_ACKNOWLEDGE);
+ javax.jms.Queue oQueue
+ = (javax.jms.Queue) m_oCtx.lookup(p_sJndi);
+
+ QueueReceiver oRcv = oQsess.createReceiver(oQueue);
+ oQconn.start();
+ return oRcv;
+ } //__________________________________
+
+ TopicSubscriber getTopic(String p_sJndi) throws Exception
+ {
+ TopicConnection oTconn = null;
+ TopicSession oTsess = null;
+ TopicConnectionFactory qcf = (TopicConnectionFactory) m_oCtx
+ .lookup("ConnectionFactory");
+
+ oTconn = qcf.createTopicConnection();
+ oTsess = oTconn.createTopicSession(false
+ ,QueueSession.AUTO_ACKNOWLEDGE);
+ Topic oT = (Topic) m_oCtx.lookup(p_sJndi);
+
+ TopicSubscriber oRcv = oTsess.createSubscriber(oT);
+ oTconn.start();
+ return oRcv;
+ } //__________________________________
+} //____________________________________________________________________________
Added: labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestNotification.java
===================================================================
--- labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestNotification.java 2006-07-10 18:01:44 UTC (rev 4967)
+++ labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestNotification.java 2006-07-10 18:03:13 UTC (rev 4968)
@@ -0,0 +1,201 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.tests;
+
+import java.util.*;
+import java.text.SimpleDateFormat;
+
+import org.jboss.soa.esb.common.EsbSysProps;
+import org.jboss.soa.esb.helpers.*;
+import org.jboss.soa.esb.helpers.persist.SimpleDataSource;
+import org.jboss.soa.esb.notification.*;
+import org.jboss.soa.esb.services.*;
+
+// DON'T FORGET !!
+// The Rosetta Application server has to be up and running
+// (set JNDI_SERVER appropriately)
+// For e-mail notification: System properties for smtp
+// (server, user, password, port) must be set up in app server
+
+public class TestNotification
+{
+ private static InotificationHandler m_oH;
+
+ public TestNotification () throws Exception
+ { performTest(); }
+
+ static void performTest() throws Exception
+ {
+ // get a handle to your business delegate
+ m_oH = NotificationHandlerFactory.getNotifHandler
+ ("remote"
+ ,EsbSysProps.getJndiServerType()
+ ,EsbSysProps.getJndiServerURL()
+ );
+
+ DomElement oEl = new DomElement("MyFileList");
+ oEl.setAttr(NotificationList.TYPE,"OK");
+
+// oEl.addElemChild(fileListTarget());
+// oEl.addElemChild(emailTarget());
+// oEl.addElemChild(jmsQueueTarget());
+// oEl.addElemChild(jmsTopicTarget());
+ oEl.addElemChild(sqlTableTarget());
+
+ NotificationList oNL = new NotificationList(oEl);
+
+ // to see how the XML looks like
+ // this is just a unit test class
+ // Typically the XML is used in a parameter object (DomElement.fromXml())
+ System.out.println(oNL.toString());
+
+ // a simple timestamped message
+ Date oNow = new Date(System.currentTimeMillis());
+ SimpleDateFormat oStamp = new SimpleDateFormat("dd/MMM/yyyy HH:mm:ss.SSS");
+ StringBuilder sb = new StringBuilder(oStamp.format(oNow))
+ .append(" This message from Notification test");
+
+ m_oH.sendNotifications(oNL,sb.toString());
+ } //________________________________
+
+ static DomElement emailTarget() throws Exception
+ {
+ DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
+ oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifyEmail");
+ oTgt.setAttr(EsbEmail.FROM,"se...@jb...");
+ oTgt.setAttr(EsbEmail.SENDTO,"rec...@ho...,rec...@jb...");;
+ oTgt.setAttr(EsbEmail.SUBJECT,"TEST from Rosetta");
+ oTgt.setAttr(EsbEmail.MESSAGE,"This is the text of your message");
+
+ // This class does NOT send the e-mails, the app server does
+ // consequently these paths would have to be accessible in the
+ // application server (filesystem / mounts)
+ String[] sa = {"/tmp/tomcat.sh","/tmp/program.js"};
+ for (String sCurr : sa)
+ oTgt.addTextChild(EsbEmail.ATTACH,sCurr);
+
+ return oTgt;
+ } //________________________________
+
+ static DomElement fileListTarget() throws Exception
+ {
+ DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
+ oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifyFiles");
+
+ // This class does NOT write the files, the app server does
+ // consequently these paths would have to be accessible in the
+ // application server (filesystem / mounts)
+ String[] sa = {"file:///tmp/file1.notif","file:///tmp/file2.notif"};
+ for (String sCurr : sa)
+ { DomElement oFile = new DomElement(NotifyFiles.CHILD_FILE);
+ oFile.setAttr(NotifyFiles.ATT_URI,sCurr);
+ oFile.setAttr(NotifyFiles.ATT_APPEND,Boolean.toString(true));
+ oTgt.addElemChild(oFile);
+ }
+ return oTgt;
+ } //________________________________
+
+ static DomElement jmsQueueTarget() throws Exception
+ {
+ DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
+ oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifyQueues");
+
+ String[] sa = {"queue/A","queue/B"};
+ for (String sCurr : sa)
+ { DomElement oQ = new DomElement(NotifyQueues.CHILD_QUEUE);
+ oQ.setAttr(NotifyJMS.ATT_DEST_NAME,sCurr);
+ for (DomElement oProp : getMessageProperties())
+ oQ.addElemChild(oProp);
+ oTgt.addElemChild(oQ);
+ }
+ return oTgt;
+ } //________________________________
+
+ static DomElement jmsTopicTarget() throws Exception
+ {
+ DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
+ oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifyTopics");
+
+ String[] sa = {"topic/testTopic"};
+ for (String sCurr : sa)
+ { DomElement oQ = new DomElement(NotifyTopics.CHILD_TOPIC);
+ oQ.setAttr(NotifyJMS.ATT_DEST_NAME,sCurr);
+ for (DomElement oProp : getMessageProperties())
+ oQ.addElemChild(oProp);
+ oTgt.addElemChild(oQ);
+ }
+ return oTgt;
+ } //________________________________
+
+ static DomElement[] getMessageProperties() throws Exception
+ {
+ KeyValuePair[] oaProps = new KeyValuePair[]
+ {new KeyValuePair("prop1","111")
+ ,new KeyValuePair("prop2","bbb")
+ ,new KeyValuePair("prop3","abc123")
+ };
+ DomElement[] oaRet = new DomElement[oaProps.length];
+ int iCurr = 0;
+ for (KeyValuePair oCurr : oaProps)
+ { DomElement oElem = new DomElement(NotifyJMS.CHILD_MSG_PROP);
+ oElem.setAttr(NotifyJMS.ATT_PROP_NAME,oCurr.getKey());
+ oElem.setAttr(NotifyJMS.ATT_PROP_VALUE,oCurr.getValue());
+ oaRet[iCurr++] = oElem;
+ }
+ return oaRet;
+ } //________________________________
+
+ static DomElement sqlTableTarget() throws Exception
+ {
+ DomElement oTgt = new DomElement(NotificationList.CHILD_TGT);
+ oTgt.setAttr(NotificationTarget.PRM_NOTIF_CLASS,"NotifySqlTable");
+
+ oTgt.setAttr(SimpleDataSource.DRIVER,"org.postgresql.Driver");
+ oTgt.setAttr(SimpleDataSource.URL,"jdbc:postgresql://lavasca:5432/rosetta");
+ oTgt.setAttr(SimpleDataSource.USER,"postgres");
+ oTgt.setAttr(SimpleDataSource.PASSWORD,"");
+
+ // Table name for insert - must exist in database (URL)
+ oTgt.setAttr(NotifySqlTable.ATT_TABLE,"test_notif_table");
+ // Column that will contain the dynamic data generated by the ActionClass
+ // must exist in table (ATT_TABLE above)
+ oTgt.setAttr(NotifySqlTable.ATT_DATA,"msg");
+
+ // constant data that can be also added in the insert
+ // (perhaps needed for queries)
+ // Key = column name (it must exist in the table, same as ATT_DATA column)
+ KeyValuePair[] oaCols = new KeyValuePair[]
+ {new KeyValuePair("src","TestNotification")
+ ,new KeyValuePair("ref","any Ref")
+ ,new KeyValuePair("val1","VVVV 11111")
+ };
+ for (KeyValuePair oCurr : oaCols)
+ { DomElement oElem = new DomElement(NotifySqlTable.CHILD_COLUMN);
+ oElem.setAttr(NotifySqlTable.ATT_NAME,oCurr.getKey());
+ oElem.setAttr(NotifySqlTable.ATT_VALUE,oCurr.getValue());
+ oTgt.addElemChild(oElem);
+ }
+
+
+ return oTgt;
+ } //________________________________
+} //____________________________________________________________________________
Added: labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestObjStore.java
===================================================================
--- labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestObjStore.java 2006-07-10 18:01:44 UTC (rev 4967)
+++ labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestObjStore.java 2006-07-10 18:03:13 UTC (rev 4968)
@@ -0,0 +1,84 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.tests;
+
+import org.jboss.soa.esb.common.EsbSysProps;
+import org.jboss.soa.esb.common.bizclasses.*;
+import org.jboss.soa.esb.services.*;
+
+// DON'T FORGET !!
+// The Rosetta Application server has to be up and running
+// (set JNDI_SERVER appropriately)
+
+public class TestObjStore
+{
+ private static IpersistHandler m_oH;
+
+ public TestObjStore () throws Exception
+ { performTest(); }
+
+ static void performTest() throws Exception
+ {
+ // get a handle to your business delegate
+ m_oH = PersistHandlerFactory.getPersistHandler
+ ("remote"
+ ,EsbSysProps.getJndiServerType()
+ ,EsbSysProps.getJndiServerURL()
+ );
+
+ // request UID chunks for your own use
+ int[] ia = {10,20,30};
+ for (int iCurr : ia)
+ System.out.println
+ ("Requesting "+iCurr+" uids "
+ +" - First UID returned = " +m_oH.getUidChunk(iCurr)
+ );
+
+ storeAndRetrievePerson();
+ } //________________________________
+
+ static void storeAndRetrievePerson() throws Exception
+ {
+ // set up a Person (see TestPersonAddrPhone.class)
+ Person oPrs = TestPersonAddrPhone.getPerson();
+ // timestamp, uid and snap Uid are added just to make it easier
+ // to compare output text
+ oPrs.setStamp(System.currentTimeMillis());
+ long lUid = m_oH.addObject(oPrs);
+ oPrs.setUid(lUid);
+ oPrs.setSnap(lUid);
+
+ // retrieve it from the Object Store
+ Person oP2 = (Person)m_oH.getObject(Person.class,lUid);
+
+ // output in XML format both objects, and compare
+ // timestamps will differ slightly because first object
+ // has a dummy timestamp (just before "store" request)
+ System.out.println(oPrs.toDTO().toXml());
+ System.out.println(oP2.toDTO().toXml());
+
+ // if you used the "ObjStoreExample.xml" that comes with the
+ // standard example, you'll be able to see your objects
+ // in the "object_snap" and "people_index" tables
+
+ } //________________________________
+} //____________________________________________________________________________
Added: labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestParamsRepository.java
===================================================================
--- labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestParamsRepository.java 2006-07-10 18:01:44 UTC (rev 4967)
+++ labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestParamsRepository.java 2006-07-10 18:03:13 UTC (rev 4968)
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.tests;
+
+import javax.naming.*;
+
+import org.jboss.soa.esb.helpers.*;
+import org.jboss.soa.esb.parameters.*;
+
+public class TestParamsRepository
+{
+ ParamsRepository m_oRepos;
+ public TestParamsRepository() throws Exception
+ {
+ m_oRepos = ParamsReposUtil.reposFromFactory(null,null);
+ performTest();
+ } //________________________________
+
+ @SuppressWarnings("unused")
+ private void performTest() throws Exception
+ {
+ String sDir = "/tmp/jbossEsb/paramsDir";
+ Name oInpName = ParamsReposUtil.nameFromString(sDir)
+ .add("FileMoverConfigExample.xml");
+
+ DomElement oElem = m_oRepos.getElement(oInpName);
+
+ Name oOutName = ParamsReposUtil.nameFromString(sDir)
+ .add("outputTest.xml");
+ m_oRepos.storeElement(oOutName,oElem);
+
+ oElem = m_oRepos.getElement(oOutName);
+ System.out.println(oElem.toString());
+ } //________________________________
+
+} //____________________________________________________________________________
Added: labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestPersonAddrPhone.java
===================================================================
--- labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestPersonAddrPhone.java 2006-07-10 18:01:44 UTC (rev 4967)
+++ labs/jbossesb/branches/refactor/ESBCore/tests/src/org/jboss/soa/esb/tests/TestPersonAddrPhone.java 2006-07-10 18:03:13 UTC (rev 4968)
@@ -0,0 +1,96 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software 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
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.tests;
+
+
+import org.jboss.soa.esb.util.*;
+import org.jboss.soa.esb.common.bizclasses.*;
+
+public class TestPersonAddrPhone
+{
+ public TestPersonAddrPhone() throws Exception
+ { performTest(); }
+
+ static void performTest() throws Exception
+ {
+ BaseBusinessObject o = getPerson();
+ o.setPackage();
+
+ BobjStdDTO oDto = o.toDTO();
+ System.out.println(oDto.toXml());
+
+ o = BaseBusinessObject.getFromDTO(oDto);
+ System.out.println(o.toDTO().toXml());
+ Thread.sleep(500);
+
+ o.toDTO().Dump("Example dump of "+EsbUtil.classSuffix(o.getClass()));
+
+ } //________________________________
+
+ static Person getPerson() throws Exception
+ { Person oP = new Person((String)null);
+ oP.setField(Person.ATTRIB.pfx,"Mr.");
+ oP.setField(Person.ATTRIB.fmlyN,"Brum");
+ oP.setField(Person.ATTRIB.givN,"Daniel");
+ oP.setField(Person.ATTRIB.sfx,"the 1st.");
+
+ oP.addAddress(getAddress());
+
+ oP.addEmail(OneValue.getStringValue("my...@gm...","home"));
+ oP.addEmail(OneValue.getStringValue("joh...@jb...","work"));
+
+ oP.addPhone(newPhone("basement","1","416","555-1212",null));
+ oP.addPhone(newPhone("cell",null,"416","666-4444",null));
+
+ return oP;
+ } //________________________________
+
+ static Address getAddress() throws Exception
+ {
+ Address oP = new Address((String)null);
+ oP.setField(Address.ATTRIB.strNum,"50");
+ oP.setField(Address.ATTRIB.strLine1,"Balcarce");
+ oP.setField(Address.ATTRIB.twnCty1,"San Isidro");
+ oP.setField(Address.ATTRIB.postalZip,"1642");
+ oP.setField(Address.ATTRIB.provSt,"Buenos Aires");
+ oP.setField(Address.ATTRIB.cntry,"Argentina");
+
+ oP.addPhone(newPhone("torIP",null,"416","555-1212",null));
+ oP.addPhone(newPhone("home","54","11","4555-1111","7"));
+
+ return oP;
+ } //________________________________
+
+ public static Telephone newPhone(String p_sRole,
+ String p_sCtry, String p_sCity, String p_sNum, String p_sExt)
+ {
+ Telephone oP = new Telephone((String)null);
+ oP.setRole(p_sRole);
+ oP.setField(Telephone.ATTRIB.cntry,p_sCtry);
+ oP.setField(Telephone.ATTRIB.city,p_sCity);
+ oP.setField(Telephone.ATTRIB.num,p_sNum);
+ oP.setField(Telephone.ATTRIB.ext,p_sExt);
+
+ return oP;
+ }
+
+} //____________________________________________________________________________
|
|
From: <jbo...@li...> - 2006-07-10 18:01:48
|
Author: arvinder Date: 2006-07-10 14:01:44 -0400 (Mon, 10 Jul 2006) New Revision: 4967 Removed: labs/jbossesb/branches/refactor/ESBCore/Tests/ Log: Delete Tests directory and renamed to tests |
Author: tho...@jb...
Date: 2006-07-10 13:12:51 -0400 (Mon, 10 Jul 2006)
New Revision: 586
Added:
trunk/src/main/java/org/jboss/ws/integration/jboss/JBossHttpServer.java
Modified:
trunk/src/main/java/javax/xml/ws/spi/Provider.java
trunk/src/main/java/org/jboss/ws/jaxws/spi/ProviderImpl.java
trunk/src/main/java/org/jboss/ws/server/HttpServer.java
trunk/src/main/java/org/jboss/ws/tools/wspublish.java
trunk/src/test/build.xml
trunk/src/test/java/org/jboss/test/ws/JBossTestDeployer.java
trunk/src/test/java/org/jboss/test/ws/JBossWSTestDeployer.java
trunk/src/test/java/org/jboss/test/ws/TomcatTestDeployer.java
Log:
More work on Endpoint API
Modified: trunk/src/main/java/javax/xml/ws/spi/Provider.java
===================================================================
--- trunk/src/main/java/javax/xml/ws/spi/Provider.java 2006-07-07 17:12:40 UTC (rev 585)
+++ trunk/src/main/java/javax/xml/ws/spi/Provider.java 2006-07-10 17:12:51 UTC (rev 586)
@@ -69,7 +69,19 @@
public abstract ServiceDelegate createServiceDelegate(URL url, QName qname, Class class1);
+ /**
+ * Creates an endpoint object with the provided binding and implementation object.
+ *
+ * @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP)
+ * @param implementor A service implementation object to which incoming requests will be dispatched.
+ * The corresponding class must be annotated with all the necessary Web service annotations.
+ */
public abstract Endpoint createEndpoint(String bindingId, Object implementor);
+ /**
+ * Creates and publishes an endpoint object with the specified address and implementation object.
+ * @param bindingId A URI specifying the address and transport/protocol to use. A http: URI must result in the SOAP 1.1/HTTP binding being used. Implementations may support other URI schemes.
+ * @param implementor A service implementation object to which incoming requests will be dispatched. The corresponding class must be annotated with all the necessary Web service annotations.
+ */
public abstract Endpoint createAndPublishEndpoint(String bindingId, Object implementor);
}
\ No newline at end of file
Added: trunk/src/main/java/org/jboss/ws/integration/jboss/JBossHttpServer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss/JBossHttpServer.java 2006-07-07 17:12:40 UTC (rev 585)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss/JBossHttpServer.java 2006-07-10 17:12:51 UTC (rev 586)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss;
+
+//$Id$
+
+import javax.management.MBeanServerConnection;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.xml.ws.Endpoint;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.server.HttpServer;
+
+/**
+ * A Tomcat HTTP Server
+ *
+ * @author Tho...@jb...
+ * @since 07-Jul-2006
+ */
+public class JBossHttpServer extends HttpServer
+{
+ private static final String MAIN_DEPLOYER = "jboss.system:service=MainDeployer";
+
+ /** Start an instance of this HTTP server */
+ @Override
+ public void start()
+ {
+ // verify required properties
+ }
+
+ /** Publish an JAXWS endpoint to the HTTP server */
+ @Override
+ public void publish(Endpoint endpoint)
+ {
+ try
+ {
+ MBeanServerConnection server = getServer();
+ //server.invoke(new ObjectName(MAIN_DEPLOYER), "deploy", new Object[] { url }, new String[] { "java.net.URL" });
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WSException(ex);
+ }
+ }
+
+ @Override
+ public void destroy(Endpoint endpoint)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ private MBeanServerConnection getServer() throws NamingException
+ {
+ InitialContext iniCtx = new InitialContext();
+ MBeanServerConnection server = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+ return server;
+ }
+
+}
Property changes on: trunk/src/main/java/org/jboss/ws/integration/jboss/JBossHttpServer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/src/main/java/org/jboss/ws/jaxws/spi/ProviderImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxws/spi/ProviderImpl.java 2006-07-07 17:12:40 UTC (rev 585)
+++ trunk/src/main/java/org/jboss/ws/jaxws/spi/ProviderImpl.java 2006-07-10 17:12:51 UTC (rev 586)
@@ -58,7 +58,7 @@
public Endpoint createAndPublishEndpoint(String bindingId, Object implementor)
{
EndpointImpl endpoint = new EndpointImpl(bindingId, implementor);
- HttpServer server = HttpServer.create(null);
+ HttpServer server = HttpServer.create();
server.publish(endpoint);
return endpoint;
}
Modified: trunk/src/main/java/org/jboss/ws/server/HttpServer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/server/HttpServer.java 2006-07-07 17:12:40 UTC (rev 585)
+++ trunk/src/main/java/org/jboss/ws/server/HttpServer.java 2006-07-10 17:12:51 UTC (rev 586)
@@ -43,7 +43,7 @@
public static String HTTP_SERVER_PROPERTY = HttpServer.class.getName();
public static String DEFAULT_HTTP_SERVER_PROPERTY = TomcatHttpServer.class.getName();
- private Map<String, Object> properties;
+ private Map<String, Object> properties = new HashMap<String, Object>();
// Hide constructor
protected HttpServer ()
@@ -78,4 +78,14 @@
{
properties = map;
}
+
+ public void setProperty(String key, Object value)
+ {
+ properties.put(key, value);
+ }
+
+ public Object getProperty(String key)
+ {
+ return properties.get(key);
+ }
}
Modified: trunk/src/main/java/org/jboss/ws/tools/wspublish.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/tools/wspublish.java 2006-07-07 17:12:40 UTC (rev 585)
+++ trunk/src/main/java/org/jboss/ws/tools/wspublish.java 2006-07-10 17:12:51 UTC (rev 586)
@@ -34,6 +34,7 @@
import org.jboss.util.file.JarUtils;
import org.jboss.ws.deployment.ServiceEndpointPublisher;
import org.jboss.ws.integration.tomcat.GenericServiceEndpointPublisher;
+import org.jboss.ws.integration.tomcat.GenericServiceEndpointServlet;
/**
* Publish a standard portable J2EE web service endpoint
@@ -47,7 +48,7 @@
// provide logging
protected final Logger log = Logger.getLogger(wspublish.class);
- public static final String DEFAULT_TOMCAT_SERVICE_ENDPOINT_SERVLET = "org.jboss.ws.integration.other.GenericServiceEndpointServlet";
+ public static final String DEFAULT_TOMCAT_SERVICE_ENDPOINT_SERVLET = GenericServiceEndpointServlet.class.getName();
public URL process(URL warURL, File destDir, String servletName) throws IOException
{
Modified: trunk/src/test/build.xml
===================================================================
--- trunk/src/test/build.xml 2006-07-07 17:12:40 UTC (rev 585)
+++ trunk/src/test/build.xml 2006-07-10 17:12:51 UTC (rev 586)
@@ -141,6 +141,8 @@
<pathelement location="${jboss.server.lib}/jboss.jar"/>
<pathelement location="${jboss.server.deploy}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
<pathelement location="${jboss.server.deploy}/ejb3.deployer/jboss-ejb3x.jar"/>
+ <pathelement location="${build.lib.dir}/jbossws-jboss-integration.jar"/>
+ <pathelement location="${build.lib.dir}/jbossws-tomcat-integration.jar"/>
</path>
<!-- The test client classpath -->
@@ -149,6 +151,7 @@
<pathelement location="${thirdparty.dir}/jaxb-impl.jar"/>
<path refid="library.classpath"/>
<path refid="jbossws.client.classpath"/>
+ <pathelement location="${build.lib.dir}/jbossws-jboss-integration.jar"/>
<pathelement location="${build.lib.dir}/jbossws-tomcat-integration.jar"/>
<pathelement location="${jboss.client}/jboss-aop-jdk50-client.jar"/>
<pathelement location="${jboss.lib}/jboss-system.jar"/>
Modified: trunk/src/test/java/org/jboss/test/ws/JBossTestDeployer.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/JBossTestDeployer.java 2006-07-07 17:12:40 UTC (rev 585)
+++ trunk/src/test/java/org/jboss/test/ws/JBossTestDeployer.java 2006-07-10 17:12:51 UTC (rev 586)
@@ -27,7 +27,13 @@
import javax.management.ObjectName;
import javax.naming.InitialContext;
import javax.naming.NamingException;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.spi.Provider;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.integration.jboss.JBossHttpServer;
+import org.jboss.ws.server.HttpServer;
+
/**
* A JBossWS test helper that deals with test deployment/undeployment, etc.
*
@@ -56,4 +62,20 @@
MBeanServerConnection server = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
return server;
}
+
+ public Endpoint deployEndpoint(Class endpointImpl) throws Exception
+ {
+ Provider provider = Provider.provider();
+
+ Endpoint endpoint = provider.createEndpoint(null, endpointImpl);
+ HttpServer httpServer = new JBossHttpServer();
+ httpServer.start();
+ httpServer.publish(endpoint);
+ return endpoint;
+ }
+
+ public void undeployEndpoint(Endpoint endpoint) throws Exception
+ {
+ endpoint.stop();
+ }
}
Modified: trunk/src/test/java/org/jboss/test/ws/JBossWSTestDeployer.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/JBossWSTestDeployer.java 2006-07-07 17:12:40 UTC (rev 585)
+++ trunk/src/test/java/org/jboss/test/ws/JBossWSTestDeployer.java 2006-07-10 17:12:51 UTC (rev 586)
@@ -23,8 +23,10 @@
import java.net.URL;
+import javax.xml.ws.Endpoint;
+
/**
- * Server deployer
+ * WS test deployer
*
* @author Tho...@jb...
* @since 16-May-2006
@@ -38,4 +40,12 @@
/** Undeploy the given archive
*/
void undeploy(URL archive) throws Exception;
+
+ /** Deploy the given endpoint
+ */
+ Endpoint deployEndpoint(Class endpointImpl) throws Exception;
+
+ /** Undeploy the given endpoint
+ */
+ void undeployEndpoint(Endpoint endpoint) throws Exception;
}
\ No newline at end of file
Modified: trunk/src/test/java/org/jboss/test/ws/TomcatTestDeployer.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/TomcatTestDeployer.java 2006-07-07 17:12:40 UTC (rev 585)
+++ trunk/src/test/java/org/jboss/test/ws/TomcatTestDeployer.java 2006-07-10 17:12:51 UTC (rev 586)
@@ -32,7 +32,12 @@
import java.util.HashMap;
import java.util.Map;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.spi.Provider;
+
import org.jboss.util.Base64;
+import org.jboss.ws.integration.tomcat.TomcatHttpServer;
+import org.jboss.ws.server.HttpServer;
import org.jboss.ws.tools.wspublish;
/**
@@ -105,6 +110,22 @@
}
}
+
+ public Endpoint deployEndpoint(Class endpointImpl) throws Exception
+ {
+ Provider provider = Provider.provider();
+ Endpoint endpoint = provider.createEndpoint(null, endpointImpl);
+ HttpServer httpServer = new TomcatHttpServer();
+ httpServer.start();
+ httpServer.publish(endpoint);
+ return endpoint;
+ }
+
+ public void undeployEndpoint(Endpoint endpoint) throws Exception
+ {
+ endpoint.stop();
+ }
+
private String getManagerPath() throws MalformedURLException
{
String hostName = System.getProperty("jbosstest.server.host", "localhost");
|
|
From: <jbo...@li...> - 2006-07-10 16:23:03
|
Author: szimano
Date: 2006-07-10 12:22:58 -0400 (Mon, 10 Jul 2006)
New Revision: 4966
Added:
labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/TagSearch.java
Modified:
labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/TagService.java
labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java
Log:
shotoku search JBSHOTOKU-86
Added: labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/TagSearch.java
===================================================================
--- labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/TagSearch.java 2006-07-10 14:46:53 UTC (rev 4965)
+++ labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/TagSearch.java 2006-07-10 16:22:58 UTC (rev 4966)
@@ -0,0 +1,131 @@
+package org.jboss.shotoku.tags;
+
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+public class TagSearch {
+ Vector<String> tagRequestTokens;
+
+ Vector<String> tagForbiddenTokens;
+
+ Vector<String> tagRequiredTokens;
+
+ Vector<String> authorRequestTokens;
+
+ Vector<String> authorForbiddenTokens;
+
+ Vector<String> authorRequiredTokens;
+
+ Vector<String> keywordRequestTokens;
+
+ Vector<String> keywordForbiddenTokens;
+
+ Vector<String> keywordRequiredTokens;
+
+ /**
+ * Construtor for search. Use nulls or zero length strings if you don't want some of the rules to
+ * be checked.
+ *
+ * @param tagString
+ * @param authorString
+ * @param keywordString
+ */
+ public TagSearch(String tagString, String authorString, String keywordString) {
+ tokenizeString(tagString, tagRequiredTokens, tagForbiddenTokens,
+ tagRequestTokens);
+
+ tokenizeString(authorString, authorRequiredTokens,
+ authorForbiddenTokens, authorRequestTokens);
+
+ tokenizeString(keywordString, keywordRequiredTokens,
+ keywordForbiddenTokens, keywordRequestTokens);
+ }
+
+ public void tokenizeString(String query, Vector<String> requiredTokens,
+ Vector<String> forbiddenTokens, Vector<String> requestTokens) {
+
+ if (query != null && query.length() > 0) {
+ requiredTokens = new Vector<String>();
+ forbiddenTokens = new Vector<String>();
+ requestTokens = new Vector<String>();
+ } else {
+ return;
+ }
+
+ StringTokenizer st = new StringTokenizer(query, " \t,");
+
+ //
+ // Parse incoming search string
+ //
+
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken().toLowerCase();
+
+ switch (token.charAt(0)) {
+ case '+':
+ token = token.substring(1);
+ requiredTokens.add(token);
+ break;
+
+ case '-':
+ token = token.substring(1);
+ forbiddenTokens.add(token);
+ break;
+
+ default:
+ requestTokens.add(token);
+ break;
+ }
+ }
+ }
+
+ public boolean matches(Tag tag) {
+
+ return matchTokens(tag.getAuthor(), authorRequiredTokens,
+ authorForbiddenTokens, authorRequestTokens)
+ && matchTokens(tag.getName(), tagRequiredTokens,
+ tagForbiddenTokens, tagRequestTokens)
+ && matchTokens(tag.getData(), keywordRequiredTokens,
+ keywordForbiddenTokens, keywordRequestTokens);
+ }
+
+ private boolean matchTokens(String content, Vector<String> requiredTokens,
+ Vector<String> forbiddenTokens, Vector<String> requestTokens) {
+
+ if (requestTokens == null) {
+ return true;
+ }
+
+ for (int i = 0; i < forbiddenTokens.size(); i++) {
+ if (content.indexOf(forbiddenTokens.get(i)) != -1) {
+ // there is forbidden token - return 0
+ return false;
+ }
+ }
+
+ for (int i = 0; i < requiredTokens.size(); i++) {
+ if (content.indexOf(requiredTokens.get(i)) == -1) {
+ // lack of one of the required tokens - return 0
+ return false;
+ }
+ }
+
+ /*
+ * if (requiredTokens.size() > 0) { // there is at least one requirted
+ * token and it has been found return true; }
+ */
+
+ for (int i = 0; i < requestTokens.size(); i++) {
+ int fromIndex = -1;
+
+ while ((fromIndex = content.indexOf(requestTokens.get(i),
+ fromIndex + 1)) != -1) {
+ // found at least one required token
+ return true;
+ }
+ }
+
+ // nothing found
+ return false;
+ }
+}
Modified: labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/TagService.java
===================================================================
--- labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/TagService.java 2006-07-10 14:46:53 UTC (rev 4965)
+++ labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/TagService.java 2006-07-10 16:22:58 UTC (rev 4966)
@@ -40,9 +40,23 @@
*/
public String getFeedLink(FeedType feedType, List<String> dataList, String type);
- /**Gets all the tags.
+ /**Gets all the tag names.
* @return Tag list
* @throws TagGetException
*/
- public List<String> getAllTags() throws TagGetException;
+ public List<String> getAllTagsNames() throws TagGetException;
+
+ /**Gets all the tags
+ * @return Tag list
+ * @throws TagGetException
+ */
+ public List<Tag> getAllTags() throws TagGetException;
+
+ /**
+ * @param tag String query for tags
+ * @param author String query for authors
+ * @param keyword String query for keyword (searches thru description)
+ * @return List of matching tags
+ */
+ public List<Tag> searchTags(String tag, String author, String keyword);
}
Modified: labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java
===================================================================
--- labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java 2006-07-10 14:46:53 UTC (rev 4965)
+++ labs/shotoku/trunk/shotoku-tags/src/java/org/jboss/shotoku/tags/service/TagServiceImpl.java 2006-07-10 16:22:58 UTC (rev 4966)
@@ -358,10 +358,38 @@
}
}
- public List<String> getAllTags() throws TagGetException {
+ public List<String> getAllTagsNames() throws TagGetException {
List<String> result = manager.createQuery("SELECT DISTINCT name FROM TagEntity")
.getResultList();
return result;
}
+
+ public List<Tag> getAllTags() throws TagGetException {
+ List<Tag> result = manager.createQuery("SELECT * FROM TagEntity")
+ .getResultList();
+
+ return result;
+ }
+
+ public List<Tag> searchTags(String tag, String author, String keyword) {
+ List<Tag> searchResult = new ArrayList<Tag>();
+
+ TagSearch tagSearch = new TagSearch(tag, author, keyword);
+
+ try {
+ List<Tag> allTags = getAllTags();
+
+ for (Tag nextTag : allTags) {
+ if (tagSearch.matches(nextTag)) {
+ searchResult.add(nextTag);
+ }
+ }
+ } catch (TagGetException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ return searchResult;
+ }
}
|