1 /*
2 * Demosys.
3 *
4 * Terms of license - http://opensource.org/licenses/apachepl.php
5 */
6 package org.demosys.web.project.impl;
7 import java.util.HashMap;
8 import org.demosys.web.project.CreateProjectException;
9 import org.demosys.web.project.ProjectService;
10 import org.demosys.web.project.ProjectView;
11 /***
12 * Description of the Class
13 *
14 * @author ABOUELF
15 */
16 public class MemoryProjectService implements ProjectService {
17 private HashMap memory = new HashMap();
18
19 public synchronized void newProject(ProjectView story)
20 throws CreateProjectException {
21 if (memory.containsKey(story.getName())) {
22 throw new CreateProjectException("Existe deja en Base");
23 }
24
25 memory.put(story.getName(), story.clone());
26 }
27 }
This page was automatically generated by Maven