|
ALBPM Process API (PAPI) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfuego.papi.ProcessService
Main class in Process API (PAPI) framework.
ProcessServiceSession
Example.
// Creates the properties to create the ProcessService.
java.util.Properties properties = new java.util.Properties();
// Set the directory Id that we use.
properties.setProperty(ProcessService.DIRECTORY_ID, "OrgDirectory");
// Set the directory file that we use, this file is in the classpath.
// The directory properties can either be in the classpath, or be a file location.
properties.setProperty(ProcessService.DIRECTORY_PROPERTIES_RESOURCE, "directory.properties");
// Set the maximum size of the instance cache per process.
properties.setProperty(ProcessService.INSTANCE_CACHE_SIZE, "50000");
// Set the folder where PAPI will store catalogs and temporary files.
properties.setProperty(ProcessService.WORKING_FOLDER, "/fuego/tmp");
// Set that the sessions will be notified when an instance is updated.
properties.setProperty(ProcessService.UPDATE_SESSIONS_VIEWS, "true");
// Creates the ProcessService.
ProcessService processService = ProcessService.create(properties);
// Creates the passport for the user which will connect.
ConnectionPassport passport = processService.createPassport("userId);
// Sets the passpord of the user.
passport.setPassword("userPassport");
// Completes the given passport for authentication purposes.
passport.fillPassport();
// Creates a new session.
// The arguments are the passport of the user and the host where the user is connected from.
ProcessServiceSession session = processService.createSession(passport, "userHost");
| Nested Class Summary | |
static interface |
ProcessService.Factory
|
| Field Summary | |
static int |
DEFAULT_CACHE_SIZE
Default value for the property key INSTANCES_CACHE_SIZE. |
static String |
DEFAULT_DIRECTORY_ID
Default value for the property key DIRECTORY_ID. |
static String |
DEFAULT_DIRECTORY_PROPERTIES_FILE
Default value for the property key DIRECTORY_PROPERTIES_FILE. |
static String |
DEFAULT_WORKING_DIRECTORY
Default value for the property key WORKING_FOLDER. |
static String |
DIRECTORY_ID
Property key for Directory Identifier. |
static String |
DIRECTORY_PROPERTIES_FILE
Property key for the location of the directory.properties file. |
static String |
DIRECTORY_PROPERTIES_RESOURCE
Property key for the filename of the directory.properties resource. |
static String |
DIRECTORY_PROPERTIES_URL
Property key for the URL of the directory.properties resource. |
static String |
INSTANCES_CACHE_SIZE
Property key for instances cache size. |
static String |
UPDATE_SESSIONS_VIEWS
Property key for notifies sessions when an instance is updated. |
static String |
WORKING_FOLDER
Property key for working folder. |
| Constructor Summary | |
ProcessService()
|
|
| Method Summary | |
abstract void |
close()
Closes this service, and disconnects all the sessions that are still connected. |
static ProcessService |
create(ConnectionPassport passport,
Properties properties)
Creates a new ProcessService using ConnectionPassport and Properties. You do not need to set the directory properties because the passport contains that information. The directory properties include: ProcessService.DIRECTORY_ID ProcessService.DIRECTORY_PROPERTIES_FILE ProcessService.DIRECTORY_PROPERTIES_RESOURCE ProcessService.DIRECTORY_PROPERTIES_URL |
static ProcessService |
create(ConnectionPassport passport,
String baseFolder,
int instancesCacheSize)
Deprecated. Use create(ConnectionPassport, Properties) instead. |
static ProcessService |
create(Properties properties)
Recommended method to create a ProcessService. |
static ProcessService |
create(String url)
Deprecated. Use create(Properties) or
create(fuego.lang.ConnectionPassport, java.util.Properties) instead. |
static ProcessService |
create(String url,
String baseFolder)
Deprecated. Use create(Properties) instead. |
static ProcessService |
create(String url,
String baseFolder,
int instancesCacheSize)
Deprecated. Use create(Properties) instead. |
static ProcessService |
create(String url,
String id,
String baseFolder,
int instancesCacheSize)
Deprecated. Use create(Properties) instead. |
static Filter |
createFilter()
Creates a Filter for use in getting InstanceInfo. |
static Filter |
createFilter(int matchingCriteria)
Deprecated. Use createFilter() instead. |
abstract ProcessServiceNESession |
createNESession(ConnectionPassport passport,
String host)
Deprecated. all sessions are non exclusive now. Besides, all operations can be executed with a non exclusive session. Use createSession(ConnectionPassport, String) instead. |
abstract ProcessServiceNESession |
createNESession(ConnectionPassport passport,
String host,
boolean takeOver)
Deprecated. all sessions are non exclusive now. Besides, all operations can be executed with a non exclusive session. Use createSession(ConnectionPassport, String) instead. |
abstract ProcessServiceNESession |
createNESession(String userId,
String password,
String host)
Deprecated. all sessions are non exclusive now. Besides, all operations can be executed with a non exclusive session. Use createSession(String, String, String) instead. |
abstract ProcessServiceNESession |
createNESession(String userId,
String password,
String host,
boolean takeOver)
Deprecated. all sessions are non exclusive now. Besides, all operations can be executed with a non exclusive session. Use createSession(String, String, String) instead. |
abstract ConnectionPassport |
createPassport(String participant)
Creates a ConnectionPassport to connect to the process service using a participant id. The participant can be null, representing an anonymous connection. |
abstract ConnectionPassport |
createPassportWithPreset(String preset)
Creates a ConnectionPassport to connect to the process service using the preset connection information from the directory properties. |
abstract ProcessServiceSession |
createSession(ConnectionPassport passport,
String host)
Creates a ProcessServiceSession using ConnectionPassport and the user's host. |
abstract ProcessServiceSession |
createSession(ConnectionPassport passport,
String host,
boolean takeOver)
Deprecated. takeOver argument is not longer supported. Use createSession(ConnectionPassport, String)
instead. |
abstract ProcessServiceSession |
createSession(String userId,
String password,
String host)
Creates a ProcessServiceSession using a user id, password, and the user's host. |
abstract ProcessServiceSession |
createSession(String userId,
String password,
String host,
boolean takeOver)
Deprecated. takeOver argument is not longer supported. Use createSession(String, String, String) instead. |
static ProcessService |
createWithId(String id)
Deprecated. Use create(Properties) instead. |
static ProcessService |
createWithId(String id,
String baseFolder)
Deprecated. Use create(Properties) instead. |
static ProcessService |
createWithId(String id,
String baseFolder,
int instancesCacheSize)
Deprecated. Use create(Properties) instead. |
abstract Properties |
getProperties()
Returns the properties used to create this object. |
abstract String |
getProperty(String property)
Returns the value of the given property key from the properties that was used to create this ProcessService. The property should be one of the default property values, e.g. |
abstract String |
getUserDocumentationFolder()
Gets the user documentation folder. |
static char[] |
invalidIdCharacters()
Returns an array of characters that are invalid for identifiers, including view and presentation identifiers. This list is not exhaustive; id characters cannot be non-ascii characters. |
abstract void |
setLocale(Locale locale,
ProcessServiceNESession session)
Sets the locale for messages from the engine. |
abstract void |
setUserDocumentationFolder(String userDocumentationFolder)
Sets the user documentation folder (Folder where the documentation will be stored). |
abstract void |
startUpdater(ConnectionPassport passport,
long updateFrequency)
Starts the updater to synchronize directory changes for views, presentations, variable definitions and groups. |
abstract void |
startViewUpdater(ConnectionPassport passport,
long updateFrequency)
Deprecated. Use startUpdater(ConnectionPassport, long) instead. |
abstract void |
stopUpdater()
Stops the updater. |
abstract void |
stopViewUpdater()
Deprecated. Use stopUpdater() instead. |
abstract String |
toString()
Returns information about the directory url, working folder, and number of active sessions. |
static void |
updateOrganizationalInformationFromDirectory()
Synchronizes directory changes for views, presentations, varible definitions and groups. The operation will be executed only if you started the updater startUpdater(fuego.lang.ConnectionPassport, long). |
abstract void |
updateSessionViewsForNewInstances(boolean updateSessionViews)
Deprecated. Set the property UPDATE_SESSIONS_VIEWS when you create the ProcessService. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String DIRECTORY_PROPERTIES_FILE
public static final String DIRECTORY_PROPERTIES_RESOURCE
public static final String DIRECTORY_PROPERTIES_URL
public static final String DIRECTORY_ID
public static final String INSTANCES_CACHE_SIZE
public static final String UPDATE_SESSIONS_VIEWS
true" and
"false".
public static final String WORKING_FOLDER
public static final int DEFAULT_CACHE_SIZE
INSTANCES_CACHE_SIZE.
public static final String DEFAULT_WORKING_DIRECTORY
WORKING_FOLDER.
public static final String DEFAULT_DIRECTORY_ID
DIRECTORY_ID.
public static final String DEFAULT_DIRECTORY_PROPERTIES_FILE
DIRECTORY_PROPERTIES_FILE.
| Constructor Detail |
public ProcessService()
| Method Detail |
public abstract Properties getProperties()
Properties used to create this object.public abstract String getProperty(String property)
property - the key of the property to obtain.
null if the specified property does not exist.public abstract void close()
public abstract ProcessServiceNESession createNESession(ConnectionPassport passport,
String host)
throws OperationException
createSession(ConnectionPassport, String) instead.
passport - ConnectionPassport with user credentials. Cannot be null.host - where the user is connected from. Cannot be null.
OperationException - -
OperationException may be one of the following subclasses of OperationException:AuthenticationException if the user in the connectionpassport
could not be authenticated against the directory server.ProtocolNotSupportedException if the protocol specified in the
directory.properties key directory.default.url is not supported.CommunicationException if unable to connect to the directory.ParticipantNotFoundException if the user cannot be found.AbsentParticipantException if the participant is absent as defined by
the participant's Absence Periods.createPassport(String)
public abstract ProcessServiceNESession createNESession(String userId,
String password,
String host)
throws OperationException
createSession(String, String, String) instead.
userId - user id. Cannot be null.password - user Password. Cannot be null.host - where the user is connected from. Cannot be null.
OperationException - -
OperationException may be one of the following subclasses of OperationException:AuthenticationException if the user in the connectionpassport
could not be authenticated against the directory server.ProtocolNotSupportedException if the protocol specified in the
directory.properties key directory.default.url is not supported.CommunicationException if unable to connect to the directory.ParticipantNotFoundException if the user cannot be found.AbsentParticipantException if the participant is absent as defined by
the participant's Absence Periods.
public abstract ProcessServiceNESession createNESession(ConnectionPassport passport,
String host,
boolean takeOver)
throws OperationException
createSession(ConnectionPassport, String) instead.
passport - ConnectionPassport with user credentials. Cannot be null.host - where the user is connected from. Cannot be null.takeOver - if this session should connect to an Engine where the same participant is already connected
from another location (taking over of the connection in that Engine).
OperationException - -
OperationException may be one of the following subclasses of OperationException:AuthenticationException if the user in the connectionpassport
could not be authenticated against the directory server.ProtocolNotSupportedException if the protocol specified in the
directory.properties key directory.default.url is not supported.CommunicationException if unable to connect to the directory.ParticipantNotFoundException if the user cannot be found.AbsentParticipantException if the participant is absent as defined by
the participant's Absence Periods.createPassport(String)
public abstract ProcessServiceNESession createNESession(String userId,
String password,
String host,
boolean takeOver)
throws OperationException
createSession(String, String, String) instead.
userId - user id. Cannot be null.password - user Password. Cannot be null.host - where the user is connected from. Cannot be null.takeOver - if this session should connect to an Engine where the same participant is already connected
from another location (taking over of the connection in that Engine).
OperationException - -
OperationException may be one of the following subclasses of OperationException:AuthenticationException if the user in the connectionpassport
could not be authenticated against the directory server.ProtocolNotSupportedException if the protocol specified in the
directory.properties key directory.default.url is not supported.CommunicationException if unable to connect to the directory.ParticipantNotFoundException if the user cannot be found.AbsentParticipantException if the participant is absent as defined by
the participant's Absence Periods.public abstract ConnectionPassport createPassport(String participant)
null, representing an anonymous connection.
participant - id of participant or null for anonymous connection.
public abstract ConnectionPassport createPassportWithPreset(String preset)
preset - the name which describe the scope of the set of properties.
public abstract ProcessServiceSession createSession(ConnectionPassport passport,
String host)
throws OperationException
passport - ConnectionPassport with user credentials. Cannot be null.host - where the user is connected from. Cannot be null.
OperationException - may be one of the following subclasses of OperationException:
AuthenticationException if the user in the connectionpassport
could not be authenticated against the directory server.ProtocolNotSupportedException if the protocol specified in the
directory.properties key directory.default.url is not supported.CommunicationException if unable to connect to the directory.ParticipantNotFoundException if the user cannot be found.AbsentParticipantException if the participant is absent as
defined by the participant's Absence Periods.createPassport(String)
public abstract ProcessServiceSession createSession(String userId,
String password,
String host)
throws OperationException
userId - user id. Cannot be null.password - user Password. Cannot be null.host - where the user is connected from. Cannot be null.
OperationException - -
OperationException may be one of the following subclasses of OperationException:AuthenticationException if the user in the connectionpassport
could not be authenticated against the directory server.ProtocolNotSupportedException if the protocol specified in the
directory.properties key directory.default.url is not supported.CommunicationException if unable to connect to the directory.ParticipantNotFoundException if the user cannot be found.AbsentParticipantException if the participant is absent as defined by
the participant's Absence Periods.createPassport(String)
public abstract ProcessServiceSession createSession(ConnectionPassport passport,
String host,
boolean takeOver)
throws OperationException
createSession(ConnectionPassport, String)
instead.
passport - ConnectionPassport with user credentials. Cannot be null.host - where the user is connected from. Cannot be null.takeOver - if this session should connect to an Engine where the same participant is already connected
from another location (taking over of the connection in that Engine).
OperationException - -
OperationException may be one of the following subclasses of OperationException:AuthenticationException if the user in the connectionpassport
could not be authenticated against the directory server.ProtocolNotSupportedException if the protocol specified in the
directory.properties key directory.default.url is not supported.CommunicationException if unable to connect to the directory.ParticipantNotFoundException if the user cannot be found.AbsentParticipantException if the participant is absent as defined by
the participant's Absence Periods.createPassport(String)
public abstract ProcessServiceSession createSession(String userId,
String password,
String host,
boolean takeOver)
throws OperationException
createSession(String, String, String) instead.
userId - user id. Cannot be null.password - user Password. Cannot be null.host - where the user is connected from. Cannot be null.takeOver - if this session should connect to an Engine where the same participant is already connected
from another location (taking over of the connection in that Engine).
OperationException - -
OperationException may be one of the following subclasses of OperationException:AuthenticationException if the user in the connectionpassport
could not be authenticated against the directory server.ProtocolNotSupportedException if the protocol specified in the
directory.properties key directory.default.url is not supported.CommunicationException if unable to connect to the directory.ParticipantNotFoundException if the user cannot be found.AbsentParticipantException if the participant is absent as defined by
the participant's Absence Periods.public abstract String getUserDocumentationFolder()
setUserDocumentationFolder(String)
public abstract void setLocale(Locale locale,
ProcessServiceNESession session)
throws OperationException
locale - locale to use for messages. Cannnot be null.session - session to set locale.
OperationException - If the service could not perform the operation.public abstract void setUserDocumentationFolder(String userDocumentationFolder)
userDocumentationFolder - full path to directory to use for the root user documentation folder. Cannot be
null.
public abstract void startUpdater(ConnectionPassport passport,
long updateFrequency)
throws OperationException
passport - passport used to to create a new session for synchronization. Cannot be nullupdateFrequency - frequency to synchronize objects, in milliseconds.
OperationException - if an error occured when starting the updater.createPassport(String)
public abstract void startViewUpdater(ConnectionPassport passport,
long updateFrequency)
throws OperationException
startUpdater(ConnectionPassport, long) instead.
passport - passport used to to create a new session for synchronization. Cannot be nullupdateFrequency - frequency to synchronize objects, in milliseconds.
OperationException - if an error occured when starting the updater.createPassport(String)
public abstract void stopUpdater()
throws OperationException
OperationException - if an error occured when stopping the updater.
public abstract void stopViewUpdater()
throws OperationException
stopUpdater() instead.
OperationException - if an error occured when stopping the updater.public abstract String toString()
public abstract void updateSessionViewsForNewInstances(boolean updateSessionViews)
UPDATE_SESSIONS_VIEWS when you create the ProcessService.
updateSessionViews - true if the service will update the sessions.
public static ProcessService create(String url)
throws CommunicationException
create(Properties) or
create(fuego.lang.ConnectionPassport, java.util.Properties) instead.
url - The URL of the directory of the organization. Cannot be null.
CommunicationException - if unable to communicate with the directory.
public static ProcessService create(Properties properties)
throws CommunicationException
properties - the properties to create the new ProcessService. Cannot be null.CommunicationException - if unable to communicate with the directory.
public static ProcessService create(String url,
String baseFolder)
throws CommunicationException
create(Properties) instead.
url - The url of the fuego directorybaseFolder - The local folder where to store catalogs jars (containing XObject classes) and
process/activity documentation
url
CommunicationException - if unable to communicate with the directory.
public static ProcessService create(ConnectionPassport passport,
Properties properties)
throws CommunicationException
passport - Connection passport used to get the values for the directory (Directory Id and directory
properties).properties - The properties to create the new ProcessService.
CommunicationException - if unable to communicate with the directory.createPassport(String)
public static ProcessService create(String url,
String baseFolder,
int instancesCacheSize)
throws CommunicationException
create(Properties) instead.
url - the URL of the fuego directory. Cannot be null.baseFolder - the working folder where to store catalogs jars (containing XObject classes) and
process/activity documentation. Cannot be null.instancesCacheSize - maximum instances cache size per process. Cannot be null.
CommunicationException - if unable to communicate with the directory.
public static ProcessService create(ConnectionPassport passport,
String baseFolder,
int instancesCacheSize)
throws CommunicationException
create(ConnectionPassport, Properties) instead.
passport - Connection passport used to get the values for the directory
(Directory Id and directory properties). Cannot be null.baseFolder - the working folder where to store catalogs jars (containing XObject classes) and
process/activity documentation. Cannot be null.instancesCacheSize - maximum instances cache size per process. Cannot be null.
CommunicationException - if unable to communicate with the directory.createPassport(String)
public static ProcessService create(String url,
String id,
String baseFolder,
int instancesCacheSize)
throws CommunicationException
create(Properties) instead.
id - the directory identification name. Cannot be null.url - the URL of the fuego directory. Cannot be null.baseFolder - the working folder where to store catalogs jars (containing XObject classes) and
process/activity documentation. Cannot be null.instancesCacheSize - maximum instances cache size per process. Cannot be null.
CommunicationException - if unable to communicate with the directory.public static Filter createFilter()
InstanceInfo. Filters can be used to get instances directly using
ProcessServiceNESession.getInstancesByFilter, or can be applied to an EditableInstancesView to filter the
instances returned.
InstanceInfo.ProcessServiceNESession.getInstancesByFilter(String[], Filter),
ProcessServiceNESession.getEditableView(View),
InstancesView.getFilter()public static Filter createFilter(int matchingCriteria)
createFilter() instead.
InstanceInfo, using matchingCriteria. Filters can be used to get
instances directly using ProcessServiceNESession.getInstancesByFilter, or can be applied to an
EditableInstancesView to filter the instances returned.
matchingCriteria - if true, the instance must mutch with all attributes, if not could match with any (AND/OR).
InstanceInfo.
public static ProcessService createWithId(String id)
throws CommunicationException
create(Properties) instead.
id - the directory identification name. Cannot be null.
CommunicationException - if unable to communicate with the directory.
public static ProcessService createWithId(String id,
String baseFolder)
throws CommunicationException
create(Properties) instead.
id - the directory identification name. Cannot be null.baseFolder - the working folder where to store catalogs jars (containing XObject classes) and
process/activity documentation. Cannot be null.
CommunicationException - if unable to communicate with the directory.
public static ProcessService createWithId(String id,
String baseFolder,
int instancesCacheSize)
throws CommunicationException
create(Properties) instead.
id - the directory identification name. Cannot be null.baseFolder - the working folder where to store catalogs jars (containing XObject classes) and
process/activity documentation. Cannot be null.instancesCacheSize - maximum instances cache size per process. Cannot be null.
CommunicationException - if unable to communicate with the directory.public static char[] invalidIdCharacters()
public static void updateOrganizationalInformationFromDirectory()
startUpdater(fuego.lang.ConnectionPassport, long).
|
ALBPM Process API (PAPI) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||