package devopsdistilled.operp.client.items.panes.controllers.impl;

import javax.inject.Inject;

import devopsdistilled.operp.client.items.models.CategoryModel;
import devopsdistilled.operp.client.items.panes.CreateCategoryPane;
import devopsdistilled.operp.client.items.panes.controllers.CreateCategoryPaneController;
import devopsdistilled.operp.client.items.panes.models.CreateCategoryPaneModel;

public class CreateCategoryPaneControllerImpl implements
		CreateCategoryPaneController {

	@Inject
	private CreateCategoryPane view;

	@Inject
	private CreateCategoryPaneModel model;

	@Inject
	private CategoryModel categoryModel;

	@Override
	public void init() {
		view.init();
		model.registerObserver(view);
	}

}

@@ -90,16 +90,169 @@
 nject;%0A%0A
+import devopsdistilled.operp.client.items.exceptions.EntityNameExistsException;%0Aimport devopsdistilled.operp.client.items.exceptions.NullFieldException;%0A
 import d
@@ -307,16 +307,16 @@
 yModel;%0A
-
 import d
@@ -544,16 +544,80 @@
 neModel;
+%0Aimport devopsdistilled.operp.server.data.entity.items.Category;
 %0A%0Apublic
@@ -891,16 +891,16 @@
 init();%0A
-
 %09%09model.
@@ -927,10 +927,464 @@
 w);%0A%09%7D%0A%0A
+%09@Override%0A%09public void validate(Category category) throws NullFieldException, EntityNameExistsException %7B%0A%09%09if (category.getCategoryName().equalsIgnoreCase(%22%22)) %7B%0A%09%09%09throw new NullFieldException();%0A%09%09%7D%0A%0A%09%09if (categoryModel.getService().isCategoryNameExists(%0A%09%09%09%09category.getCategoryName())) %7B%0A%09%09%09throw new EntityNameExistsException();%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09public Category save(Category category) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return null;%0A%09%7D%0A%0A
 %7D%0A

Define validate()