// Path: src/main/java/com/liferay/support/tools/common/DummyFactory.java
// public abstract class DummyFactory {
// 	abstract public DummyGenerator<?> create(ActionRequest request);
// }
// 
// Path: src/main/java/com/liferay/support/tools/common/DummyGenerator.java
// public abstract class DummyGenerator<T extends ParamContext> {
// 
// 	/**
// 	 * Get Context
// 	 *
// 	 * @param request
// 	 * @return
// 	 */
// 	protected abstract T getContext(ActionRequest request) throws Exception;
// 
// 	/**
// 	 * Create Dummy data
// 	 *
// 	 * @param request
// 	 * @throws Exception
// 	 */
// 	public void create(ActionRequest request) throws Exception {
// 
// 		T paramContext = getContext(request);
// 
//         if(!validate(paramContext)) {
//             throw new Exception("Validation Error");
//         }
// 
// 		ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
// 		ServiceContext serviceContext = ServiceContextFactory.getInstance(Group.class.getName(), request);
// 
// 		paramContext.setThemeDisplay(themeDisplay);
// 		paramContext.setServiceContext(serviceContext);
// 
// 		TimeKeeper timeKeeper = new TimeKeeper();
// 		timeKeeper.start();
// 
// 		// Execute creation process
// 		exec(request, paramContext);
// 		
// 		timeKeeper.stop();
// 		timeKeeper.outputTime();
// 	}
// 
// 	/**
// 	 * Validation
// 	 *
// 	 * @param paramContext
// 	 * @return boolean
//      */
// 	protected boolean validate(T paramContext) {
// 		return true;
// 	}
// 
// 	/**
// 	 * Exec data
// 	 *
// 	 * @param paramContext
// 	 */
// 	protected abstract void exec(ActionRequest request, T paramContext) throws Exception;
// }


import com.liferay.support.tools.common.DummyFactory;
import com.liferay.support.tools.common.DummyGenerator;
import javax.portlet.ActionRequest;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
package com.liferay.support.tools.blogs;




/**
 * Blogs post dummy factory
 * 
 * @author Yasuyuki Takeo
 *
 */
@Component(immediate = true, service = BlogsDummyFactory.class)
public class BlogsDummyFactory extends DummyFactory {

	@Override
	public DummyGenerator<BlogsContext> create(ActionRequest request) {
		return _blogsDefaultDummyGenerator;
	}

	@Reference
// Path: src/main/java/com/liferay/support/tools/common/DummyFactory.java
// public abstract class DummyFactory {
// 	abstract public DummyGenerator<?> create(ActionRequest request);
// }
// 
// Path: src/main/java/com/liferay/support/tools/common/DummyGenerator.java
// public abstract class DummyGenerator<T extends ParamContext> {
// 
// 	/**
// 	 * Get Context
// 	 *
// 	 * @param request
// 	 * @return
// 	 */
// 	protected abstract T getContext(ActionRequest request) throws Exception;
// 
// 	/**
// 	 * Create Dummy data
// 	 *
// 	 * @param request
// 	 * @throws Exception
// 	 */
// 	public void create(ActionRequest request) throws Exception {
// 
// 		T paramContext = getContext(request);
// 
//         if(!validate(paramContext)) {
//             throw new Exception("Validation Error");
//         }
// 
// 		ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
// 		ServiceContext serviceContext = ServiceContextFactory.getInstance(Group.class.getName(), request);
// 
// 		paramContext.setThemeDisplay(themeDisplay);
// 		paramContext.setServiceContext(serviceContext);
// 
// 		TimeKeeper timeKeeper = new TimeKeeper();
// 		timeKeeper.start();
// 
// 		// Execute creation process
// 		exec(request, paramContext);
// 		
// 		timeKeeper.stop();
// 		timeKeeper.outputTime();
// 	}
// 
// 	/**
// 	 * Validation
// 	 *
// 	 * @param paramContext
// 	 * @return boolean
//      */
// 	protected boolean validate(T paramContext) {
// 		return true;
// 	}
// 
// 	/**
// 	 * Exec data
// 	 *
// 	 * @param paramContext
// 	 */
// 	protected abstract void exec(ActionRequest request, T paramContext) throws Exception;
// }


// Path: src/main/java/com/liferay/support/tools/blogs/BlogsDummyFactory.java
import com.liferay.support.tools.common.DummyFactory;
import com.liferay.support.tools.common.DummyGenerator;
import javax.portlet.ActionRequest;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;

package com.liferay.support.tools.blogs;




/**
 * Blogs post dummy factory
 * 
 * @author Yasuyuki Takeo
 *
 */
@Component(immediate = true, service = BlogsDummyFactory.class)
public class BlogsDummyFactory extends DummyFactory {

	@Override
	public DummyGenerator<BlogsContext> create(ActionRequest request) {
		return _blogsDefaultDummyGenerator;
	}

	@Reference
	BlogsDefaultDummyGenerator _blogsDefaultDummyGenerator;	