public class ServerAPIImpl
extends java.lang.Object
implements org.bonitasoft.engine.api.internal.ServerAPI
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ServerAPIImpl.SessionType |
| Modifier and Type | Field and Description |
|---|---|
protected APIAccessResolver |
accessResolver |
| Constructor and Description |
|---|
ServerAPIImpl() |
ServerAPIImpl(boolean cleanSession) |
ServerAPIImpl(boolean cleanSession,
APIAccessResolver accessResolver)
For Test Mock usage
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkIsValidModeFor(boolean tenantRunning,
AvailableWhenTenantIsPaused annotation,
long tenantId,
java.lang.Object apiImpl,
java.lang.reflect.Method method,
java.lang.String apiInterfaceName) |
protected void |
checkMethodAccessibility(java.lang.Object apiImpl,
java.lang.String apiInterfaceName,
java.lang.reflect.Method method,
org.bonitasoft.engine.session.Session session,
boolean isAlreadyInTransaction) |
protected void |
checkTenantIsInAValidModeFor(java.lang.Object apiImpl,
java.lang.reflect.Method method,
java.lang.String apiInterfaceName,
long tenantId,
org.bonitasoft.engine.session.Session session,
boolean isAlreadyInTransaction) |
protected java.lang.Class<?>[] |
getParameterTypes(java.util.List<java.lang.String> classNameParameters) |
protected ServerAPIImpl.SessionType |
getSessionType(org.bonitasoft.engine.session.Session session) |
protected java.lang.Object |
invokeAPI(java.lang.reflect.Method method,
java.lang.Object apiImpl,
java.lang.Object... parametersValues) |
protected java.lang.Object |
invokeAPIInTransaction(java.lang.Object[] parametersValues,
java.lang.Object apiImpl,
java.lang.reflect.Method method,
org.bonitasoft.engine.session.Session session,
java.lang.String apiInterfaceName) |
protected java.lang.Object |
invokeAPIOutsideTransaction(java.lang.Object[] parametersValues,
java.lang.Object apiImpl,
java.lang.reflect.Method method,
java.lang.String apiInterfaceName,
org.bonitasoft.engine.session.Session session) |
java.lang.Object |
invokeMethod(java.util.Map<java.lang.String,java.io.Serializable> options,
java.lang.String apiInterfaceName,
java.lang.String methodName,
java.util.List<java.lang.String> classNameParameters,
java.lang.Object[] parametersValues) |
protected boolean |
isMethodAvailableOnPausedTenant(boolean tenantRunning,
AvailableWhenTenantIsPaused annotation) |
protected boolean |
isMethodAvailableOnRunningTenant(boolean tenantRunning,
AvailableWhenTenantIsPaused annotation) |
protected boolean |
isNodeInAValidStateFor(java.lang.reflect.Method method) |
protected boolean |
isTenantAvailable(long tenantId,
org.bonitasoft.engine.session.Session session,
boolean isAlreadyInTransaction) |
protected void |
logNodeNotStartedMessage(java.lang.String apiInterfaceName,
java.lang.reflect.Method method) |
protected void |
logTechnicalErrorMessage(java.lang.String message) |
protected void |
methodCannotBeCalledOnPausedTenant(java.lang.Object apiImpl,
java.lang.String apiInterfaceName,
java.lang.reflect.Method method,
long tenantId) |
protected void |
methodCannotBeCalledOnRunningTenant(java.lang.Object apiImpl,
java.lang.String apiInterfaceName,
java.lang.reflect.Method method,
long tenantId) |
protected UserTransactionService |
selectUserTransactionService(org.bonitasoft.engine.session.Session session,
ServerAPIImpl.SessionType sessionType) |
protected org.bonitasoft.engine.exception.BonitaRuntimeException |
wrapThrowable(java.lang.Throwable cause) |
protected final APIAccessResolver accessResolver
public ServerAPIImpl()
public ServerAPIImpl(boolean cleanSession)
public ServerAPIImpl(boolean cleanSession,
APIAccessResolver accessResolver)
public java.lang.Object invokeMethod(java.util.Map<java.lang.String,java.io.Serializable> options,
java.lang.String apiInterfaceName,
java.lang.String methodName,
java.util.List<java.lang.String> classNameParameters,
java.lang.Object[] parametersValues)
throws org.bonitasoft.engine.api.internal.ServerWrappedException
invokeMethod in interface org.bonitasoft.engine.api.internal.ServerAPIorg.bonitasoft.engine.api.internal.ServerWrappedExceptionprotected org.bonitasoft.engine.exception.BonitaRuntimeException wrapThrowable(java.lang.Throwable cause)
protected ServerAPIImpl.SessionType getSessionType(org.bonitasoft.engine.session.Session session)
protected java.lang.Object invokeAPIOutsideTransaction(java.lang.Object[] parametersValues,
java.lang.Object apiImpl,
java.lang.reflect.Method method,
java.lang.String apiInterfaceName,
org.bonitasoft.engine.session.Session session)
throws java.lang.Throwable
java.lang.Throwableprotected void checkMethodAccessibility(java.lang.Object apiImpl,
java.lang.String apiInterfaceName,
java.lang.reflect.Method method,
org.bonitasoft.engine.session.Session session,
boolean isAlreadyInTransaction)
protected void checkTenantIsInAValidModeFor(java.lang.Object apiImpl,
java.lang.reflect.Method method,
java.lang.String apiInterfaceName,
long tenantId,
org.bonitasoft.engine.session.Session session,
boolean isAlreadyInTransaction)
protected void checkIsValidModeFor(boolean tenantRunning,
AvailableWhenTenantIsPaused annotation,
long tenantId,
java.lang.Object apiImpl,
java.lang.reflect.Method method,
java.lang.String apiInterfaceName)
protected void methodCannotBeCalledOnRunningTenant(java.lang.Object apiImpl,
java.lang.String apiInterfaceName,
java.lang.reflect.Method method,
long tenantId)
protected void methodCannotBeCalledOnPausedTenant(java.lang.Object apiImpl,
java.lang.String apiInterfaceName,
java.lang.reflect.Method method,
long tenantId)
protected boolean isMethodAvailableOnPausedTenant(boolean tenantRunning,
AvailableWhenTenantIsPaused annotation)
protected boolean isMethodAvailableOnRunningTenant(boolean tenantRunning,
AvailableWhenTenantIsPaused annotation)
protected boolean isTenantAvailable(long tenantId,
org.bonitasoft.engine.session.Session session,
boolean isAlreadyInTransaction)
tenantId - the ID of the tenant to checksession - the session to userisAlreadyInTransaction - if the request is made in a transactionprotected void logNodeNotStartedMessage(java.lang.String apiInterfaceName,
java.lang.reflect.Method method)
protected void logTechnicalErrorMessage(java.lang.String message)
protected boolean isNodeInAValidStateFor(java.lang.reflect.Method method)
protected java.lang.Object invokeAPIInTransaction(java.lang.Object[] parametersValues,
java.lang.Object apiImpl,
java.lang.reflect.Method method,
org.bonitasoft.engine.session.Session session,
java.lang.String apiInterfaceName)
throws java.lang.Throwable
java.lang.Throwableprotected UserTransactionService selectUserTransactionService(org.bonitasoft.engine.session.Session session, ServerAPIImpl.SessionType sessionType) throws org.bonitasoft.engine.exception.BonitaHomeNotSetException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.io.IOException, org.bonitasoft.engine.exception.BonitaHomeConfigurationException
org.bonitasoft.engine.exception.BonitaHomeNotSetExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.ClassNotFoundExceptionjava.io.IOExceptionorg.bonitasoft.engine.exception.BonitaHomeConfigurationExceptionprotected java.lang.Object invokeAPI(java.lang.reflect.Method method,
java.lang.Object apiImpl,
java.lang.Object... parametersValues)
throws java.lang.Throwable
java.lang.Throwableprotected java.lang.Class<?>[] getParameterTypes(java.util.List<java.lang.String> classNameParameters)
throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException