Search in sources :

Example 21 with Criteria

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

the class ExportApplicationsService method exportApplications.

public Map<String, String> exportApplications(Session currentSession, BindingSession bindingSession, String nodeRefBando, CMISUser user, boolean all, boolean active, JSONArray types) {
    Folder bando = (Folder) currentSession.getObject(nodeRefBando);
    String finalApplicationName = Call.refactoringFileName(Arrays.asList("BANDO", bando.<String>getPropertyValue(JCONONPropertyIds.CALL_CODICE.value()), Optional.ofNullable(bando.<String>getPropertyValue(JCONONPropertyIds.CALL_SEDE.value())).map(s -> s.replaceAll("[^a-zA-Z0-9]+", " ")).orElse("")).stream().collect(Collectors.joining("_")), "_");
    Map<String, String> result;
    if (all) {
        List<String> documents = new ArrayList<String>();
        Criteria criteriaDomande = CriteriaFactory.createCriteria(JCONONFolderType.JCONON_APPLICATION.queryName());
        criteriaDomande.addColumn(PropertyIds.OBJECT_ID);
        criteriaDomande.add(Restrictions.inTree(nodeRefBando));
        criteriaDomande.add(Restrictions.eq(JCONONPropertyIds.APPLICATION_STATO_DOMANDA.value(), ApplicationService.StatoDomanda.CONFERMATA.getValue()));
        if (active) {
            criteriaDomande.add(Restrictions.isNull(JCONONPropertyIds.APPLICATION_ESCLUSIONE_RINUNCIA.value()));
        }
        ItemIterable<QueryResult> domande = criteriaDomande.executeQuery(currentSession, false, currentSession.getDefaultContext());
        for (QueryResult queryResultDomande : domande.getPage(Integer.MAX_VALUE)) {
            String applicationAttach = competitionService.findAttachmentId(currentSession, (String) queryResultDomande.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue(), JCONONDocumentType.JCONON_ATTACHMENT_APPLICATION, true);
            if (applicationAttach != null) {
                documents.add(applicationAttach);
            }
        }
        if (documents.isEmpty()) {
            // Se non ci sono domande definitive finalCall non viene creata
            throw new ClientMessageException("Il bando " + finalApplicationName + " non presenta domande definitive");
        }
        result = invokePost(documents, finalApplicationName, bindingSession, user, true, types);
    } else {
        List<String> documents = callService.findDocumentFinal(currentSession, bindingSession, nodeRefBando, JCONONDocumentType.JCONON_ATTACHMENT_APPLICATION);
        if (documents.isEmpty()) {
            // Se non ci sono domande definitive finalCall non viene creata
            throw new ClientMessageException("Il bando " + finalApplicationName + " non presenta domande definitive");
        }
        result = invokePost(documents, finalApplicationName, bindingSession, user, false, null);
    }
    LOGGER.info("ExportApplicationsService - File " + finalApplicationName + ".zip creata");
    return result;
}
Also used : CMISService(it.cnr.cool.cmis.service.CMISService) java.util(java.util) MimeTypes(it.cnr.cool.util.MimeTypes) QueryResult(org.apache.chemistry.opencmis.client.api.QueryResult) LoggerFactory(org.slf4j.LoggerFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) Session(org.apache.chemistry.opencmis.client.api.Session) SessionParameter(org.apache.chemistry.opencmis.commons.SessionParameter) Call(it.cnr.si.cool.jconon.rest.Call) CriteriaFactory(it.cnr.si.opencmis.criteria.CriteriaFactory) Criteria(it.cnr.si.opencmis.criteria.Criteria) Service(org.springframework.stereotype.Service) Restrictions(it.cnr.si.opencmis.criteria.restrictions.Restrictions) UrlBuilder(org.apache.chemistry.opencmis.commons.impl.UrlBuilder) HttpStatus(org.apache.commons.httpclient.HttpStatus) Folder(org.apache.chemistry.opencmis.client.api.Folder) JCONONDocumentType(it.cnr.si.cool.jconon.cmis.model.JCONONDocumentType) CmisBindingsHelper(org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingsHelper) OutputStream(java.io.OutputStream) CompetitionFolderService(it.cnr.si.cool.jconon.service.cache.CompetitionFolderService) Response(org.apache.chemistry.opencmis.client.bindings.spi.http.Response) Logger(org.slf4j.Logger) BindingSession(org.apache.chemistry.opencmis.client.bindings.spi.BindingSession) ACLService(it.cnr.cool.cmis.service.ACLService) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) IOException(java.io.IOException) ClientMessageException(it.cnr.cool.web.scripts.exception.ClientMessageException) Output(org.apache.chemistry.opencmis.client.bindings.spi.http.Output) InputStreamReader(java.io.InputStreamReader) Collectors(java.util.stream.Collectors) JCONONFolderType(it.cnr.si.cool.jconon.cmis.model.JCONONFolderType) CallService(it.cnr.si.cool.jconon.service.call.CallService) CMISUser(it.cnr.cool.security.service.impl.alfresco.CMISUser) ItemIterable(org.apache.chemistry.opencmis.client.api.ItemIterable) PropertyIds(org.apache.chemistry.opencmis.commons.PropertyIds) JCONONPropertyIds(it.cnr.si.cool.jconon.cmis.model.JCONONPropertyIds) JSONArray(org.json.JSONArray) QueryResult(org.apache.chemistry.opencmis.client.api.QueryResult) ClientMessageException(it.cnr.cool.web.scripts.exception.ClientMessageException) Criteria(it.cnr.si.opencmis.criteria.Criteria) Folder(org.apache.chemistry.opencmis.client.api.Folder)

Example 22 with Criteria

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

the class HelpDeskServiceTest method before.

@BeforeEach
@Disabled
public void before() throws ParseException, InterruptedException, CoolUserFactoryException {
    // Seleziono uno dei bandi attivi
    OperationContext oc = new OperationContextImpl(cmisDefaultOperationContext);
    oc.setMaxItemsPerPage(1);
    Session adminSession = cmisService.createAdminSession();
    Calendar startDate = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
    Criteria criteria = CriteriaFactory.createCriteria(JCONONFolderType.JCONON_CALL.queryName());
    ItemIterable<QueryResult> queryResult = criteria.executeQuery(adminSession, false, oc);
    MockHttpServletRequest req = new MockHttpServletRequest();
    BindingSession bindingSession = cmisService.getAdminSession();
    cmisUser = userService.loadUser("admin", bindingSession);
    for (QueryResult qr : queryResult) {
        call = (Folder) adminSession.getObject(new ObjectIdImpl(qr.getPropertyValueById(PropertyIds.OBJECT_ID)));
        CALL = call.getName();
        break;
    }
    postMap = new HashMap<String, String>();
    postMap.put("firstName", cmisUser.getFirstName());
    postMap.put("lastName", cmisUser.getLastName());
    postMap.put("phoneNumber", cmisUser.getTelephone());
    postMap.put("email", cmisUser.getEmail());
    postMap.put("confirmEmail", cmisUser.getEmail());
    postMap.put("category", ID_CATEGORY);
    postMap.put("subject", SUBJECT);
    postMap.put("message", MESSAGE);
    postMap.put("problemType", PROBLEM_TYPE);
    postMap.put("matricola", MATRICOLA);
    postMap.put("call", CALL);
}
Also used : MockHttpServletRequest(org.springframework.mock.web.MockHttpServletRequest) Calendar(java.util.Calendar) OperationContextImpl(org.apache.chemistry.opencmis.client.runtime.OperationContextImpl) Criteria(it.cnr.si.opencmis.criteria.Criteria) BindingSession(org.apache.chemistry.opencmis.client.bindings.spi.BindingSession) ObjectIdImpl(org.apache.chemistry.opencmis.client.runtime.ObjectIdImpl) BindingSession(org.apache.chemistry.opencmis.client.bindings.spi.BindingSession) BeforeEach(org.junit.jupiter.api.BeforeEach) Disabled(org.junit.jupiter.api.Disabled)

Example 23 with Criteria

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

the class CallRepository method findAttachmentLabels.

public String findAttachmentLabels(Session cmisSession, String source) {
    Criteria criteria = CriteriaFactory.createCriteria(BaseTypeId.CMIS_DOCUMENT.value());
    criteria.addColumn(PropertyIds.OBJECT_ID);
    criteria.addColumn(PropertyIds.NAME);
    criteria.add(Restrictions.inFolder(source));
    criteria.add(Restrictions.eq(PropertyIds.NAME, LABELS_JSON));
    ItemIterable<QueryResult> iterable = criteria.executeQuery(cmisSession, false, cmisSession.getDefaultContext());
    for (QueryResult queryResult : iterable) {
        return queryResult.<String>getPropertyById(PropertyIds.OBJECT_ID).getFirstValue();
    }
    return null;
}
Also used : QueryResult(org.apache.chemistry.opencmis.client.api.QueryResult) Criteria(it.cnr.si.opencmis.criteria.Criteria)

Example 24 with Criteria

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

the class CacheRepository method getCompetitionFolder.

@Cacheable(COMPETITION)
public CmisObjectCache getCompetitionFolder() {
    LOGGER.info("Try to connect to repository base url: {}", baseURL);
    Folder competition = null;
    Session session = cmisService.createAdminSession();
    Criteria criteria = CriteriaFactory.createCriteria(JCONONFolderType.JCONON_COMPETITION.queryName());
    ItemIterable<QueryResult> results = criteria.executeQuery(session, false, session.getDefaultContext());
    if (results.getTotalNumItems() == 0) {
        competition = (Folder) session.getObject(session.createFolder(Collections.unmodifiableMap(Stream.of(new AbstractMap.SimpleEntry<>(PropertyIds.OBJECT_TYPE_ID, JCONONFolderType.JCONON_COMPETITION.value()), new AbstractMap.SimpleEntry<>(PropertyIds.NAME, Optional.ofNullable(i18NService.getLabel("app.name", Locale.ITALIAN)).orElse("Selezioni on-line"))).collect(Collectors.toMap((e) -> e.getKey(), (e) -> e.getValue()))), session.getRootFolder()));
        /**
         * Creo le folder per i documenti
         */
        final ObjectId documents = session.createFolder(Collections.unmodifiableMap(Stream.of(new AbstractMap.SimpleEntry<>(PropertyIds.OBJECT_TYPE_ID, BaseTypeId.CMIS_FOLDER.value()), new AbstractMap.SimpleEntry<>(PropertyIds.NAME, "documents")).collect(Collectors.toMap((e) -> e.getKey(), (e) -> e.getValue()))), competition);
        session.createFolder(Collections.unmodifiableMap(Stream.of(new AbstractMap.SimpleEntry<>(PropertyIds.OBJECT_TYPE_ID, BaseTypeId.CMIS_FOLDER.value()), new AbstractMap.SimpleEntry<>(PropertyIds.NAME, "manuali")).collect(Collectors.toMap((e) -> e.getKey(), (e) -> e.getValue()))), documents);
        session.createFolder(Collections.unmodifiableMap(Stream.of(new AbstractMap.SimpleEntry<>(PropertyIds.OBJECT_TYPE_ID, BaseTypeId.CMIS_FOLDER.value()), new AbstractMap.SimpleEntry<>(PropertyIds.NAME, "graduatorie")).collect(Collectors.toMap((e) -> e.getKey(), (e) -> e.getValue()))), documents);
        /**
         * Creo anche i gruppi necessari al funzionamento
         */
        createGroup(null, JcononGroups.CONCORSI.name(), JcononGroups.CONCORSI.label());
        createGroup(null, JcononGroups.COMMISSIONI_CONCORSO.name(), JcononGroups.COMMISSIONI_CONCORSO.label());
        createGroup(null, JcononGroups.RDP_CONCORSO.name(), JcononGroups.RDP_CONCORSO.label());
        createGroup(null, JcononGroups.APPLICATION_CONSUMER.name(), JcononGroups.APPLICATION_CONSUMER.label());
        createGroup(null, JcononGroups.GESTORI_BANDI.name(), JcononGroups.GESTORI_BANDI.label(), "[\"APP.DEFAULT\", \"AUTH.EXT.gestori\"]");
        for (ObjectType objectType : session.getTypeChildren(JCONONFolderType.JCONON_CALL.value(), false)) {
            createGroup("GROUP_GESTORI_BANDI", "GESTORI_" + objectType.getId().replace(":", "_").toUpperCase(), "GESTORI " + objectType.getDisplayName(), "[\"APP.DEFAULT\", \"AUTH.EXT.gestori\"]", "{\"jconon_group_gestori:call_type\": \"" + objectType.getId() + "\"}");
        }
        Map<String, ACLType> aces = new HashMap<String, ACLType>();
        aces.put(GroupsEnum.CONCORSI.value(), ACLType.Contributor);
        aces.put("GROUP_GESTORI_BANDI", ACLType.Contributor);
        aclService.addAcl(cmisService.getAdminSession(), competition.getProperty(CoolPropertyIds.ALFCMIS_NODEREF.value()).getValueAsString(), aces);
        try {
            CMISUser user = new CMISUser();
            user.setFirstName(guestUserName);
            user.setLastName(guestUserName);
            user.setUserName(guestUserName);
            user.setPassword(guestPassword);
            user.setEmail("anonymus@anonymus.it");
            userService.createUser(user);
            userService.enableAccount(user.getUserName());
        } catch (CoolUserFactoryException _ex) {
            LOGGER.error("Cannot create guest user in repository", _ex);
        }
    } else {
        for (QueryResult queryResult : results) {
            ObjectId objectId = session.createObjectId((String) queryResult.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue());
            competition = (Folder) session.getObject(objectId);
        }
    }
    return new CmisObjectCache().id(competition.getId()).path(competition.getPath());
}
Also used : ObjectTypeCache(it.cnr.si.cool.jconon.repository.dto.ObjectTypeCache) Cacheable(org.springframework.cache.annotation.Cacheable) LoggerFactory(org.slf4j.LoggerFactory) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) Autowired(org.springframework.beans.factory.annotation.Autowired) CacheEvict(org.springframework.cache.annotation.CacheEvict) BulkInfoCool(it.cnr.bulkinfo.cool.BulkInfoCool) JcononGroups(it.cnr.si.cool.jconon.util.JcononGroups) CriteriaFactory(it.cnr.si.opencmis.criteria.CriteriaFactory) CoolPropertyIds(it.cnr.cool.cmis.model.CoolPropertyIds) Repository(org.springframework.stereotype.Repository) PropertyDefinition(org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition) CmisBindingsHelper(org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingsHelper) Response(org.apache.chemistry.opencmis.client.bindings.spi.http.Response) ACLService(it.cnr.cool.cmis.service.ACLService) JCONONPolicyType(it.cnr.si.cool.jconon.cmis.model.JCONONPolicyType) ACLType(it.cnr.cool.cmis.model.ACLType) Collectors(java.util.stream.Collectors) CMISUser(it.cnr.cool.security.service.impl.alfresco.CMISUser) IOUtils(org.apache.commons.io.IOUtils) Stream(java.util.stream.Stream) PropertyIds(org.apache.chemistry.opencmis.commons.PropertyIds) CoolUserFactoryException(it.cnr.cool.exception.CoolUserFactoryException) CMISService(it.cnr.cool.cmis.service.CMISService) JasperCompileManager(net.sf.jasperreports.engine.JasperCompileManager) JasperReport(net.sf.jasperreports.engine.JasperReport) java.util(java.util) MimeTypes(it.cnr.cool.util.MimeTypes) ByteArrayOutputStream(java.io.ByteArrayOutputStream) JRException(net.sf.jasperreports.engine.JRException) ClassPathResource(org.springframework.core.io.ClassPathResource) BaseTypeId(org.apache.chemistry.opencmis.commons.enums.BaseTypeId) CmisObjectCache(it.cnr.si.cool.jconon.repository.dto.CmisObjectCache) Value(org.springframework.beans.factory.annotation.Value) GroupsEnum(it.cnr.cool.security.GroupsEnum) Charset(java.nio.charset.Charset) Criteria(it.cnr.si.opencmis.criteria.Criteria) CacheManager(org.springframework.cache.CacheManager) SiperService(it.cnr.si.cool.jconon.service.SiperService) UrlBuilder(org.apache.chemistry.opencmis.commons.impl.UrlBuilder) JCONONDocumentType(it.cnr.si.cool.jconon.cmis.model.JCONONDocumentType) TypeService(it.cnr.si.cool.jconon.service.TypeService) org.apache.chemistry.opencmis.client.api(org.apache.chemistry.opencmis.client.api) OutputStream(java.io.OutputStream) Logger(org.slf4j.Logger) BulkInfoRepository(it.cnr.cool.BulkInfoRepository) Output(org.apache.chemistry.opencmis.client.bindings.spi.http.Output) JCONONFolderType(it.cnr.si.cool.jconon.cmis.model.JCONONFolderType) BulkInfoCoolService(it.cnr.cool.service.BulkInfoCoolService) UserService(it.cnr.cool.security.service.UserService) I18nService(it.cnr.cool.service.I18nService) InputStream(java.io.InputStream) ACLType(it.cnr.cool.cmis.model.ACLType) CMISUser(it.cnr.cool.security.service.impl.alfresco.CMISUser) Criteria(it.cnr.si.opencmis.criteria.Criteria) CmisObjectCache(it.cnr.si.cool.jconon.repository.dto.CmisObjectCache) CoolUserFactoryException(it.cnr.cool.exception.CoolUserFactoryException) Cacheable(org.springframework.cache.annotation.Cacheable)

Example 25 with Criteria

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

the class PrintService method getAllegati.

private List<PrintDetailBulk> getAllegati(Folder application, JCONONPolicyType allegati, Session cmisSession, ApplicationModel applicationModel, boolean printDetail, boolean allAllegati) {
    List<PrintDetailBulk> result = new ArrayList<PrintDetailBulk>();
    Criteria criteria = CriteriaFactory.createCriteria(allegati.queryName());
    criteria.addColumn(PropertyIds.OBJECT_ID);
    criteria.add(Restrictions.inFolder(application.getId()));
    ItemIterable<QueryResult> queryResults = criteria.executeQuery(cmisSession, false, cmisSession.getDefaultContext());
    if (queryResults.getTotalNumItems() > 0) {
        for (QueryResult queryResult : queryResults.getPage(Integer.MAX_VALUE)) {
            Document riga = (Document) cmisSession.getObject((String) queryResult.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue());
            if (Optional.ofNullable(riga).map(document -> document.<List<String>>getPropertyValue(PropertyIds.SECONDARY_OBJECT_TYPE_IDS)).filter(listProperty -> listProperty.contains(JCONONPolicyType.JCONON_ATTACHMENT_FROM_RDP.value())).isPresent())
                continue;
            if (!allAllegati && Optional.ofNullable(riga).map(Document::getDocumentType).map(DocumentType::getId).filter(type -> Arrays.asList(JCONONDocumentType.JCONON_ATTACHMENT_DOCUMENTO_RICONOSCIMENTO.value(), JCONONDocumentType.JCONON_ATTACHMENT_DIC_SOST.value()).contains(type)).isPresent())
                continue;
            String link = applicationModel.getContextURL() + "/search/content?nodeRef=" + riga.getId() + "&fileName=" + riga.getContentStreamFileName() + // FIX EXCEL CHARACTER
            "&dummy=dummy";
            String type = applicationModel.getMessage(riga.getType().getId());
            if (type.equals(riga.getType().getId()))
                type = riga.getType().getDisplayName();
            List<Pair<String, String>> detail;
            Pair<String, String> pairName = new Pair<String, String>(riga.getProperty(PropertyIds.NAME).getDisplayName(), riga.getProperty(PropertyIds.NAME).getValueAsString());
            if (printDetail) {
                detail = getFields(riga, applicationModel);
                if (!detail.contains(pairName))
                    detail.add(pairName);
                result.add(new PrintDetailBulk(null, type, link, detail, null));
            } else {
                result.add(new PrintDetailBulk(null, type, link, riga.getProperty(PropertyIds.NAME).getValueAsString(), null));
            }
        }
    }
    return result;
}
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) PrintDetailBulk(it.cnr.si.cool.jconon.model.PrintDetailBulk) Pair(it.cnr.cool.util.Pair)

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