Class BpmProcessDefContentProvider
- All Implemented Interfaces:
IPageFlowScopeAdapter
,IContentProvider
,IRefreshable
,IRefreshableContentProvider
,ITransactionalContentProvider
,IUpdateableContentProvider
,EventListener
,HttpSessionBindingListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected boolean
protected IBpmProcessDefinition
protected String
protected IBpmProcessManager
static final String
static final String
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean
fExpireWithPageFlow
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
DATA_BINDING_CLIENTS, EMPTY_RESOURCES, OUTCOME_ERROR, OUTCOME_OK, resourcesProviders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Persists any changes made to this process definitionvoid
Reverts all changes made since the lastITransactionalContentProvider.applyChanges()
call.void
delete()
Deletes this process definitionboolean
Returnstrue
whenIRefreshable.isAutoRefresh()
is on and the result properties need to be refreshed from the data source by executingIRefreshable.refresh()
method.Returns process definition dataReturns process definition IDObject[]
Returns list of properties supported by this content provider.Class<?>
Returns java type of the given propertyReturns value of the given propertyboolean
hasProperty
(Object propertyKey) Checks if the given property is supported by this content providerboolean
Returnstrue
if the provider is currenlty in auto-refresh modeboolean
isReadOnly
(Object propertyKey) Returns true if the given property is readonly.void
refresh()
(Re)loads data from the data source.protected void
release()
Override this method to release any resources associated with this session.void
setAutoRefresh
(boolean autorefresh) Sets auto refresh mode on.void
setNeedRefresh
(boolean needRefresh) Tells the provider that the input parameters have changed and the output results need to be refreshed the next time any output property is requested viaIContentProvider.getValue(Object)
.void
setProcessDefID
(String processDefID) Sets process definition IDvoid
Sets new value of the given propertyboolean
Returns true if this content provider supports auto refresh feature.Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesSessionBean
getExpireWithPageFlow, setExpireWithPageFlow, valueBound, valueUnbound
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
createMethodBinding, createMethodExpression, createValueBinding, createValueExpression, createValueExpression, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.webmethods.caf.faces.data.IContentProvider
toString
Methods inherited from interface com.webmethods.caf.faces.bean.IPageFlowScopeAdapter
getExpireWithPageFlow, setExpireWithPageFlow
-
Field Details
-
PROPERTY_PROCESS_DEF_ID
- See Also:
-
PROPERTY_PROCESS_DEF
- See Also:
-
processDefID
-
needRefresh
protected boolean needRefresh -
autoRefresh
protected boolean autoRefresh -
processManager
-
processDef
-
-
Constructor Details
-
BpmProcessDefContentProvider
public BpmProcessDefContentProvider()Default constructor
-
-
Method Details
-
getNeedRefresh
public boolean getNeedRefresh()Description copied from interface:IRefreshable
Returns
true
whenIRefreshable.isAutoRefresh()
is on and the result properties need to be refreshed from the data source by executingIRefreshable.refresh()
method.Implementations may return an accurate value from this method if they can track the changes to the input parameter properties or they may require the clients to call
IRefreshable.setNeedRefresh(boolean)
explicitely.- Specified by:
getNeedRefresh
in interfaceIRefreshable
- Returns:
true
when the output properties are not up-to-date with the current input parameters, i.e.IRefreshable.refresh()
needs to be executed manually or automatically.
-
isAutoRefresh
public boolean isAutoRefresh()Description copied from interface:IRefreshable
Returnstrue
if the provider is currenlty in auto-refresh mode- Specified by:
isAutoRefresh
in interfaceIRefreshable
- Returns:
- false if auto-refresh mode is off or not supported
-
refresh
Description copied from interface:IRefreshable
(Re)loads data from the data source. Implementation specific meaning can be executing a SQL query or a web service call. All current data will be lost and updated with the new results if successful.- Specified by:
refresh
in interfaceIRefreshable
- Throws:
ContentProviderException
- if error loading data from the data source
-
setAutoRefresh
Description copied from interface:IRefreshable
Sets auto refresh mode on. When auto refresh mode is on, the provider calls
IRefreshable.getNeedRefresh()
to determine whether the refresh needs to be done before returning any result properties. If it returnstrue
, the provider callsIRefreshable.refresh()
method to updated the result properties.- Specified by:
setAutoRefresh
in interfaceIRefreshable
- Parameters:
autorefresh
- true to turn it on- Throws:
ContentProviderException
- if auto refresh mode is not supported- See Also:
-
setNeedRefresh
public void setNeedRefresh(boolean needRefresh) Description copied from interface:IRefreshable
Tells the provider that the input parameters have changed and the output results need to be refreshed the next time any output property is requested viaIContentProvider.getValue(Object)
.- Specified by:
setNeedRefresh
in interfaceIRefreshable
- Parameters:
needRefresh
-true
if the input parameters have changed
-
supportsAutoRefresh
public boolean supportsAutoRefresh()Description copied from interface:IRefreshable
Returns true if this content provider supports auto refresh feature.- Specified by:
supportsAutoRefresh
in interfaceIRefreshable
- Returns:
- true when auto refresh is supported
- See Also:
-
getPropertyKeys
Description copied from interface:IContentProvider
Returns list of properties supported by this content provider. Can returnObject[0]
, never null.- Specified by:
getPropertyKeys
in interfaceIContentProvider
- Returns:
- array of property keys which is typically of type
String
orInteger
-
getType
Description copied from interface:IContentProvider
Returns java type of the given property- Specified by:
getType
in interfaceIContentProvider
- Parameters:
propertyKey
- the property key of typeString
orInteger
- Returns:
- property java
Class
- Throws:
PropertyNotFoundException
- if property is not supported
-
getValue
Description copied from interface:IContentProvider
Returns value of the given property- Specified by:
getValue
in interfaceIContentProvider
- Parameters:
propertyKey
- the property key of typeString
orInteger
- Returns:
- value of the property, can be
null
- Throws:
PropertyNotFoundException
- if property is not supportedELException
-
hasProperty
Description copied from interface:IContentProvider
Checks if the given property is supported by this content provider- Specified by:
hasProperty
in interfaceIContentProvider
- Parameters:
propertyKey
- property key of typeString
orInteger
- Returns:
true
if property is supported
-
delete
Deletes this process definition- Throws:
ContentProviderException
-
applyChanges
Persists any changes made to this process definition- Specified by:
applyChanges
in interfaceITransactionalContentProvider
- Throws:
ContentProviderException
- if error happens during commit
-
cancelChanges
Description copied from interface:ITransactionalContentProvider
Reverts all changes made since the last
ITransactionalContentProvider.applyChanges()
call.- Specified by:
cancelChanges
in interfaceITransactionalContentProvider
- Throws:
ContentProviderException
-
isReadOnly
Description copied from interface:IUpdateableContentProvider
Returns true if the given property is readonly. If it is readonly,
IUpdateableContentProvider.setValue(Object, Object)
will definitely fail.- Specified by:
isReadOnly
in interfaceIUpdateableContentProvider
- Parameters:
propertyKey
- property key of typeString
orInteger
- Returns:
- true if the property is readonly
- Throws:
PropertyNotFoundException
ELException
-
setValue
public void setValue(Object propertyKey, Object value) throws ELException, PropertyNotFoundException Description copied from interface:IUpdateableContentProvider
Sets new value of the given property
- Specified by:
setValue
in interfaceIUpdateableContentProvider
- Parameters:
propertyKey
- property key of typeString
orInteger
value
- new property value- Throws:
PropertyNotFoundException
- if property is not foundELException
-
getProcessDefID
Returns process definition ID -
setProcessDefID
Sets process definition ID- Parameters:
processDefID
-
-
getProcessDef
Returns process definition data- Throws:
ContentProviderException
-
release
protected void release()Description copied from class:BaseFacesSessionBean
Override this method to release any resources associated with this session. Please note, the FacesContext is not valid for this function- Specified by:
release
in classBaseFacesSessionBean
-