Skip to content

Commit

Permalink
Fixed bugs when loading an extension without an official gazette
Browse files Browse the repository at this point in the history
  • Loading branch information
mspasiano committed Mar 29, 2024
1 parent 09be85a commit d562a80
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ public void aggiornaDate(Folder call, Document doc) {
doc.getPropertyValue(JCONONPropertyIds.ATTACHMENT_DATA_FINE.value())
)).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
if (call.getSecondaryTypes().stream().map(SecondaryType::getId)
.anyMatch(s -> s.equalsIgnoreCase(JCONONPolicyType.JCONON_CALL_ASPECT_GU.value()))) {
.anyMatch(s -> s.equalsIgnoreCase(JCONONPolicyType.JCONON_CALL_ASPECT_GU.value())) &&
doc.getPropertyValue(JCONONPropertyIds.CALL_DATA_GU.value()) != null &&
doc.getPropertyValue(JCONONPropertyIds.CALL_NUMERO_GU.value()) != null
) {
properties.putAll(
Stream.of(new AbstractMap.SimpleEntry<>(
JCONONPropertyIds.CALL_NEW_DATA_GU.value(),
Expand All @@ -122,7 +125,9 @@ public void aggiornaDate(Folder call, Document doc) {
)).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)));
}
if (call.getSecondaryTypes().stream().map(SecondaryType::getId)
.anyMatch(s -> s.equalsIgnoreCase(JCONONPolicyType.JCONON_CALL_ASPECT_INPA.value()))) {
.anyMatch(s -> s.equalsIgnoreCase(JCONONPolicyType.JCONON_CALL_ASPECT_INPA.value())) &&
doc.getPropertyValue(JCONONPropertyIds.CALL_DATA_INPA.value()) != null
) {
properties.putAll(
Stream.of(
new AbstractMap.SimpleEntry<>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,7 @@ private boolean existsProvvedimentoProrogaTermini(Session cmisSession, Folder ca
criteria.add(Restrictions.inFolder(call.getId()));
ItemIterable<QueryResult> attachments = criteria.executeQuery(cmisSession, false, cmisSession.getDefaultContext());
for (QueryResult queryResult : attachments) {
if (queryResult.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue().equals(JCONONDocumentType.JCONON_ATTACHMENT_CALL_CORRECTION.value()) ||
queryResult.getPropertyById(PropertyIds.OBJECT_ID).getFirstValue().equals(JCONONDocumentType.JCONON_ATTACHMENT_CALL_CORRECTION_PROROGATION.value()))
if (queryResult.getPropertyById(PropertyIds.SECONDARY_OBJECT_TYPE_IDS).getValues().contains(JCONONPolicyType.JCONON_ATTACHMENT_PROROGATION.value()))
return true;
}
return false;
Expand Down

0 comments on commit d562a80

Please sign in to comment.