Package com.groiss.wf
Class DefaultApplicationAdapter
java.lang.Object
com.groiss.wf.DefaultApplicationAdapter
- All Implemented Interfaces:
Lifecycle
,Service
,HasResource
,ApplicationAdapter
Default implementation for ApplicationAdapter
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic URL
getDescFile
(Application appl) The method is called whenever a new process Id is neededprotected Page
getNotificationMail
(User user, ActivityInstance ai) Build the notification mail (default notification strategy fornotifyUser(User, ActivityInstance)
)protected static HTMLPage
getNotificationMail
(User u, ActivityInstance ai, String template) Builds the default notification mailReturns the user properties a user can set.Returns the version of the application code.final void
Sets up the UserProperties and the resources for proper i18n.final void
Signals that startup is finished.boolean
Ask the object if it has been startedboolean
returns true if the application is the default application or the configuration has a resource file configured.int
void
notifyUser
(User u, ActivityInstance ai) The method is called when an email-notification about a new worklist entry is sent.void
setApplication
(Application appl) upgrade
(Application app) The default implementation of the upgrade method checks the upgrade information in the properties.xml file of the application.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.groiss.wf.ApplicationAdapter
getFinishRight, getFinishRights, getPacker, getToolbarActions, modifyDetailPanes, onAbort, onAddDocument, onAnonymize, onApplicationInstall, onApplicationUninstall, onChangeAgent, onCopyProcess, onFinishNotComplete, onListPreviousSteps, onReactivate, onRemoveDocument, onSeeAgain, onSeeLater
Methods inherited from interface com.groiss.component.Service
reconfigure
-
Field Details
-
appl
-
userprops
-
localize
protected boolean localize -
applres
-
running
protected boolean running
-
-
Constructor Details
-
DefaultApplicationAdapter
public DefaultApplicationAdapter()
-
-
Method Details
-
setApplication
- Specified by:
setApplication
in interfaceApplicationAdapter
-
getNewProcessId
Description copied from interface:ApplicationAdapter
The method is called whenever a new process Id is needed- Specified by:
getNewProcessId
in interfaceApplicationAdapter
- Parameters:
pi
- the process instance for which the id should be generated
-
nextNum
-
getNotificationMail
Build the notification mail (default notification strategy fornotifyUser(User, ActivityInstance)
)- Parameters:
user
- the user who will be notifiedai
- theActivityInstance
which triggered the notification- Returns:
-
notifyUser
Description copied from interface:ApplicationAdapter
The method is called when an email-notification about a new worklist entry is sent.- Specified by:
notifyUser
in interfaceApplicationAdapter
- Parameters:
u
- the recipientai
- an activity instance
-
getUserProperties
Description copied from interface:ApplicationAdapter
Returns the user properties a user can set. It is normally read from the application configuration.- Specified by:
getUserProperties
in interfaceApplicationAdapter
- Parameters:
u
- The user whose properties should be returned- Returns:
- a list of jdom elements describing the property.
-
localizeNames
public boolean localizeNames()returns true if the application is the default application or the configuration has a resource file configured.- Specified by:
localizeNames
in interfaceHasResource
-
getResource
- Specified by:
getResource
in interfaceHasResource
-
internalStartupComplete
public final void internalStartupComplete()Signals that startup is finished. The method is called by the ApplicationLoader immediately after the call to startup() has completed. -
internalStartup
public final void internalStartup()Sets up the UserProperties and the resources for proper i18n. The method is called by the ApplicationLoader immediately before the call to startup(). -
isRunning
public boolean isRunning()Description copied from interface:Service
Ask the object if it has been started -
getVersion
Description copied from interface:ApplicationAdapter
Returns the version of the application code. The returning string is compared to the version in the database when the system starts up in restricted mode.- Specified by:
getVersion
in interfaceApplicationAdapter
- Returns:
- the version string
-
upgrade
The default implementation of the upgrade method checks the upgrade information in the properties.xml file of the application. The methods of the upgrade steps are performed for each entry where "to" is greater than the current version of the application.- Specified by:
upgrade
in interfaceApplicationAdapter
- Parameters:
app
- the application object- Throws:
Exception
-
getDescFile
- Throws:
IOException
-
getNotificationMail
Builds the default notification mail- Parameters:
u
- the user who is going to receive this notificationai
- the new ai which triggered the notificationtemplate
- the message template path. if the template isnull
,contrib/NotificationMask.html
will be used- Returns:
-