org.eclipse.stardust.engine.core.runtime.beans
Class EmbeddedServiceFactory

java.lang.Object
  extended by org.eclipse.stardust.engine.core.runtime.beans.DefaultServiceFactory
      extended by org.eclipse.stardust.engine.core.runtime.beans.EmbeddedServiceFactory
All Implemented Interfaces:
ServiceFactory

public class EmbeddedServiceFactory
extends org.eclipse.stardust.engine.core.runtime.beans.DefaultServiceFactory


Nested Class Summary
static class EmbeddedServiceFactory.EmbeddedInvocationManager
           
 
Constructor Summary
EmbeddedServiceFactory()
           
 
Method Summary
static EmbeddedServiceFactory CURRENT_TX_WITH_AUTO_FLUSH()
          ServiceFactory that works within the same transaction without creating a new Property Layer.
static EmbeddedServiceFactory CURRENT_TX_WITH_PROPERTY_LAYER()
          ServiceFactory that works within the same transaction with an added Property Layer.
static EmbeddedServiceFactory CURRENT_TX()
          ServiceFactory that works within the same transaction without creating a new Property Layer.
<T extends org.eclipse.stardust.engine.api.runtime.Service>
T
getService(Class<T> service)
          Retrieves a service instance.
 void setCredentials(Map credentials)
           
 
Methods inherited from class org.eclipse.stardust.engine.core.runtime.beans.DefaultServiceFactory
close, getAdministrationService, getDocumentManagementService, getQueryService, getSessionId, getUserService, getWorkflowService, release, setProperties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmbeddedServiceFactory

public EmbeddedServiceFactory()
Method Detail

CURRENT_TX

public static EmbeddedServiceFactory CURRENT_TX()
ServiceFactory that works within the same transaction without creating a new Property Layer. SecurityProperties.getUser() must be set.

Returns:
The configured ServiceFactory.

CURRENT_TX_WITH_AUTO_FLUSH

public static EmbeddedServiceFactory CURRENT_TX_WITH_AUTO_FLUSH()
ServiceFactory that works within the same transaction without creating a new Property Layer. SecurityProperties.getUser() must be set.

Returns:
The configured ServiceFactory.

CURRENT_TX_WITH_PROPERTY_LAYER

public static EmbeddedServiceFactory CURRENT_TX_WITH_PROPERTY_LAYER()
ServiceFactory that works within the same transaction with an added Property Layer. SecurityProperties.getUser() must be set.

Returns:
The configured ServiceFactory.

getService

public <T extends org.eclipse.stardust.engine.api.runtime.Service> T getService(Class<T> service)
                                                                     throws ServiceNotAvailableException,
                                                                            org.eclipse.stardust.common.error.LoginFailedException
Description copied from interface: ServiceFactory
Retrieves a service instance. Is provided for extensibility beyond the core service set.

Parameters:
service - The class name of the service to be retrieved.
Returns:
An instance of the requested service.
Throws:
ServiceNotAvailableException - In case the (possible remote) service could not be reached.
org.eclipse.stardust.common.error.LoginFailedException - In case the authentication to the service fails.

setCredentials

public void setCredentials(Map credentials)


Copyright © 2017 Eclipse Stardust. All Rights Reserved.