package com.modesteam.urutau.controller;

import javax.inject.Inject;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.modesteam.urutau.UserManager;
import com.modesteam.urutau.service.RequirementService;

import br.com.caelum.vraptor.Controller;
import br.com.caelum.vraptor.Result;
import br.com.caelum.vraptor.validator.Validator;

/**
 * This class is responsible to manager simple operations of projects!
 * The systems operations are received by the path /requirement followed
 * by the operation defined path.
 */

@Controller
public class ProjectController {
	
	private static final Logger logger = LoggerFactory.getLogger(ProjectController.class);
	
	private final Result result;
	
	private final UserManager userSession;
	
	private final RequirementService requirementService;
	
	private final Validator validator;
	
	@Inject
	public ProjectController(Result result, UserManager userSession, 
			RequirementService requirementService, Validator validator) {
		this.result = result;
		this.userSession = userSession;
		this.requirementService = requirementService;
		this.validator = validator; 
	}

}

@@ -35,16 +35,67 @@
 oller;%0A%0A
+import java.util.Calendar;%0Aimport java.util.Date;%0A%0A
 import j
@@ -114,16 +114,16 @@
 Inject;%0A
-
 %0Aimport 
@@ -210,24 +210,64 @@
 serManager;%0A
+import com.modesteam.urutau.model.User;%0A
 import com.m
@@ -348,24 +348,59 @@
 Controller;%0A
+import br.com.caelum.vraptor.Post;%0A
 import br.co
@@ -1214,16 +1214,16 @@
 ervice;%0A
-
 %09%09this.v
@@ -1247,12 +1247,664 @@
 tor; %0A%09%7D
+%0A%09%0A%09@Post%0A%09public void createProject(Projetc project)%7B%0A%09%09logger.info(%22Project will be persisted: %22 + project.getTitle());%0A%09%09%0A%09%09Date currentDate = new Date();%0A%09%09Calendar calendar = Calendar.getInstance();%0A%09%09calendar.setTime(currentDate);%0A%09%09%0A%09%09project.setDateOfCreation(calendar);%0A%09%09%0A%09%09User logged = userSession.getUserLogged();%0A%09%09project.setAuthor(logged);%0A%09%09%0A%09%09logger.info(%22Requesting for project service%22);%0A%09%09projectService.save(project);%0A%09%09%0A%09%09result.redirectTo(this).showCreationResult(requirement.getId());%0A%09%7D%0A%09%09%0A%09%7D%0A%09%0A%09@Post%0A%09public void deleteProject()%7B%0A%09%09%0A%09%7D%0A%09%0A%09@Post%0A%09public void listProjects()%7B%0A%09%09%0A%09%7D%0A%09%0A%09@Post%0A%09public void detailProject()%7B%0A%09%09%0A%09%7D
 %0A%0A%7D%0A

Create some methods of project controller(MODEL NECESSARY)