Search in sources :

Example 26 with Criteria

use of it.cnr.si.opencmis.criteria.Criteria in project cool-jconon by consiglionazionaledellericerche.

the class PrintService method extractionApplication.

public String extractionApplication(Session session, List<String> ids, String type, String queryType, String contexURL, String userId) {
    HSSFWorkbook wb = null;
    if (Optional.ofNullable(type).isPresent()) {
        if (queryType.equalsIgnoreCase("call")) {
            if (type.equalsIgnoreCase("application")) {
                wb = createHSSFWorkbook(headCSVApplication);
                HSSFSheet sheet = wb.getSheet(SHEET_DOMANDE);
                final int[] index = { 1 };
                for (String callId : ids) {
                    Folder call = Optional.ofNullable(session.getObject(callId)).filter(Folder.class::isInstance).map(Folder.class::cast).orElseThrow(() -> new RuntimeException("Cannot find call"));
                    StreamSupport.stream(call.getChildren().spliterator(), false).filter(cmisObject -> cmisObject.getType().getId().equals(JCONONFolderType.JCONON_APPLICATION.value())).filter(cmisObject -> cmisObject.getPropertyValue(JCONONPropertyIds.APPLICATION_STATO_DOMANDA.value()).equals(ApplicationService.StatoDomanda.CONFERMATA.getValue())).filter(Folder.class::isInstance).map(Folder.class::cast).forEach(applicationObject -> {
                        CMISUser user = null;
                        try {
                            user = userService.loadUserForConfirm(applicationObject.getPropertyValue("jconon_application:user"));
                        } catch (CoolUserFactoryException _ex) {
                            LOGGER.error("USER {} not found", userId, _ex);
                            user = new CMISUser(applicationObject.getPropertyValue("jconon_application:user"));
                        }
                        LOGGER.info("XLS application index {}", index);
                        getRecordCSV(session, applicationObject.getFolderParent(), applicationObject, user, contexURL, sheet, index[0]++);
                    });
                }
            } else if (type.equalsIgnoreCase("call")) {
                wb = createHSSFWorkbook(headCSVCall, "Bandi");
                HSSFSheet sheet = wb.getSheetAt(0);
                int index = 1;
                for (String callId : ids) {
                    Folder callObject = (Folder) session.getObject(callId);
                    CMISUser user = userService.loadUserForConfirm(callObject.getPropertyValue(PropertyIds.CREATED_BY));
                    getRecordCSVCall(session, callObject, user, contexURL, sheet, index++);
                }
            } else if (type.equalsIgnoreCase("commission")) {
                wb = createHSSFWorkbook(headCSVCommission, "Commissioni");
                HSSFSheet sheet = wb.getSheetAt(0);
                int index = 1;
                for (String callId : ids) {
                    Folder callObject = (Folder) session.getObject(callId);
                    Criteria criteriaCommissions = CriteriaFactory.createCriteria(JCONONDocumentType.JCONON_COMMISSIONE_METADATA.queryName());
                    criteriaCommissions.addColumn(PropertyIds.OBJECT_ID);
                    criteriaCommissions.add(Restrictions.inFolder(callId));
                    ItemIterable<QueryResult> commissions = criteriaCommissions.executeQuery(session, false, session.getDefaultContext());
                    for (QueryResult commission : commissions.getPage(Integer.MAX_VALUE)) {
                        Document commissionObject = (Document) session.getObject(commission.<String>getPropertyValueById(PropertyIds.OBJECT_ID));
                        getRecordCSVCommission(session, callObject, commissionObject, sheet, index++);
                    }
                }
            } else if (type.equalsIgnoreCase("score")) {
                wb = createHSSFWorkbook(headCSVApplicationPunteggi, "Punteggi");
                HSSFSheet sheet = wb.getSheetAt(0);
                int[] index = { 1 };
                for (String callId : ids) {
                    Folder call = Optional.ofNullable(session.getObject(callId)).filter(Folder.class::isInstance).map(Folder.class::cast).orElseThrow(() -> new RuntimeException("Cannot find call"));
                    StreamSupport.stream(call.getChildren().spliterator(), false).filter(cmisObject -> cmisObject.getType().getId().equals(JCONONFolderType.JCONON_APPLICATION.value())).filter(cmisObject -> cmisObject.getPropertyValue(JCONONPropertyIds.APPLICATION_STATO_DOMANDA.value()).equals(ApplicationService.StatoDomanda.CONFERMATA.getValue())).filter(cmisObject -> cmisObject.<String>getPropertyValue(JCONONPropertyIds.APPLICATION_ESCLUSIONE_RINUNCIA.value()) == null).filter(Folder.class::isInstance).map(Folder.class::cast).forEach(applicationObject -> {
                        CMISUser user = null;
                        try {
                            user = userService.loadUserForConfirm(applicationObject.getPropertyValue("jconon_application:user"));
                        } catch (CoolUserFactoryException _ex) {
                            LOGGER.error("USER {} not found", userId, _ex);
                            user = new CMISUser(applicationObject.getPropertyValue("jconon_application:user"));
                        }
                        LOGGER.info("XLS score index {}", index[0]);
                        getRecordCSVPunteggi(session, applicationObject.getFolderParent(), applicationObject, user, contexURL, sheet, index[0]++);
                    });
                }
            } else if (type.equalsIgnoreCase("istruttoria")) {
                wb = new HSSFWorkbook();
                for (String callId : ids) {
                    Folder callObject = (Folder) session.getObject(callId);
                    Locale locale = Locale.ITALY;
                    Properties props = i18nService.loadLabels(locale);
                    props.putAll(competitionService.getDynamicLabels(callObject, session));
                    List<PropertyDefinition<?>> headPropertyDefinition = createHeadApplicationAll(session, callObject, JCONONPropertyIds.CALL_ELENCO_ASPECTS);
                    headPropertyDefinition.addAll(createHeadApplicationAll(session, callObject, JCONONPropertyIds.CALL_ELENCO_ASPECTS_SEZIONE_CNR));
                    headPropertyDefinition.addAll(createHeadApplicationAll(session, callObject, JCONONPropertyIds.CALL_ELENCO_ASPECTS_ULTERIORI_DATI));
                    Stream<String> concat = headCSVApplicationIstruttoria.stream();
                    if (Optional.ofNullable(siperService).isPresent()) {
                        concat = Stream.concat(headCSVApplicationIstruttoria.stream(), Arrays.asList("Codice Sede", "Descrizione Sede", "Livello Profilo", "Profilo", "Tipo Contratto").stream());
                    }
                    final HSSFSheet sheet = createSheet(wb, callObject.getPropertyValue(JCONONPropertyIds.CALL_CODICE.value()), Stream.concat(concat, headPropertyDefinition.stream().map(propertyDefinition -> {
                        return Optional.ofNullable(props.getProperty("label.".concat(propertyDefinition.getId().replace(":", ".")))).filter(s -> s.length() > 0).orElse(Optional.ofNullable(propertyDefinition.getDisplayName()).filter(s -> s.length() > 0).orElse(TESTO));
                    })).collect(Collectors.toList()));
                    final int[] index = { 1 };
                    StreamSupport.stream(callObject.getChildren().spliterator(), false).filter(cmisObject -> cmisObject.getType().getId().equals(JCONONFolderType.JCONON_APPLICATION.value())).filter(cmisObject -> cmisObject.getPropertyValue(JCONONPropertyIds.APPLICATION_STATO_DOMANDA.value()).equals(ApplicationService.StatoDomanda.CONFERMATA.getValue())).filter(Folder.class::isInstance).map(Folder.class::cast).forEach(applicationObject -> {
                        CMISUser user = null;
                        try {
                            user = userService.loadUserForConfirm(applicationObject.getPropertyValue("jconon_application:user"));
                        } catch (CoolUserFactoryException _ex) {
                            LOGGER.error("USER {} not found", userId, _ex);
                            user = new CMISUser(applicationObject.getPropertyValue("jconon_application:user"));
                        }
                        LOGGER.info("XLS Istruttoria index {}", index[0]);
                        getRecordCSVIstruttoria(session, callObject, applicationObject, user, contexURL, sheet, headPropertyDefinition, index[0]++);
                    });
                }
            }
        } else if (queryType.equalsIgnoreCase("application")) {
            if (type.equalsIgnoreCase("application")) {
                wb = createHSSFWorkbook(headCSVApplication);
                HSSFSheet sheet = wb.getSheet(SHEET_DOMANDE);
                int index = 1;
                for (String applicationId : ids) {
                    Folder applicationObject = (Folder) session.getObject(applicationId);
                    CMISUser user = null;
                    try {
                        user = userService.loadUserForConfirm(applicationObject.getPropertyValue("jconon_application:user"));
                    } catch (CoolUserFactoryException _ex) {
                        LOGGER.error("USER {} not found", userId, _ex);
                        user = new CMISUser(applicationObject.getPropertyValue("jconon_application:user"));
                    }
                    getRecordCSV(session, applicationObject.getFolderParent(), applicationObject, user, contexURL, sheet, index++);
                }
            } else if (type.equalsIgnoreCase("score")) {
                wb = createHSSFWorkbook(headCSVApplicationPunteggi, "Punteggi");
                HSSFSheet sheet = wb.getSheetAt(0);
                int index = 1;
                for (String applicationId : ids) {
                    Folder applicationObject = (Folder) session.getObject(applicationId);
                    CMISUser user = null;
                    try {
                        user = userService.loadUserForConfirm(applicationObject.getPropertyValue("jconon_application:user"));
                    } catch (CoolUserFactoryException _ex) {
                        LOGGER.error("USER {} not found", userId, _ex);
                        user = new CMISUser(applicationObject.getPropertyValue("jconon_application:user"));
                    }
                    getRecordCSVPunteggi(session, applicationObject.getFolderParent(), applicationObject, user, contexURL, sheet, index++);
                }
            } else if (type.equalsIgnoreCase("istruttoria")) {
                wb = new HSSFWorkbook();
                final List<Folder> applications = Optional.ofNullable(ids).map(List::stream).orElse(Stream.empty()).map(s -> session.getObject(s)).filter(Folder.class::isInstance).map(Folder.class::cast).collect(Collectors.toList());
                final Map<String, List<Folder>> bandi = applications.stream().collect(Collectors.groupingBy(folder -> folder.getParentId()));
                for (String callId : bandi.keySet()) {
                    Folder callObject = Optional.ofNullable(callId).map(s -> session.getObject(s)).filter(Folder.class::isInstance).map(Folder.class::cast).orElseThrow(() -> new ClientMessageException("Estrazione excel Bando non trovato: " + callId));
                    Locale locale = Locale.ITALY;
                    Properties props = i18nService.loadLabels(locale);
                    props.putAll(competitionService.getDynamicLabels(callObject, session));
                    List<PropertyDefinition<?>> headPropertyDefinition = createHeadApplicationAll(session, callObject, JCONONPropertyIds.CALL_ELENCO_ASPECTS);
                    headPropertyDefinition.addAll(createHeadApplicationAll(session, callObject, JCONONPropertyIds.CALL_ELENCO_ASPECTS_SEZIONE_CNR));
                    headPropertyDefinition.addAll(createHeadApplicationAll(session, callObject, JCONONPropertyIds.CALL_ELENCO_ASPECTS_ULTERIORI_DATI));
                    Stream<String> concat = headCSVApplicationIstruttoria.stream();
                    if (Optional.ofNullable(siperService).isPresent()) {
                        concat = Stream.concat(headCSVApplicationIstruttoria.stream(), Arrays.asList("Codice Sede", "Descrizione Sede", "Livello Profilo", "Profilo", "Tipo Contratto").stream());
                    }
                    final HSSFSheet sheet = createSheet(wb, callObject.getPropertyValue(JCONONPropertyIds.CALL_CODICE.value()), Stream.concat(concat, headPropertyDefinition.stream().map(propertyDefinition -> {
                        return Optional.ofNullable(props.getProperty("label.".concat(propertyDefinition.getId().replace(":", ".")))).filter(s -> s.length() > 0).orElse(Optional.ofNullable(propertyDefinition.getDisplayName()).filter(s -> s.length() > 0).orElse(TESTO));
                    })).collect(Collectors.toList()));
                    int index = 1;
                    for (Folder applicationObject : bandi.get(callId)) {
                        CMISUser user = null;
                        try {
                            user = userService.loadUserForConfirm(applicationObject.getPropertyValue("jconon_application:user"));
                        } catch (CoolUserFactoryException _ex) {
                            LOGGER.error("USER {} not found", userId, _ex);
                            user = new CMISUser(applicationObject.getPropertyValue("jconon_application:user"));
                        }
                        LOGGER.info("XLS Istruttoria index {}", index);
                        getRecordCSVIstruttoria(session, callObject, applicationObject, user, contexURL, sheet, headPropertyDefinition, index++);
                    }
                }
            }
        }
    } else {
        wb = createHSSFWorkbook(headCSVApplication);
        HSSFSheet sheet = wb.getSheet(SHEET_DOMANDE);
        int index = 1;
        for (String application : ids) {
            Folder applicationObject = (Folder) session.getObject(application);
            CMISUser user = userService.loadUserForConfirm(applicationObject.getPropertyValue("jconon_application:user"));
            getRecordCSV(session, applicationObject.getFolderParent(), applicationObject, user, contexURL, sheet, index++);
        }
    }
    autoSizeColumns(wb);
    try {
        return createXLSDocument(session, wb, userId).getId();
    } catch (IOException e) {
        LOGGER.error("Error while extractionApplication", e);
        return null;
    }
}
Also used : Color(java.awt.Color) Order(it.cnr.si.opencmis.criteria.Order) ApplicationService(it.cnr.si.cool.jconon.service.application.ApplicationService) Autowired(org.springframework.beans.factory.annotation.Autowired) GroupService(it.cnr.cool.security.service.GroupService) PrintDetailBulk(it.cnr.si.cool.jconon.model.PrintDetailBulk) PDType1Font(org.apache.pdfbox.pdmodel.font.PDType1Font) org.apache.poi.ss.usermodel(org.apache.poi.ss.usermodel) BigDecimal(java.math.BigDecimal) JSONException(org.json.JSONException) CriteriaFactory(it.cnr.si.opencmis.criteria.CriteriaFactory) SimpleXlsReportConfiguration(net.sf.jasperreports.export.SimpleXlsReportConfiguration) NumberStyleFormatter(org.springframework.format.number.NumberStyleFormatter) CoolPropertyIds(it.cnr.cool.cmis.model.CoolPropertyIds) BigInteger(java.math.BigInteger) HttpStatus(org.apache.commons.httpclient.HttpStatus) PrintParameterModel(it.cnr.si.cool.jconon.model.PrintParameterModel) ContentStream(org.apache.chemistry.opencmis.commons.data.ContentStream) PropertyDefinition(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition) CompetitionFolderService(it.cnr.si.cool.jconon.service.cache.CompetitionFolderService) CMISAuthority(it.cnr.cool.security.service.impl.alfresco.CMISAuthority) PDDocument(org.apache.pdfbox.pdmodel.PDDocument) org.apache.chemistry.opencmis.commons.enums(org.apache.chemistry.opencmis.commons.enums) StandardCharsets(java.nio.charset.StandardCharsets) PropertyDecimalDefinition(org.apache.chemistry.opencmis.commons.definitions.PropertyDecimalDefinition) CMISUser(it.cnr.cool.security.service.impl.alfresco.CMISUser) MailService(it.cnr.cool.mail.MailService) IOUtils(org.apache.commons.io.IOUtils) Stream(java.util.stream.Stream) OperationContextImpl(org.apache.chemistry.opencmis.client.runtime.OperationContextImpl) PDPage(org.apache.pdfbox.pdmodel.PDPage) BarcodeFormat(com.google.zxing.BarcodeFormat) FieldProperty(it.cnr.bulkinfo.BulkInfoImpl.FieldProperty) JsonDataSource(net.sf.jasperreports.engine.data.JsonDataSource) JRXlsExporter(net.sf.jasperreports.engine.export.JRXlsExporter) JRPdfExporter(net.sf.jasperreports.engine.export.JRPdfExporter) CMISService(it.cnr.cool.cmis.service.CMISService) java.util(java.util) MimeTypes(it.cnr.cool.util.MimeTypes) InputStreamResource(net.sf.jasperreports.repo.InputStreamResource) SimpleDateFormat(java.text.SimpleDateFormat) SimpleExporterInput(net.sf.jasperreports.export.SimpleExporterInput) NumberFormat(java.text.NumberFormat) PDPageContentStream(org.apache.pdfbox.pdmodel.PDPageContentStream) PDFont(org.apache.pdfbox.pdmodel.font.PDFont) Value(org.springframework.beans.factory.annotation.Value) GroupsEnum(it.cnr.cool.security.GroupsEnum) Resource(net.sf.jasperreports.repo.Resource) Service(org.springframework.stereotype.Service) AttachmentBean(it.cnr.cool.mail.model.AttachmentBean) StatoDomanda(it.cnr.si.cool.jconon.service.application.ApplicationService.StatoDomanda) StreamSupport(java.util.stream.StreamSupport) Restrictions(it.cnr.si.opencmis.criteria.restrictions.Restrictions) RepositoryService(net.sf.jasperreports.repo.RepositoryService) PropertyDateTimeDefinition(org.apache.chemistry.opencmis.commons.definitions.PropertyDateTimeDefinition) UrlBuilder(org.apache.chemistry.opencmis.commons.impl.UrlBuilder) org.apache.chemistry.opencmis.client.api(org.apache.chemistry.opencmis.client.api) org.apache.poi.hssf.usermodel(org.apache.poi.hssf.usermodel) it.cnr.si.cool.jconon.cmis.model(it.cnr.si.cool.jconon.cmis.model) Pair(it.cnr.cool.util.Pair) com.google.gson(com.google.gson) UserService(it.cnr.cool.security.service.UserService) ReportResource(net.sf.jasperreports.repo.ReportResource) LoggerFactory(org.slf4j.LoggerFactory) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) SimpleOutputStreamExporterOutput(net.sf.jasperreports.export.SimpleOutputStreamExporterOutput) WriterException(com.google.zxing.WriterException) PDImageXObject(org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject) JcononGroups(it.cnr.si.cool.jconon.util.JcononGroups) JSONObject(org.json.JSONObject) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) JRGzipVirtualizer(net.sf.jasperreports.engine.fill.JRGzipVirtualizer) ParseException(java.text.ParseException) DateFormat(java.text.DateFormat) PDFTextStripper(org.apache.pdfbox.text.PDFTextStripper) JRDocxExporter(net.sf.jasperreports.engine.export.ooxml.JRDocxExporter) Response(org.apache.chemistry.opencmis.client.bindings.spi.http.Response) ACLService(it.cnr.cool.cmis.service.ACLService) CMISApplicationException(it.cnr.cool.web.scripts.exception.CMISApplicationException) QrCodeUtil(it.cnr.si.cool.jconon.util.QrCodeUtil) StringUtil(it.cnr.cool.util.StringUtil) ACLType(it.cnr.cool.cmis.model.ACLType) Collectors(java.util.stream.Collectors) List(java.util.List) PropertyBooleanDefinition(org.apache.chemistry.opencmis.commons.definitions.PropertyBooleanDefinition) Type(java.lang.reflect.Type) PropertyIds(org.apache.chemistry.opencmis.commons.PropertyIds) BitMatrix(com.google.zxing.common.BitMatrix) CoolUserFactoryException(it.cnr.cool.exception.CoolUserFactoryException) NotImplementedException(org.apache.commons.lang3.NotImplementedException) CmisStreamNotSupportedException(org.apache.chemistry.opencmis.commons.exceptions.CmisStreamNotSupportedException) MatrixToImageWriter(com.google.zxing.client.j2se.MatrixToImageWriter) CMISPropertyIds(it.cnr.si.cool.jconon.util.CMISPropertyIds) ClassPathResource(org.springframework.core.io.ClassPathResource) ContentStreamImpl(org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl) ApplicationModel(it.cnr.si.cool.jconon.model.ApplicationModel) NodeVersionService(it.cnr.cool.cmis.service.NodeVersionService) Criteria(it.cnr.si.opencmis.criteria.Criteria) JPEGFactory(org.apache.pdfbox.pdmodel.graphics.image.JPEGFactory) AppendMode(org.apache.pdfbox.pdmodel.PDPageContentStream.AppendMode) Util(it.cnr.cool.rest.util.Util) net.sf.jasperreports.engine(net.sf.jasperreports.engine) CacheRepository(it.cnr.si.cool.jconon.repository.CacheRepository) Logger(org.slf4j.Logger) BindingSession(org.apache.chemistry.opencmis.client.bindings.spi.BindingSession) BulkInfo(it.cnr.bulkinfo.BulkInfo) ClientMessageException(it.cnr.cool.web.scripts.exception.ClientMessageException) Output(org.apache.chemistry.opencmis.client.bindings.spi.http.Output) Code39Writer(com.google.zxing.oned.Code39Writer) ApplicationContext(org.springframework.context.ApplicationContext) JRPdfExporterParameter(net.sf.jasperreports.engine.export.JRPdfExporterParameter) PDRectangle(org.apache.pdfbox.pdmodel.common.PDRectangle) EmailMessage(it.cnr.cool.mail.model.EmailMessage) java.io(java.io) FieldPropertySet(it.cnr.bulkinfo.BulkInfoImpl.FieldPropertySet) BulkInfoCoolService(it.cnr.cool.service.BulkInfoCoolService) SimpleDocxReportConfiguration(net.sf.jasperreports.export.SimpleDocxReportConfiguration) Bean(org.springframework.context.annotation.Bean) I18nService(it.cnr.cool.service.I18nService) StringUtils(org.springframework.util.StringUtils) CMISUser(it.cnr.cool.security.service.impl.alfresco.CMISUser) Criteria(it.cnr.si.opencmis.criteria.Criteria) PDDocument(org.apache.pdfbox.pdmodel.PDDocument) PropertyDefinition(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition) ClientMessageException(it.cnr.cool.web.scripts.exception.ClientMessageException) List(java.util.List) ContentStream(org.apache.chemistry.opencmis.commons.data.ContentStream) Stream(java.util.stream.Stream) PDPageContentStream(org.apache.pdfbox.pdmodel.PDPageContentStream) CoolUserFactoryException(it.cnr.cool.exception.CoolUserFactoryException)

Example 27 with Criteria

use of it.cnr.si.opencmis.criteria.Criteria in project cool-jconon by consiglionazionaledellericerche.

the class PrintService method generaSchedeValutazione.

private void generaSchedeValutazione(String nodeRef, final String contextURL, final Locale locale, final String indirizzoEmail, final String userId) {
    try {
        Session adminCMISSession = cmisService.createAdminSession();
        Folder bando = (Folder) adminCMISSession.getObject(nodeRef);
        Criteria criteriaDomande = CriteriaFactory.createCriteria(JCONONFolderType.JCONON_APPLICATION.queryName());
        criteriaDomande.add(Restrictions.inTree(nodeRef));
        criteriaDomande.add(Restrictions.eq(JCONONPropertyIds.APPLICATION_STATO_DOMANDA.value(), ApplicationService.StatoDomanda.CONFERMATA.getValue()));
        criteriaDomande.add(Restrictions.isNull(JCONONPropertyIds.APPLICATION_ESCLUSIONE_RINUNCIA.value()));
        OperationContext context = adminCMISSession.getDefaultContext();
        context.setMaxItemsPerPage(10000);
        ItemIterable<QueryResult> domande = criteriaDomande.executeQuery(adminCMISSession, false, context);
        int domandeEstratte = 0;
        for (QueryResult queryResultDomande : domande) {
            String applicationAttach = competitionService.findAttachmentId(adminCMISSession, (String) queryResultDomande.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue(), JCONONDocumentType.JCONON_ATTACHMENT_SCHEDA_VALUTAZIONE);
            if (applicationAttach != null) {
                Document scheda = (Document) adminCMISSession.getObject(applicationAttach);
                if (scheda.getVersionLabel().equalsIgnoreCase("1.0")) {
                    scheda.deleteAllVersions();
                } else {
                    continue;
                }
            }
            try {
                printSchedaValutazione(adminCMISSession, (String) queryResultDomande.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue(), contextURL, userId, locale);
                domandeEstratte++;
            } catch (IOException e) {
                LOGGER.error("Error while generaSchedeValutazione", e);
            }
        }
        EmailMessage message = new EmailMessage();
        message.setBody("Il processo di estrazione delle schede relative bando " + bando.getProperty(JCONONPropertyIds.CALL_CODICE.value()).getValueAsString() + " è terminato.<br>Sono state estratte " + domandeEstratte + " schede.");
        message.setHtmlBody(true);
        message.setSubject(i18nService.getLabel("subject-info", locale) + "Schede di valutazione");
        message.setRecipients(Arrays.asList(indirizzoEmail));
        mailService.send(message);
    } catch (Exception e) {
        LOGGER.error("Error on Message for generaSchedeValutazione with id:" + nodeRef, e);
    }
}
Also used : EmailMessage(it.cnr.cool.mail.model.EmailMessage) Criteria(it.cnr.si.opencmis.criteria.Criteria) PDDocument(org.apache.pdfbox.pdmodel.PDDocument) JSONException(org.json.JSONException) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) WriterException(com.google.zxing.WriterException) ParseException(java.text.ParseException) CMISApplicationException(it.cnr.cool.web.scripts.exception.CMISApplicationException) CoolUserFactoryException(it.cnr.cool.exception.CoolUserFactoryException) NotImplementedException(org.apache.commons.lang3.NotImplementedException) CmisStreamNotSupportedException(org.apache.chemistry.opencmis.commons.exceptions.CmisStreamNotSupportedException) ClientMessageException(it.cnr.cool.web.scripts.exception.ClientMessageException) BindingSession(org.apache.chemistry.opencmis.client.bindings.spi.BindingSession)

Example 28 with Criteria

use of it.cnr.si.opencmis.criteria.Criteria in project cool-jconon by consiglionazionaledellericerche.

the class PrintService method generaSchedeAnonima.

private void generaSchedeAnonima(String nodeRef, final String contextURL, final Locale locale, final String indirizzoEmail, final String userId) {
    try {
        Session adminCMISSession = cmisService.createAdminSession();
        Folder bando = (Folder) adminCMISSession.getObject(nodeRef);
        Criteria criteriaDomande = CriteriaFactory.createCriteria(JCONONFolderType.JCONON_APPLICATION.queryName());
        criteriaDomande.add(Restrictions.inTree(nodeRef));
        criteriaDomande.add(Restrictions.eq(JCONONPropertyIds.APPLICATION_STATO_DOMANDA.value(), ApplicationService.StatoDomanda.CONFERMATA.getValue()));
        OperationContext context = adminCMISSession.getDefaultContext();
        context.setMaxItemsPerPage(10000);
        ItemIterable<QueryResult> domande = criteriaDomande.executeQuery(adminCMISSession, false, context);
        int schedeEstratte = 0, numeroScheda = getNumberOfSchedeAnonime(nodeRef, adminCMISSession).intValue();
        String messaggio = "";
        for (QueryResult queryResultDomande : domande) {
            String applicationAttach = competitionService.findAttachmentId(adminCMISSession, (String) queryResultDomande.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue(), JCONONDocumentType.JCONON_ATTACHMENT_SCHEDA_ANONIMA_SINTETICA_GENERATED);
            if (queryResultDomande.getPropertyById(JCONONPropertyIds.APPLICATION_ESCLUSIONE_RINUNCIA.value()) != null && queryResultDomande.getPropertyById(JCONONPropertyIds.APPLICATION_ESCLUSIONE_RINUNCIA.value()).getFirstValue() != null) {
                if (applicationAttach != null)
                    adminCMISSession.getObject(applicationAttach).delete();
                continue;
            }
            if (applicationAttach != null) {
                if (adminCMISSession.getObject(applicationAttach).getPropertyValue(JCONONPropertyIds.SCHEDA_ANONIMA_VALUTAZIONE_ESITO.value()) != null) {
                    messaggio = "<BR><b>Alcune schede risultano già valutate, pertanto non sono state estratte nuovamente.</b>";
                    continue;
                } else {
                    adminCMISSession.getObject(applicationAttach).delete();
                }
            }
            try {
                numeroScheda++;
                printSchedaAnonimaDiValutazione(adminCMISSession, (String) queryResultDomande.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue(), contextURL, userId, locale, numeroScheda);
                schedeEstratte++;
            } catch (IOException e) {
                LOGGER.error("Error while generaSchedeValutazione", e);
            }
        }
        EmailMessage message = new EmailMessage();
        message.setBody("Il processo di estrazione delle schede sintetiche anonime relative bando " + bando.getProperty(JCONONPropertyIds.CALL_CODICE.value()).getValueAsString() + " è terminato.<br>Sono state estratte " + schedeEstratte + " schede." + messaggio);
        message.setHtmlBody(true);
        message.setSubject(i18nService.getLabel("subject-info", locale) + "Schede Sintetiche Anonime");
        message.setRecipients(Arrays.asList(indirizzoEmail));
        mailService.send(message);
    } catch (Exception e) {
        LOGGER.error("Error on Message for generaSchedeValutazione with id:" + nodeRef, e);
    }
}
Also used : EmailMessage(it.cnr.cool.mail.model.EmailMessage) Criteria(it.cnr.si.opencmis.criteria.Criteria) JSONException(org.json.JSONException) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) WriterException(com.google.zxing.WriterException) ParseException(java.text.ParseException) CMISApplicationException(it.cnr.cool.web.scripts.exception.CMISApplicationException) CoolUserFactoryException(it.cnr.cool.exception.CoolUserFactoryException) NotImplementedException(org.apache.commons.lang3.NotImplementedException) CmisStreamNotSupportedException(org.apache.chemistry.opencmis.commons.exceptions.CmisStreamNotSupportedException) ClientMessageException(it.cnr.cool.web.scripts.exception.ClientMessageException) BindingSession(org.apache.chemistry.opencmis.client.bindings.spi.BindingSession)

Example 29 with Criteria

use of it.cnr.si.opencmis.criteria.Criteria in project cool-jconon by consiglionazionaledellericerche.

the class PrintService method schedeNonAnonime.

public String schedeNonAnonime(Session adminSession, String idCall, String contextURL) {
    final StringBuffer message = new StringBuffer();
    Criteria criteriaApplications = CriteriaFactory.createCriteria(JCONONFolderType.JCONON_APPLICATION.queryName());
    criteriaApplications.add(Restrictions.inFolder(idCall));
    criteriaApplications.add(Restrictions.eq(JCONONPropertyIds.APPLICATION_STATO_DOMANDA.value(), StatoDomanda.CONFERMATA.getValue()));
    criteriaApplications.add(Restrictions.isNull(JCONONPropertyIds.APPLICATION_ESCLUSIONE_RINUNCIA.value()));
    ItemIterable<QueryResult> attive = criteriaApplications.executeQuery(adminSession, false, adminSession.getDefaultContext());
    for (QueryResult domanda : attive.getPage(Integer.MAX_VALUE)) {
        Folder applicationFolder = Optional.ofNullable(adminSession.getObject(domanda.<String>getPropertyValueById(PropertyIds.OBJECT_ID))).filter(Folder.class::isInstance).map(Folder.class::cast).orElse(null);
        if (Optional.ofNullable(applicationFolder).isPresent()) {
            StreamSupport.stream(applicationFolder.getChildren().spliterator(), false).filter(cmisObject -> cmisObject.getType().getParentType().getId().equalsIgnoreCase(JCONONDocumentType.JCONON_ATTACHMENT_SCHEDA_ANONIMA.value())).filter(Document.class::isInstance).map(Document.class::cast).forEach(document -> {
                PDDocument pdDocument = null;
                try {
                    final Optional<InputStream> inputStream = Optional.ofNullable(document).flatMap(document1 -> Optional.ofNullable(document1.getContentStream())).flatMap(contentStream -> Optional.ofNullable(contentStream.getStream()));
                    if (inputStream.isPresent()) {
                        pdDocument = PDDocument.load(inputStream.get());
                        PDFTextStripper printer = new PDFTextStripper();
                        final Optional<String> text = Optional.ofNullable(printer.getText(pdDocument));
                        if (text.isPresent()) {
                            final String cognome = applicationFolder.<String>getPropertyValue(JCONONPropertyIds.APPLICATION_COGNOME.value()).toLowerCase();
                            final String nome = applicationFolder.<String>getPropertyValue(JCONONPropertyIds.APPLICATION_NOME.value()).toLowerCase();
                            final int indiceCognome = text.get().toLowerCase().indexOf(cognome);
                            final int indiceNome = text.get().toLowerCase().indexOf(nome);
                            if (indiceCognome != -1 || indiceNome != -1) {
                                if (message.length() == 0) {
                                    message.append("<ol>");
                                }
                                message.append("<li>");
                                message.append("<p><b>" + applicationFolder.<String>getPropertyValue(PropertyIds.NAME) + "</b></p>");
                                message.append("<p><b style=\"color:red\">[" + getTextFragment(text.get(), indiceCognome, indiceNome, cognome.length(), nome.length(), 40) + "]</b></p>");
                                message.append("<p>È possibile scaricare il file dal seguente <a href=\"" + contextURL + "/rest/content?fileName=scheda-anonima.pdf&nodeRef=" + document.getId() + "\">link</a></p>");
                                message.append("</li>");
                                LOGGER.info("Testo cercato {} {} in {}", cognome, nome, text.get());
                            }
                        }
                    } else {
                        LOGGER.error("SCHEDE NON ANONIME STREAM NUll id:{} name:{}", document.getId(), document.getName());
                    }
                } catch (IOException e) {
                    LOGGER.error("SCHEDE NON ANONIME CANNOT LOAD PDF DOCUMENT", e);
                } finally {
                    Optional.ofNullable(pdDocument).ifPresent(pdDocument1 -> {
                        try {
                            pdDocument1.close();
                        } catch (IOException e) {
                            LOGGER.error("SCHEDE NON ANONIME CANNOT LOAD PDF DOCUMENT", e);
                        }
                    });
                }
            });
        }
    }
    return Optional.ofNullable(message).filter(stringBuffer -> stringBuffer.length() > 0).map(StringBuffer::toString).map(s -> s.concat("</ol>")).orElse("<p><b>Nessun risultato trovato.</b></p>");
}
Also used : Color(java.awt.Color) Order(it.cnr.si.opencmis.criteria.Order) ApplicationService(it.cnr.si.cool.jconon.service.application.ApplicationService) Autowired(org.springframework.beans.factory.annotation.Autowired) GroupService(it.cnr.cool.security.service.GroupService) PrintDetailBulk(it.cnr.si.cool.jconon.model.PrintDetailBulk) PDType1Font(org.apache.pdfbox.pdmodel.font.PDType1Font) org.apache.poi.ss.usermodel(org.apache.poi.ss.usermodel) BigDecimal(java.math.BigDecimal) JSONException(org.json.JSONException) CriteriaFactory(it.cnr.si.opencmis.criteria.CriteriaFactory) SimpleXlsReportConfiguration(net.sf.jasperreports.export.SimpleXlsReportConfiguration) NumberStyleFormatter(org.springframework.format.number.NumberStyleFormatter) CoolPropertyIds(it.cnr.cool.cmis.model.CoolPropertyIds) BigInteger(java.math.BigInteger) HttpStatus(org.apache.commons.httpclient.HttpStatus) PrintParameterModel(it.cnr.si.cool.jconon.model.PrintParameterModel) ContentStream(org.apache.chemistry.opencmis.commons.data.ContentStream) PropertyDefinition(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition) CompetitionFolderService(it.cnr.si.cool.jconon.service.cache.CompetitionFolderService) CMISAuthority(it.cnr.cool.security.service.impl.alfresco.CMISAuthority) PDDocument(org.apache.pdfbox.pdmodel.PDDocument) org.apache.chemistry.opencmis.commons.enums(org.apache.chemistry.opencmis.commons.enums) StandardCharsets(java.nio.charset.StandardCharsets) PropertyDecimalDefinition(org.apache.chemistry.opencmis.commons.definitions.PropertyDecimalDefinition) CMISUser(it.cnr.cool.security.service.impl.alfresco.CMISUser) MailService(it.cnr.cool.mail.MailService) IOUtils(org.apache.commons.io.IOUtils) Stream(java.util.stream.Stream) OperationContextImpl(org.apache.chemistry.opencmis.client.runtime.OperationContextImpl) PDPage(org.apache.pdfbox.pdmodel.PDPage) BarcodeFormat(com.google.zxing.BarcodeFormat) FieldProperty(it.cnr.bulkinfo.BulkInfoImpl.FieldProperty) JsonDataSource(net.sf.jasperreports.engine.data.JsonDataSource) JRXlsExporter(net.sf.jasperreports.engine.export.JRXlsExporter) JRPdfExporter(net.sf.jasperreports.engine.export.JRPdfExporter) CMISService(it.cnr.cool.cmis.service.CMISService) java.util(java.util) MimeTypes(it.cnr.cool.util.MimeTypes) InputStreamResource(net.sf.jasperreports.repo.InputStreamResource) SimpleDateFormat(java.text.SimpleDateFormat) SimpleExporterInput(net.sf.jasperreports.export.SimpleExporterInput) NumberFormat(java.text.NumberFormat) PDPageContentStream(org.apache.pdfbox.pdmodel.PDPageContentStream) PDFont(org.apache.pdfbox.pdmodel.font.PDFont) Value(org.springframework.beans.factory.annotation.Value) GroupsEnum(it.cnr.cool.security.GroupsEnum) Resource(net.sf.jasperreports.repo.Resource) Service(org.springframework.stereotype.Service) AttachmentBean(it.cnr.cool.mail.model.AttachmentBean) StatoDomanda(it.cnr.si.cool.jconon.service.application.ApplicationService.StatoDomanda) StreamSupport(java.util.stream.StreamSupport) Restrictions(it.cnr.si.opencmis.criteria.restrictions.Restrictions) RepositoryService(net.sf.jasperreports.repo.RepositoryService) PropertyDateTimeDefinition(org.apache.chemistry.opencmis.commons.definitions.PropertyDateTimeDefinition) UrlBuilder(org.apache.chemistry.opencmis.commons.impl.UrlBuilder) org.apache.chemistry.opencmis.client.api(org.apache.chemistry.opencmis.client.api) org.apache.poi.hssf.usermodel(org.apache.poi.hssf.usermodel) it.cnr.si.cool.jconon.cmis.model(it.cnr.si.cool.jconon.cmis.model) Pair(it.cnr.cool.util.Pair) com.google.gson(com.google.gson) UserService(it.cnr.cool.security.service.UserService) ReportResource(net.sf.jasperreports.repo.ReportResource) LoggerFactory(org.slf4j.LoggerFactory) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) SimpleOutputStreamExporterOutput(net.sf.jasperreports.export.SimpleOutputStreamExporterOutput) WriterException(com.google.zxing.WriterException) PDImageXObject(org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject) JcononGroups(it.cnr.si.cool.jconon.util.JcononGroups) JSONObject(org.json.JSONObject) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) JRGzipVirtualizer(net.sf.jasperreports.engine.fill.JRGzipVirtualizer) ParseException(java.text.ParseException) DateFormat(java.text.DateFormat) PDFTextStripper(org.apache.pdfbox.text.PDFTextStripper) JRDocxExporter(net.sf.jasperreports.engine.export.ooxml.JRDocxExporter) Response(org.apache.chemistry.opencmis.client.bindings.spi.http.Response) ACLService(it.cnr.cool.cmis.service.ACLService) CMISApplicationException(it.cnr.cool.web.scripts.exception.CMISApplicationException) QrCodeUtil(it.cnr.si.cool.jconon.util.QrCodeUtil) StringUtil(it.cnr.cool.util.StringUtil) ACLType(it.cnr.cool.cmis.model.ACLType) Collectors(java.util.stream.Collectors) List(java.util.List) PropertyBooleanDefinition(org.apache.chemistry.opencmis.commons.definitions.PropertyBooleanDefinition) Type(java.lang.reflect.Type) PropertyIds(org.apache.chemistry.opencmis.commons.PropertyIds) BitMatrix(com.google.zxing.common.BitMatrix) CoolUserFactoryException(it.cnr.cool.exception.CoolUserFactoryException) NotImplementedException(org.apache.commons.lang3.NotImplementedException) CmisStreamNotSupportedException(org.apache.chemistry.opencmis.commons.exceptions.CmisStreamNotSupportedException) MatrixToImageWriter(com.google.zxing.client.j2se.MatrixToImageWriter) CMISPropertyIds(it.cnr.si.cool.jconon.util.CMISPropertyIds) ClassPathResource(org.springframework.core.io.ClassPathResource) ContentStreamImpl(org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl) ApplicationModel(it.cnr.si.cool.jconon.model.ApplicationModel) NodeVersionService(it.cnr.cool.cmis.service.NodeVersionService) Criteria(it.cnr.si.opencmis.criteria.Criteria) JPEGFactory(org.apache.pdfbox.pdmodel.graphics.image.JPEGFactory) AppendMode(org.apache.pdfbox.pdmodel.PDPageContentStream.AppendMode) Util(it.cnr.cool.rest.util.Util) net.sf.jasperreports.engine(net.sf.jasperreports.engine) CacheRepository(it.cnr.si.cool.jconon.repository.CacheRepository) Logger(org.slf4j.Logger) BindingSession(org.apache.chemistry.opencmis.client.bindings.spi.BindingSession) BulkInfo(it.cnr.bulkinfo.BulkInfo) ClientMessageException(it.cnr.cool.web.scripts.exception.ClientMessageException) Output(org.apache.chemistry.opencmis.client.bindings.spi.http.Output) Code39Writer(com.google.zxing.oned.Code39Writer) ApplicationContext(org.springframework.context.ApplicationContext) JRPdfExporterParameter(net.sf.jasperreports.engine.export.JRPdfExporterParameter) PDRectangle(org.apache.pdfbox.pdmodel.common.PDRectangle) EmailMessage(it.cnr.cool.mail.model.EmailMessage) java.io(java.io) FieldPropertySet(it.cnr.bulkinfo.BulkInfoImpl.FieldPropertySet) BulkInfoCoolService(it.cnr.cool.service.BulkInfoCoolService) SimpleDocxReportConfiguration(net.sf.jasperreports.export.SimpleDocxReportConfiguration) Bean(org.springframework.context.annotation.Bean) I18nService(it.cnr.cool.service.I18nService) StringUtils(org.springframework.util.StringUtils) Criteria(it.cnr.si.opencmis.criteria.Criteria) PDDocument(org.apache.pdfbox.pdmodel.PDDocument) PDDocument(org.apache.pdfbox.pdmodel.PDDocument) PDFTextStripper(org.apache.pdfbox.text.PDFTextStripper)

Example 30 with Criteria

use of it.cnr.si.opencmis.criteria.Criteria in project cool-jconon by consiglionazionaledellericerche.

the class PrintService method getCurriculum.

private List<PrintDetailBulk> getCurriculum(List<String> propertyValue, Folder application, Session cmisSession, ApplicationModel applicationModel, boolean printDetail) {
    List<PrintDetailBulk> result = new ArrayList<PrintDetailBulk>();
    Map<String, List<Pair<String, String>>> sezioni = getSezioni(propertyValue, cmisSession);
    for (String key : sezioni.keySet()) {
        for (Pair<String, String> pair : sezioni.get(key)) {
            Criteria criteria = CriteriaFactory.createCriteria(pair.getSecond());
            criteria.addColumn(PropertyIds.OBJECT_ID);
            criteria.add(Restrictions.inFolder(application.getId()));
            addOrderCurriculum(cmisSession, pair.getSecond(), criteria);
            ItemIterable<QueryResult> queryResults = criteria.executeQuery(cmisSession, false, cmisSession.getDefaultContext());
            if (queryResults.getTotalNumItems() > 0) {
                for (QueryResult queryResult : queryResults.getPage(Integer.MAX_VALUE)) {
                    CmisObject riga = cmisSession.getObject((String) queryResult.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue());
                    if (!riga.getType().getQueryName().equalsIgnoreCase(pair.getSecond()))
                        continue;
                    if (printDetail) {
                        result.add(new PrintDetailBulk(key, pair.getFirst(), null, getFields(riga, applicationModel), null));
                    } else {
                        String link = null;
                        if (Optional.ofNullable(riga.<BigInteger>getPropertyValue(PropertyIds.CONTENT_STREAM_LENGTH)).orElse(BigInteger.ZERO).compareTo(BigInteger.ZERO) > 0) {
                            link = applicationModel.getContextURL() + "/search/content?nodeRef=" + riga.getId() + "&fileName=" + riga.getName() + ".pdf";
                        }
                        String ruolo = riga.getPropertyValue("cvelement:altroRuoloProgetto");
                        if (ruolo == null)
                            ruolo = riga.getPropertyValue("cvelement:ruoloProgetto");
                        if (ruolo == null)
                            ruolo = riga.getPropertyValue("cvelement:altroRuoloIncarico");
                        if (ruolo == null)
                            ruolo = riga.getPropertyValue("cvelement:ruoloIncarico");
                        if (ruolo != null) {
                            ruolo = ruolo.replace("_", " ");
                            ruolo += " - ";
                        } else {
                            ruolo = "";
                        }
                        String title = riga.getPropertyValue("cvelement:denominazioneIncarico");
                        if (title == null)
                            title = riga.getPropertyValue("cvelement:denominazioneIstituto");
                        if (title == null)
                            title = riga.getPropertyValue("cvelement:titoloProgetto");
                        if (title == null)
                            title = riga.getPropertyValue("cvelement:denominazioneStruttura");
                        if (title == null)
                            title = riga.getPropertyValue("cvelement:rivista");
                        if (title == null)
                            title = riga.getPropertyValue("cvelement:tipologiaOrganismo");
                        if (title == null)
                            title = riga.getPropertyValue("cvelement:titoloEvento");
                        if (title == null)
                            title = riga.getPropertyValue("cvelement:descrizionePremio");
                        if (title == null)
                            title = riga.getPropertyValue("cvelement:commonAltroEnteCodice");
                        if (riga.getPropertyValue("cvelement:attivitaSvolta") != null)
                            title += " - " + riga.getPropertyValue("cvelement:attivitaSvolta");
                        if (riga.getPropertyValue("cvelement:descrizionePartecipazione") != null)
                            title += " - " + riga.getPropertyValue("cvelement:descrizionePartecipazione");
                        PrintDetailBulk detail = new PrintDetailBulk(null, pair.getFirst(), link, ruolo + title, null);
                        String periodo = "";
                        SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
                        if (riga.getPropertyValue("cvelement:periodAttivitaDal") != null)
                            periodo += "Dal " + dateFormat.format(((Calendar) riga.getPropertyValue("cvelement:periodAttivitaDal")).getTime());
                        if (riga.getPropertyValue("cvelement:periodAttivitaAl") != null)
                            periodo += " Al " + dateFormat.format(((Calendar) riga.getPropertyValue("cvelement:periodAttivitaAl")).getTime());
                        if (riga.getPropertyValue("cvelement:attivitainCorso") != null)
                            periodo += " attivita in corso";
                        if (riga.getPropertyValue("cvelement:oreComplessive") != null)
                            periodo += " Ore complessive " + ((BigDecimal) (riga.getPropertyValue("cvelement:oreComplessive"))).setScale(0, BigDecimal.ROUND_DOWN);
                        detail.setPeriodo(periodo);
                        result.add(detail);
                    }
                }
            }
        }
    }
    return result;
}
Also used : Criteria(it.cnr.si.opencmis.criteria.Criteria) BigInteger(java.math.BigInteger) List(java.util.List) PrintDetailBulk(it.cnr.si.cool.jconon.model.PrintDetailBulk) SimpleDateFormat(java.text.SimpleDateFormat)

Aggregations

Criteria (it.cnr.si.opencmis.criteria.Criteria)53 ClientMessageException (it.cnr.cool.web.scripts.exception.ClientMessageException)26 JSONObject (org.json.JSONObject)19 BindingSession (org.apache.chemistry.opencmis.client.bindings.spi.BindingSession)18 CoolUserFactoryException (it.cnr.cool.exception.CoolUserFactoryException)17 CMISUser (it.cnr.cool.security.service.impl.alfresco.CMISUser)16 BigInteger (java.math.BigInteger)16 ACLType (it.cnr.cool.cmis.model.ACLType)14 CriteriaFactory (it.cnr.si.opencmis.criteria.CriteriaFactory)14 java.util (java.util)14 Collectors (java.util.stream.Collectors)14 Output (org.apache.chemistry.opencmis.client.bindings.spi.http.Output)14 Response (org.apache.chemistry.opencmis.client.bindings.spi.http.Response)14 PropertyIds (org.apache.chemistry.opencmis.commons.PropertyIds)14 UrlBuilder (org.apache.chemistry.opencmis.commons.impl.UrlBuilder)14 Logger (org.slf4j.Logger)14 LoggerFactory (org.slf4j.LoggerFactory)14 Autowired (org.springframework.beans.factory.annotation.Autowired)14 CoolPropertyIds (it.cnr.cool.cmis.model.CoolPropertyIds)13 GroupsEnum (it.cnr.cool.security.GroupsEnum)13