|
50 | 50 | import it.eng.spago.error.EMFErrorSeverity; |
51 | 51 | import it.eng.spago.error.EMFInternalError; |
52 | 52 | import it.eng.spago.error.EMFUserError; |
53 | | -import it.eng.spago.navigation.LightNavigationManager; |
54 | 53 | import it.eng.spago.security.IEngUserProfile; |
55 | 54 | import it.eng.spago.util.JavaScript; |
56 | 55 | import it.eng.spago.validation.EMFValidationError; |
@@ -354,8 +353,9 @@ public void applyViewpoint(String userProvidedParametersStr, boolean transientMo |
354 | 353 | continue; |
355 | 354 | } |
356 | 355 | String parUrlName = chunks[0]; |
357 | | - if (parUrlName == null || parUrlName.trim().equals("")) |
| 356 | + if (parUrlName == null || parUrlName.trim().equals("")) { |
358 | 357 | continue; |
| 358 | + } |
359 | 359 | BIObjectParameter biparameter = null; |
360 | 360 | Iterator<BIObjectParameter> it = biparameters.iterator(); |
361 | 361 | while (it.hasNext()) { |
@@ -411,8 +411,9 @@ public void setParameterValues(String userProvidedParametersStr, boolean transie |
411 | 411 | continue; |
412 | 412 | } |
413 | 413 | String parUrlName = chunks[0]; |
414 | | - if (parUrlName == null || parUrlName.trim().equals("")) |
| 414 | + if (parUrlName == null || parUrlName.trim().equals("")) { |
415 | 415 | continue; |
| 416 | + } |
416 | 417 | BIObjectParameter biparameter = null; |
417 | 418 | Iterator<BIObjectParameter> it = biparameters.iterator(); |
418 | 419 | while (it.hasNext()) { |
@@ -461,8 +462,9 @@ public void refreshParametersValues(SourceBean request, boolean transientMode) { |
461 | 462 | * (see initBIParameters method) |
462 | 463 | */ |
463 | 464 | // if (isSingleValue(biparam) || biparam.isTransientParmeters()) |
464 | | - if (biparam.isTransientParmeters()) |
| 465 | + if (biparam.isTransientParmeters()) { |
465 | 466 | continue; |
| 467 | + } |
466 | 468 | biparam.setParameterValues(null); |
467 | 469 | biparam.setParameterValuesDescription(null); |
468 | 470 | } else { |
@@ -548,21 +550,24 @@ private void refreshParameter(BIObjectParameter biparam, SourceBean request, boo |
548 | 550 | String nameUrl = biparam.getParameterUrlName(); |
549 | 551 | List paramAttrsList = request.getAttributeAsList(nameUrl); |
550 | 552 | ArrayList paramvalues = new ArrayList(); |
551 | | - if (paramAttrsList.isEmpty()) |
| 553 | + if (paramAttrsList.isEmpty()) { |
552 | 554 | return; |
| 555 | + } |
553 | 556 | Iterator iterParAttr = paramAttrsList.iterator(); |
554 | 557 | while (iterParAttr.hasNext()) { |
555 | 558 | String values = (String) iterParAttr.next(); |
556 | 559 | String[] value = values.split(";"); |
557 | 560 | for (int i = 0; i < value.length; i++) { |
558 | | - if (!value[i].trim().equalsIgnoreCase("")) |
| 561 | + if (!value[i].trim().equalsIgnoreCase("")) { |
559 | 562 | paramvalues.add(value[i]); |
| 563 | + } |
560 | 564 | } |
561 | 565 | } |
562 | | - if (paramvalues.isEmpty()) |
| 566 | + if (paramvalues.isEmpty()) { |
563 | 567 | biparam.setParameterValues(null); |
564 | | - else |
| 568 | + } else { |
565 | 569 | biparam.setParameterValues(paramvalues); |
| 570 | + } |
566 | 571 | biparam.setTransientParmeters(transientMode); |
567 | 572 | LOGGER.debug("End refreshing parameter value"); |
568 | 573 | } |
@@ -652,8 +657,9 @@ public List getParametersErrors(boolean onEditMode) throws Exception { |
652 | 657 | LOGGER.debug("Getting parameters errors with edit mode equals to {}", onEditMode); |
653 | 658 | List toReturn = new ArrayList(); |
654 | 659 | List<BIObjectParameter> biparams = object.getDrivers(); |
655 | | - if (biparams.isEmpty()) |
| 660 | + if (biparams.isEmpty()) { |
656 | 661 | return toReturn; |
| 662 | + } |
657 | 663 | Iterator<BIObjectParameter> iterParams = biparams.iterator(); |
658 | 664 | while (iterParams.hasNext()) { |
659 | 665 | BIObjectParameter biparam = iterParams.next(); |
@@ -721,8 +727,9 @@ private List getValidationErrorsOnChecks(BIObjectParameter biparameter) throws E |
721 | 727 | Check check = null; |
722 | 728 | while (it.hasNext()) { |
723 | 729 | check = (Check) it.next(); |
724 | | - if (check.getValueTypeCd().equalsIgnoreCase("MANDATORY")) |
| 730 | + if (check.getValueTypeCd().equalsIgnoreCase("MANDATORY")) { |
725 | 731 | continue; |
| 732 | + } |
726 | 733 | LOGGER.debug("Applying check {} to biparameter {}...", check.getLabel(), label); |
727 | 734 | List errors = getValidationErrorOnCheck(biparameter, check); |
728 | 735 | if (errors != null && !errors.isEmpty()) { |
@@ -823,8 +830,9 @@ private List getValidationErrorOnCheck(BIObjectParameter biparameter, Check chec |
823 | 830 | error = SpagoBIValidationImpl.validateField(urlName, label, aValue, "DATE", |
824 | 831 | check.getFirstValue(), null, null); |
825 | 832 | } |
826 | | - if (error != null) |
| 833 | + if (error != null) { |
827 | 834 | toReturn.add(error); |
| 835 | + } |
828 | 836 | } |
829 | 837 | } |
830 | 838 | } |
@@ -1166,22 +1174,6 @@ public void eraseParametersValues() { |
1166 | 1174 | LOGGER.debug("OUT"); |
1167 | 1175 | } |
1168 | 1176 |
|
1169 | | - public String getSnapshotUrl() { |
1170 | | - LOGGER.debug("Getting snapshot URL"); |
1171 | | - if (this.snapshot == null) { |
1172 | | - throw new SpagoBIServiceException("", "no snapshot set"); |
1173 | | - } |
1174 | | - StringBuilder buffer = new StringBuilder(); |
1175 | | - buffer.append(GeneralUtilities.getSpagoBIProfileBaseUrl(this.userProfile.getUserUniqueIdentifier().toString())); |
1176 | | - buffer.append("&ACTION_NAME=GET_SNAPSHOT_CONTENT"); |
1177 | | - buffer.append("&" + SpagoBIConstants.SNAPSHOT_ID + "=" + snapshot.getId()); |
1178 | | - buffer.append("&" + ObjectsTreeConstants.OBJECT_ID + "=" + object.getId()); |
1179 | | - buffer.append("&" + LightNavigationManager.LIGHT_NAVIGATOR_DISABLED + "=TRUE"); |
1180 | | - |
1181 | | - String url = buffer.toString(); |
1182 | | - LOGGER.debug("End getting snapshot URL: returning url {}", url); |
1183 | | - return url; |
1184 | | - } |
1185 | 1177 |
|
1186 | 1178 | public String getSubObjectUrl(Locale locale) throws EncodingException { |
1187 | 1179 | LOGGER.debug("Getting sub object URL for locale {}", locale); |
@@ -1559,8 +1551,9 @@ public boolean equals(Object another) { |
1559 | 1551 |
|
1560 | 1552 | ExecutionInstance anInstance = (ExecutionInstance) another; |
1561 | 1553 | return this.executionId.equals(anInstance.executionId); |
1562 | | - } else |
| 1554 | + } else { |
1563 | 1555 | return false; |
| 1556 | + } |
1564 | 1557 | } |
1565 | 1558 |
|
1566 | 1559 | public Locale getLocale() { |
|
0 commit comments