@Override public int execute(String[] operationArgs) throws Exception { GenlinkOperationOptions operationOptions = parseOptions(operationArgs); GenlinkOperationResult operationResult = new GenlinkOperation(config, operationOptions).execute(); printResults(operationResult); return 0; }
private GenlinkOperationResult generateLink(ConfigTO configTO) throws Exception { return new GenlinkOperation(options.getConfigTO(), options.getGenlinkOptions()).execute(); }
public GenlinkOperationResult genlink(GenlinkOperationOptions options) throws Exception { return new GenlinkOperation(config, options).execute(); }
@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()); } } }