use of it.cnr.cool.cmis.model.ACLType in project cool-jconon by consiglionazionaledellericerche.
the class CallService method comunicazioni.
protected Long comunicazioni(Session session, MultipartHttpServletRequest mRequest, BindingSession bindingSession, String contextURL, Locale locale, String userId) throws IOException {
String callId = mRequest.getParameter("callId");
String note = mRequest.getParameter("note");
String firma = mRequest.getParameter("firma");
List<String> applicationsId = Arrays.asList(Optional.ofNullable(mRequest.getParameterValues("application")).orElse(new String[0]));
String filtersProvvisorieInviate = mRequest.getParameter("filters-provvisorie_inviate");
Integer totalepunteggioda = null, totalepunteggioa = null;
try {
totalepunteggioda = Optional.ofNullable(mRequest.getParameter("totalepunteggioda")).filter(s -> s.length() > 0).map(Integer::valueOf).orElse(null);
totalepunteggioa = Optional.ofNullable(mRequest.getParameter("totalepunteggioa")).filter(s -> s.length() > 0).map(Integer::valueOf).orElse(null);
} catch (NumberFormatException _ex) {
}
Folder call = (Folder) session.getObject(String.valueOf(callId));
if (!call.getAllowableActions().getAllowableActions().contains(Action.CAN_UPDATE_PROPERTIES))
throw new ClientMessageException("message.error.call.cannnot.modify");
List<String> nodeRefAllegato = addAttachmentToCall(session, bindingSession, call, mRequest.getFiles("file"));
Criteria criteriaApplications = CriteriaFactory.createCriteria(JCONONFolderType.JCONON_APPLICATION.queryName());
criteriaApplications.add(Restrictions.inTree(call.getPropertyValue(PropertyIds.OBJECT_ID)));
if (Optional.ofNullable(filtersProvvisorieInviate).isPresent() && !filtersProvvisorieInviate.equalsIgnoreCase("tutte") && !filtersProvvisorieInviate.equalsIgnoreCase("attive") && !filtersProvvisorieInviate.equalsIgnoreCase("escluse")) {
criteriaApplications.add(Restrictions.eq(JCONONPropertyIds.APPLICATION_STATO_DOMANDA.value(), filtersProvvisorieInviate));
}
if (Optional.ofNullable(filtersProvvisorieInviate).isPresent() && filtersProvvisorieInviate.equalsIgnoreCase("attive")) {
criteriaApplications.add(Restrictions.eq(JCONONPropertyIds.APPLICATION_STATO_DOMANDA.value(), ApplicationService.StatoDomanda.CONFERMATA.getValue()));
criteriaApplications.add(Restrictions.isNull(JCONONPropertyIds.APPLICATION_ESCLUSIONE_RINUNCIA.value()));
}
if (Optional.ofNullable(filtersProvvisorieInviate).isPresent() && filtersProvvisorieInviate.equalsIgnoreCase("escluse")) {
criteriaApplications.add(Restrictions.eq(JCONONPropertyIds.APPLICATION_STATO_DOMANDA.value(), ApplicationService.StatoDomanda.CONFERMATA.getValue()));
criteriaApplications.add(Restrictions.isNotNull(JCONONPropertyIds.APPLICATION_ESCLUSIONE_RINUNCIA.value()));
}
if (Optional.ofNullable(totalepunteggioda).isPresent()) {
criteriaApplications.add(Restrictions.ge(JCONONPropertyIds.APPLICATION_TOTALE_PUNTEGGIO.value(), totalepunteggioda));
}
if (Optional.ofNullable(totalepunteggioa).isPresent()) {
criteriaApplications.add(Restrictions.le(JCONONPropertyIds.APPLICATION_TOTALE_PUNTEGGIO.value(), totalepunteggioa));
}
applicationsId.stream().filter(string -> !string.isEmpty()).findAny().map(map -> criteriaApplications.add(Restrictions.in(PropertyIds.OBJECT_ID, applicationsId.toArray())));
long result = 0;
ItemIterable<QueryResult> applications = criteriaApplications.executeQuery(session, false, session.getDefaultContext());
for (QueryResult application : applications.getPage(Integer.MAX_VALUE)) {
Folder applicationObject = (Folder) session.getObject((String) application.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue());
final String attachmentId = competitionService.findAttachmentId(session, applicationObject.getId(), JCONONDocumentType.JCONON_ATTACHMENT_COMUNICAZIONE);
if (attachmentId != null) {
final CmisObject document = session.getObject(attachmentId);
if (document.getPropertyValue(JCONON_COMUNICAZIONE_STATO) != null && document.getPropertyValue(JCONON_COMUNICAZIONE_STATO).equals(StatoComunicazione.GENERATO.name())) {
continue;
}
}
StrSubstitutor sub = formatPlaceHolder(applicationObject, applicationObject.getFolderParent());
byte[] bytes = printService.printComunicazione(session, applicationObject, contextURL, locale, sub.replace(note), firma);
String name = "COMUNICAZIONE_" + applicationObject.getPropertyValue(JCONONPropertyIds.APPLICATION_COGNOME.value()) + " " + applicationObject.getPropertyValue(JCONONPropertyIds.APPLICATION_NOME.value()) + "_" + applicationObject.getPropertyValue(JCONONPropertyIds.APPLICATION_USER.value()) + "_" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd_HH-mm-ss")) + ".pdf";
result++;
LOGGER.info("Generate comunication n. {} width name {}", result, name);
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, JCONONDocumentType.JCONON_ATTACHMENT_COMUNICAZIONE.value());
properties.put(PropertyIds.NAME, name);
properties.put(JCONONPropertyIds.ATTACHMENT_USER.value(), applicationObject.getPropertyValue(JCONONPropertyIds.APPLICATION_USER.value()));
properties.put(JCONON_COMUNICAZIONE_STATO, StatoComunicazione.GENERATO.name());
properties.put("jconon_comunicazione:email", applicationObject.getPropertyValue(JCONONPropertyIds.APPLICATION_EMAIL_COMUNICAZIONI.value()));
properties.put("jconon_comunicazione:email_pec", applicationObject.getPropertyValue(JCONONPropertyIds.APPLICATION_EMAIL_PEC_COMUNICAZIONI.value()));
List<String> aspects = Stream.of(JCONONPolicyType.JCONON_ATTACHMENT_GENERIC_DOCUMENT.value(), JCONONPolicyType.JCONON_ATTACHMENT_FROM_RDP.value()).collect(Collectors.toList());
if (!nodeRefAllegato.isEmpty()) {
properties.put(JCONONPropertyIds.ATTACHMENT_RELATED.value(), nodeRefAllegato.stream().collect(Collectors.joining(",")));
aspects.add(JCONONPolicyType.JCONON_ATTACHMENT_ATTACHED.value());
}
properties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, aspects);
ContentStreamImpl contentStream = new ContentStreamImpl();
contentStream.setStream(new ByteArrayInputStream(bytes));
contentStream.setMimeType("application/pdf");
String documentPresentId = findAttachmentName(session, applicationObject.getId(), name);
if (documentPresentId == null) {
Document doc = applicationObject.createDocument(properties, contentStream, VersioningState.MAJOR);
aclService.setInheritedPermission(bindingSession, doc.getPropertyValue(CoolPropertyIds.ALFCMIS_NODEREF.value()), false);
Map<String, ACLType> acesGroup = new HashMap<String, ACLType>();
acesGroup.put(JcononGroups.CONCORSI.group(), ACLType.Coordinator);
acesGroup.put("GROUP_" + getCallGroupRdPName(call), ACLType.Coordinator);
aclService.addAcl(bindingSession, doc.getPropertyValue(CoolPropertyIds.ALFCMIS_NODEREF.value()), acesGroup);
} else {
Document doc = (Document) session.getObject(documentPresentId);
doc.updateProperties(properties);
doc.setContentStream(contentStream, true);
}
}
return result;
}
use of it.cnr.cool.cmis.model.ACLType 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());
}
use of it.cnr.cool.cmis.model.ACLType in project cool-jconon by consiglionazionaledellericerche.
the class PrintService method printSchedaValutazione.
public String printSchedaValutazione(Session cmisSession, String nodeRef, String contextURL, String userId, Locale locale) throws IOException {
Folder application = (Folder) cmisSession.getObject(nodeRef);
Folder call = (Folder) cmisSession.getObject(application.getParentId());
application.refresh();
InputStream is = new ByteArrayInputStream(getSchedaValutazione(cmisSession, application, contextURL, locale));
String nameRicevutaReportModel = getSchedaValutazioneName(cmisSession, application);
ContentStream contentStream = new ContentStreamImpl(nameRicevutaReportModel, BigInteger.valueOf(is.available()), "application/vnd.ms-excel", is);
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, JCONONDocumentType.JCONON_ATTACHMENT_SCHEDA_VALUTAZIONE.value());
properties.put(PropertyIds.NAME, nameRicevutaReportModel);
properties.put(JCONONPropertyIds.ATTACHMENT_USER.value(), userId);
properties.put(JCONONPropertyIds.ATTACHMENT_SCHEDA_VALUTAZIONE_COMMENTO.value(), "Scheda vuota");
Document doc = application.createDocument(properties, contentStream, VersioningState.MAJOR);
Map<String, ACLType> aces = new HashMap<String, ACLType>();
aces.put(GroupsEnum.CONCORSI.value(), ACLType.Coordinator);
aces.put("GROUP_" + call.getPropertyValue(JCONONPropertyIds.CALL_RDP.value()), ACLType.Consumer);
aces.put("GROUP_" + call.getPropertyValue(JCONONPropertyIds.CALL_COMMISSIONE.value()), ACLType.Coordinator);
Folder macroCall = competitionService.getMacroCall(cmisService.createAdminSession(), call);
if (macroCall != null) {
String groupNameMacroCall = competitionService.getCallGroupCommissioneName(macroCall);
aces.put("GROUP_" + groupNameMacroCall, ACLType.Coordinator);
}
aclService.addAcl(cmisService.getAdminSession(), doc.getProperty(CoolPropertyIds.ALFCMIS_NODEREF.value()).getValueAsString(), aces);
aclService.setInheritedPermission(cmisService.getAdminSession(), doc.getProperty(CoolPropertyIds.ALFCMIS_NODEREF.value()).getValueAsString(), false);
nodeVersionService.addAutoVersion(doc, false);
return doc.getId();
}
use of it.cnr.cool.cmis.model.ACLType in project cool-jconon by consiglionazionaledellericerche.
the class PrintService method printSchedaAnonimaDiValutazione.
public String printSchedaAnonimaDiValutazione(Session cmisSession, String nodeRef, String contextURL, String userId, Locale locale, int index) throws IOException {
Folder application = (Folder) cmisSession.getObject(nodeRef);
Folder call = (Folder) cmisSession.getObject(application.getParentId());
application.refresh();
InputStream is = new ByteArrayInputStream(getSchedaAnonimaSintetica(cmisSession, application, contextURL, locale, index));
String nameRicevutaReportModel = getSchedaAnonimaSinteticaName(cmisSession, application, index);
ContentStream contentStream = new ContentStreamImpl(nameRicevutaReportModel, BigInteger.valueOf(is.available()), "application/pdf", is);
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, JCONONDocumentType.JCONON_ATTACHMENT_SCHEDA_ANONIMA_SINTETICA_GENERATED.value());
properties.put(PropertyIds.NAME, nameRicevutaReportModel);
properties.put(JCONONPropertyIds.ATTACHMENT_USER.value(), userId);
properties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, Arrays.asList("P:jconon_scheda_anonima:valutazione"));
String schedaAnonima = competitionService.findAttachmentId(cmisSession, nodeRef, JCONONDocumentType.JCONON_ATTACHMENT_SCHEDA_ANONIMA_SINTETICA_GENERATED);
if (schedaAnonima != null)
cmisSession.delete(cmisSession.createObjectId(schedaAnonima));
Document doc = application.createDocument(properties, contentStream, VersioningState.MAJOR);
Map<String, ACLType> aces = new HashMap<String, ACLType>();
aces.put(JcononGroups.CONCORSI.group(), ACLType.Coordinator);
aces.put("GROUP_" + call.getPropertyValue(JCONONPropertyIds.CALL_COMMISSIONE.value()), ACLType.Editor);
aces.put("GROUP_" + call.getPropertyValue(JCONONPropertyIds.CALL_RDP.value()), ACLType.Editor);
Folder macroCall = competitionService.getMacroCall(cmisService.createAdminSession(), call);
if (macroCall != null) {
String groupNameMacroCall = competitionService.getCallGroupCommissioneName(macroCall);
aces.put("GROUP_" + groupNameMacroCall, ACLType.Editor);
}
aclService.addAcl(cmisService.getAdminSession(), doc.getProperty(CoolPropertyIds.ALFCMIS_NODEREF.value()).getValueAsString(), aces);
aclService.setInheritedPermission(cmisService.getAdminSession(), doc.getProperty(CoolPropertyIds.ALFCMIS_NODEREF.value()).getValueAsString(), false);
nodeVersionService.addAutoVersion(doc, false);
return doc.getId();
}
use of it.cnr.cool.cmis.model.ACLType in project cool-jconon by consiglionazionaledellericerche.
the class CallService method convocazioni.
protected Long convocazioni(Session session, MultipartHttpServletRequest mRequest, BindingSession bindingSession, String contextURL, Locale locale, String userId) throws IOException {
String callId = mRequest.getParameter("callId");
String tipoSelezione = mRequest.getParameter("tipoSelezione");
Boolean testoLibero = Boolean.valueOf(mRequest.getParameter("testoLibero"));
String luogo = mRequest.getParameter("luogo");
Calendar data = Optional.ofNullable(mRequest.getParameter("data")).filter(s -> s.length() > 0).map(s -> {
try {
return DateUtils.parse(s);
} catch (ParseException e) {
return null;
}
}).orElse(null);
String note = mRequest.getParameter("note");
String firma = mRequest.getParameter("firma");
List<String> applicationsId = Arrays.asList(Optional.ofNullable(mRequest.getParameterValues("application")).orElse(new String[0]));
Integer numeroConvocazione = Optional.ofNullable(mRequest.getParameter("numeroConvocazione")).map(map -> Integer.valueOf(map)).orElse(1);
Folder call = (Folder) session.getObject(String.valueOf(callId));
if (!call.getAllowableActions().getAllowableActions().contains(Action.CAN_UPDATE_PROPERTIES))
throw new ClientMessageException("message.error.call.cannnot.modify");
List<String> nodeRefAllegato = addAttachmentToCall(session, bindingSession, call, mRequest.getFiles("file"));
Criteria criteriaApplications = CriteriaFactory.createCriteria(JCONONFolderType.JCONON_APPLICATION.queryName());
criteriaApplications.add(Restrictions.inFolder(call.getPropertyValue(PropertyIds.OBJECT_ID)));
criteriaApplications.add(Restrictions.eq(JCONONPropertyIds.APPLICATION_STATO_DOMANDA.value(), ApplicationService.StatoDomanda.CONFERMATA.getValue()));
criteriaApplications.add(Restrictions.isNull(JCONONPropertyIds.APPLICATION_ESCLUSIONE_RINUNCIA.value()));
applicationsId.stream().filter(string -> !string.isEmpty()).findAny().map(map -> criteriaApplications.add(Restrictions.in(PropertyIds.OBJECT_ID, applicationsId.toArray())));
long index = 0;
ItemIterable<QueryResult> applications = criteriaApplications.executeQuery(session, false, session.getDefaultContext());
for (QueryResult application : applications.getPage(Integer.MAX_VALUE)) {
Folder applicationObject = (Folder) session.getObject((String) application.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue());
StrSubstitutor sub = formatPlaceHolder(applicationObject, applicationObject.getFolderParent());
byte[] bytes = printService.printConvocazione(session, applicationObject, contextURL, locale, Optional.ofNullable(tipoSelezione).map(s -> call.<String>getPropertyValue(s)).map(s -> maleFemale(s, " il ", " la ") + s + maleFemale(s, " previsto ", " prevista ")).orElse(null), luogo, data, testoLibero, sub.replace(note), firma);
String name = "CONV_" + applicationObject.getPropertyValue(JCONONPropertyIds.APPLICATION_COGNOME.value()) + " " + applicationObject.getPropertyValue(JCONONPropertyIds.APPLICATION_NOME.value()) + "_" + applicationObject.getPropertyValue(JCONONPropertyIds.APPLICATION_USER.value()) + "_" + StrServ.lpad(String.valueOf(numeroConvocazione), 4) + ".pdf";
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, JCONONDocumentType.JCONON_ATTACHMENT_CONVOVCAZIONE.value());
properties.put(PropertyIds.NAME, name);
properties.put(JCONONPropertyIds.ATTACHMENT_USER.value(), applicationObject.getPropertyValue(JCONONPropertyIds.APPLICATION_USER.value()));
properties.put("jconon_convocazione:numero", numeroConvocazione);
properties.put("jconon_convocazione:stato", StatoComunicazione.GENERATO.name());
properties.put("jconon_convocazione:data", data);
properties.put("jconon_convocazione:luogo", luogo);
properties.put("jconon_convocazione:tipoSelezione", Optional.ofNullable(tipoSelezione).map(s -> call.<String>getPropertyValue(s)).orElse(null));
properties.put("jconon_convocazione:email", applicationObject.getPropertyValue(JCONONPropertyIds.APPLICATION_EMAIL_COMUNICAZIONI.value()));
properties.put("jconon_convocazione:email_pec", applicationObject.getPropertyValue(JCONONPropertyIds.APPLICATION_EMAIL_PEC_COMUNICAZIONI.value()));
List<String> aspects = Stream.of(JCONONPolicyType.JCONON_ATTACHMENT_GENERIC_DOCUMENT.value(), JCONONPolicyType.JCONON_ATTACHMENT_FROM_RDP.value()).collect(Collectors.toList());
if (!nodeRefAllegato.isEmpty()) {
properties.put(JCONONPropertyIds.ATTACHMENT_RELATED.value(), nodeRefAllegato.stream().collect(Collectors.joining(",")));
aspects.add(JCONONPolicyType.JCONON_ATTACHMENT_ATTACHED.value());
}
properties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, aspects);
ContentStreamImpl contentStream = new ContentStreamImpl();
contentStream.setStream(new ByteArrayInputStream(bytes));
contentStream.setMimeType("application/pdf");
String documentPresentId = findAttachmentName(session, applicationObject.getId(), name);
if (documentPresentId == null) {
index++;
Document doc = applicationObject.createDocument(properties, contentStream, VersioningState.MAJOR);
aclService.setInheritedPermission(bindingSession, doc.getPropertyValue(CoolPropertyIds.ALFCMIS_NODEREF.value()), false);
Map<String, ACLType> acesGroup = new HashMap<String, ACLType>();
acesGroup.put(JcononGroups.CONCORSI.group(), ACLType.Coordinator);
acesGroup.put("GROUP_" + getCallGroupRdPName(call), ACLType.Coordinator);
aclService.addAcl(bindingSession, doc.getPropertyValue(CoolPropertyIds.ALFCMIS_NODEREF.value()), acesGroup);
} else {
Document doc = (Document) session.getObject(documentPresentId);
if (doc.getPropertyValue("jconon_convocazione:stato").equals(StatoComunicazione.GENERATO.name())) {
index++;
doc.updateProperties(properties);
doc.setContentStream(contentStream, true);
}
}
}
if (numeroConvocazione >= Optional.ofNullable(call.getPropertyValue("jconon_call:numero_convocazione")).map(map -> Integer.valueOf(map.toString())).orElse(1)) {
Map<String, Object> callProperties = new HashMap<String, Object>();
callProperties.put("jconon_call:numero_convocazione", numeroConvocazione);
call.updateProperties(callProperties);
}
return index;
}
Aggregations