public class Tools extends Object
| Constructor and Description |
|---|
Tools(ApplicationData applicationData,
net.datastream.wsdls.inforws.InforWebServicesPT inforWebServicesToolkitClient,
ExecutorService executorService,
DataSource dataSource,
javax.persistence.EntityManagerFactory entityManagerFactory,
Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
<A,R> BatchResponse<R> |
batchOperation(InforContext context,
WSHubOperation<A,R> operation,
List<A> arguments) |
<A,R,T> Map<T,R> |
batchOperationToMap(List<A> arguments,
BatchResponse<R> results,
Map<T,A> map) |
void |
closeConnection(Connection connection,
Statement statement,
ResultSet resultSet)
Close the connection with the database
|
net.datastream.schemas.mp_functions.SessionType |
createInforSession(InforContext context) |
net.datastream.schemas.mp_functions.MessageConfigType |
createMessageConfig()
Generates MessageConfig element that can be added to the request to tell the
server to omit the InformationAlert and WarningAlert elements from the
response.
|
org.xmlsoap.schemas.ws._2002._04.secext.Security |
createSecurityHeader(InforContext context) |
void |
demandDatabaseConnection() |
static String |
extractEntityCode(String code) |
static String |
extractOrganizationCode(String code) |
static InforException |
generateFault(String reason) |
static InforException |
generateFault(String reason,
ExceptionInfo[] errors) |
CustomFieldsTools |
getCustomFieldsTools() |
DataSource |
getDataSource() |
DataTypeTools |
getDataTypeTools() |
javax.persistence.EntityManager |
getEntityManager() |
FieldDescriptionTools |
getFieldDescriptionsTools() |
GridTools |
getGridTools() |
InforContext |
getInforContext(Credentials credentials) |
InforContext |
getInforContext(Credentials credentials,
String sessionID) |
InforContext |
getInforContext(String username,
String password) |
InforFieldTools |
getInforFieldTools() |
net.datastream.schemas.mp_fields.ORGANIZATIONID_Type |
getOrganization(InforContext inforContext) |
net.datastream.schemas.mp_fields.ORGANIZATIONID_Type |
getOrganization(InforContext inforContext,
String organizationCode) |
String |
getOrganizationCode(InforContext inforContext) |
String |
getOrganizationCode(InforContext context,
String organizationCode) |
String |
getTenant(InforContext inforContext) |
boolean |
isDatabaseConnectionConfigured() |
void |
log(Level logLevel,
String message) |
<A,R> R |
performInforOperation(InforContext context,
InforOperation<A,R> operation,
A argument) |
<T> BatchResponse<T> |
processCallables(List<Callable<T>> mylist) |
void |
processRunnables(List<Runnable> mylist) |
void |
processRunnables(Runnable... runnables) |
public Tools(ApplicationData applicationData, net.datastream.wsdls.inforws.InforWebServicesPT inforWebServicesToolkitClient, ExecutorService executorService, DataSource dataSource, javax.persistence.EntityManagerFactory entityManagerFactory, Logger logger)
public javax.persistence.EntityManager getEntityManager()
public DataSource getDataSource()
public CustomFieldsTools getCustomFieldsTools()
public DataTypeTools getDataTypeTools()
public FieldDescriptionTools getFieldDescriptionsTools()
public GridTools getGridTools()
public InforFieldTools getInforFieldTools()
public org.xmlsoap.schemas.ws._2002._04.secext.Security createSecurityHeader(InforContext context) throws InforException
InforExceptionpublic net.datastream.schemas.mp_functions.SessionType createInforSession(InforContext context)
public net.datastream.schemas.mp_functions.MessageConfigType createMessageConfig()
public net.datastream.schemas.mp_fields.ORGANIZATIONID_Type getOrganization(InforContext inforContext)
public net.datastream.schemas.mp_fields.ORGANIZATIONID_Type getOrganization(InforContext inforContext, String organizationCode)
public String getOrganizationCode(InforContext context, String organizationCode)
public String getOrganizationCode(InforContext inforContext)
public String getTenant(InforContext inforContext)
public static InforException generateFault(String reason)
public static InforException generateFault(String reason, ExceptionInfo[] errors)
public <T> BatchResponse<T> processCallables(List<Callable<T>> mylist)
public void processRunnables(Runnable... runnables) throws InforException
InforExceptionpublic void processRunnables(List<Runnable> mylist) throws InforException
InforExceptionpublic InforContext getInforContext(Credentials credentials, String sessionID)
public InforContext getInforContext(Credentials credentials)
public InforContext getInforContext(String username, String password)
public void closeConnection(Connection connection, Statement statement, ResultSet resultSet)
connection - Connection to be closedstatement - statement to be closedresultSet - Resultset to be closedpublic void demandDatabaseConnection()
throws InforException
InforExceptionpublic boolean isDatabaseConnectionConfigured()
public <A,R> BatchResponse<R> batchOperation(InforContext context, WSHubOperation<A,R> operation, List<A> arguments)
public <A,R,T> Map<T,R> batchOperationToMap(List<A> arguments, BatchResponse<R> results, Map<T,A> map)
public <A,R> R performInforOperation(InforContext context, InforOperation<A,R> operation, A argument) throws InforException
InforExceptionCopyright © 2023 CERN European Organization for Nuclear Research. All rights reserved.