@Path("repositories")
public JobRequest createOrCloneRepository( Repository repository ) {
System.out.println( "-----createOrCloneRepository--- , repository name:" + repository.getName() );
String id = "" + System.currentTimeMillis() + "-" + counter.incrementAndGet();
CloneRepositoryRequest jobRequest = new CloneRepositoryRequest();
jobRequest.setStatus(JobRequest.Status.ACCEPTED);
jobRequest.setJodId(id);
jobRequest.setRepository(repository);
jobs.put(id, jobRequest);
cloneJobRequestEvent.fire(jobRequest);
return jobRequest;