Salome HOME
Modifications done to respect PMD rules. Versioning a document is fixed. Validation...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / LockServiceImpl.java
index 9df0f087f961d2df9278b3436196b07e1f80033d..b2f7f0d87c5f8c3867eb0bf31e6c5a9a49687154 100644 (file)
@@ -7,7 +7,7 @@
  * @version        $Revision$
  *****************************************************************************/
 
-package org.splat.service; 
+package org.splat.service;
 
 import org.splat.exception.LockAlreadyExistsException;
 import org.splat.exception.LockNotExistsException;
@@ -16,67 +16,91 @@ import org.splat.exception.LockProtectedException;
 import org.splat.log.AppLogger;
 
 /**
+ * The service to lock objects in the database.
+ * 
  * @author Maria KRUCHININA
- *
  */
 public class LockServiceImpl implements LockService {
-       
+
        /**
         * logger.
         */
-       private final static AppLogger LOG = AppLogger.getLogger(LockService.class);
+       private final static AppLogger LOG = AppLogger.getLogger(LockService.class); // RKV: NOPMD: TODO: Complete the service.
 
        /**
         * Lock timeout period in milliseconds. A 24 hours by default.
         */
-       private long _timeoutPeriod = 86400000L;
+       private final long _timeoutPeriod = 86400000L; // RKV: NOPMD: TODO: Complete the service.
 
        /**
         * Lock a data row or update lock on a data row for one user.
-        * @param rowUid Row uid
-        * @param tableUid Table uid
-        * @param userUid User uid
-        * @throws LockAlreadyExistsException when a lock already exists for row uid and another user id
+        * 
+        * @param rowUid
+        *            Row uid
+        * @param tableUid
+        *            Table uid
+        * @param userUid
+        *            User uid
+        * @throws LockAlreadyExistsException
+        *             when a lock already exists for row uid and another user id
         */
-       public void lock(final String rowUid, final String tableUid, final String userUid) throws LockAlreadyExistsException {
-               //TODO:
+       public void lock(final String rowUid, final String tableUid,
+                       final String userUid) throws LockAlreadyExistsException {
+               // TODO:
        }
-       
+
        /**
         * Unlock a data row for one user.
-        * @param rowUid Row uid
-        * @param tableUid Table uid
-        * @param userUid User uid
-        * @throws LockNotExistsException when lock does not exist
-        * @throws LockProtectedException lock exists for another user
+        * 
+        * @param rowUid
+        *            Row uid
+        * @param tableUid
+        *            Table uid
+        * @param userUid
+        *            User uid
+        * @throws LockNotExistsException
+        *             when lock does not exist
+        * @throws LockProtectedException
+        *             lock exists for another user
         */
-       public void unlock(final String rowUid, final String tableUid, final String userUid) throws LockNotExistsException, LockProtectedException {
-               //TODO:
+       public void unlock(final String rowUid, final String tableUid,
+                       final String userUid) throws LockNotExistsException,
+                       LockProtectedException {
+               // TODO:
        }
 
-       /** 
+       /**
         * Unlock all datas rox for one user.
-        * @param userUid User uid
+        * 
+        * @param userUid
+        *            User uid
         */
        @Override
-       public void unlockAll(String userUid) {
+       public void unlockAll(final String userUid) {
                // TODO Auto-generated method stub
 
        }
-       
+
        /**
         * Check lock on a data row in a table for a user.
-        * @param rowUid Row uid
-        * @param tableUid Table uid
-        * @param userUid User uid
-        * @throws LockNotExistsException when lock does not exist
-        * @throws LockProtectedException lock exists for another user
-        * @throws LockOutdatedException when lock on object is in timeout but the
-        * owner of lock is another user
+        * 
+        * @param rowUid
+        *            Row uid
+        * @param tableUid
+        *            Table uid
+        * @param userUid
+        *            User uid
+        * @throws LockNotExistsException
+        *             when lock does not exist
+        * @throws LockProtectedException
+        *             lock exists for another user
+        * @throws LockOutdatedException
+        *             when lock on object is in timeout but the owner of lock is another user
         */
-       public void check(final String rowUid, final String tableUid, final String userUid) throws LockNotExistsException, LockProtectedException, LockOutdatedException {
-               //TODO:
+       public void check(final String rowUid, final String tableUid,
+                       final String userUid) throws LockNotExistsException,
+                       LockProtectedException, LockOutdatedException {
+               // TODO:
        }
-       
 
 }