Package com.znize.platform.model
Interface ModelFactory
-
public interface ModelFactoryFactory interface for creating instances of web module.- Since:
- 3.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AccessControlAccessorcreateAccessControlAccessor(DataAccessUnit dataAccessUnit, AccessControlAccessor parent, ModuleAccessControl moduleAccessControl)Create an AccessControlAccessor with moduleAccessControl, chaining to the parent AccessControlAccessor.DialogBeancreateDialogBean(ContainerBean parentContainerBean, DialogBean.DialogType type)Create a DialogBeanInstanceCachecreateInstanceCache(DataAccessUnit dataAccessUnit)Create an InstanceCache for the instanceType or instance.PageNavigationcreatePageNavigation(java.lang.Integer pageId, ContainerBean containerBean, java.lang.Integer queryResultSize)Create a PageNavigation instance with the pageId and containerBean.PartialBehaviorcreatePartialBehavior(java.lang.String event, java.util.List<VisitTarget> executeTargets, java.util.List<VisitTarget> renderTargets, PartialBehavior.ContainerRenderRegions containerRenderRegions)Create a partial behavior.QueryDescriptorcreateQueryDescriptor(DataAccessUnit dataAccessUnit, boolean readOnly, QueryDescriptor.QueryHints hints)Create a QueryDescriptor instanceAccessControlAccessorcreateRootAccessControlAccessor(DataAccessUnit dataAccessUnit)Create the root AccessControlAccessor for the DataAccessUnit, which is one per instanceType and instance.<T extends PersistenceEntity>
EntityPropertyFactory<T>getEntityPropertyFactory()Get EntityPropertyFactory that is a singleton.InstanceManagergetInstanceManager()Get the singleton InstanceManager.QuotaAccessorgetQuotaAccessor()Get QuotaAccessor instance that is one per instanceType instance.<T extends PhaseListener>
java.util.List<T>getRegisteredPhaseListeners(PhaseListener.PhaseId phaseId, java.lang.Class<T> phaseListenerType)Get the registered PhaseListener(s) of the specified listener type for the phaseIdSelectItemListProvidergetSelectItemListProvider()Get the SelectItemListProvider instance.TransactiongetTransaction(DataAccessUnit dataAccessUnit)Get the transaction for the instance.UiViewgetUiView(Component component)Get the UIView object of the component, which is defined by UI layer such as web, android.
-
-
-
Method Detail
-
createRootAccessControlAccessor
AccessControlAccessor createRootAccessControlAccessor(DataAccessUnit dataAccessUnit)
Create the root AccessControlAccessor for the DataAccessUnit, which is one per instanceType and instance.- Parameters:
dataAccessUnit- instanceType or instance- Returns:
- an AccessControlAccessor instance.
-
createAccessControlAccessor
AccessControlAccessor createAccessControlAccessor(DataAccessUnit dataAccessUnit, AccessControlAccessor parent, ModuleAccessControl moduleAccessControl)
Create an AccessControlAccessor with moduleAccessControl, chaining to the parent AccessControlAccessor.- Parameters:
dataAccessUnit- instanceType or instanceparent- parent AccessControlAccessor. if null, default to root.moduleAccessControl- module AccessControl- Returns:
- an AccessControlAccessor instance.
-
getQuotaAccessor
QuotaAccessor getQuotaAccessor() throws SystemException
Get QuotaAccessor instance that is one per instanceType instance.- Returns:
- QuotaAccessor instance for current bound instanceType
- Throws:
SystemException- throw if an internal error occurs
-
getSelectItemListProvider
SelectItemListProvider getSelectItemListProvider()
Get the SelectItemListProvider instance.- Returns:
- SelectItemListProvider instance
-
getEntityPropertyFactory
<T extends PersistenceEntity> EntityPropertyFactory<T> getEntityPropertyFactory()
Get EntityPropertyFactory that is a singleton.- Returns:
- EntityPropertyFactory
-
createQueryDescriptor
QueryDescriptor createQueryDescriptor(DataAccessUnit dataAccessUnit, boolean readOnly, QueryDescriptor.QueryHints hints)
Create a QueryDescriptor instance- Parameters:
dataAccessUnit- instanceType or instancereadOnly- whether it is read only. If true, updating persistence is prohibited.hints- properties/hints for PersistenceEntityManager- Returns:
- QueryDescriptor instance
-
createInstanceCache
InstanceCache createInstanceCache(DataAccessUnit dataAccessUnit)
Create an InstanceCache for the instanceType or instance.- Parameters:
dataAccessUnit- instanceType or instance- Returns:
- InstanceCache object
-
getInstanceManager
InstanceManager getInstanceManager()
Get the singleton InstanceManager.- Returns:
- InstanceManager object
- Since:
- 5.20
-
createPageNavigation
PageNavigation createPageNavigation(java.lang.Integer pageId, ContainerBean containerBean, java.lang.Integer queryResultSize)
Create a PageNavigation instance with the pageId and containerBean.- Parameters:
pageId- target pageId for navigation, can be null.containerBean- initialized ContainerBean for target page, can be nullqueryResultSize- the size of query results, can be null- Returns:
- PageNavigation instance
-
getRegisteredPhaseListeners
<T extends PhaseListener> java.util.List<T> getRegisteredPhaseListeners(PhaseListener.PhaseId phaseId, java.lang.Class<T> phaseListenerType)
Get the registered PhaseListener(s) of the specified listener type for the phaseId- Parameters:
phaseId- phase idphaseListenerType- PhaseListener type- Returns:
- a list of PhaseListener instances
- Since:
- 5.7
-
createDialogBean
DialogBean createDialogBean(ContainerBean parentContainerBean, DialogBean.DialogType type)
Create a DialogBean- Parameters:
parentContainerBean- parent ContainerBeantype- dialog type- Returns:
- DialogBean instance
- Since:
- 5.7
-
createPartialBehavior
PartialBehavior createPartialBehavior(java.lang.String event, java.util.List<VisitTarget> executeTargets, java.util.List<VisitTarget> renderTargets, PartialBehavior.ContainerRenderRegions containerRenderRegions)
Create a partial behavior.- Parameters:
event- event nameexecuteTargets- a list of execute targetsrenderTargets- a list of render targetscontainerRenderRegions- the render regions for event handler to show results
-
getUiView
UiView getUiView(Component component)
Get the UIView object of the component, which is defined by UI layer such as web, android.- Parameters:
component- a component- Returns:
- UI view
- Since:
- 5.7
-
getTransaction
Transaction getTransaction(DataAccessUnit dataAccessUnit)
Get the transaction for the instance.- Parameters:
dataAccessUnit- instanceType or instance- Returns:
- transaction that can be JTA or resource local.
- Since:
- 5.9
-
-