@@ -0,0 +1,1756 @@
+package org.talend.dataprep.api.service.command.preparation;%0A%0Aimport static org.talend.dataprep.api.service.command.common.Defaults.asNull;%0A%0Aimport java.net.URISyntaxException;%0A%0Aimport org.apache.commons.lang.StringUtils;%0Aimport org.apache.http.client.HttpClient;%0Aimport org.apache.http.client.methods.HttpDelete;%0Aimport org.apache.http.client.methods.HttpGet;%0Aimport org.apache.http.client.methods.HttpRequestBase;%0Aimport org.apache.http.client.utils.URIBuilder;%0Aimport org.springframework.context.annotation.Scope;%0Aimport org.springframework.http.HttpStatus;%0Aimport org.springframework.stereotype.Component;%0Aimport org.talend.dataprep.api.service.APIService;%0Aimport org.talend.dataprep.api.service.command.common.GenericCommand;%0Aimport org.talend.dataprep.exception.TDPException;%0Aimport org.talend.dataprep.exception.error.APIErrorCodes;%0A%0A@Component%0A@Scope(%22request%22)%0Apublic class PreparationClone%0A    extends GenericCommand%3CString%3E %7B%0A%0A    private PreparationClone( HttpClient client, String id, String name ) %7B%0A        super(APIService.PREPARATION_GROUP, client);%0A        execute(() -%3E onExecute(id, name)); // $NON-NLS-1$%0A        onError(e -%3E new TDPException(APIErrorCodes.UNABLE_TO_CREATE_PREPARATION, e));%0A        on(HttpStatus.OK).then(asNull());%0A    %7D%0A%0A    private HttpRequestBase onExecute(String id, String name) %7B%0A        try %7B%0A            URIBuilder uriBuilder = new URIBuilder(preparationServiceUrl + %22/preparations/clone/%22 + id);%0A            if (StringUtils.isNotEmpty(name)) %7B%0A                uriBuilder.addParameter(%22name%22, name);%0A            %7D%0A            return new HttpGet(uriBuilder.build());%0A        %7D catch (URISyntaxException e) %7B%0A            throw new TDPException(APIErrorCodes.UNABLE_TO_CREATE_PREPARATION, e);%0A        %7D%0A    %7D%0A%7D%0A

Create PreparationClone.java