commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r493489 - in /jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file: DirectTransactionIdToPathMapper.java FileResourceManager.java NoOpTransactionIdToPathMapper.java
Date Sat, 06 Jan 2007 15:41:02 GMT
Author: joerg
Date: Sat Jan  6 07:41:01 2007
New Revision: 493489

URL: http://svn.apache.org/viewvc?view=rev&rev=493489
Log:
before it gets released:
rename DirectTITPMapper to NoOpTITPMapper and really do nothing
(using toString() in the one direction and doing nothing in the other one was somewhat inconsistent)

Added:
    jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/NoOpTransactionIdToPathMapper.java
  (with props)
Removed:
    jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/DirectTransactionIdToPathMapper.java
Modified:
    jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java

Modified: jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java?view=diff&rev=493489&r1=493488&r2=493489
==============================================================================
--- jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java
(original)
+++ jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java
Sat Jan  6 07:41:01 2007
@@ -1,10 +1,4 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//transaction/src/java/org/apache/commons/transaction/file/FileResourceManager.java,v
1.6 2005/01/07 13:32:33 ozeigermann Exp $
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -19,9 +13,7 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- *
  */
-
 package org.apache.commons.transaction.file;
 
 import java.io.BufferedReader;
@@ -237,7 +229,7 @@
         boolean urlEncodePath,
         LoggerFacade logger,
         boolean debug) {
-        this(storeDir, workDir, urlEncodePath ? new URLEncodeIdMapper() : null, new DirectTransactionIdToPathMapper(),
logger, debug);
+        this(storeDir, workDir, urlEncodePath ? new URLEncodeIdMapper() : null, new NoOpTransactionIdToPathMapper(),
logger, debug);
     }
 
     /**

Added: jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/NoOpTransactionIdToPathMapper.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/NoOpTransactionIdToPathMapper.java?view=auto&rev=493489
==============================================================================
--- jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/NoOpTransactionIdToPathMapper.java
(added)
+++ jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/NoOpTransactionIdToPathMapper.java
Sat Jan  6 07:41:01 2007
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.transaction.file;
+
+/**
+ * Default implementation of {@link TransactionIdToPathMapper}, which expects
+ * transaction ids being strings and using them as path.
+ * 
+ * @version $Id$
+ * @since 1.2
+ */
+public class NoOpTransactionIdToPathMapper implements TransactionIdToPathMapper {
+
+    public String getPathForId(Object txId) {
+        return (String)txId;
+    }
+
+    public Object getIdForPath(String path) {
+        return path;
+    }
+
+}

Propchange: jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/NoOpTransactionIdToPathMapper.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message