use of org.syncany.operations.init.GenlinkOperation in project syncany by syncany.
the class GenlinkCommand method execute.
@Override
public int execute(String[] operationArgs) throws Exception {
GenlinkOperationOptions operationOptions = parseOptions(operationArgs);
GenlinkOperationResult operationResult = new GenlinkOperation(config, operationOptions).execute();
printResults(operationResult);
return 0;
}
use of org.syncany.operations.init.GenlinkOperation in project syncany by syncany.
the class GenlinkFolderRequestHandler method handleRequest.
@Override
public Response handleRequest(FolderRequest request) {
GenlinkFolderRequest concreteRequest = (GenlinkFolderRequest) request;
try {
GenlinkOperation operation = new GenlinkOperation(config, concreteRequest.getOptions());
GenlinkOperationResult operationResult = operation.execute();
GenlinkFolderResponse response = new GenlinkFolderResponse(operationResult, request.getId());
return response;
} catch (Exception e) {
logger.log(Level.WARNING, "Cannot generate link.", e);
return new BadRequestResponse(request.getId(), "Cannot execute operation: " + e.getMessage());
}
}
Aggregations