org.wso2.carbon.registry.synchronization.operation
Class CheckInCommand

java.lang.Object
  extended by org.wso2.carbon.registry.synchronization.operation.CheckInCommand

public class CheckInCommand
extends java.lang.Object

This command is used to perform a check-in operation which will upload the files and directories from the local filesystem into the provided registry instance.


Constructor Summary
CheckInCommand(java.lang.String inputFile, java.lang.String workingDir, java.lang.String userUrl, java.lang.String username, boolean ignoreConflicts, boolean cleanRegistry, boolean testContentChanged)
          Creates an instance of a check-in command which can be executed against a provided registry instance.
 
Method Summary
 void execute(Registry registry)
          This method will execute the check-in command utilizing the various parameters passed when creating the instance of the command.
 void execute(Registry registry, UserInputCallback callback)
          This method will execute the check-in command utilizing the various parameters passed when creating the instance of the command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckInCommand

public CheckInCommand(java.lang.String inputFile,
                      java.lang.String workingDir,
                      java.lang.String userUrl,
                      java.lang.String username,
                      boolean ignoreConflicts,
                      boolean cleanRegistry,
                      boolean testContentChanged)
               throws SynchronizationException
Creates an instance of a check-in command which can be executed against a provided registry instance.

Parameters:
inputFile - if the content is to be uploaded from a single meta file, this parameter can be used to specify the path to the meta file.
workingDir - if the content is to be uploaded from a directory on the filesystem, this parameter can be used to specify the path to the corresponding location.
userUrl - aggregate URL containing a concatenation of the registry URL and the resource path that is capable of referencing a remote resource. This url will contain only the resource path if the resource was local to the given registry instance.
username - the name of the user (which should be a valid username on the target server on which the provided registry instance is running) that performs this operation.
ignoreConflicts - ignore conflicts in the server side
cleanRegistry - whether the embedded registry instance must be cleaned after the execution of the operation.
testContentChanged - when this parameter is set to true, check-in will only happen if the content has changed.
Throws:
SynchronizationException - if the operation failed.
Method Detail

execute

public void execute(Registry registry,
                    UserInputCallback callback)
             throws SynchronizationException
This method will execute the check-in command utilizing the various parameters passed when creating the instance of the command. This method accepts the users preference if a deletion of a file or directory is required in the process.

Parameters:
registry - the registry instance to be used.
callback - the instance of a callback that can be used to determine the user's preference before deleting an existing file or directory during the update after the check-in has been done. If this parameter is null, the default behaviour of deleting the existing file will be used.
Throws:
SynchronizationException - if the operation failed.

execute

public void execute(Registry registry)
             throws SynchronizationException
This method will execute the check-in command utilizing the various parameters passed when creating the instance of the command.

Parameters:
registry - the registry instance to be used.
Throws:
SynchronizationException - if the operation failed.


Copyright © 2011 WSO2 Inc. All Rights Reserved.