Package org.kie.workbench.common.services.shared.rest

Examples of org.kie.workbench.common.services.shared.rest.CreateOrCloneRepositoryRequest


    @Path("/repositories")
    public JobRequest createOrCloneRepository( RepositoryRequest repository ) {
        logger.info( "-----createOrCloneRepository--- , repository name:" + repository.getName() );

        String id = "" + System.currentTimeMillis() + "-" + counter.incrementAndGet();
        CreateOrCloneRepositoryRequest jobRequest = new CreateOrCloneRepositoryRequest();
        jobRequest.setStatus( JobStatus.ACCEPTED );
        jobRequest.setJobId( id );
        jobRequest.setRepository( repository );

        JobResult jobResult = new JobResult();
        jobResult.setJobId( id );
        jobResult.setStatus( JobStatus.ACCEPTED );
        jobs.put( id, jobResult );
View Full Code Here


    @Path("/repositories")
    public JobRequest createOrCloneRepository( RepositoryRequest repository ) {
        logger.info( "-----createOrCloneRepository--- , repository name:" + repository.getName() );

        String id = "" + System.currentTimeMillis() + "-" + counter.incrementAndGet();
        CreateOrCloneRepositoryRequest jobRequest = new CreateOrCloneRepositoryRequest();
        jobRequest.setStatus( JobStatus.ACCEPTED );
        jobRequest.setJobId( id );
        jobRequest.setRepository( repository );

        JobResult jobResult = new JobResult();
        jobResult.setJobId( id );
        jobResult.setStatus( JobStatus.ACCEPTED );
        jobs.put( id, jobResult );
View Full Code Here

    @Path("/repositories")
    public Response createOrCloneRepository( RepositoryRequest repository ) {
        logger.debug( "-----createOrCloneRepository--- , repository name: {}", repository.getName() );

        String id = "" + System.currentTimeMillis() + "-" + counter.incrementAndGet();
        CreateOrCloneRepositoryRequest jobRequest = new CreateOrCloneRepositoryRequest();
        jobRequest.setStatus( JobStatus.ACCEPTED );
        jobRequest.setJobId( id );
        jobRequest.setRepository( repository );

        addAcceptedJobResult(id);

        jobRequestObserver.createOrCloneRepositoryRequest(jobRequest);
View Full Code Here

public class CreateOrCloneRepositoryCmd extends AbstractJobCommand {

    @Override
    public JobResult internalExecute(CommandContext ctx, JobRequest request) throws Exception {
        JobRequestHelper helper = getHelper(ctx);
        CreateOrCloneRepositoryRequest jobRequest = (CreateOrCloneRepositoryRequest) request;

        JobResult result = null;
        try {
        result =  helper.createOrCloneRepository( jobRequest.getJobId(), jobRequest.getRepository() );
        } finally {
            JobStatus status = result != null ? result.getStatus() : JobStatus.SERVER_ERROR;
            logger.debug( "----createOrCloneRepository--- , repository name: {} [{}]",
                    jobRequest.getRepository().getName(), status);
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.kie.workbench.common.services.shared.rest.CreateOrCloneRepositoryRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.