Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Copyright (C) 2009 eXo Platform SAS.
    *
    * 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.exoplatform.services.jcr.ext.replication.test;
  
  
  import javax.ws.rs.GET;
  import javax.ws.rs.Path;
Created by The eXo Platform SAS.

Author(s):
Alex Reshetnyak
Version:
$Id: ReplicationTestService.java 34445 2009-07-24 07:51:18Z dkatayev $
  
  
  @Path("/replication-test/")
  @Produces("text/plain")
  public class ReplicationTestService implements ResourceContainer
  {

   
Definition the constants to ReplicationTestService.
  
     public final class Constants
     {
      
The base path to this service.
  
        public static final String BASE_URL = "/rest/replication-test";

      
Definition the operation types.
  
        public final class OperationType
        {
         
Add nt:file operation.
  
           public static final String ADD_NT_FILE = "addNTFile";

         
Check nt:file operation.
  
           public static final String CHECK_NT_FILE = "checkNTFile";

         
Start backup.
  
           public static final String START_BACKUP = "startBackup";

         
Set the lock to node.
  
           public static final String SET_LOCK = "lock";

         
Check the lock on node.
  
           public static final String CECK_LOCK = "checkLock";

         
Add the versionable node.
  
           public static final String ADD_VERSIONODE = "addVersionNode";

         
Check the versionable node.
  
           public static final String CHECK_VERSION_NODE = "checkVersionNode";

         
Add new version to versionable node.
 
          public static final String ADD_NEW_VERSION = "addNewVersion";

         
Restore the previous version.
 
          public static final String RESTORE_RPEVIOUS_VERSION = "restorePreviousVersion";

         
Restore the base version.
 
          public static final String RESTORE_BASE_VERSION = "restoreBaseVersion";

         
Delete the node.
 
          public static final String DELETE = "delete";

         
Check the deleted node.
 
          public static final String CHECK_DELETE = "checkDelete";

         
The copy node by workspace.
 
          public static final String WORKSPACE_COPY = "workspaceCopy";

         
The move node by workspace.
 
          public static final String WORKSPACE_MOVE = "workspaceMove";

         
The move node by session.
 
          public static final String SESSION_MOVE = "sessionMove";

         
Check the copy or move node.
 
          public static final String CHECK_COPY_MOVE_NODE = "checkCopyMoveNode";

         
Disconnect the cluster node.
 
          public static final String DISCONNECT_CLUSTER_NODE = "disconnectClusterNode";

         
Disconnect by ID the cluster node.
 
          public static final String DISCONNECT_CLUSTER_NODE_BY_ID = "disconnectClusterNodeById";

         
Allow the connect the cluster node.
 
          public static final String ALLOW_CONNECT = "allowConnect";

         
The forced allow the connect the cluster node.
 
          public static final String ALLOW_CONNECT_FORCED = "allowConnectForced";

         
Check 'read-only' the workspace.
 
          public static final String WORKSPACE_IS_READ_ONLY = "workspaceIsReadOnly";

         
Create content in workspace.
 
          public static final String CREATE_CONTENT = "createContent";

         
Compare data in workspace.
 
          public static final String COMPARE_DATA = "compareData";

         
Start the thread updater.
 
          public static final String START_THREAD_UPDATER = "startThreadUpdater";

         
Create the base node.
 
          public static final String CREATE_BASE_NODE = "createBaseNode";

         
Add empty node.
 
          public static final String ADD_EMPTY_NODE = "addEmptyNode";

         
Add only string property to existing node.
 
          public static final String ADD_STRING_PROPETY_ONLY = "addStringPropertyOnly";

         
Add only binary property to existing node.
 
          public static final String ADD_BINARY_PROPERTY_ONLY = "addBinaryPropertyOnly";

         
OperationType constructor.
 
          private OperationType()
          {
 
          }
       }

      
Constants constructor.
 
       private Constants()
       {
       }
    }

   
The apache logger.
 
    private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.ReplicationTestService");

   
The repository service.
 
    private RepositoryService repositoryService;

   
The backup manager.
 
    private BackupManager backupManager;

   
ReplicationTestService constructor.

Parameters:
repoService the RepositoryService
replicationService the ReplicationService
backupManager the BackupManager
params the configuration parameters
 
    public ReplicationTestService(RepositoryService repoServiceReplicationService replicationService,
       BackupManager backupManagerInitParams params)
    {
        = repoService;
       this. = backupManager;
 
       .info("ReplicationTestService inited");
    }

   
ReplicationTestService constructor.

Parameters:
repoService the RepositoryService
backupManager the BackupManager
params the configuration parameters
 
    public ReplicationTestService(RepositoryService repoServiceBackupManager backupManagerInitParams params)
    {
       this(repoServicenullbackupManagerparams);
    }

   
addNTFile.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
fileName the file name
fileSize the file size
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/{fileName}/{fileSize}/addNTFile")
    public Response addNTFile(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("repoPath"String repoPath,
       @PathParam("fileName"String fileName, @PathParam("fileSize"Long fileSize)
    {
       NtFileTestCase ntFileTestCase =
          new NtFileTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = ntFileTestCase.addNtFile(repoPathfileNamefileSize);
 
       return Response.ok(sb.toString()).build();
    }

   
checkNTFile.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
fileName the file name
fileSize the file size
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/{fileName}/{fileSize}/checkNTFile")
    public Response checkNTFile(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("repoPath"String repoPath,
       @PathParam("fileName"String fileName, @PathParam("fileSize"Long fileSize)
    {
       NtFileTestCase ntFileTestCase =
          new NtFileTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = ntFileTestCase.checkNtFile(repoPathfileNamefileSize);
 
       return Response.ok(sb.toString()).build();
    }

   
startBackup.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
incementalPeriod the period for incremental backup (seconds)
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{incementalPeriod}/startBackup")
    public Response startBackup(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("incementalPeriod"Long incementalPeriod)
    {
       BackupConfig config = new BackupConfig();
       config.setRepository(repositoryName);
       config.setWorkspace(workspaceName);
       config.setIncrementalJobPeriod(incementalPeriod);
 
       String result = "ok";
 
       try
       {
          .startBackup(config);
       }
       catch (Exception e)
       {
          result = "fail";
          .error("Can't start backup"e);
       }
 
       return Response.ok(result).build();
    }

   
lock.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/lock")
    public Response lock(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("repoPath"String repoPath)
    {
       LockTestCase lockTestCase =
          new LockTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = lockTestCase.lock(repoPath);
 
       return Response.ok(sb.toString()).build();
    }

   
checkLock.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/checkLock")
    public Response checkLock(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("repoPath"String repoPath)
    {
       LockTestCase lockTestCase =
          new LockTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = lockTestCase.isLocked(repoPath);
 
       return Response.ok(sb.toString()).build();
    }

   
addVersionNode.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
value value to versionable node
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/{value}/addVersionNode")
    public Response addVersionNode(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("repoPath"String repoPath, @PathParam("value"String value)
    {
       VersionTestCase versionTestCase =
          new VersionTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = versionTestCase.addVersionNode(repoPathvalue);
 
       return Response.ok(sb.toString()).build();
    }

   
checkVersionNode.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
checkedValue checking value to versionable node
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/{checkedValue}/checkVersionNode")
    public Response checkVersionNode(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("repoPath"String repoPath,
       @PathParam("checkedValue"String checkedValue)
    {
       VersionTestCase versionTestCase =
          new VersionTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = versionTestCase.checkVersionNode(repoPathcheckedValue);
 
       return Response.ok(sb.toString()).build();
    }

   
addNewVersion.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
newValue new value to versionable node
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/{newValue}/addNewVersion")
    public Response addNewVersion(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("repoPath"String repoPath,
       @PathParam("newValue"String newValue)
    {
       VersionTestCase versionTestCase =
          new VersionTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = versionTestCase.addNewVersion(repoPathnewValue);
 
       return Response.ok(sb.toString()).build();
    }

   
restorePreviousVersion.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/restorePreviousVersion")
    public Response restorePreviousVersion(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("repoPath"String repoPath)
    {
       VersionTestCase versionTestCase =
          new VersionTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = versionTestCase.restorePreviousVersion(repoPath);
 
       return Response.ok(sb.toString()).build();
    }

   
restoreBaseVersion.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/restoreBaseVersion")
    public Response restoreBaseVersion(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("repoPath"String repoPath)
    {
       VersionTestCase versionTestCase =
          new VersionTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = versionTestCase.restoreBaseVersion(repoPath);
 
       return Response.ok(sb.toString()).build();
    }

   
delete.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
nodeName the name of deleting node
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/{nodeName}/delete")
    public Response delete(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("repoPath"String repoPath,
       @PathParam("nodeName"String nodeName)
    {
       DeleteTestCase deleteTestCase =
          new DeleteTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = deleteTestCase.delete(repoPathnodeName);
 
       return Response.ok(sb.toString()).build();
    }

   
checkDelete.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
nodeName the name of deleted node
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/{nodeName}/checkDelete")
    public Response checkDelete(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("repoPath"String repoPath,
       @PathParam("nodeName"String nodeName)
    {
       DeleteTestCase deleteTestCase =
          new DeleteTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = deleteTestCase.checkDelete(repoPathnodeName);
 
       return Response.ok(sb.toString()).build();
    }

   
workspaceCopy.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
srcRepoPath the source repository path
nodeName the source node name
destNodeName the destination node name
contentSize the content size
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{srcRepoPath}/{nodeName}/{destNodeName}/{contentSize}/workspaceCopy"//NOSONAR
    public Response workspaceCopy(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("srcRepoPath"String srcRepoPath,
       @PathParam("nodeName"String nodeName, @PathParam("destNodeName"String destNodeName,
       @PathParam("contentSize"Long contentSize)
    {
       CopyMoveTestCase copyMoveTestCase =
          new CopyMoveTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = copyMoveTestCase.workspaceCopy(srcRepoPathnodeNamedestNodeNamecontentSize);
 
       return Response.ok(sb.toString()).build();
    }

   
workspaceMove.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
srcRepoPath the source repository path
nodeName the source node name
destNodeName the destination node name
contentSize the content size
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{srcRepoPath}/{nodeName}/{destNodeName}/{contentSize}/workspaceMove"//NOSONAR
    public Response workspaceMove(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("srcRepoPath"String srcRepoPath,
       @PathParam("nodeName"String nodeName, @PathParam("destNodeName"String destNodeName,
       @PathParam("contentSize"Long contentSize)
    {
       CopyMoveTestCase copyMoveTestCase =
          new CopyMoveTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = copyMoveTestCase.workspaceMove(srcRepoPathnodeNamedestNodeNamecontentSize);
 
       return Response.ok(sb.toString()).build();
    }

   
sessionMove.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
srcRepoPath the source repository path
nodeName the source node name
destNodeName the destination node name
contentSize the content size
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{srcRepoPath:.*}/{nodeName}/{destNodeName}/{contentSize}/sessionMove"//NOSONAR
    public Response sessionMove(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("srcRepoPath"String srcRepoPath,
       @PathParam("nodeName"String nodeName, @PathParam("destNodeName"String destNodeName,
       @PathParam("contentSize"Long contentSize)
    {
       CopyMoveTestCase copyMoveTestCase =
          new CopyMoveTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = copyMoveTestCase.sessionMove(srcRepoPathnodeNamedestNodeNamecontentSize);
 
       return Response.ok(sb.toString()).build();
    }

   
checkCopyMoveNode.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
srcRepoPath the source repository path
nodeName the source node name
destNodeName the destination node name
contentSize the content size
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{srcRepoPath:.*}/{nodeName}/{destNodeName}/{contentSize}/checkCopyMoveNode"//NOSONAR
    public Response checkCopyMoveNode(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("srcRepoPath"String srcRepoPath,
       @PathParam("nodeName"String nodeName, @PathParam("destNodeName"String destNodeName,
       @PathParam("contentSize"Long contentSize)
    {
       CopyMoveTestCase copyMoveTestCase =
          new CopyMoveTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = copyMoveTestCase.checkCopyMoveNode(srcRepoPathnodeNamedestNodeNamecontentSize);
 
       return Response.ok(sb.toString()).build();
    }

   
disconnectClusterNode.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/disconnectClusterNode")
    public Response disconnectClusterNode(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password)
    {
       BasePriorityTestCase priorityTestCase =
          new BasePriorityTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = priorityTestCase.disconnectClusterNode();
 
       return Response.ok(sb.toString()).build();
    }

   
disconnectClusterNodeById.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
id the id
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{id}/disconnectClusterNodeById")
    public Response disconnectClusterNodeById(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("id"Integer id)
    {
       BasePriorityTestCase priorityTestCase =
          new BasePriorityTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = priorityTestCase.disconnectClusterNode(id);
 
       return Response.ok(sb.toString()).build();
    }

   
allowConnect.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/allowConnect")
    public Response allowConnect(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password)
    {
       BasePriorityTestCase priorityTestCase =
          new BasePriorityTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = priorityTestCase.allowConnect();
 
       return Response.ok(sb.toString()).build();
    }

   
allowConnectForced.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/allowConnectForced")
    public Response allowConnectForced(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password)
    {
       BasePriorityTestCase priorityTestCase =
          new BasePriorityTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = priorityTestCase.allowConnectForced();
 
       return Response.ok(sb.toString()).build();
    }

   
workspaceIsReadOnly.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/workspaceIsReadOnly")
    public Response workspaceIsReadOnly(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password)
    {
       BasePriorityTestCase priorityTestCase =
          new BasePriorityTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = priorityTestCase.isReadOnly(workspaceName);
 
       return Response.ok(sb.toString()).build();
    }

   
createContent.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
fileName the file name
iterations how many iterations for simple content
simpleContent the simple content
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/{fileName}/{iterations}/{simpleContent}/createContent"//NOSONAR
    public Response createContent(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("repoPath"String repoPath,
       @PathParam("fileName"String fileName, @PathParam("iterations"Long iterations,
       @PathParam("simpleContent"String simpleContent)
    {
       ConcurrentModificationTestCase concurrentModificationTestCase =
          new ConcurrentModificationTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb = concurrentModificationTestCase.createContent(repoPathfileNameiterationssimpleContent);
 
       return Response.ok(sb.toString()).build();
    }

   
compareData.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
srcRepoPath the source repository path
srcFileName the source file name
destRepoPath the destination repository path
destFileName the destination file name
Returns:
Response return the response
 
    @GET
    @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{srcRepoPath:.*}/{srcFileName}/{destRepoPath:.*}/{destFileName}/compareData"//NOSONAR
    public Response compareData(@PathParam("repositoryName"String repositoryName,
       @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
       @PathParam("password"String password, @PathParam("srcRepoPath"String srcRepoPath,
       @PathParam("srcFileName"String srcFileName, @PathParam("destRepoPath"String destRepoPath,
       @PathParam("destFileName"String destFileName)
    {
       ConcurrentModificationTestCase concurrentModificationTestCase =
          new ConcurrentModificationTestCase(repositoryNameworkspaceNameuserNamepassword);
       StringBuffer sb =
          concurrentModificationTestCase.compareData(srcRepoPathsrcFileNamedestRepoPathdestFileName);
 
       return Response.ok(sb.toString()).build();
    }

   
startThreadUpdater.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
srcRepoPath the source repository path
srcFileName the source file name
destRepoPath the destination repository path
destFileName the destination file name
iterations how many iterations the thread
Returns:
Response return the response
   @GET
   @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{srcRepoPath:.*}/{srcFileName}/{destRepoPath:.*}/{destFileName}/{iterations}/startThreadUpdater"//NOSONAR
   public Response startThreadUpdater(@PathParam("repositoryName"String repositoryName,
      @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
      @PathParam("password"String password, @PathParam("srcRepoPath"String srcRepoPath,
      @PathParam("srcFileName"String srcFileName, @PathParam("destRepoPath"String destRepoPath,
      @PathParam("destFileName"String destFileName, @PathParam("iterations"Long iterations)
   {
      ConcurrentModificationTestCase concurrentModificationTestCase =
         new ConcurrentModificationTestCase(repositoryNameworkspaceNameuserNamepassword);
      StringBuffer sb =
         concurrentModificationTestCase.startThreadUpdater(srcRepoPathsrcFileNamedestRepoPathdestFileName,
            iterations);
      return Response.ok(sb.toString()).build();
   }

   
createBaseNode.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
nodeName the node name
Returns:
Response return the response
   @GET
   @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath}/{nodeName}/createBaseNode")
   public Response createBaseNode(@PathParam("repositoryName"String repositoryName,
      @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
      @PathParam("password"String password, @PathParam("repoPath"String repoPath,
      @PathParam("nodeName"String nodeName)
   {
      BandwidthAllocationTestCase bandwidthAllocationTestCase =
         new BandwidthAllocationTestCase(repositoryNameworkspaceNameuserNamepassword);
      StringBuffer sb = bandwidthAllocationTestCase.createBaseNode(repoPathnodeName);
      return Response.ok(sb.toString()).build();
   }

   
addEmptyNode.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
nodeName the node name
iterations how many adding the empty node
Returns:
Response return the response
   @GET
   @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/{nodeName}/{iterations}/addEmptyNode")
   public Response addEmptyNode(@PathParam("repositoryName"String repositoryName,
      @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
      @PathParam("password"String password, @PathParam("repoPath"String repoPath,
      @PathParam("nodeName"String nodeName, @PathParam("iterations"Long iterations)
   {
      BandwidthAllocationTestCase bandwidthAllocationTestCase =
         new BandwidthAllocationTestCase(repositoryNameworkspaceNameuserNamepassword);
      StringBuffer sb = bandwidthAllocationTestCase.addEmptyNode(repoPathnodeNameiterations);
      return Response.ok(sb.toString()).build();
   }

   
addStringPropertyOnly.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
nodeName the node name
size the size of string property
iterations how many adding the string property
Returns:
Response return the response
   @GET
   @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/{nodeName}/{size}/{iterations}/addEmptyNode")
   public Response addStringPropertyOnly(@PathParam("repositoryName"String repositoryName,
      @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
      @PathParam("password"String password, @PathParam("repoPath"String repoPath,
      @PathParam("nodeName"String nodeName, @PathParam("size"Long size, @PathParam("iterations"Long iterations)
   {
      BandwidthAllocationTestCase bandwidthAllocationTestCase =
         new BandwidthAllocationTestCase(repositoryNameworkspaceNameuserNamepassword);
      StringBuffer sb = bandwidthAllocationTestCase.addStringPropertyOnly(repoPathnodeNamesizeiterations);
      return Response.ok(sb.toString()).build();
   }

   
addBinaryPropertyOnly.

Parameters:
repositoryName the repository name
workspaceName the workspace name
userName the user name
password the password
repoPath the repository path
nodeName the node name
size the size of binary property
iterations how many adding the binary property
Returns:
Response return the response
   @GET
   @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{repoPath:.*}/{nodeName}/{size}/{iterations}/addBinaryPropertyOnly"//NOSONAR
   public Response addBinaryPropertyOnly(@PathParam("repositoryName"String repositoryName,
      @PathParam("workspaceName"String workspaceName, @PathParam("userName"String userName,
      @PathParam("password"String password, @PathParam("repoPath"String repoPath,
      @PathParam("nodeName"String nodeName, @PathParam("size"Long size, @PathParam("iterations"Long iterations)
   {
      BandwidthAllocationTestCase bandwidthAllocationTestCase =
         new BandwidthAllocationTestCase(repositoryNameworkspaceNameuserNamepassword);
      StringBuffer sb = bandwidthAllocationTestCase.addBinaryPropertyOnly(repoPathnodeNamesizeiterations);
      return Response.ok(sb.toString()).build();
   }
New to GrepCode? Check out our FAQ X