Search in sources :

Example 1 with LsOperation

use of org.syncany.operations.ls.LsOperation in project syncany by syncany.

the class LsCommand method execute.

@Override
public int execute(String[] operationArgs) throws Exception {
    LsOperationOptions operationOptions = parseOptions(operationArgs);
    LsOperationResult operationResult = new LsOperation(config, operationOptions).execute();
    printResults(operationResult);
    return 0;
}
Also used : LsOperationOptions(org.syncany.operations.ls.LsOperationOptions) LsOperationResult(org.syncany.operations.ls.LsOperationResult) LsOperation(org.syncany.operations.ls.LsOperation)

Example 2 with LsOperation

use of org.syncany.operations.ls.LsOperation in project syncany by syncany.

the class LsFolderRequestHandler method handleRequest.

@Override
public Response handleRequest(FolderRequest request) {
    LsFolderRequest concreteRequest = (LsFolderRequest) request;
    try {
        LsOperation operation = new LsOperation(config, concreteRequest.getOptions());
        LsOperationResult operationResult = operation.execute();
        LsFolderResponse response = new LsFolderResponse(operationResult, request.getId());
        return response;
    } catch (Exception e) {
        logger.log(Level.WARNING, "Cannot obtain status.", e);
        return new BadRequestResponse(request.getId(), "Cannot execute operation: " + e.getMessage());
    }
}
Also used : LsOperation(org.syncany.operations.ls.LsOperation) LsOperationResult(org.syncany.operations.ls.LsOperationResult)

Aggregations

LsOperation (org.syncany.operations.ls.LsOperation)2 LsOperationResult (org.syncany.operations.ls.LsOperationResult)2 LsOperationOptions (org.syncany.operations.ls.LsOperationOptions)1