Skip to content

Commit b0e6d92

Browse files
committed
Deleted lib portlet in knowage utils
1 parent 9d84554 commit b0e6d92

34 files changed

Lines changed: 201 additions & 2870 deletions

File tree

knowage-core/src/main/java/it/eng/spagobi/analiticalmodel/document/handlers/ExecutionInstance.java

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import it.eng.spago.error.EMFErrorSeverity;
5151
import it.eng.spago.error.EMFInternalError;
5252
import it.eng.spago.error.EMFUserError;
53-
import it.eng.spago.navigation.LightNavigationManager;
5453
import it.eng.spago.security.IEngUserProfile;
5554
import it.eng.spago.util.JavaScript;
5655
import it.eng.spago.validation.EMFValidationError;
@@ -354,8 +353,9 @@ public void applyViewpoint(String userProvidedParametersStr, boolean transientMo
354353
continue;
355354
}
356355
String parUrlName = chunks[0];
357-
if (parUrlName == null || parUrlName.trim().equals(""))
356+
if (parUrlName == null || parUrlName.trim().equals("")) {
358357
continue;
358+
}
359359
BIObjectParameter biparameter = null;
360360
Iterator<BIObjectParameter> it = biparameters.iterator();
361361
while (it.hasNext()) {
@@ -411,8 +411,9 @@ public void setParameterValues(String userProvidedParametersStr, boolean transie
411411
continue;
412412
}
413413
String parUrlName = chunks[0];
414-
if (parUrlName == null || parUrlName.trim().equals(""))
414+
if (parUrlName == null || parUrlName.trim().equals("")) {
415415
continue;
416+
}
416417
BIObjectParameter biparameter = null;
417418
Iterator<BIObjectParameter> it = biparameters.iterator();
418419
while (it.hasNext()) {
@@ -461,8 +462,9 @@ public void refreshParametersValues(SourceBean request, boolean transientMode) {
461462
* (see initBIParameters method)
462463
*/
463464
// if (isSingleValue(biparam) || biparam.isTransientParmeters())
464-
if (biparam.isTransientParmeters())
465+
if (biparam.isTransientParmeters()) {
465466
continue;
467+
}
466468
biparam.setParameterValues(null);
467469
biparam.setParameterValuesDescription(null);
468470
} else {
@@ -548,21 +550,24 @@ private void refreshParameter(BIObjectParameter biparam, SourceBean request, boo
548550
String nameUrl = biparam.getParameterUrlName();
549551
List paramAttrsList = request.getAttributeAsList(nameUrl);
550552
ArrayList paramvalues = new ArrayList();
551-
if (paramAttrsList.isEmpty())
553+
if (paramAttrsList.isEmpty()) {
552554
return;
555+
}
553556
Iterator iterParAttr = paramAttrsList.iterator();
554557
while (iterParAttr.hasNext()) {
555558
String values = (String) iterParAttr.next();
556559
String[] value = values.split(";");
557560
for (int i = 0; i < value.length; i++) {
558-
if (!value[i].trim().equalsIgnoreCase(""))
561+
if (!value[i].trim().equalsIgnoreCase("")) {
559562
paramvalues.add(value[i]);
563+
}
560564
}
561565
}
562-
if (paramvalues.isEmpty())
566+
if (paramvalues.isEmpty()) {
563567
biparam.setParameterValues(null);
564-
else
568+
} else {
565569
biparam.setParameterValues(paramvalues);
570+
}
566571
biparam.setTransientParmeters(transientMode);
567572
LOGGER.debug("End refreshing parameter value");
568573
}
@@ -652,8 +657,9 @@ public List getParametersErrors(boolean onEditMode) throws Exception {
652657
LOGGER.debug("Getting parameters errors with edit mode equals to {}", onEditMode);
653658
List toReturn = new ArrayList();
654659
List<BIObjectParameter> biparams = object.getDrivers();
655-
if (biparams.isEmpty())
660+
if (biparams.isEmpty()) {
656661
return toReturn;
662+
}
657663
Iterator<BIObjectParameter> iterParams = biparams.iterator();
658664
while (iterParams.hasNext()) {
659665
BIObjectParameter biparam = iterParams.next();
@@ -721,8 +727,9 @@ private List getValidationErrorsOnChecks(BIObjectParameter biparameter) throws E
721727
Check check = null;
722728
while (it.hasNext()) {
723729
check = (Check) it.next();
724-
if (check.getValueTypeCd().equalsIgnoreCase("MANDATORY"))
730+
if (check.getValueTypeCd().equalsIgnoreCase("MANDATORY")) {
725731
continue;
732+
}
726733
LOGGER.debug("Applying check {} to biparameter {}...", check.getLabel(), label);
727734
List errors = getValidationErrorOnCheck(biparameter, check);
728735
if (errors != null && !errors.isEmpty()) {
@@ -823,8 +830,9 @@ private List getValidationErrorOnCheck(BIObjectParameter biparameter, Check chec
823830
error = SpagoBIValidationImpl.validateField(urlName, label, aValue, "DATE",
824831
check.getFirstValue(), null, null);
825832
}
826-
if (error != null)
833+
if (error != null) {
827834
toReturn.add(error);
835+
}
828836
}
829837
}
830838
}
@@ -1166,22 +1174,6 @@ public void eraseParametersValues() {
11661174
LOGGER.debug("OUT");
11671175
}
11681176

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-
}
11851177

11861178
public String getSubObjectUrl(Locale locale) throws EncodingException {
11871179
LOGGER.debug("Getting sub object URL for locale {}", locale);
@@ -1559,8 +1551,9 @@ public boolean equals(Object another) {
15591551

15601552
ExecutionInstance anInstance = (ExecutionInstance) another;
15611553
return this.executionId.equals(anInstance.executionId);
1562-
} else
1554+
} else {
15631555
return false;
1556+
}
15641557
}
15651558

15661559
public Locale getLocale() {

0 commit comments

Comments
 (0)