com.groiss.server
Interface Admin


public interface Admin

Interface for administrative actions. Use ServiceLocator.getAdmin() to create an instance of this interface.


Method Summary
 void executeTimer(java.lang.String id)
          Execute the timer with the given id
 java.lang.String exportXML(java.util.List objects, java.lang.String clustername, java.lang.String description, java.util.Set<java.lang.String> skipclasses, java.io.OutputStream os, java.io.PrintWriter pw)
          Perform an XML Export.
 java.lang.String exportXML(java.lang.String mainclass, java.lang.String condition, java.util.List params, java.lang.String clustername, java.lang.String description, java.util.Set<java.lang.String> skipclasses, java.io.OutputStream os, java.io.PrintWriter pw)
          Perform an XML Export.
 void generateFormClass(FormType ft)
          Generate the classes for the given form type.
 java.lang.String getServerURL()
          returns the url to the web server, the information is maintained in the server object in the administration.
 java.lang.String importXML(java.lang.String resource)
          Perform an XML-Import.
 void initLogFile()
          Initialize the log file (start writing a new one)
 boolean isLoginAllowed()
          Is login ot @ep allowed?
 void refreshWorklistCacheInstances()
          Refresh the activities in the worklist cache
 void refreshWorklistCacheOrgData()
          Refresh the organizational data in the worklist cache
 void reloadDBConnections()
          Marks all Database Connections as old.
 void removeFieldModes(ProcessDefinition pd, java.lang.String steplabel, java.lang.String formid, java.lang.String subformids)
          Remove the field modes of a form in a process.
 void replaceHTML(FormType ft, java.lang.String htmlpage)
          Regenerate a form.
 void restartServer()
          Restart the @enterprise server
 java.lang.String serverInfo()
          Print out the server information.
 void setFieldModes(ProcessDefinition pd, java.lang.String steplabel, java.lang.String formid, java.lang.String subformids, java.util.Map<java.lang.String,java.lang.Short> modes)
          Set the field mode for a step in a process.
 void setLoginAllowed(java.lang.String nodeid, boolean allowed, java.lang.String message)
          Allow or deny the login on the given node.
 void setLoginAllowed(java.lang.String nodeid, boolean allowed, java.lang.String message, int currentSessions, java.lang.String successorNodeId)
          Allow or deny the login on the given node.
 java.net.URL showClassLocation(java.lang.String cl)
          Search the resource in the classpath.
 void stopServer()
          Stop the @enterprise server
 java.lang.String viewLogFile()
          View the current log file
 

Method Detail

stopServer

void stopServer()
Stop the @enterprise server


restartServer

void restartServer()
Restart the @enterprise server


generateFormClass

void generateFormClass(FormType ft)
                       throws java.lang.Exception
Generate the classes for the given form type.

Throws:
java.lang.Exception

replaceHTML

void replaceHTML(FormType ft,
                 java.lang.String htmlpage)
                 throws java.lang.Exception
Regenerate a form. In case of HTML forms the second argument contains the HTML text for this form, in case of XHTML forms the second argument is ignored. The functions recreates the form classes and adds or drop fields to the form table if necessary. Note that the type of new form fields must be provided in the html text (attributes dbtype and dblength). NOTE: Import/Export functionality should be used instead of this method for transporting ALL aspects of form types.
NOTE 2: The method MAY make an implicit commit of the database transaction, when an alter table statement is executed. Be careful using this method in one transaction with other database operations.

Throws:
java.lang.Exception

serverInfo

java.lang.String serverInfo()
                            throws java.lang.Exception
Print out the server information.

Throws:
java.lang.Exception

executeTimer

void executeTimer(java.lang.String id)
                  throws java.lang.Exception
Execute the timer with the given id

Throws:
java.lang.Exception

refreshWorklistCacheOrgData

void refreshWorklistCacheOrgData()
Refresh the organizational data in the worklist cache


refreshWorklistCacheInstances

void refreshWorklistCacheInstances()
Refresh the activities in the worklist cache


initLogFile

void initLogFile()
Initialize the log file (start writing a new one)


viewLogFile

java.lang.String viewLogFile()
                             throws java.io.IOException
View the current log file

Throws:
java.io.IOException

isLoginAllowed

boolean isLoginAllowed()
Is login ot @ep allowed?


setLoginAllowed

void setLoginAllowed(java.lang.String nodeid,
                     boolean allowed,
                     java.lang.String message)
                     throws java.lang.Exception
Allow or deny the login on the given node.

Parameters:
nodeid - id of cluster node, ignored in non-cluster mode
allowed - if true login is allowed
message - a message for the users trying to login.
Throws:
java.lang.Exception

setLoginAllowed

void setLoginAllowed(java.lang.String nodeid,
                     boolean allowed,
                     java.lang.String message,
                     int currentSessions,
                     java.lang.String successorNodeId)
                     throws java.lang.Exception
Allow or deny the login on the given node.

Throws:
java.lang.Exception

showClassLocation

java.net.URL showClassLocation(java.lang.String cl)
Search the resource in the classpath.


importXML

java.lang.String importXML(java.lang.String resource)
                           throws java.lang.Exception
Perform an XML-Import.

Parameters:
resource - a resource in the classpath
Returns:
the log information is returned
Throws:
java.lang.Exception

exportXML

java.lang.String exportXML(java.lang.String mainclass,
                           java.lang.String condition,
                           java.util.List params,
                           java.lang.String clustername,
                           java.lang.String description,
                           java.util.Set<java.lang.String> skipclasses,
                           java.io.OutputStream os,
                           java.io.PrintWriter pw)
                           throws java.lang.Exception
Perform an XML Export.

Parameters:
mainclass - export elements of this class
condition - restriction for mainclass
params - parameter of the condition
clustername - refers to a cluster in SchemaDescription contains a list of classes to export
description - description for export file
skipclasses - do not export member of these classes
os - write the export to this stream
pw - write the log to this writer
Returns:
a name of the export file
Throws:
java.lang.Exception

exportXML

java.lang.String exportXML(java.util.List objects,
                           java.lang.String clustername,
                           java.lang.String description,
                           java.util.Set<java.lang.String> skipclasses,
                           java.io.OutputStream os,
                           java.io.PrintWriter pw)
                           throws java.lang.Exception
Perform an XML Export.

Parameters:
objects - a homogenous list of objects of an exportable class
clustername - refers to a cluster in SchemaDescription contains a list of classes to export
description - description for export file
skipclasses - do not export member of these classes
os - write the export to this stream
pw - write the log to this writer
Returns:
a name of the export file
Throws:
java.lang.Exception

getServerURL

java.lang.String getServerURL()
returns the url to the web server, the information is maintained in the server object in the administration. The context path is taken from the configuration.

Returns:
an url string, for example: http://hostname:port/wf/

reloadDBConnections

void reloadDBConnections()
Marks all Database Connections as old. Old connections are refreshed before binding them to a thread. Refreshing means to close the connection and to open a new one. Can be used to redistribute database connections among nodes of a clustered DBMS.


setFieldModes

void setFieldModes(ProcessDefinition pd,
                   java.lang.String steplabel,
                   java.lang.String formid,
                   java.lang.String subformids,
                   java.util.Map<java.lang.String,java.lang.Short> modes)
Set the field mode for a step in a process. The parameter subformids specifies the subform.

Parameters:
pd - the process definition object, mandatory
steplabel - the label of the step, mandatory
formid - the id of the form, mandatory
subformids - the key for subforms: If the modes of a subform are set, this parameter contains the subforms id(s) separated be a slash. Example: the form f has a subform g with id 1, g has a subform h with id 3, the parameter subformids should have the value "1/3" if setting the field values of form h. If the modes of a mainform are set the parameters is either "0" or may be null.
modes - The modes map is a map of fieldnames and mode values. See the constants in WfEngine for the value range. The field names are either the java field names of the form class of the classname and id of the subform, separated by a space.

removeFieldModes

void removeFieldModes(ProcessDefinition pd,
                      java.lang.String steplabel,
                      java.lang.String formid,
                      java.lang.String subformids)
Remove the field modes of a form in a process.

Parameters:
pd - the process definition object, mandatory
steplabel - the steplabel, may be null
formid - id of the form in the process, mandatory
subformids - syntax as in setFieldModes, null means all form fields of the form (and step) are deleted.


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.