All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.talk2object.plum.interaction.viewgeneneration.ViewFactory Maven / Gradle / Ivy

There is a newer version: 0.1.22
Show newest version
package com.talk2object.plum.interaction.viewgeneneration;

import com.talk2object.plum.view._abstract.window.UIComponent;

public interface ViewFactory {

	/**
	 * scan view buildersin base package
	 */
	void scanDomainObjects();
	
	void register(Class modelClass, AbstractViewBuilder builder);

	/**
	 * model class as specified, throw exception if exact view builder is not
	 * registered.
	 * 
	 * @param model
	 * @param viewClassExpressions
	 * @param modelClass
	 * @param context
	 * @param parentView
	 * @return
	 */
	UIComponent create(Object model, Class modelClass,
			String viewClassExpressions, ViewBuildContext context,
			UIComponent parentView);

	/**
	 * create view for model, modelClass is Class of model object.
	 * 
	 * @param model
	 * @param viewClassExpressions e.g. .list-item item visible
	 * @param context
	 * @param parentView
	 * @return
	 */
	UIComponent create(Object model, BuilderMatchPolicy policy,
			String viewClassExpressions, ViewBuildContext context,
			UIComponent parentView);

	UIComponent create(Object model, BuilderMatchPolicy policy,
			String[] viewClassExpressionArray, ViewBuildContext context,
			UIComponent parentView);

	// View create(model, viewName, modelClass, builderClass)
	// //当有多个builder支持的时候,指定builder。

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy