if (projectsRegistry != null){
projectsRegistry.addWorkspaceProject(project);
} else {
WorkerResource worker = jpa.getWorker();
if (isWorkspaceProjectExists(project.getProjectName())){
throw new WorkspaceProjectAlreadyExistsException(createProjName(project.getProjectName()));
}
ProjectResource projectResource = worker.createProject(createProjName(project.getProjectName()));
projectResource.save();
}
}