[jboss-svn-commits] JBL Code SVN: r7420 - in labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners: . old
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Nov 7 06:52:05 EST 2006
Author: estebanschifman
Date: 2006-11-07 06:52:02 -0500 (Tue, 07 Nov 2006)
New Revision: 7420
Modified:
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/old/DirectoryPoller.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPoller.java
Log:
Move tagnames to ListenerTagNames class
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerTagNames.java 2006-11-07 11:28:43 UTC (rev 7419)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerTagNames.java 2006-11-07 11:52:02 UTC (rev 7420)
@@ -2,13 +2,16 @@
public class ListenerTagNames
{
+ /** Registry */
public static final String SERVICE_CATEGORY_NAME_TAG = "service-category";
public static final String SERVICE_NAME_TAG = "service-name";
public static final String SERVICE_DESCRIPTION_TAG = "service-description";
public static final String EPR_DESCRIPTION_TAG = "epr-description";
-
+
+ /** Gateways */
public static final String TARGET_SERVICE_NAME_TAG = "target-service-name";
+ /** ActionProcessingPipeline */
public static final String ACTION_ELEMENT_TAG = "action";
public static final String ACTION_CLASS_TAG = "class";
public static final String PROCESS_METHOD_TAG = "process";
@@ -19,7 +22,18 @@
/** Content Based Routing */
public static final String CBR_TAG = "cbr";
+
/** RuleSet reference (Filename) */
public static final String RULE_SET_TAG = "ruleSet";
+ /** File Actions */
+ public static final String FILE_INPUT_DIR_TAG = "inputDir";
+ public static final String FILE_INPUT_SFX_TAG = "inputSuffix";
+ public static final String FILE_WORK_SFX_TAG = "workSuffix";
+ public static final String FILE_ERROR_DIR_TAG = "errorDir";
+ public static final String FILE_ERROR_SFX_TAG = "errorSuffix";
+ public static final String FILE_POST_DIR_TAG = "postDir";
+ public static final String FILE_POST_SFX_TAG = "postSuffix";
+ public static final String FILE_POST_DEL_TAG = "postDelete";
+
}
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/old/DirectoryPoller.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/old/DirectoryPoller.java 2006-11-07 11:28:43 UTC (rev 7419)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/old/DirectoryPoller.java 2006-11-07 11:52:02 UTC (rev 7420)
@@ -32,19 +32,11 @@
import org.jboss.soa.esb.actions.ActionDefinitionFactory;
import org.jboss.soa.esb.actions.ActionProcessor;
import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
import org.jboss.soa.esb.util.Util;
public class DirectoryPoller extends AbstractPoller
{
- public static final String FILE_INPUT_DIR = "inputDirURI";
- public static final String FILE_INPUT_SFX = "inputSuffix";
- public static final String FILE_WORK_SFX = "workSuffix";
- public static final String FILE_ERROR_DIR = "errorDirURI";
- public static final String FILE_ERROR_SFX = "errorSuffix";
- public static final String FILE_POST_DIR = "postDirURI";
- public static final String FILE_POST_SFX = "postSuffix";
- public static final String FILE_POST_DEL = "postDelete";
-
public DirectoryPoller(GpListener p_oDad, ConfigTree p_oParms, ActionDefinitionFactory actionDefinitionFactory) throws Exception
{
super(p_oDad, p_oParms, actionDefinitionFactory);
@@ -97,49 +89,49 @@
private void checkMyParms() throws Exception
{
// INPUT directory and suffix (used for FileFilter)
- String sInpDir = GpListener.obtainAtt(listenerConfig,FILE_INPUT_DIR,null);
+ String sInpDir = GpListener.obtainAtt(listenerConfig,ListenerTagNames.FILE_INPUT_DIR_TAG,null);
m_oInpDir = getFile(sInpDir);
seeIfOkToWorkOnDir(m_oInpDir);
- m_sInpSfx = GpListener.obtainAtt(listenerConfig,FILE_INPUT_SFX,null);
+ m_sInpSfx = GpListener.obtainAtt(listenerConfig,ListenerTagNames.FILE_INPUT_SFX_TAG,null);
m_sInpSfx = m_sInpSfx.trim();
if (m_sInpSfx.length()<1)
- throw new Exception ("Invalid "+FILE_INPUT_SFX+" attribute");
+ throw new Exception ("Invalid "+ListenerTagNames.FILE_INPUT_SFX_TAG+" attribute");
m_oFFilt = new FileEndsWith(m_sInpSfx);
// WORK suffix (will rename in input directory)
- m_sWrkSfx = GpListener.obtainAtt(listenerConfig,FILE_WORK_SFX,".esbWork").trim();
+ m_sWrkSfx = GpListener.obtainAtt(listenerConfig,ListenerTagNames.FILE_WORK_SFX_TAG,".esbWork").trim();
if (m_sWrkSfx.length()<1)
- throw new Exception ("Invalid "+FILE_WORK_SFX+" attribute");
+ throw new Exception ("Invalid "+ListenerTagNames.FILE_WORK_SFX_TAG+" attribute");
if (m_sInpSfx.equals(m_sWrkSfx))
throw new Exception("Work suffix must differ from input suffix <"+m_sWrkSfx+">");
// ERROR directory and suffix (defaults to input dir and ".esbError" suffix)
- String sErrDir = GpListener.obtainAtt(listenerConfig,FILE_ERROR_DIR,sInpDir);
+ String sErrDir = GpListener.obtainAtt(listenerConfig,ListenerTagNames.FILE_ERROR_DIR_TAG,sInpDir);
m_oErrorDir = getFile(sErrDir);
seeIfOkToWorkOnDir(m_oErrorDir);
- m_sErrSfx = GpListener.obtainAtt(listenerConfig,FILE_ERROR_SFX,".esbError").trim();
+ m_sErrSfx = GpListener.obtainAtt(listenerConfig,ListenerTagNames.FILE_ERROR_SFX_TAG,".esbError").trim();
if (m_sErrSfx.length()<1)
- throw new Exception ("Invalid "+FILE_ERROR_SFX+" attribute");
+ throw new Exception ("Invalid "+ListenerTagNames.FILE_ERROR_SFX_TAG+" attribute");
if (m_oErrorDir.equals(m_oInpDir) && m_sInpSfx.equals(m_sErrSfx))
throw new Exception("Error suffix must differ from input suffix <"+m_sErrSfx+">");
// Do users wish to delete files that were processed OK ?
- String sPostDel = GpListener.obtainAtt(listenerConfig,FILE_POST_DEL,"false").trim();
+ String sPostDel = GpListener.obtainAtt(listenerConfig,ListenerTagNames.FILE_POST_DEL_TAG,"false").trim();
m_bPostDel = Boolean.parseBoolean(sPostDel);
if (m_bPostDel)
return;
// POST (done) directory and suffix (defaults to input dir and ".esbDone" suffix)
- String sPostDir = GpListener.obtainAtt(listenerConfig,FILE_POST_DIR,sInpDir);
+ String sPostDir = GpListener.obtainAtt(listenerConfig,ListenerTagNames.FILE_POST_DIR_TAG,sInpDir);
m_oPostDir = getFile(sPostDir);
seeIfOkToWorkOnDir(m_oPostDir);
- m_sPostSfx = GpListener.obtainAtt(listenerConfig,FILE_POST_SFX,".esbDone").trim();
+ m_sPostSfx = GpListener.obtainAtt(listenerConfig,ListenerTagNames.FILE_POST_SFX_TAG,".esbDone").trim();
if (m_oPostDir.equals(m_oInpDir))
{ if (m_sPostSfx.length()<1)
- throw new Exception ("Invalid "+FILE_POST_SFX+" attribute");
+ throw new Exception ("Invalid "+ListenerTagNames.FILE_POST_SFX_TAG+" attribute");
if (m_sPostSfx.equals(m_sInpSfx))
throw new Exception("Post process suffix must differ from input suffix <"+m_sPostSfx+">");
}
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPoller.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPoller.java 2006-11-07 11:28:43 UTC (rev 7419)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/old/RemoteDirectoryPoller.java 2006-11-07 11:52:02 UTC (rev 7420)
@@ -32,20 +32,12 @@
import org.jboss.soa.esb.actions.ActionProcessor;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.helpers.KeyValuePair;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
import org.jboss.soa.esb.util.FtpClientUtil;
import org.jboss.soa.esb.util.Util;
public class RemoteDirectoryPoller extends AbstractPoller
{
- public static final String FILE_INPUT_DIR = "inputDir";
- public static final String FILE_INPUT_SFX = "inputSuffix";
- public static final String FILE_WORK_SFX = "workSuffix";
- public static final String FILE_ERROR_DIR = "errorDir";
- public static final String FILE_ERROR_SFX = "errorSuffix";
- public static final String FILE_POST_DIR = "postDir";
- public static final String FILE_POST_SFX = "postSuffix";
- public static final String FILE_POST_DEL = "postDelete";
-
private ConfigTree _params;
private Logger _logger = Logger.getLogger(this.getClass());
FtpClientUtil _ftpClient;
@@ -131,45 +123,45 @@
protected void checkMyParms() throws Exception
{
// INPUT directory and suffix (used for FileFilter)
- String sInpDir = GpListener.obtainAtt(_params,FILE_INPUT_DIR,null);
+ String sInpDir = GpListener.obtainAtt(_params,ListenerTagNames.FILE_INPUT_DIR_TAG,null);
m_oInpDir = new File(sInpDir);
- m_sInpSfx = GpListener.obtainAtt(_params,FILE_INPUT_SFX,null);
+ m_sInpSfx = GpListener.obtainAtt(_params,ListenerTagNames.FILE_INPUT_SFX_TAG,null);
m_sInpSfx = m_sInpSfx.trim();
if (m_sInpSfx.length()<1)
- throw new Exception ("Invalid "+FILE_INPUT_SFX+" attribute");
+ throw new Exception ("Invalid "+ListenerTagNames.FILE_INPUT_SFX_TAG+" attribute");
// WORK suffix (will rename in input directory)
- m_sWrkSfx = GpListener.obtainAtt(_params,FILE_WORK_SFX,".esbWork").trim();
+ m_sWrkSfx = GpListener.obtainAtt(_params,ListenerTagNames.FILE_WORK_SFX_TAG,".esbWork").trim();
if (m_sWrkSfx.length()<1)
- throw new Exception ("Invalid "+FILE_WORK_SFX+" attribute");
+ throw new Exception ("Invalid "+ListenerTagNames.FILE_WORK_SFX_TAG+" attribute");
if (m_sInpSfx.equals(m_sWrkSfx))
throw new Exception("Work suffix must differ from input suffix <"+m_sWrkSfx+">");
// ERROR directory and suffix (defaults to input dir and ".esbError" suffix)
- String sErrDir = GpListener.obtainAtt(_params,FILE_ERROR_DIR,sInpDir);
+ String sErrDir = GpListener.obtainAtt(_params,ListenerTagNames.FILE_ERROR_DIR_TAG,sInpDir);
m_oErrorDir = new File(sErrDir);
- m_sErrSfx = GpListener.obtainAtt(_params,FILE_ERROR_SFX,".esbError").trim();
+ m_sErrSfx = GpListener.obtainAtt(_params,ListenerTagNames.FILE_ERROR_SFX_TAG,".esbError").trim();
if (m_sErrSfx.length()<1)
- throw new Exception ("Invalid "+FILE_ERROR_SFX+" attribute");
+ throw new Exception ("Invalid "+ListenerTagNames.FILE_ERROR_SFX_TAG+" attribute");
if (m_oErrorDir.equals(m_oInpDir) && m_sInpSfx.equals(m_sErrSfx))
throw new Exception("Error suffix must differ from input suffix <"+m_sErrSfx+">");
// Do users wish to delete files that were processed OK ?
- String sPostDel = GpListener.obtainAtt(_params,FILE_POST_DEL,"false").trim();
+ String sPostDel = GpListener.obtainAtt(_params,ListenerTagNames.FILE_POST_DEL_TAG,"false").trim();
m_bPostDel = Boolean.parseBoolean(sPostDel);
if (m_bPostDel)
return;
// POST (done) directory and suffix (defaults to input dir and ".esbDone" suffix)
- String sPostDir = GpListener.obtainAtt(_params,FILE_POST_DIR,sInpDir);
+ String sPostDir = GpListener.obtainAtt(_params,ListenerTagNames.FILE_POST_DIR_TAG,sInpDir);
m_oPostDir = new File(sPostDir);
- m_sPostSfx = GpListener.obtainAtt(_params,FILE_POST_SFX,".esbDone").trim();
+ m_sPostSfx = GpListener.obtainAtt(_params,ListenerTagNames.FILE_POST_SFX_TAG,".esbDone").trim();
if (m_oPostDir.equals(m_oInpDir))
{ if (m_sPostSfx.length()<1)
- throw new Exception ("Invalid "+FILE_POST_SFX+" attribute");
+ throw new Exception ("Invalid "+ListenerTagNames.FILE_POST_SFX_TAG+" attribute");
if (m_sPostSfx.equals(m_sInpSfx))
throw new Exception("Post process suffix must differ from input suffix <"+m_sPostSfx+">");
}
More information about the jboss-svn-commits
mailing list