Search in sources :

Example 6 with AppServiceContent

use of org.cerberus.crud.entity.AppServiceContent in project cerberus-source by cerberustesting.

the class FactoryAppService method create.

@Override
public AppService create(String service, String type, String method, String application, String group, String serviceRequest, String description, String servicePath, String attachementURL, String operation, String usrCreated, Timestamp dateCreated, String usrModif, Timestamp dateModif) {
    AppService s = new AppService();
    s.setService(service);
    s.setServiceRequest(serviceRequest);
    s.setGroup(group);
    s.setDescription(description);
    s.setServicePath(servicePath);
    s.setAttachementURL(attachementURL);
    s.setOperation(operation);
    s.setMethod(method);
    s.setApplication(application);
    s.setType(type);
    s.setUsrCreated(usrCreated);
    s.setUsrModif(usrModif);
    s.setDateCreated(dateCreated);
    s.setDateModif(dateModif);
    List<AppServiceContent> objectContentList = new ArrayList<>();
    s.setContentList(objectContentList);
    List<AppServiceHeader> objectHeaderList = new ArrayList<>();
    s.setHeaderList(objectHeaderList);
    List<AppServiceHeader> objectResponseHeaderList = new ArrayList<>();
    s.setResponseHeaderList(objectResponseHeaderList);
    return s;
}
Also used : AppService(org.cerberus.crud.entity.AppService) IFactoryAppService(org.cerberus.crud.factory.IFactoryAppService) AppServiceContent(org.cerberus.crud.entity.AppServiceContent) ArrayList(java.util.ArrayList) AppServiceHeader(org.cerberus.crud.entity.AppServiceHeader)

Example 7 with AppServiceContent

use of org.cerberus.crud.entity.AppServiceContent in project cerberus-source by cerberustesting.

the class AppServiceContentService method compareListAndUpdateInsertDeleteElements.

@Override
public Answer compareListAndUpdateInsertDeleteElements(String service, List<AppServiceContent> newList) {
    Answer ans = new Answer(null);
    MessageEvent msg1 = new MessageEvent(MessageEventEnum.GENERIC_OK);
    Answer finalAnswer = new Answer(msg1);
    List<AppServiceContent> oldList = new ArrayList();
    try {
        oldList = this.convert(this.readByVarious(service, null));
    } catch (CerberusException ex) {
        LOG.error(ex);
    }
    /**
     * Update and Create all objects database Objects from newList
     */
    List<AppServiceContent> listToUpdateOrInsert = new ArrayList(newList);
    listToUpdateOrInsert.removeAll(oldList);
    List<AppServiceContent> listToUpdateOrInsertToIterate = new ArrayList(listToUpdateOrInsert);
    for (AppServiceContent objectDifference : listToUpdateOrInsertToIterate) {
        for (AppServiceContent objectInDatabase : oldList) {
            if (objectDifference.hasSameKey(objectInDatabase)) {
                ans = this.update(objectDifference.getService(), objectDifference.getKey(), objectDifference);
                finalAnswer = AnswerUtil.agregateAnswer(finalAnswer, (Answer) ans);
                listToUpdateOrInsert.remove(objectDifference);
            }
        }
    }
    /**
     * Delete all objects database Objects that do not exist from newList
     */
    List<AppServiceContent> listToDelete = new ArrayList(oldList);
    listToDelete.removeAll(newList);
    List<AppServiceContent> listToDeleteToIterate = new ArrayList(listToDelete);
    for (AppServiceContent tcsDifference : listToDeleteToIterate) {
        for (AppServiceContent tcsInPage : newList) {
            if (tcsDifference.hasSameKey(tcsInPage)) {
                listToDelete.remove(tcsDifference);
            }
        }
    }
    if (!listToDelete.isEmpty()) {
        ans = this.deleteList(listToDelete);
        finalAnswer = AnswerUtil.agregateAnswer(finalAnswer, (Answer) ans);
    }
    // We insert only at the end (after deletion of all potencial enreg - linked with #1281)
    if (!listToUpdateOrInsert.isEmpty()) {
        ans = this.createList(listToUpdateOrInsert);
        finalAnswer = AnswerUtil.agregateAnswer(finalAnswer, (Answer) ans);
    }
    return finalAnswer;
}
Also used : Answer(org.cerberus.util.answer.Answer) CerberusException(org.cerberus.exception.CerberusException) MessageEvent(org.cerberus.engine.entity.MessageEvent) AppServiceContent(org.cerberus.crud.entity.AppServiceContent) ArrayList(java.util.ArrayList)

Example 8 with AppServiceContent

use of org.cerberus.crud.entity.AppServiceContent in project cerberus-source by cerberustesting.

the class UpdateAppService method getContentListFromRequest.

private List<AppServiceContent> getContentListFromRequest(HttpServletRequest request, ApplicationContext appContext, String service, JSONArray json) throws CerberusException, JSONException, UnsupportedEncodingException {
    List<AppServiceContent> contentList = new ArrayList();
    for (int i = 0; i < json.length(); i++) {
        JSONObject objectJson = json.getJSONObject(i);
        // Parameter that are already controled by GUI (no need to decode) --> We SECURE them
        boolean delete = objectJson.getBoolean("toDelete");
        int sort = objectJson.getInt("sort");
        String key = objectJson.getString("key");
        String value = objectJson.getString("value");
        String active = objectJson.getString("active");
        String description = objectJson.getString("description");
        if (!delete) {
            contentList.add(appServiceContentFactory.create(service, key, value, active, sort, description, request.getRemoteUser(), null, request.getRemoteUser(), null));
        }
    }
    return contentList;
}
Also used : JSONObject(org.json.JSONObject) IFactoryAppServiceContent(org.cerberus.crud.factory.IFactoryAppServiceContent) AppServiceContent(org.cerberus.crud.entity.AppServiceContent) ArrayList(java.util.ArrayList)

Example 9 with AppServiceContent

use of org.cerberus.crud.entity.AppServiceContent in project cerberus-source by cerberustesting.

the class RestService method callREST.

@Override
public AnswerItem<AppService> callREST(String servicePath, String requestString, String method, List<AppServiceHeader> headerList, List<AppServiceContent> contentList, String token, int timeOutMs, String system) {
    AnswerItem result = new AnswerItem();
    AppService serviceREST = factoryAppService.create("", AppService.TYPE_REST, method, "", "", "", "", "", "", "", "", null, "", null);
    serviceREST.setProxy(false);
    serviceREST.setProxyHost(null);
    serviceREST.setProxyPort(0);
    serviceREST.setProxyWithCredential(false);
    serviceREST.setProxyUser(null);
    serviceREST.setTimeoutms(timeOutMs);
    MessageEvent message = null;
    if (StringUtil.isNullOrEmpty(servicePath)) {
        message = new MessageEvent(MessageEventEnum.ACTION_FAILED_CALLSERVICE_SERVICEPATHMISSING);
        result.setResultMessage(message);
        return result;
    }
    if (StringUtil.isNullOrEmpty(method)) {
        message = new MessageEvent(MessageEventEnum.ACTION_FAILED_CALLSERVICE_METHODMISSING);
        result.setResultMessage(message);
        return result;
    }
    // If token is defined, we add 'cerberus-token' on the http header.
    if (!StringUtil.isNullOrEmpty(token)) {
        headerList.add(factoryAppServiceHeader.create(null, "cerberus-token", token, "Y", 0, "", "", null, "", null));
    }
    CloseableHttpClient httpclient;
    if (proxyService.useProxy(servicePath, system)) {
        String proxyHost = parameterService.getParameterStringByKey("cerberus_proxy_host", system, DEFAULT_PROXY_HOST);
        int proxyPort = parameterService.getParameterIntegerByKey("cerberus_proxy_port", system, DEFAULT_PROXY_PORT);
        serviceREST.setProxy(true);
        serviceREST.setProxyHost(proxyHost);
        serviceREST.setProxyPort(proxyPort);
        HttpHost proxyHostObject = new HttpHost(proxyHost, proxyPort);
        if (parameterService.getParameterBooleanByKey("cerberus_proxyauthentification_active", system, DEFAULT_PROXYAUTHENT_ACTIVATE)) {
            String proxyUser = parameterService.getParameterStringByKey("cerberus_proxyauthentification_user", system, DEFAULT_PROXYAUTHENT_USER);
            String proxyPassword = parameterService.getParameterStringByKey("cerberus_proxyauthentification_password", system, DEFAULT_PROXYAUTHENT_PASSWORD);
            serviceREST.setProxyWithCredential(true);
            serviceREST.setProxyUser(proxyUser);
            CredentialsProvider credsProvider = new BasicCredentialsProvider();
            credsProvider.setCredentials(new AuthScope(proxyHost, proxyPort), new UsernamePasswordCredentials(proxyUser, proxyPassword));
            LOG.debug("Activating Proxy With Authentification.");
            httpclient = HttpClientBuilder.create().setProxy(proxyHostObject).setProxyAuthenticationStrategy(new ProxyAuthenticationStrategy()).setDefaultCredentialsProvider(credsProvider).build();
        } else {
            LOG.debug("Activating Proxy (No Authentification).");
            httpclient = HttpClientBuilder.create().setProxy(proxyHostObject).build();
        }
    } else {
        httpclient = HttpClients.createDefault();
    }
    try {
        RequestConfig requestConfig;
        // Timeout setup.
        requestConfig = RequestConfig.custom().setConnectTimeout(timeOutMs).setConnectionRequestTimeout(timeOutMs).setSocketTimeout(timeOutMs).build();
        AppService responseHttp = null;
        switch(method) {
            case AppService.METHOD_HTTPGET:
                LOG.info("Start preparing the REST Call (GET). " + servicePath + " - " + requestString);
                // Adding query string from requestString
                servicePath = StringUtil.addQueryString(servicePath, requestString);
                // Adding query string from contentList
                String newRequestString = AppServiceService.convertContentListToQueryString(contentList);
                servicePath = StringUtil.addQueryString(servicePath, newRequestString);
                serviceREST.setServicePath(servicePath);
                HttpGet httpGet = new HttpGet(servicePath);
                // Timeout setup.
                httpGet.setConfig(requestConfig);
                // Header.
                if (headerList != null) {
                    for (AppServiceHeader contentHeader : headerList) {
                        httpGet.addHeader(contentHeader.getKey(), contentHeader.getValue());
                    }
                }
                serviceREST.setHeaderList(headerList);
                // Saving the service before the call Just in case it goes wrong (ex : timeout).
                result.setItem(serviceREST);
                LOG.info("Executing request " + httpGet.getRequestLine());
                responseHttp = executeHTTPCall(httpclient, httpGet);
                if (responseHttp != null) {
                    serviceREST.setResponseHTTPBody(responseHttp.getResponseHTTPBody());
                    serviceREST.setResponseHTTPCode(responseHttp.getResponseHTTPCode());
                    serviceREST.setResponseHTTPVersion(responseHttp.getResponseHTTPVersion());
                    serviceREST.setResponseHeaderList(responseHttp.getResponseHeaderList());
                }
                break;
            case AppService.METHOD_HTTPPOST:
                LOG.info("Start preparing the REST Call (POST). " + servicePath);
                serviceREST.setServicePath(servicePath);
                HttpPost httpPost = new HttpPost(servicePath);
                // Timeout setup.
                httpPost.setConfig(requestConfig);
                // Content
                if (!(StringUtil.isNullOrEmpty(requestString))) {
                    // If requestString is defined, we POST it.
                    InputStream stream = new ByteArrayInputStream(requestString.getBytes(StandardCharsets.UTF_8));
                    InputStreamEntity reqEntity = new InputStreamEntity(stream);
                    reqEntity.setChunked(true);
                    httpPost.setEntity(reqEntity);
                    serviceREST.setServiceRequest(requestString);
                } else {
                    // If requestString is not defined, we POST the list of key/value request.
                    List<NameValuePair> nvps = new ArrayList<NameValuePair>();
                    for (AppServiceContent contentVal : contentList) {
                        nvps.add(new BasicNameValuePair(contentVal.getKey(), contentVal.getValue()));
                    }
                    httpPost.setEntity(new UrlEncodedFormEntity(nvps));
                    serviceREST.setContentList(contentList);
                }
                // Header.
                for (AppServiceHeader contentHeader : headerList) {
                    httpPost.addHeader(contentHeader.getKey(), contentHeader.getValue());
                }
                serviceREST.setHeaderList(headerList);
                // Saving the service before the call Just in case it goes wrong (ex : timeout).
                result.setItem(serviceREST);
                LOG.info("Executing request " + httpPost.getRequestLine());
                responseHttp = executeHTTPCall(httpclient, httpPost);
                if (responseHttp != null) {
                    serviceREST.setResponseHTTPBody(responseHttp.getResponseHTTPBody());
                    serviceREST.setResponseHTTPCode(responseHttp.getResponseHTTPCode());
                    serviceREST.setResponseHTTPVersion(responseHttp.getResponseHTTPVersion());
                    serviceREST.setResponseHeaderList(responseHttp.getResponseHeaderList());
                } else {
                    message = new MessageEvent(MessageEventEnum.ACTION_FAILED_CALLSERVICE);
                    message.setDescription(message.getDescription().replace("%SERVICE%", servicePath));
                    message.setDescription(message.getDescription().replace("%DESCRIPTION%", "Any issue was found when calling the service. Coud be a reached timeout during the call (." + timeOutMs + ")"));
                    result.setResultMessage(message);
                    return result;
                }
                break;
            case AppService.METHOD_HTTPDELETE:
                LOG.info("Start preparing the REST Call (DELETE). " + servicePath);
                servicePath = StringUtil.addQueryString(servicePath, requestString);
                serviceREST.setServicePath(servicePath);
                HttpDelete httpDelete = new HttpDelete(servicePath);
                // Timeout setup.
                httpDelete.setConfig(requestConfig);
                // Header.
                for (AppServiceHeader contentHeader : headerList) {
                    httpDelete.addHeader(contentHeader.getKey(), contentHeader.getValue());
                }
                serviceREST.setHeaderList(headerList);
                // Saving the service before the call Just in case it goes wrong (ex : timeout).
                result.setItem(serviceREST);
                LOG.info("Executing request " + httpDelete.getRequestLine());
                responseHttp = executeHTTPCall(httpclient, httpDelete);
                if (responseHttp != null) {
                    serviceREST.setResponseHTTPBody(responseHttp.getResponseHTTPBody());
                    serviceREST.setResponseHTTPCode(responseHttp.getResponseHTTPCode());
                    serviceREST.setResponseHTTPVersion(responseHttp.getResponseHTTPVersion());
                    serviceREST.setResponseHeaderList(responseHttp.getResponseHeaderList());
                }
                break;
            case AppService.METHOD_HTTPPUT:
                LOG.info("Start preparing the REST Call (PUT). " + servicePath);
                serviceREST.setServicePath(servicePath);
                HttpPut httpPut = new HttpPut(servicePath);
                // Timeout setup.
                httpPut.setConfig(requestConfig);
                // Content
                if (!(StringUtil.isNullOrEmpty(requestString))) {
                    // If requestString is defined, we POST it.
                    InputStream stream = new ByteArrayInputStream(requestString.getBytes(StandardCharsets.UTF_8));
                    InputStreamEntity reqEntity = new InputStreamEntity(stream);
                    reqEntity.setChunked(true);
                    httpPut.setEntity(reqEntity);
                    serviceREST.setServiceRequest(requestString);
                } else {
                    // If requestString is not defined, we PUT the list of key/value request.
                    List<NameValuePair> nvps = new ArrayList<NameValuePair>();
                    for (AppServiceContent contentVal : contentList) {
                        nvps.add(new BasicNameValuePair(contentVal.getKey(), contentVal.getValue()));
                    }
                    httpPut.setEntity(new UrlEncodedFormEntity(nvps));
                    serviceREST.setContentList(contentList);
                }
                // Header.
                for (AppServiceHeader contentHeader : headerList) {
                    httpPut.addHeader(contentHeader.getKey(), contentHeader.getValue());
                }
                serviceREST.setHeaderList(headerList);
                // Saving the service before the call Just in case it goes wrong (ex : timeout).
                result.setItem(serviceREST);
                LOG.info("Executing request " + httpPut.getRequestLine());
                responseHttp = executeHTTPCall(httpclient, httpPut);
                if (responseHttp != null) {
                    serviceREST.setResponseHTTPBody(responseHttp.getResponseHTTPBody());
                    serviceREST.setResponseHTTPCode(responseHttp.getResponseHTTPCode());
                    serviceREST.setResponseHTTPVersion(responseHttp.getResponseHTTPVersion());
                    serviceREST.setResponseHeaderList(responseHttp.getResponseHeaderList());
                } else {
                    message = new MessageEvent(MessageEventEnum.ACTION_FAILED_CALLSERVICE);
                    message.setDescription(message.getDescription().replace("%SERVICE%", servicePath));
                    message.setDescription(message.getDescription().replace("%DESCRIPTION%", "Any issue was found when calling the service. Coud be a reached timeout during the call (." + timeOutMs + ")"));
                    result.setResultMessage(message);
                    return result;
                }
                break;
            case AppService.METHOD_HTTPPATCH:
                LOG.info("Start preparing the REST Call (PUT). " + servicePath);
                serviceREST.setServicePath(servicePath);
                HttpPatch httpPatch = new HttpPatch(servicePath);
                // Timeout setup.
                httpPatch.setConfig(requestConfig);
                // Content
                if (!(StringUtil.isNullOrEmpty(requestString))) {
                    // If requestString is defined, we POST it.
                    InputStream stream = new ByteArrayInputStream(requestString.getBytes(StandardCharsets.UTF_8));
                    InputStreamEntity reqEntity = new InputStreamEntity(stream);
                    reqEntity.setChunked(true);
                    httpPatch.setEntity(reqEntity);
                    serviceREST.setServiceRequest(requestString);
                } else {
                    // If requestString is not defined, we PUT the list of key/value request.
                    List<NameValuePair> nvps = new ArrayList<NameValuePair>();
                    for (AppServiceContent contentVal : contentList) {
                        nvps.add(new BasicNameValuePair(contentVal.getKey(), contentVal.getValue()));
                    }
                    httpPatch.setEntity(new UrlEncodedFormEntity(nvps));
                    serviceREST.setContentList(contentList);
                }
                // Header.
                for (AppServiceHeader contentHeader : headerList) {
                    httpPatch.addHeader(contentHeader.getKey(), contentHeader.getValue());
                }
                serviceREST.setHeaderList(headerList);
                // Saving the service before the call Just in case it goes wrong (ex : timeout).
                result.setItem(serviceREST);
                LOG.info("Executing request " + httpPatch.getRequestLine());
                responseHttp = executeHTTPCall(httpclient, httpPatch);
                if (responseHttp != null) {
                    serviceREST.setResponseHTTPBody(responseHttp.getResponseHTTPBody());
                    serviceREST.setResponseHTTPCode(responseHttp.getResponseHTTPCode());
                    serviceREST.setResponseHTTPVersion(responseHttp.getResponseHTTPVersion());
                    serviceREST.setResponseHeaderList(responseHttp.getResponseHeaderList());
                } else {
                    message = new MessageEvent(MessageEventEnum.ACTION_FAILED_CALLSERVICE);
                    message.setDescription(message.getDescription().replace("%SERVICE%", servicePath));
                    message.setDescription(message.getDescription().replace("%DESCRIPTION%", "Any issue was found when calling the service. Coud be a reached timeout during the call (." + timeOutMs + ")"));
                    result.setResultMessage(message);
                    return result;
                }
                break;
        }
        // Get result Content Type.
        if (responseHttp != null) {
            serviceREST.setResponseHTTPBodyContentType(AppServiceService.guessContentType(serviceREST, AppService.RESPONSEHTTPBODYCONTENTTYPE_JSON));
        }
        result.setItem(serviceREST);
        message = new MessageEvent(MessageEventEnum.ACTION_SUCCESS_CALLSERVICE);
        message.setDescription(message.getDescription().replace("%SERVICEMETHOD%", method));
        message.setDescription(message.getDescription().replace("%SERVICEPATH%", servicePath));
        result.setResultMessage(message);
    } catch (SocketTimeoutException ex) {
        LOG.info("Exception when performing the REST Call. " + ex.toString());
        message = new MessageEvent(MessageEventEnum.ACTION_FAILED_CALLSERVICE_TIMEOUT);
        message.setDescription(message.getDescription().replace("%SERVICEURL%", servicePath));
        message.setDescription(message.getDescription().replace("%TIMEOUT%", String.valueOf(timeOutMs)));
        result.setResultMessage(message);
        return result;
    } catch (Exception ex) {
        LOG.error("Exception when performing the REST Call. " + ex.toString(), ex);
        message = new MessageEvent(MessageEventEnum.ACTION_FAILED_CALLSERVICE);
        message.setDescription(message.getDescription().replace("%SERVICE%", servicePath));
        message.setDescription(message.getDescription().replace("%DESCRIPTION%", "Error on CallREST : " + ex.toString()));
        result.setResultMessage(message);
        return result;
    } finally {
        try {
            httpclient.close();
        } catch (IOException ex) {
            LOG.error(ex.toString());
        }
    }
    return result;
}
Also used : HttpPost(org.apache.http.client.methods.HttpPost) BasicCredentialsProvider(org.apache.http.impl.client.BasicCredentialsProvider) HttpDelete(org.apache.http.client.methods.HttpDelete) MessageEvent(org.cerberus.engine.entity.MessageEvent) HttpGet(org.apache.http.client.methods.HttpGet) ArrayList(java.util.ArrayList) AppServiceContent(org.cerberus.crud.entity.AppServiceContent) IFactoryAppServiceHeader(org.cerberus.crud.factory.IFactoryAppServiceHeader) AppServiceHeader(org.cerberus.crud.entity.AppServiceHeader) HttpPut(org.apache.http.client.methods.HttpPut) HttpPatch(org.apache.http.client.methods.HttpPatch) HttpHost(org.apache.http.HttpHost) BasicNameValuePair(org.apache.http.message.BasicNameValuePair) ProxyAuthenticationStrategy(org.apache.http.impl.client.ProxyAuthenticationStrategy) CloseableHttpClient(org.apache.http.impl.client.CloseableHttpClient) RequestConfig(org.apache.http.client.config.RequestConfig) NameValuePair(org.apache.http.NameValuePair) BasicNameValuePair(org.apache.http.message.BasicNameValuePair) IFactoryAppService(org.cerberus.crud.factory.IFactoryAppService) AppService(org.cerberus.crud.entity.AppService) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) BasicCredentialsProvider(org.apache.http.impl.client.BasicCredentialsProvider) CredentialsProvider(org.apache.http.client.CredentialsProvider) UrlEncodedFormEntity(org.apache.http.client.entity.UrlEncodedFormEntity) IOException(java.io.IOException) AnswerItem(org.cerberus.util.answer.AnswerItem) ClientProtocolException(org.apache.http.client.ClientProtocolException) SocketTimeoutException(java.net.SocketTimeoutException) IOException(java.io.IOException) UsernamePasswordCredentials(org.apache.http.auth.UsernamePasswordCredentials) InputStreamEntity(org.apache.http.entity.InputStreamEntity) SocketTimeoutException(java.net.SocketTimeoutException) ByteArrayInputStream(java.io.ByteArrayInputStream) AuthScope(org.apache.http.auth.AuthScope)

Example 10 with AppServiceContent

use of org.cerberus.crud.entity.AppServiceContent in project cerberus-source by cerberustesting.

the class CreateAppService method getContentListFromRequest.

private List<AppServiceContent> getContentListFromRequest(HttpServletRequest request, ApplicationContext appContext, String service, JSONArray json) throws CerberusException, JSONException, UnsupportedEncodingException {
    List<AppServiceContent> contentList = new ArrayList();
    for (int i = 0; i < json.length(); i++) {
        JSONObject objectJson = json.getJSONObject(i);
        // Parameter that are already controled by GUI (no need to decode) --> We SECURE them
        boolean delete = objectJson.getBoolean("toDelete");
        int sort = objectJson.getInt("sort");
        String key = objectJson.getString("key");
        String value = objectJson.getString("value");
        String active = objectJson.getString("active");
        String description = objectJson.getString("description");
        if (!delete) {
            contentList.add(appServiceContentFactory.create(service, key, value, active, sort, description, request.getRemoteUser(), null, request.getRemoteUser(), null));
        }
    }
    return contentList;
}
Also used : JSONObject(org.json.JSONObject) IFactoryAppServiceContent(org.cerberus.crud.factory.IFactoryAppServiceContent) AppServiceContent(org.cerberus.crud.entity.AppServiceContent) ArrayList(java.util.ArrayList)

Aggregations

AppServiceContent (org.cerberus.crud.entity.AppServiceContent)14 ArrayList (java.util.ArrayList)9 IFactoryAppServiceContent (org.cerberus.crud.factory.IFactoryAppServiceContent)8 MessageEvent (org.cerberus.engine.entity.MessageEvent)7 AppService (org.cerberus.crud.entity.AppService)6 AppServiceHeader (org.cerberus.crud.entity.AppServiceHeader)6 AnswerItem (org.cerberus.util.answer.AnswerItem)5 IFactoryAppService (org.cerberus.crud.factory.IFactoryAppService)4 JSONObject (org.json.JSONObject)4 IFactoryAppServiceHeader (org.cerberus.crud.factory.IFactoryAppServiceHeader)3 CerberusException (org.cerberus.exception.CerberusException)3 Connection (java.sql.Connection)2 PreparedStatement (java.sql.PreparedStatement)2 ResultSet (java.sql.ResultSet)2 SQLException (java.sql.SQLException)2 List (java.util.List)2 FactoryAppServiceContent (org.cerberus.crud.factory.impl.FactoryAppServiceContent)2 IAppServiceContentService (org.cerberus.crud.service.IAppServiceContentService)2 IAppServiceHeaderService (org.cerberus.crud.service.IAppServiceHeaderService)2 IAppServiceService (org.cerberus.crud.service.IAppServiceService)2