|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.uif.service.impl.ViewServiceImpl
public class ViewServiceImpl
Implementation of ViewService
Provides methods for retrieving View instances and carrying out the View
lifecycle methods. Interacts with the configured ViewHelperService
during the view lifecycle
Constructor Summary | |
---|---|
ViewServiceImpl()
|
Method Summary | |
---|---|
void |
buildView(View view,
Object model)
Applies updates to the view based on the model data. |
protected DataDictionaryService |
getDataDictionaryService()
|
View |
getView(String viewId,
Map<String,String> parameters)
Retrieves the view from the data dictionary and its corresponding ViewHelperService . |
View |
getViewById(String viewId)
Returns the View entry identified by the given id |
View |
getViewByType(String viewType,
Map<String,String> parameters)
Retrieves the View instance that is of the given view type
and matches the given parameters (that are applicable for that type). |
protected View |
getViewForType(String viewTypeName,
Map<String,String> parameters)
Retrieves the ViewTypeService for the given view type, then
builds up the index based on the supported view type parameters and
queries the dictionary service to retrieve the view based on its type and
index |
ViewTypeService |
getViewTypeService(String viewType)
|
List<ViewTypeService> |
getViewTypeServices()
|
protected void |
performInitialization(View view,
Map<String,String> parameters)
Initializes a newly created View instance. |
View |
rebuildView(String viewId,
Object model,
Map<String,String> parameters)
Returns the View entry identified by the given id and runs
through the complete lifecycle. |
void |
setDataDictionaryService(DataDictionaryService dataDictionaryService)
|
void |
setViewTypeServices(List<ViewTypeService> viewTypeServices)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewServiceImpl()
Method Detail |
---|
public View getViewById(String viewId)
ViewService
View
entry identified by the given id
The id matches the id configured for the View through the dictionary. The view is initialized before being returned
getViewById
in interface ViewService
viewId
- - unique id for view configured on its definition
ViewService.getViewById(java.lang.String)
public View getView(String viewId, Map<String,String> parameters)
ViewHelperService
. The first phase of the view lifecycle
Initialize is then performed
getView
in interface ViewService
viewId
- - unique id for view configured on its definitionparameters
- - Map of key values pairs that provide configuration for the
View
, this is generally comes from the request
and can be the request parameter Map itself. Any parameters
not valid for the View will be filtered out
ViewService.getView(java.lang.String,
java.util.Map)
protected void performInitialization(View view, Map<String,String> parameters)
View
instance. Each component of
the tree is invoked to perform setup based on its configuration. In
addition helper service methods are invoked to perform custom
initialization
view
- - view instance to initializeparameters
- - Map of key values pairs that provide configuration for the
View
, this is generally comes from the request
and can be the request parameter Map itself. Any parameters
not valid for the View will be filtered outpublic void buildView(View view, Object model)
ViewService
Performs dynamic generation of fields (such as collection rows), conditional logic, and state updating (conditional hidden, read-only, required).
buildView
in interface ViewService
view
- - view instance to updatemodel
- - Top level object containing the data (could be the form or a
top level business object, dto)ViewService.buildView(org.kuali.rice.krad.uif.view.View,
java.lang.Object)
public View rebuildView(String viewId, Object model, Map<String,String> parameters)
ViewService
View
entry identified by the given id and runs
through the complete lifecycle. Used to rebuild the view on a post before
rendering or on a session timeout
rebuildView
in interface ViewService
viewId
- - unique id for view configured on its definitionmodel
- - Form object containing the data for the viewparameters
- - Map of key values pairs that provide parameters for the
view. This comes from the initial request to set view
properties that have the RequestParameter
annotation
ViewService.rebuildView(java.lang.String,
java.lang.Object, java.util.Map)
public View getViewByType(String viewType, Map<String,String> parameters)
ViewService
View
instance that is of the given view type
and matches the given parameters (that are applicable for that type). If
more than one views exists for the type and parameters, the view type may
choose a default or throw an exception
getViewByType
in interface ViewService
viewType
- - name that identifies the view typeparameters
- - Map of parameter key/value pairs that are used to select the
view, the parameters allowed depend on the view type
ViewService.getViewByType(java.lang.String,
java.util.Map)
protected View getViewForType(String viewTypeName, Map<String,String> parameters)
ViewTypeService
for the given view type, then
builds up the index based on the supported view type parameters and
queries the dictionary service to retrieve the view based on its type and
index
viewTypeName
- - name of the view typeparameters
- - Map of parameters that were given on request
public ViewTypeService getViewTypeService(String viewType)
getViewTypeService
in interface ViewService
public List<ViewTypeService> getViewTypeServices()
public void setViewTypeServices(List<ViewTypeService> viewTypeServices)
protected DataDictionaryService getDataDictionaryService()
public void setDataDictionaryService(DataDictionaryService dataDictionaryService)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |