From 37d33439403f1339e3ff9f30d98b3c7d91701682 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Tue, 16 May 2017 14:09:16 +0000 Subject: [PATCH] ref 8580:TDM - TabMan - Support Java 8 compatibility https://support.d4science.org/issues/8580 Updated compatibility to Java 8 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@148720 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 6 +- distro/changelog.xml | 4 + pom.xml | 6 +- .../gwtservice/client/rpc/TDGWTService.java | 776 ++- .../client/rpc/TDGWTServiceAsync.java | 4 +- .../server/CSVImportFileServlet.java | 4 +- .../server/CodelistMappingUploadServlet.java | 4 +- .../gwtservice/server/LocalUploadServlet.java | 4 +- .../server/RetrieveChartFileServlet.java | 4 +- ...etrieveFileAndDiscoverMimeTypeServlet.java | 4 +- .../user/td/gwtservice/server/SDMXClient.java | 4 +- .../gwtservice/server/SessionConstants.java | 4 +- .../user/td/gwtservice/server/SessionOp.java | 6 +- .../td/gwtservice/server/SessionUtil.java | 1364 ++--- .../gwtservice/server/TDGWTServiceImpl.java | 5223 ++++++----------- .../server/TDGWTServiceMessagesConstants.java | 4 +- .../td/gwtservice/server/TDLogsServlet.java | 4 +- .../gwtservice/server/TDRStudioServlet.java | 4 +- .../server/TabularDataRowsXServlet.java | 4 +- .../server/encoding/EncodingPGSupported.java | 4 +- .../server/file/CSVFileUploadSession.java | 4 +- .../CodelistMappingFileUploadSession.java | 4 +- .../server/file/FileUploadListener.java | 4 +- .../td/gwtservice/server/file/FileUtil.java | 42 +- .../opexecution/OpExecution4AddColumn.java | 4 +- .../opexecution/OpExecution4CSVExport.java | 4 +- .../opexecution/OpExecution4CSVImport.java | 4 +- .../OpExecution4ChangeColumnType.java | 4 +- .../OpExecution4ChangeColumnsPosition.java | 4 +- .../OpExecution4ChangeTableType.java | 4 +- .../OpExecution4ChartTopRating.java | 4 +- .../server/opexecution/OpExecution4Clone.java | 4 +- .../OpExecution4CodelistMapping.java | 4 +- .../OpExecution4DataMinerOperation.java | 4 +- .../opexecution/OpExecution4DeleteColumn.java | 4 +- .../opexecution/OpExecution4DeleteRows.java | 4 +- .../OpExecution4Denormalization.java | 4 +- .../opexecution/OpExecution4Duplicates.java | 4 +- .../opexecution/OpExecution4EditRow.java | 4 +- .../OpExecution4ExtractCodelist.java | 4 +- .../opexecution/OpExecution4FilterColumn.java | 4 +- .../OpExecution4GeometryCreatePoint.java | 4 +- ...Execution4GeospatialCreateCoordinates.java | 4 +- ...pExecution4GeospatialDownscaleCSquare.java | 4 +- .../opexecution/OpExecution4GroupBy.java | 4 +- .../opexecution/OpExecution4JSONExport.java | 4 +- .../opexecution/OpExecution4LabelColumn.java | 4 +- .../opexecution/OpExecution4MapCreation.java | 4 +- .../opexecution/OpExecution4MergeColumn.java | 4 +- .../OpExecution4Normalization.java | 4 +- .../opexecution/OpExecution4ReplaceBatch.java | 4 +- .../OpExecution4ReplaceByExternal.java | 4 +- .../OpExecution4ReplaceColumn.java | 4 +- ...OpExecution4ReplaceColumnByExpression.java | 4 +- .../OpExecution4SDMXCodelistExport.java | 4 +- .../OpExecution4SDMXCodelistImport.java | 4 +- .../OpExecution4SDMXDatasetExport.java | 4 +- .../OpExecution4SDMXTemplateExport.java | 4 +- .../opexecution/OpExecution4SplitColumn.java | 4 +- .../OpExecution4StatisticalOperation.java | 4 +- .../OpExecution4TimeAggregation.java | 4 +- .../server/opexecution/OpExecution4Union.java | 4 +- .../opexecution/OpExecutionBuilder.java | 4 +- .../opexecution/OpExecutionDirector.java | 4 +- .../server/opexecution/OpExecutionSpec.java | 4 +- .../server/resource/ResourceTDCreator.java | 17 +- .../server/resource/ResourceTypeMap.java | 4 +- .../server/social/TDMNotifications.java | 159 +- .../server/storage/FilesStorage.java | 198 +- .../server/trservice/ColumnDataTypeMap.java | 4 +- .../server/trservice/ColumnMap.java | 4 +- .../server/trservice/ColumnTypeCodeMap.java | 2 +- .../server/trservice/ExpressionGenerator.java | 4 +- .../ExtractCodelistOperationMap.java | 4 +- .../server/trservice/ExtractReferences.java | 2 +- .../server/trservice/JobClassifierMap.java | 4 +- .../server/trservice/LicenceMap.java | 4 +- .../trservice/OperationDefinitionMap.java | 4 +- .../server/trservice/PeriodTypeMap.java | 4 +- .../server/trservice/QueryService.java | 327 +- .../server/trservice/TDTypeValueMap.java | 4 +- .../server/trservice/TRTasksManager.java | 4 +- .../trservice/TabularResourceTypeMap.java | 4 +- .../server/trservice/TaskStateMap.java | 4 +- .../gwtservice/server/trservice/ValueMap.java | 2 +- .../server/trservice/WorkerStateMap.java | 4 +- .../uriresolver/UriResolverTDClient.java | 4 +- .../server/util/ServiceCredentials.java | 4 +- .../user/td/gwtservice/shared/Constants.java | 4 +- .../gwtservice/shared/chart/ChartSession.java | 4 +- .../shared/chart/ChartTopRatingSession.java | 34 +- .../CodelistMappingSession.java | 4 +- .../shared/csv/AvailableCharsetList.java | 16 +- .../shared/csv/CSVExportSession.java | 4 +- .../td/gwtservice/shared/csv/CSVFileUtil.java | 4 +- .../shared/csv/CSVImportSession.java | 4 +- .../gwtservice/shared/csv/CSVImportState.java | 4 +- .../shared/csv/CSVParserConfiguration.java | 35 +- .../td/gwtservice/shared/csv/CSVRowError.java | 27 +- .../shared/csv/CheckCSVSession.java | 4 +- .../shared/document/CodelistDocument.java | 4 +- .../shared/document/DatasetDocument.java | 4 +- .../shared/document/SDMXDocument.java | 4 +- .../exception/TDGWTIsFinalException.java | 20 +- .../exception/TDGWTIsFlowException.java | 20 +- .../exception/TDGWTIsLockedException.java | 20 +- .../exception/TDGWTServiceException.java | 20 +- .../TDGWTSessionExpiredException.java | 20 +- .../extract/ExtractCodelistSession.java | 4 +- .../extract/ExtractCodelistTargetColumn.java | 2 +- .../shared/file/FileUploadMonitor.java | 26 +- .../shared/file/FileUploadState.java | 3 +- .../shared/file/HeaderPresence.java | 4 +- .../aggregate/TdAggregateFunction.java | 15 +- .../aggregate/TdBaseComboDataBean.java | 14 +- .../geometry/GeometryCreatePointSession.java | 19 +- .../GeospatialCreateCoordinatesSession.java | 29 +- .../GeospatialDownscaleCSquareSession.java | 27 +- .../gwtservice/shared/history/OpHistory.java | 2 +- .../shared/history/RollBackSession.java | 4 +- .../td/gwtservice/shared/i18n/InfoLocale.java | 4 +- .../shared/json/JSONExportSession.java | 4 +- .../shared/licenses/LicenceData.java | 4 +- .../shared/map/MapCreationSession.java | 48 +- .../monitor/BackgroundOperationMonitor.java | 61 +- .../BackgroundOperationMonitorCreator.java | 248 +- .../BackgroundOperationMonitorSession.java | 4 +- .../shared/monitor/CSVExportMonitor.java | 6 +- .../shared/monitor/CSVImportMonitor.java | 6 +- .../shared/monitor/OperationMonitor.java | 4 +- .../monitor/OperationMonitorCreator.java | 258 +- .../monitor/OperationMonitorSession.java | 4 +- .../shared/monitor/SDMXExportMonitor.java | 4 +- .../shared/monitor/SDMXImportMonitor.java | 4 +- .../shared/rule/AppliedRulesResponseData.java | 4 +- .../ApplyAndDetachColumnRulesSession.java | 24 +- .../shared/rule/ApplyTableRuleSession.java | 4 +- .../shared/rule/DetachColumnRulesSession.java | 4 +- .../shared/rule/DetachTableRulesSession.java | 4 +- .../rule/RuleColumnPlaceHolderDescriptor.java | 4 +- .../gwtservice/shared/rule/RuleScopeType.java | 8 +- .../rule/description/RuleDescriptionData.java | 4 +- .../rule/type/TDBaseColumnRuleType.java | 4 +- .../rule/type/TDDimensionColumnRuleType.java | 4 +- .../shared/rule/type/TDRuleColumnType.java | 4 +- .../shared/rule/type/TDRuleTableType.java | 4 +- .../shared/rule/type/TDRuleType.java | 4 +- .../shared/sdmx/SDMXExportSession.java | 4 +- .../shared/sdmx/SDMXImportSession.java | 4 +- .../sdmx/SDMXTemplateExportSession.java | 4 +- .../td/gwtservice/shared/share/Contacts.java | 12 +- .../td/gwtservice/shared/share/ShareRule.java | 4 +- .../shared/share/ShareTabResource.java | 6 +- .../shared/share/ShareTemplate.java | 4 +- .../gwtservice/shared/source/FileSource.java | 6 +- .../shared/source/SDMXRegistrySource.java | 21 +- .../td/gwtservice/shared/source/Source.java | 18 +- .../gwtservice/shared/source/SourceType.java | 19 +- .../gwtservice/shared/source/UrlSource.java | 19 +- .../shared/source/WorkspaceSource.java | 20 +- .../DataMinerOperationSession.java | 4 +- .../StatisticalOperationSession.java | 4 +- .../gwtservice/shared/task/InvocationS.java | 2 +- .../user/td/gwtservice/shared/task/JobS.java | 51 +- .../shared/task/JobSClassifier.java | 4 +- .../user/td/gwtservice/shared/task/State.java | 8 +- .../shared/task/TaskResubmitSession.java | 2 +- .../shared/task/TaskResumeSession.java | 4 +- .../user/td/gwtservice/shared/task/TaskS.java | 35 +- .../gwtservice/shared/task/TaskWrapper.java | 4 +- .../shared/task/ValidationsJobS.java | 4 +- .../shared/task/ValidationsTasksMetadata.java | 4 +- .../gwtservice/shared/task/WorkerState.java | 4 +- .../shared/template/TemplateApplySession.java | 4 +- .../shared/template/TemplateColumnData.java | 4 +- .../shared/template/TemplateData.java | 26 +- .../template/TemplateDeleteSession.java | 4 +- .../gwtservice/shared/tr/ConditionCode.java | 4 +- .../shared/tr/ConditionCodeMap.java | 20 +- .../td/gwtservice/shared/tr/DimensionRow.java | 4 +- .../td/gwtservice/shared/tr/RefColumn.java | 2 +- .../td/gwtservice/shared/tr/TabResource.java | 4 +- .../td/gwtservice/shared/tr/TableData.java | 51 +- .../shared/tr/batch/Occurrences.java | 4 +- ...currencesForReplaceBatchColumnSession.java | 4 +- .../tr/batch/ReplaceBatchColumnSession.java | 4 +- .../shared/tr/batch/ReplaceEntry.java | 49 +- .../shared/tr/batch/ShowOccurrencesType.java | 4 +- .../tr/clone/CloneTabularResourceSession.java | 4 +- .../shared/tr/column/AddColumnSession.java | 4 +- .../column/ChangeColumnsPositionSession.java | 4 +- .../shared/tr/column/DeleteColumnSession.java | 4 +- .../shared/tr/column/FilterColumnSession.java | 4 +- .../shared/tr/column/LabelColumnSession.java | 4 +- .../shared/tr/column/MergeColumnSession.java | 13 +- .../ReplaceColumnByExpressionSession.java | 4 +- .../tr/column/ReplaceColumnSession.java | 56 +- .../shared/tr/column/SplitColumnSession.java | 42 +- .../tr/column/mapping/ColumnMappingData.java | 31 +- .../tr/column/mapping/ColumnMappingList.java | 17 +- .../column/type/ChangeColumnTypeSession.java | 66 +- .../shared/tr/groupby/GroupBySession.java | 4 +- .../tr/groupby/TimeAggregationSession.java | 11 +- .../shared/tr/metadata/TRAgencyMetadata.java | 4 +- .../tr/metadata/TRDescriptionMetadata.java | 4 +- .../shared/tr/metadata/TRLicenceMetadata.java | 4 +- .../shared/tr/metadata/TRLocalizedText.java | 4 +- .../shared/tr/metadata/TRMetadata.java | 4 +- .../shared/tr/metadata/TRNameMetadata.java | 4 +- .../shared/tr/metadata/TRRightsMetadata.java | 4 +- .../tr/metadata/TRValidSinceMetadata.java | 4 +- .../tr/metadata/TRValidUntilMetadata.java | 4 +- .../normalization/DenormalizationSession.java | 33 +- .../normalization/NormalizationSession.java | 37 +- .../shared/tr/open/TDOpenSession.java | 4 +- .../tr/paging/CodelistPagingLoadConfig.java | 4 +- .../tr/paging/CodelistPagingLoadResult.java | 4 +- .../shared/tr/paging/OrderInfo.java | 4 +- .../ReplaceByExternalColumnsMapping.java | 11 +- .../ReplaceByExternalSession.java | 40 +- .../shared/tr/resources/InternalURITD.java | 12 +- .../tr/resources/RemoveResourceSession.java | 4 +- .../shared/tr/resources/ResourceTD.java | 14 +- .../tr/resources/ResourceTDDescriptor.java | 31 +- .../shared/tr/resources/ResourceTDType.java | 16 +- .../tr/resources/SaveResourceSession.java | 4 +- .../shared/tr/resources/StringResourceTD.java | 8 +- .../shared/tr/resources/TableResourceTD.java | 12 +- .../shared/tr/rows/DeleteRowsSession.java | 4 +- .../shared/tr/rows/DuplicatesSession.java | 4 +- .../shared/tr/rows/EditRowSession.java | 4 +- .../tr/table/ChangeTableTypeSession.java | 4 +- .../shared/tr/table/Validations.java | 43 +- .../metadata/TabDescriptionsMetadata.java | 4 +- .../tr/table/metadata/TabExportMetadata.java | 4 +- .../table/metadata/TabGenericMapMetadata.java | 4 +- .../tr/table/metadata/TabImportMetadata.java | 4 +- .../shared/tr/table/metadata/TabMetadata.java | 4 +- .../tr/table/metadata/TabNamesMetadata.java | 4 +- .../metadata/TabValidationsMetadata.java | 4 +- .../tr/table/metadata/TabVersionMetadata.java | 4 +- .../gwtservice/shared/tr/type/Agencies.java | 42 +- .../gwtservice/shared/tr/type/Codelist.java | 47 +- .../td/gwtservice/shared/tr/type/Dataset.java | 42 +- .../shared/tr/union/UnionColumnsMapping.java | 4 +- .../shared/tr/union/UnionSession.java | 4 +- .../uriresolver/UriResolverSession.java | 4 +- .../td/gwtservice/shared/user/UserInfo.java | 15 +- .../client/GwtTestTDGWTService.java | 4 +- .../td/gwtservice/client/TestMetadata.java | 4 +- .../td/gwtservice/client/TestService.java | 4 +- .../gwtservice/client/TestServiceColumn.java | 4 +- .../client/TestServiceOperations.java | 4 +- .../gwtservice/client/TestServiceTable.java | 4 +- 254 files changed, 4030 insertions(+), 6810 deletions(-) diff --git a/.classpath b/.classpath index 06579f5..c06f2b4 100644 --- a/.classpath +++ b/.classpath @@ -1,12 +1,12 @@ - + - + @@ -33,5 +33,5 @@ - + diff --git a/distro/changelog.xml b/distro/changelog.xml index b54ca2c..3a5cfce 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,4 +1,8 @@ + + Support Java 8 compatibility [ticket #8580] + Added DataMiner [issue #6548] diff --git a/pom.xml b/pom.xml index 07c28d8..1e8093f 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ 4.0.0 org.gcube.portlets.user tabular-data-gwt-service - 2.16.0-SNAPSHOT + 2.17.0-SNAPSHOT tabular-data-gwt-service tabular-data-gwt-service allows communication between the GUI and services @@ -40,6 +40,10 @@ distro config + + 1.7 + + 2.6.1 3.3.2 diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTService.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTService.java index adf4c44..3b554c5 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTService.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTService.java @@ -93,18 +93,9 @@ import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; * * Implements the basic interfaces for access to the service. * - *

- * Allows:   - *

    - *
  • Access to Tabular Resources
  • - *
  • Import of CSV file
  • - *
  • Import from SDMX Registry
  • - *
      - *

      - * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it * + * @author Giancarlo Panichi + * */ @RemoteServiceRelativePath("TDGWTService") public interface TDGWTService extends RemoteService { @@ -112,8 +103,9 @@ public interface TDGWTService extends RemoteService { /** * Get informations on the current user * - * @return + * @return User Info * @throws TDGWTServiceException + * Exception */ public UserInfo hello() throws TDGWTServiceException; @@ -121,7 +113,9 @@ public interface TDGWTService extends RemoteService { * Set locale on server * * @param infoLocale + * Info locale * @throws TDGWTServiceException + * exception */ public void setLocale(InfoLocale infoLocale) throws TDGWTServiceException; @@ -130,31 +124,44 @@ public interface TDGWTService extends RemoteService { * * @throws TDGWTServiceException */ + /** + * + * @return Pendings Tasks + * @throws TDGWTServiceException + * Exception + */ public Integer pendingTasksRetrieve() throws TDGWTServiceException; /** * Restore UI session * - * @return + * + * @param startTRId + * Start TR id + * @return Tabular Resource id * @throws TDGWTServiceException + * exception */ public TRId restoreUISession(TRId startTRId) throws TDGWTServiceException; /** * Resolve Uri * + * * @param uriResolverSession - * @return + * Uri resolver session + * @return Uri * @throws TDGWTServiceException + * Exception */ - public String getUriFromResolver(UriResolverSession uriResolverSession) - throws TDGWTServiceException; + public String getUriFromResolver(UriResolverSession uriResolverSession) throws TDGWTServiceException; /** * Get VRE Folder Id * * @return VRE Folder Id * @throws TDGWTServiceException + * Exception */ public String getVREFolderIdByScope() throws TDGWTServiceException; @@ -162,66 +169,72 @@ public interface TDGWTService extends RemoteService { /** * Get list of PeriodDataType * - * @return + * @return List of period data type * @throws TDGWTServiceException + * Exception */ - public ArrayList getPeriodDataTypes() - throws TDGWTServiceException; + public ArrayList getPeriodDataTypes() throws TDGWTServiceException; /** * Retrieves the hierarchical relationship for the specific period data type * * @param periodDataType - * @return + * Period data type + * @return List of period data type * @throws TDGWTServiceException + * Exception */ - public ArrayList getHierarchicalRelationshipForPeriodDataTypes( - PeriodDataType periodDataType) throws TDGWTServiceException; + public ArrayList getHierarchicalRelationshipForPeriodDataTypes(PeriodDataType periodDataType) + throws TDGWTServiceException; // ValueDataFormats /** * Retrieve ValueDataFormat for all ColumnDataType * - * @return + * @return Map * @throws TDGWTServiceException + * Exception */ - public HashMap> getValueDataFormatsMap() - throws TDGWTServiceException; + public HashMap> getValueDataFormatsMap() throws TDGWTServiceException; /** * Retrieve ValueDataFormat for specific ColumnDataType * * @param columnDataType - * @return + * Column data type + * @return List of value data format * @throws TDGWTServiceException + * Exception */ - public ArrayList getValueDataFormatsOfColumnDataType( - ColumnDataType columnDataType) throws TDGWTServiceException; + public ArrayList getValueDataFormatsOfColumnDataType(ColumnDataType columnDataType) + throws TDGWTServiceException; // TabularResource /** * Get current TRId * - * @return + * @return TR id * @throws TDGWTServiceException + * Exception */ public TRId getCurrentTRId() throws TDGWTServiceException; /** * Get information on the current tabular resource don't call service * - * @return + * @return Tabular resource * @throws TDGWTServiceException + * Exception */ - public TabResource getInSessionTabResourceInfo() - throws TDGWTServiceException; + public TabResource getInSessionTabResourceInfo() throws TDGWTServiceException; /** * Get informations on the current tabular resource call service * * - * @return + * @return Tabular resource * @throws TDGWTServiceException + * Exception */ public TabResource getTabResourceInformation() throws TDGWTServiceException; @@ -229,71 +242,84 @@ public interface TDGWTService extends RemoteService { * Set tabular resource information * * @param tabResource + * Tabular resource * @throws TDGWTServiceException + * Exception */ - public void setTabResourceInformation(TabResource tabResource) - throws TDGWTServiceException; + public void setTabResourceInformation(TabResource tabResource) throws TDGWTServiceException; /** * Set tabular resource to final * * @param trId + * Tabular Resource id * @throws TDGWTServiceException + * Exception */ public void setTabResourceToFinal(TRId trId) throws TDGWTServiceException; /** * Get informations on tabular resource * - * @return + * @param trId + * TR id + * @return Tabular resource * @throws TDGWTServiceException + * Exception */ - public TabResource getTabResourceInformation(TRId trId) - throws TDGWTServiceException; + public TabResource getTabResourceInformation(TRId trId) throws TDGWTServiceException; /** * Return true if is a valid tabular resource * * @param trId - * @return + * Tabular Resouce id + * @return True if is valid * @throws TDGWTServiceException + * Exception */ - public Boolean isTabularResourceValid(TRId trId) - throws TDGWTServiceException; + public Boolean isTabularResourceValid(TRId trId) throws TDGWTServiceException; /** * Get creation date on tabular resource * - * @return + * @param trId + * TR id + * @return TR id * @throws TDGWTServiceException + * Exception */ public String getTRCreationDate(TRId trId) throws TDGWTServiceException; /** * Set current tabular resource * - * @param tr + * @param tabResource + * Tabular Resource * @throws TDGWTServiceException + * Exception */ - public void setTabResource(TabResource tabResource) - throws TDGWTServiceException; + public void setTabResource(TabResource tabResource) throws TDGWTServiceException; /** * Creates a TabResource on Service * * @param tabResource - * @return + * Tabular Resource + * @return Tabukar Resource * @throws TDGWTServiceException + * Exception */ - public TabResource createTabularResource(TabResource tabResource) - throws TDGWTServiceException; + public TabResource createTabularResource(TabResource tabResource) throws TDGWTServiceException; /** * Return Last Table * * @param trId - * @return + * TR id + * @return Table data * @throws TDGWTServiceException + * Exception */ public TableData getLastTable(TRId trId) throws TDGWTServiceException; @@ -301,8 +327,10 @@ public interface TDGWTService extends RemoteService { * Return Table * * @param trId - * @return + * TR id + * @return Table data * @throws TDGWTServiceException + * Exception */ public TableData getTable(TRId trId) throws TDGWTServiceException; @@ -310,37 +338,41 @@ public interface TDGWTService extends RemoteService { * Return Metadata of Table * * @param trId - * @return + * TR id + * @return List of tabular metadata * @throws TDGWTServiceException + * Exception */ - public ArrayList getTableMetadata(TRId trId) - throws TDGWTServiceException; + public ArrayList getTableMetadata(TRId trId) throws TDGWTServiceException; /** * Return Metadata of Tabular Resources * * @param trId - * @return + * TR id + * @return List of tabular resource meta data * @throws TDGWTServiceException + * Exception */ - public ArrayList getTRMetadata(TRId trId) - throws TDGWTServiceException; + public ArrayList getTRMetadata(TRId trId) throws TDGWTServiceException; /** * Retreive a ColumnData that is a connection to external table * * @param refColumn - * @return + * Reference column + * @return Column data * @throws TDGWTServiceException + * Exception */ - public ColumnData getConnection(RefColumn refColumn) - throws TDGWTServiceException; + public ColumnData getConnection(RefColumn refColumn) throws TDGWTServiceException; /** * Close All Tabular Resources * * * @throws TDGWTServiceException + * Exception */ public void closeAllTabularResources() throws TDGWTServiceException; @@ -348,123 +380,142 @@ public interface TDGWTService extends RemoteService { * Close Tabular Resource with TRId equals to closeTRId and open if not null * that with TRId equals to openTRId * + * * @param openTRId + * Open TR id + * @param closeTRId + * Close TR id * @throws TDGWTServiceException + * Exception */ - public void closeTabularResourceAndOpen(TRId openTRId, TRId closeTRId) - throws TDGWTServiceException; + public void closeTabularResourceAndOpen(TRId openTRId, TRId closeTRId) throws TDGWTServiceException; /** * Close Tabular Resource with TRId equals to closeTRId * * @param closeTRId + * Close TR id * @throws TDGWTServiceException + * Exception */ - public void closeTabularResource(TRId closeTRId) - throws TDGWTServiceException; + public void closeTabularResource(TRId closeTRId) throws TDGWTServiceException; /** * Set Current Tabular Resource that passed as parameter if not null * * @param activeTRId - * @return + * Active TR id + * @return TR id * @throws TDGWTServiceException + * Exception */ - public TRId setActiveTabularResource(TRId activeTRId) - throws TDGWTServiceException; + public TRId setActiveTabularResource(TRId activeTRId) throws TDGWTServiceException; // Task /** * Resubmit task * * @param taskResubmitSession - * @return + * Session + * @return Task * @throws TDGWTServiceException + * Exception */ - public String startTaskResubmit(TaskResubmitSession taskResubmitSession) - throws TDGWTServiceException; + public String startTaskResubmit(TaskResubmitSession taskResubmitSession) throws TDGWTServiceException; /** * Resume task * * @param taskResumeSession - * @return + * Session + * @return Task * @throws TDGWTServiceException + * Exception */ - public String startTaskResume(TaskResumeSession taskResumeSession) - throws TDGWTServiceException; + public String startTaskResume(TaskResumeSession taskResumeSession) throws TDGWTServiceException; // Validations /** * Returns validations contained in the tasks * * @param trId - * @return + * TR id + * @return Validations * @throws TDGWTServiceException + * Exception */ - public ValidationsTasksMetadata getValidationsTasksMetadata(TRId trId) - throws TDGWTServiceException; + public ValidationsTasksMetadata getValidationsTasksMetadata(TRId trId) throws TDGWTServiceException; /** * Return Validations Metadata of Table * * @param trId - * @return + * TR id + * @return Validations meta data * @throws TDGWTServiceException + * Exception */ - public TabValidationsMetadata getTableValidationsMetadata(TRId trId) - throws TDGWTServiceException; + public TabValidationsMetadata getTableValidationsMetadata(TRId trId) throws TDGWTServiceException; /** - * Returns ArrayList that contains all the validation columns of - * columnName + * Returns ArrayList of ColumnData that contains all the validation columns + * of columnName * * @param trId + * TR id * @param columnName - * @return + * Column name + * @return List of column data * @throws TDGWTServiceException + * Exception */ - public ArrayList getValidationColumns(TRId trId, - String columnName) throws TDGWTServiceException; + public ArrayList getValidationColumns(TRId trId, String columnName) throws TDGWTServiceException; /** - * Returns ArrayList that contains all the validation columns of - * columnLocalId + * Returns ArrayListof ColumnData that contains all the validation columns + * of columnLocalId * * @param columnLocalId + * Column local id * @param trId - * @return + * TR id + * @return List of column data * @throws TDGWTServiceException + * Exception */ - public ArrayList getValidationColumns(String columnLocalId, - TRId trId) throws TDGWTServiceException; + public ArrayList getValidationColumns(String columnLocalId, TRId trId) throws TDGWTServiceException; /** * Remove Validations from tabular resource * * @param trId - * @return + * TR id + * @return Deleted * @throws TDGWTServiceException + * Exception */ - public String startValidationsDelete(TRId trId) - throws TDGWTServiceException; + public String startValidationsDelete(TRId trId) throws TDGWTServiceException; // RollBack /** * Call rollback on tabular resource * * @param rollBackSession + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startRollBack(RollBackSession rollBackSession) - throws TDGWTServiceException; + public String startRollBack(RollBackSession rollBackSession) throws TDGWTServiceException; /** * Call discard operation on tabular resource * * @param trId - * @return + * TR id + * @return Operation * @throws TDGWTServiceException + * Exception */ public String startDiscard(TRId trId) throws TDGWTServiceException; @@ -473,28 +524,30 @@ public interface TDGWTService extends RemoteService { * Share tabular resource * * @param shareInfo - * @return + * Share info * @throws TDGWTServiceException + * Exception */ - public void setShare(ShareTabResource shareInfo) - throws TDGWTServiceException; + public void setShare(ShareTabResource shareInfo) throws TDGWTServiceException; /** * Share template * + * * @param shareTemplate - * @return + * Share template * @throws TDGWTServiceException + * Exception */ - public void setShareTemplate(ShareTemplate shareTemplate) - throws TDGWTServiceException; + public void setShareTemplate(ShareTemplate shareTemplate) throws TDGWTServiceException; /** * Share Rule * * @param shareRule - * @return + * Share rule * @throws TDGWTServiceException + * Exception */ public void setShareRule(ShareRule shareRule) throws TDGWTServiceException; @@ -503,38 +556,42 @@ public interface TDGWTService extends RemoteService { /** * Return all tabular resource of a user * - * @return + * + * @return List of tabular resource * @throws TDGWTServiceException + * Exception */ - public ArrayList getTabularResources() - throws TDGWTServiceException; + public ArrayList getTabularResources() throws TDGWTServiceException; /** * Return all tabular resource of a user and last tables * - * @return + * @return List of Tabular Resource * @throws TDGWTServiceException + * Exception */ - public ArrayList getTabularResourcesAndLastTables() - throws TDGWTServiceException; + public ArrayList getTabularResourcesAndLastTables() throws TDGWTServiceException; // Clone /** * Start clone tabular resource * * @param cloneTabularResourceSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startCloneTabularResource( - CloneTabularResourceSession cloneTabularResourceSession) + public String startCloneTabularResource(CloneTabularResourceSession cloneTabularResourceSession) throws TDGWTServiceException; // /** * Initialize Codelists Paging Loader * + * * @throws TDGWTServiceException + * Exception */ public void setCodelistsPagingLoader() throws TDGWTServiceException; @@ -542,59 +599,69 @@ public interface TDGWTService extends RemoteService { * Retrieves a portion of Codelists * * @param codelistPagingLoadConfig - * @return + * Paging loading config + * @return Page result * @throws TDGWTServiceException + * Exception */ - public CodelistPagingLoadResult getCodelistsPagingLoader( - CodelistPagingLoadConfig codelistPagingLoadConfig) + public CodelistPagingLoadResult getCodelistsPagingLoader(CodelistPagingLoadConfig codelistPagingLoadConfig) throws TDGWTServiceException;; /** * Set open session for return all tabular resource of a user * - * @param s + * + * @param tdOpenSession + * Session * @throws TDGWTServiceException + * Exception */ - public void tdOpen(TDOpenSession tdOpenSession) - throws TDGWTServiceException; + public void tdOpen(TDOpenSession tdOpenSession) throws TDGWTServiceException; /** * Retrieve Time Table Id * + * * @param periodDataType - * @return + * Period data type + * @return Table id * @throws TDGWTServiceException + * Exception */ - public Long getTimeTableId(PeriodDataType periodDataType) - throws TDGWTServiceException; + public Long getTimeTableId(PeriodDataType periodDataType) throws TDGWTServiceException; /** * Retrieves the list of columns in the current table * - * @return + * + * @return List of column data * @throws TDGWTServiceException + * Excption */ public ArrayList getColumns() throws TDGWTServiceException; /** * Retrieves the list of columns in the table provided by trId * - * @return + * @param trId + * TR id + * @return List of Column data * @throws TDGWTServiceException + * Exception */ - public ArrayList getColumns(TRId trId) - throws TDGWTServiceException; + public ArrayList getColumns(TRId trId) throws TDGWTServiceException; /** * Retrieves the list of columns in the table provided by trId view columns * included * * @param trId - * @return + * TR id + * @return List of column data * @throws TDGWTServiceException + * Exception */ - public ArrayList getColumnWithViewColumnIncluded(TRId trId) - throws TDGWTServiceException; + public ArrayList getColumnWithViewColumnIncluded(TRId trId) throws TDGWTServiceException; /** * Retrieves the list of columns in the table provided by trId only view @@ -603,56 +670,71 @@ public interface TDGWTService extends RemoteService { * * * @param trId - * @return + * TR id + * @return List of column data * @throws TDGWTServiceException + * Exception */ - public ArrayList getColumnWithOnlyViewColumnInRel(TRId trId) - throws TDGWTServiceException; + public ArrayList getColumnWithOnlyViewColumnInRel(TRId trId) throws TDGWTServiceException; /** * Retrieves the list of columns in the table provided by trId for * statistical * * @param trId - * @return + * TR id + * @return List of column data * @throws TDGWTServiceException + * Exception */ - public ArrayList getColumnsForStatistical(TRId trId) - throws TDGWTServiceException; + public ArrayList getColumnsForStatistical(TRId trId) throws TDGWTServiceException; /** * Retrieves the list of columns in the table provided by trId only CODE and * CODENAME types * - * @return + * @param trId + * TR id + * @return List of column data * @throws TDGWTServiceException + * Exception */ - public ArrayList getColumnsForDimension(TRId trId) - throws TDGWTServiceException; + public ArrayList getColumnsForDimension(TRId trId) throws TDGWTServiceException; /** * Retrieves information about a specific column of specific table * - * @return + * @param trId + * TR id + * @param columnName + * Column name + * @return Column data * @throws TDGWTServiceException + * Exception */ - public ColumnData getColumn(TRId trId, String columnName) - throws TDGWTServiceException; + public ColumnData getColumn(TRId trId, String columnName) throws TDGWTServiceException; /** * Retrieves information about a specific column of specific table * - * @return + * + * @param columnLocalId + * Column Local Id + * @param trId + * TR id + * @return Column data * @throws TDGWTServiceException + * Exception */ - public ColumnData getColumn(String columnLocalId, TRId trId) - throws TDGWTServiceException; + public ColumnData getColumn(String columnLocalId, TRId trId) throws TDGWTServiceException; /** * Remove Tabular Resource From Service * * @param trId + * TR id * @throws TDGWTServiceException + * Exception */ public void removeTabularResource(TRId trId) throws TDGWTServiceException; @@ -661,133 +743,150 @@ public interface TDGWTService extends RemoteService { /** * Get Codelist on a registry * - * @return + * @return List of codelist * @throws TDGWTServiceException + * Exception */ public ArrayList getCodelists() throws TDGWTServiceException; /** * Get Datasets on a registry * - * @return + * @return List of dataset * @throws TDGWTServiceException + * Exception */ public ArrayList getDatasets() throws TDGWTServiceException; /** * Get Agecies on a registry * - * @return + * @return List of Agencies * @throws TDGWTServiceException + * Exception */ public ArrayList getAgencies() throws TDGWTServiceException; /** * Set SDMX Registry Source * - * @param s + * + * @param sdmxRegistrySource + * SDMX registry source * @throws TDGWTServiceException + * Exception */ - public void setSDMXRegistrySource(SDMXRegistrySource sdmxRegistrySource) - throws TDGWTServiceException; + public void setSDMXRegistrySource(SDMXRegistrySource sdmxRegistrySource) throws TDGWTServiceException; // Import SDMX /** * Start SDMX Import and invokes the client library * * @param sdmxImportSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startSDMXImport(SDMXImportSession sdmxImportSession) - throws TDGWTServiceException; + public String startSDMXImport(SDMXImportSession sdmxImportSession) throws TDGWTServiceException; // CSV Import /** * - * @param s + * @param csvImportSession + * Session * @throws TDGWTServiceException + * Exception */ - public void setCSVSession(CSVImportSession csvImportSession) - throws TDGWTServiceException; + public void setCSVSession(CSVImportSession csvImportSession) throws TDGWTServiceException; /** * - * @param s + * @param csvImportSession + * Session * @throws TDGWTServiceException + * Exception */ - public void getFileFromWorkspace(CSVImportSession csvImportSession) - throws TDGWTServiceException; + public void getFileFromWorkspace(CSVImportSession csvImportSession) throws TDGWTServiceException; /** * - * @return + * @return Available charset list * @throws TDGWTServiceException + * Exception */ - public AvailableCharsetList getAvailableCharset() - throws TDGWTServiceException; + public AvailableCharsetList getAvailableCharset() throws TDGWTServiceException; /** * * @param encoding + * Encoding * @param headerPresence + * Header presence * @param delimiter + * Delimiter * @param comment - * @return + * Comment + * @return List of configuration * @throws TDGWTServiceException + * Exception */ - public ArrayList configureCSVParser(String encoding, - HeaderPresence headerPresence, char delimiter, char comment) - throws TDGWTServiceException; + public ArrayList configureCSVParser(String encoding, HeaderPresence headerPresence, char delimiter, + char comment) throws TDGWTServiceException; /** * * @param errorsLimit - * @return + * Error limit + * @return Session * @throws TDGWTServiceException + * Exception */ - public CheckCSVSession checkCSV(long errorsLimit) - throws TDGWTServiceException; + public CheckCSVSession checkCSV(long errorsLimit) throws TDGWTServiceException; /** * Start CSV Import and invokes the client library * - * @param s + * @param csvImportSession + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startCSVImport(CSVImportSession csvImportSession) - throws TDGWTServiceException; + public String startCSVImport(CSVImportSession csvImportSession) throws TDGWTServiceException; // Export CSV /** * Available charset for export * - * @return + * @return Available charset list * @throws TDGWTServiceException + * Exception */ - public AvailableCharsetList getAvailableCharsetForExport() - throws TDGWTServiceException; + public AvailableCharsetList getAvailableCharsetForExport() throws TDGWTServiceException; /** * Start CSV Export and invokes the client library * * @param csvExportSession - * @return + * Sesion + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startCSVExport(CSVExportSession csvExportSession) - throws TDGWTServiceException; + public String startCSVExport(CSVExportSession csvExportSession) throws TDGWTServiceException; // Export SDMX /** * Start SDMX Export and invokes the client library * * @param exportSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startSDMXExport(SDMXExportSession exportSession) - throws TDGWTServiceException; + public String startSDMXExport(SDMXExportSession exportSession) throws TDGWTServiceException; // Export Template SDMX /** @@ -795,24 +894,25 @@ public interface TDGWTService extends RemoteService { * Start SDMX Template Export and invokes the client library * * @param sdmxTemplateExportSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startSDMXTemplateExport( - SDMXTemplateExportSession sdmxTemplateExportSession) + public String startSDMXTemplateExport(SDMXTemplateExportSession sdmxTemplateExportSession) throws TDGWTServiceException; - // Export JSON /** * Start JSON Export and invokes the client library * * @param jsonExportSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startJSONExport(JSONExportSession jsonExportSession) - throws TDGWTServiceException; + public String startJSONExport(JSONExportSession jsonExportSession) throws TDGWTServiceException; // Table Operations @@ -820,53 +920,57 @@ public interface TDGWTService extends RemoteService { * Start change table type * * @param changeTableTypeSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startChangeTableType( - ChangeTableTypeSession changeTableTypeSession) - throws TDGWTServiceException; + public String startChangeTableType(ChangeTableTypeSession changeTableTypeSession) throws TDGWTServiceException; /** * Start Union and invokes the client library * * @param unionSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startUnion(UnionSession unionSession) - throws TDGWTServiceException; + public String startUnion(UnionSession unionSession) throws TDGWTServiceException; // Rows Operations /** * Start edit row or add row * * @param editRowSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startEditRow(EditRowSession editRowSession) - throws TDGWTServiceException; + public String startEditRow(EditRowSession editRowSession) throws TDGWTServiceException; /** * Start delete rows * * @param deleteRowsSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startDeleteRows(DeleteRowsSession deleteRowsSession) - throws TDGWTServiceException; + public String startDeleteRows(DeleteRowsSession deleteRowsSession) throws TDGWTServiceException; /** * Start operation on duplicates * * @param duplicatesSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startDuplicates(DuplicatesSession duplicatesSession) - throws TDGWTServiceException; + public String startDuplicates(DuplicatesSession duplicatesSession) throws TDGWTServiceException; // Column Operation @@ -875,53 +979,56 @@ public interface TDGWTService extends RemoteService { * * * @param changeColumnTypeSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startChangeColumnType( - ChangeColumnTypeSession changeColumnTypeSession) - throws TDGWTServiceException; + public String startChangeColumnType(ChangeColumnTypeSession changeColumnTypeSession) throws TDGWTServiceException; /** * Start add column * * @param addColumnSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startAddColumn(AddColumnSession addColumnSession) - throws TDGWTServiceException; + public String startAddColumn(AddColumnSession addColumnSession) throws TDGWTServiceException; /** * Start delete column * * @param deleteColumnSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startDeleteColumn(DeleteColumnSession deleteColumnSession) - throws TDGWTServiceException; + public String startDeleteColumn(DeleteColumnSession deleteColumnSession) throws TDGWTServiceException; /** * Start change the column label * * @param labelColumnSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Excetpion */ - public String startLabelColumn(LabelColumnSession labelColumnSession) - throws TDGWTServiceException; + public String startLabelColumn(LabelColumnSession labelColumnSession) throws TDGWTServiceException; /** * Start change columns position * * * @param changeColumnsPositionSession - * @return + * Session * @throws TDGWTServiceException + * Exeption */ - public void startChangeColumnsPosition( - ChangeColumnsPositionSession changeColumnsPositionSession) + public void startChangeColumnsPosition(ChangeColumnsPositionSession changeColumnsPositionSession) throws TDGWTServiceException; /** @@ -960,8 +1067,11 @@ public interface TDGWTService extends RemoteService { * * * @param occurrencesForReplaceBatchColumnSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception + * */ public ArrayList getOccurrencesForBatchReplace( OccurrencesForReplaceBatchColumnSession occurrencesForReplaceBatchColumnSession) @@ -971,11 +1081,12 @@ public interface TDGWTService extends RemoteService { * Start batch replace on column * * @param replaceBatchColumnSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startReplaceBatchColumn( - ReplaceBatchColumnSession replaceBatchColumnSession) + public String startReplaceBatchColumn(ReplaceBatchColumnSession replaceBatchColumnSession) throws TDGWTServiceException; // Replace Operation @@ -983,21 +1094,23 @@ public interface TDGWTService extends RemoteService { * Start replace the column value * * @param replaceColumnSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startReplaceColumn(ReplaceColumnSession replaceColumnSession) - throws TDGWTServiceException; + public String startReplaceColumn(ReplaceColumnSession replaceColumnSession) throws TDGWTServiceException; /** * Start replace column by external tabular resource * * @param replaceByExternalSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startReplaceByExternal( - ReplaceByExternalSession replaceByExternalSession) + public String startReplaceByExternal(ReplaceByExternalSession replaceByExternalSession) throws TDGWTServiceException; // Templates @@ -1005,60 +1118,64 @@ public interface TDGWTService extends RemoteService { * Retrieves templates of user * * - * @return + * @return List of template data * @throws TDGWTServiceException + * Exception */ public ArrayList getTemplates() throws TDGWTServiceException; /** * - * Retrieves templates for export as DSD in SDMX registry. - * Template must have at least a measure column. + * Retrieves templates for export as DSD in SDMX registry. Template must + * have at least a measure column. * - * @return + * @return List of template data * @throws TDGWTServiceException + * Exception */ - public ArrayList getTemplatesForDSDExport() - throws TDGWTServiceException; + public ArrayList getTemplatesForDSDExport() throws TDGWTServiceException; - /** * - * Retrieves the columns of the specific template. - * Template must have at least a measure column. + * Retrieves the columns of the specific template. Template must have at + * least a measure column. * - * @return + * @param templateId + * Template id + * @return List of template column data * @throws TDGWTServiceException + * Exception */ - public ArrayList getTemplateColumnsData(String templateId) - throws TDGWTServiceException; + public ArrayList getTemplateColumnsData(String templateId) throws TDGWTServiceException; - /** * Start Apply Template * * @param templateApplySession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startTemplateApply(TemplateApplySession templateApplySession) - throws TDGWTServiceException; + public String startTemplateApply(TemplateApplySession templateApplySession) throws TDGWTServiceException; /** * Start Delete Template * * @param templateDeleteSession + * Session * @throws TDGWTServiceException + * Exception */ - public void templateDelete(TemplateDeleteSession templateDeleteSession) - throws TDGWTServiceException; + public void templateDelete(TemplateDeleteSession templateDeleteSession) throws TDGWTServiceException; // Locales /** * Retrieve locales supported * - * @return + * @return List of locale * @throws TDGWTServiceException + * Exception */ public ArrayList getLocales() throws TDGWTServiceException; @@ -1066,8 +1183,9 @@ public interface TDGWTService extends RemoteService { /** * Retrieve licences supported * - * @return + * @return List of licences * @throws TDGWTServiceException + * Exception */ public ArrayList getLicences() throws TDGWTServiceException; @@ -1075,8 +1193,9 @@ public interface TDGWTService extends RemoteService { /** * Retrieve History * - * @return + * @return Operation history * @throws TDGWTServiceException + * Exception */ public ArrayList getHistory() throws TDGWTServiceException; @@ -1084,27 +1203,31 @@ public interface TDGWTService extends RemoteService { * Retrieve History for specific tabular resource * * @param trId - * @return + * TR id + * @return Operation history * @throws TDGWTServiceException + * Exception */ - public ArrayList getHistory(TRId trId) - throws TDGWTServiceException; + public ArrayList getHistory(TRId trId) throws TDGWTServiceException; /** * - * @return + * + * @return Operation history * @throws TDGWTServiceException + * Exception */ public OpHistory getLastOperationInfo() throws TDGWTServiceException; /** * * @param trId - * @return + * TR id + * @return Operation history * @throws TDGWTServiceException + * Exception */ - public OpHistory getLastOperationInfo(TRId trId) - throws TDGWTServiceException; + public OpHistory getLastOperationInfo(TRId trId) throws TDGWTServiceException; // Helper Extract Codelist /** @@ -1112,53 +1235,56 @@ public interface TDGWTService extends RemoteService { * * * @param extractCodelistSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startExtractCodelist( - ExtractCodelistSession extractCodelistSession) - throws TDGWTServiceException; + public String startExtractCodelist(ExtractCodelistSession extractCodelistSession) throws TDGWTServiceException; // Helper Codelist Mapping Import /** * * @param codelistMappingSession + * Session * @throws TDGWTServiceException + * Exception */ - public void setCodelistMappingSession( - CodelistMappingSession codelistMappingSession) - throws TDGWTServiceException; + public void setCodelistMappingSession(CodelistMappingSession codelistMappingSession) throws TDGWTServiceException; /** * * @param codelistMappingSession + * Session * @throws TDGWTServiceException + * Exception */ - public void getFileFromWorkspace( - CodelistMappingSession codelistMappingSession) - throws TDGWTServiceException; + public void getFileFromWorkspace(CodelistMappingSession codelistMappingSession) throws TDGWTServiceException; /** * Start Codelist Mapping Import * * @param codelistMappingSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startCodelistMappingImport( - CodelistMappingSession codelistMappingSession) + public String startCodelistMappingImport(CodelistMappingSession codelistMappingSession) throws TDGWTServiceException; // Normalization /** * Start Normalization and invokes the client library * + * * @param normalizationSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startNormalization(NormalizationSession normalizationSession) - throws TDGWTServiceException; + public String startNormalization(NormalizationSession normalizationSession) throws TDGWTServiceException; // Denormalization /** @@ -1166,117 +1292,130 @@ public interface TDGWTService extends RemoteService { * * * @param denormalizationSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startDenormalization( - DenormalizationSession denormalizationSession) - throws TDGWTServiceException; + public String startDenormalization(DenormalizationSession denormalizationSession) throws TDGWTServiceException; // Operation Monitor /** * Get Operation Monitor * - * @return + * + * @param operationMonitorSession + * Session + * @return Operation Monitor * @throws TDGWTServiceException + * Exception */ - public OperationMonitor getOperationMonitor( - OperationMonitorSession operationMonitorSession) + public OperationMonitor getOperationMonitor(OperationMonitorSession operationMonitorSession) throws TDGWTServiceException; /** * Get List of Background Operation Monitor * * @param backgroundOperationMonitorSession - * @return + * Session + * @return List of Operation Monitor * @throws TDGWTServiceException + * Exception */ public ArrayList getBackgroundOperationMonitor( - BackgroundOperationMonitorSession backgroundOperationMonitorSession) - throws TDGWTServiceException; + BackgroundOperationMonitorSession backgroundOperationMonitorSession) throws TDGWTServiceException; /** * * Retrieve Background Operation Monitor for specific task * * @param operationMonitorSession - * @return + * Session + * @return Operation monitor * @throws TDGWTServiceException + * Exception */ public OperationMonitor getBackgroundOperationMonitorForSpecificTask( - OperationMonitorSession operationMonitorSession) - throws TDGWTServiceException; + OperationMonitorSession operationMonitorSession) throws TDGWTServiceException; // File Upload Monitor /** * Get File Upload Monitor during the file upload operation in Import CSV * - * @return + * @return File uploader monitor * @throws TDGWTServiceException + * Exception */ - public FileUploadMonitor getFileUploadMonitor() - throws TDGWTServiceException; + public FileUploadMonitor getFileUploadMonitor() throws TDGWTServiceException; // Resources TD /** * Retrieves the resources of a specific tabular resource * * @param trId - * @return + * TR id + * @return List of Resource TD description * @throws TDGWTServiceException + * Exception */ - public ArrayList getResourcesTD(TRId trId) - throws TDGWTServiceException; + public ArrayList getResourcesTD(TRId trId) throws TDGWTServiceException; /** * Retrieves the resources of a specific tabular resource by type * * @param trId + * TR id * @param resourceTDType - * @return + * Resource TD type + * @return List of Resource TD descriptor * @throws TDGWTServiceException + * Exception */ - public ArrayList getResourcesTDByType(TRId trId, - ResourceTDType resourceTDType) throws TDGWTServiceException; + public ArrayList getResourcesTDByType(TRId trId, ResourceTDType resourceTDType) + throws TDGWTServiceException; /** * Remove resource * * @param removeResourceSession + * Session * @throws TDGWTServiceException + * Exception */ - public void removeResource(RemoveResourceSession removeResourceSession) - throws TDGWTServiceException; + public void removeResource(RemoveResourceSession removeResourceSession) throws TDGWTServiceException; /** * Save resource on Workspace * * @param saveResourceSession + * Session * @throws TDGWTServiceException + * Exception */ - public void saveResource(SaveResourceSession saveResourceSession) - throws TDGWTServiceException; + public void saveResource(SaveResourceSession saveResourceSession) throws TDGWTServiceException; // GIS MAP /** * Start Map Creation and invokes the client library * * @param mapCreationSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startMapCreation(MapCreationSession mapCreationSession) - throws TDGWTServiceException; + public String startMapCreation(MapCreationSession mapCreationSession) throws TDGWTServiceException; // DataMiner /** * * @param dataMinerOperationSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startDataMinerOperation( - DataMinerOperationSession dataMinerOperationSession) + public String startDataMinerOperation(DataMinerOperationSession dataMinerOperationSession) throws TDGWTServiceException; // Chart @@ -1284,35 +1423,37 @@ public interface TDGWTService extends RemoteService { * Start Chart Top Rating Creation and invokes the client library * * @param chartTopRatingSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startChartTopRating( - ChartTopRatingSession chartTopRatingSession) - throws TDGWTServiceException; + public String startChartTopRating(ChartTopRatingSession chartTopRatingSession) throws TDGWTServiceException; // Geospatial /** * Start Geospatial Coordinates Creation * * @param geospatialCreateCoordinatesSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ public String startGeospatialCreateCoordinates( - GeospatialCreateCoordinatesSession geospatialCreateCoordinatesSession) - throws TDGWTServiceException; + GeospatialCreateCoordinatesSession geospatialCreateCoordinatesSession) throws TDGWTServiceException; /** * Start Downscale C-Square * * * @param geospatialDownscaleCSquareSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startGeospatialDownscaleCSquare( - GeospatialDownscaleCSquareSession geospatialDownscaleCSquareSession) + public String startGeospatialDownscaleCSquare(GeospatialDownscaleCSquareSession geospatialDownscaleCSquareSession) throws TDGWTServiceException; // Geometry @@ -1320,13 +1461,12 @@ public interface TDGWTService extends RemoteService { * Point Creation * * @param geometryCreatePointSession - * @return + * Session + * @return Operation * @throws TDGWTServiceException + * Exception */ - public String startGeometryCreatePoint( - GeometryCreatePointSession geometryCreatePointSession) + public String startGeometryCreatePoint(GeometryCreatePointSession geometryCreatePointSession) throws TDGWTServiceException; - - } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTServiceAsync.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTServiceAsync.java index 1c3abf0..6be95ee 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTServiceAsync.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/client/rpc/TDGWTServiceAsync.java @@ -90,8 +90,8 @@ import com.google.gwt.user.client.rpc.AsyncCallback; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/CSVImportFileServlet.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/CSVImportFileServlet.java index b138767..48115ee 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/CSVImportFileServlet.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/CSVImportFileServlet.java @@ -26,8 +26,8 @@ import org.slf4j.LoggerFactory; /** * Returns a representation of the csv file in JSON * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CSVImportFileServlet extends HttpServlet { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/CodelistMappingUploadServlet.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/CodelistMappingUploadServlet.java index bb135d9..86a7a83 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/CodelistMappingUploadServlet.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/CodelistMappingUploadServlet.java @@ -34,8 +34,8 @@ import com.allen_sauer.gwt.log.client.Log; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodelistMappingUploadServlet extends HttpServlet { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/LocalUploadServlet.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/LocalUploadServlet.java index a8138ee..6826eb6 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/LocalUploadServlet.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/LocalUploadServlet.java @@ -34,8 +34,8 @@ import com.allen_sauer.gwt.log.client.Log; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class LocalUploadServlet extends HttpServlet { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/RetrieveChartFileServlet.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/RetrieveChartFileServlet.java index 1aeabe8..ac82142 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/RetrieveChartFileServlet.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/RetrieveChartFileServlet.java @@ -23,8 +23,8 @@ import org.slf4j.LoggerFactory; /** * Returns a chart file from storage * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class RetrieveChartFileServlet extends HttpServlet { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/RetrieveFileAndDiscoverMimeTypeServlet.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/RetrieveFileAndDiscoverMimeTypeServlet.java index d06dff4..fe1300e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/RetrieveFileAndDiscoverMimeTypeServlet.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/RetrieveFileAndDiscoverMimeTypeServlet.java @@ -20,8 +20,8 @@ import org.slf4j.LoggerFactory; /** * Returns a file from storage and discover mime type * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class RetrieveFileAndDiscoverMimeTypeServlet extends HttpServlet { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SDMXClient.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SDMXClient.java index 715de54..d717949 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SDMXClient.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SDMXClient.java @@ -25,8 +25,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SDMXClient { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionConstants.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionConstants.java index 195272d..f79156e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionConstants.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionConstants.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.gwtservice.server; /** * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SessionConstants { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionOp.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionOp.java index e723017..b9e8ebf 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionOp.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionOp.java @@ -12,10 +12,10 @@ import org.slf4j.LoggerFactory; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi * - * @param + * + * @param Type */ public class SessionOp { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionUtil.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionUtil.java index d6b5076..190d1ef 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionUtil.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionUtil.java @@ -85,34 +85,20 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SessionUtil { private static Logger logger = LoggerFactory.getLogger(SessionUtil.class); - /** - * - * @param httpServletRequest - * @return - * @throws TDGWTServiceException - */ - public static ServiceCredentials getServiceCredentials( - HttpServletRequest httpServletRequest) throws TDGWTServiceException { + public static ServiceCredentials getServiceCredentials(HttpServletRequest httpServletRequest) + throws TDGWTServiceException { return getServiceCredentials(httpServletRequest, null); } - /** - * - * @param httpServletRequest - * @param scopeGroupId - * @return - * @throws TDGWTServiceException - */ - public static ServiceCredentials getServiceCredentials( - HttpServletRequest httpServletRequest, String scopeGroupId) + public static ServiceCredentials getServiceCredentials(HttpServletRequest httpServletRequest, String scopeGroupId) throws TDGWTServiceException { ServiceCredentials sCredentials = null; @@ -127,8 +113,8 @@ public class SessionUtil { InfoLocale infoLocale = getInfoLocale(httpServletRequest, null); Locale locale = new Locale(infoLocale.getLanguage()); - ResourceBundle messages = ResourceBundle.getBundle( - TDGWTServiceMessagesConstants.TDGWTServiceMessages, locale); + ResourceBundle messages = ResourceBundle.getBundle(TDGWTServiceMessagesConstants.TDGWTServiceMessages, + locale); userName = Constants.DEFAULT_USER; scope = Constants.DEFAULT_SCOPE; @@ -168,8 +154,7 @@ public class SessionUtil { GCubeUser gCubeUser = pContext.getCurrentUser(httpServletRequest); if (gCubeUser == null) { - String error = "Error retrieving gCubeUser in scope " + scope - + ": " + gCubeUser; + String error = "Error retrieving gCubeUser in scope " + scope + ": " + gCubeUser; logger.error(error); throw new TDGWTServiceException(error); } @@ -177,8 +162,7 @@ public class SessionUtil { userName = gCubeUser.getUsername(); if (userName == null || userName.isEmpty()) { - String error = "Error retrieving username in scope " + scope - + ": " + userName; + String error = "Error retrieving username in scope " + scope + ": " + userName; logger.error(error); throw new TDGWTServiceException(error); } @@ -186,8 +170,7 @@ public class SessionUtil { token = pContext.getCurrentUserToken(scope, userName); if (token == null || token.isEmpty()) { - String error = "Error retrieving token for " + userName - + " in " + scope + ": " + token; + String error = "Error retrieving token for " + userName + " in " + scope + ": " + token; logger.error(error); throw new TDGWTServiceException(error); } @@ -231,16 +214,14 @@ public class SessionUtil { } else { - groupId = String.valueOf(pContext - .getCurrentGroupId(httpServletRequest)); + groupId = String.valueOf(pContext.getCurrentGroupId(httpServletRequest)); groupName = pContext.getCurrentGroupName(httpServletRequest); } - sCredentials = new ServiceCredentials(userName, fullName, name, - lastName, email, scope, groupId, groupName, userAvatarURL, - token); + sCredentials = new ServiceCredentials(userName, fullName, name, lastName, email, scope, groupId, groupName, + userAvatarURL, token); } logger.debug("ServiceCredentials: " + sCredentials); @@ -249,14 +230,8 @@ public class SessionUtil { } // - /** - * - * @param httpRequest - * @param serviceCredentials - * @return - */ - public static InfoLocale getInfoLocale(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials) { + + public static InfoLocale getInfoLocale(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { InfoLocale infoLocale = null; String scope = serviceCredentials.getScope(); HttpSession session = httpRequest.getSession(); @@ -276,20 +251,13 @@ public class SessionUtil { infoLocale = new InfoLocale("en"); infoLocaleMap = new HashMap<>(); infoLocaleMap.put(scope, infoLocale); - session.setAttribute(SessionConstants.INFO_LOCALE_MAP, - infoLocaleMap); + session.setAttribute(SessionConstants.INFO_LOCALE_MAP, infoLocaleMap); } return infoLocale; } - /** - * - * @param httpRequest - * @param serviceCredentials - * @param infoLocale - */ - public static void setInfoLocale(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, InfoLocale infoLocale) { + public static void setInfoLocale(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + InfoLocale infoLocale) { HttpSession httpSession = httpRequest.getSession(); String scope = serviceCredentials.getScope(); @SuppressWarnings("unchecked") @@ -301,8 +269,7 @@ public class SessionUtil { infoLocale = new InfoLocale("en"); infoLocaleMap = new HashMap<>(); infoLocaleMap.put(scope, infoLocale); - httpSession.setAttribute(SessionConstants.INFO_LOCALE_MAP, - infoLocaleMap); + httpSession.setAttribute(SessionConstants.INFO_LOCALE_MAP, infoLocaleMap); } @@ -314,117 +281,62 @@ public class SessionUtil { * * * @param httpRequest + * Request * @param serviceCredentials + * Service credentials * @param trs + * list of tabular resource */ - public static void setTabularResources(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, List trs) { + public static void setTabularResources(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + List trs) { SessionOp> sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SCOPE_TO_TABULAR_RESOURCE_LIST_MAP, trs); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_TABULAR_RESOURCE_LIST_MAP, trs); } - /** - * - * @param httpRequest - * @param serviceCredentials - * @return - */ - public static TRId getTRId(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials) { + public static TRId getTRId(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - TRId trId = sessionOp.get(httpRequest, serviceCredentials, - SessionConstants.SCOPE_TO_CURRENT_TRID_MAP); + TRId trId = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_CURRENT_TRID_MAP); return trId; } - /** - * - * @param httpRequest - * @param serviceCredentials - * @param trId - */ - public static void setTRId(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TRId trId) { + public static void setTRId(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, TRId trId) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SCOPE_TO_CURRENT_TRID_MAP, trId); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_CURRENT_TRID_MAP, trId); } - /** - * - * @param httpRequest - * @param serviceCredentials - * @return - */ - public static TabResource getTabResource(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials) { + public static TabResource getTabResource(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - TabResource tabResource = sessionOp.get(httpRequest, - serviceCredentials, + TabResource tabResource = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCE_MAP); return tabResource; } - /** - * - * @param httpRequest - * @param serviceCredentials - * @param tabResource - */ - public static void setTabResource(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TabResource tabResource) { + public static void setTabResource(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TabResource tabResource) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCE_MAP, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCE_MAP, tabResource); } - // - /** - * - * @param httpRequest - * @param serviceCredentials - * @return - */ - public static ArrayList getCurrentTabularResourcesOpen( - HttpServletRequest httpRequest, + public static ArrayList getCurrentTabularResourcesOpen(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp> sessionOp = new SessionOp<>(); - ArrayList currentTROpen = sessionOp.get(httpRequest, - serviceCredentials, + ArrayList currentTROpen = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCES_OPEN_MAP); return currentTROpen; } - /** - * - * @param httpRequest - * @param serviceCredentials - * @param currentTROpen - */ - public static void setCurrentTabularResourcesOpen( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - ArrayList currentTROpen) { + public static void setCurrentTabularResourcesOpen(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, ArrayList currentTROpen) { SessionOp> sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCES_OPEN_MAP, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCES_OPEN_MAP, currentTROpen); } - /** - * - * @param httpRequest - * @param serviceCredentials - * @param tabResource - */ - public static void addToCurrentTabularResourcesOpen( - HttpServletRequest httpRequest, + public static void addToCurrentTabularResourcesOpen(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, TabResource tabResource) { - if (tabResource.getTrId() != null - && tabResource.getTrId().getId() != null + if (tabResource.getTrId() != null && tabResource.getTrId().getId() != null && !tabResource.getTrId().getId().isEmpty()) { HttpSession httpSession = httpRequest.getSession(); @@ -437,20 +349,15 @@ public class SessionUtil { scopeToTabResourceOpenMap = new HashMap<>(); ArrayList openList = new ArrayList<>(); openList.add(tabResource); - scopeToTabResourceOpenMap.put(serviceCredentials.getScope(), - openList); - httpSession - .setAttribute( - SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCES_OPEN_MAP, - scopeToTabResourceOpenMap); + scopeToTabResourceOpenMap.put(serviceCredentials.getScope(), openList); + httpSession.setAttribute(SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCES_OPEN_MAP, + scopeToTabResourceOpenMap); } else { - ArrayList openList = scopeToTabResourceOpenMap - .get(serviceCredentials.getScope()); + ArrayList openList = scopeToTabResourceOpenMap.get(serviceCredentials.getScope()); if (openList != null) { for (TabResource tr : openList) { - if (tr.getTrId().getId() - .compareTo(tabResource.getTrId().getId()) == 0) { + if (tr.getTrId().getId().compareTo(tabResource.getTrId().getId()) == 0) { openList.remove(tr); break; } @@ -460,8 +367,7 @@ public class SessionUtil { openList = new ArrayList<>(); openList.add(tabResource); } - scopeToTabResourceOpenMap.put(serviceCredentials.getScope(), - openList); + scopeToTabResourceOpenMap.put(serviceCredentials.getScope(), openList); } } else { @@ -470,14 +376,7 @@ public class SessionUtil { } - /** - * - * @param httpRequest - * @param serviceCredentials - * @param trId - */ - public static void removeFromCurrentTabularResourcesOpen( - HttpServletRequest httpRequest, + public static void removeFromCurrentTabularResourcesOpen(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, TRId trId) { if (trId != null && trId.getId() != null & !trId.getId().isEmpty()) { @@ -490,16 +389,12 @@ public class SessionUtil { if (scopeToTabResourceOpenMap == null) { scopeToTabResourceOpenMap = new HashMap<>(); ArrayList openList = new ArrayList<>(); - scopeToTabResourceOpenMap.put(serviceCredentials.getScope(), - openList); - httpSession - .setAttribute( - SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCES_OPEN_MAP, - scopeToTabResourceOpenMap); + scopeToTabResourceOpenMap.put(serviceCredentials.getScope(), openList); + httpSession.setAttribute(SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCES_OPEN_MAP, + scopeToTabResourceOpenMap); logger.debug("No open tr list in session"); } else { - ArrayList openList = scopeToTabResourceOpenMap - .get(serviceCredentials.getScope()); + ArrayList openList = scopeToTabResourceOpenMap.get(serviceCredentials.getScope()); if (openList != null) { for (TabResource tr : openList) { if (tr.getTrId().getId().compareTo(trId.getId()) == 0) { @@ -511,8 +406,7 @@ public class SessionUtil { } else { openList = new ArrayList<>(); } - scopeToTabResourceOpenMap.put(serviceCredentials.getScope(), - openList); + scopeToTabResourceOpenMap.put(serviceCredentials.getScope(), openList); } } else { @@ -520,31 +414,16 @@ public class SessionUtil { } } - /** - * - * @param httpRequest - * @param serviceCredentials - */ - public static void removeAllFromCurrentTabularResourcesOpen( - HttpServletRequest httpRequest, + public static void removeAllFromCurrentTabularResourcesOpen(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp> sessionOp = new SessionOp<>(); - sessionOp.remove(httpRequest, serviceCredentials, - SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCES_OPEN_MAP); + sessionOp.remove(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCES_OPEN_MAP); } - /** - * - * @param httpRequest - * @param serviceCredentials - * @return - */ - public static TabResource getFirstFromCurrentTabularResourcesOpen( - HttpServletRequest httpRequest, + public static TabResource getFirstFromCurrentTabularResourcesOpen(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp> sessionOp = new SessionOp<>(); - ArrayList openList = sessionOp.get(httpRequest, - serviceCredentials, + ArrayList openList = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCES_OPEN_MAP); if (openList == null || openList.isEmpty()) { @@ -556,30 +435,18 @@ public class SessionUtil { } - /** - * - * @param httpRequest - * @param serviceCredentials - * @param trId - * @return - */ - public static TabResource getFromCurrentTabularResourcesOpen( - HttpServletRequest httpRequest, + public static TabResource getFromCurrentTabularResourcesOpen(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, TRId trId) { SessionOp> sessionOp = new SessionOp<>(); - ArrayList openList = sessionOp.get(httpRequest, - serviceCredentials, + ArrayList openList = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_CURRENT_TABULAR_RESOURCES_OPEN_MAP); if (openList == null || openList.isEmpty()) { logger.info("No open tr in session"); } else { - logger.debug("Current Tabular Open In session: " - + serviceCredentials.getScope() + ", trList: " + openList); + logger.debug("Current Tabular Open In session: " + serviceCredentials.getScope() + ", trList: " + openList); for (TabResource tabResource : openList) { - if (tabResource != null - && tabResource.getTrId() != null - && tabResource.getTrId().getId() - .compareTo(trId.getId()) == 0) { + if (tabResource != null && tabResource.getTrId() != null + && tabResource.getTrId().getId().compareTo(trId.getId()) == 0) { return tabResource; } } @@ -589,226 +456,167 @@ public class SessionUtil { return null; } - // - /** - * - * @param httpRequest - * @param serviceCredentials - * @param tdOpenSession - */ - public static void setTDOpenSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TDOpenSession tdOpenSession) { + public static void setTDOpenSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TDOpenSession tdOpenSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.TDOPEN_SESSION, tdOpenSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.TDOPEN_SESSION, tdOpenSession); } - // TODO check - // public static void retrieveResources(HttpServletRequest httpRequest, - // ServiceCredentials serviceCredentials) { - // - // return; - // } - - // - public static TabResource getSDMXImportTabResource( - HttpServletRequest httpRequest, + public static TabResource getSDMXImportTabResource(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - TabResource tabResource = sessionOp.get(httpRequest, - serviceCredentials, + TabResource tabResource = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SDMX_IMPORT_TABULAR_RESOURCE); return tabResource; } - public static void setSDMXImportTabResource(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TabResource tabResource) { + public static void setSDMXImportTabResource(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TabResource tabResource) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SDMX_IMPORT_TABULAR_RESOURCE, tabResource); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SDMX_IMPORT_TABULAR_RESOURCE, tabResource); } - // - public static TabResource getCSVImportTabResource( - HttpServletRequest httpRequest, + public static TabResource getCSVImportTabResource(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - TabResource tabResource = sessionOp.get(httpRequest, - serviceCredentials, + TabResource tabResource = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.CSV_IMPORT_TABULAR_RESOURCE); return tabResource; } - public static void setCSVImportTabResource(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TabResource tabResource) { + public static void setCSVImportTabResource(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TabResource tabResource) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CSV_IMPORT_TABULAR_RESOURCE, tabResource); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CSV_IMPORT_TABULAR_RESOURCE, tabResource); } - // - public static void setSDMXImportSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setSDMXImportSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, SDMXImportSession sdmxImportSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SDMX_IMPORT_SESSION, sdmxImportSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SDMX_IMPORT_SESSION, sdmxImportSession); } - public static SDMXImportSession getSDMXImportSession( - HttpServletRequest httpRequest, + public static SDMXImportSession getSDMXImportSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - SDMXImportSession sdmxImportSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.SDMX_IMPORT_SESSION); + SDMXImportSession sdmxImportSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.SDMX_IMPORT_SESSION); return sdmxImportSession; } - // - public static void setCSVImportSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setCSVImportSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, CSVImportSession csvImportSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CSV_IMPORT_SESSION, csvImportSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CSV_IMPORT_SESSION, csvImportSession); } - public static CSVImportSession getCSVImportSession( - HttpServletRequest httpRequest, + public static CSVImportSession getCSVImportSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - CSVImportSession csvImportSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.CSV_IMPORT_SESSION); + CSVImportSession csvImportSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.CSV_IMPORT_SESSION); return csvImportSession; } - // - public static void setCSVExportSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setCSVExportSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, CSVExportSession csvExportSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CSV_EXPORT_SESSION, csvExportSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CSV_EXPORT_SESSION, csvExportSession); } - public static CSVExportSession getCSVExportSession( - HttpServletRequest httpRequest, + public static CSVExportSession getCSVExportSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - CSVExportSession csvExportSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.CSV_EXPORT_SESSION); + CSVExportSession csvExportSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.CSV_EXPORT_SESSION); return csvExportSession; } - // - public static void setSDMXExportSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setSDMXExportSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, SDMXExportSession sdmxExportSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SDMX_EXPORT_SESSION, sdmxExportSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SDMX_EXPORT_SESSION, sdmxExportSession); } - public static SDMXExportSession getSDMXExportSession( - HttpServletRequest httpRequest, + public static SDMXExportSession getSDMXExportSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - SDMXExportSession sdmxExportSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.SDMX_EXPORT_SESSION); + SDMXExportSession sdmxExportSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.SDMX_EXPORT_SESSION); return sdmxExportSession; } - // - public static void setSDMXTemplateExportSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - SDMXTemplateExportSession sdmxTemplateExportSession) { + public static void setSDMXTemplateExportSession(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, SDMXTemplateExportSession sdmxTemplateExportSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SDMX_TEMPLATE_EXPORT_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SDMX_TEMPLATE_EXPORT_SESSION, sdmxTemplateExportSession); } - public static SDMXTemplateExportSession getSDMXTemplateExportSession( - HttpServletRequest httpRequest, + public static SDMXTemplateExportSession getSDMXTemplateExportSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - SDMXTemplateExportSession sdmxTemplateExportSession = sessionOp.get( - httpRequest, serviceCredentials, + SDMXTemplateExportSession sdmxTemplateExportSession = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SDMX_TEMPLATE_EXPORT_SESSION); return sdmxTemplateExportSession; } - // - public static void setJSONExportSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setJSONExportSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, JSONExportSession jsonExportSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.JSON_EXPORT_SESSION, jsonExportSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.JSON_EXPORT_SESSION, jsonExportSession); } - public static JSONExportSession getJSONExportSession( - HttpServletRequest httpRequest, + public static JSONExportSession getJSONExportSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - JSONExportSession jsonExportSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.JSON_EXPORT_SESSION); + JSONExportSession jsonExportSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.JSON_EXPORT_SESSION); return jsonExportSession; } // - public static void setCSVFileUploadSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setCSVFileUploadSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, CSVFileUploadSession csvFileUploadSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CSV_IMPORT_FILE_UPLOAD_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CSV_IMPORT_FILE_UPLOAD_SESSION, csvFileUploadSession); } - public static CSVFileUploadSession getCSVFileUploadSession( - HttpServletRequest httpRequest, + public static CSVFileUploadSession getCSVFileUploadSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - CSVFileUploadSession csvFileUploadSession = sessionOp.get(httpRequest, - serviceCredentials, + CSVFileUploadSession csvFileUploadSession = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.CSV_IMPORT_FILE_UPLOAD_SESSION); return csvFileUploadSession; } // - public static void setCodelistMappingFileUploadSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - CodelistMappingFileUploadSession codelistMappingFileUploadSession) { + public static void setCodelistMappingFileUploadSession(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, CodelistMappingFileUploadSession codelistMappingFileUploadSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CODELIST_MAPPING_FILE_UPLOAD_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CODELIST_MAPPING_FILE_UPLOAD_SESSION, codelistMappingFileUploadSession); } - public static CodelistMappingFileUploadSession getCodelistMappingFileUploadSession( - HttpServletRequest httpRequest, + public static CodelistMappingFileUploadSession getCodelistMappingFileUploadSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - CodelistMappingFileUploadSession codelistMappingFileUploadSession = sessionOp - .get(httpRequest, serviceCredentials, - SessionConstants.CODELIST_MAPPING_FILE_UPLOAD_SESSION); + CodelistMappingFileUploadSession codelistMappingFileUploadSession = sessionOp.get(httpRequest, + serviceCredentials, SessionConstants.CODELIST_MAPPING_FILE_UPLOAD_SESSION); return codelistMappingFileUploadSession; } // - public static ArrayList retrieveCodelists( - HttpServletRequest httpRequest, + public static ArrayList retrieveCodelists(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws Exception { logger.info("SessionUtil retrieveCodelists"); ScopeProvider.instance.set(serviceCredentials.getScope()); @@ -816,8 +624,7 @@ public class SessionUtil { return client.getAllCodelists(); } - public static ArrayList retrieveDatasets( - HttpServletRequest httpRequest, + public static ArrayList retrieveDatasets(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws Exception { logger.info("SessionUtil retrieveDatasets"); ScopeProvider.instance.set(serviceCredentials.getScope()); @@ -825,8 +632,7 @@ public class SessionUtil { return client.getAllDatasets(); } - public static ArrayList retrieveAgencies( - HttpServletRequest httpRequest, + public static ArrayList retrieveAgencies(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws Exception { logger.info("SessionUtil retrieveAgencies"); ScopeProvider.instance.set(serviceCredentials.getScope()); @@ -835,51 +641,42 @@ public class SessionUtil { } // - public static void setSDMXRegistrySource(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setSDMXRegistrySource(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, SDMXRegistrySource sdmxRegistrySource) { ScopeProvider.instance.set(serviceCredentials.getScope()); SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SDMX_REGISTRY_SOURCE, sdmxRegistrySource); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SDMX_REGISTRY_SOURCE, sdmxRegistrySource); } - public static SDMXRegistrySource getSDMXRegistrySource( - HttpServletRequest httpRequest, + public static SDMXRegistrySource getSDMXRegistrySource(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - SDMXRegistrySource sdmxRegistrySource = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.SDMX_REGISTRY_SOURCE); + SDMXRegistrySource sdmxRegistrySource = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.SDMX_REGISTRY_SOURCE); return sdmxRegistrySource; } // - public static SDMXClient getSDMXClientInSession( - HttpServletRequest httpRequest, + public static SDMXClient getSDMXClientInSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - SDMXClient sdmxClient = sessionOp.get(httpRequest, serviceCredentials, - SessionConstants.SDMX_CLIENT_ATTRIBUTE); + SDMXClient sdmxClient = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SDMX_CLIENT_ATTRIBUTE); return sdmxClient; } - public static void setSDMXClientInSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, SDMXClient sdmxClient) { + public static void setSDMXClientInSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + SDMXClient sdmxClient) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SDMX_CLIENT_ATTRIBUTE, sdmxClient); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SDMX_CLIENT_ATTRIBUTE, sdmxClient); } // - public static SDMXClient getSdmxClient(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials) { + public static SDMXClient getSdmxClient(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { // HttpSession httpSession = httpRequest.getSession(); - SDMXClient sdmxClient = getSDMXClientInSession(httpRequest, - serviceCredentials); - SDMXRegistrySource sdmxRegistrySource = getSDMXRegistrySource( - httpRequest, serviceCredentials); + SDMXClient sdmxClient = getSDMXClientInSession(httpRequest, serviceCredentials); + SDMXRegistrySource sdmxRegistrySource = getSDMXRegistrySource(httpRequest, serviceCredentials); if (sdmxRegistrySource == null) { logger.error("SDMXRegistrySource was not acquired"); } else { @@ -896,8 +693,7 @@ public class SessionUtil { if (sdmxClient == null) { sdmxClient = new SDMXClient(url); } else { - if (sdmxClient.getType() - .compareTo(SDMXClient.TYPE.INTERNAL) == 0) { + if (sdmxClient.getType().compareTo(SDMXClient.TYPE.INTERNAL) == 0) { sdmxClient = new SDMXClient(url); } else { if (sdmxClient.getUrl().compareTo(url) != 0) { @@ -914,19 +710,16 @@ public class SessionUtil { } // - public static void setCSVExportEnd(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, Boolean end) { + public static void setCSVExportEnd(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + Boolean end) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CSV_EXPORT_END, end); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CSV_EXPORT_END, end); } - public static Boolean getCSVExportEnd(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials) { + public static Boolean getCSVExportEnd(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - Boolean end = sessionOp.get(httpRequest, serviceCredentials, - SessionConstants.CSV_EXPORT_END); + Boolean end = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.CSV_EXPORT_END); if (end == null) { end = false; } @@ -934,19 +727,16 @@ public class SessionUtil { } // - public static void setJSONExportEnd(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, Boolean end) { + public static void setJSONExportEnd(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + Boolean end) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.JSON_EXPORT_END, end); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.JSON_EXPORT_END, end); } - public static Boolean getJSONExportEnd(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials) { + public static Boolean getJSONExportEnd(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp sessionOp = new SessionOp<>(); - Boolean end = sessionOp.get(httpRequest, serviceCredentials, - SessionConstants.JSON_EXPORT_END); + Boolean end = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.JSON_EXPORT_END); if (end == null) { end = false; } @@ -954,872 +744,673 @@ public class SessionUtil { } // - public static TRTasksManager getTRTasksManager( - HttpServletRequest httpRequest, + public static TRTasksManager getTRTasksManager(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - TRTasksManager tasksManager = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.TR_TASK_MANAGER, + TRTasksManager tasksManager = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.TR_TASK_MANAGER, TRTasksManager.class); return tasksManager; } - public static void setTRTasksManager(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TRTasksManager trTasksManager) { + public static void setTRTasksManager(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TRTasksManager trTasksManager) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.TR_TASK_MANAGER, trTasksManager); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.TR_TASK_MANAGER, trTasksManager); } // - public static ChangeColumnTypeSession getChangeColumnTypeSession( - HttpServletRequest httpRequest, + public static ChangeColumnTypeSession getChangeColumnTypeSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - ChangeColumnTypeSession changeColumnTypeSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.CHANGE_COLUMN_TYPE_SESSION, - ChangeColumnTypeSession.class); + ChangeColumnTypeSession changeColumnTypeSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.CHANGE_COLUMN_TYPE_SESSION, ChangeColumnTypeSession.class); return changeColumnTypeSession; } - public static void setChangeColumnTypeSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setChangeColumnTypeSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, ChangeColumnTypeSession changeColumnTypeSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CHANGE_COLUMN_TYPE_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CHANGE_COLUMN_TYPE_SESSION, changeColumnTypeSession); } // - public static LabelColumnSession getLabelColumnSession( - HttpServletRequest httpRequest, + public static LabelColumnSession getLabelColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - LabelColumnSession labelColumnSession = sessionOp.get(httpRequest, - serviceCredentials, - SessionConstants.CHANGE_THE_COLUMN_LABEL_SESSION, - LabelColumnSession.class); + LabelColumnSession labelColumnSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.CHANGE_THE_COLUMN_LABEL_SESSION, LabelColumnSession.class); return labelColumnSession; } // - public static void setLabelColumnSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setLabelColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, LabelColumnSession labelColumnSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CHANGE_THE_COLUMN_LABEL_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CHANGE_THE_COLUMN_LABEL_SESSION, labelColumnSession); } // - public static AddColumnSession getAddColumnSession( - HttpServletRequest httpRequest, + public static AddColumnSession getAddColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - AddColumnSession addColumnSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.ADD_COLUMN_SESSION, - AddColumnSession.class); + AddColumnSession addColumnSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.ADD_COLUMN_SESSION, AddColumnSession.class); return addColumnSession; } - public static void setAddColumnSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setAddColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, AddColumnSession addColumnSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.ADD_COLUMN_SESSION, addColumnSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.ADD_COLUMN_SESSION, addColumnSession); } // - public static DeleteColumnSession getDeleteColumnSession( - HttpServletRequest httpRequest, + public static DeleteColumnSession getDeleteColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - DeleteColumnSession deleteColumnSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.DELETE_COLUMN_SESSION, - DeleteColumnSession.class); + DeleteColumnSession deleteColumnSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.DELETE_COLUMN_SESSION, DeleteColumnSession.class); return deleteColumnSession; } - public static void setDeleteColumnSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setDeleteColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, DeleteColumnSession deleteColumnSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.DELETE_COLUMN_SESSION, deleteColumnSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.DELETE_COLUMN_SESSION, deleteColumnSession); } // - public static FilterColumnSession getFilterColumnSession( - HttpServletRequest httpRequest, + public static FilterColumnSession getFilterColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - FilterColumnSession filterColumnSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.FILTER_COLUMN_SESSION, - FilterColumnSession.class); + FilterColumnSession filterColumnSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.FILTER_COLUMN_SESSION, FilterColumnSession.class); return filterColumnSession; } - public static void setFilterColumnSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setFilterColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, FilterColumnSession filterColumnSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.FILTER_COLUMN_SESSION, filterColumnSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.FILTER_COLUMN_SESSION, filterColumnSession); } // - public static ReplaceColumnByExpressionSession getReplaceColumnByExpressionSession( - HttpServletRequest httpRequest, + public static ReplaceColumnByExpressionSession getReplaceColumnByExpressionSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - ReplaceColumnByExpressionSession replaceColumnByExpressionSession = sessionOp - .get(httpRequest, serviceCredentials, - SessionConstants.REPLACE_COLUMN_BY_EXPRESSION_SESSION, - ReplaceColumnByExpressionSession.class); + ReplaceColumnByExpressionSession replaceColumnByExpressionSession = sessionOp.get(httpRequest, + serviceCredentials, SessionConstants.REPLACE_COLUMN_BY_EXPRESSION_SESSION, + ReplaceColumnByExpressionSession.class); return replaceColumnByExpressionSession; } - public static void setReplaceColumnByExpressionSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - ReplaceColumnByExpressionSession replaceColumnByExpressionSession) { + public static void setReplaceColumnByExpressionSession(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, ReplaceColumnByExpressionSession replaceColumnByExpressionSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.REPLACE_COLUMN_BY_EXPRESSION_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.REPLACE_COLUMN_BY_EXPRESSION_SESSION, replaceColumnByExpressionSession); } // - public static ApplyAndDetachColumnRulesSession getRulesOnColumnApplyAndDetachSession( - HttpServletRequest httpRequest, + public static ApplyAndDetachColumnRulesSession getRulesOnColumnApplyAndDetachSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - ApplyAndDetachColumnRulesSession applyColumnRulesSession = sessionOp - .get(httpRequest, - serviceCredentials, - SessionConstants.RULES_ON_COLUMN_APPLY_AND_DETACH_SESSION, - ApplyAndDetachColumnRulesSession.class); + ApplyAndDetachColumnRulesSession applyColumnRulesSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.RULES_ON_COLUMN_APPLY_AND_DETACH_SESSION, ApplyAndDetachColumnRulesSession.class); return applyColumnRulesSession; } - public static void setRulesOnColumnApplyAndDetachSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - ApplyAndDetachColumnRulesSession applyColumnRulesSession) { + public static void setRulesOnColumnApplyAndDetachSession(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, ApplyAndDetachColumnRulesSession applyColumnRulesSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.RULES_ON_COLUMN_APPLY_AND_DETACH_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.RULES_ON_COLUMN_APPLY_AND_DETACH_SESSION, applyColumnRulesSession); } // - public static ApplyTableRuleSession getApplyTableRuleSession( - HttpServletRequest httpRequest, + public static ApplyTableRuleSession getApplyTableRuleSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - ApplyTableRuleSession applyTableRuleSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.RULES_ON_TABLE_APPLY_SESSION, - ApplyTableRuleSession.class); + ApplyTableRuleSession applyTableRuleSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.RULES_ON_TABLE_APPLY_SESSION, ApplyTableRuleSession.class); return applyTableRuleSession; } - public static void setApplyTableRuleSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setApplyTableRuleSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, ApplyTableRuleSession applyTableRuleSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.RULES_ON_TABLE_APPLY_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.RULES_ON_TABLE_APPLY_SESSION, applyTableRuleSession); } // - public static DetachColumnRulesSession getDetachColumnRulesSession( - HttpServletRequest httpRequest, + public static DetachColumnRulesSession getDetachColumnRulesSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - DetachColumnRulesSession detachColumnRulesSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.RULES_ON_COLUMN_DETACH_SESSION, - DetachColumnRulesSession.class); + DetachColumnRulesSession detachColumnRulesSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.RULES_ON_COLUMN_DETACH_SESSION, DetachColumnRulesSession.class); return detachColumnRulesSession; } - public static void setDetachColumnRulesSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - DetachColumnRulesSession detachColumnRulesSession) { + public static void setDetachColumnRulesSession(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, DetachColumnRulesSession detachColumnRulesSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.RULES_ON_COLUMN_DETACH_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.RULES_ON_COLUMN_DETACH_SESSION, detachColumnRulesSession); } // - public static DetachTableRulesSession getDetachTableRulesSession( - HttpServletRequest httpRequest, + public static DetachTableRulesSession getDetachTableRulesSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - DetachTableRulesSession detachTableRulesSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.RULES_ON_TABLE_DETACH_SESSION, - DetachTableRulesSession.class); + DetachTableRulesSession detachTableRulesSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.RULES_ON_TABLE_DETACH_SESSION, DetachTableRulesSession.class); return detachTableRulesSession; } - public static void setDetachTableRulesSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setDetachTableRulesSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, DetachTableRulesSession detachTableRulesSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.RULES_ON_TABLE_DETACH_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.RULES_ON_TABLE_DETACH_SESSION, detachTableRulesSession); } // - public static TaskResubmitSession getTaskResubmitSession( - HttpServletRequest httpRequest, + public static TaskResubmitSession getTaskResubmitSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - TaskResubmitSession taskResubmitSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.TASK_RESUBMIT_SESSION, - TaskResubmitSession.class); + TaskResubmitSession taskResubmitSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.TASK_RESUBMIT_SESSION, TaskResubmitSession.class); return taskResubmitSession; } - public static void setTaskResubmitSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setTaskResubmitSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, TaskResubmitSession taskResubmitSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.TASK_RESUBMIT_SESSION, taskResubmitSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.TASK_RESUBMIT_SESSION, taskResubmitSession); } // - public static TaskResumeSession getTaskResumeSession( - HttpServletRequest httpRequest, + public static TaskResumeSession getTaskResumeSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - TaskResumeSession taskResumeSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.TASK_RESUME_SESSION, - TaskResumeSession.class); + TaskResumeSession taskResumeSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.TASK_RESUME_SESSION, TaskResumeSession.class); return taskResumeSession; } - public static void setTaskResumeSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setTaskResumeSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, TaskResumeSession taskResumeSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.TASK_RESUME_SESSION, taskResumeSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.TASK_RESUME_SESSION, taskResumeSession); } // - public static EditRowSession getEditRowSession( - HttpServletRequest httpRequest, + public static EditRowSession getEditRowSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - EditRowSession editRowSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.EDIT_ROW_SESSION, - EditRowSession.class); + EditRowSession editRowSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.EDIT_ROW_SESSION, EditRowSession.class); return editRowSession; } - public static void setEditRowSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, EditRowSession editRowSession) { + public static void setEditRowSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + EditRowSession editRowSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.EDIT_ROW_SESSION, editRowSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.EDIT_ROW_SESSION, editRowSession); } // - public static ReplaceColumnSession getReplaceColumnSession( - HttpServletRequest httpRequest, + public static ReplaceColumnSession getReplaceColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - ReplaceColumnSession replaceColumnSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.REPLACE_COLUMN_SESSION, - ReplaceColumnSession.class); + ReplaceColumnSession replaceColumnSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.REPLACE_COLUMN_SESSION, ReplaceColumnSession.class); return replaceColumnSession; } - public static void setReplaceColumnSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setReplaceColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, ReplaceColumnSession replaceColumnSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.REPLACE_COLUMN_SESSION, replaceColumnSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.REPLACE_COLUMN_SESSION, replaceColumnSession); } // - public static ReplaceBatchColumnSession getReplaceBatchColumnSession( - HttpServletRequest httpRequest, + public static ReplaceBatchColumnSession getReplaceBatchColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - ReplaceBatchColumnSession replaceBatchColumnSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.REPLACE_BATCH_COLUMN_SESSION, - ReplaceBatchColumnSession.class); + ReplaceBatchColumnSession replaceBatchColumnSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.REPLACE_BATCH_COLUMN_SESSION, ReplaceBatchColumnSession.class); return replaceBatchColumnSession; } - public static void setReplaceBatchColumnSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - ReplaceBatchColumnSession replaceBatchColumnSession) { + public static void setReplaceBatchColumnSession(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, ReplaceBatchColumnSession replaceBatchColumnSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.REPLACE_BATCH_COLUMN_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.REPLACE_BATCH_COLUMN_SESSION, replaceBatchColumnSession); } // - public static ChangeTableTypeSession getChangeTableTypeSession( - HttpServletRequest httpRequest, + public static ChangeTableTypeSession getChangeTableTypeSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - ChangeTableTypeSession changeTableTypeSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.CHANGE_TABLE_TYPE_SESSION, - ChangeTableTypeSession.class); + ChangeTableTypeSession changeTableTypeSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.CHANGE_TABLE_TYPE_SESSION, ChangeTableTypeSession.class); return changeTableTypeSession; } - public static void setChangeTableTypeSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setChangeTableTypeSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, ChangeTableTypeSession changeTableTypeSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CHANGE_TABLE_TYPE_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CHANGE_TABLE_TYPE_SESSION, changeTableTypeSession); } // - public static CloneTabularResourceSession getCloneTabularResourceSession( - HttpServletRequest httpRequest, + public static CloneTabularResourceSession getCloneTabularResourceSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - CloneTabularResourceSession cloneTabularResourceSession = sessionOp - .get(httpRequest, serviceCredentials, - SessionConstants.CLONE_TABULAR_RESOURCE_SESSION, - CloneTabularResourceSession.class); + CloneTabularResourceSession cloneTabularResourceSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.CLONE_TABULAR_RESOURCE_SESSION, CloneTabularResourceSession.class); return cloneTabularResourceSession; } - public static void setCloneTabularResourceSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - CloneTabularResourceSession cloneTabularResourceSession) { + public static void setCloneTabularResourceSession(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, CloneTabularResourceSession cloneTabularResourceSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CLONE_TABULAR_RESOURCE_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CLONE_TABULAR_RESOURCE_SESSION, cloneTabularResourceSession); } // - public static DeleteRowsSession getDeleteRowsSession( - HttpServletRequest httpRequest, + public static DeleteRowsSession getDeleteRowsSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - DeleteRowsSession deleteRowsSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.DELETE_ROWS_SESSION, - DeleteRowsSession.class); + DeleteRowsSession deleteRowsSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.DELETE_ROWS_SESSION, DeleteRowsSession.class); return deleteRowsSession; } - public static void setDeleteRowsSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setDeleteRowsSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, DeleteRowsSession deleteRowsSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.DELETE_ROWS_SESSION, deleteRowsSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.DELETE_ROWS_SESSION, deleteRowsSession); } // - public static TemplateApplySession getTemplateApplySession( - HttpServletRequest httpRequest, + public static TemplateApplySession getTemplateApplySession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - TemplateApplySession templateApplySession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.TEMPLATE_APPLY_SESSION, - TemplateApplySession.class); + TemplateApplySession templateApplySession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.TEMPLATE_APPLY_SESSION, TemplateApplySession.class); return templateApplySession; } - public static void setTemplateApplySession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setTemplateApplySession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, TemplateApplySession templateApplySession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.TEMPLATE_APPLY_SESSION, templateApplySession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.TEMPLATE_APPLY_SESSION, templateApplySession); } // - public static DuplicatesSession getDuplicatesSession( - HttpServletRequest httpRequest, + public static DuplicatesSession getDuplicatesSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - DuplicatesSession duplicatesSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.DUPLICATES_ROWS_SESSION, - DuplicatesSession.class); + DuplicatesSession duplicatesSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.DUPLICATES_ROWS_SESSION, DuplicatesSession.class); return duplicatesSession; } - public static void setDuplicatesSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setDuplicatesSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, DuplicatesSession duplicatesSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.DUPLICATES_ROWS_SESSION, duplicatesSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.DUPLICATES_ROWS_SESSION, duplicatesSession); } // - public static ArrayList getCodelistsPagingLoaded( - HttpServletRequest httpRequest, + public static ArrayList getCodelistsPagingLoaded(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp> sessionOp = new SessionOp<>(); - ArrayList ltr = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.CODELISTS_PAGING_LOADED); + ArrayList ltr = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.CODELISTS_PAGING_LOADED); return ltr; } - public static void setCodelistsPagingLoaded(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setCodelistsPagingLoaded(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, ArrayList listCodelists) { SessionOp> sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CODELISTS_PAGING_LOADED, listCodelists); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CODELISTS_PAGING_LOADED, listCodelists); } // - public static ArrayList getCodelistsPagingLoadedFilteredCopy( - HttpServletRequest httpRequest, + public static ArrayList getCodelistsPagingLoadedFilteredCopy(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp> sessionOp = new SessionOp<>(); - ArrayList ltrFilteredCopy = sessionOp.get(httpRequest, - serviceCredentials, + ArrayList ltrFilteredCopy = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.CODELISTS_PAGING_LOADED_FILTERED_COPY); return ltrFilteredCopy; } - public static void setCodelistsPagingLoadedFilteredCopy( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - ArrayList listCodelistsFilteredCopy) { + public static void setCodelistsPagingLoadedFilteredCopy(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, ArrayList listCodelistsFilteredCopy) { SessionOp> sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CODELISTS_PAGING_LOADED_FILTERED_COPY, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CODELISTS_PAGING_LOADED_FILTERED_COPY, listCodelistsFilteredCopy); } // - public static String getCodelistsPagingLoadedFilter( - HttpServletRequest httpRequest, + public static String getCodelistsPagingLoadedFilter(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - String filter = sessionOp.get(httpRequest, serviceCredentials, - SessionConstants.CODELISTS_PAGING_LOADED_FILTER); + String filter = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.CODELISTS_PAGING_LOADED_FILTER); return filter; } - public static void setCodelistsPagingLoadedFilter( - HttpServletRequest httpRequest, + public static void setCodelistsPagingLoadedFilter(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, String filter) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CODELISTS_PAGING_LOADED_FILTER, filter); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CODELISTS_PAGING_LOADED_FILTER, filter); } // - public static RollBackSession getRollBackSession( - HttpServletRequest httpRequest, + public static RollBackSession getRollBackSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - RollBackSession rollBackSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.ROLLBACK_SESSION, - RollBackSession.class); + RollBackSession rollBackSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.ROLLBACK_SESSION, RollBackSession.class); return rollBackSession; } - public static void setRollBackSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setRollBackSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, RollBackSession rollBackSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.ROLLBACK_SESSION, rollBackSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.ROLLBACK_SESSION, rollBackSession); } // - public static ExtractCodelistSession getExtractCodelistSession( - HttpServletRequest httpRequest, + public static ExtractCodelistSession getExtractCodelistSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - ExtractCodelistSession extractCodelistSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.EXTRACT_CODELIST_SESSION, - ExtractCodelistSession.class); + ExtractCodelistSession extractCodelistSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.EXTRACT_CODELIST_SESSION, ExtractCodelistSession.class); return extractCodelistSession; } - public static void setExtractCodelistSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setExtractCodelistSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, ExtractCodelistSession extractCodelistSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.EXTRACT_CODELIST_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.EXTRACT_CODELIST_SESSION, extractCodelistSession); } // - public static SplitColumnSession getSplitColumnSession( - HttpServletRequest httpRequest, + public static SplitColumnSession getSplitColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - SplitColumnSession splitColumnSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.SPLIT_COLUMN_SESSION, - SplitColumnSession.class); + SplitColumnSession splitColumnSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.SPLIT_COLUMN_SESSION, SplitColumnSession.class); return splitColumnSession; } - public static void setSplitColumnSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setSplitColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, SplitColumnSession splitColumnSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SPLIT_COLUMN_SESSION, splitColumnSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SPLIT_COLUMN_SESSION, splitColumnSession); } // - public static MergeColumnSession getMergeColumnSession( - HttpServletRequest httpRequest, + public static MergeColumnSession getMergeColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - MergeColumnSession mergeColumnSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.MERGE_COLUMN_SESSION, - MergeColumnSession.class); + MergeColumnSession mergeColumnSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.MERGE_COLUMN_SESSION, MergeColumnSession.class); return mergeColumnSession; } - public static void setMergeColumnSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setMergeColumnSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, MergeColumnSession mergeColumnSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.MERGE_COLUMN_SESSION, mergeColumnSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.MERGE_COLUMN_SESSION, mergeColumnSession); } // - public static GroupBySession getGroupBySession( - HttpServletRequest httpRequest, + public static GroupBySession getGroupBySession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - GroupBySession groupBySession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.GROUPBY_SESSION, + GroupBySession groupBySession = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.GROUPBY_SESSION, GroupBySession.class); return groupBySession; } - public static void setGroupBySession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, GroupBySession groupBySession) { + public static void setGroupBySession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + GroupBySession groupBySession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.GROUPBY_SESSION, groupBySession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.GROUPBY_SESSION, groupBySession); } // - public static TimeAggregationSession getTimeAggregationSession( - HttpServletRequest httpRequest, + public static TimeAggregationSession getTimeAggregationSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - TimeAggregationSession timeAggregationSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.TIME_AGGREGATION_SESSION, - TimeAggregationSession.class); + TimeAggregationSession timeAggregationSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.TIME_AGGREGATION_SESSION, TimeAggregationSession.class); return timeAggregationSession; } - public static void setTimeAggregationSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setTimeAggregationSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, TimeAggregationSession timeAggregationSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.TIME_AGGREGATION_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.TIME_AGGREGATION_SESSION, timeAggregationSession); } // - public static CodelistMappingSession getCodelistMappingSession( - HttpServletRequest httpRequest, + public static CodelistMappingSession getCodelistMappingSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - CodelistMappingSession codelistMappingSession = sessionOp.get( - httpRequest, serviceCredentials, + CodelistMappingSession codelistMappingSession = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.CODELIST_MAPPING_SESSION); return codelistMappingSession; } - public static void setCodelistMappingSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setCodelistMappingSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, CodelistMappingSession codelistMappingSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CODELIST_MAPPING_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CODELIST_MAPPING_SESSION, codelistMappingSession); } // - public static NormalizationSession getNormalizationSession( - HttpServletRequest httpRequest, + public static NormalizationSession getNormalizationSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - NormalizationSession normalizationSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.NORMALIZATION_SESSION, - NormalizationSession.class); + NormalizationSession normalizationSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.NORMALIZATION_SESSION, NormalizationSession.class); return normalizationSession; } - public static void setNormalizationSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setNormalizationSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, NormalizationSession normalizationSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.NORMALIZATION_SESSION, normalizationSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.NORMALIZATION_SESSION, normalizationSession); } // - public static DenormalizationSession getDenormalizationSession( - HttpServletRequest httpRequest, + public static DenormalizationSession getDenormalizationSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - DenormalizationSession denormalizationSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.DENORMALIZATION_SESSION, - DenormalizationSession.class); + DenormalizationSession denormalizationSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.DENORMALIZATION_SESSION, DenormalizationSession.class); return denormalizationSession; } - public static void setDenormalizationSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setDenormalizationSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, DenormalizationSession denormalizationSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.DENORMALIZATION_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.DENORMALIZATION_SESSION, denormalizationSession); } // - public static UnionSession getUnionSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials) throws TDGWTServiceException { + public static UnionSession getUnionSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) + throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - UnionSession unionSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.UNION_SESSION, + UnionSession unionSession = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.UNION_SESSION, UnionSession.class); return unionSession; } - public static void setUnionSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, UnionSession unionSession) { + public static void setUnionSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + UnionSession unionSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.UNION_SESSION, unionSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.UNION_SESSION, unionSession); } // - public static ChangeColumnsPositionSession getChangeColumnsPositionSession( - HttpServletRequest httpRequest, + public static ChangeColumnsPositionSession getChangeColumnsPositionSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - ChangeColumnsPositionSession changeColumnsPositionSession = sessionOp - .get(httpRequest, serviceCredentials, - SessionConstants.CHANGE_COLUMNS_POSITION_SESSION, - ChangeColumnsPositionSession.class); + ChangeColumnsPositionSession changeColumnsPositionSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.CHANGE_COLUMNS_POSITION_SESSION, ChangeColumnsPositionSession.class); return changeColumnsPositionSession; } - public static void setChangeColumnsPositionSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - ChangeColumnsPositionSession changeColumnsPositionSession) { + public static void setChangeColumnsPositionSession(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, ChangeColumnsPositionSession changeColumnsPositionSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.CHANGE_COLUMNS_POSITION_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CHANGE_COLUMNS_POSITION_SESSION, changeColumnsPositionSession); } // - public static ReplaceByExternalSession getReplaceByExternalSession( - HttpServletRequest httpRequest, + public static ReplaceByExternalSession getReplaceByExternalSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - ReplaceByExternalSession replaceByExternalSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.REPLACE_BY_EXTERNAL_SESSION, - ReplaceByExternalSession.class); + ReplaceByExternalSession replaceByExternalSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.REPLACE_BY_EXTERNAL_SESSION, ReplaceByExternalSession.class); return replaceByExternalSession; } - public static void setReplaceByExternalSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - ReplaceByExternalSession replaceByExternalSession) { + public static void setReplaceByExternalSession(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, ReplaceByExternalSession replaceByExternalSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.REPLACE_BY_EXTERNAL_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.REPLACE_BY_EXTERNAL_SESSION, replaceByExternalSession); } // - public static DataMinerOperationSession getDataMinerOperationSession( - HttpServletRequest httpRequest, + public static DataMinerOperationSession getDataMinerOperationSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - DataMinerOperationSession dataMinerOperationSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.DATAMINER_OPERATION_SESSION, - DataMinerOperationSession.class); + DataMinerOperationSession dataMinerOperationSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.DATAMINER_OPERATION_SESSION, DataMinerOperationSession.class); return dataMinerOperationSession; } - public static void setDataMinerOperationSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - DataMinerOperationSession dataMinerOperationSession) { + public static void setDataMinerOperationSession(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, DataMinerOperationSession dataMinerOperationSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.DATAMINER_OPERATION_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.DATAMINER_OPERATION_SESSION, dataMinerOperationSession); } // - public static MapCreationSession getMapCreationSession( - HttpServletRequest httpRequest, + public static MapCreationSession getMapCreationSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - MapCreationSession mapCreationSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.MAP_CREATION_SESSION, - MapCreationSession.class); + MapCreationSession mapCreationSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.MAP_CREATION_SESSION, MapCreationSession.class); return mapCreationSession; } - public static void setMapCreationSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setMapCreationSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, MapCreationSession mapCreationSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.MAP_CREATION_SESSION, mapCreationSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.MAP_CREATION_SESSION, mapCreationSession); } // - public static ChartTopRatingSession getChartTopRatingSession( - HttpServletRequest httpRequest, + public static ChartTopRatingSession getChartTopRatingSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - ChartTopRatingSession chartTopRatingSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.CHART_TOPRATING_SESSION, - ChartTopRatingSession.class); + ChartTopRatingSession chartTopRatingSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.CHART_TOPRATING_SESSION, ChartTopRatingSession.class); return chartTopRatingSession; } - public static void setChartTopRatingSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setChartTopRatingSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, ChartTopRatingSession chartTopRatingSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp - .set(httpRequest, serviceCredentials, - SessionConstants.CHART_TOPRATING_SESSION, - chartTopRatingSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.CHART_TOPRATING_SESSION, chartTopRatingSession); } // Geospatial public static GeospatialCreateCoordinatesSession getGeospatialCreateCoordinatesSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials) throws TDGWTServiceException { + HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - GeospatialCreateCoordinatesSession geospatialCreateCoordinatesSession = sessionOp - .get(httpRequest, serviceCredentials, - SessionConstants.GEOSPATIAL_CREATE_COORDINATES_SESSION, - GeospatialCreateCoordinatesSession.class); + GeospatialCreateCoordinatesSession geospatialCreateCoordinatesSession = sessionOp.get(httpRequest, + serviceCredentials, SessionConstants.GEOSPATIAL_CREATE_COORDINATES_SESSION, + GeospatialCreateCoordinatesSession.class); return geospatialCreateCoordinatesSession; } - public static void setGeospatialCreateCoordinatesSession( - HttpServletRequest httpRequest, + public static void setGeospatialCreateCoordinatesSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, GeospatialCreateCoordinatesSession geospatialCreateCoordinateSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.GEOSPATIAL_CREATE_COORDINATES_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.GEOSPATIAL_CREATE_COORDINATES_SESSION, geospatialCreateCoordinateSession); } // - public static GeospatialDownscaleCSquareSession getGeospatialDownscaleCSquareSession( - HttpServletRequest httpRequest, + public static GeospatialDownscaleCSquareSession getGeospatialDownscaleCSquareSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - GeospatialDownscaleCSquareSession geospatialDownscaleCSquareSession = sessionOp - .get(httpRequest, serviceCredentials, - SessionConstants.GEOSPATIAL_DOWNSCALE_CSQUARE_SESSION, - GeospatialDownscaleCSquareSession.class); + GeospatialDownscaleCSquareSession geospatialDownscaleCSquareSession = sessionOp.get(httpRequest, + serviceCredentials, SessionConstants.GEOSPATIAL_DOWNSCALE_CSQUARE_SESSION, + GeospatialDownscaleCSquareSession.class); return geospatialDownscaleCSquareSession; } - public static void setGeospatialDownscaleCSquareSession( - HttpServletRequest httpRequest, + public static void setGeospatialDownscaleCSquareSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, GeospatialDownscaleCSquareSession geospatialDownscaleCSquareSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.GEOSPATIAL_DOWNSCALE_CSQUARE_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.GEOSPATIAL_DOWNSCALE_CSQUARE_SESSION, geospatialDownscaleCSquareSession); } // Geometry - public static GeometryCreatePointSession getGeometryCreatePointSession( - HttpServletRequest httpRequest, + public static GeometryCreatePointSession getGeometryCreatePointSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - GeometryCreatePointSession geometryCreatePointSession = sessionOp.get( - httpRequest, serviceCredentials, - SessionConstants.GEOMETRY_CREATE_POINT_SESSION, - GeometryCreatePointSession.class); + GeometryCreatePointSession geometryCreatePointSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.GEOMETRY_CREATE_POINT_SESSION, GeometryCreatePointSession.class); return geometryCreatePointSession; } - public static void setGeometryCreatePointSession( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - GeometryCreatePointSession geometryCreatePointSession) { + public static void setGeometryCreatePointSession(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, GeometryCreatePointSession geometryCreatePointSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.GEOMETRY_CREATE_POINT_SESSION, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.GEOMETRY_CREATE_POINT_SESSION, geometryCreatePointSession); } @@ -1828,12 +1419,15 @@ public class SessionUtil { * Retrieve task started * * @param httpRequest + * Request * @param serviceCredentials + * Service Credentials * @param taskId - * @return + * Task id + * @return Task Wrapper */ - public static TaskWrapper getStartedTask(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, String taskId) { + public static TaskWrapper getStartedTask(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + String taskId) { TaskWrapper taskWrapper = null; @@ -1841,8 +1435,7 @@ public class SessionUtil { logger.error("TaskId is not valid: " + taskId); } else { SessionOp> sessionOp = new SessionOp<>(); - HashMap tasksStarted = sessionOp.get( - httpRequest, serviceCredentials, + HashMap tasksStarted = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_STARTED_MAP); if (tasksStarted == null) { logger.debug("Task with id=" + taskId + " was not acquired"); @@ -1862,19 +1455,21 @@ public class SessionUtil { * * * @param httpRequest + * Request * @param serviceCredentials + * Service credendials * @param taskWrapper + * Task wrapper */ - public static void removeStartedTask(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TaskWrapper taskWrapper) { + public static void removeStartedTask(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TaskWrapper taskWrapper) { if (taskWrapper == null) { logger.error("TaskWrapper is null"); return; } - if (taskWrapper.getTask() == null - || taskWrapper.getTask().getId() == null + if (taskWrapper.getTask() == null || taskWrapper.getTask().getId() == null || taskWrapper.getTask().getId().getValue() == null || taskWrapper.getTask().getId().getValue().isEmpty()) { logger.error("TaskWrapper contains invalid Task: " + taskWrapper); @@ -1882,14 +1477,12 @@ public class SessionUtil { } SessionOp> sessionOp = new SessionOp<>(); - HashMap tasksStarted = sessionOp.get(httpRequest, - serviceCredentials, + HashMap tasksStarted = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_STARTED_MAP); if (tasksStarted == null) { logger.debug("Started tasks was not acquired: " + taskWrapper); } else { - if (tasksStarted.containsKey(taskWrapper.getTask().getId() - .getValue())) { + if (tasksStarted.containsKey(taskWrapper.getTask().getId().getValue())) { tasksStarted.remove(taskWrapper.getTask().getId().getValue()); logger.debug("Remove task: " + taskWrapper); } else { @@ -1902,19 +1495,21 @@ public class SessionUtil { * Add Task Started * * @param httpRequest + * Request * @param serviceCredentials + * Service Credentials * @param taskWrapper + * Task wrapper */ - public static void setStartedTask(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TaskWrapper taskWrapper) { + public static void setStartedTask(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TaskWrapper taskWrapper) { if (taskWrapper == null) { logger.error("TaskWrapper is null"); return; } - if (taskWrapper.getTask() == null - || taskWrapper.getTask().getId() == null + if (taskWrapper.getTask() == null || taskWrapper.getTask().getId() == null || taskWrapper.getTask().getId().getValue() == null || taskWrapper.getTask().getId().getValue().isEmpty()) { logger.error("TaskWrapper contains invalid Task: " + taskWrapper); @@ -1922,21 +1517,17 @@ public class SessionUtil { } SessionOp> sessionOp = new SessionOp<>(); - HashMap tasksStarted = sessionOp.get(httpRequest, - serviceCredentials, + HashMap tasksStarted = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_STARTED_MAP); if (tasksStarted == null) { tasksStarted = new HashMap(); - tasksStarted.put(taskWrapper.getTask().getId().getValue(), - taskWrapper); + tasksStarted.put(taskWrapper.getTask().getId().getValue(), taskWrapper); sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SCOPE_TO_OPERATIONS_TASKS_STARTED_MAP, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_STARTED_MAP, tasksStarted); } else { - tasksStarted.put(taskWrapper.getTask().getId().getValue(), - taskWrapper); + tasksStarted.put(taskWrapper.getTask().getId().getValue(), taskWrapper); } } @@ -1945,16 +1536,16 @@ public class SessionUtil { * Retrieve Aborted Task Map * * @param httpRequest + * Request * @param serviceCredentials - * @return + * Service credentials + * @return Map from operation to task wrapper in scope */ - public static HashMap getAbortedTaskMap( - HttpServletRequest httpRequest, + public static HashMap getAbortedTaskMap(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp> sessionOp = new SessionOp<>(); - HashMap tasksAborted = sessionOp.get(httpRequest, - serviceCredentials, + HashMap tasksAborted = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_ABORTED_MAP); return tasksAborted; @@ -1963,40 +1554,38 @@ public class SessionUtil { /** * * @param httpRequest + * Request * @param serviceCredentials + * Service Credentials * @param taskWrapper + * Task wrapper */ - public static void setAbortedTasks(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TaskWrapper taskWrapper) { + public static void setAbortedTasks(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TaskWrapper taskWrapper) { if (taskWrapper == null || taskWrapper.getTask() == null) { logger.error("TaskWrapper is null"); return; } - if (taskWrapper.getTask().getId() == null - || taskWrapper.getTask().getId().getValue() == null + if (taskWrapper.getTask().getId() == null || taskWrapper.getTask().getId().getValue() == null || taskWrapper.getTask().getId().getValue().isEmpty()) { logger.error("TaskWrapper contains invalid Task: " + taskWrapper); return; } SessionOp> sessionOp = new SessionOp<>(); - HashMap tasksAborted = sessionOp.get(httpRequest, - serviceCredentials, + HashMap tasksAborted = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_ABORTED_MAP); if (tasksAborted == null) { tasksAborted = new HashMap(); - tasksAborted.put(taskWrapper.getTask().getId().getValue(), - taskWrapper); + tasksAborted.put(taskWrapper.getTask().getId().getValue(), taskWrapper); sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SCOPE_TO_OPERATIONS_TASKS_ABORTED_MAP, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_ABORTED_MAP, tasksAborted); } else { - tasksAborted.put(taskWrapper.getTask().getId().getValue(), - taskWrapper); + tasksAborted.put(taskWrapper.getTask().getId().getValue(), taskWrapper); } } @@ -2007,16 +1596,16 @@ public class SessionUtil { * * * @param httpRequest + * Request * @param serviceCredentials - * @return + * Service credentials + * @return Map */ - public static HashMap getHiddenTaskMap( - HttpServletRequest httpRequest, + public static HashMap getHiddenTaskMap(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp> sessionOp = new SessionOp<>(); - HashMap tasksHidden = sessionOp.get(httpRequest, - serviceCredentials, + HashMap tasksHidden = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_HIDDEN_MAP); return tasksHidden; @@ -2025,19 +1614,21 @@ public class SessionUtil { /** * * @param httpRequest + * Request * @param serviceCredentials + * Service credentials * @param taskWrapper + * Task wrapper */ - public static void setHiddenTask(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TaskWrapper taskWrapper) { + public static void setHiddenTask(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TaskWrapper taskWrapper) { if (taskWrapper == null) { logger.error("TaskWrapper is null"); return; } - if (taskWrapper.getTask() == null - || taskWrapper.getTask().getId() == null + if (taskWrapper.getTask() == null || taskWrapper.getTask().getId() == null || taskWrapper.getTask().getId().getValue() == null || taskWrapper.getTask().getId().getValue().isEmpty()) { logger.error("TaskWrapper contains invalid Task: " + taskWrapper); @@ -2045,21 +1636,17 @@ public class SessionUtil { } SessionOp> sessionOp = new SessionOp<>(); - HashMap tasksHidden = sessionOp.get(httpRequest, - serviceCredentials, + HashMap tasksHidden = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_HIDDEN_MAP); if (tasksHidden == null) { tasksHidden = new HashMap(); - tasksHidden.put(taskWrapper.getTask().getId().getValue(), - taskWrapper); + tasksHidden.put(taskWrapper.getTask().getId().getValue(), taskWrapper); sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.SCOPE_TO_OPERATIONS_TASKS_HIDDEN_MAP, + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_HIDDEN_MAP, tasksHidden); } else { - tasksHidden.put(taskWrapper.getTask().getId().getValue(), - taskWrapper); + tasksHidden.put(taskWrapper.getTask().getId().getValue(), taskWrapper); } } @@ -2067,16 +1654,16 @@ public class SessionUtil { * Retrieve Tasks In Background * * @param httpRequest + * Request * @param serviceCredentials - * @return + * Service credentials + * @return Tasks in background */ - public static HashMap getTaskInBackgroundMap( - HttpServletRequest httpRequest, + public static HashMap getTaskInBackgroundMap(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp> sessionOp = new SessionOp<>(); - HashMap tasksInBackground = sessionOp.get( - httpRequest, serviceCredentials, + HashMap tasksInBackground = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_IN_BACKGROUND_MAP); return tasksInBackground; } @@ -2086,19 +1673,21 @@ public class SessionUtil { * * * @param httpRequest + * Request * @param serviceCredentials + * Service credentials * @param taskWrapper + * Task wrapper */ - public static void setTaskInBackground(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TaskWrapper taskWrapper) { + public static void setTaskInBackground(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TaskWrapper taskWrapper) { if (taskWrapper == null) { logger.error("TaskWrapper is null"); return; } - if (taskWrapper.getTask() == null - || taskWrapper.getTask().getId() == null + if (taskWrapper.getTask() == null || taskWrapper.getTask().getId() == null || taskWrapper.getTask().getId().getValue() == null || taskWrapper.getTask().getId().getValue().isEmpty()) { logger.error("TaskWrapper contains invalid Task: " + taskWrapper); @@ -2106,23 +1695,17 @@ public class SessionUtil { } SessionOp> sessionOp = new SessionOp<>(); - HashMap tasksInBackground = sessionOp.get( - httpRequest, serviceCredentials, + HashMap tasksInBackground = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_IN_BACKGROUND_MAP); if (tasksInBackground == null) { tasksInBackground = new HashMap(); - tasksInBackground.put(taskWrapper.getTask().getId().getValue(), - taskWrapper); + tasksInBackground.put(taskWrapper.getTask().getId().getValue(), taskWrapper); sessionOp = new SessionOp<>(); - sessionOp - .set(httpRequest, - serviceCredentials, - SessionConstants.SCOPE_TO_OPERATIONS_TASKS_IN_BACKGROUND_MAP, - tasksInBackground); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_IN_BACKGROUND_MAP, + tasksInBackground); } else { - tasksInBackground.put(taskWrapper.getTask().getId().getValue(), - taskWrapper); + tasksInBackground.put(taskWrapper.getTask().getId().getValue(), taskWrapper); } } @@ -2132,19 +1715,21 @@ public class SessionUtil { * * * @param httpRequest + * Request * @param serviceCredentials + * Service credentials * @param taskWrapper + * Task wrapper */ - public static void removeTaskInBackground(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TaskWrapper taskWrapper) { + public static void removeTaskInBackground(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TaskWrapper taskWrapper) { if (taskWrapper == null) { logger.error("TaskWrapper is null"); return; } - if (taskWrapper.getTask() == null - || taskWrapper.getTask().getId() == null + if (taskWrapper.getTask() == null || taskWrapper.getTask().getId() == null || taskWrapper.getTask().getId().getValue() == null || taskWrapper.getTask().getId().getValue().isEmpty()) { logger.error("TaskWrapper contains invalid Task: " + taskWrapper); @@ -2152,20 +1737,16 @@ public class SessionUtil { } SessionOp> sessionOp = new SessionOp<>(); - HashMap tasksInBackground = sessionOp.get( - httpRequest, serviceCredentials, + HashMap tasksInBackground = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_IN_BACKGROUND_MAP); if (tasksInBackground == null) { logger.debug("Tasks In Background was not acquired: " + taskWrapper); } else { - if (tasksInBackground.containsKey(taskWrapper.getTask().getId() - .getValue())) { - tasksInBackground.remove(taskWrapper.getTask().getId() - .getValue()); + if (tasksInBackground.containsKey(taskWrapper.getTask().getId().getValue())) { + tasksInBackground.remove(taskWrapper.getTask().getId().getValue()); logger.debug("Remove Task In Background: " + taskWrapper); } else { - logger.debug("Task In Background was not acquired: " - + taskWrapper); + logger.debug("Task In Background was not acquired: " + taskWrapper); } } @@ -2175,15 +1756,15 @@ public class SessionUtil { * Remove All Background Tasks in the scope * * @param httpRequest + * Requet * @param serviceCredentials + * Service credentials */ - public static void removeAllTasksInBackground( - HttpServletRequest httpRequest, + public static void removeAllTasksInBackground(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { SessionOp> sessionOp = new SessionOp<>(); - sessionOp.remove(httpRequest, serviceCredentials, - SessionConstants.SCOPE_TO_OPERATIONS_TASKS_IN_BACKGROUND_MAP); + sessionOp.remove(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_IN_BACKGROUND_MAP); } @@ -2192,11 +1773,13 @@ public class SessionUtil { * * * @param httpRequest + * Request * @param serviceCredentials + * Service credentials * @param trId + * TR id */ - public static void removeTaskInBackgroundOnTRId( - HttpServletRequest httpRequest, + public static void removeTaskInBackgroundOnTRId(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, TRId trId) { if (trId == null) { @@ -2210,8 +1793,7 @@ public class SessionUtil { } SessionOp> sessionOp = new SessionOp<>(); - HashMap tasksInBackground = sessionOp.get( - httpRequest, serviceCredentials, + HashMap tasksInBackground = sessionOp.get(httpRequest, serviceCredentials, SessionConstants.SCOPE_TO_OPERATIONS_TASKS_IN_BACKGROUND_MAP); if (tasksInBackground == null) { @@ -2220,10 +1802,8 @@ public class SessionUtil { ArrayList removableKeys = new ArrayList(); for (String key : tasksInBackground.keySet()) { TaskWrapper taskWrapper = tasksInBackground.get(key); - if (taskWrapper.getTrId() != null - && taskWrapper.getTrId().getId() != null - && taskWrapper.getTrId().getId() - .compareTo(trId.getId()) == 0) { + if (taskWrapper.getTrId() != null && taskWrapper.getTrId().getId() != null + && taskWrapper.getTrId().getId().compareTo(trId.getId()) == 0) { removableKeys.add(key); } } @@ -2236,42 +1816,34 @@ public class SessionUtil { } - // TODO - public static FileUploadMonitor getFileUploadMonitor( - HttpServletRequest httpRequest, + // + public static FileUploadMonitor getFileUploadMonitor(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - FileUploadMonitor fileUploadMonitor = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.FILE_UPLOAD_MONITOR, - FileUploadMonitor.class); + FileUploadMonitor fileUploadMonitor = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.FILE_UPLOAD_MONITOR, FileUploadMonitor.class); return fileUploadMonitor; } - public static void setFileUploadMonitor(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setFileUploadMonitor(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, FileUploadMonitor fileUploadMonitor) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.FILE_UPLOAD_MONITOR, fileUploadMonitor); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.FILE_UPLOAD_MONITOR, fileUploadMonitor); } - // TODO - public static SaveResourceSession getSaveResourceSession( - HttpServletRequest httpRequest, + // + public static SaveResourceSession getSaveResourceSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { SessionOp sessionOp = new SessionOp<>(); - SaveResourceSession saveResourceSession = sessionOp.get(httpRequest, - serviceCredentials, SessionConstants.RESOURCE_SAVE_SESSION, - SaveResourceSession.class); + SaveResourceSession saveResourceSession = sessionOp.get(httpRequest, serviceCredentials, + SessionConstants.RESOURCE_SAVE_SESSION, SaveResourceSession.class); return saveResourceSession; } - public static void setSaveResourceSession(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, + public static void setSaveResourceSession(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, SaveResourceSession saveResourceSession) { SessionOp sessionOp = new SessionOp<>(); - sessionOp.set(httpRequest, serviceCredentials, - SessionConstants.RESOURCE_SAVE_SESSION, saveResourceSession); + sessionOp.set(httpRequest, serviceCredentials, SessionConstants.RESOURCE_SAVE_SESSION, saveResourceSession); } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java index 0838a78..1bca60d 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java @@ -310,21 +310,17 @@ import com.google.gwt.user.server.rpc.RemoteServiceServlet; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ -public class TDGWTServiceImpl extends RemoteServiceServlet implements - TDGWTService { +public class TDGWTServiceImpl extends RemoteServiceServlet implements TDGWTService { private static final long serialVersionUID = -5707400086333186368L; - private static Logger logger = LoggerFactory - .getLogger(TDGWTServiceImpl.class); + private static Logger logger = LoggerFactory.getLogger(TDGWTServiceImpl.class); - private static SimpleDateFormat sdf = new SimpleDateFormat( - "yyyy-MM-dd HH:mm"); + private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); - private static SimpleDateFormat sdfPerformance = new SimpleDateFormat( - "yyyy-MM-dd HH:mm:ss.SSS"); + private static SimpleDateFormat sdfPerformance = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); @Override public void init() throws ServletException { @@ -354,14 +350,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("hello()"); - UserInfo userInfo = new UserInfo(serviceCredentials.getUserName(), - serviceCredentials.getGroupId(), - serviceCredentials.getGroupName(), - serviceCredentials.getScope(), - serviceCredentials.getEmail(), + UserInfo userInfo = new UserInfo(serviceCredentials.getUserName(), serviceCredentials.getGroupId(), + serviceCredentials.getGroupName(), serviceCredentials.getScope(), serviceCredentials.getEmail(), serviceCredentials.getFullName()); logger.debug("UserInfo: " + userInfo); return userInfo; @@ -372,8 +364,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("Hello(): " + e.getLocalizedMessage(), e); throw new TDGWTServiceException(e.getLocalizedMessage()); @@ -390,15 +381,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - if (infoLocale == null || infoLocale.getLanguage() == null - || infoLocale.getLanguage().isEmpty()) { + if (infoLocale == null || infoLocale.getLanguage() == null || infoLocale.getLanguage().isEmpty()) { infoLocale = new InfoLocale("en"); } - SessionUtil.setInfoLocale(httpRequest, serviceCredentials, - infoLocale); + SessionUtil.setInfoLocale(httpRequest, serviceCredentials, infoLocale); } catch (TDGWTServiceException e) { e.printStackTrace(); @@ -406,8 +394,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); logger.error("setLocale(): " + e.getLocalizedMessage(), e); @@ -415,12 +402,6 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } } - /** - * Retrieve Messages Bundle - * - * @param httpRequest - * @return - */ protected ResourceBundle getResourceBundle(HttpServletRequest httpRequest) { InfoLocale infoLocale; if (httpRequest == null) { @@ -428,18 +409,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } else { ServiceCredentials serviceCredentials; try { - serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); - infoLocale = SessionUtil.getInfoLocale(httpRequest, - serviceCredentials); + serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); + infoLocale = SessionUtil.getInfoLocale(httpRequest, serviceCredentials); } catch (TDGWTServiceException e) { logger.info("No locale found set default!", e); infoLocale = new InfoLocale("en"); } } Locale locale = new Locale(infoLocale.getLanguage()); - ResourceBundle messages = ResourceBundle.getBundle( - TDGWTServiceMessagesConstants.TDGWTServiceMessages, locale); + ResourceBundle messages = ResourceBundle.getBundle(TDGWTServiceMessagesConstants.TDGWTServiceMessages, locale); return messages; } @@ -449,12 +427,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); FilesStorage filesStorage = new FilesStorage(); - String folderId = filesStorage.getVREFolderIdByScope( - serviceCredentials.getUserName(), + String folderId = filesStorage.getVREFolderIdByScope(serviceCredentials.getUserName(), serviceCredentials.getScope()); return folderId; @@ -464,13 +440,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("getValueDataFormats(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error retrieving value data formats: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving value data formats: " + e.getLocalizedMessage()); } } @@ -479,8 +452,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public ArrayList getPeriodDataTypes() - throws TDGWTServiceException { + public ArrayList getPeriodDataTypes() throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -493,14 +465,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements ArrayList valueDataFormats = new ArrayList(); List listValueFormat = period.getAcceptedFormats(); for (ValueFormat valueF : listValueFormat) { - ValueDataFormat valueDataFormat = new ValueDataFormat( - valueF.getId(), valueF.getExample(), + ValueDataFormat valueDataFormat = new ValueDataFormat(valueF.getId(), valueF.getExample(), valueF.getRegExpr()); valueDataFormats.add(valueDataFormat); } - PeriodDataType periodDataType = new PeriodDataType( - period.name(), period.getName(), valueDataFormats); + PeriodDataType periodDataType = new PeriodDataType(period.name(), period.getName(), valueDataFormats); periodDataTypes.add(periodDataType); } @@ -512,13 +482,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("getPeriodDataTypes(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving period types: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving period types: " + e.getLocalizedMessage()); } } @@ -527,8 +495,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public ArrayList getHierarchicalRelationshipForPeriodDataTypes( - PeriodDataType periodDataType) throws TDGWTServiceException { + public ArrayList getHierarchicalRelationshipForPeriodDataTypes(PeriodDataType periodDataType) + throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -538,25 +506,21 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements PeriodType periodType = PeriodTypeMap.map(periodDataType); - List hierarchicalList = PeriodType - .getHierarchicalRelation().get(periodType); + List hierarchicalList = PeriodType.getHierarchicalRelation().get(periodType); for (PeriodType period : hierarchicalList) { ArrayList valueDataFormats = new ArrayList(); List listValueFormat = period.getAcceptedFormats(); for (ValueFormat valueF : listValueFormat) { - ValueDataFormat valueDataFormat = new ValueDataFormat( - valueF.getId(), valueF.getExample(), + ValueDataFormat valueDataFormat = new ValueDataFormat(valueF.getId(), valueF.getExample(), valueF.getRegExpr()); valueDataFormats.add(valueDataFormat); } - PeriodDataType periodDT = new PeriodDataType(period.name(), - period.getName(), valueDataFormats); + PeriodDataType periodDT = new PeriodDataType(period.name(), period.getName(), valueDataFormats); hierarchicalPeriodDataTypes.add(periodDT); } - logger.debug("hierarchicalPeriodDataTypes: " - + hierarchicalPeriodDataTypes); + logger.debug("hierarchicalPeriodDataTypes: " + hierarchicalPeriodDataTypes); return hierarchicalPeriodDataTypes; } catch (TDGWTServiceException e) { @@ -564,25 +528,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("getPeriodDataTypes(): " + e.getLocalizedMessage(), e); throw new TDGWTServiceException( - "Error retrieving hierarchical list of period types: " - + e.getLocalizedMessage()); + "Error retrieving hierarchical list of period types: " + e.getLocalizedMessage()); } } - /** - * - * @param columnDataType - * @return - * @throws TDGWTServiceException - */ @Override - public HashMap> getValueDataFormatsMap() - throws TDGWTServiceException { + public HashMap> getValueDataFormatsMap() throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -594,13 +549,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements ArrayList valueDataFormats = new ArrayList(); - Class dataType = ColumnDataTypeMap - .mapToDataTypeClass(columnDataType); + Class dataType = ColumnDataTypeMap.mapToDataTypeClass(columnDataType); - for (ValueFormat valueF : DataTypeFormats - .getFormatsPerDataType(dataType)) { - ValueDataFormat valueDataFormat = new ValueDataFormat( - valueF.getId(), valueF.getExample(), + for (ValueFormat valueF : DataTypeFormats.getFormatsPerDataType(dataType)) { + ValueDataFormat valueDataFormat = new ValueDataFormat(valueF.getId(), valueF.getExample(), valueF.getRegExpr()); valueDataFormats.add(valueDataFormat); } @@ -617,25 +569,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("getValueDataFormats(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error retrieving value data formats: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving value data formats: " + e.getLocalizedMessage()); } } - /** - * - * @param columnDataType - * @return - * @throws TDGWTServiceException - */ @Override - public ArrayList getValueDataFormatsOfColumnDataType( - ColumnDataType columnDataType) throws TDGWTServiceException { + public ArrayList getValueDataFormatsOfColumnDataType(ColumnDataType columnDataType) + throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -643,19 +586,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements ArrayList valueDataFormats = new ArrayList(); - Class dataType = ColumnDataTypeMap - .mapToDataTypeClass(columnDataType); + Class dataType = ColumnDataTypeMap.mapToDataTypeClass(columnDataType); - for (ValueFormat valueF : DataTypeFormats - .getFormatsPerDataType(dataType)) { - ValueDataFormat valueDataFormat = new ValueDataFormat( - valueF.getId(), valueF.getExample(), + for (ValueFormat valueF : DataTypeFormats.getFormatsPerDataType(dataType)) { + ValueDataFormat valueDataFormat = new ValueDataFormat(valueF.getId(), valueF.getExample(), valueF.getRegExpr()); valueDataFormats.add(valueDataFormat); } - logger.debug("getValueDataFormatsOfColumnDataType(): [" - + columnDataType + ", " + valueDataFormats + "]"); + logger.debug("getValueDataFormatsOfColumnDataType(): [" + columnDataType + ", " + valueDataFormats + "]"); return valueDataFormats; } catch (TDGWTServiceException e) { @@ -663,15 +602,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "getValueDataFormatsOfColumnDataType(): " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error retrieving value data formats: " - + e.getLocalizedMessage()); + logger.error("getValueDataFormatsOfColumnDataType(): " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving value data formats: " + e.getLocalizedMessage()); } } @@ -684,8 +618,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("pendingTasksRetrieve()"); TabularDataService service = TabularDataServiceFactory.getService(); @@ -700,16 +633,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements Integer pendingNumber = 0; - SessionUtil.removeAllTasksInBackground(httpRequest, - serviceCredentials); + SessionUtil.removeAllTasksInBackground(httpRequest, serviceCredentials); for (TabularResource tr : pendingTR) { logger.debug("Pending Task:" + tr.getId()); - List tasksInitializing = service.getTasks(tr.getId(), - TaskStatus.INITIALIZING); - List tasksInProgress = service.getTasks(tr.getId(), - TaskStatus.IN_PROGRESS); - List tasksValidatingRules = service.getTasks(tr.getId(), - TaskStatus.VALIDATING_RULES); + List tasksInitializing = service.getTasks(tr.getId(), TaskStatus.INITIALIZING); + List tasksInProgress = service.getTasks(tr.getId(), TaskStatus.IN_PROGRESS); + List tasksValidatingRules = service.getTasks(tr.getId(), TaskStatus.VALIDATING_RULES); HashMap tasks = new HashMap(); for (Task t : tasksInitializing) { tasks.put(t.getId().getValue(), t); @@ -723,10 +652,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TRId trId = new TRId(String.valueOf(tr.getId().getValue())); for (String key : tasks.keySet()) { - TaskWrapper taskWrapper = new TaskWrapper(tasks.get(key), - UIOperationsId.Pending, trId); - SessionUtil.setTaskInBackground(httpRequest, - serviceCredentials, taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(tasks.get(key), UIOperationsId.Pending, trId); + SessionUtil.setTaskInBackground(httpRequest, serviceCredentials, taskWrapper); pendingNumber++; } } @@ -738,12 +665,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("pendingTaskRetrieve(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving pending tasks: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving pending tasks: " + e.getLocalizedMessage()); } } @@ -756,55 +681,40 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - if (startTRId == null || startTRId.getId() == null - || startTRId.getId().isEmpty()) { + if (startTRId == null || startTRId.getId() == null || startTRId.getId().isEmpty()) { - TRId trId = SessionUtil - .getTRId(httpRequest, serviceCredentials); + TRId trId = SessionUtil.getTRId(httpRequest, serviceCredentials); logger.debug("restoreUISession()"); if (trId == null) { logger.error("No UI Session"); return null; } else { logger.debug("Restore UI Session():" + trId); - SessionUtil.removeAllFromCurrentTabularResourcesOpen( - httpRequest, serviceCredentials); - TabResource tabResource = SessionUtil.getTabResource( - httpRequest, serviceCredentials); - SessionUtil.addToCurrentTabularResourcesOpen(httpRequest, - serviceCredentials, tabResource); + SessionUtil.removeAllFromCurrentTabularResourcesOpen(httpRequest, serviceCredentials); + TabResource tabResource = SessionUtil.getTabResource(httpRequest, serviceCredentials); + SessionUtil.addToCurrentTabularResourcesOpen(httpRequest, serviceCredentials, tabResource); } return trId; } else { - logger.debug("Restore UI Session() request TabularResource:" - + startTRId); - SessionUtil.removeAllFromCurrentTabularResourcesOpen( - httpRequest, serviceCredentials); + logger.debug("Restore UI Session() request TabularResource:" + startTRId); + SessionUtil.removeAllFromCurrentTabularResourcesOpen(httpRequest, serviceCredentials); - TabularDataService service = TabularDataServiceFactory - .getService(); + TabularDataService service = TabularDataServiceFactory.getService(); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(startTRId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(startTRId.getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); - TabResource tabResource = retrieveTRMetadataFromServiceAndLastTable( - service, tabularResource, 1); + TabResource tabResource = retrieveTRMetadataFromServiceAndLastTable(service, tabularResource, 1); - if (tabResource.getTrId() == null - || tabResource.getTrId().getId() == null + if (tabResource.getTrId() == null || tabResource.getTrId().getId() == null || tabResource.getTrId().getId().isEmpty()) { return null; } else { - setCurrentTabResource(httpRequest, serviceCredentials, - tabResource); + setCurrentTabResource(httpRequest, serviceCredentials, tabResource); } return tabResource.getTrId(); @@ -815,12 +725,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("restoreUISession(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error in UI Session Restore: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in UI Session Restore: " + e.getLocalizedMessage()); } } @@ -830,13 +738,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public void setTabResource(TabResource tabResource) - throws TDGWTServiceException { + public void setTabResource(TabResource tabResource) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); setCurrentTabResource(httpRequest, serviceCredentials, tabResource); return; @@ -844,30 +750,22 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (TDGWTServiceException e) { throw e; } catch (Throwable e) { - logger.error( - "Error setting TabResource parameter: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error setting TabResource parameter: " - + e.getLocalizedMessage()); + logger.error("Error setting TabResource parameter: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error setting TabResource parameter: " + e.getLocalizedMessage()); } } - private void setCurrentTabResource(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TabResource tabResource) - throws TDGWTServiceException, TDGWTSessionExpiredException { + private void setCurrentTabResource(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TabResource tabResource) throws TDGWTServiceException, TDGWTSessionExpiredException { if (tabResource == null) { logger.error("Error setting TabResource: null"); throw new TDGWTServiceException("Error setting TabResource: null"); } - SessionUtil - .setTabResource(httpRequest, serviceCredentials, tabResource); - SessionUtil.setTRId(httpRequest, serviceCredentials, - tabResource.getTrId()); - SessionUtil.addToCurrentTabularResourcesOpen(httpRequest, - serviceCredentials, tabResource); + SessionUtil.setTabResource(httpRequest, serviceCredentials, tabResource); + SessionUtil.setTRId(httpRequest, serviceCredentials, tabResource.getTrId()); + SessionUtil.addToCurrentTabularResourcesOpen(httpRequest, serviceCredentials, tabResource); return; } @@ -880,15 +778,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); TRId trId = SessionUtil.getTRId(httpRequest, serviceCredentials); logger.debug("getCurrentTRId()"); if (trId == null) { logger.error("Current Tabular Resource is null"); - throw new TDGWTServiceException( - "Current Tabular Resource is null"); + throw new TDGWTServiceException("Current Tabular Resource is null"); } logger.debug("getCurrentTRId():" + trId); @@ -899,12 +795,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("getCurrentTRID(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving TR id: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving TR id: " + e.getLocalizedMessage()); } } @@ -918,13 +812,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); SessionUtil.setTabResource(httpRequest, serviceCredentials, null); SessionUtil.setTRId(httpRequest, serviceCredentials, null); - SessionUtil.removeAllFromCurrentTabularResourcesOpen(httpRequest, - serviceCredentials); + SessionUtil.removeAllFromCurrentTabularResourcesOpen(httpRequest, serviceCredentials); return; } catch (TDGWTServiceException e) { @@ -932,12 +824,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("getCurrentTRID(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving TR id: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving TR id: " + e.getLocalizedMessage()); } } @@ -947,38 +837,29 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public void closeTabularResourceAndOpen(TRId openTRId, TRId closeTRId) - throws TDGWTServiceException { + public void closeTabularResourceAndOpen(TRId openTRId, TRId closeTRId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - logger.debug("closeTabularResourceAndOpen(): Open[" + openTRId - + "], Close[" + closeTRId + "]"); - SessionUtil.removeFromCurrentTabularResourcesOpen(httpRequest, - serviceCredentials, closeTRId); + logger.debug("closeTabularResourceAndOpen(): Open[" + openTRId + "], Close[" + closeTRId + "]"); + SessionUtil.removeFromCurrentTabularResourcesOpen(httpRequest, serviceCredentials, closeTRId); if (openTRId != null) { - TabResource tabResource = SessionUtil - .getFromCurrentTabularResourcesOpen(httpRequest, - serviceCredentials, openTRId); + TabResource tabResource = SessionUtil.getFromCurrentTabularResourcesOpen(httpRequest, + serviceCredentials, openTRId); if (tabResource != null) { - SessionUtil.setTabResource(httpRequest, serviceCredentials, - tabResource); - SessionUtil.setTRId(httpRequest, serviceCredentials, - tabResource.getTrId()); + SessionUtil.setTabResource(httpRequest, serviceCredentials, tabResource); + SessionUtil.setTRId(httpRequest, serviceCredentials, tabResource.getTrId()); } else { - logger.error("Set Active Tabular Resource failed, no valid id!: Open[" - + openTRId + ", " + tabResource); + logger.error( + "Set Active Tabular Resource failed, no valid id!: Open[" + openTRId + ", " + tabResource); throw new TDGWTServiceException( - "Set Active Tabular Resource failed, no valid id!: Open[" - + openTRId + ", " + tabResource); + "Set Active Tabular Resource failed, no valid id!: Open[" + openTRId + ", " + tabResource); } } else { - SessionUtil.setTabResource(httpRequest, serviceCredentials, - null); + SessionUtil.setTabResource(httpRequest, serviceCredentials, null); SessionUtil.setTRId(httpRequest, serviceCredentials, null); } return; @@ -988,29 +869,24 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("getCurrentTRID(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving TR id: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving TR id: " + e.getLocalizedMessage()); } } @Override - public void closeTabularResource(TRId closeTRId) - throws TDGWTServiceException { + public void closeTabularResource(TRId closeTRId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("closeTabularResource(): " + closeTRId); - SessionUtil.removeFromCurrentTabularResourcesOpen(httpRequest, - serviceCredentials, closeTRId); + SessionUtil.removeFromCurrentTabularResourcesOpen(httpRequest, serviceCredentials, closeTRId); SessionUtil.setTabResource(httpRequest, serviceCredentials, null); SessionUtil.setTRId(httpRequest, serviceCredentials, null); @@ -1022,12 +898,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("getCurrentTRID(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving TR id: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving TR id: " + e.getLocalizedMessage()); } } @@ -1037,42 +911,33 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public TRId setActiveTabularResource(TRId activeTRId) - throws TDGWTServiceException { + public TRId setActiveTabularResource(TRId activeTRId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("setActiveTabularResource(): " + activeTRId); - TabResource tabResource = SessionUtil - .getFromCurrentTabularResourcesOpen(httpRequest, - serviceCredentials, activeTRId); + TabResource tabResource = SessionUtil.getFromCurrentTabularResourcesOpen(httpRequest, serviceCredentials, + activeTRId); if (tabResource != null) { - TabularDataService service = TabularDataServiceFactory - .getService(); + TabularDataService service = TabularDataServiceFactory.getService(); - Table table = service.getLastTable(new TabularResourceId(Long - .valueOf(tabResource.getTrId().getId()))); + Table table = service.getLastTable(new TabularResourceId(Long.valueOf(tabResource.getTrId().getId()))); logger.debug("Table retrieved: " + table); if (table == null) { - logger.error("Last Table is Null: " - + Long.valueOf(tabResource.getTrId().getId())); + logger.error("Last Table is Null: " + Long.valueOf(tabResource.getTrId().getId())); new TDGWTServiceException("Last table is null"); } Table viewTable = null; if (table.contains(DatasetViewTableMetadata.class)) { - DatasetViewTableMetadata dwm = table - .getMetadata(DatasetViewTableMetadata.class); + DatasetViewTableMetadata dwm = table.getMetadata(DatasetViewTableMetadata.class); logger.debug("DatasetViewTableMetadata: " + dwm); try { - viewTable = service.getTable(dwm - .getTargetDatasetViewTableId()); + viewTable = service.getTable(dwm.getTargetDatasetViewTableId()); } catch (Exception e) { - logger.error("View table not found: " - + e.getLocalizedMessage()); + logger.error("View table not found: " + e.getLocalizedMessage()); } } else { logger.debug("Table not contains DataseViewTableMetadata"); @@ -1092,43 +957,34 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements trIdNew.setTableType(table.getTableType().getName()); trIdNew.setViewTable(false); tabResource.setTrId(trIdNew); - SessionUtil.addToCurrentTabularResourcesOpen( - httpRequest, serviceCredentials, tabResource); + SessionUtil.addToCurrentTabularResourcesOpen(httpRequest, serviceCredentials, tabResource); } } else { - String tableId = String.valueOf(viewTable.getId() - .getValue()); + String tableId = String.valueOf(viewTable.getId().getValue()); if (tabResource.getTrId().getTableId().compareTo(tableId) == 0) { trIdNew.setTableId(tableId); trIdNew.setTableType(viewTable.getTableType().getName()); - trIdNew.setReferenceTargetTableId(String.valueOf(table - .getId().getValue())); + trIdNew.setReferenceTargetTableId(String.valueOf(table.getId().getValue())); trIdNew.setViewTable(true); tabResource.setTrId(trIdNew); } else { trIdNew.setTableId(tableId); trIdNew.setTableType(viewTable.getTableType().getName()); - trIdNew.setReferenceTargetTableId(String.valueOf(table - .getId().getValue())); + trIdNew.setReferenceTargetTableId(String.valueOf(table.getId().getValue())); trIdNew.setViewTable(true); tabResource.setTrId(trIdNew); - SessionUtil.addToCurrentTabularResourcesOpen( - httpRequest, serviceCredentials, tabResource); + SessionUtil.addToCurrentTabularResourcesOpen(httpRequest, serviceCredentials, tabResource); } } // - SessionUtil.setTabResource(httpRequest, serviceCredentials, - tabResource); - SessionUtil.setTRId(httpRequest, serviceCredentials, - tabResource.getTrId()); + SessionUtil.setTabResource(httpRequest, serviceCredentials, tabResource); + SessionUtil.setTRId(httpRequest, serviceCredentials, tabResource.getTrId()); logger.debug("New Active: " + tabResource.getTrId()); } else { - logger.error("Set Active Tabular Resource failed, no valid id: " - + activeTRId); - throw new TDGWTServiceException( - "Set Active Tabular Resource failed, no valid id: "); + logger.error("Set Active Tabular Resource failed, no valid id: " + activeTRId); + throw new TDGWTServiceException("Set Active Tabular Resource failed, no valid id: "); } return tabResource.getTrId(); @@ -1137,27 +993,22 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("getCurrentTRID(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving TR id: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving TR id: " + e.getLocalizedMessage()); } } @Override - public TabResource getInSessionTabResourceInfo() - throws TDGWTServiceException { + public TabResource getInSessionTabResourceInfo() throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - TabResource currentTR = SessionUtil.getTabResource(httpRequest, - serviceCredentials); + TabResource currentTR = SessionUtil.getTabResource(httpRequest, serviceCredentials); return currentTR; } catch (TDGWTServiceException e) { @@ -1165,15 +1016,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error setting TabResource parameter: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error setting TabResource parameter: " - + e.getLocalizedMessage()); + logger.error("Error setting TabResource parameter: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error setting TabResource parameter: " + e.getLocalizedMessage()); } } @@ -1186,30 +1032,25 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - TabResource currentTR = SessionUtil.getTabResource(httpRequest, - serviceCredentials); + TabResource currentTR = SessionUtil.getTabResource(httpRequest, serviceCredentials); if (currentTR == null) { logger.error("Current Tabular Resource is null"); - throw new TDGWTServiceException( - "Current Tabular Resource is null"); + throw new TDGWTServiceException("Current Tabular Resource is null"); } logger.debug("GetTabResourceInformation():" + currentTR.toString()); if (currentTR.getTrId() == null) { logger.error("Current Tabular Resource has TRId null"); - throw new TDGWTServiceException( - "Current Tabular Resource has TRId null"); + throw new TDGWTServiceException("Current Tabular Resource has TRId null"); } logger.debug("Current TRId: " + currentTR.getTrId()); TabularDataService service = TabularDataServiceFactory.getService(); TabularResource tr = service - .getTabularResource(new TabularResourceId(Long - .valueOf(currentTR.getTrId().getId()))); + .getTabularResource(new TabularResourceId(Long.valueOf(currentTR.getTrId().getId()))); ArrayList trMetadatas = getTRMetadata(tr); updateTabResourceInformation(currentTR, trMetadatas); @@ -1222,10 +1063,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements currentTR.setOwner(owner); currentTR.setContacts(retrieveShareInfo(tr)); - SessionUtil.setTabResource(httpRequest, serviceCredentials, - currentTR); - logger.debug("GetTabResourceInformation() updated information:" - + currentTR.toString()); + SessionUtil.setTabResource(httpRequest, serviceCredentials, currentTR); + logger.debug("GetTabResourceInformation() updated information:" + currentTR.toString()); return currentTR; } catch (TDGWTServiceException e) { @@ -1233,15 +1072,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error setting TabResource parameter: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error setting TabResource parameter: " - + e.getLocalizedMessage()); + logger.error("Error setting TabResource parameter: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error setting TabResource parameter: " + e.getLocalizedMessage()); } } @@ -1250,8 +1084,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public TabResource getTabResourceInformation(TRId trId) - throws TDGWTServiceException { + public TabResource getTabResourceInformation(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -1259,8 +1092,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements if (trId == null) { logger.error("GetTabularREsourceInformation TRId is null"); - throw new TDGWTServiceException( - "GetTabularREsourceInformation TRId is null"); + throw new TDGWTServiceException("GetTabularREsourceInformation TRId is null"); } logger.debug("GetTabResourceInformation:" + trId); @@ -1270,8 +1102,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); TabularResource tr = service - .getTabularResource(new TabularResourceId(Long - .valueOf(currentTR.getTrId().getId()))); + .getTabularResource(new TabularResourceId(Long.valueOf(currentTR.getTrId().getId()))); logger.debug("GetTabResourceInformation() TR on service: " + tr); ArrayList trMetadatas = getTRMetadata(tr); @@ -1285,8 +1116,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements currentTR.setOwner(owner); currentTR.setContacts(retrieveShareInfo(tr)); - logger.debug("GetTabResourceInformation() updated information:" - + currentTR); + logger.debug("GetTabResourceInformation() updated information:" + currentTR); return currentTR; } catch (TDGWTServiceException e) { @@ -1294,53 +1124,36 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error setting TabResource parameter: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error setting TabResource parameter: " - + e.getLocalizedMessage()); + logger.error("Error setting TabResource parameter: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error setting TabResource parameter: " + e.getLocalizedMessage()); } } - private void updateTabResourceInformation(TabResource tabResource, - ArrayList trMetadatas) { + private void updateTabResourceInformation(TabResource tabResource, ArrayList trMetadatas) { for (TRMetadata trMetadata : trMetadatas) { if (trMetadata instanceof TRDescriptionMetadata) { - tabResource.setDescription(((TRDescriptionMetadata) trMetadata) - .getValue()); + tabResource.setDescription(((TRDescriptionMetadata) trMetadata).getValue()); } else { if (trMetadata instanceof TRNameMetadata) { - tabResource.setName(((TRNameMetadata) trMetadata) - .getValue()); + tabResource.setName(((TRNameMetadata) trMetadata).getValue()); } else { if (trMetadata instanceof TRAgencyMetadata) { - tabResource.setAgency(((TRAgencyMetadata) trMetadata) - .getValue()); + tabResource.setAgency(((TRAgencyMetadata) trMetadata).getValue()); } else { if (trMetadata instanceof TRRightsMetadata) { - tabResource - .setRight(((TRRightsMetadata) trMetadata) - .getValue()); + tabResource.setRight(((TRRightsMetadata) trMetadata).getValue()); } else { if (trMetadata instanceof TRValidSinceMetadata) { - tabResource - .setValidFrom(((TRValidSinceMetadata) trMetadata) - .getValue()); + tabResource.setValidFrom(((TRValidSinceMetadata) trMetadata).getValue()); } else { if (trMetadata instanceof TRValidUntilMetadata) { - tabResource - .setValidUntilTo(((TRValidUntilMetadata) trMetadata) - .getValue()); + tabResource.setValidUntilTo(((TRValidUntilMetadata) trMetadata).getValue()); } else { if (trMetadata instanceof TRLicenceMetadata) { - tabResource - .setLicence(((TRLicenceMetadata) trMetadata) - .getValue()); + tabResource.setLicence(((TRLicenceMetadata) trMetadata).getValue()); } else { } @@ -1354,13 +1167,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } } - /** - * Return Time Table id - * - * {@inheritDoc} - */ - public Long getTimeTableId(PeriodDataType periodDataType) - throws TDGWTServiceException { + public Long getTimeTableId(PeriodDataType periodDataType) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -1368,11 +1175,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - Table table = service.getTimeTable(PeriodTypeMap - .map(periodDataType)); + Table table = service.getTimeTable(PeriodTypeMap.map(periodDataType)); if (table == null || table.getId() == null) { - throw new TDGWTServiceException("Error retrieving Time Table: " - + table); + throw new TDGWTServiceException("Error retrieving Time Table: " + table); } return table.getId().getValue(); @@ -1382,19 +1187,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error retrieving Time Table: " + e.getLocalizedMessage(), - e); - throw new TDGWTServiceException("Error retrieving Time Table: " - + e.getLocalizedMessage()); + logger.error("Error retrieving Time Table: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving Time Table: " + e.getLocalizedMessage()); } } /** - * Returns ArrayList other than IdColumnType, + * Returns ArrayList of ColumnData other than IdColumnType, * ValidationColumnType and ViewColumn * * {@inheritDoc} @@ -1403,22 +1204,18 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - TabResource currentTR = SessionUtil.getTabResource(httpRequest, - serviceCredentials); + TabResource currentTR = SessionUtil.getTabResource(httpRequest, serviceCredentials); if (currentTR == null) { logger.error("Current Tabular Resource is null"); - throw new TDGWTServiceException( - "Current Tabular Resource is null"); + throw new TDGWTServiceException("Current Tabular Resource is null"); } TRId trId = currentTR.getTrId(); TabularDataService service = TabularDataServiceFactory.getService(); - Table table = service.getLastTable(new TabularResourceId(Long - .valueOf(trId.getId()))); + Table table = service.getLastTable(new TabularResourceId(Long.valueOf(trId.getId()))); ArrayList columns = new ArrayList(); @@ -1426,8 +1223,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements int i = 0; for (Column c : cols) { - if (c.getColumnType() instanceof IdColumnType - || c.getColumnType() instanceof ValidationColumnType) { + if (c.getColumnType() instanceof IdColumnType || c.getColumnType() instanceof ValidationColumnType) { } else { if (c.contains(ViewColumnMetadata.class)) { @@ -1443,18 +1239,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements PeriodTypeMetadata periodTypeMetadata = null; if (c.contains(PeriodTypeMetadata.class)) { - periodTypeMetadata = c - .getMetadata(PeriodTypeMetadata.class); - PeriodType periodType = periodTypeMetadata - .getType(); - cData.setPeriodDataType(PeriodTypeMap - .map(periodType)); + periodTypeMetadata = c.getMetadata(PeriodTypeMetadata.class); + PeriodType periodType = periodTypeMetadata.getType(); + cData.setPeriodDataType(PeriodTypeMap.map(periodType)); } ColumnRelationship rel = c.getRelationship(); if (rel != null) { - RelationshipData relData = retrieveRelationship( - service, table, c, periodTypeMetadata, rel); + RelationshipData relData = retrieveRelationship(service, table, c, periodTypeMetadata, rel); cData.setRelationship(relData); } @@ -1473,22 +1265,19 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements cData.setLabel("nolabel"); logger.debug("ColumnLabel no label in en"); } else { - if (cl.getValue() == null - || cl.getValue().isEmpty()) { + if (cl.getValue() == null || cl.getValue().isEmpty()) { cData.setLabel("nolabel"); logger.debug("ColumnLabel no label in en"); } else { cData.setLabel(cl.getValue()); - logger.debug("Column Set Label: " - + cl.getValue()); + logger.debug("Column Set Label: " + cl.getValue()); } } } DataLocaleMetadata dataLocaleMetadata = null; if (c.contains(DataLocaleMetadata.class)) { - dataLocaleMetadata = c - .getMetadata(DataLocaleMetadata.class); + dataLocaleMetadata = c.getMetadata(DataLocaleMetadata.class); cData.setLocale(dataLocaleMetadata.getLocale()); } @@ -1506,26 +1295,22 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error retrieving Columns: " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving Columns: " - + e.getLocalizedMessage()); + logger.error("Error retrieving Columns: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving Columns: " + e.getLocalizedMessage()); } } /** - * Returns ArrayList other than IdColumnType, + * Returns ArrayList of ColumnData other than IdColumnType, * ValidationColumnType and ViewColumn * * * {@inheritDoc} */ @Override - public ArrayList getColumns(TRId trId) - throws TDGWTServiceException { + public ArrayList getColumns(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -1535,16 +1320,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("getColumns():" + trId); - Table table = service.getTable(new TableId(Long.valueOf(trId - .getTableId()))); + Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); ArrayList columns = new ArrayList(); List cols = table.getColumns(); int i = 0; for (Column c : cols) { - if (c.getColumnType() instanceof IdColumnType - || c.getColumnType() instanceof ValidationColumnType) { + if (c.getColumnType() instanceof IdColumnType || c.getColumnType() instanceof ValidationColumnType) { } else { if (c.contains(ViewColumnMetadata.class)) { @@ -1560,18 +1343,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements PeriodTypeMetadata periodTypeMetadata = null; if (c.contains(PeriodTypeMetadata.class)) { - periodTypeMetadata = c - .getMetadata(PeriodTypeMetadata.class); - PeriodType periodType = periodTypeMetadata - .getType(); - cData.setPeriodDataType(PeriodTypeMap - .map(periodType)); + periodTypeMetadata = c.getMetadata(PeriodTypeMetadata.class); + PeriodType periodType = periodTypeMetadata.getType(); + cData.setPeriodDataType(PeriodTypeMap.map(periodType)); } ColumnRelationship rel = c.getRelationship(); if (rel != null) { - RelationshipData relData = retrieveRelationship( - service, table, c, periodTypeMetadata, rel); + RelationshipData relData = retrieveRelationship(service, table, c, periodTypeMetadata, rel); cData.setRelationship(relData); } @@ -1591,22 +1370,19 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements cData.setLabel("nolabel"); logger.debug("ColumnLabel no label in en"); } else { - if (cl.getValue() == null - || cl.getValue().isEmpty()) { + if (cl.getValue() == null || cl.getValue().isEmpty()) { cData.setLabel("nolabel"); logger.debug("ColumnLabel no label in en"); } else { cData.setLabel(cl.getValue()); - logger.debug("Column Set Label: " - + cl.getValue()); + logger.debug("Column Set Label: " + cl.getValue()); } } } DataLocaleMetadata dataLocaleMetadata = null; if (c.contains(DataLocaleMetadata.class)) { - dataLocaleMetadata = c - .getMetadata(DataLocaleMetadata.class); + dataLocaleMetadata = c.getMetadata(DataLocaleMetadata.class); cData.setLocale(dataLocaleMetadata.getLocale()); } @@ -1625,26 +1401,22 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error retrieving Columns: " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving Columns: " - + e.getLocalizedMessage()); + logger.error("Error retrieving Columns: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving Columns: " + e.getLocalizedMessage()); } } /** - * Returns ArrayList other than IdColumnType, + * Returns ArrayList of ColumnData other than IdColumnType, * ValidationColumnType * * * {@inheritDoc} */ @Override - public ArrayList getColumnWithViewColumnIncluded(TRId trId) - throws TDGWTServiceException { + public ArrayList getColumnWithViewColumnIncluded(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -1654,16 +1426,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("getColumns():" + trId.toString()); - Table table = service.getTable(new TableId(Long.valueOf(trId - .getTableId()))); + Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); ArrayList columns = new ArrayList(); List cols = table.getColumns(); int i = 0; for (Column c : cols) { - if (c.getColumnType() instanceof IdColumnType - || c.getColumnType() instanceof ValidationColumnType) { + if (c.getColumnType() instanceof IdColumnType || c.getColumnType() instanceof ValidationColumnType) { } else { ColumnData cData = new ColumnData(); @@ -1676,16 +1446,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements PeriodTypeMetadata periodTypeMetadata = null; if (c.contains(PeriodTypeMetadata.class)) { - periodTypeMetadata = c - .getMetadata(PeriodTypeMetadata.class); + periodTypeMetadata = c.getMetadata(PeriodTypeMetadata.class); PeriodType periodType = periodTypeMetadata.getType(); cData.setPeriodDataType(PeriodTypeMap.map(periodType)); } ColumnRelationship rel = c.getRelationship(); if (rel != null) { - RelationshipData relData = retrieveRelationship( - service, table, c, periodTypeMetadata, rel); + RelationshipData relData = retrieveRelationship(service, table, c, periodTypeMetadata, rel); cData.setRelationship(relData); } @@ -1705,28 +1473,24 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements cData.setLabel("nolabel"); logger.debug("ColumnLabel no label in en"); } else { - if (cl.getValue() == null - || cl.getValue().isEmpty()) { + if (cl.getValue() == null || cl.getValue().isEmpty()) { cData.setLabel("nolabel"); logger.debug("ColumnLabel no label in en"); } else { cData.setLabel(cl.getValue()); - logger.debug("Column Set Label: " - + cl.getValue()); + logger.debug("Column Set Label: " + cl.getValue()); } } } DataLocaleMetadata dataLocaleMetadata = null; if (c.contains(DataLocaleMetadata.class)) { - dataLocaleMetadata = c - .getMetadata(DataLocaleMetadata.class); + dataLocaleMetadata = c.getMetadata(DataLocaleMetadata.class); cData.setLocale(dataLocaleMetadata.getLocale()); } if (c.contains(ViewColumnMetadata.class)) { - ColumnViewData columnViewData = retrieveColumnViewData( - service, table, c, periodTypeMetadata); + ColumnViewData columnViewData = retrieveColumnViewData(service, table, c, periodTypeMetadata); cData.setColumnViewData(columnViewData); cData.setViewColumn(true); } else { @@ -1748,18 +1512,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error retrieving Columns: " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving Columns: " - + e.getLocalizedMessage()); + logger.error("Error retrieving Columns: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving Columns: " + e.getLocalizedMessage()); } } /** - * Returns ArrayList other than IdColumnType, + * Returns ArrayList of ColumnData other than IdColumnType, * ValidationColumnType, DimensionColumnType and TimeDimensionColumnType * * @@ -1767,8 +1528,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements */ @Override - public ArrayList getColumnWithOnlyViewColumnInRel(TRId trId) - throws TDGWTServiceException { + public ArrayList getColumnWithOnlyViewColumnInRel(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -1778,8 +1538,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("getColumns():" + trId.toString()); - Table table = service.getTable(new TableId(Long.valueOf(trId - .getTableId()))); + Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); ArrayList columns = new ArrayList(); ArrayList dimensions = new ArrayList(); @@ -1787,8 +1546,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements List cols = table.getColumns(); int i = 0; for (Column c : cols) { - if (c.getColumnType() instanceof IdColumnType - || c.getColumnType() instanceof ValidationColumnType) { + if (c.getColumnType() instanceof IdColumnType || c.getColumnType() instanceof ValidationColumnType) { } else { ColumnData cData = new ColumnData(); @@ -1801,16 +1559,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements PeriodTypeMetadata periodTypeMetadata = null; if (c.contains(PeriodTypeMetadata.class)) { - periodTypeMetadata = c - .getMetadata(PeriodTypeMetadata.class); + periodTypeMetadata = c.getMetadata(PeriodTypeMetadata.class); PeriodType periodType = periodTypeMetadata.getType(); cData.setPeriodDataType(PeriodTypeMap.map(periodType)); } ColumnRelationship rel = c.getRelationship(); if (rel != null) { - RelationshipData relData = retrieveRelationship( - service, table, c, periodTypeMetadata, rel); + RelationshipData relData = retrieveRelationship(service, table, c, periodTypeMetadata, rel); cData.setRelationship(relData); } @@ -1830,28 +1586,24 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements cData.setLabel("nolabel"); logger.debug("ColumnLabel no label in en"); } else { - if (cl.getValue() == null - || cl.getValue().isEmpty()) { + if (cl.getValue() == null || cl.getValue().isEmpty()) { cData.setLabel("nolabel"); logger.debug("ColumnLabel no label in en"); } else { cData.setLabel(cl.getValue()); - logger.debug("Column Set Label: " - + cl.getValue()); + logger.debug("Column Set Label: " + cl.getValue()); } } } DataLocaleMetadata dataLocaleMetadata = null; if (c.contains(DataLocaleMetadata.class)) { - dataLocaleMetadata = c - .getMetadata(DataLocaleMetadata.class); + dataLocaleMetadata = c.getMetadata(DataLocaleMetadata.class); cData.setLocale(dataLocaleMetadata.getLocale()); } if (c.contains(ViewColumnMetadata.class)) { - ColumnViewData columnViewData = retrieveColumnViewData( - service, table, c, periodTypeMetadata); + ColumnViewData columnViewData = retrieveColumnViewData(service, table, c, periodTypeMetadata); cData.setColumnViewData(columnViewData); cData.setViewColumn(true); } else { @@ -1860,10 +1612,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements cData.setTrId(trId); - if (cData.getTypeCode().compareTo( - ColumnTypeCode.DIMENSION.toString()) == 0 - || cData.getTypeCode().compareTo( - ColumnTypeCode.TIMEDIMENSION.toString()) == 0) { + if (cData.getTypeCode().compareTo(ColumnTypeCode.DIMENSION.toString()) == 0 + || cData.getTypeCode().compareTo(ColumnTypeCode.TIMEDIMENSION.toString()) == 0) { dimensions.add(cData); } @@ -1879,18 +1629,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements ColumnData col = columns.get(k); if (col.getColumnId() != null && col.isViewColumn()) { ColumnViewData colViewData = col.getColumnViewData(); - String sourceTableDimensionColumnId = colViewData - .getSourceTableDimensionColumnId(); + String sourceTableDimensionColumnId = colViewData.getSourceTableDimensionColumnId(); for (int j = 0; j < dimensions.size(); j++) { ColumnData dim = dimensions.get(j); - if (dim.getColumnId().compareTo( - sourceTableDimensionColumnId) == 0) { + if (dim.getColumnId().compareTo(sourceTableDimensionColumnId) == 0) { RelationshipData rel = dim.getRelationship(); if (rel != null) { String cId = rel.getTargetColumnId(); - if (cId == null - || cId.compareTo(col.getColumnId()) != 0) { + if (cId == null || cId.compareTo(col.getColumnId()) != 0) { removable.add(col); } } else { @@ -1910,26 +1657,22 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error retrieving Columns: " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving Columns: " - + e.getLocalizedMessage()); + logger.error("Error retrieving Columns: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving Columns: " + e.getLocalizedMessage()); } } /** - * Returns ArrayList other than IdColumnType, + * Returns ArrayList of ColumnData other than IdColumnType, * ValidationColumnType, DimensionColumnType, TimeDimensionColumnType and * only View Columns related * * * {@inheritDoc} */ - public ArrayList getColumnsForStatistical(TRId trId) - throws TDGWTServiceException { + public ArrayList getColumnsForStatistical(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -1939,8 +1682,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("getColumns():" + trId.toString()); - Table table = service.getTable(new TableId(Long.valueOf(trId - .getTableId()))); + Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); ArrayList columns = new ArrayList(); ArrayList columnsDimension = new ArrayList(); @@ -1948,8 +1690,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements List cols = table.getColumns(); int i = 0; for (Column c : cols) { - if (c.getColumnType() instanceof IdColumnType - || c.getColumnType() instanceof ValidationColumnType) { + if (c.getColumnType() instanceof IdColumnType || c.getColumnType() instanceof ValidationColumnType) { } else { ColumnData cData = new ColumnData(); @@ -1962,16 +1703,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements PeriodTypeMetadata periodTypeMetadata = null; if (c.contains(PeriodTypeMetadata.class)) { - periodTypeMetadata = c - .getMetadata(PeriodTypeMetadata.class); + periodTypeMetadata = c.getMetadata(PeriodTypeMetadata.class); PeriodType periodType = periodTypeMetadata.getType(); cData.setPeriodDataType(PeriodTypeMap.map(periodType)); } ColumnRelationship rel = c.getRelationship(); if (rel != null) { - RelationshipData relData = retrieveRelationship( - service, table, c, periodTypeMetadata, rel); + RelationshipData relData = retrieveRelationship(service, table, c, periodTypeMetadata, rel); cData.setRelationship(relData); } @@ -1990,28 +1729,24 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements cData.setLabel("nolabel"); logger.debug("ColumnLabel no label in en"); } else { - if (cl.getValue() == null - || cl.getValue().isEmpty()) { + if (cl.getValue() == null || cl.getValue().isEmpty()) { cData.setLabel("nolabel"); logger.debug("ColumnLabel no label in en"); } else { cData.setLabel(cl.getValue()); - logger.debug("Column Set Label: " - + cl.getValue()); + logger.debug("Column Set Label: " + cl.getValue()); } } } DataLocaleMetadata dataLocaleMetadata = null; if (c.contains(DataLocaleMetadata.class)) { - dataLocaleMetadata = c - .getMetadata(DataLocaleMetadata.class); + dataLocaleMetadata = c.getMetadata(DataLocaleMetadata.class); cData.setLocale(dataLocaleMetadata.getLocale()); } if (c.contains(ViewColumnMetadata.class)) { - ColumnViewData columnViewData = retrieveColumnViewData( - service, table, c, periodTypeMetadata); + ColumnViewData columnViewData = retrieveColumnViewData(service, table, c, periodTypeMetadata); cData.setColumnViewData(columnViewData); cData.setViewColumn(true); } else { @@ -2039,14 +1774,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements if (cId != null) { for (int j = 0; j < columns.size(); j++) { ColumnData col = columns.get(j); - if (col.getColumnId() != null - && !col.getColumnId().isEmpty() - && col.isViewColumn() + if (col.getColumnId() != null && !col.getColumnId().isEmpty() && col.isViewColumn() && col.getColumnId().compareTo(cId) != 0 - && col.getColumnViewData() - .getSourceTableDimensionColumnId() - .compareTo( - colDimension.getColumnId()) == 0) { + && col.getColumnViewData().getSourceTableDimensionColumnId() + .compareTo(colDimension.getColumnId()) == 0) { columns.remove(col); break; } @@ -2062,99 +1793,73 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error retrieving Columns: " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving Columns: " - + e.getLocalizedMessage()); + logger.error("Error retrieving Columns: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving Columns: " + e.getLocalizedMessage()); } } - private RelationshipData retrieveRelationship(TabularDataService service, - Table table, Column c, PeriodTypeMetadata periodTypeMetadata, - ColumnRelationship rel) throws TDGWTServiceException { + private RelationshipData retrieveRelationship(TabularDataService service, Table table, Column c, + PeriodTypeMetadata periodTypeMetadata, ColumnRelationship rel) throws TDGWTServiceException { RelationshipData relData = null; - if (c.getColumnType().getCode() - .compareTo(ColumnTypeCode.TIMEDIMENSION.toString()) == 0) { - Table timeTable = service - .getTimeTable(periodTypeMetadata.getType()); + if (c.getColumnType().getCode().compareTo(ColumnTypeCode.TIMEDIMENSION.toString()) == 0) { + Table timeTable = service.getTimeTable(periodTypeMetadata.getType()); if (timeTable == null || timeTable.getId() == null) { - throw new TDGWTServiceException("Error retrieving Time Table: " - + table); + throw new TDGWTServiceException("Error retrieving Time Table: " + table); } logger.debug("Time Table Id: " + timeTable.getId()); - Column timeColumn = timeTable.getColumnByName(periodTypeMetadata - .getType().getName()); - relData = new RelationshipData(timeTable.getId().getValue(), - timeColumn.getLocalId().getValue()); + Column timeColumn = timeTable.getColumnByName(periodTypeMetadata.getType().getName()); + relData = new RelationshipData(timeTable.getId().getValue(), timeColumn.getLocalId().getValue()); } else { - relData = new RelationshipData(rel.getTargetTableId().getValue(), - rel.getTargetColumnId().getValue()); + relData = new RelationshipData(rel.getTargetTableId().getValue(), rel.getTargetColumnId().getValue()); } return relData; } - private ColumnViewData retrieveColumnViewData(TabularDataService service, - Table table, Column c, PeriodTypeMetadata periodTypeMetadata) - throws TDGWTServiceException { - ViewColumnMetadata viewMetadata = c - .getMetadata(ViewColumnMetadata.class); + private ColumnViewData retrieveColumnViewData(TabularDataService service, Table table, Column c, + PeriodTypeMetadata periodTypeMetadata) throws TDGWTServiceException { + ViewColumnMetadata viewMetadata = c.getMetadata(ViewColumnMetadata.class); logger.debug("ViewColumnMetadata: " + viewMetadata.toString()); ColumnViewData columnViewData = null; - Column sourceColumn = table.getColumnById(viewMetadata - .getSourceTableDimensionColumnId()); - if (sourceColumn.getColumnType().getCode() - .compareTo(ColumnTypeCode.TIMEDIMENSION.toString()) == 0) { + Column sourceColumn = table.getColumnById(viewMetadata.getSourceTableDimensionColumnId()); + if (sourceColumn.getColumnType().getCode().compareTo(ColumnTypeCode.TIMEDIMENSION.toString()) == 0) { PeriodTypeMetadata periodTypeMetadataSourceColumn = null; if (sourceColumn.contains(PeriodTypeMetadata.class)) { - periodTypeMetadataSourceColumn = sourceColumn - .getMetadata(PeriodTypeMetadata.class); + periodTypeMetadataSourceColumn = sourceColumn.getMetadata(PeriodTypeMetadata.class); - Table timeTable = service - .getTimeTable(periodTypeMetadataSourceColumn.getType()); + Table timeTable = service.getTimeTable(periodTypeMetadataSourceColumn.getType()); if (timeTable == null || timeTable.getId() == null) { - throw new TDGWTServiceException( - "Error retrieving Time Table: " + table); + throw new TDGWTServiceException("Error retrieving Time Table: " + table); } logger.debug("Time Table Id: " + timeTable.getId()); - Column timeColumn = timeTable - .getColumnByName(periodTypeMetadataSourceColumn - .getType().getName()); + Column timeColumn = timeTable.getColumnByName(periodTypeMetadataSourceColumn.getType().getName()); - String sourceTableDimensionColumnId = viewMetadata - .getSourceTableDimensionColumnId().getValue(); + String sourceTableDimensionColumnId = viewMetadata.getSourceTableDimensionColumnId().getValue(); String targetTableColumnId = timeColumn.getLocalId().getValue(); long targetTableId = timeTable.getId().getValue(); - columnViewData = new ColumnViewData( - sourceTableDimensionColumnId, targetTableColumnId, - targetTableId); + columnViewData = new ColumnViewData(sourceTableDimensionColumnId, targetTableColumnId, targetTableId); } else { logger.error("Error retrieving Time Table for view column:" + c - + " , source column do not have a PeriodTypeMetadata: " - + sourceColumn); + + " , source column do not have a PeriodTypeMetadata: " + sourceColumn); throw new TDGWTServiceException( "Error retrieving Time Table, source column do not have a PeriodTypeMetadata"); } } else { - String sourceTableDimensionColumnId = viewMetadata - .getSourceTableDimensionColumnId().getValue(); + String sourceTableDimensionColumnId = viewMetadata.getSourceTableDimensionColumnId().getValue(); - String targetTableColumnId = viewMetadata.getTargetTableColumnId() - .getValue(); + String targetTableColumnId = viewMetadata.getTargetTableColumnId().getValue(); long targetTableId = viewMetadata.getTargetTableId().getValue(); - columnViewData = new ColumnViewData(sourceTableDimensionColumnId, - targetTableColumnId, targetTableId); + columnViewData = new ColumnViewData(sourceTableDimensionColumnId, targetTableColumnId, targetTableId); } return columnViewData; } @@ -2163,8 +1868,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * * {@inheritDoc} */ - public ColumnData getColumn(String columnLocalId, TRId trId) - throws TDGWTServiceException { + public ColumnData getColumn(String columnLocalId, TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -2172,8 +1876,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - Table table = service.getTable(new TableId(Long.valueOf(trId - .getTableId()))); + Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); ColumnData cData = new ColumnData(); ColumnLocalId columnId = new ColumnLocalId(columnLocalId); @@ -2187,15 +1890,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements PeriodTypeMetadata periodTypeMetadata = null; if (c.contains(PeriodTypeMetadata.class)) { - periodTypeMetadata = c - .getMetadata(PeriodTypeMetadata.class); + periodTypeMetadata = c.getMetadata(PeriodTypeMetadata.class); PeriodType periodType = periodTypeMetadata.getType(); cData.setPeriodDataType(PeriodTypeMap.map(periodType)); } if (c.contains(ViewColumnMetadata.class)) { - ColumnViewData columnViewData = retrieveColumnViewData( - service, table, c, periodTypeMetadata); + ColumnViewData columnViewData = retrieveColumnViewData(service, table, c, periodTypeMetadata); cData.setColumnViewData(columnViewData); cData.setViewColumn(true); } else { @@ -2207,8 +1908,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements cData.setDataTypeName(c.getDataType().getName()); ColumnRelationship rel = c.getRelationship(); if (rel != null) { - RelationshipData relData = retrieveRelationship(service, - table, c, periodTypeMetadata, rel); + RelationshipData relData = retrieveRelationship(service, table, c, periodTypeMetadata, rel); cData.setRelationship(relData); } @@ -2239,8 +1939,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements DataLocaleMetadata dataLocaleMetadata = null; if (c.contains(DataLocaleMetadata.class)) { - dataLocaleMetadata = c - .getMetadata(DataLocaleMetadata.class); + dataLocaleMetadata = c.getMetadata(DataLocaleMetadata.class); cData.setLocale(dataLocaleMetadata.getLocale()); } @@ -2255,13 +1954,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error("Error retrieving Column: " + e.getLocalizedMessage(), - e); - throw new TDGWTServiceException("Error retrieving Column: " - + e.getLocalizedMessage()); + logger.error("Error retrieving Column: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving Column: " + e.getLocalizedMessage()); } } @@ -2269,8 +1965,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * * {@inheritDoc} */ - public ColumnData getColumn(TRId trId, String columnName) - throws TDGWTServiceException { + public ColumnData getColumn(TRId trId, String columnName) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -2278,8 +1973,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - Table table = service.getTable(new TableId(Long.valueOf(trId - .getTableId()))); + Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); ColumnData cData = new ColumnData(); @@ -2293,15 +1987,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements PeriodTypeMetadata periodTypeMetadata = null; if (c.contains(PeriodTypeMetadata.class)) { - periodTypeMetadata = c - .getMetadata(PeriodTypeMetadata.class); + periodTypeMetadata = c.getMetadata(PeriodTypeMetadata.class); PeriodType periodType = periodTypeMetadata.getType(); cData.setPeriodDataType(PeriodTypeMap.map(periodType)); } if (c.contains(ViewColumnMetadata.class)) { - ColumnViewData columnViewData = retrieveColumnViewData( - service, table, c, periodTypeMetadata); + ColumnViewData columnViewData = retrieveColumnViewData(service, table, c, periodTypeMetadata); cData.setColumnViewData(columnViewData); cData.setViewColumn(true); } else { @@ -2312,8 +2004,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements cData.setDataTypeName(c.getDataType().getName()); ColumnRelationship rel = c.getRelationship(); if (rel != null) { - RelationshipData relData = retrieveRelationship(service, - table, c, periodTypeMetadata, rel); + RelationshipData relData = retrieveRelationship(service, table, c, periodTypeMetadata, rel); cData.setRelationship(relData); } NamesMetadata labelsMetadata = null; @@ -2343,8 +2034,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements DataLocaleMetadata dataLocaleMetadata = null; if (c.contains(DataLocaleMetadata.class)) { - dataLocaleMetadata = c - .getMetadata(DataLocaleMetadata.class); + dataLocaleMetadata = c.getMetadata(DataLocaleMetadata.class); cData.setLocale(dataLocaleMetadata.getLocale()); } @@ -2359,13 +2049,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error("Error retrieving Column: " + e.getLocalizedMessage(), - e); - throw new TDGWTServiceException("Error retrieving Column: " - + e.getLocalizedMessage()); + logger.error("Error retrieving Column: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving Column: " + e.getLocalizedMessage()); } } @@ -2374,8 +2061,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public ArrayList getValidationColumns(String columnId, TRId trId) - throws TDGWTServiceException { + public ArrayList getValidationColumns(String columnId, TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -2383,11 +2069,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - logger.debug("getValidationColumns():[" + trId.toString() - + " columnLocalId: " + columnId + "]"); + logger.debug("getValidationColumns():[" + trId.toString() + " columnLocalId: " + columnId + "]"); - Table table = service.getTable(new TableId(Long.valueOf(trId - .getTableId()))); + Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); logger.debug("getValidationColumns() on Table: " + table.toString()); ColumnLocalId id = new ColumnLocalId(columnId); @@ -2398,8 +2082,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements throw new TDGWTServiceException("Column not present on table"); } - logger.debug("getValidationColumns(): columnSource " - + columnSource.getLocalId()); + logger.debug("getValidationColumns(): columnSource " + columnSource.getLocalId()); String columnSourceId = columnSource.getLocalId().getValue(); ArrayList columns = new ArrayList(); @@ -2408,17 +2091,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements int i = 0; for (Column c : cols) { if (c.getColumnType() instanceof ValidationColumnType) { - logger.debug("ValidationColumn present: [" - + c.getColumnType() + " " + c.getLocalId() + "]"); + logger.debug("ValidationColumn present: [" + c.getColumnType() + " " + c.getLocalId() + "]"); if (c.contains(ValidationReferencesMetadata.class)) { logger.debug("ValidationReferencesMetadata present"); ValidationReferencesMetadata validationReferenceMetadata = c .getMetadata(ValidationReferencesMetadata.class); - List valColumnList = validationReferenceMetadata - .getValidationReferenceColumn(); + List valColumnList = validationReferenceMetadata.getValidationReferenceColumn(); for (ColumnLocalId columnLocalId : valColumnList) { - if (columnLocalId.getValue().compareTo( - columnSourceId) == 0) { + if (columnLocalId.getValue().compareTo(columnSourceId) == 0) { ColumnData cData = new ColumnData(); cData.setId(Integer.toString(i)); cData.setColumnId(c.getLocalId().getValue()); @@ -2428,11 +2108,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements cData.setDataTypeName(c.getDataType().getName()); NamesMetadata labelsMetadata = null; try { - labelsMetadata = c - .getMetadata(NamesMetadata.class); + labelsMetadata = c.getMetadata(NamesMetadata.class); } catch (NoSuchMetadataException e) { - logger.debug("labelMetadata: NoSuchMetadataException " - + e.getLocalizedMessage()); + logger.debug("labelMetadata: NoSuchMetadataException " + e.getLocalizedMessage()); } if (labelsMetadata == null) { @@ -2446,16 +2124,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("ColumnLabel no label in en"); } else { cData.setLabel(cl.getValue()); - logger.debug("Column Set Label: " - + cl.getValue()); + logger.debug("Column Set Label: " + cl.getValue()); } } cData.setTrId(trId); cData.setValidationColumn(true); ArrayList validatedColumnReferences = new ArrayList(); for (ColumnLocalId cLocalId : valColumnList) { - validatedColumnReferences.add(cLocalId - .getValue()); + validatedColumnReferences.add(cLocalId.getValue()); } cData.setValidatedColumns(validatedColumnReferences); columns.add(cData); @@ -2476,15 +2152,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error retrieving Validation Columns: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error retrieving Validation Columns: " - + e.getLocalizedMessage()); + logger.error("Error retrieving Validation Columns: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving Validation Columns: " + e.getLocalizedMessage()); } } @@ -2494,8 +2165,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * */ @Override - public ArrayList getValidationColumns(TRId trId, - String columnName) throws TDGWTServiceException { + public ArrayList getValidationColumns(TRId trId, String columnName) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -2503,11 +2173,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - logger.debug("getValidationColumns():[" + trId.toString() - + " columnName: " + columnName + "]"); + logger.debug("getValidationColumns():[" + trId.toString() + " columnName: " + columnName + "]"); - Table table = service.getTable(new TableId(Long.valueOf(trId - .getTableId()))); + Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); logger.debug("getValidationColumns() on Table: " + table.toString()); Column columnSource = table.getColumnByName(columnName); @@ -2516,8 +2184,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements throw new TDGWTServiceException("Column not present on table"); } - logger.debug("getValidationColumns(): columnSource " - + columnSource.getLocalId()); + logger.debug("getValidationColumns(): columnSource " + columnSource.getLocalId()); String columnSourceId = columnSource.getLocalId().getValue(); ArrayList columns = new ArrayList(); @@ -2526,17 +2193,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements int i = 0; for (Column c : cols) { if (c.getColumnType() instanceof ValidationColumnType) { - logger.debug("ValidationColumn present: [" - + c.getColumnType() + " " + c.getLocalId() + "]"); + logger.debug("ValidationColumn present: [" + c.getColumnType() + " " + c.getLocalId() + "]"); if (c.contains(ValidationReferencesMetadata.class)) { logger.debug("ValidationReferencesMetadata present"); ValidationReferencesMetadata validationReferenceMetadata = c .getMetadata(ValidationReferencesMetadata.class); - List valColumnList = validationReferenceMetadata - .getValidationReferenceColumn(); + List valColumnList = validationReferenceMetadata.getValidationReferenceColumn(); for (ColumnLocalId columnLocalId : valColumnList) { - if (columnLocalId.getValue().compareTo( - columnSourceId) == 0) { + if (columnLocalId.getValue().compareTo(columnSourceId) == 0) { ColumnData cData = new ColumnData(); cData.setId(Integer.toString(i)); cData.setColumnId(c.getLocalId().getValue()); @@ -2546,11 +2210,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements cData.setDataTypeName(c.getDataType().getName()); NamesMetadata labelsMetadata = null; try { - labelsMetadata = c - .getMetadata(NamesMetadata.class); + labelsMetadata = c.getMetadata(NamesMetadata.class); } catch (NoSuchMetadataException e) { - logger.debug("labelMetadata: NoSuchMetadataException " - + e.getLocalizedMessage()); + logger.debug("labelMetadata: NoSuchMetadataException " + e.getLocalizedMessage()); } if (labelsMetadata == null) { @@ -2564,16 +2226,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("ColumnLabel no label in en"); } else { cData.setLabel(cl.getValue()); - logger.debug("Column Set Label: " - + cl.getValue()); + logger.debug("Column Set Label: " + cl.getValue()); } } cData.setTrId(trId); cData.setValidationColumn(true); ArrayList validatedColumnReferences = new ArrayList(); for (ColumnLocalId cLocalId : valColumnList) { - validatedColumnReferences.add(cLocalId - .getValue()); + validatedColumnReferences.add(cLocalId.getValue()); } cData.setValidatedColumns(validatedColumnReferences); columns.add(cData); @@ -2594,15 +2254,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error retrieving Validation Columns: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error retrieving Validation Columns: " - + e.getLocalizedMessage()); + logger.error("Error retrieving Validation Columns: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving Validation Columns: " + e.getLocalizedMessage()); } } @@ -2620,27 +2275,22 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("getLastTable(): " + trId); TabularDataService service = TabularDataServiceFactory.getService(); - Table table = service.getLastTable(new TabularResourceId(Long - .valueOf(trId.getId()))); + Table table = service.getLastTable(new TabularResourceId(Long.valueOf(trId.getId()))); logger.debug("Table retrieved: " + table); if (table == null) { - logger.error("Last Table is Null: " - + Long.valueOf(trId.getId())); + logger.error("Last Table is Null: " + Long.valueOf(trId.getId())); new TDGWTServiceException("Last Table is Null"); } Table viewTable = null; if (table.contains(DatasetViewTableMetadata.class)) { - DatasetViewTableMetadata dwm = table - .getMetadata(DatasetViewTableMetadata.class); + DatasetViewTableMetadata dwm = table.getMetadata(DatasetViewTableMetadata.class); logger.debug("DatasetViewTableMetadata: " + dwm); try { - viewTable = service.getTable(dwm - .getTargetDatasetViewTableId()); + viewTable = service.getTable(dwm.getTargetDatasetViewTableId()); } catch (Exception e) { - logger.error("View table not found: " - + e.getLocalizedMessage()); + logger.error("View table not found: " + e.getLocalizedMessage()); } } else { logger.debug("Table not contains DataseViewTableMetadata"); @@ -2679,22 +2329,21 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements PeriodTypeMetadata periodTypeMetadata = null; if (column.contains(PeriodTypeMetadata.class)) { - periodTypeMetadata = column - .getMetadata(PeriodTypeMetadata.class); + periodTypeMetadata = column.getMetadata(PeriodTypeMetadata.class); PeriodType periodType = periodTypeMetadata.getType(); colData.setPeriodDataType(PeriodTypeMap.map(periodType)); } ColumnRelationship rel = column.getRelationship(); if (rel != null) { - RelationshipData relData = retrieveRelationship( - service, table, column, periodTypeMetadata, rel); + RelationshipData relData = retrieveRelationship(service, table, column, periodTypeMetadata, + rel); colData.setRelationship(relData); } if (column.contains(ViewColumnMetadata.class)) { - ColumnViewData columnViewData = retrieveColumnViewData( - service, table, column, periodTypeMetadata); + ColumnViewData columnViewData = retrieveColumnViewData(service, table, column, + periodTypeMetadata); colData.setColumnViewData(columnViewData); colData.setViewColumn(true); @@ -2714,8 +2363,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements newTRId.setTableTypeName(trId.getTableTypeName()); newTRId.setTableId(String.valueOf(viewTable.getId().getValue())); newTRId.setTableType(viewTable.getTableType().getName()); - newTRId.setReferenceTargetTableId(String.valueOf(table.getId() - .getValue())); + newTRId.setReferenceTargetTableId(String.valueOf(table.getId().getValue())); newTRId.setViewTable(true); logger.debug("NewTRId: " + newTRId); tData.setTrId(newTRId); @@ -2739,23 +2387,21 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements PeriodTypeMetadata periodTypeMetadata = null; if (column.contains(PeriodTypeMetadata.class)) { - periodTypeMetadata = column - .getMetadata(PeriodTypeMetadata.class); + periodTypeMetadata = column.getMetadata(PeriodTypeMetadata.class); PeriodType periodType = periodTypeMetadata.getType(); colData.setPeriodDataType(PeriodTypeMap.map(periodType)); } ColumnRelationship rel = column.getRelationship(); if (rel != null) { - RelationshipData relData = retrieveRelationship( - service, viewTable, column, periodTypeMetadata, + RelationshipData relData = retrieveRelationship(service, viewTable, column, periodTypeMetadata, rel); colData.setRelationship(relData); } if (column.contains(ViewColumnMetadata.class)) { - ColumnViewData columnViewData = retrieveColumnViewData( - service, viewTable, column, periodTypeMetadata); + ColumnViewData columnViewData = retrieveColumnViewData(service, viewTable, column, + periodTypeMetadata); colData.setColumnViewData(columnViewData); colData.setViewColumn(true); @@ -2778,13 +2424,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error("Error in getLastTable(): " + e.getLocalizedMessage(), - e); - throw new TDGWTServiceException("Error in getLastTable(): " - + e.getLocalizedMessage()); + logger.error("Error in getLastTable(): " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error in getLastTable(): " + e.getLocalizedMessage()); } } @@ -2801,17 +2444,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("getTable(): " + trId); TabularDataService service = TabularDataServiceFactory.getService(); - Table table = service.getTable(new TableId(Long.valueOf(trId - .getTableId()))); + Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); Table viewTable = null; if (table.contains(DatasetViewTableMetadata.class)) { - DatasetViewTableMetadata dwm = table - .getMetadata(DatasetViewTableMetadata.class); + DatasetViewTableMetadata dwm = table.getMetadata(DatasetViewTableMetadata.class); try { - viewTable = service.getTable(dwm - .getTargetDatasetViewTableId()); + viewTable = service.getTable(dwm.getTargetDatasetViewTableId()); } catch (Exception e) { logger.error("view table not found"); } @@ -2849,22 +2489,21 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements PeriodTypeMetadata periodTypeMetadata = null; if (column.contains(PeriodTypeMetadata.class)) { - periodTypeMetadata = column - .getMetadata(PeriodTypeMetadata.class); + periodTypeMetadata = column.getMetadata(PeriodTypeMetadata.class); PeriodType periodType = periodTypeMetadata.getType(); colData.setPeriodDataType(PeriodTypeMap.map(periodType)); } ColumnRelationship rel = column.getRelationship(); if (rel != null) { - RelationshipData relData = retrieveRelationship( - service, table, column, periodTypeMetadata, rel); + RelationshipData relData = retrieveRelationship(service, table, column, periodTypeMetadata, + rel); colData.setRelationship(relData); } if (column.contains(ViewColumnMetadata.class)) { - ColumnViewData columnViewData = retrieveColumnViewData( - service, table, column, periodTypeMetadata); + ColumnViewData columnViewData = retrieveColumnViewData(service, table, column, + periodTypeMetadata); colData.setColumnViewData(columnViewData); colData.setViewColumn(true); @@ -2884,8 +2523,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements newTRId.setTableTypeName(trId.getTableTypeName()); newTRId.setTableId(String.valueOf(viewTable.getId().getValue())); newTRId.setTableType(viewTable.getTableType().getName()); - newTRId.setReferenceTargetTableId(String.valueOf(table.getId() - .getValue())); + newTRId.setReferenceTargetTableId(String.valueOf(table.getId().getValue())); newTRId.setViewTable(true); logger.debug("NewTRId: " + newTRId); tData.setTrId(newTRId); @@ -2909,23 +2547,21 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements PeriodTypeMetadata periodTypeMetadata = null; if (column.contains(PeriodTypeMetadata.class)) { - periodTypeMetadata = column - .getMetadata(PeriodTypeMetadata.class); + periodTypeMetadata = column.getMetadata(PeriodTypeMetadata.class); PeriodType periodType = periodTypeMetadata.getType(); colData.setPeriodDataType(PeriodTypeMap.map(periodType)); } ColumnRelationship rel = column.getRelationship(); if (rel != null) { - RelationshipData relData = retrieveRelationship( - service, viewTable, column, periodTypeMetadata, + RelationshipData relData = retrieveRelationship(service, viewTable, column, periodTypeMetadata, rel); colData.setRelationship(relData); } if (column.contains(ViewColumnMetadata.class)) { - ColumnViewData columnViewData = retrieveColumnViewData( - service, viewTable, column, periodTypeMetadata); + ColumnViewData columnViewData = retrieveColumnViewData(service, viewTable, column, + periodTypeMetadata); colData.setColumnViewData(columnViewData); colData.setViewColumn(true); @@ -2948,12 +2584,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.error("Error in getTable(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error in getTable(): " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in getTable(): " + e.getLocalizedMessage()); } } @@ -2967,8 +2601,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); SessionUtil.setTDOpenSession(httpRequest, serviceCredentials, s); return; @@ -2976,11 +2609,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (TDGWTServiceException e) { throw e; } catch (Throwable e) { - logger.error("Error setting TDOpenSession parameter: " - + e.getLocalizedMessage()); - throw new TDGWTServiceException( - "Error setting TDOpenSession parameter: " - + e.getLocalizedMessage()); + logger.error("Error setting TDOpenSession parameter: " + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error setting TDOpenSession parameter: " + e.getLocalizedMessage()); } } @@ -2992,12 +2622,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements */ private void syncTRMetaData(TabularResource tr, TabResource tabResource) { - logger.debug("TRservice [id:" + tr.getId() + " ,creationDate:" - + tr.getCreationDate() + "]"); - logger.debug("TabResource [name:" + tabResource.getName() - + " ,description:" + tabResource.getDescription() + " ,agency:" - + tabResource.getAgency() + " ,rights:" - + tabResource.getRight() + "]"); + logger.debug("TRservice [id:" + tr.getId() + " ,creationDate:" + tr.getCreationDate() + "]"); + logger.debug("TabResource [name:" + tabResource.getName() + " ,description:" + tabResource.getDescription() + + " ,agency:" + tabResource.getAgency() + " ,rights:" + tabResource.getRight() + "]"); tabResource.setDate(tr.getCreationDate().getTime()); tabResource.setValid(tr.isValid()); tabResource.setFinalized(tr.isFinalized()); @@ -3007,8 +2634,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements meta.add(new NameMetadata(tabResource.getName())); meta.add(new DescriptionMetadata(tabResource.getDescription())); - if (tabResource.getAgency() != null - && !tabResource.getAgency().isEmpty()) { + if (tabResource.getAgency() != null && !tabResource.getAgency().isEmpty()) { meta.add(new AgencyMetadata(tabResource.getAgency())); } meta.add(new RightsMetadata(tabResource.getRight())); @@ -3031,24 +2657,21 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements Date dateU = tabResource.getValidUntilTo(); GregorianCalendar validUntilToC = new GregorianCalendar(); validUntilToC.setTime(dateU); - ValidUntilMetadata validUntil = new ValidUntilMetadata( - validUntilToC); + ValidUntilMetadata validUntil = new ValidUntilMetadata(validUntilToC); meta.add(validUntil); } catch (Throwable e) { logger.info("ValidUntilMetadata is not set, no valid calendar present"); } } - if (tabResource.getLicence() != null - && !tabResource.getLicence().isEmpty()) { + if (tabResource.getLicence() != null && !tabResource.getLicence().isEmpty()) { LicenceMetadata licenceMetadata = new LicenceMetadata(); Licence licence = LicenceMap.map(tabResource.getLicence()); if (licence != null) { licenceMetadata.setValue(licence); meta.add(licenceMetadata); } else { - logger.error("Licence type not found: " - + tabResource.getLicence()); + logger.error("Licence type not found: " + tabResource.getLicence()); } } @@ -3065,14 +2688,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * @return * @throws TDGWTServiceException */ - private TabResource retrieveTRMetadataFromService( - TabularDataService service, TabularResource tr, int i) + private TabResource retrieveTRMetadataFromService(TabularDataService service, TabularResource tr, int i) throws TDGWTServiceException { try { TabResource t = new TabResource(); TRId trId = new TRId(String.valueOf(tr.getId().getValue())); - trId.setTabResourceType(TabularResourceTypeMap.map(tr - .getTabularResourceType())); + trId.setTabResourceType(TabularResourceTypeMap.map(tr.getTabularResourceType())); trId.setTableTypeName(tr.getTableType()); t.setId(String.valueOf(i)); t.setTrId(trId); @@ -3093,8 +2714,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements t.setName("Unknown_" + trId.getId()); } if (tr.contains(AgencyMetadata.class)) { - AgencyMetadata agencyMeta = tr - .getMetadata(AgencyMetadata.class); + AgencyMetadata agencyMeta = tr.getMetadata(AgencyMetadata.class); if (agencyMeta != null && agencyMeta.getValue() != null) { t.setAgency(agencyMeta.getValue()); } else { @@ -3106,8 +2726,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements t.setDate(tr.getCreationDate().getTime()); if (tr.contains(ValidSinceMetadata.class)) { - ValidSinceMetadata validSinceMeta = tr - .getMetadata(ValidSinceMetadata.class); + ValidSinceMetadata validSinceMeta = tr.getMetadata(ValidSinceMetadata.class); if (validSinceMeta != null && validSinceMeta.getValue() != null) { Calendar validSinceC = validSinceMeta.getValue(); t.setValidFrom(validSinceC.getTime()); @@ -3119,8 +2738,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } if (tr.contains(ValidUntilMetadata.class)) { - ValidUntilMetadata validUntilMeta = tr - .getMetadata(ValidUntilMetadata.class); + ValidUntilMetadata validUntilMeta = tr.getMetadata(ValidUntilMetadata.class); if (validUntilMeta != null && validUntilMeta.getValue() != null) { Calendar validUntilC = validUntilMeta.getValue(); t.setValidUntilTo(validUntilC.getTime()); @@ -3132,8 +2750,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } if (tr.contains(LicenceMetadata.class)) { - LicenceMetadata licenceMeta = tr - .getMetadata(LicenceMetadata.class); + LicenceMetadata licenceMeta = tr.getMetadata(LicenceMetadata.class); if (licenceMeta != null && licenceMeta.getValue() != null) { t.setLicence(licenceMeta.getValue().toString()); } else { @@ -3166,8 +2783,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * @return * @throws TDGWTServiceException */ - private TabResource retrieveTRMetadataFromServiceAndLastTable( - TabularDataService service, TabularResource tr, int i) + private TabResource retrieveTRMetadataFromServiceAndLastTable(TabularDataService service, TabularResource tr, int i) throws TDGWTServiceException { Table table = null; try { @@ -3175,8 +2791,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (Throwable e) { logger.error("Error retrieving last table: " + e.getMessage()); e.printStackTrace(); - throw new TDGWTServiceException("Error retrieving last table: " - + e.getMessage()); + throw new TDGWTServiceException("Error retrieving last table: " + e.getMessage()); } TableId tableId = null; @@ -3191,17 +2806,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } else { tableId = table.getId(); if (tableId == null) { - logger.info("Tabular Resource " + tr.getId() - + " has last table with id null."); + logger.info("Tabular Resource " + tr.getId() + " has last table with id null."); t = new TabResource(); t.setTrId(null); } else { if (table.contains(DatasetViewTableMetadata.class)) { - DatasetViewTableMetadata dwm = table - .getMetadata(DatasetViewTableMetadata.class); + DatasetViewTableMetadata dwm = table.getMetadata(DatasetViewTableMetadata.class); try { - viewTable = service.getTable(dwm - .getTargetDatasetViewTableId()); + viewTable = service.getTable(dwm.getTargetDatasetViewTableId()); } catch (Exception e) { logger.error("view table not found"); } @@ -3209,19 +2821,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements if (viewTable == null) { trId = new TRId(String.valueOf(tr.getId().getValue()), - TabularResourceTypeMap.map(tr - .getTabularResourceType()), - tr.getTableType(), String.valueOf(tableId - .getValue()), table.getTableType() - .getName()); + TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), + String.valueOf(tableId.getValue()), table.getTableType().getName()); } else { trId = new TRId(String.valueOf(tr.getId().getValue()), - TabularResourceTypeMap.map(tr - .getTabularResourceType()), - tr.getTableType(), String.valueOf(viewTable.getId() - .getValue()), viewTable.getTableType() - .getName(), String.valueOf(tableId - .getValue()), true); + TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), + String.valueOf(viewTable.getId().getValue()), viewTable.getTableType().getName(), + String.valueOf(tableId.getValue()), true); } t = getTabResourceInformation(trId); @@ -3244,17 +2850,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); TabularDataService service = TabularDataServiceFactory.getService(); CodelistTableType codType = new CodelistTableType(); - List trs = service - .getTabularResourcesByType(codType.getName()); - SessionUtil.setTabularResources(httpRequest, serviceCredentials, - trs); + List trs = service.getTabularResourcesByType(codType.getName()); + SessionUtil.setTabularResources(httpRequest, serviceCredentials, trs); ArrayList ltr = new ArrayList(); @@ -3262,36 +2865,30 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements for (i = 0; i < trs.size(); i++) { TabularResource tr = trs.get(i); try { - TabResource t = retrieveTRMetadataFromService(service, tr, - i); + TabResource t = retrieveTRMetadataFromService(service, tr, i); if (t.getTrId() != null && t.isValid() && t.isFinalized()) { ltr.add(t); } } catch (Throwable e) { - logger.error("TabResource discarded: " + tr + " cause: " - + e.getMessage()); + logger.error("TabResource discarded: " + tr + " cause: " + e.getMessage()); } } logger.debug("Codelists retrived: " + ltr); - SessionUtil.setCodelistsPagingLoaded(httpRequest, - serviceCredentials, ltr); + SessionUtil.setCodelistsPagingLoaded(httpRequest, serviceCredentials, ltr); } catch (TDGWTServiceException e) { throw e; } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - logger.error("Error retrieving Codelist in setCodelistsPagingLoader(): " - + e.getLocalizedMessage()); - throw new TDGWTServiceException("Error retrieving Codelist: " - + e.getLocalizedMessage()); + logger.error("Error retrieving Codelist in setCodelistsPagingLoader(): " + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving Codelist: " + e.getLocalizedMessage()); } } @@ -3300,39 +2897,32 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * * {@inheritDoc} */ - public CodelistPagingLoadResult getCodelistsPagingLoader( - CodelistPagingLoadConfig plc) throws TDGWTServiceException { + public CodelistPagingLoadResult getCodelistsPagingLoader(CodelistPagingLoadConfig plc) + throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug(plc.toString()); - ArrayList ltr = SessionUtil.getCodelistsPagingLoaded( - httpRequest, serviceCredentials); + ArrayList ltr = SessionUtil.getCodelistsPagingLoaded(httpRequest, serviceCredentials); if (ltr == null) { logger.error("Error no codelist present in session"); - throw new TDGWTServiceException( - "Error no codelist present in session"); + throw new TDGWTServiceException("Error no codelist present in session"); } ArrayList ltrTemp = new ArrayList(); if (ltr.size() != 0) { - ArrayList ltrCopy = filterPagingRow(plc, ltr, - httpRequest, serviceCredentials); - ltrCopy = OrderPagingRow(plc, ltrCopy, httpRequest, - serviceCredentials); + ArrayList ltrCopy = filterPagingRow(plc, ltr, httpRequest, serviceCredentials); + ltrCopy = OrderPagingRow(plc, ltrCopy, httpRequest, serviceCredentials); if (ltrCopy.size() != 0) { - if (plc.getOffset() < 0 - || plc.getOffset() >= ltrCopy.size()) { - logger.error("Error CodelistPagingLoadConfig no valid range request, listsize: " - + ltrCopy.size()); - throw new TDGWTServiceException( - "Error CodelistPagingLoadConfig no valid range request"); + if (plc.getOffset() < 0 || plc.getOffset() >= ltrCopy.size()) { + logger.error( + "Error CodelistPagingLoadConfig no valid range request, listsize: " + ltrCopy.size()); + throw new TDGWTServiceException("Error CodelistPagingLoadConfig no valid range request"); } int request_end = plc.getOffset() + plc.getLimit(); @@ -3346,11 +2936,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements ltrTemp.add(ltrCopy.get(i)); } catch (IndexOutOfBoundsException e) { - logger.debug("OutOfBounds in getCodelistsPagingLoader() size:" - + ltrCopy.size() - + " index: " - + i - + " Error:" + e.getMessage() + "\n"); + logger.debug("OutOfBounds in getCodelistsPagingLoader() size:" + ltrCopy.size() + " index: " + + i + " Error:" + e.getMessage() + "\n"); } } } @@ -3373,40 +2960,31 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - logger.error("Error retrieving Codelist in getCodelistsPagingLoader(): " - + e.getLocalizedMessage()); - throw new TDGWTServiceException("Error retrieving Codelist: " - + e.getLocalizedMessage()); + logger.error("Error retrieving Codelist in getCodelistsPagingLoader(): " + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving Codelist: " + e.getLocalizedMessage()); } } - private ArrayList filterPagingRow( - CodelistPagingLoadConfig plc, ArrayList ltr, - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials) throws TDGWTServiceException { + private ArrayList filterPagingRow(CodelistPagingLoadConfig plc, ArrayList ltr, + HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { - String filter = SessionUtil.getCodelistsPagingLoadedFilter(httpRequest, - serviceCredentials); + String filter = SessionUtil.getCodelistsPagingLoadedFilter(httpRequest, serviceCredentials); ArrayList ltrCopy = new ArrayList(); - SessionUtil.setCodelistsPagingLoadedFilter(httpRequest, - serviceCredentials, plc.getFilter()); + SessionUtil.setCodelistsPagingLoadedFilter(httpRequest, serviceCredentials, plc.getFilter()); if (filter == null) { logger.debug("No filter filter present in session"); logger.debug("New Filter: " + plc.getFilter()); if (plc.getFilter() == null || plc.getFilter().isEmpty()) { - SessionUtil.setCodelistsPagingLoadedFilteredCopy(httpRequest, - serviceCredentials, ltr); + SessionUtil.setCodelistsPagingLoadedFilteredCopy(httpRequest, serviceCredentials, ltr); return ltr; } else { for (TabResource tr : ltr) { - if (tr.getName() != null && !tr.getName().isEmpty() - && tr.getName().contains(plc.getFilter())) { + if (tr.getName() != null && !tr.getName().isEmpty() && tr.getName().contains(plc.getFilter())) { ltrCopy.add(tr); continue; } else { @@ -3420,8 +2998,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } } - SessionUtil.setCodelistsPagingLoadedFilteredCopy(httpRequest, - serviceCredentials, ltrCopy); + SessionUtil.setCodelistsPagingLoadedFilteredCopy(httpRequest, serviceCredentials, ltrCopy); return ltrCopy; } @@ -3431,24 +3008,20 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("New Filter: " + plc.getFilter()); if (plc.getFilter() == null || plc.getFilter().isEmpty()) { - SessionUtil.setCodelistsPagingLoadedFilteredCopy(httpRequest, - serviceCredentials, ltr); + SessionUtil.setCodelistsPagingLoadedFilteredCopy(httpRequest, serviceCredentials, ltr); return ltr; } else { if (filter.compareTo(plc.getFilter()) == 0) { ArrayList ltrFilteredCopy = SessionUtil - .getCodelistsPagingLoadedFilteredCopy(httpRequest, - serviceCredentials); + .getCodelistsPagingLoadedFilteredCopy(httpRequest, serviceCredentials); return ltrFilteredCopy; } else { for (TabResource tr : ltr) { - if (tr.getName() != null && !tr.getName().isEmpty() - && tr.getName().contains(plc.getFilter())) { + if (tr.getName() != null && !tr.getName().isEmpty() && tr.getName().contains(plc.getFilter())) { ltrCopy.add(tr); continue; } else { - if (tr.getAgency() != null - && !tr.getAgency().isEmpty() + if (tr.getAgency() != null && !tr.getAgency().isEmpty() && tr.getAgency().contains(plc.getFilter())) { ltrCopy.add(tr); continue; @@ -3458,8 +3031,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } } - SessionUtil.setCodelistsPagingLoadedFilteredCopy( - httpRequest, serviceCredentials, ltrCopy); + SessionUtil.setCodelistsPagingLoadedFilteredCopy(httpRequest, serviceCredentials, ltrCopy); return ltrCopy; } } @@ -3468,9 +3040,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } - private ArrayList OrderPagingRow(CodelistPagingLoadConfig plc, - ArrayList ltrCopy, HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials) { + private ArrayList OrderPagingRow(CodelistPagingLoadConfig plc, ArrayList ltrCopy, + HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) { ArrayList orders = plc.getListOrderInfo(); for (OrderInfo order : orders) { @@ -3487,8 +3058,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements if (tr2.getName() == null) { comp = 1; } else { - comp = tr1.getName().compareTo( - tr2.getName()); + comp = tr1.getName().compareTo(tr2.getName()); } } return comp; @@ -3505,8 +3075,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements if (tr2.getName() == null) { comp = 1; } else { - comp = tr1.getName().compareTo( - tr2.getName()); + comp = tr1.getName().compareTo(tr2.getName()); } } return -comp; @@ -3520,100 +3089,80 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements if (order.getField().compareTo("agency") == 0) { Direction direction = order.getDirection(); if (direction == Direction.ASC) { - Collections.sort(ltrCopy, - new Comparator() { - @Override - public int compare(TabResource tr1, - TabResource tr2) { - int comp = 0; - if (tr1.getAgency() == null) { - comp = -1; - } else { - if (tr2.getAgency() == null) { - comp = 1; - } else { - comp = tr1 - .getAgency() - .compareTo( - tr2.getAgency()); - } - } - return comp; + Collections.sort(ltrCopy, new Comparator() { + @Override + public int compare(TabResource tr1, TabResource tr2) { + int comp = 0; + if (tr1.getAgency() == null) { + comp = -1; + } else { + if (tr2.getAgency() == null) { + comp = 1; + } else { + comp = tr1.getAgency().compareTo(tr2.getAgency()); } - }); + } + return comp; + } + }); } else { - Collections.sort(ltrCopy, - new Comparator() { - @Override - public int compare(TabResource tr1, - TabResource tr2) { - int comp = 0; - if (tr1.getAgency() == null) { - comp = -1; - } else { - if (tr2.getAgency() == null) { - comp = 1; - } else { - comp = tr1 - .getAgency() - .compareTo( - tr2.getAgency()); - } - } - return -comp; + Collections.sort(ltrCopy, new Comparator() { + @Override + public int compare(TabResource tr1, TabResource tr2) { + int comp = 0; + if (tr1.getAgency() == null) { + comp = -1; + } else { + if (tr2.getAgency() == null) { + comp = 1; + } else { + comp = tr1.getAgency().compareTo(tr2.getAgency()); } - }); + } + return -comp; + } + }); } logger.debug("LTR Ordered by agency;"); } else { if (order.getField().compareTo("date") == 0) { Direction direction = order.getDirection(); if (direction == Direction.ASC) { - Collections.sort(ltrCopy, - new Comparator() { - @Override - public int compare(TabResource tr1, - TabResource tr2) { - int comp = 0; - if (tr1.getDate() == null) { - comp = -1; - } else { - if (tr2.getDate() == null) { - comp = 1; - } else { - comp = tr1 - .getDate() - .compareTo( - tr2.getDate()); - } - } - - return comp; + Collections.sort(ltrCopy, new Comparator() { + @Override + public int compare(TabResource tr1, TabResource tr2) { + int comp = 0; + if (tr1.getDate() == null) { + comp = -1; + } else { + if (tr2.getDate() == null) { + comp = 1; + } else { + comp = tr1.getDate().compareTo(tr2.getDate()); } - }); + } + + return comp; + } + }); } else { - Collections.sort(ltrCopy, - new Comparator() { - @Override - public int compare(TabResource tr1, - TabResource tr2) { - int comp = 0; - if (tr1.getDate() == null) { - comp = -1; - } else { - if (tr2.getDate() == null) { - comp = 1; - } else { - comp = tr1 - .getDate() - .compareTo( - tr2.getDate()); - } - } - - return -comp; + Collections.sort(ltrCopy, new Comparator() { + @Override + public int compare(TabResource tr1, TabResource tr2) { + int comp = 0; + if (tr1.getDate() == null) { + comp = -1; + } else { + if (tr2.getDate() == null) { + comp = 1; + } else { + comp = tr1.getDate().compareTo(tr2.getDate()); } - }); + } + + return -comp; + } + }); } logger.debug("LTR Ordered by date;"); } else { @@ -3632,20 +3181,17 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public ArrayList getTabularResourcesAndLastTables() - throws TDGWTServiceException { + public ArrayList getTabularResourcesAndLastTables() throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("GetTabularResources"); TabularDataService service = TabularDataServiceFactory.getService(); List trs = service.getTabularResources(); - SessionUtil.setTabularResources(httpRequest, serviceCredentials, - trs); + SessionUtil.setTabularResources(httpRequest, serviceCredentials, trs); ArrayList ltr = new ArrayList(); @@ -3654,15 +3200,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularResource tr = trs.get(i); logger.debug("GetTabularResources RetrieveMetadataAndLastTables"); try { - TabResource t = retrieveTRMetadataFromServiceAndLastTable( - service, tr, i); + TabResource t = retrieveTRMetadataFromServiceAndLastTable(service, tr, i); if (t.getTrId() != null) { ltr.add(t); } } catch (Throwable e) { - logger.error("TabResource discarded: " + tr + " cause: " - + e.getMessage()); + logger.error("TabResource discarded: " + tr + " cause: " + e.getMessage()); } } @@ -3674,15 +3218,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - logger.error("Error retrieving TabularResources: " - + e.getLocalizedMessage()); - throw new TDGWTServiceException( - "Error retrieving TabularResources: " - + e.getLocalizedMessage()); + logger.error("Error retrieving TabularResources: " + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving TabularResources: " + e.getLocalizedMessage()); } } @@ -3693,20 +3233,17 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public ArrayList getTabularResources() - throws TDGWTServiceException { + public ArrayList getTabularResources() throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("GetTabularResources"); TabularDataService service = TabularDataServiceFactory.getService(); List trs = service.getTabularResources(); - SessionUtil.setTabularResources(httpRequest, serviceCredentials, - trs); + SessionUtil.setTabularResources(httpRequest, serviceCredentials, trs); ArrayList ltr = new ArrayList(); @@ -3715,15 +3252,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularResource tr = trs.get(i); // logger.debug("GetTabularResources RetrieveMetadata"); try { - TabResource t = retrieveTRMetadataFromService(service, tr, - i); + TabResource t = retrieveTRMetadataFromService(service, tr, i); if (t.getTrId() != null) { ltr.add(t); } } catch (Throwable e) { - logger.error("TabResource discarded: " + tr + " cause: " - + e.getMessage()); + logger.error("TabResource discarded: " + tr + " cause: " + e.getMessage()); } } @@ -3735,57 +3270,40 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - logger.error("Error retrieving TabularResources: " - + e.getLocalizedMessage()); - throw new TDGWTServiceException( - "Error retrieving TabularResources: " - + e.getLocalizedMessage()); + logger.error("Error retrieving TabularResources: " + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving TabularResources: " + e.getLocalizedMessage()); } } - /** - * - * @param tabResource - * @throws TDGWTServiceException - */ @Override public void removeTabularResource(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); if (trId == null) { logger.error("Error removing TabularResource: trId is null"); - throw new TDGWTServiceException( - "Error removing TabularResource no parameters set"); + throw new TDGWTServiceException("Error removing TabularResource no parameters set"); } TabularDataService service = TabularDataServiceFactory.getService(); checkTRId(trId, httpRequest, serviceCredentials); - TabularResourceId tabResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabResourceId); + TabularResourceId tabResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabResourceId); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); String owner = tabularResource.getOwner(); - if (owner != null - && owner.compareTo(serviceCredentials.getUserName()) == 0) { + if (owner != null && owner.compareTo(serviceCredentials.getUserName()) == 0) { service.removeTabularResource(tabResourceId); - SessionUtil.removeTaskInBackgroundOnTRId(httpRequest, - serviceCredentials, trId); + SessionUtil.removeTaskInBackgroundOnTRId(httpRequest, serviceCredentials, trId); } else { throw new TDGWTServiceException( - "You are not the owner of this tabular resource (owner: " - + owner + ")"); + "You are not the owner of this tabular resource (owner: " + owner + ")"); } return; @@ -3794,15 +3312,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error deleting the tabular resource: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error deleting the tabular resource: " - + e.getLocalizedMessage()); + logger.error("Error deleting the tabular resource: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error deleting the tabular resource: " + e.getLocalizedMessage()); } } @@ -3810,8 +3323,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * * {@inheritDoc} */ - public TabResource createTabularResource(TabResource tabResource) - throws TDGWTServiceException { + public TabResource createTabularResource(TabResource tabResource) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -3819,8 +3331,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements if (tabResource == null) { logger.error("Error creating new TabularResource: tabResource is null"); - throw new TDGWTServiceException( - "Error creating new TabularResource no parameters set"); + throw new TDGWTServiceException("Error creating new TabularResource no parameters set"); } TabularDataService service = TabularDataServiceFactory.getService(); @@ -3830,10 +3341,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements syncTRMetaData(serviceTR, tabResource); TRId trId = new TRId(String.valueOf(serviceTR.getId().getValue()), - TabularResourceTypeMap.map(serviceTR - .getTabularResourceType()), - serviceTR.getTableType(), String.valueOf(table.getId() - .getValue()), table.getTableType().getName()); + TabularResourceTypeMap.map(serviceTR.getTabularResourceType()), serviceTR.getTableType(), + String.valueOf(table.getId().getValue()), table.getTableType().getName()); tabResource.setTrId(trId); return tabResource; @@ -3843,15 +3352,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error creating new TabularResource: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error creating new TabularResource: " - + e.getLocalizedMessage()); + logger.error("Error creating new TabularResource: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error creating new TabularResource: " + e.getLocalizedMessage()); } } @@ -3863,24 +3367,20 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); // Remove this for multiple source SDMXRegistrySource sdmxRegistrySource = new SDMXRegistrySource(); - SessionUtil.setSDMXRegistrySource(httpRequest, serviceCredentials, - sdmxRegistrySource); + SessionUtil.setSDMXRegistrySource(httpRequest, serviceCredentials, sdmxRegistrySource); // - return SessionUtil.retrieveCodelists(httpRequest, - serviceCredentials); + return SessionUtil.retrieveCodelists(httpRequest, serviceCredentials); } catch (TDGWTServiceException e) { throw e; } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error retrieving codelists: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving codelists: " + e.getLocalizedMessage()); } } @@ -3892,18 +3392,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - return SessionUtil - .retrieveDatasets(httpRequest, serviceCredentials); + return SessionUtil.retrieveDatasets(httpRequest, serviceCredentials); } catch (TDGWTServiceException e) { throw e; } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error retrieving datasets: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving datasets: " + e.getLocalizedMessage()); } } @@ -3915,18 +3412,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - return SessionUtil - .retrieveAgencies(httpRequest, serviceCredentials); + return SessionUtil.retrieveAgencies(httpRequest, serviceCredentials); } catch (TDGWTServiceException e) { throw e; } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error retrieving datasets: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving datasets: " + e.getLocalizedMessage()); } } @@ -3935,24 +3429,20 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startSDMXImport(SDMXImportSession sdmxImportSession) - throws TDGWTServiceException { + public String startSDMXImport(SDMXImportSession sdmxImportSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setSDMXImportSession(httpRequest, serviceCredentials, - sdmxImportSession); + SessionUtil.setSDMXImportSession(httpRequest, serviceCredentials, sdmxImportSession); TabularDataService service = TabularDataServiceFactory.getService(); TabularResource serviceTR = service.createTabularResource(); - TabResource sdmxImportTabResource = sdmxImportSession - .getTabResource(); + TabResource sdmxImportTabResource = sdmxImportSession.getTabResource(); syncTRMetaData(serviceTR, sdmxImportTabResource); @@ -3960,29 +3450,24 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements sdmxImportTabResource.setTrId(trId); logger.debug(sdmxImportTabResource.toString()); - SessionUtil.setSDMXImportTabResource(httpRequest, - serviceCredentials, sdmxImportTabResource); + SessionUtil.setSDMXImportTabResource(httpRequest, serviceCredentials, sdmxImportTabResource); - OpExecution4SDMXCodelistImport opEx = new OpExecution4SDMXCodelistImport( - service, sdmxImportSession); + OpExecution4SDMXCodelistImport opEx = new OpExecution4SDMXCodelistImport(service, sdmxImportSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error SDMX Codelist Import: Operation not supported!"); + throw new TDGWTServiceException("Error SDMX Codelist Import: Operation not supported!"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, serviceTR.getId()); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.SDMXImport, trId); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.SDMXImport, trId); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -3990,12 +3475,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in SDMX Import: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in SDMX Import: " + e.getLocalizedMessage()); } } @@ -4006,16 +3489,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * @return * @throws TDGWTServiceException */ - private TRId retrieveTabularResourceBasicData(TRId trId) - throws TDGWTServiceException { + private TRId retrieveTabularResourceBasicData(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); SessionUtil.getServiceCredentials(httpRequest); TabularDataService service = TabularDataServiceFactory.getService(); - TabularResourceId tabularResourceId = new TabularResourceId( - new Long(trId.getId())); + TabularResourceId tabularResourceId = new TabularResourceId(new Long(trId.getId())); TabularResource tr = service.getTabularResource(tabularResourceId); Table table = service.getLastTable(tabularResourceId); @@ -4023,11 +3504,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements Table viewTable = null; if (table.contains(DatasetViewTableMetadata.class)) { - DatasetViewTableMetadata dwm = table - .getMetadata(DatasetViewTableMetadata.class); + DatasetViewTableMetadata dwm = table.getMetadata(DatasetViewTableMetadata.class); try { - viewTable = service.getTable(dwm - .getTargetDatasetViewTableId()); + viewTable = service.getTable(dwm.getTargetDatasetViewTableId()); } catch (Exception e) { logger.error("view table not found"); } @@ -4035,20 +3514,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TRId newTRId; if (viewTable == null) { - newTRId = new TRId( - String.valueOf(tr.getId().getValue()), - TabularResourceTypeMap.map(tr.getTabularResourceType()), - tr.getTableType(), String.valueOf(table.getId() - .getValue()), table.getTableType().getName()); + newTRId = new TRId(String.valueOf(tr.getId().getValue()), + TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), + String.valueOf(table.getId().getValue()), table.getTableType().getName()); } else { - newTRId = new TRId( - String.valueOf(tr.getId().getValue()), - TabularResourceTypeMap.map(tr.getTabularResourceType()), - tr.getTableType(), String.valueOf(viewTable.getId() - .getValue()), viewTable.getTableType() - .getName(), String.valueOf(table.getId() - .getValue()), true); + newTRId = new TRId(String.valueOf(tr.getId().getValue()), + TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), + String.valueOf(viewTable.getId().getValue()), viewTable.getTableType().getName(), + String.valueOf(table.getId().getValue()), true); } @@ -4060,12 +3534,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error on Service: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error on Service: " + e.getLocalizedMessage()); } } @@ -4073,28 +3545,21 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public void setSDMXRegistrySource(SDMXRegistrySource sdmxRegistrySource) - throws TDGWTServiceException { + public void setSDMXRegistrySource(SDMXRegistrySource sdmxRegistrySource) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setSDMXRegistrySource(httpRequest, serviceCredentials, - sdmxRegistrySource); + SessionUtil.setSDMXRegistrySource(httpRequest, serviceCredentials, sdmxRegistrySource); return; } catch (TDGWTServiceException e) { throw e; } catch (Throwable e) { - logger.error( - "Error setting SDMXRegistrySource parameter: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error setting SDMXRegistrySource parameter: " - + e.getLocalizedMessage()); + logger.error("Error setting SDMXRegistrySource parameter: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error setting SDMXRegistrySource parameter: " + e.getLocalizedMessage()); } } @@ -4102,27 +3567,20 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements /** * {@inheritDoc} */ - public void setCSVSession(CSVImportSession importSession) - throws TDGWTServiceException { + public void setCSVSession(CSVImportSession importSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setCSVImportSession(httpRequest, serviceCredentials, - importSession); + SessionUtil.setCSVImportSession(httpRequest, serviceCredentials, importSession); return; } catch (TDGWTServiceException e) { throw e; } catch (Throwable e) { - logger.error( - "Error setting SDMXImportSession parameter: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error setting SDMXImportSession parameter: " - + e.getLocalizedMessage()); + logger.error("Error setting SDMXImportSession parameter: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error setting SDMXImportSession parameter: " + e.getLocalizedMessage()); } } @@ -4131,23 +3589,18 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public FileUploadMonitor getFileUploadMonitor() - throws TDGWTServiceException { + public FileUploadMonitor getFileUploadMonitor() throws TDGWTServiceException { HttpServletRequest httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); if (httpRequest == null) { - throw new TDGWTServiceException( - "Error retrieving the request: null"); + throw new TDGWTServiceException("Error retrieving the request: null"); } - FileUploadMonitor fileUploadMonitor = SessionUtil.getFileUploadMonitor( - httpRequest, serviceCredentials); + FileUploadMonitor fileUploadMonitor = SessionUtil.getFileUploadMonitor(httpRequest, serviceCredentials); if (fileUploadMonitor == null) { - throw new TDGWTServiceException( - "Error retrieving the fileUploadMonitor: null"); + throw new TDGWTServiceException("Error retrieving the fileUploadMonitor: null"); } logger.debug("FileUploadMonitor: " + fileUploadMonitor); @@ -4159,82 +3612,63 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public AvailableCharsetList getAvailableCharset() - throws TDGWTServiceException { + public AvailableCharsetList getAvailableCharset() throws TDGWTServiceException { HttpServletRequest httpRequest = this.getThreadLocalRequest(); SessionUtil.getServiceCredentials(httpRequest); if (httpRequest == null) { - throw new TDGWTServiceException( - "Error retrieving the httpRequest: null"); + throw new TDGWTServiceException("Error retrieving the httpRequest: null"); } String defaultEncoding = Charset.defaultCharset().displayName(); - ArrayList charsetList = new ArrayList(Charset - .availableCharsets().keySet()); + ArrayList charsetList = new ArrayList(Charset.availableCharsets().keySet()); return new AvailableCharsetList(charsetList, defaultEncoding); } @Override - public AvailableCharsetList getAvailableCharsetForExport() - throws TDGWTServiceException { + public AvailableCharsetList getAvailableCharsetForExport() throws TDGWTServiceException { HttpServletRequest httpRequest = this.getThreadLocalRequest(); SessionUtil.getServiceCredentials(httpRequest); if (httpRequest == null) { - throw new TDGWTServiceException( - "Error retrieving the httpRequest: null"); + throw new TDGWTServiceException("Error retrieving the httpRequest: null"); } - ArrayList charsetList = EncodingPGSupported - .getEncodidingStringList(); + ArrayList charsetList = EncodingPGSupported.getEncodidingStringList(); String defaultEncoding = EncodingPGSupported.getDefaultEncoding(); return new AvailableCharsetList(charsetList, defaultEncoding); } @Override - public ArrayList configureCSVParser(String encoding, - HeaderPresence headerPresence, char delimiter, char comment) - throws TDGWTServiceException { + public ArrayList configureCSVParser(String encoding, HeaderPresence headerPresence, char delimiter, + char comment) throws TDGWTServiceException { HttpServletRequest httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); if (httpRequest == null) { - throw new TDGWTServiceException( - "Error retrieving the httpRequest: null"); + throw new TDGWTServiceException("Error retrieving the httpRequest: null"); } - logger.debug("configureCSVParser encoding: " + encoding - + " headerPresence: " + headerPresence + " delimiter: " + logger.debug("configureCSVParser encoding: " + encoding + " headerPresence: " + headerPresence + " delimiter: " + delimiter + " comment: " + comment); - CSVFileUploadSession fileUploadSession = SessionUtil - .getCSVFileUploadSession(httpRequest, serviceCredentials); + CSVFileUploadSession fileUploadSession = SessionUtil.getCSVFileUploadSession(httpRequest, serviceCredentials); if (fileUploadSession == null) { - throw new TDGWTServiceException( - "Error retrieving the fileUploadSession: null"); + throw new TDGWTServiceException("Error retrieving the fileUploadSession: null"); } - CSVParserConfiguration parserConfiguration = fileUploadSession - .getParserConfiguration(); + CSVParserConfiguration parserConfiguration = fileUploadSession.getParserConfiguration(); if (parserConfiguration == null) { - parserConfiguration = new CSVParserConfiguration( - Charset.forName(encoding), delimiter, comment, + parserConfiguration = new CSVParserConfiguration(Charset.forName(encoding), delimiter, comment, headerPresence); fileUploadSession.setParserConfiguration(parserConfiguration); } else { - parserConfiguration.update(encoding, delimiter, comment, - headerPresence); + parserConfiguration.update(encoding, delimiter, comment, headerPresence); } - SessionUtil.setCSVFileUploadSession(httpRequest, serviceCredentials, - fileUploadSession); + SessionUtil.setCSVFileUploadSession(httpRequest, serviceCredentials, fileUploadSession); try { - return CSVFileUtil.getHeader(fileUploadSession.getCsvFile(), - fileUploadSession.getParserConfiguration()); + return CSVFileUtil.getHeader(fileUploadSession.getCsvFile(), fileUploadSession.getParserConfiguration()); } catch (Throwable e) { logger.error("Error retrieving the CSV header", e); - throw new TDGWTServiceException( - "Error calculating the CSV header: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error calculating the CSV header: " + e.getLocalizedMessage()); } } @@ -4242,31 +3676,25 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public CheckCSVSession checkCSV(long errorsLimit) - throws TDGWTServiceException { + public CheckCSVSession checkCSV(long errorsLimit) throws TDGWTServiceException { HttpServletRequest httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); if (httpRequest == null) { - throw new TDGWTServiceException( - "Error retrieving the httpRequest: null"); + throw new TDGWTServiceException("Error retrieving the httpRequest: null"); } - CSVFileUploadSession fileUploadSession = SessionUtil - .getCSVFileUploadSession(httpRequest, serviceCredentials); + CSVFileUploadSession fileUploadSession = SessionUtil.getCSVFileUploadSession(httpRequest, serviceCredentials); if (fileUploadSession == null) { - throw new TDGWTServiceException( - "Error retrieving the fileUploadSession: null"); + throw new TDGWTServiceException("Error retrieving the fileUploadSession: null"); } try { - return CSVFileUtil.checkCSV(fileUploadSession.getCsvFile(), - fileUploadSession.getParserConfiguration(), errorsLimit); + return CSVFileUtil.checkCSV(fileUploadSession.getCsvFile(), fileUploadSession.getParserConfiguration(), + errorsLimit); } catch (Throwable e) { logger.error("Error checking the CSV file", e); - throw new TDGWTServiceException("Error checking the CSV file: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error checking the CSV file: " + e.getLocalizedMessage()); } } @@ -4275,28 +3703,23 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startCSVImport(CSVImportSession csvImportSession) - throws TDGWTServiceException { + public String startCSVImport(CSVImportSession csvImportSession) throws TDGWTServiceException { logger.debug("StartCSVImport: " + csvImportSession); CSVFileUploadSession fileUploadSession = null; HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - fileUploadSession = SessionUtil.getCSVFileUploadSession( - httpRequest, serviceCredentials); + fileUploadSession = SessionUtil.getCSVFileUploadSession(httpRequest, serviceCredentials); if (fileUploadSession == null) { - throw new TDGWTServiceException( - "Error retrieving the fileUploadSession: null"); + throw new TDGWTServiceException("Error retrieving the fileUploadSession: null"); } TabularDataService service = TabularDataServiceFactory.getService(); - OpExecution4CSVImport opEx = new OpExecution4CSVImport( - serviceCredentials, service, csvImportSession, + OpExecution4CSVImport opEx = new OpExecution4CSVImport(serviceCredentials, service, csvImportSession, fileUploadSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); @@ -4304,43 +3727,35 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); TabularResource tabularResource = service.createTabularResource(); - TabResource csvImportTabResource = csvImportSession - .getTabResource(); + TabResource csvImportTabResource = csvImportSession.getTabResource(); syncTRMetaData(tabularResource, csvImportTabResource); - TRId trId = new TRId(String.valueOf(tabularResource.getId() - .getValue())); + TRId trId = new TRId(String.valueOf(tabularResource.getId().getValue())); csvImportTabResource.setTrId(trId); logger.debug(csvImportTabResource.toString()); - SessionUtil.setCSVImportTabResource(httpRequest, - serviceCredentials, csvImportTabResource); + SessionUtil.setCSVImportTabResource(httpRequest, serviceCredentials, csvImportTabResource); Task trTask; try { trTask = service.execute(invocation, tabularResource.getId()); } catch (Throwable e) { e.printStackTrace(); throw new TDGWTServiceException( - "Tabular Data Service error creating TabularResource: " - + e.getLocalizedMessage()); + "Tabular Data Service error creating TabularResource: " + e.getLocalizedMessage()); } logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.CSVImport, trId); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.CSVImport, trId); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { try { - if (fileUploadSession != null - && fileUploadSession.getCsvFile() != null + if (fileUploadSession != null && fileUploadSession.getCsvFile() != null && fileUploadSession.getCsvFile().exists()) { fileUploadSession.getCsvFile().delete(); } @@ -4350,8 +3765,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements throw e; } catch (SecurityException e) { try { - if (fileUploadSession != null - && fileUploadSession.getCsvFile() != null + if (fileUploadSession != null && fileUploadSession.getCsvFile() != null && fileUploadSession.getCsvFile().exists()) { fileUploadSession.getCsvFile().delete(); } @@ -4360,12 +3774,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { try { - if (fileUploadSession != null - && fileUploadSession.getCsvFile() != null + if (fileUploadSession != null && fileUploadSession.getCsvFile() != null && fileUploadSession.getCsvFile().exists()) { fileUploadSession.getCsvFile().delete(); } @@ -4373,8 +3785,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.error(e1.getLocalizedMessage()); } e.printStackTrace(); - throw new TDGWTServiceException("Error in CSV Import: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in CSV Import: " + e.getLocalizedMessage()); } } @@ -4383,11 +3794,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * * {@inheritDoc} */ - public void getFileFromWorkspace(CSVImportSession csvImportSession) - throws TDGWTServiceException { + public void getFileFromWorkspace(CSVImportSession csvImportSession) throws TDGWTServiceException { HttpServletRequest httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); Workspace w = null; WorkspaceItem wi = null; @@ -4404,71 +3813,54 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (Throwable e) { e.printStackTrace(); throw new TDGWTServiceException( - "Error in importCSV getFileFromWorkspace accessing the workspace: " - + e.getLocalizedMessage(), e); + "Error in importCSV getFileFromWorkspace accessing the workspace: " + e.getLocalizedMessage(), e); } if (wi == null) { - logger.error("Error retrieving the item on workspace" - + csvImportSession.getItemId()); - throw new TDGWTServiceException( - "Error retrieving the item on workspace" - + csvImportSession.getItemId()); + logger.error("Error retrieving the item on workspace" + csvImportSession.getItemId()); + throw new TDGWTServiceException("Error retrieving the item on workspace" + csvImportSession.getItemId()); } try { - logger.debug("WorkspaceItem [id:" + wi.getId() + " name:" - + wi.getName() + " remotePath:" + wi.getRemotePath() + "]"); + logger.debug("WorkspaceItem [id:" + wi.getId() + " name:" + wi.getName() + " remotePath:" + + wi.getRemotePath() + "]"); } catch (InternalErrorException e1) { e1.printStackTrace(); - throw new TDGWTServiceException( - "Error retrieving the item on workspace" + wi); + throw new TDGWTServiceException("Error retrieving the item on workspace" + wi); } CSVFileUploadSession fileUploadSession = new CSVFileUploadSession(); // CSVImportMonitor csvImportMonitor = new CSVImportMonitor(); FileUploadMonitor fileUploadMonitor = new FileUploadMonitor(); - SessionUtil.setFileUploadMonitor(httpRequest, serviceCredentials, - fileUploadMonitor); + SessionUtil.setFileUploadMonitor(httpRequest, serviceCredentials, fileUploadMonitor); fileUploadSession.setId(UUID.randomUUID().toString()); fileUploadSession.setFileUploadState(FileUploadState.STARTED); // fileUploadSession.setCsvImportMonitor(csvImportMonitor); - SessionUtil.setCSVFileUploadSession(httpRequest, serviceCredentials, - fileUploadSession); + SessionUtil.setCSVFileUploadSession(httpRequest, serviceCredentials, fileUploadSession); try { FilesStorage filesStorage = new FilesStorage(); - InputStream is = filesStorage.retrieveInputStream( - serviceCredentials.getUserName(), wi); + InputStream is = filesStorage.retrieveInputStream(serviceCredentials.getUserName(), wi); - FileUtil.setImportFileCSV(fileUploadSession, is, wi.getName(), - Constants.FILE_CSV_MIMETYPE); + FileUtil.setImportFileCSV(fileUploadSession, is, wi.getName(), Constants.FILE_CSV_MIMETYPE); } catch (Throwable e) { - FileUploadMonitor fum = SessionUtil.getFileUploadMonitor( - httpRequest, serviceCredentials); - fum.setFailed("An error occured elaborating the file", - FileUtil.exceptionDetailMessage(e)); - SessionUtil.setFileUploadMonitor(httpRequest, serviceCredentials, - fum); + FileUploadMonitor fum = SessionUtil.getFileUploadMonitor(httpRequest, serviceCredentials); + fum.setFailed("An error occured elaborating the file", FileUtil.exceptionDetailMessage(e)); + SessionUtil.setFileUploadMonitor(httpRequest, serviceCredentials, fum); fileUploadSession.setFileUploadState(FileUploadState.FAILED); - SessionUtil.setCSVFileUploadSession(httpRequest, - serviceCredentials, fileUploadSession); + SessionUtil.setCSVFileUploadSession(httpRequest, serviceCredentials, fileUploadSession); logger.error("Error elaborating the input stream", e); - throw new TDGWTServiceException( - "Error in importCSV getFileFromWorkspace: " - + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error in importCSV getFileFromWorkspace: " + e.getLocalizedMessage(), e); } logger.trace("changing state"); - FileUploadMonitor fum = SessionUtil.getFileUploadMonitor(httpRequest, - serviceCredentials); + FileUploadMonitor fum = SessionUtil.getFileUploadMonitor(httpRequest, serviceCredentials); fum.setState(FileUploadState.COMPLETED); SessionUtil.setFileUploadMonitor(httpRequest, serviceCredentials, fum); - SessionUtil.setCSVFileUploadSession(httpRequest, serviceCredentials, - fileUploadSession); + SessionUtil.setCSVFileUploadSession(httpRequest, serviceCredentials, fileUploadSession); } /** @@ -4486,32 +3878,20 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - TabularResource tr = service - .getTabularResource(new TabularResourceId(Long.valueOf(trId - .getId()))); + TabularResource tr = service.getTabularResource(new TabularResourceId(Long.valueOf(trId.getId()))); return sdf.format(tr.getCreationDate().getTime()); } catch (TDGWTServiceException e) { throw e; } catch (Throwable e) { - logger.error( - "Error in getTRCreationDate(): " + e.getLocalizedMessage(), - e); - throw new TDGWTServiceException("Error in getTRCreationDate(): " - + e.getLocalizedMessage()); + logger.error("Error in getTRCreationDate(): " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error in getTRCreationDate(): " + e.getLocalizedMessage()); } } - /** - * - * @param trId - * @return - * @throws TDGWTServiceException - */ @Override - public Boolean isTabularResourceValid(TRId trId) - throws TDGWTServiceException { + public Boolean isTabularResourceValid(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -4521,9 +3901,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - TabularResource tr = service - .getTabularResource(new TabularResourceId(Long.valueOf(trId - .getId()))); + TabularResource tr = service.getTabularResource(new TabularResourceId(Long.valueOf(trId.getId()))); logger.debug("IsTabularResourceValid: " + tr.isValid()); return tr.isValid(); @@ -4532,26 +3910,24 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error("Error checking if it is a valid tabular resource: " - + e.getLocalizedMessage(), e); + logger.error("Error checking if it is a valid tabular resource: " + e.getLocalizedMessage(), e); throw new TDGWTServiceException( - "Error checking if it is a valid tabular resource: " - + e.getLocalizedMessage()); + "Error checking if it is a valid tabular resource: " + e.getLocalizedMessage()); } } /** * Check finalized status of a tabular resource - * + * * @param trId - * @return + * TR id + * @return True if is finalized * @throws TDGWTServiceException + * Exception */ - public Boolean isTabularResourceFinalized(TRId trId) - throws TDGWTServiceException { + public Boolean isTabularResourceFinalized(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -4561,9 +3937,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - TabularResource tr = service - .getTabularResource(new TabularResourceId(Long.valueOf(trId - .getId()))); + TabularResource tr = service.getTabularResource(new TabularResourceId(Long.valueOf(trId.getId()))); logger.debug("IsTabularResourceFinalized: " + tr.isFinalized()); return tr.isFinalized(); } catch (TDGWTServiceException e) { @@ -4571,15 +3945,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error checking if it is a finalized tabular resource: " - + e.getLocalizedMessage(), e); + logger.error("Error checking if it is a finalized tabular resource: " + e.getLocalizedMessage(), e); throw new TDGWTServiceException( - "Error checking if it is a finalized tabular resource: " - + e.getLocalizedMessage()); + "Error checking if it is a finalized tabular resource: " + e.getLocalizedMessage()); } } @@ -4587,11 +3957,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * Check locked status of a tabular resource * * @param trId - * @return + * TR id + * @return True if is locked * @throws TDGWTServiceException + * Exception */ - public Boolean isTabularResourceLocked(TRId trId) - throws TDGWTServiceException { + public Boolean isTabularResourceLocked(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -4601,9 +3972,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - TabularResource tr = service - .getTabularResource(new TabularResourceId(Long.valueOf(trId - .getId()))); + TabularResource tr = service.getTabularResource(new TabularResourceId(Long.valueOf(trId.getId()))); logger.debug("IsTabularResourceLocked: " + tr.isLocked()); return tr.isLocked(); } catch (TDGWTServiceException e) { @@ -4611,23 +3980,18 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error("Error checking if it is a locked tabular resource: " - + e.getLocalizedMessage(), e); + logger.error("Error checking if it is a locked tabular resource: " + e.getLocalizedMessage(), e); throw new TDGWTServiceException( - "Error checking if it is a locked tabular resource: " - + e.getLocalizedMessage()); + "Error checking if it is a locked tabular resource: " + e.getLocalizedMessage()); } } - private ArrayList getTRMetadata(TabularResource tr) - throws TDGWTServiceException { + private ArrayList getTRMetadata(TabularResource tr) throws TDGWTServiceException { try { - Collection> trMetas = tr - .getAllMetadata(); + Collection> trMetas = tr.getAllMetadata(); logger.debug("GetTRMetadata size: " + trMetas.size()); ArrayList listTRMetadata = new ArrayList(); @@ -4635,53 +3999,44 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements for (TabularResourceMetadata trMetadata : trMetas) { if (trMetadata instanceof org.gcube.data.analysis.tabulardata.service.tabular.metadata.DescriptionMetadata) { TRDescriptionMetadata trDescriptionMetadata = new TRDescriptionMetadata(); - trDescriptionMetadata - .setValue(((org.gcube.data.analysis.tabulardata.service.tabular.metadata.DescriptionMetadata) trMetadata) + trDescriptionMetadata.setValue( + ((org.gcube.data.analysis.tabulardata.service.tabular.metadata.DescriptionMetadata) trMetadata) .getValue()); listTRMetadata.add(trDescriptionMetadata); } else { if (trMetadata instanceof org.gcube.data.analysis.tabulardata.service.tabular.metadata.NameMetadata) { TRNameMetadata trNameMetadata = new TRNameMetadata(); - trNameMetadata - .setValue(((org.gcube.data.analysis.tabulardata.service.tabular.metadata.NameMetadata) trMetadata) + trNameMetadata.setValue( + ((org.gcube.data.analysis.tabulardata.service.tabular.metadata.NameMetadata) trMetadata) .getValue()); listTRMetadata.add(trNameMetadata); } else { if (trMetadata instanceof AgencyMetadata) { TRAgencyMetadata trAgencyMetadata = new TRAgencyMetadata(); - trAgencyMetadata - .setValue(((AgencyMetadata) trMetadata) - .getValue()); + trAgencyMetadata.setValue(((AgencyMetadata) trMetadata).getValue()); listTRMetadata.add(trAgencyMetadata); } else { if (trMetadata instanceof RightsMetadata) { TRRightsMetadata trRightsMetadata = new TRRightsMetadata(); - trRightsMetadata - .setValue(((RightsMetadata) trMetadata) - .getValue()); + trRightsMetadata.setValue(((RightsMetadata) trMetadata).getValue()); listTRMetadata.add(trRightsMetadata); } else { if (trMetadata instanceof ValidSinceMetadata) { TRValidSinceMetadata validSinceMetadata = new TRValidSinceMetadata(); - Calendar cal = ((ValidSinceMetadata) trMetadata) - .getValue(); + Calendar cal = ((ValidSinceMetadata) trMetadata).getValue(); validSinceMetadata.setValue(cal.getTime()); listTRMetadata.add(validSinceMetadata); } else { if (trMetadata instanceof ValidUntilMetadata) { TRValidUntilMetadata validUntilMetadata = new TRValidUntilMetadata(); - Calendar cal = ((ValidUntilMetadata) trMetadata) - .getValue(); - validUntilMetadata.setValue(cal - .getTime()); + Calendar cal = ((ValidUntilMetadata) trMetadata).getValue(); + validUntilMetadata.setValue(cal.getTime()); listTRMetadata.add(validUntilMetadata); } else { if (trMetadata instanceof LicenceMetadata) { TRLicenceMetadata licenceMetadata = new TRLicenceMetadata(); licenceMetadata - .setValue(((LicenceMetadata) trMetadata) - .getValue() - .toString()); + .setValue(((LicenceMetadata) trMetadata).getValue().toString()); listTRMetadata.add(licenceMetadata); } else { @@ -4702,13 +4057,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(null); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error in getTRMetadata(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error in getTRMetadata(): " - + e.getLocalizedMessage()); + logger.error("Error in getTRMetadata(): " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error in getTRMetadata(): " + e.getLocalizedMessage()); } } @@ -4717,8 +4069,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public ArrayList getTRMetadata(TRId trId) - throws TDGWTServiceException { + public ArrayList getTRMetadata(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -4728,12 +4079,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - TabularResource tr = service - .getTabularResource(new TabularResourceId(Long.valueOf(trId - .getId()))); + TabularResource tr = service.getTabularResource(new TabularResourceId(Long.valueOf(trId.getId()))); - Collection> trMetas = tr - .getAllMetadata(); + Collection> trMetas = tr.getAllMetadata(); logger.debug("GetTRMetadata size: " + trMetas.size()); ArrayList listTRMetadata = new ArrayList(); @@ -4741,53 +4089,44 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements for (TabularResourceMetadata trMetadata : trMetas) { if (trMetadata instanceof org.gcube.data.analysis.tabulardata.service.tabular.metadata.DescriptionMetadata) { TRDescriptionMetadata trDescriptionMetadata = new TRDescriptionMetadata(); - trDescriptionMetadata - .setValue(((org.gcube.data.analysis.tabulardata.service.tabular.metadata.DescriptionMetadata) trMetadata) + trDescriptionMetadata.setValue( + ((org.gcube.data.analysis.tabulardata.service.tabular.metadata.DescriptionMetadata) trMetadata) .getValue()); listTRMetadata.add(trDescriptionMetadata); } else { if (trMetadata instanceof org.gcube.data.analysis.tabulardata.service.tabular.metadata.NameMetadata) { TRNameMetadata trNameMetadata = new TRNameMetadata(); - trNameMetadata - .setValue(((org.gcube.data.analysis.tabulardata.service.tabular.metadata.NameMetadata) trMetadata) + trNameMetadata.setValue( + ((org.gcube.data.analysis.tabulardata.service.tabular.metadata.NameMetadata) trMetadata) .getValue()); listTRMetadata.add(trNameMetadata); } else { if (trMetadata instanceof AgencyMetadata) { TRAgencyMetadata trAgencyMetadata = new TRAgencyMetadata(); - trAgencyMetadata - .setValue(((AgencyMetadata) trMetadata) - .getValue()); + trAgencyMetadata.setValue(((AgencyMetadata) trMetadata).getValue()); listTRMetadata.add(trAgencyMetadata); } else { if (trMetadata instanceof RightsMetadata) { TRRightsMetadata trRightsMetadata = new TRRightsMetadata(); - trRightsMetadata - .setValue(((RightsMetadata) trMetadata) - .getValue()); + trRightsMetadata.setValue(((RightsMetadata) trMetadata).getValue()); listTRMetadata.add(trRightsMetadata); } else { if (trMetadata instanceof ValidSinceMetadata) { TRValidSinceMetadata validSinceMetadata = new TRValidSinceMetadata(); - Calendar cal = ((ValidSinceMetadata) trMetadata) - .getValue(); + Calendar cal = ((ValidSinceMetadata) trMetadata).getValue(); validSinceMetadata.setValue(cal.getTime()); listTRMetadata.add(validSinceMetadata); } else { if (trMetadata instanceof ValidUntilMetadata) { TRValidUntilMetadata validUntilMetadata = new TRValidUntilMetadata(); - Calendar cal = ((ValidUntilMetadata) trMetadata) - .getValue(); - validUntilMetadata.setValue(cal - .getTime()); + Calendar cal = ((ValidUntilMetadata) trMetadata).getValue(); + validUntilMetadata.setValue(cal.getTime()); listTRMetadata.add(validUntilMetadata); } else { if (trMetadata instanceof LicenceMetadata) { TRLicenceMetadata licenceMetadata = new TRLicenceMetadata(); licenceMetadata - .setValue(((LicenceMetadata) trMetadata) - .getValue() - .toString()); + .setValue(((LicenceMetadata) trMetadata).getValue().toString()); listTRMetadata.add(licenceMetadata); } else { @@ -4810,24 +4149,22 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error in getTRMetadata(): " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error in getTRMetadata(): " - + e.getLocalizedMessage()); + logger.error("Error in getTRMetadata(): " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error in getTRMetadata(): " + e.getLocalizedMessage()); } } /** * * @param trId - * @return + * TR id + * @return Table validations metadata * @throws TDGWTServiceException + * Exception */ - public TabValidationsMetadata getTableValidationsMetadata(TRId trId) - throws TDGWTServiceException { + public TabValidationsMetadata getTableValidationsMetadata(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -4836,22 +4173,18 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("GetTableValidationsMetadata on " + trId.toString()); TabularDataService service = TabularDataServiceFactory.getService(); - Table table = service.getTable(new TableId(Long.valueOf(trId - .getTableId()))); + Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); TabValidationsMetadata tabValidationsMetadata = new TabValidationsMetadata(); if (table.contains(ValidationsMetadata.class)) { - ValidationsMetadata validationsMetadata = table - .getMetadata(ValidationsMetadata.class); + ValidationsMetadata validationsMetadata = table.getMetadata(ValidationsMetadata.class); if (validationsMetadata != null) { - List vals = validationsMetadata - .getValidations(); + List vals = validationsMetadata.getValidations(); if (vals != null && vals.size() > 0) { Validations valid = null; ArrayList vList = new ArrayList(); int i = 0; for (Validation v : vals) { - valid = new Validations(String.valueOf(i), "", - v.getDescription(), v.isValid(), null, null); + valid = new Validations(String.valueOf(i), "", v.getDescription(), v.isValid(), null, null); vList.add(valid); i++; } @@ -4868,15 +4201,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error in getTableValidationMetadata(): " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error in getTableValidationMetadata: " - + e.getLocalizedMessage()); + logger.error("Error in getTableValidationMetadata(): " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error in getTableValidationMetadata: " + e.getLocalizedMessage()); } } @@ -4884,8 +4212,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * * {@inheritDoc} */ - public ArrayList getTableMetadata(TRId trId) - throws TDGWTServiceException { + public ArrayList getTableMetadata(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -4894,8 +4221,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("GetTableMetadata on " + trId.toString()); TabularDataService service = TabularDataServiceFactory.getService(); - Table table = service.getTable(new TableId(Long.valueOf(trId - .getTableId()))); + Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); Collection cMeta = table.getAllMetadata(); @@ -4905,8 +4231,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements if (tMetadata instanceof DescriptionsMetadata) { TabDescriptionsMetadata trDescriptionsMetadata = new TabDescriptionsMetadata(); ArrayList listTRLocalizedText = new ArrayList(); - List lLocalizedText = ((DescriptionsMetadata) tMetadata) - .getTexts(); + List lLocalizedText = ((DescriptionsMetadata) tMetadata).getTexts(); int i = 0; for (LocalizedText lt : lLocalizedText) { TRLocalizedText trLocalizedText = new TRLocalizedText(); @@ -4916,16 +4241,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements listTRLocalizedText.add(trLocalizedText); i++; } - trDescriptionsMetadata - .setListTRLocalizedText(listTRLocalizedText); + trDescriptionsMetadata.setListTRLocalizedText(listTRLocalizedText); listTabMetadata.add(trDescriptionsMetadata); } else { if (tMetadata instanceof NamesMetadata) { TabNamesMetadata trNamesMetadata = new TabNamesMetadata(); ArrayList listTRLocalizedText = new ArrayList(); - List lLocalizedText = ((NamesMetadata) tMetadata) - .getTexts(); + List lLocalizedText = ((NamesMetadata) tMetadata).getTexts(); int i = 0; for (LocalizedText lt : lLocalizedText) { TRLocalizedText trLocalizedText = new TRLocalizedText(); @@ -4935,52 +4258,37 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements listTRLocalizedText.add(trLocalizedText); i++; } - trNamesMetadata - .setListTRLocalizedText(listTRLocalizedText); + trNamesMetadata.setListTRLocalizedText(listTRLocalizedText); listTabMetadata.add(trNamesMetadata); } else { if (tMetadata instanceof VersionMetadata) { TabVersionMetadata trVersionMetadata = new TabVersionMetadata(); - trVersionMetadata - .setVersion(((VersionMetadata) tMetadata) - .getVersion()); + trVersionMetadata.setVersion(((VersionMetadata) tMetadata).getVersion()); listTabMetadata.add(trVersionMetadata); } else { if (tMetadata instanceof ExportMetadata) { TabExportMetadata trExportMetadata = new TabExportMetadata(); + trExportMetadata.setDestinationType(((ExportMetadata) tMetadata).getDestinationType()); trExportMetadata - .setDestinationType(((ExportMetadata) tMetadata) - .getDestinationType()); - trExportMetadata.setExportDate(sdf - .format(((ExportMetadata) tMetadata) - .getExportDate())); - trExportMetadata - .setUrl(((ExportMetadata) tMetadata) - .getUri()); + .setExportDate(sdf.format(((ExportMetadata) tMetadata).getExportDate())); + trExportMetadata.setUrl(((ExportMetadata) tMetadata).getUri()); listTabMetadata.add(trExportMetadata); } else { if (tMetadata instanceof ImportMetadata) { TabImportMetadata trImportMetadata = new TabImportMetadata(); + trImportMetadata.setSourceType(((ImportMetadata) tMetadata).getSourceType()); trImportMetadata - .setSourceType(((ImportMetadata) tMetadata) - .getSourceType()); - trImportMetadata - .setImportDate(sdf - .format(((ImportMetadata) tMetadata) - .getImportDate())); - trImportMetadata - .setUrl(((ImportMetadata) tMetadata) - .getUri()); + .setImportDate(sdf.format(((ImportMetadata) tMetadata).getImportDate())); + trImportMetadata.setUrl(((ImportMetadata) tMetadata).getUri()); listTabMetadata.add(trImportMetadata); } else { if (tMetadata instanceof GenericMapMetadata) { TabGenericMapMetadata trGenericMapMetadata = new TabGenericMapMetadata(); - trGenericMapMetadata - .setMetadataMap((HashMap) ((GenericMapMetadata) tMetadata) + trGenericMapMetadata.setMetadataMap( + (HashMap) ((GenericMapMetadata) tMetadata) .getMetadataMap()); - listTabMetadata - .add(trGenericMapMetadata); + listTabMetadata.add(trGenericMapMetadata); } else { } @@ -4997,23 +4305,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (TDGWTServiceException e) { throw e; } catch (Throwable e) { - logger.error( - "Error in getTableMetadata(): " + e.getLocalizedMessage(), - e); - throw new TDGWTServiceException("Error in getTableMetadata(): " - + e.getLocalizedMessage()); + logger.error("Error in getTableMetadata(): " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error in getTableMetadata(): " + e.getLocalizedMessage()); } } - /** - * - * @param trId - * @param httpRequest - * @param serviceCredentials - * @throws TDGWTServiceException - */ - protected void checkTRId(TRId trId, HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials) throws TDGWTServiceException { + protected void checkTRId(TRId trId, HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) + throws TDGWTServiceException { if (trId == null) { ResourceBundle messages = getResourceBundle(httpRequest); logger.error("TRId is null"); @@ -5029,15 +4327,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } } - /** - * - * @param tabularResource - * @param httpRequest - * @param serviceCredentials - * @throws TDGWTServiceException - */ - protected void checkTabularResourceLocked(TabularResource tabularResource, - HttpServletRequest httpRequest, + protected void checkTabularResourceLocked(TabularResource tabularResource, HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { try { @@ -5057,15 +4347,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } } - /** - * - * @param tabularResource - * @param httpRequest - * @param serviceCredentials - * @throws TDGWTServiceException - */ - protected void checkTabularResourceIsFinal(TabularResource tabularResource, - HttpServletRequest httpRequest, + protected void checkTabularResourceIsFinal(TabularResource tabularResource, HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { try { @@ -5086,20 +4368,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } } - /** - * - * @param tabularResource - * @param httpRequest - * @param serviceCredentials - * @throws TDGWTServiceException - */ - protected void checkTabularResourceIsFlow(TabularResource tabularResource, - HttpServletRequest httpRequest, + protected void checkTabularResourceIsFlow(TabularResource tabularResource, HttpServletRequest httpRequest, ServiceCredentials serviceCredentials) throws TDGWTServiceException { try { - if (tabularResource.getTabularResourceType().compareTo( - TabularResourceType.FLOW) == 0) { + if (tabularResource.getTabularResourceType().compareTo(TabularResourceType.FLOW) == 0) { ResourceBundle messages = getResourceBundle(httpRequest); logger.error("Operation not allowed on a tabular resource of type flow"); throw new TDGWTIsFlowException( @@ -5115,41 +4388,30 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } } - /** - * - * @param exportSession - * @return - */ @Override - public String startSDMXExport(SDMXExportSession exportSession) - throws TDGWTServiceException { + public String startSDMXExport(SDMXExportSession exportSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("Start SDMX Export"); TRId trId = SessionUtil.getTRId(httpRequest, serviceCredentials); if (trId == null) { - throw new TDGWTServiceException( - "Error no tabular resource in session"); + throw new TDGWTServiceException("Error no tabular resource in session"); } if (trId.getTableId() == null) { - throw new TDGWTServiceException( - "Error no table present in session"); + throw new TDGWTServiceException("Error no table present in session"); } if (exportSession == null) { logger.error("Error in SDMX Export: exportSession is null!"); - throw new TDGWTServiceException( - "Error in SDMX Export: exportSession is null!!"); + throw new TDGWTServiceException("Error in SDMX Export: exportSession is null!!"); } - SessionUtil.setSDMXExportSession(httpRequest, serviceCredentials, - exportSession); + SessionUtil.setSDMXExportSession(httpRequest, serviceCredentials, exportSession); logger.debug("Tabular Data Service"); @@ -5157,53 +4419,42 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements checkTRId(trId, httpRequest, serviceCredentials); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); OpExecutionDirector director = new OpExecutionDirector(); // / switch (exportSession.getExportType()) { case CODELIST: - OpExecution4SDMXCodelistExport opExC = new OpExecution4SDMXCodelistExport( - service, exportSession); + OpExecution4SDMXCodelistExport opExC = new OpExecution4SDMXCodelistExport(service, exportSession); director.setOperationExecutionBuilder(opExC); break; case DATASET: - OpExecution4SDMXDatasetExport opExD = new OpExecution4SDMXDatasetExport( - service, exportSession); + OpExecution4SDMXDatasetExport opExD = new OpExecution4SDMXDatasetExport(service, exportSession); director.setOperationExecutionBuilder(opExD); break; case GENERIC: default: logger.error("Error in SDMX Export: Only Codelist and Dataset are supported!"); - throw new TDGWTServiceException( - "Error in SDMXExport: Only Codelist and Dataset are supported!"); + throw new TDGWTServiceException("Error in SDMXExport: Only Codelist and Dataset are supported!"); } director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in SDMXExport: Operation not supported for now!"); + throw new TDGWTServiceException("Error in SDMXExport: Operation not supported for now!"); } logger.debug("OperationInvocation: \n" + invocation.toString()); - Task trTask = service.execute(invocation, new TabularResourceId( - Long.valueOf(trId.getId()))); + Task trTask = service.execute(invocation, new TabularResourceId(Long.valueOf(trId.getId()))); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.SDMXExport, trId); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.SDMXExport, trId); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); @@ -5212,41 +4463,30 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in SDMXExport: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in SDMXExport: " + e.getLocalizedMessage()); } } - /** - * - * @param sdmxTemplateExportSession - * @return - */ @Override - public String startSDMXTemplateExport( - SDMXTemplateExportSession sdmxTemplateExportSession) + public String startSDMXTemplateExport(SDMXTemplateExportSession sdmxTemplateExportSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("Start SDMX Template Export"); if (sdmxTemplateExportSession == null) { logger.error("Error in SDMX Template Export : templateExportSession is null!"); - throw new TDGWTServiceException( - "Error in SDMX Template Export: templateExportSession is null!!"); + throw new TDGWTServiceException("Error in SDMX Template Export: templateExportSession is null!!"); } - SessionUtil.setSDMXTemplateExportSession(httpRequest, - serviceCredentials, sdmxTemplateExportSession); + SessionUtil.setSDMXTemplateExportSession(httpRequest, serviceCredentials, sdmxTemplateExportSession); TRId trId = SessionUtil.getTRId(httpRequest, serviceCredentials); @@ -5256,47 +4496,37 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements OpExecutionDirector director = new OpExecutionDirector(); // / - OpExecution4SDMXTemplateExport opExD = new OpExecution4SDMXTemplateExport( - service, sdmxTemplateExportSession); + OpExecution4SDMXTemplateExport opExD = new OpExecution4SDMXTemplateExport(service, + sdmxTemplateExportSession); director.setOperationExecutionBuilder(opExD); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in SDMX Template Export: Operation not supported for now!"); + throw new TDGWTServiceException("Error in SDMX Template Export: Operation not supported for now!"); } logger.debug("OperationInvocation: \n" + invocation.toString()); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.SDMXTemplateExport, trId); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.SDMXTemplateExport, trId); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { throw e; } catch (SecurityException e) { - logger.error( - "Error in SDMX Template Export: " + e.getLocalizedMessage(), - e); + logger.error("Error in SDMX Template Export: " + e.getLocalizedMessage(), e); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error in SDMX Template Export: " + e.getLocalizedMessage(), - e); - throw new TDGWTServiceException("Error in SDMX Template Export: " - + e.getLocalizedMessage()); + logger.error("Error in SDMX Template Export: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error in SDMX Template Export: " + e.getLocalizedMessage()); } } @@ -5306,62 +4536,50 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startCSVExport(CSVExportSession exportSession) - throws TDGWTServiceException { + public String startCSVExport(CSVExportSession exportSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("Start CSV Export"); TRId trId = SessionUtil.getTRId(httpRequest, serviceCredentials); if (trId == null) { - throw new TDGWTServiceException( - "Error no tabular resource in session"); + throw new TDGWTServiceException("Error no tabular resource in session"); } if (trId.getTableId() == null) { - throw new TDGWTServiceException( - "Error no table present in session"); + throw new TDGWTServiceException("Error no table present in session"); } - SessionUtil.setCSVExportSession(httpRequest, serviceCredentials, - exportSession); + SessionUtil.setCSVExportSession(httpRequest, serviceCredentials, exportSession); TabularDataService service = TabularDataServiceFactory.getService(); checkTRId(trId, httpRequest, serviceCredentials); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); - OpExecution4CSVExport opEx = new OpExecution4CSVExport(httpRequest, - serviceCredentials, service, exportSession); + OpExecution4CSVExport opEx = new OpExecution4CSVExport(httpRequest, serviceCredentials, service, + exportSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in CSVExport: Operation not supported for now!"); + throw new TDGWTServiceException("Error in CSVExport: Operation not supported for now!"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.CSVExport, trId); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.CSVExport, trId); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); @@ -5370,12 +4588,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in CSV Export: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in CSV Export: " + e.getLocalizedMessage()); } } @@ -5385,62 +4601,50 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startJSONExport(JSONExportSession exportSession) - throws TDGWTServiceException { + public String startJSONExport(JSONExportSession exportSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("Start JSON Export"); TRId trId = SessionUtil.getTRId(httpRequest, serviceCredentials); if (trId == null) { - throw new TDGWTServiceException( - "Error no tabular resource in session"); + throw new TDGWTServiceException("Error no tabular resource in session"); } if (trId.getTableId() == null) { - throw new TDGWTServiceException( - "Error no table present in session"); + throw new TDGWTServiceException("Error no table present in session"); } - SessionUtil.setJSONExportSession(httpRequest, serviceCredentials, - exportSession); + SessionUtil.setJSONExportSession(httpRequest, serviceCredentials, exportSession); TabularDataService service = TabularDataServiceFactory.getService(); checkTRId(trId, httpRequest, serviceCredentials); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); - OpExecution4JSONExport opEx = new OpExecution4JSONExport( - httpRequest, serviceCredentials, service, exportSession); + OpExecution4JSONExport opEx = new OpExecution4JSONExport(httpRequest, serviceCredentials, service, + exportSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in JSONExport: Operation not supported for now!"); + throw new TDGWTServiceException("Error in JSONExport: Operation not supported for now!"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.JSONExport, trId); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.JSONExport, trId); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); @@ -5449,12 +4653,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in JSON Export: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in JSON Export: " + e.getLocalizedMessage()); } } @@ -5464,56 +4666,42 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startChangeColumnType( - ChangeColumnTypeSession changeColumnTypeSession) - throws TDGWTServiceException { + public String startChangeColumnType(ChangeColumnTypeSession changeColumnTypeSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setChangeColumnTypeSession(httpRequest, - serviceCredentials, changeColumnTypeSession); + SessionUtil.setChangeColumnTypeSession(httpRequest, serviceCredentials, changeColumnTypeSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(changeColumnTypeSession.getColumnData().getTrId(), - httpRequest, serviceCredentials); + checkTRId(changeColumnTypeSession.getColumnData().getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(changeColumnTypeSession.getColumnData() - .getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + Long.valueOf(changeColumnTypeSession.getColumnData().getTrId().getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4ChangeColumnType opEx = new OpExecution4ChangeColumnType( - service, changeColumnTypeSession); + OpExecution4ChangeColumnType opEx = new OpExecution4ChangeColumnType(service, changeColumnTypeSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in ChangeColumnType: Operation not supported for now!"); + throw new TDGWTServiceException("Error in ChangeColumnType: Operation not supported for now!"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.ChangeColumnType, changeColumnTypeSession - .getColumnData().getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.ChangeColumnType, + changeColumnTypeSession.getColumnData().getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); @@ -5522,75 +4710,59 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in ChangeColumnType: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in ChangeColumnType: " + e.getLocalizedMessage()); } } - public String startAddColumn(AddColumnSession addColumnSession, - Expression expression, HttpServletRequest httpRequest) - throws TDGWTServiceException { + public String startAddColumn(AddColumnSession addColumnSession, Expression expression, + HttpServletRequest httpRequest) throws TDGWTServiceException { try { - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setAddColumnSession(httpRequest, serviceCredentials, - addColumnSession); + SessionUtil.setAddColumnSession(httpRequest, serviceCredentials, addColumnSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(addColumnSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(addColumnSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(addColumnSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4AddColumn opEx = new OpExecution4AddColumn(service, - addColumnSession, expression); + OpExecution4AddColumn opEx = new OpExecution4AddColumn(service, addColumnSession, expression); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error Add Column: Operation not supported for now!"); + throw new TDGWTServiceException("Error Add Column: Operation not supported for now!"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.AddColumn, addColumnSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.AddColumn, addColumnSession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { throw e; } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in AddColumn: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in AddColumn: " + e.getLocalizedMessage()); } } @@ -5600,8 +4772,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startAddColumn(AddColumnSession addColumnSession) - throws TDGWTServiceException { + public String startAddColumn(AddColumnSession addColumnSession) throws TDGWTServiceException { HttpServletRequest httpRequest = this.getThreadLocalRequest(); return startAddColumn(addColumnSession, null, httpRequest); } @@ -5610,56 +4781,44 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * * {@inheritDoc} */ - public String startDeleteColumn(DeleteColumnSession deleteColumnSession) - throws TDGWTServiceException { + public String startDeleteColumn(DeleteColumnSession deleteColumnSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setDeleteColumnSession(httpRequest, serviceCredentials, - deleteColumnSession); + SessionUtil.setDeleteColumnSession(httpRequest, serviceCredentials, deleteColumnSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(deleteColumnSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(deleteColumnSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(deleteColumnSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4DeleteColumn opEx = new OpExecution4DeleteColumn( - service, deleteColumnSession); + OpExecution4DeleteColumn opEx = new OpExecution4DeleteColumn(service, deleteColumnSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); - ArrayList invocation = director - .getListOperationExecution(); + ArrayList invocation = director.getListOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error Delete Column: Operation not supported for now!"); + throw new TDGWTServiceException("Error Delete Column: Operation not supported for now!"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.executeBatch(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.DeleteColumn, deleteColumnSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.DeleteColumn, + deleteColumnSession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); @@ -5668,78 +4827,55 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in DeleteColumn: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in DeleteColumn: " + e.getLocalizedMessage()); } } - /** - * Start Filter Column - * - * @param filterColumnSession - * @param expression - * @param httpRequest - * @return - * @throws TDGWTServiceException - */ - public String startFilterColumn(FilterColumnSession filterColumnSession, - Expression expression, HttpServletRequest httpRequest) - throws TDGWTServiceException { + public String startFilterColumn(FilterColumnSession filterColumnSession, Expression expression, + HttpServletRequest httpRequest) throws TDGWTServiceException { try { - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setFilterColumnSession(httpRequest, serviceCredentials, - filterColumnSession); + SessionUtil.setFilterColumnSession(httpRequest, serviceCredentials, filterColumnSession); if (filterColumnSession == null) { logger.error("FilterColumnSession is null"); - throw new TDGWTServiceException( - "Error in filter column: FilterColumnSession is null"); + throw new TDGWTServiceException("Error in filter column: FilterColumnSession is null"); } logger.debug("StartFilterColumn: " + filterColumnSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(filterColumnSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(filterColumnSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(filterColumnSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4FilterColumn opEx = new OpExecution4FilterColumn( - service, filterColumnSession, expression); + OpExecution4FilterColumn opEx = new OpExecution4FilterColumn(service, filterColumnSession, expression); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Filter Column on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.FilterColumn, filterColumnSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.FilterColumn, + filterColumnSession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -5747,91 +4883,63 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in filter column: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in filter column: " + e.getLocalizedMessage()); } } - /** - * Start Replace Column by Expression - * - * @param replaceColumnByExpressionSession - * @param conditionExpression - * @param replaceExpression - * @param httpRequest - * @return - * @throws TDGWTServiceException - */ - public String startReplaceColumnByExpression( - ReplaceColumnByExpressionSession replaceColumnByExpressionSession, - Expression conditionExpression, Expression replaceExpression, - HttpServletRequest httpRequest) throws TDGWTServiceException { + public String startReplaceColumnByExpression(ReplaceColumnByExpressionSession replaceColumnByExpressionSession, + Expression conditionExpression, Expression replaceExpression, HttpServletRequest httpRequest) + throws TDGWTServiceException { try { - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setReplaceColumnByExpressionSession(httpRequest, - serviceCredentials, replaceColumnByExpressionSession); + SessionUtil.setReplaceColumnByExpressionSession(httpRequest, serviceCredentials, + replaceColumnByExpressionSession); if (replaceColumnByExpressionSession == null) { logger.error("ReplaceColumnByExpressionSession is null"); throw new TDGWTServiceException( "Error in replace column by expression: ReplaceColumnByExpressionSession is null"); } - logger.debug("StartReplaceColumnByExpression: " - + replaceColumnByExpressionSession); + logger.debug("StartReplaceColumnByExpression: " + replaceColumnByExpressionSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(replaceColumnByExpressionSession.getColumn().getTrId(), - httpRequest, serviceCredentials); + checkTRId(replaceColumnByExpressionSession.getColumn().getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(replaceColumnByExpressionSession.getColumn() - .getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + Long.valueOf(replaceColumnByExpressionSession.getColumn().getTrId().getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4ReplaceColumnByExpression opEx = new OpExecution4ReplaceColumnByExpression( - service, replaceColumnByExpressionSession, - conditionExpression, replaceExpression); + OpExecution4ReplaceColumnByExpression opEx = new OpExecution4ReplaceColumnByExpression(service, + replaceColumnByExpressionSession, conditionExpression, replaceExpression); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); - logger.debug("Start Replace on Service:" - + sdfPerformance.format(new Date())); + logger.debug("Start Replace on Service:" + sdfPerformance.format(new Date())); Task trTask = service.execute(invocation, tabularResourceId); - logger.debug("Start Replace returned task:" - + sdfPerformance.format(new Date())); + logger.debug("Start Replace returned task:" + sdfPerformance.format(new Date())); - logger.debug("Replace Column by Expression on service: TaskId " - + trTask.getId()); + logger.debug("Replace Column by Expression on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.ReplaceByExpression, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.ReplaceByExpression, replaceColumnByExpressionSession.getColumn().getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -5839,13 +4947,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException( - "Error in replace column by expression: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in replace column by expression: " + e.getLocalizedMessage()); } } @@ -5854,37 +4959,28 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * * {@inheritDoc} */ - public String startLabelColumn(LabelColumnSession labelColumnSession) - throws TDGWTServiceException { + public String startLabelColumn(LabelColumnSession labelColumnSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setLabelColumnSession(httpRequest, serviceCredentials, - labelColumnSession); + SessionUtil.setLabelColumnSession(httpRequest, serviceCredentials, labelColumnSession); logger.debug(labelColumnSession.toString()); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(labelColumnSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(labelColumnSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(labelColumnSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4LabelColumn opEx = new OpExecution4LabelColumn(service, - labelColumnSession); + OpExecution4LabelColumn opEx = new OpExecution4LabelColumn(service, labelColumnSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); @@ -5925,12 +5021,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error Changing The Column Label: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error Changing The Column Label: " + e.getLocalizedMessage()); } } @@ -5940,56 +5034,43 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startChangeTableType( - ChangeTableTypeSession changeTableTypeSession) - throws TDGWTServiceException { + public String startChangeTableType(ChangeTableTypeSession changeTableTypeSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setChangeTableTypeSession(httpRequest, - serviceCredentials, changeTableTypeSession); + SessionUtil.setChangeTableTypeSession(httpRequest, serviceCredentials, changeTableTypeSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(changeTableTypeSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(changeTableTypeSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(changeTableTypeSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4ChangeTableType opEx = new OpExecution4ChangeTableType( - service, changeTableTypeSession); + OpExecution4ChangeTableType opEx = new OpExecution4ChangeTableType(service, changeTableTypeSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error Change Table Type invocation: Operation not supported"); + throw new TDGWTServiceException("Error Change Table Type invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.ChangeTableType, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.ChangeTableType, changeTableTypeSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -5997,12 +5078,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error Changing Table Type: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error Changing Table Type: " + e.getLocalizedMessage()); } } @@ -6013,8 +5092,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public ArrayList getColumnsForDimension(TRId trId) - throws TDGWTServiceException { + public ArrayList getColumnsForDimension(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -6024,8 +5102,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - Table table = service.getTable(new TableId(Long.valueOf(trId - .getTableId()))); + Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); ArrayList columns = new ArrayList(); @@ -6033,8 +5110,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements int i = 0; for (Column c : cols) { ColumnType ctype = c.getColumnType(); - if (c.getColumnType() instanceof IdColumnType - || c.getColumnType() instanceof ValidationColumnType + if (c.getColumnType() instanceof IdColumnType || c.getColumnType() instanceof ValidationColumnType || c.getColumnType() instanceof DimensionColumnType || c.getColumnType() instanceof TimeDimensionColumnType) { @@ -6042,8 +5118,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements if (c.contains(ViewColumnMetadata.class)) { } else { - if (ctype instanceof CodeColumnType - || ctype instanceof CodeNameColumnType + if (ctype instanceof CodeColumnType || ctype instanceof CodeNameColumnType || ctype instanceof CodeDescriptionColumnType || ctype instanceof AnnotationColumnType) { @@ -6057,8 +5132,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements NamesMetadata labelsMetadata = null; if (c.contains(NamesMetadata.class)) { - labelsMetadata = c - .getMetadata(NamesMetadata.class); + labelsMetadata = c.getMetadata(NamesMetadata.class); } if (labelsMetadata == null) { @@ -6071,22 +5145,19 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements cData.setLabel("nolabel"); logger.debug("ColumnLabel no label in en"); } else { - if (cl.getValue() == null - || cl.getValue().isEmpty()) { + if (cl.getValue() == null || cl.getValue().isEmpty()) { cData.setLabel("nolabel"); logger.debug("ColumnLabel no label in en"); } else { cData.setLabel(cl.getValue()); - logger.debug("Column Set Label: " - + cl.getValue()); + logger.debug("Column Set Label: " + cl.getValue()); } } } DataLocaleMetadata dataLocaleMetadata = null; if (c.contains(DataLocaleMetadata.class)) { - dataLocaleMetadata = c - .getMetadata(DataLocaleMetadata.class); + dataLocaleMetadata = c.getMetadata(DataLocaleMetadata.class); cData.setLocale(dataLocaleMetadata.getLocale()); } @@ -6103,14 +5174,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error in getColumnsForDimension() retrieving Columns: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error retrieving Columns: " - + e.getLocalizedMessage()); + logger.error("Error in getColumnsForDimension() retrieving Columns: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving Columns: " + e.getLocalizedMessage()); } } @@ -6119,54 +5186,42 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startDeleteRows(DeleteRowsSession deleteRowsSession) - throws TDGWTServiceException { + public String startDeleteRows(DeleteRowsSession deleteRowsSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setDeleteRowsSession(httpRequest, serviceCredentials, - deleteRowsSession); + SessionUtil.setDeleteRowsSession(httpRequest, serviceCredentials, deleteRowsSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(deleteRowsSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(deleteRowsSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(deleteRowsSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4DeleteRows opEx = new OpExecution4DeleteRows(service, - deleteRowsSession); + OpExecution4DeleteRows opEx = new OpExecution4DeleteRows(service, deleteRowsSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error Delete Rows invocation: Operation not supported"); + throw new TDGWTServiceException("Error Delete Rows invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.DeleteRow, deleteRowsSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.DeleteRow, deleteRowsSession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -6174,12 +5229,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error Deleting Rows: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error Deleting Rows: " + e.getLocalizedMessage()); } } @@ -6190,41 +5243,33 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements */ @Override - public String startCloneTabularResource( - CloneTabularResourceSession cloneTabularResourceSession) + public String startCloneTabularResource(CloneTabularResourceSession cloneTabularResourceSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - logger.debug("CloneTabularResourceSession: " - + cloneTabularResourceSession); + logger.debug("CloneTabularResourceSession: " + cloneTabularResourceSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(cloneTabularResourceSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(cloneTabularResourceSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(cloneTabularResourceSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); - OpExecution4Clone opEx = new OpExecution4Clone(service, - cloneTabularResourceSession); + OpExecution4Clone opEx = new OpExecution4Clone(service, cloneTabularResourceSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } TabularResource cloneTR = service.createTabularResource(); @@ -6244,21 +5289,17 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements nameMetadata = new NameMetadata("cloned"); } cloneTR.setMetadata(nameMetadata); - TRId trIdClone = new TRId( - String.valueOf(cloneTR.getId().getValue())); + TRId trIdClone = new TRId(String.valueOf(cloneTR.getId().getValue())); cloneTabularResourceSession.setTrIdClone(trIdClone); - SessionUtil.setCloneTabularResourceSession(httpRequest, - serviceCredentials, cloneTabularResourceSession); + SessionUtil.setCloneTabularResourceSession(httpRequest, serviceCredentials, cloneTabularResourceSession); logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, cloneTR.getId()); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.Clone, trIdClone); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.Clone, trIdClone); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -6266,12 +5307,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error Cloning: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error Cloning: " + e.getLocalizedMessage()); } } @@ -6281,54 +5320,43 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startDuplicates(DuplicatesSession duplicatesSession) - throws TDGWTServiceException { + public String startDuplicates(DuplicatesSession duplicatesSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setDuplicatesSession(httpRequest, serviceCredentials, - duplicatesSession); + SessionUtil.setDuplicatesSession(httpRequest, serviceCredentials, duplicatesSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(duplicatesSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(duplicatesSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(duplicatesSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4Duplicates opEx = new OpExecution4Duplicates(service, - duplicatesSession); + OpExecution4Duplicates opEx = new OpExecution4Duplicates(service, duplicatesSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error Delete Rows invocation: Operation not supported"); + throw new TDGWTServiceException("Error Delete Rows invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.DuplicateTuples, duplicatesSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.DuplicateTuples, + duplicatesSession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -6336,55 +5364,42 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException( - "Error in operation for duplicates: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in operation for duplicates: " + e.getLocalizedMessage()); } } - // TODO /** * * {@inheritDoc} */ @Override - public String startValidationsDelete(TRId trId) - throws TDGWTServiceException { + public String startValidationsDelete(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("startValidationDelete():" + trId); TabularDataService service = TabularDataServiceFactory.getService(); checkTRId(trId, httpRequest, serviceCredentials); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); Task trTask = service.removeValidations(tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.ValidationsDelete, trId); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.ValidationsDelete, trId); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -6392,18 +5407,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error deleting validations: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error deleting validations: " + e.getLocalizedMessage()); } } - private ArrayList retrieveShareInfo(TabularResource tr) - throws TDGWTServiceException { + private ArrayList retrieveShareInfo(TabularResource tr) throws TDGWTServiceException { try { ArrayList contacts = new ArrayList(); @@ -6428,12 +5440,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(null); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in retrieveShareInfo: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in retrieveShareInfo: " + e.getLocalizedMessage()); } } @@ -6443,13 +5453,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public void setShare(ShareTabResource shareInfo) - throws TDGWTServiceException { + public void setShare(ShareTabResource shareInfo) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("ShareInfo: " + shareInfo); TabularDataService service = TabularDataServiceFactory.getService(); @@ -6473,8 +5481,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("Share with Users: " + users); service.share(tabularResourceId, usersArray); - TDMNotifications tdmNotifications = new TDMNotifications( - this.getThreadLocalRequest(), serviceCredentials, shareInfo); + TDMNotifications tdmNotifications = new TDMNotifications(this.getThreadLocalRequest(), serviceCredentials, + shareInfo); tdmNotifications.start(); } catch (TDGWTServiceException e) { @@ -6482,8 +5490,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); throw new TDGWTServiceException("Error on service"); @@ -6495,18 +5502,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public void setShareTemplate(ShareTemplate shareTemplate) - throws TDGWTServiceException { + public void setShareTemplate(ShareTemplate shareTemplate) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("ShareTemplate: " + shareTemplate); TabularDataService service = TabularDataServiceFactory.getService(); - TemplateId templateId = new TemplateId(Long.valueOf(shareTemplate - .getTemplateData().getId())); + TemplateId templateId = new TemplateId(Long.valueOf(shareTemplate.getTemplateData().getId())); List users = new ArrayList<>(); for (Contacts cont : shareTemplate.getContacts()) { @@ -6523,8 +5527,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("Share with Users: " + users); service.share(templateId, usersArray); - TDMNotifications tdmNotifications = new TDMNotifications( - this.getThreadLocalRequest(), serviceCredentials, + TDMNotifications tdmNotifications = new TDMNotifications(this.getThreadLocalRequest(), serviceCredentials, shareTemplate); tdmNotifications.start(); @@ -6533,8 +5536,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); throw new TDGWTServiceException("Error on service"); @@ -6550,13 +5552,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("ShareRule: " + shareRule); TabularDataService service = TabularDataServiceFactory.getService(); - RuleId ruleId = new RuleId(Long.valueOf(shareRule - .getRuleDescriptionData().getId())); + RuleId ruleId = new RuleId(Long.valueOf(shareRule.getRuleDescriptionData().getId())); List users = new ArrayList<>(); for (Contacts cont : shareRule.getContacts()) { @@ -6573,8 +5573,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("Share with Users: " + users); service.share(ruleId, usersArray); - TDMNotifications tdmNotifications = new TDMNotifications( - this.getThreadLocalRequest(), serviceCredentials, shareRule); + TDMNotifications tdmNotifications = new TDMNotifications(this.getThreadLocalRequest(), serviceCredentials, + shareRule); tdmNotifications.start(); } catch (TDGWTServiceException e) { @@ -6582,16 +5582,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); throw new TDGWTServiceException("Error on service"); } } - public boolean checkTabularResourceNotFinal(TRId trId) - throws TDGWTServiceException { + public boolean checkTabularResourceNotFinal(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -6600,8 +5598,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("checkTabularResourceNotFinal: " + trId); TabularDataService service = TabularDataServiceFactory.getService(); - TabularResourceId tabularResourceId = new TabularResourceId( - new Long(trId.getId())); + TabularResourceId tabularResourceId = new TabularResourceId(new Long(trId.getId())); TabularResource tr = service.getTabularResource(tabularResourceId); return tr.isFinalized(); @@ -6611,15 +5608,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.debug("Error in checkTabularResourceNotFinal: " - + e.getLocalizedMessage()); + logger.debug("Error in checkTabularResourceNotFinal: " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException( - "Error in checkTabularResourceNotFinal: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in checkTabularResourceNotFinal: " + e.getLocalizedMessage()); } } @@ -6628,21 +5621,18 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public void setTabResourceInformation(TabResource tabResource) - throws TDGWTServiceException { + public void setTabResourceInformation(TabResource tabResource) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("SetTabResourceInformation: " + tabResource); TabularDataService service = TabularDataServiceFactory.getService(); checkTRId(tabResource.getTrId(), httpRequest, serviceCredentials); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(tabResource.getTrId().getId())); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(tabResource.getTrId().getId())); TabularResource tr = service.getTabularResource(tabularResourceId); checkTabularResourceLocked(tr, httpRequest, serviceCredentials); @@ -6658,21 +5648,18 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } if (tabResource.getDescription() != null) { - DescriptionMetadata description = new DescriptionMetadata( - tabResource.getDescription()); + DescriptionMetadata description = new DescriptionMetadata(tabResource.getDescription()); meta.add(description); } if (tabResource.getAgency() != null) { - AgencyMetadata agency = new AgencyMetadata( - tabResource.getAgency()); + AgencyMetadata agency = new AgencyMetadata(tabResource.getAgency()); meta.add(agency); } if (tabResource.getRight() != null) { - RightsMetadata rights = new RightsMetadata( - tabResource.getRight()); + RightsMetadata rights = new RightsMetadata(tabResource.getRight()); meta.add(rights); } @@ -6694,24 +5681,21 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements Date dateU = tabResource.getValidUntilTo(); GregorianCalendar validUntilToC = new GregorianCalendar(); validUntilToC.setTime(dateU); - ValidUntilMetadata validUntil = new ValidUntilMetadata( - validUntilToC); + ValidUntilMetadata validUntil = new ValidUntilMetadata(validUntilToC); meta.add(validUntil); } catch (Throwable e) { logger.info("ValidUntilMetadata is not set, no valid calendar present"); } } - if (tabResource.getLicence() != null - && !tabResource.getLicence().isEmpty()) { + if (tabResource.getLicence() != null && !tabResource.getLicence().isEmpty()) { LicenceMetadata licenceMetadata = new LicenceMetadata(); Licence licence = LicenceMap.map(tabResource.getLicence()); if (licence != null) { licenceMetadata.setValue(licence); meta.add(licenceMetadata); } else { - logger.error("Licence type not found: " - + tabResource.getLicence()); + logger.error("Licence type not found: " + tabResource.getLicence()); } } @@ -6724,8 +5708,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements tr.finalize(); } } else { - throw new TDGWTServiceException( - "Only valid tabular resource can be finalized!"); + throw new TDGWTServiceException("Only valid tabular resource can be finalized!"); } } logger.debug("setTabResourceInformation - new information:" + tr); @@ -6735,15 +5718,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.debug("Error in setTabResourceInformation: " - + e.getLocalizedMessage()); + logger.debug("Error in setTabResourceInformation: " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException( - "Error in setTabResourceInformation: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in setTabResourceInformation: " + e.getLocalizedMessage()); } } @@ -6757,16 +5736,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("SetTabResourceToFinal: " + trId); TabularDataService service = TabularDataServiceFactory.getService(); checkTRId(trId, httpRequest, serviceCredentials); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); TabularResource tr = service.getTabularResource(tabularResourceId); checkTabularResourceLocked(tr, httpRequest, serviceCredentials); @@ -6779,8 +5756,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements tr.finalize(); } } else { - throw new TDGWTServiceException( - "Only valid tabular resource can be finalized!"); + throw new TDGWTServiceException("Only valid tabular resource can be finalized!"); } logger.debug("setTabResourceToFinal - new information:" + tr); @@ -6790,14 +5766,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.debug("Error in setTabResourceToFinal: " - + e.getLocalizedMessage()); + logger.debug("Error in setTabResourceToFinal: " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException("Error in setTabResourceToFinal: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in setTabResourceToFinal: " + e.getLocalizedMessage()); } } @@ -6815,14 +5788,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements httpRequest = this.getThreadLocalRequest(); SessionUtil.getServiceCredentials(httpRequest); - logger.debug("GetOccurencesForBatchReplace: " - + occurrencesForReplaceBatchColumnSession.toString()); + logger.debug("GetOccurencesForBatchReplace: " + occurrencesForReplaceBatchColumnSession.toString()); TabularDataService service = TabularDataServiceFactory.getService(); - ArrayList occurences = QueryService.queryOccurences( - service, occurrencesForReplaceBatchColumnSession, - Direction.ASC); + ArrayList occurences = QueryService.queryOccurences(service, + occurrencesForReplaceBatchColumnSession, Direction.ASC); logger.debug("Retrieved Occurences"); return occurences; @@ -6832,15 +5803,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.debug("Error in GetOccurencesForBatchReplace: " - + e.getLocalizedMessage()); + logger.debug("Error in GetOccurencesForBatchReplace: " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException( - "Error in GetOccurencesForBatchReplace: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in GetOccurencesForBatchReplace: " + e.getLocalizedMessage()); } } @@ -6860,8 +5827,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - List templateDescriptorList = service - .getTemplates(); + List templateDescriptorList = service.getTemplates(); ArrayList templateDataList = new ArrayList(); TemplateData templateData; for (TemplateDescription desc : templateDescriptorList) { @@ -6889,8 +5855,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements templateData.setOwner(owner); templateData.setContacts(retrieveTemplateShareInfo(desc)); if (desc.getCreationdDate() != null) { - templateData.setCreationDate(desc.getCreationdDate() - .getTime()); + templateData.setCreationDate(desc.getCreationdDate().getTime()); } else { templateData.setCreationDate(null); } @@ -6905,12 +5870,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.debug("Error in GetTemplates: " + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error in GetTemplates: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in GetTemplates: " + e.getLocalizedMessage()); } } @@ -6920,8 +5883,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public ArrayList getTemplatesForDSDExport() - throws TDGWTServiceException { + public ArrayList getTemplatesForDSDExport() throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -6931,22 +5893,17 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - List templateDescriptorList = service - .getTemplates(); + List templateDescriptorList = service.getTemplates(); ArrayList templateDataList = new ArrayList(); TemplateData templateData; for (TemplateDescription desc : templateDescriptorList) { - if (desc.getTemplate().getCategory() - .compareTo(TemplateCategory.DATASET) == 0) { + if (desc.getTemplate().getCategory().compareTo(TemplateCategory.DATASET) == 0) { - List> columns = desc.getTemplate() - .getColumns(); + List> columns = desc.getTemplate().getColumns(); boolean hasMeasure = false; for (TemplateColumn col : columns) { - if (col.getColumnType() != null - && col.getColumnType().compareTo( - ColumnCategory.MEASURE) == 0) { + if (col.getColumnType() != null && col.getColumnType().compareTo(ColumnCategory.MEASURE) == 0) { hasMeasure = true; break; } @@ -6974,14 +5931,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } - Contacts owner = new Contacts("", desc.getOwner(), - false); + Contacts owner = new Contacts("", desc.getOwner(), false); templateData.setOwner(owner); - templateData - .setContacts(retrieveTemplateShareInfo(desc)); + templateData.setContacts(retrieveTemplateShareInfo(desc)); if (desc.getCreationdDate() != null) { - templateData.setCreationDate(desc - .getCreationdDate().getTime()); + templateData.setCreationDate(desc.getCreationdDate().getTime()); } else { templateData.setCreationDate(null); } @@ -6998,22 +5952,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.debug( - "Error in GetTemplatesForDSDExport: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error in GetTemplateForDSDExport: " - + e.getLocalizedMessage()); + logger.debug("Error in GetTemplatesForDSDExport: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error in GetTemplateForDSDExport: " + e.getLocalizedMessage()); } } @Override - public ArrayList getTemplateColumnsData( - String templateId) throws TDGWTServiceException { + public ArrayList getTemplateColumnsData(String templateId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -7022,31 +5970,23 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("getTemplateColumnsData: TemplateId=" + templateId); if (templateId == null || templateId.isEmpty()) { - logger.error("Error in GetTemplateColumnsData: invalid template id=" - + templateId); - throw new TDGWTServiceException( - "Error in GetTemplateColumnsData: invalid template id=" - + templateId); + logger.error("Error in GetTemplateColumnsData: invalid template id=" + templateId); + throw new TDGWTServiceException("Error in GetTemplateColumnsData: invalid template id=" + templateId); } TabularDataService service = TabularDataServiceFactory.getService(); - TemplateDescription templateDescriptor = service - .getTemplate(new TemplateId(Long.valueOf(templateId))); + TemplateDescription templateDescriptor = service.getTemplate(new TemplateId(Long.valueOf(templateId))); ArrayList templateColumnsDataList = new ArrayList(); - List> columns = templateDescriptor.getTemplate() - .getColumns(); + List> columns = templateDescriptor.getTemplate().getColumns(); int i = 1; for (TemplateColumn c : columns) { - TemplateColumnData templateColumnData = new TemplateColumnData( - Integer.toString(i), - c.getId(), + TemplateColumnData templateColumnData = new TemplateColumnData(Integer.toString(i), c.getId(), ColumnTypeCodeMap.getColumnType(c.getColumnType()), - ColumnDataTypeMap.mapFromDataTypeClass(c.getValueType()), - c.getLabel()); + ColumnDataTypeMap.mapFromDataTypeClass(c.getValueType()), c.getLabel()); templateColumnsDataList.add(templateColumnData); i++; } @@ -7059,26 +5999,20 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { logger.error("Security Exception: " + e.getLocalizedMessage(), e); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.debug( - "Error in GetTemplateColumnsData: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException("Error in GetTemplateColumnsData: " - + e.getLocalizedMessage()); + logger.debug("Error in GetTemplateColumnsData: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error in GetTemplateColumnsData: " + e.getLocalizedMessage()); } } - private ArrayList retrieveTemplateShareInfo( - TemplateDescription templateDescription) + private ArrayList retrieveTemplateShareInfo(TemplateDescription templateDescription) throws TDGWTServiceException { try { ArrayList contacts = new ArrayList(); - List sharedWithUsers = templateDescription - .getSharedWithUsers(); + List sharedWithUsers = templateDescription.getSharedWithUsers(); logger.debug("Shared with Users: " + sharedWithUsers); if (sharedWithUsers != null) { for (String user : sharedWithUsers) { @@ -7087,8 +6021,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } } - List sharedWithGroups = templateDescription - .getSharedWithGroups(); + List sharedWithGroups = templateDescription.getSharedWithGroups(); logger.debug("Shared with Groups: " + sharedWithUsers); if (sharedWithGroups != null) { for (String group : sharedWithGroups) { @@ -7100,12 +6033,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(null); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in retrieveShareInfo: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in retrieveShareInfo: " + e.getLocalizedMessage()); } } @@ -7115,46 +6046,35 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startTemplateApply(TemplateApplySession templateApplySession) - throws TDGWTServiceException { + public String startTemplateApply(TemplateApplySession templateApplySession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("startTemplateApply: " + templateApplySession); - SessionUtil.setTemplateApplySession(httpRequest, - serviceCredentials, templateApplySession); + SessionUtil.setTemplateApplySession(httpRequest, serviceCredentials, templateApplySession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(templateApplySession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(templateApplySession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(templateApplySession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - TemplateId templateId = new TemplateId(templateApplySession - .getTemplateData().getId()); + TemplateId templateId = new TemplateId(templateApplySession.getTemplateData().getId()); Task trTask = service.applyTemplate(templateId, tabularResourceId); logger.debug("startTemplateApply task start"); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.ApplyTemplate, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.ApplyTemplate, templateApplySession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); @@ -7169,13 +6089,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.debug("Error StartTemplateApply: " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException("Error StartTemplateApply: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error StartTemplateApply: " + e.getLocalizedMessage()); } } @@ -7185,8 +6103,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public void templateDelete(TemplateDeleteSession templateDeleteSession) - throws TDGWTServiceException { + public void templateDelete(TemplateDeleteSession templateDeleteSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -7207,19 +6124,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (NoSuchTemplateException e) { logger.debug("Error StartTemplateDelete: No such Template"); e.printStackTrace(); - throw new TDGWTServiceException( - "Error StartTemplateDelete: No such Template"); + throw new TDGWTServiceException("Error StartTemplateDelete: No such Template"); } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.debug("Error StartTemplateDelete: " - + e.getLocalizedMessage()); + logger.debug("Error StartTemplateDelete: " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException("Error StartTemplateDelete: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error StartTemplateDelete: " + e.getLocalizedMessage()); } } @@ -7229,55 +6142,43 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startReplaceColumn(ReplaceColumnSession replaceColumnSession) - throws TDGWTServiceException { + public String startReplaceColumn(ReplaceColumnSession replaceColumnSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setReplaceColumnSession(httpRequest, - serviceCredentials, replaceColumnSession); + SessionUtil.setReplaceColumnSession(httpRequest, serviceCredentials, replaceColumnSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(replaceColumnSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(replaceColumnSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(replaceColumnSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4ReplaceColumn opEx = new OpExecution4ReplaceColumn( - service, replaceColumnSession); + OpExecution4ReplaceColumn opEx = new OpExecution4ReplaceColumn(service, replaceColumnSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error Replace Column Value invocation: Operation not supported"); + throw new TDGWTServiceException("Error Replace Column Value invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.ReplaceValue, replaceColumnSession - .getColumnData().getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.ReplaceValue, + replaceColumnSession.getColumnData().getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); @@ -7286,13 +6187,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException( - "Error in operation for replace column value: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in operation for replace column value: " + e.getLocalizedMessage()); } } @@ -7302,43 +6200,33 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startReplaceBatchColumn( - ReplaceBatchColumnSession replaceBatchColumnSession) + public String startReplaceBatchColumn(ReplaceBatchColumnSession replaceBatchColumnSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setReplaceBatchColumnSession(httpRequest, - serviceCredentials, replaceBatchColumnSession); + SessionUtil.setReplaceBatchColumnSession(httpRequest, serviceCredentials, replaceBatchColumnSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(replaceBatchColumnSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(replaceBatchColumnSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(replaceBatchColumnSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4ReplaceBatch opEx = new OpExecution4ReplaceBatch( - service, replaceBatchColumnSession); + OpExecution4ReplaceBatch opEx = new OpExecution4ReplaceBatch(service, replaceBatchColumnSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); - List invocations = director - .getListOperationExecution(); + List invocations = director.getListOperationExecution(); if (invocations == null) { throw new TDGWTServiceException("Operation not supported"); @@ -7352,11 +6240,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.ReplaceBatch, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.ReplaceBatch, replaceBatchColumnSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); @@ -7365,13 +6251,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); throw new TDGWTServiceException( - "Error in operation for batch replace on column: " - + e.getLocalizedMessage()); + "Error in operation for batch replace on column: " + e.getLocalizedMessage()); } } @@ -7400,8 +6284,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (Throwable e) { logger.debug("getLocales(): " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException("Error retrieving locales: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving locales: " + e.getLocalizedMessage()); } } @@ -7415,25 +6298,20 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("getLastOperationInfo()"); - TabResource currentTR = SessionUtil.getTabResource(httpRequest, - serviceCredentials); + TabResource currentTR = SessionUtil.getTabResource(httpRequest, serviceCredentials); if (currentTR == null) { logger.error("Current Tabular Resource is null"); - throw new TDGWTServiceException( - "Current Tabular Resource is null"); + throw new TDGWTServiceException("Current Tabular Resource is null"); } TRId trId = currentTR.getTrId(); TabularDataService service = TabularDataServiceFactory.getService(); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); List history = tabularResource.getHistory(); long historyId = 0; String opDesc = null, opName = null; @@ -7446,8 +6324,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements opDesc = lastStep.getOperationDescription(); opName = opDesc; historyId = lastStep.getId().getValue(); - op = new OpHistory(historyId, opName, opDesc, - sdf.format(lastStep.getExecutionDate().getTime())); + op = new OpHistory(historyId, opName, opDesc, sdf.format(lastStep.getExecutionDate().getTime())); } } @@ -7460,14 +6337,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.debug("getLastOperationInfo(): " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException( - "Error retrieving last operation info: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving last operation info: " + e.getLocalizedMessage()); } } @@ -7477,8 +6351,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * */ @Override - public OpHistory getLastOperationInfo(TRId trId) - throws TDGWTServiceException { + public OpHistory getLastOperationInfo(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -7488,10 +6361,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); List history = tabularResource.getHistory(); long historyId = 0; @@ -7505,8 +6376,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements opDesc = lastStep.getOperationDescription(); opName = opDesc; historyId = lastStep.getId().getValue(); - op = new OpHistory(historyId, opName, opDesc, - sdf.format(lastStep.getExecutionDate().getTime())); + op = new OpHistory(historyId, opName, opDesc, sdf.format(lastStep.getExecutionDate().getTime())); } } @@ -7518,14 +6388,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.debug("getLastOperationInfo(): " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException( - "Error retrieving last operation info: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving last operation info: " + e.getLocalizedMessage()); } } @@ -7538,25 +6405,20 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("getHistory()"); - TabResource currentTR = SessionUtil.getTabResource(httpRequest, - serviceCredentials); + TabResource currentTR = SessionUtil.getTabResource(httpRequest, serviceCredentials); if (currentTR == null) { logger.error("Current Tabular Resource is null"); - throw new TDGWTServiceException( - "Current Tabular Resource is null"); + throw new TDGWTServiceException("Current Tabular Resource is null"); } TRId trId = currentTR.getTrId(); TabularDataService service = TabularDataServiceFactory.getService(); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); List history = tabularResource.getHistory(); ArrayList opHistoryList = new ArrayList(); @@ -7570,8 +6432,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements historyId = step.getId().getValue(); opDesc = step.getOperationDescription(); opName = step.getOperationDescription(); - op = new OpHistory(historyId, opName, opDesc, - sdf.format(step.getExecutionDate().getTime())); + op = new OpHistory(historyId, opName, opDesc, sdf.format(step.getExecutionDate().getTime())); opHistoryList.add(op); } } @@ -7584,13 +6445,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.debug("getHistory(): " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException("Error retrieving history: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving history: " + e.getLocalizedMessage()); } } @@ -7600,8 +6459,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public ArrayList getHistory(TRId trId) - throws TDGWTServiceException { + public ArrayList getHistory(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -7611,10 +6469,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); List history = tabularResource.getHistory(); ArrayList opHistoryList = new ArrayList(); @@ -7628,8 +6484,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements historyId = step.getId().getValue(); opDesc = step.getOperationDescription(); opName = step.getOperationDescription(); - op = new OpHistory(historyId, opName, opDesc, - sdf.format(step.getExecutionDate().getTime())); + op = new OpHistory(historyId, opName, opDesc, sdf.format(step.getExecutionDate().getTime())); opHistoryList.add(op); } } @@ -7642,13 +6497,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.debug("getHistory(): " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException("Error retrieving history: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving history: " + e.getLocalizedMessage()); } } @@ -7661,8 +6514,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("StartDiscard: " + trId); @@ -7670,17 +6522,12 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements checkTRId(trId, httpRequest, serviceCredentials); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); List history = tabularResource.getHistory(); @@ -7696,27 +6543,20 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements historyId = step.getId().getValue(); opDesc = step.getOperationDescription(); opName = opDesc; - op = new OpHistory(historyId, opName, opDesc, - sdf.format(step.getExecutionDate().getTime())); + op = new OpHistory(historyId, opName, opDesc, sdf.format(step.getExecutionDate().getTime())); logger.debug("Discard :" + op); rollBackSession = new RollBackSession(trId, historyId); - logger.debug("Start Discard:" - + sdfPerformance.format(new Date())); + logger.debug("Start Discard:" + sdfPerformance.format(new Date())); // logger.debug("rollBack(): " + rollBackSession); - SessionUtil.setRollBackSession(httpRequest, - serviceCredentials, rollBackSession); + SessionUtil.setRollBackSession(httpRequest, serviceCredentials, rollBackSession); - HistoryStepId historyStepId = new HistoryStepId( - rollBackSession.getHistoryId()); - logger.debug("Start RollBack task:" - + sdfPerformance.format(new Date())); - Task trTask = service.rollbackTo(tabularResourceId, - historyStepId); - logger.debug("Start RollBack returned task:" - + sdfPerformance.format(new Date())); + HistoryStepId historyStepId = new HistoryStepId(rollBackSession.getHistoryId()); + logger.debug("Start RollBack task:" + sdfPerformance.format(new Date())); + Task trTask = service.rollbackTo(tabularResourceId, historyStepId); + logger.debug("Start RollBack returned task:" + sdfPerformance.format(new Date())); if (trTask == null) { logger.error("Error on service Task null"); @@ -7724,16 +6564,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } logger.debug("Start Task on service: " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.RollBack, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.RollBack, rollBackSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, - serviceCredentials, taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); taskId = trTask.getId().getValue(); // - logger.debug("Start Discard returned task:" - + sdfPerformance.format(new Date())); + logger.debug("Start Discard returned task:" + sdfPerformance.format(new Date())); } else { logger.debug("Discard : step null"); @@ -7753,13 +6590,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.debug("discard(): " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException("Discard: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Discard: " + e.getLocalizedMessage()); } } @@ -7768,42 +6603,31 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startRollBack(RollBackSession rollBackSession) - throws TDGWTServiceException { + public String startRollBack(RollBackSession rollBackSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("rollBack(): " + rollBackSession); - SessionUtil.setRollBackSession(httpRequest, serviceCredentials, - rollBackSession); + SessionUtil.setRollBackSession(httpRequest, serviceCredentials, rollBackSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(rollBackSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(rollBackSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(rollBackSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - HistoryStepId historyStepId = new HistoryStepId( - rollBackSession.getHistoryId()); - logger.debug("Start RollBack task:" - + sdfPerformance.format(new Date())); + HistoryStepId historyStepId = new HistoryStepId(rollBackSession.getHistoryId()); + logger.debug("Start RollBack task:" + sdfPerformance.format(new Date())); Task trTask = service.rollbackTo(tabularResourceId, historyStepId); - logger.debug("Start RollBack returned task:" - + sdfPerformance.format(new Date())); + logger.debug("Start RollBack returned task:" + sdfPerformance.format(new Date())); if (trTask == null) { logger.error("Error on service Task null"); @@ -7811,10 +6635,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } logger.debug("Start Task on service: " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.RollBack, rollBackSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.RollBack, rollBackSession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); @@ -7823,31 +6645,25 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { logger.debug("rollBack(): " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException("RollBack: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("RollBack: " + e.getLocalizedMessage()); } } - private String retrieveTabularResourceIdFromTable( - TabularDataService service, TableId tableId) + private String retrieveTabularResourceIdFromTable(TabularDataService service, TableId tableId) throws TDGWTServiceException { try { Table table = service.getTable(tableId); if (table.contains(TableDescriptorMetadata.class)) { - TableDescriptorMetadata tdm = table - .getMetadata(TableDescriptorMetadata.class); + TableDescriptorMetadata tdm = table.getMetadata(TableDescriptorMetadata.class); return String.valueOf(tdm.getRefId()); } else { - throw new TDGWTServiceException( - "No TableDescriptorMetadata present in tableId: " - + tableId); + throw new TDGWTServiceException("No TableDescriptorMetadata present in tableId: " + tableId); } } catch (Exception e) { @@ -7857,8 +6673,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } @Override - public ValidationsTasksMetadata getValidationsTasksMetadata(TRId trId) - throws TDGWTServiceException { + public ValidationsTasksMetadata getValidationsTasksMetadata(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -7866,8 +6681,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("GetTableValidationsMetadata on " + trId.toString()); TabularDataService service = TabularDataServiceFactory.getService(); - TabularResourceId tabularResourceId = new TabularResourceId( - new Long(trId.getId())); + TabularResourceId tabularResourceId = new TabularResourceId(new Long(trId.getId())); ArrayList taskSList = new ArrayList(); List tasks = service.getTasks(tabularResourceId); @@ -7879,12 +6693,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements int i = 1; ArrayList validations = new ArrayList(); for (ValidationDescriptor val : job.getValidations()) { - Validations validation = new Validations( - String.valueOf(i), val.getTitle(), + Validations validation = new Validations(String.valueOf(i), val.getTitle(), val.getDescription(), val.isValid(), - ConditionCodeMap.mapConditionCode(val - .getConditionCode()), - val.getValidationColumn()); + ConditionCodeMap.mapConditionCode(val.getConditionCode()), val.getValidationColumn()); validations.add(validation); i++; @@ -7892,11 +6703,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements InvocationS invocationS = null; if (job.getInvocation() != null) { - OperationExecution operationExecution = job - .getInvocation(); + OperationExecution operationExecution = job.getInvocation(); HashMap mapSent = new HashMap(); - Map map = operationExecution - .getParameters(); + Map map = operationExecution.getParameters(); Set keys = map.keySet(); Iterator iterator = keys.iterator(); while (iterator.hasNext()) { @@ -7905,22 +6714,17 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements mapSent.put(key, o.toString()); } - RefColumn refColumn = ExtractReferences - .extract(operationExecution); + RefColumn refColumn = ExtractReferences.extract(operationExecution); - invocationS = new InvocationS(j, - operationExecution.getColumnId(), - operationExecution.getIdentifier(), - operationExecution.getOperationId(), mapSent, + invocationS = new InvocationS(j, operationExecution.getColumnId(), + operationExecution.getIdentifier(), operationExecution.getOperationId(), mapSent, task.getId().getValue(), refColumn); } - JobSClassifier jobClassifier = JobClassifierMap.map(job - .getJobClassifier()); + JobSClassifier jobClassifier = JobClassifierMap.map(job.getJobClassifier()); - JobS jobS = new JobS(String.valueOf(j), job.getProgress(), - job.getHumaReadableStatus(), jobClassifier, - job.getDescription(), validations, invocationS); + JobS jobS = new JobS(String.valueOf(j), job.getProgress(), job.getHumaReadableStatus(), + jobClassifier, job.getDescription(), validations, invocationS); jobSList.add(jobS); j++; @@ -7931,8 +6735,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements if (taskResult != null) { List collateral = taskResult.getCollateralTables(); for (TableId tId : collateral) { - String id = retrieveTabularResourceIdFromTable(service, - tId); + String id = retrieveTabularResourceIdFromTable(service, tId); TRId tabularRId = new TRId(id); tabularRId.setTableId(String.valueOf(tId)); collateralTRIds.add(tabularRId); @@ -7941,76 +6744,56 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } State state = TaskStateMap.map(task.getStatus()); - TaskS taskS = new TaskS(task.getId().getValue(), - task.getProgress(), state, task.getErrorCause(), - task.getSubmitter(), task.getStartTime(), - task.getEndTime(), jobSList, collateralTRIds, null); + TaskS taskS = new TaskS(task.getId().getValue(), task.getProgress(), state, task.getErrorCause(), + task.getSubmitter(), task.getStartTime(), task.getEndTime(), jobSList, collateralTRIds, null); taskSList.add(taskS); } - ValidationsTasksMetadata validationsTasksMetadata = new ValidationsTasksMetadata( - taskSList); + ValidationsTasksMetadata validationsTasksMetadata = new ValidationsTasksMetadata(taskSList); - logger.debug("ValidationsTasksMetadata: " - + validationsTasksMetadata); + logger.debug("ValidationsTasksMetadata: " + validationsTasksMetadata); return validationsTasksMetadata; } catch (TDGWTServiceException e) { throw e; } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error in getValidationsTasksMetadata(): " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error in getValidationsTasksMetadata: " - + e.getLocalizedMessage()); + logger.error("Error in getValidationsTasksMetadata(): " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error in getValidationsTasksMetadata: " + e.getLocalizedMessage()); } } @Override - public String startEditRow(EditRowSession editRowSession) - throws TDGWTServiceException { + public String startEditRow(EditRowSession editRowSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setEditRowSession(httpRequest, serviceCredentials, - editRowSession); + SessionUtil.setEditRowSession(httpRequest, serviceCredentials, editRowSession); TabularDataService service = TabularDataServiceFactory.getService(); checkTRId(editRowSession.getTrId(), httpRequest, serviceCredentials); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(editRowSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(editRowSession.getTrId().getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4EditRow opEx = new OpExecution4EditRow(service, - editRowSession); + OpExecution4EditRow opEx = new OpExecution4EditRow(service, editRowSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); - ArrayList invocations = director - .getListOperationExecution(); + ArrayList invocations = director.getListOperationExecution(); if (invocations == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocations.toString()); @@ -8018,10 +6801,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.EditRow, editRowSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.EditRow, editRowSession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); @@ -8030,12 +6811,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in operation: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in operation: " + e.getLocalizedMessage()); } } @@ -8046,8 +6825,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public ColumnData getConnection(RefColumn refColumn) - throws TDGWTServiceException { + public ColumnData getConnection(RefColumn refColumn) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); @@ -8066,18 +6844,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements tableDesc = table.getMetadata(TableDescriptorMetadata.class); if (tableDesc.getRefId() == 0) { logger.error("Error refId=0 for Table:" + table.toString()); - throw new TDGWTServiceException("Error refId=0 for Table:" - + table.toString()); + throw new TDGWTServiceException("Error refId=0 for Table:" + table.toString()); } else { - logger.debug("Table connect to tabular resource: " - + tableDesc.getRefId()); + logger.debug("Table connect to tabular resource: " + tableDesc.getRefId()); TRId tId = new TRId(String.valueOf(tableDesc.getRefId())); trId = retrieveTabularResourceBasicData(tId); } } else { - logger.debug("Attention: No TableDescriptorMetadata found for table. Supposed Time Dimension :" - + table); + logger.debug( + "Attention: No TableDescriptorMetadata found for table. Supposed Time Dimension :" + table); trId = new TRId(); trId.setTableId(refColumn.getTableId()); } @@ -8096,45 +6872,34 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } @Override - public String startTaskResubmit(TaskResubmitSession taskResubmitSession) - throws TDGWTServiceException { + public String startTaskResubmit(TaskResubmitSession taskResubmitSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setTaskResubmitSession(httpRequest, serviceCredentials, - taskResubmitSession); + SessionUtil.setTaskResubmitSession(httpRequest, serviceCredentials, taskResubmitSession); logger.debug("StartTaskResubmit: " + taskResubmitSession); if (taskResubmitSession == null) { logger.error("TaskResubmitSession is null"); - throw new TDGWTServiceException( - "Error in resubmit task: TaskResubmitSession is null"); + throw new TDGWTServiceException("Error in resubmit task: TaskResubmitSession is null"); } TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(taskResubmitSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(taskResubmitSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(taskResubmitSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - if (taskResubmitSession.getTaskId() == null - || taskResubmitSession.getTaskId().isEmpty()) { + if (taskResubmitSession.getTaskId() == null || taskResubmitSession.getTaskId().isEmpty()) { logger.error("Task Id is: " + taskResubmitSession.getTaskId()); throw new TDGWTServiceException( - "Error in resubmit task, Task Id is: " - + taskResubmitSession.getTaskId()); + "Error in resubmit task, Task Id is: " + taskResubmitSession.getTaskId()); } TaskId taskId = new TaskId(taskResubmitSession.getTaskId()); @@ -8142,10 +6907,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements Task trTask = service.resubmit(taskId); logger.debug("Resubmit Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.ResubmitTask, taskResubmitSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.ResubmitTask, + taskResubmitSession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -8153,80 +6917,62 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in resubmit task: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in resubmit task: " + e.getLocalizedMessage()); } } @Override - public String startTaskResume(TaskResumeSession taskResumeSession) - throws TDGWTServiceException { + public String startTaskResume(TaskResumeSession taskResumeSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setTaskResumeSession(httpRequest, serviceCredentials, - taskResumeSession); + SessionUtil.setTaskResumeSession(httpRequest, serviceCredentials, taskResumeSession); logger.debug("StartTaskResume: " + taskResumeSession); if (taskResumeSession == null) { logger.error("TaskResumeSession is null"); - throw new TDGWTServiceException( - "Error in resume: TaskResumeSession is null"); + throw new TDGWTServiceException("Error in resume: TaskResumeSession is null"); } TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(taskResumeSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(taskResumeSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(taskResumeSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - if (taskResumeSession.getTaskId() == null - || taskResumeSession.getTaskId().isEmpty()) { + if (taskResumeSession.getTaskId() == null || taskResumeSession.getTaskId().isEmpty()) { logger.error("Task Id is: " + taskResumeSession.getTaskId()); - throw new TDGWTServiceException( - "Error in resume task, Task Id is: " - + taskResumeSession.getTaskId()); + throw new TDGWTServiceException("Error in resume task, Task Id is: " + taskResumeSession.getTaskId()); } TaskId taskId = new TaskId(taskResumeSession.getTaskId()); Map map = new HashMap(); - ArrayList columnMapping = taskResumeSession - .getColumnMapping(); + ArrayList columnMapping = taskResumeSession.getColumnMapping(); Task trTask; if (columnMapping != null && columnMapping.size() > 0) { HashMap mapping = new HashMap(); logger.debug("New Mapping"); for (ColumnMappingData columnMappingData : columnMapping) { - if (columnMappingData.getSourceArg() != null - && columnMappingData.getTargetArg() != null) { + if (columnMappingData.getSourceArg() != null && columnMappingData.getTargetArg() != null) { DimensionRow source = columnMappingData.getSourceArg(); DimensionRow target = columnMappingData.getTargetArg(); - TDTypeValue tdValue = TDTypeValueMap - .map(taskResumeSession.getColumn() - .getDataTypeName(), source.getValue()); - logger.debug("Key = " + tdValue + " - " - + new Long(target.getRowId())); + TDTypeValue tdValue = TDTypeValueMap.map(taskResumeSession.getColumn().getDataTypeName(), + source.getValue()); + logger.debug("Key = " + tdValue + " - " + new Long(target.getRowId())); mapping.put(tdValue, new Long(target.getRowId())); } @@ -8239,32 +6985,22 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements if (invocationS.getJobNumber() != null) { if (invocationS.getTaskId() != null) { Integer jobNumber = invocationS.getJobNumber(); - TaskId previousTaskId = new TaskId( - invocationS.getTaskId()); + TaskId previousTaskId = new TaskId(invocationS.getTaskId()); Task previousTask = service.getTask(previousTaskId); List previousJobs = previousTask.getTaskJobs(); if (previousJobs != null) { - Job previousJob = previousJobs - .get(jobNumber - 1); + Job previousJob = previousJobs.get(jobNumber - 1); if (previousJob != null) { - Map mapParameters = previousJob - .getInvocation().getParameters(); + Map mapParameters = previousJob.getInvocation().getParameters(); if (mapParameters != null) { @SuppressWarnings("unchecked") Map mappingPrevious = (Map) mapParameters .get(Constants.PARAMETER_COLUMN_MAPPING); logger.debug("Previous Mapping"); if (mappingPrevious != null) { - for (TDTypeValue key : mappingPrevious - .keySet()) { - logger.debug("Key = " - + key - + " - " - + mappingPrevious - .get(key)); - mapping.put(key, - mappingPrevious - .get(key)); + for (TDTypeValue key : mappingPrevious.keySet()) { + logger.debug("Key = " + key + " - " + mappingPrevious.get(key)); + mapping.put(key, mappingPrevious.get(key)); } } else { logger.debug("Previous Mapping is null"); @@ -8290,19 +7026,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements map.put(Constants.PARAMETER_COLUMN_MAPPING, mapping); trTask = service.resume(taskId, map); - logger.debug("Resume Task on service: [TaskId:" - + trTask.getId() + ", Map:" + map + "]"); + logger.debug("Resume Task on service: [TaskId:" + trTask.getId() + ", Map:" + map + "]"); } else { trTask = service.resume(taskId); - logger.debug("Resume Task on service: [TaskId:" - + trTask.getId() + "]"); + logger.debug("Resume Task on service: [TaskId:" + trTask.getId() + "]"); } - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.ResumeTask, taskResumeSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.ResumeTask, taskResumeSession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); @@ -8311,70 +7043,54 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in resume task: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in resume task: " + e.getLocalizedMessage()); } } @Override - public String startExtractCodelist( - ExtractCodelistSession extractCodelistSession) - throws TDGWTServiceException { + public String startExtractCodelist(ExtractCodelistSession extractCodelistSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setExtractCodelistSession(httpRequest, - serviceCredentials, extractCodelistSession); + SessionUtil.setExtractCodelistSession(httpRequest, serviceCredentials, extractCodelistSession); logger.debug("StartExtractCodelist: " + extractCodelistSession); if (extractCodelistSession == null) { logger.error("ExtractCodelistSession is null"); - throw new TDGWTServiceException( - "Error in extract codelist: ExtractCodelistSession is null"); + throw new TDGWTServiceException("Error in extract codelist: ExtractCodelistSession is null"); } TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(extractCodelistSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(extractCodelistSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(extractCodelistSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); - OpExecution4ExtractCodelist opEx = new OpExecution4ExtractCodelist( - service, extractCodelistSession); + OpExecution4ExtractCodelist opEx = new OpExecution4ExtractCodelist(service, extractCodelistSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); - logger.debug("Extract Codelist on service: TaskId " - + trTask.getId()); + logger.debug("Extract Codelist on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.ExtractCodelist, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.ExtractCodelist, extractCodelistSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -8382,71 +7098,55 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in extract codelist: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in extract codelist: " + e.getLocalizedMessage()); } } - public String startSplitColumn(SplitColumnSession splitColumnSession, - HttpServletRequest httpRequest) throws TDGWTServiceException { + public String startSplitColumn(SplitColumnSession splitColumnSession, HttpServletRequest httpRequest) + throws TDGWTServiceException { try { - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setSplitColumnSession(httpRequest, serviceCredentials, - splitColumnSession); + SessionUtil.setSplitColumnSession(httpRequest, serviceCredentials, splitColumnSession); if (splitColumnSession == null) { logger.error("SplitColumnSession is null"); - throw new TDGWTServiceException( - "Error in split column: SplitColumnSession is null"); + throw new TDGWTServiceException("Error in split column: SplitColumnSession is null"); } logger.debug("StartSplitColumn: " + splitColumnSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(splitColumnSession.getColumnData().getTrId(), - httpRequest, serviceCredentials); + checkTRId(splitColumnSession.getColumnData().getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(splitColumnSession.getColumnData().getTrId() - .getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + Long.valueOf(splitColumnSession.getColumnData().getTrId().getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4SplitColumn opEx = new OpExecution4SplitColumn(service, - splitColumnSession); + OpExecution4SplitColumn opEx = new OpExecution4SplitColumn(service, splitColumnSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); - ArrayList invocations = director - .getListOperationExecution(); + ArrayList invocations = director.getListOperationExecution(); if (invocations == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocations.toString()); Task trTask = service.executeBatch(invocations, tabularResourceId); logger.debug("Split Column on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.SplitColumn, splitColumnSession - .getColumnData().getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.SplitColumn, + splitColumnSession.getColumnData().getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -8454,74 +7154,58 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in split column: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in split column: " + e.getLocalizedMessage()); } } // - public String startMergeColumn(MergeColumnSession mergeColumnSession, - HttpServletRequest httpRequest) throws TDGWTServiceException { + public String startMergeColumn(MergeColumnSession mergeColumnSession, HttpServletRequest httpRequest) + throws TDGWTServiceException { try { - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setMergeColumnSession(httpRequest, serviceCredentials, - mergeColumnSession); + SessionUtil.setMergeColumnSession(httpRequest, serviceCredentials, mergeColumnSession); if (mergeColumnSession == null) { logger.error("MergeColumnSession is null"); - throw new TDGWTServiceException( - "Error in split column: MergeColumnSession is null"); + throw new TDGWTServiceException("Error in split column: MergeColumnSession is null"); } logger.debug("StartMergeColumn: " + mergeColumnSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(mergeColumnSession.getColumnDataSource1().getTrId(), - httpRequest, serviceCredentials); + checkTRId(mergeColumnSession.getColumnDataSource1().getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(mergeColumnSession.getColumnDataSource1() - .getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + Long.valueOf(mergeColumnSession.getColumnDataSource1().getTrId().getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4MergeColumn opEx = new OpExecution4MergeColumn(service, - mergeColumnSession); + OpExecution4MergeColumn opEx = new OpExecution4MergeColumn(service, mergeColumnSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); - ArrayList invocations = director - .getListOperationExecution(); + ArrayList invocations = director.getListOperationExecution(); if (invocations == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocations.toString()); Task trTask = service.executeBatch(invocations, tabularResourceId); logger.debug("Merge Column on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.MergeColumn, mergeColumnSession - .getColumnDataSource1().getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.MergeColumn, + mergeColumnSession.getColumnDataSource1().getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -8529,54 +7213,42 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in split column: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in split column: " + e.getLocalizedMessage()); } } @Override - public void setCodelistMappingSession( - CodelistMappingSession codelistMappingSession) - throws TDGWTServiceException { + public void setCodelistMappingSession(CodelistMappingSession codelistMappingSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setCodelistMappingSession(httpRequest, - serviceCredentials, codelistMappingSession); + SessionUtil.setCodelistMappingSession(httpRequest, serviceCredentials, codelistMappingSession); return; } catch (TDGWTServiceException e) { throw e; } catch (Throwable e) { - logger.error( - "Error setting CodelistMappingSession parameter: " - + e.getLocalizedMessage(), e); + logger.error("Error setting CodelistMappingSession parameter: " + e.getLocalizedMessage(), e); throw new TDGWTServiceException( - "Error setting CodelistMappingSession parameter: " - + e.getLocalizedMessage()); + "Error setting CodelistMappingSession parameter: " + e.getLocalizedMessage()); } } @Override - public void getFileFromWorkspace( - CodelistMappingSession codelistMappingSession) - throws TDGWTServiceException { + public void getFileFromWorkspace(CodelistMappingSession codelistMappingSession) throws TDGWTServiceException { Workspace w = null; WorkspaceItem wi = null; HttpServletRequest httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); try { HomeManagerFactory factory = HomeLibrary.getHomeManagerFactory(); @@ -8591,24 +7263,22 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements e.printStackTrace(); throw new TDGWTServiceException( "Error in import Codelist Mapping getFileFromWorkspace accessing the workspace: " - + e.getLocalizedMessage(), e); + + e.getLocalizedMessage(), + e); } if (wi == null) { - logger.error("Error retrieving the item on workspace" - + codelistMappingSession.getItemId()); + logger.error("Error retrieving the item on workspace" + codelistMappingSession.getItemId()); throw new TDGWTServiceException( - "Error retrieving the item on workspace" - + codelistMappingSession.getItemId()); + "Error retrieving the item on workspace" + codelistMappingSession.getItemId()); } try { - logger.debug("WorkspaceItem [id:" + wi.getId() + " name:" - + wi.getName() + " remotePath:" + wi.getRemotePath() + "]"); + logger.debug("WorkspaceItem [id:" + wi.getId() + " name:" + wi.getName() + " remotePath:" + + wi.getRemotePath() + "]"); } catch (InternalErrorException e1) { e1.printStackTrace(); - throw new TDGWTServiceException( - "Error retrieving the item on workspace" + wi); + throw new TDGWTServiceException("Error retrieving the item on workspace" + wi); } CodelistMappingFileUploadSession fileUploadSession = new CodelistMappingFileUploadSession(); @@ -8620,68 +7290,51 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements fileUploadSession.setFileUploadState(FileUploadState.STARTED); // fileUploadSession.setCodelistMappingMonitor(codelistMappingMonitor); - SessionUtil.setFileUploadMonitor(httpRequest, serviceCredentials, - fileUploadMonitor); - SessionUtil.setCodelistMappingFileUploadSession(httpRequest, - serviceCredentials, fileUploadSession); + SessionUtil.setFileUploadMonitor(httpRequest, serviceCredentials, fileUploadMonitor); + SessionUtil.setCodelistMappingFileUploadSession(httpRequest, serviceCredentials, fileUploadSession); try { FilesStorage filesStorage = new FilesStorage(); - InputStream is = filesStorage.retrieveInputStream( - serviceCredentials.getUserName(), wi); + InputStream is = filesStorage.retrieveInputStream(serviceCredentials.getUserName(), wi); - FileUtil.setImportFileCodelistMapping(fileUploadSession, is, - wi.getName(), Constants.FILE_XML_MIMETYPE); + FileUtil.setImportFileCodelistMapping(fileUploadSession, is, wi.getName(), Constants.FILE_XML_MIMETYPE); } catch (Throwable e) { - FileUploadMonitor fum = SessionUtil.getFileUploadMonitor( - httpRequest, serviceCredentials); - fum.setFailed("An error occured elaborating the file", - FileUtil.exceptionDetailMessage(e)); - SessionUtil.setFileUploadMonitor(httpRequest, serviceCredentials, - fum); + FileUploadMonitor fum = SessionUtil.getFileUploadMonitor(httpRequest, serviceCredentials); + fum.setFailed("An error occured elaborating the file", FileUtil.exceptionDetailMessage(e)); + SessionUtil.setFileUploadMonitor(httpRequest, serviceCredentials, fum); fileUploadSession.setFileUploadState(FileUploadState.FAILED); - SessionUtil.setCodelistMappingFileUploadSession(httpRequest, - serviceCredentials, fileUploadSession); + SessionUtil.setCodelistMappingFileUploadSession(httpRequest, serviceCredentials, fileUploadSession); logger.error("Error elaborating the input stream", e); throw new TDGWTServiceException( - "Error in import Codelist Mapping getFileFromWorkspace: " - + e.getLocalizedMessage(), e); + "Error in import Codelist Mapping getFileFromWorkspace: " + e.getLocalizedMessage(), e); } logger.trace("changing state"); - FileUploadMonitor fum = SessionUtil.getFileUploadMonitor(httpRequest, - serviceCredentials); + FileUploadMonitor fum = SessionUtil.getFileUploadMonitor(httpRequest, serviceCredentials); fum.setState(FileUploadState.COMPLETED); SessionUtil.setFileUploadMonitor(httpRequest, serviceCredentials, fum); - SessionUtil.setCodelistMappingFileUploadSession(httpRequest, - serviceCredentials, fileUploadSession); + SessionUtil.setCodelistMappingFileUploadSession(httpRequest, serviceCredentials, fileUploadSession); } @Override - public String startCodelistMappingImport( - CodelistMappingSession codelistMappingSession) + public String startCodelistMappingImport(CodelistMappingSession codelistMappingSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); if (codelistMappingSession == null) { - throw new TDGWTServiceException( - "CodelistMappingSession is null"); + throw new TDGWTServiceException("CodelistMappingSession is null"); } - logger.debug("StartCodelistMappingImport: " - + codelistMappingSession); + logger.debug("StartCodelistMappingImport: " + codelistMappingSession); - SessionUtil.setCodelistMappingSession(httpRequest, - serviceCredentials, codelistMappingSession); + SessionUtil.setCodelistMappingSession(httpRequest, serviceCredentials, codelistMappingSession); - String taskId = importCodelistMappingFileOnService(httpRequest, - serviceCredentials, codelistMappingSession); + String taskId = importCodelistMappingFileOnService(httpRequest, serviceCredentials, codelistMappingSession); return taskId; } catch (TDGWTServiceException e) { @@ -8689,13 +7342,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException( - "Error in Codelist Mapping import: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in Codelist Mapping import: " + e.getLocalizedMessage()); } } @@ -8707,130 +7357,100 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * @param codelistMappingSession * @throws TDGWTServiceException */ - private String importCodelistMappingFileOnService( - HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, - CodelistMappingSession codelistMappingSession) throws Throwable { + private String importCodelistMappingFileOnService(HttpServletRequest httpRequest, + ServiceCredentials serviceCredentials, CodelistMappingSession codelistMappingSession) throws Throwable { String storageId = null; - if (codelistMappingSession.getSource().getId() - .compareTo(SourceType.URL.toString()) == 0) { + if (codelistMappingSession.getSource().getId().compareTo(SourceType.URL.toString()) == 0) { FilesStorage filesStorage = new FilesStorage(); - storageId = filesStorage.storageCodelistMappingTempFile( - serviceCredentials.getUserName(), + storageId = filesStorage.storageCodelistMappingTempFile(serviceCredentials.getUserName(), codelistMappingSession.getUrl()); } else { CodelistMappingFileUploadSession codelistMappingFileUploadSession = SessionUtil - .getCodelistMappingFileUploadSession(httpRequest, - serviceCredentials); + .getCodelistMappingFileUploadSession(httpRequest, serviceCredentials); if (codelistMappingFileUploadSession == null) { - throw new TDGWTServiceException( - "Error retrieving the codelistMappingFileUploadSession: null"); + throw new TDGWTServiceException("Error retrieving the codelistMappingFileUploadSession: null"); } logger.debug("File Storage Access"); FilesStorage filesStorage = new FilesStorage(); - String fileIdOnStorage = filesStorage - .storageCodelistMappingTempFile(serviceCredentials - .getUserName(), codelistMappingFileUploadSession - .getCodelistMappingFile()); + String fileIdOnStorage = filesStorage.storageCodelistMappingTempFile(serviceCredentials.getUserName(), + codelistMappingFileUploadSession.getCodelistMappingFile()); logger.debug("File Url On Storage:" + fileIdOnStorage); codelistMappingFileUploadSession.getCodelistMappingFile().delete(); if (fileIdOnStorage == null || fileIdOnStorage.isEmpty()) { - throw new TDGWTServiceException( - "Tabular Data Service error loading file on storage"); + throw new TDGWTServiceException("Tabular Data Service error loading file on storage"); } storageId = fileIdOnStorage; } TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(codelistMappingSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(codelistMappingSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(codelistMappingSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4CodelistMapping opEx = new OpExecution4CodelistMapping( - service, codelistMappingSession, storageId); + OpExecution4CodelistMapping opEx = new OpExecution4CodelistMapping(service, codelistMappingSession, storageId); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); - logger.debug("Codelist Mapping Import on service: TaskId " - + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.CodelistMappingImport, + logger.debug("Codelist Mapping Import on service: TaskId " + trTask.getId()); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.CodelistMappingImport, codelistMappingSession.getTrId()); - SessionUtil - .setStartedTask(httpRequest, serviceCredentials, taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } // TODO - public String startGroupBy(GroupBySession groupBySession, - HttpServletRequest httpRequest) throws TDGWTServiceException { + public String startGroupBy(GroupBySession groupBySession, HttpServletRequest httpRequest) + throws TDGWTServiceException { try { - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setGroupBySession(httpRequest, serviceCredentials, - groupBySession); + SessionUtil.setGroupBySession(httpRequest, serviceCredentials, groupBySession); logger.debug("StartGroupBy: " + groupBySession); TabularDataService service = TabularDataServiceFactory.getService(); checkTRId(groupBySession.getTrId(), httpRequest, serviceCredentials); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(groupBySession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(groupBySession.getTrId().getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4GroupBy opEx = new OpExecution4GroupBy(service, - groupBySession); + OpExecution4GroupBy opEx = new OpExecution4GroupBy(service, groupBySession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("GroupBy start on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.GroupBy, groupBySession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.GroupBy, groupBySession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -8838,63 +7458,49 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in start group by: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in start group by: " + e.getLocalizedMessage()); } } // TODO - public String startTimeAggregation( - TimeAggregationSession timeAggregationSession, - HttpServletRequest httpRequest) throws TDGWTServiceException { + public String startTimeAggregation(TimeAggregationSession timeAggregationSession, HttpServletRequest httpRequest) + throws TDGWTServiceException { try { - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setTimeAggregationSession(httpRequest, - serviceCredentials, timeAggregationSession); + SessionUtil.setTimeAggregationSession(httpRequest, serviceCredentials, timeAggregationSession); logger.debug("StartGroupBy: " + timeAggregationSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(timeAggregationSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(timeAggregationSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(timeAggregationSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4TimeAggregation opEx = new OpExecution4TimeAggregation( - service, timeAggregationSession); + OpExecution4TimeAggregation opEx = new OpExecution4TimeAggregation(service, timeAggregationSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("GroupBy start on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.TimeAggregation, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.TimeAggregation, timeAggregationSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -8902,71 +7508,55 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in start Time Aggregation: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in start Time Aggregation: " + e.getLocalizedMessage()); } } @Override - public String startNormalization(NormalizationSession normalizationSession) - throws TDGWTServiceException { + public String startNormalization(NormalizationSession normalizationSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setNormalizationSession(httpRequest, - serviceCredentials, normalizationSession); + SessionUtil.setNormalizationSession(httpRequest, serviceCredentials, normalizationSession); if (normalizationSession == null) { logger.error("NormalizationSession is null"); - throw new TDGWTServiceException( - "Error in normalization : NormalizationSession is null"); + throw new TDGWTServiceException("Error in normalization : NormalizationSession is null"); } logger.debug("StartNormalization: " + normalizationSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(normalizationSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(normalizationSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(normalizationSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4Normalization opEx = new OpExecution4Normalization( - service, normalizationSession); + OpExecution4Normalization opEx = new OpExecution4Normalization(service, normalizationSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); - logger.debug("Normalization start on service: TaskId " - + trTask.getId()); + logger.debug("Normalization start on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.Normalize, normalizationSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.Normalize, normalizationSession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -8974,73 +7564,56 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in start normalization: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in start normalization: " + e.getLocalizedMessage()); } } @Override - public String startDenormalization( - DenormalizationSession denormalizationSession) - throws TDGWTServiceException { + public String startDenormalization(DenormalizationSession denormalizationSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setDenormalizationSession(httpRequest, - serviceCredentials, denormalizationSession); + SessionUtil.setDenormalizationSession(httpRequest, serviceCredentials, denormalizationSession); if (denormalizationSession == null) { logger.error("DenormalizationSession is null"); - throw new TDGWTServiceException( - "Error in normalization : DenormalizationSession is null"); + throw new TDGWTServiceException("Error in normalization : DenormalizationSession is null"); } logger.debug("StartDenormalization: " + denormalizationSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(denormalizationSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(denormalizationSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(denormalizationSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4Denormalization opEx = new OpExecution4Denormalization( - service, denormalizationSession); + OpExecution4Denormalization opEx = new OpExecution4Denormalization(service, denormalizationSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); - logger.debug("Denormalization start on service: TaskId " - + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.Denormalize, + logger.debug("Denormalization start on service: TaskId " + trTask.getId()); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.Denormalize, denormalizationSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -9048,12 +7621,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in start denormalization: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in start denormalization: " + e.getLocalizedMessage()); } } @@ -9063,52 +7634,40 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startUnion(UnionSession unionSession) - throws TDGWTServiceException { + public String startUnion(UnionSession unionSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setUnionSession(httpRequest, serviceCredentials, - unionSession); + SessionUtil.setUnionSession(httpRequest, serviceCredentials, unionSession); TabularDataService service = TabularDataServiceFactory.getService(); checkTRId(unionSession.getTrId(), httpRequest, serviceCredentials); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(unionSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(unionSession.getTrId().getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4Union opEx = new OpExecution4Union(service, - unionSession); + OpExecution4Union opEx = new OpExecution4Union(service, unionSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error Union invocation: Operation not supported"); + throw new TDGWTServiceException("Error Union invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.Union, unionSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.Union, unionSession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -9116,12 +7675,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in union: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in union: " + e.getLocalizedMessage()); } } @@ -9131,44 +7688,35 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public void startChangeColumnsPosition( - ChangeColumnsPositionSession changeColumnsPositionSession) + public void startChangeColumnsPosition(ChangeColumnsPositionSession changeColumnsPositionSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setChangeColumnsPositionSession(httpRequest, - serviceCredentials, changeColumnsPositionSession); + SessionUtil.setChangeColumnsPositionSession(httpRequest, serviceCredentials, changeColumnsPositionSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(changeColumnsPositionSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(changeColumnsPositionSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(changeColumnsPositionSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4ChangeColumnsPosition opEx = new OpExecution4ChangeColumnsPosition( - service, changeColumnsPositionSession); + OpExecution4ChangeColumnsPosition opEx = new OpExecution4ChangeColumnsPosition(service, + changeColumnsPositionSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in Change Position invocation: Operation not supported"); + throw new TDGWTServiceException("Error in Change Position invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); @@ -9181,12 +7729,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in change position: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in change position: " + e.getLocalizedMessage()); } } @@ -9196,54 +7742,42 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startReplaceByExternal( - ReplaceByExternalSession replaceByExternalSession) + public String startReplaceByExternal(ReplaceByExternalSession replaceByExternalSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setReplaceByExternalSession(httpRequest, - serviceCredentials, replaceByExternalSession); + SessionUtil.setReplaceByExternalSession(httpRequest, serviceCredentials, replaceByExternalSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(replaceByExternalSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(replaceByExternalSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(replaceByExternalSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4ReplaceByExternal opEx = new OpExecution4ReplaceByExternal( - service, replaceByExternalSession); + OpExecution4ReplaceByExternal opEx = new OpExecution4ReplaceByExternal(service, replaceByExternalSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error replace by external invocation: Operation not supported"); + throw new TDGWTServiceException("Error replace by external invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.ReplaceByExternal, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.ReplaceByExternal, replaceByExternalSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -9251,66 +7785,54 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in replace by external: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in replace by external: " + e.getLocalizedMessage()); } } @Override - public String startDataMinerOperation( - DataMinerOperationSession dataMinerOperationSession) + public String startDataMinerOperation(DataMinerOperationSession dataMinerOperationSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { logger.info("StartDataMinerOperation"); - logger.debug("StartDataMinerOperation: "+dataMinerOperationSession); + logger.debug("StartDataMinerOperation: " + dataMinerOperationSession); httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setDataMinerOperationSession(httpRequest, - serviceCredentials, dataMinerOperationSession); + SessionUtil.setDataMinerOperationSession(httpRequest, serviceCredentials, dataMinerOperationSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(dataMinerOperationSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(dataMinerOperationSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(dataMinerOperationSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); - OpExecution4DataMinerOperation opEx = new OpExecution4DataMinerOperation( - service, serviceCredentials, dataMinerOperationSession); + OpExecution4DataMinerOperation opEx = new OpExecution4DataMinerOperation(service, serviceCredentials, + dataMinerOperationSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error DataMiner Operation invocation: Operation not supported"); + throw new TDGWTServiceException("Error DataMiner Operation invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.StatisticalOperation, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.StatisticalOperation, dataMinerOperationSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -9318,12 +7840,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in DataMiner operation: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in DataMiner operation: " + e.getLocalizedMessage()); } } @@ -9333,24 +7853,19 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public OperationMonitor getOperationMonitor( - OperationMonitorSession operationMonitorSession) + public OperationMonitor getOperationMonitor(OperationMonitorSession operationMonitorSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - TaskWrapper taskWrapper = SessionUtil.getStartedTask(httpRequest, - serviceCredentials, operationMonitorSession.getTaskId()); - logger.debug("Start Monitor Time:" - + sdfPerformance.format(new Date())); - OperationMonitorCreator operationMonitorCreator = new OperationMonitorCreator( - httpRequest, serviceCredentials, taskWrapper, - operationMonitorSession); - OperationMonitor operationMonitor = operationMonitorCreator - .create(); + TaskWrapper taskWrapper = SessionUtil.getStartedTask(httpRequest, serviceCredentials, + operationMonitorSession.getTaskId()); + logger.debug("Start Monitor Time:" + sdfPerformance.format(new Date())); + OperationMonitorCreator operationMonitorCreator = new OperationMonitorCreator(httpRequest, + serviceCredentials, taskWrapper, operationMonitorSession); + OperationMonitor operationMonitor = operationMonitorCreator.create(); logger.debug("OperationMonitor(): " + operationMonitor); return operationMonitor; @@ -9358,8 +7873,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements throw e; } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in Operation Monitor: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in Operation Monitor: " + e.getLocalizedMessage()); } } @@ -9381,8 +7895,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements LicenceData licenceData; for (int i = 0; i < licencesArray.length; i++) { licence = licencesArray[i]; - licenceData = new LicenceData(i, licence.toString(), - licence.getName()); + licenceData = new LicenceData(i, licence.toString(), licence.getName()); licences.add(licenceData); } @@ -9394,12 +7907,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in get Licences: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in get Licences: " + e.getLocalizedMessage()); } } @@ -9410,50 +7921,39 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements */ @Override public OperationMonitor getBackgroundOperationMonitorForSpecificTask( - OperationMonitorSession operationMonitorSession) - throws TDGWTServiceException { + OperationMonitorSession operationMonitorSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); OperationMonitor operationMonitor = null; - if (operationMonitorSession != null - && operationMonitorSession.getTaskId() != null + if (operationMonitorSession != null && operationMonitorSession.getTaskId() != null && !operationMonitorSession.getTaskId().isEmpty()) { - HashMap taskInBackgroundMap = SessionUtil - .getTaskInBackgroundMap(httpRequest, serviceCredentials); + HashMap taskInBackgroundMap = SessionUtil.getTaskInBackgroundMap(httpRequest, + serviceCredentials); if (taskInBackgroundMap != null) { - TaskWrapper taskWrapper = taskInBackgroundMap - .get(operationMonitorSession.getTaskId()); + TaskWrapper taskWrapper = taskInBackgroundMap.get(operationMonitorSession.getTaskId()); if (taskWrapper != null) { // No foreground support operationMonitorSession.setInBackground(true); BackgroundOperationMonitorCreator backgroundOperationMonitorCreator = new BackgroundOperationMonitorCreator( - httpRequest, serviceCredentials, taskWrapper, - operationMonitorSession); - operationMonitor = backgroundOperationMonitorCreator - .create(); - logger.debug("BackgroundOperationMonitorForSpecificTask(): " - + operationMonitor); + httpRequest, serviceCredentials, taskWrapper, operationMonitorSession); + operationMonitor = backgroundOperationMonitorCreator.create(); + logger.debug("BackgroundOperationMonitorForSpecificTask(): " + operationMonitor); } else { throw new TDGWTServiceException( - "Error in Background Operation Monitor of specific task: " - + "task not found"); + "Error in Background Operation Monitor of specific task: " + "task not found"); } } else { throw new TDGWTServiceException( - "Error in Background Operation Monitor of specific task: " - + "No tasks in session"); + "Error in Background Operation Monitor of specific task: " + "No tasks in session"); } } else { - throw new TDGWTServiceException( - "Error in Background Operation Monitor of specific task: " - + "operationMonitorSession invalid:" - + operationMonitorSession); + throw new TDGWTServiceException("Error in Background Operation Monitor of specific task: " + + "operationMonitorSession invalid:" + operationMonitorSession); } return operationMonitor; @@ -9465,8 +7965,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (Throwable e) { e.printStackTrace(); throw new TDGWTServiceException( - "Error in Background Operation Monitor of specific task: " - + e.getLocalizedMessage()); + "Error in Background Operation Monitor of specific task: " + e.getLocalizedMessage()); } @@ -9478,37 +7977,30 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements */ @Override public ArrayList getBackgroundOperationMonitor( - BackgroundOperationMonitorSession backgroundOperationMonitorSession) - throws TDGWTServiceException { + BackgroundOperationMonitorSession backgroundOperationMonitorSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - logger.debug("getBackgroundOperationMonitor(): " - + backgroundOperationMonitorSession); + logger.debug("getBackgroundOperationMonitor(): " + backgroundOperationMonitorSession); ArrayList operationMonitorList = new ArrayList(); - HashMap taskInBackgroundMap = SessionUtil - .getTaskInBackgroundMap(httpRequest, serviceCredentials); + HashMap taskInBackgroundMap = SessionUtil.getTaskInBackgroundMap(httpRequest, + serviceCredentials); if (taskInBackgroundMap != null && taskInBackgroundMap.size() > 0) { - logger.debug("Tasks In Background : " - + taskInBackgroundMap.size()); + logger.debug("Tasks In Background : " + taskInBackgroundMap.size()); OperationMonitorSession operationMonitorSession; - for (Map.Entry taskInBackground : taskInBackgroundMap - .entrySet()) { - operationMonitorSession = new OperationMonitorSession( - taskInBackground.getKey()); + for (Map.Entry taskInBackground : taskInBackgroundMap.entrySet()) { + operationMonitorSession = new OperationMonitorSession(taskInBackground.getKey()); operationMonitorSession.setInBackground(true); if (backgroundOperationMonitorSession != null) { ArrayList operationMonitorSessionList = backgroundOperationMonitorSession .getOperationMonitorSessionList(); for (OperationMonitorSession opMonitorSession : operationMonitorSessionList) { - if (opMonitorSession.getTaskId().compareTo( - taskInBackground.getKey()) == 0) { + if (opMonitorSession.getTaskId().compareTo(taskInBackground.getKey()) == 0) { operationMonitorSession = opMonitorSession; break; } @@ -9517,13 +8009,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } BackgroundOperationMonitorCreator backgroundOperationMonitorCreator = new BackgroundOperationMonitorCreator( - httpRequest, serviceCredentials, - taskInBackground.getValue(), - operationMonitorSession); - OperationMonitor operationMonitor = backgroundOperationMonitorCreator - .create(); - logger.debug("getBackgroundOperationMonitor(): " - + operationMonitor); + httpRequest, serviceCredentials, taskInBackground.getValue(), operationMonitorSession); + OperationMonitor operationMonitor = backgroundOperationMonitorCreator.create(); + logger.debug("getBackgroundOperationMonitor(): " + operationMonitor); operationMonitorList.add(operationMonitor); } @@ -9534,21 +8022,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements ArrayList backgroundOperationMonitorList = new ArrayList(); for (OperationMonitor opM : operationMonitorList) { - BackgroundOperationMonitor backgroundOperationMonitor = new BackgroundOperationMonitor( - opM.getTaskId(), opM.getTask().getProgress(), opM - .getTask().getState(), opM.getTask() - .getErrorCause(), opM.getTask().getSubmitter(), - opM.getTask().getStartTime(), opM.getTask() - .getEndTime(), opM.isInBackground(), - opM.isAbort(), opM.isHidden(), opM.getOperationId(), - opM.getTrId(), opM.getTask().getTabularResourceId(), - opM.getTabularResourceName()); + BackgroundOperationMonitor backgroundOperationMonitor = new BackgroundOperationMonitor(opM.getTaskId(), + opM.getTask().getProgress(), opM.getTask().getState(), opM.getTask().getErrorCause(), + opM.getTask().getSubmitter(), opM.getTask().getStartTime(), opM.getTask().getEndTime(), + opM.isInBackground(), opM.isAbort(), opM.isHidden(), opM.getOperationId(), opM.getTrId(), + opM.getTask().getTabularResourceId(), opM.getTabularResourceName()); backgroundOperationMonitorList.add(backgroundOperationMonitor); } - logger.debug("getBackgroundOperationMonitor(): " - + backgroundOperationMonitorList.size() + logger.debug("getBackgroundOperationMonitor(): " + backgroundOperationMonitorList.size() + "operation monitor retrieved"); return backgroundOperationMonitorList; @@ -9558,9 +8041,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException( - "Error in Background Operation Monitor: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in Background Operation Monitor: " + e.getLocalizedMessage()); } @@ -9571,33 +8052,25 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public ArrayList getResourcesTD(TRId trId) - throws TDGWTServiceException { + public ArrayList getResourcesTD(TRId trId) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); TabularDataService service = TabularDataServiceFactory.getService(); checkTRId(trId, httpRequest, serviceCredentials); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); - List resources = service - .getResources(tabularResourceId); - ResourceTDCreator resourceTDCreator = new ResourceTDCreator( - serviceCredentials); + List resources = service.getResources(tabularResourceId); + ResourceTDCreator resourceTDCreator = new ResourceTDCreator(serviceCredentials); - ArrayList resourcesTD = resourceTDCreator - .createResourcesDescriptorTD(resources); + ArrayList resourcesTD = resourceTDCreator.createResourcesDescriptorTD(resources); return resourcesTD; } catch (TDGWTServiceException e) { @@ -9605,14 +8078,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error retrieving resources: " + e.getLocalizedMessage(), e); + logger.error("Error retrieving resources: " + e.getLocalizedMessage(), e); e.printStackTrace(); - throw new TDGWTServiceException("Error retrieving resources: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving resources: " + e.getLocalizedMessage()); } } @@ -9621,35 +8091,27 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public ArrayList getResourcesTDByType(TRId trId, - ResourceTDType resourceTDType) throws TDGWTServiceException { + public ArrayList getResourcesTDByType(TRId trId, ResourceTDType resourceTDType) + throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); TabularDataService service = TabularDataServiceFactory.getService(); checkTRId(trId, httpRequest, serviceCredentials); - TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResourceId tabularResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); - ResourceType resourceType = ResourceTypeMap - .getResourceType(resourceTDType); + ResourceType resourceType = ResourceTypeMap.getResourceType(resourceTDType); - List resources = service.getResourcesByType( - tabularResourceId, resourceType); - ResourceTDCreator resourceTDCreator = new ResourceTDCreator( - serviceCredentials); - ArrayList resourcesTD = resourceTDCreator - .createResourcesDescriptorTD(resources); + List resources = service.getResourcesByType(tabularResourceId, resourceType); + ResourceTDCreator resourceTDCreator = new ResourceTDCreator(serviceCredentials); + ArrayList resourcesTD = resourceTDCreator.createResourcesDescriptorTD(resources); return resourcesTD; } catch (TDGWTServiceException e) { @@ -9657,15 +8119,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error retrieving resources by type: " - + e.getLocalizedMessage(), e); - throw new TDGWTServiceException( - "Error retrieving resources by type: " - + e.getLocalizedMessage()); + logger.error("Error retrieving resources by type: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving resources by type: " + e.getLocalizedMessage()); } } @@ -9674,53 +8131,42 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public void removeResource(RemoveResourceSession removeResourceSession) - throws TDGWTServiceException { + public void removeResource(RemoveResourceSession removeResourceSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("Remove Resource: " + removeResourceSession); if (removeResourceSession == null) { logger.error("Error removing Resource: removeResourceSession null"); - throw new TDGWTServiceException( - "Error removing Resource no parameters set"); + throw new TDGWTServiceException("Error removing Resource no parameters set"); } TRId trId = removeResourceSession.getTrId(); if (trId == null) { logger.error("Error removing Resource: trId is null"); - throw new TDGWTServiceException( - "Error removing Resource no tabular resource set"); + throw new TDGWTServiceException("Error removing Resource no tabular resource set"); } TabularDataService service = TabularDataServiceFactory.getService(); checkTRId(trId, httpRequest, serviceCredentials); - TabularResourceId tabResourceId = new TabularResourceId( - Long.valueOf(trId.getId())); - TabularResource tabularResource = service - .getTabularResource(tabResourceId); + TabularResourceId tabResourceId = new TabularResourceId(Long.valueOf(trId.getId())); + TabularResource tabularResource = service.getTabularResource(tabResourceId); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); String owner = tabularResource.getOwner(); - if (owner != null - && owner.compareTo(serviceCredentials.getUserName()) == 0) { + if (owner != null && owner.compareTo(serviceCredentials.getUserName()) == 0) { if (removeResourceSession.getResources() == null) { logger.error("Error removing Resource: descriptor null"); - throw new TDGWTServiceException( - "Error removing Resource no descriptor set"); + throw new TDGWTServiceException("Error removing Resource no descriptor set"); } - for (ResourceTDDescriptor resourceTDDescriptor : removeResourceSession - .getResources()) { + for (ResourceTDDescriptor resourceTDDescriptor : removeResourceSession.getResources()) { service.removeResurce(resourceTDDescriptor.getId()); } } else { throw new TDGWTServiceException( - "You are not the owner of this tabular resource (owner: " - + owner + ")"); + "You are not the owner of this tabular resource (owner: " + owner + ")"); } return; @@ -9729,14 +8175,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { - logger.error( - "Error deleting the resource: " + e.getLocalizedMessage(), - e); - throw new TDGWTServiceException("Error deleting the resource: " - + e.getLocalizedMessage()); + logger.error("Error deleting the resource: " + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error deleting the resource: " + e.getLocalizedMessage()); } } @@ -9745,52 +8187,41 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startMapCreation(MapCreationSession mapCreationSession) - throws TDGWTServiceException { + public String startMapCreation(MapCreationSession mapCreationSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setMapCreationSession(httpRequest, serviceCredentials, - mapCreationSession); + SessionUtil.setMapCreationSession(httpRequest, serviceCredentials, mapCreationSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(mapCreationSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(mapCreationSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(mapCreationSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); - OpExecution4MapCreation opEx = new OpExecution4MapCreation(service, - mapCreationSession); + OpExecution4MapCreation opEx = new OpExecution4MapCreation(service, mapCreationSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error Generate Map invocation: Operation not supported"); + throw new TDGWTServiceException("Error Generate Map invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.GenerateMap, mapCreationSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.GenerateMap, mapCreationSession.getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -9798,12 +8229,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error creating the map: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error creating the map: " + e.getLocalizedMessage()); } } @@ -9813,19 +8242,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String getUriFromResolver(UriResolverSession uriResolverSession) - throws TDGWTServiceException { + public String getUriFromResolver(UriResolverSession uriResolverSession) throws TDGWTServiceException { String link = ""; HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("Get uri from resolver: " + uriResolverSession); UriResolverTDClient uriResolverTDClient = new UriResolverTDClient(); - link = uriResolverTDClient.resolve(uriResolverSession, - serviceCredentials); + link = uriResolverTDClient.resolve(uriResolverSession, serviceCredentials); return link; @@ -9834,13 +8260,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException( - "Error retrieving uri from resolver: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error retrieving uri from resolver: " + e.getLocalizedMessage()); } } @@ -9849,55 +8272,42 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startChartTopRating( - ChartTopRatingSession chartTopRatingSession) - throws TDGWTServiceException { + public String startChartTopRating(ChartTopRatingSession chartTopRatingSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setChartTopRatingSession(httpRequest, - serviceCredentials, chartTopRatingSession); + SessionUtil.setChartTopRatingSession(httpRequest, serviceCredentials, chartTopRatingSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(chartTopRatingSession.getColumn().getTrId(), httpRequest, - serviceCredentials); + checkTRId(chartTopRatingSession.getColumn().getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(chartTopRatingSession.getColumn().getTrId() - .getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + Long.valueOf(chartTopRatingSession.getColumn().getTrId().getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); - OpExecution4ChartTopRating opEx = new OpExecution4ChartTopRating( - service, chartTopRatingSession); + OpExecution4ChartTopRating opEx = new OpExecution4ChartTopRating(service, chartTopRatingSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in Top Rating Chart invocation: Operation not supported"); + throw new TDGWTServiceException("Error in Top Rating Chart invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); logger.debug("Start Task on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.ChartTopRating, chartTopRatingSession - .getColumn().getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.ChartTopRating, + chartTopRatingSession.getColumn().getTrId()); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -9905,12 +8315,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error creating top rating chart: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error creating top rating chart: " + e.getLocalizedMessage()); } } @@ -9920,16 +8328,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public void saveResource(SaveResourceSession saveResourceSession) - throws TDGWTServiceException { + public void saveResource(SaveResourceSession saveResourceSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setSaveResourceSession(httpRequest, serviceCredentials, - saveResourceSession); + SessionUtil.setSaveResourceSession(httpRequest, serviceCredentials, saveResourceSession); logger.debug("SaveResource(): " + saveResourceSession); String mimeType; @@ -9940,11 +8345,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements mimeType = mimeTypeSupport.getMimeName(); } - ResourceTDDescriptor resourceTDDescriptor = saveResourceSession - .getResourceTDDescriptor(); + ResourceTDDescriptor resourceTDDescriptor = saveResourceSession.getResourceTDDescriptor(); - ResourceTDType resourceTDType = resourceTDDescriptor - .getResourceType(); + ResourceTDType resourceTDType = resourceTDDescriptor.getResourceType(); if (resourceTDType == null) { logger.error("Unknow resource type: null"); @@ -9960,13 +8363,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements case GUESSER: case JSON: case SDMX: - saveResourceByStorageId(saveResourceSession, - serviceCredentials, mimeType, resourceTDDescriptor); + saveResourceByStorageId(saveResourceSession, serviceCredentials, mimeType, resourceTDDescriptor); break; case MAP: ApplicationType applicationType = ApplicationType.GIS; - saveResourceByInputStream(saveResourceSession, - serviceCredentials, mimeType, resourceTDDescriptor, + saveResourceByInputStream(saveResourceSession, serviceCredentials, mimeType, resourceTDDescriptor, applicationType); break; default: @@ -9981,20 +8382,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error saving the resource: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error saving the resource: " + e.getLocalizedMessage()); } } - protected void saveResourceByStorageId( - SaveResourceSession saveResourceSession, - ServiceCredentials serviceCredentials, String mimeType, - ResourceTDDescriptor resourceTDDescriptor) + protected void saveResourceByStorageId(SaveResourceSession saveResourceSession, + ServiceCredentials serviceCredentials, String mimeType, ResourceTDDescriptor resourceTDDescriptor) throws TDGWTServiceException { ResourceTD resource = resourceTDDescriptor.getResourceTD(); String storageId = null; @@ -10008,20 +8405,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements mimeType = internalURITD.getMimeType(); } else { if (resource instanceof TableResourceTD) { - throw new TDGWTServiceException( - "Save is not supported for this resource!"); + throw new TDGWTServiceException("Save is not supported for this resource!"); } else { - throw new TDGWTServiceException( - "Save is not supported for this resource!"); + throw new TDGWTServiceException("Save is not supported for this resource!"); } } } if (storageId == null || storageId.isEmpty()) { - throw new TDGWTServiceException( - "This resource does not have valid storage id: " - + storageId); + throw new TDGWTServiceException("This resource does not have valid storage id: " + storageId); } MimeTypeSupport mime = saveResourceSession.getMime(); @@ -10033,32 +8426,23 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements fileName = saveResourceSession.getFileName() + mime.getExtension(); } - logger.debug("Create Item On Workspace: [storageId=" + storageId - + " ,user: " + serviceCredentials.getUserName() - + " ,fileName: " + fileName + " ,fileDescription: " - + saveResourceSession.getFileDescription() + " ,mimetype:" - + mimeType + " ,folder: " + saveResourceSession.getItemId() - + "]"); + logger.debug("Create Item On Workspace: [storageId=" + storageId + " ,user: " + serviceCredentials.getUserName() + + " ,fileName: " + fileName + " ,fileDescription: " + saveResourceSession.getFileDescription() + + " ,mimetype:" + mimeType + " ,folder: " + saveResourceSession.getItemId() + "]"); if (storageId.startsWith("http:") || storageId.startsWith("https:")) { FilesStorage storage = new FilesStorage(); - storage.createItemOnWorkspace(storageId, - serviceCredentials.getUserName(), fileName, - saveResourceSession.getFileDescription(), mimeType, - saveResourceSession.getItemId()); + storage.createItemOnWorkspace(storageId, serviceCredentials.getUserName(), fileName, + saveResourceSession.getFileDescription(), mimeType, saveResourceSession.getItemId()); } else { FilesStorage storage = new FilesStorage(); - storage.createItemOnWorkspaceByStorageId(storageId, - serviceCredentials.getUserName(), fileName, - saveResourceSession.getFileDescription(), mimeType, - saveResourceSession.getItemId()); + storage.createItemOnWorkspaceByStorageId(storageId, serviceCredentials.getUserName(), fileName, + saveResourceSession.getFileDescription(), mimeType, saveResourceSession.getItemId()); } } - protected void saveResourceByInputStream( - SaveResourceSession saveResourceSession, - ServiceCredentials serviceCredentials, String mimeType, - ResourceTDDescriptor resourceTDDescriptor, + protected void saveResourceByInputStream(SaveResourceSession saveResourceSession, + ServiceCredentials serviceCredentials, String mimeType, ResourceTDDescriptor resourceTDDescriptor, ApplicationType applicationType) throws TDGWTServiceException { ResourceTD resource = resourceTDDescriptor.getResourceTD(); UriResolverSession uriResolverSession; @@ -10069,30 +8453,24 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } else { if (resource instanceof InternalURITD) { InternalURITD internalURITD = (InternalURITD) resource; - uriResolverSession = new UriResolverSession( - internalURITD.getId(), applicationType, - resourceTDDescriptor.getName(), - internalURITD.getMimeType()); + uriResolverSession = new UriResolverSession(internalURITD.getId(), applicationType, + resourceTDDescriptor.getName(), internalURITD.getMimeType()); mimeType = internalURITD.getMimeType(); } else { if (resource instanceof TableResourceTD) { - throw new TDGWTServiceException( - "Save is not supported for this resource!"); + throw new TDGWTServiceException("Save is not supported for this resource!"); } else { - throw new TDGWTServiceException( - "Save is not supported for this resource!"); + throw new TDGWTServiceException("Save is not supported for this resource!"); } } } UriResolverTDClient uriResolverTDClient = new UriResolverTDClient(); - String link = uriResolverTDClient.resolve(uriResolverSession, - serviceCredentials); + String link = uriResolverTDClient.resolve(uriResolverSession, serviceCredentials); if (link == null || link.isEmpty()) { - throw new TDGWTServiceException( - "This resource does not have valid link: " + link); + throw new TDGWTServiceException("This resource does not have valid link: " + link); } MimeTypeSupport mime = saveResourceSession.getMime(); @@ -10104,17 +8482,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements fileName = saveResourceSession.getFileName() + mime.getExtension(); } - logger.debug("Create Item On Workspace: [uri=" + link + " ,user: " - + serviceCredentials.getUserName() + " ,fileName: " + fileName - + " ,fileDescription: " - + saveResourceSession.getFileDescription() + " ,mimetype:" - + mimeType + " ,folder: " + saveResourceSession.getItemId() - + "]"); + logger.debug("Create Item On Workspace: [uri=" + link + " ,user: " + serviceCredentials.getUserName() + + " ,fileName: " + fileName + " ,fileDescription: " + saveResourceSession.getFileDescription() + + " ,mimetype:" + mimeType + " ,folder: " + saveResourceSession.getItemId() + "]"); FilesStorage storage = new FilesStorage(); - storage.createItemOnWorkspace(link, serviceCredentials.getUserName(), - fileName, saveResourceSession.getFileDescription(), mimeType, - saveResourceSession.getItemId()); + storage.createItemOnWorkspace(link, serviceCredentials.getUserName(), fileName, + saveResourceSession.getFileDescription(), mimeType, saveResourceSession.getItemId()); } /** @@ -10123,65 +8497,51 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements */ @Override public String startGeospatialCreateCoordinates( - GeospatialCreateCoordinatesSession geospatialCreateCoordinatesSession) - throws TDGWTServiceException { + GeospatialCreateCoordinatesSession geospatialCreateCoordinatesSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setGeospatialCreateCoordinatesSession(httpRequest, - serviceCredentials, geospatialCreateCoordinatesSession); + SessionUtil.setGeospatialCreateCoordinatesSession(httpRequest, serviceCredentials, + geospatialCreateCoordinatesSession); if (geospatialCreateCoordinatesSession == null) { logger.error("GeospatialCreateCoordinatesSession is null"); throw new TDGWTServiceException( "Error creating geospatial coordinates: GeospatialCreateCoordinatesSession is null"); } - logger.debug("StartGeospatialCreateCoordinates: " - + geospatialCreateCoordinatesSession); + logger.debug("StartGeospatialCreateCoordinates: " + geospatialCreateCoordinatesSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(geospatialCreateCoordinatesSession.getTrId(), - httpRequest, serviceCredentials); + checkTRId(geospatialCreateCoordinatesSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(geospatialCreateCoordinatesSession.getTrId() - .getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + Long.valueOf(geospatialCreateCoordinatesSession.getTrId().getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); OpExecution4GeospatialCreateCoordinates opEx = new OpExecution4GeospatialCreateCoordinates( - serviceCredentials, service, - geospatialCreateCoordinatesSession); + serviceCredentials, service, geospatialCreateCoordinatesSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); - logger.debug("GeospatialCreateCoordinates on service: TaskId " - + trTask.getId()); + logger.debug("GeospatialCreateCoordinates on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.GeospatialCreateCoordinates, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.GeospatialCreateCoordinates, geospatialCreateCoordinatesSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -10189,13 +8549,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException( - "Error creating geospatial coordinates: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error creating geospatial coordinates: " + e.getLocalizedMessage()); } } @@ -10205,65 +8562,52 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startGeospatialDownscaleCSquare( - GeospatialDownscaleCSquareSession geospatialDownscaleCSquareSession) + public String startGeospatialDownscaleCSquare(GeospatialDownscaleCSquareSession geospatialDownscaleCSquareSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setGeospatialDownscaleCSquareSession(httpRequest, - serviceCredentials, geospatialDownscaleCSquareSession); + SessionUtil.setGeospatialDownscaleCSquareSession(httpRequest, serviceCredentials, + geospatialDownscaleCSquareSession); if (geospatialDownscaleCSquareSession == null) { logger.error("GeospatialDownscaleCSquareSession is null"); throw new TDGWTServiceException( "Error in downscale C-Square: GeospatialDownscaleCSquareSession is null"); } - logger.debug("StartGeospatialDownscaleCSquare: " - + geospatialDownscaleCSquareSession); + logger.debug("StartGeospatialDownscaleCSquare: " + geospatialDownscaleCSquareSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(geospatialDownscaleCSquareSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(geospatialDownscaleCSquareSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(geospatialDownscaleCSquareSession.getTrId() - .getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + Long.valueOf(geospatialDownscaleCSquareSession.getTrId().getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4GeospatialDownscaleCSquare opEx = new OpExecution4GeospatialDownscaleCSquare( - service, geospatialDownscaleCSquareSession); + OpExecution4GeospatialDownscaleCSquare opEx = new OpExecution4GeospatialDownscaleCSquare(service, + geospatialDownscaleCSquareSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); OperationExecution invocation = director.getOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.execute(invocation, tabularResourceId); - logger.debug("GeospatialCreateCoordinates on service: TaskId " - + trTask.getId()); + logger.debug("GeospatialCreateCoordinates on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.DownscaleCSquare, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.DownscaleCSquare, geospatialDownscaleCSquareSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -10271,12 +8615,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in downscale C-Square: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in downscale C-Square: " + e.getLocalizedMessage()); } } @@ -10286,66 +8628,51 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * {@inheritDoc} */ @Override - public String startGeometryCreatePoint( - GeometryCreatePointSession geometryCreatePointSession) + public String startGeometryCreatePoint(GeometryCreatePointSession geometryCreatePointSession) throws TDGWTServiceException { HttpServletRequest httpRequest = null; try { httpRequest = this.getThreadLocalRequest(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setGeometryCreatePointSession(httpRequest, - serviceCredentials, geometryCreatePointSession); + SessionUtil.setGeometryCreatePointSession(httpRequest, serviceCredentials, geometryCreatePointSession); if (geometryCreatePointSession == null) { logger.error("GeometryCreatePointSession is null"); - throw new TDGWTServiceException( - "Error creating geometry point: GeometryCreatePointSession is null"); + throw new TDGWTServiceException("Error creating geometry point: GeometryCreatePointSession is null"); } - logger.debug("StartGeometryCreatePoint: " - + geometryCreatePointSession); + logger.debug("StartGeometryCreatePoint: " + geometryCreatePointSession); TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(geometryCreatePointSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(geometryCreatePointSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(geometryCreatePointSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - OpExecution4GeometryCreatePoint opEx = new OpExecution4GeometryCreatePoint( - service, geometryCreatePointSession); + OpExecution4GeometryCreatePoint opEx = new OpExecution4GeometryCreatePoint(service, + geometryCreatePointSession); OpExecutionDirector director = new OpExecutionDirector(); director.setOperationExecutionBuilder(opEx); director.constructOperationExecution(); - ArrayList invocation = director - .getListOperationExecution(); + ArrayList invocation = director.getListOperationExecution(); if (invocation == null) { - throw new TDGWTServiceException( - "Error in invocation: Operation not supported"); + throw new TDGWTServiceException("Error in invocation: Operation not supported"); } logger.debug("OperationInvocation: \n" + invocation.toString()); Task trTask = service.executeBatch(invocation, tabularResourceId); - logger.debug("GeometryCreatePoint on service: TaskId " - + trTask.getId()); + logger.debug("GeometryCreatePoint on service: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.GeometryCreatePoint, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.GeometryCreatePoint, geometryCreatePointSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -10353,33 +8680,22 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error creating geometry point: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error creating geometry point: " + e.getLocalizedMessage()); } } - /** - * - * @param applyAndDetachColumnRulesSession - * @param httpRequest - * @return - * @throws TDGWTServiceException - */ - public String startApplyAndDetachColumnnRules( - ApplyAndDetachColumnRulesSession applyAndDetachColumnRulesSession, + public String startApplyAndDetachColumnnRules(ApplyAndDetachColumnRulesSession applyAndDetachColumnRulesSession, HttpServletRequest httpRequest) throws TDGWTServiceException { try { // HttpSession session = this.getThreadLocalRequest().getSession(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setRulesOnColumnApplyAndDetachSession(httpRequest, - serviceCredentials, applyAndDetachColumnRulesSession); + SessionUtil.setRulesOnColumnApplyAndDetachSession(httpRequest, serviceCredentials, + applyAndDetachColumnRulesSession); if (applyAndDetachColumnRulesSession == null) { logger.error("ApplyAndDetachColumnRulesSession is null"); @@ -10389,63 +8705,49 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(applyAndDetachColumnRulesSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(applyAndDetachColumnRulesSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( - Long.valueOf(applyAndDetachColumnRulesSession.getTrId() - .getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + Long.valueOf(applyAndDetachColumnRulesSession.getTrId().getId())); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); ColumnData column = applyAndDetachColumnRulesSession.getColumn(); if (column == null) { logger.error("Error in apply and detach rules on column: No column selected."); - throw new TDGWTServiceException( - "Error in apply rules on column: No column selected."); + throw new TDGWTServiceException("Error in apply rules on column: No column selected."); } - ColumnLocalId columnLocalId = new ColumnLocalId( - column.getColumnId()); + ColumnLocalId columnLocalId = new ColumnLocalId(column.getColumnId()); ArrayList rulesThatWillBeDetach = applyAndDetachColumnRulesSession .getRulesThatWillBeDetached(); - if (rulesThatWillBeDetach != null - && rulesThatWillBeDetach.size() > 0) { + if (rulesThatWillBeDetach != null && rulesThatWillBeDetach.size() > 0) { ArrayList ruleIdsDetach = new ArrayList(); for (RuleDescriptionData r : rulesThatWillBeDetach) { RuleId ruleDetachId = new RuleId(r.getId()); ruleIdsDetach.add(ruleDetachId); } - service.detachColumnRules(tabularResourceId, columnLocalId, - ruleIdsDetach); + service.detachColumnRules(tabularResourceId, columnLocalId, ruleIdsDetach); } ArrayList rulesThatWillBeApplied = applyAndDetachColumnRulesSession .getRulesThatWillBeApplied(); - if (rulesThatWillBeApplied != null - && rulesThatWillBeApplied.size() > 0) { + if (rulesThatWillBeApplied != null && rulesThatWillBeApplied.size() > 0) { ArrayList ruleIdsApplied = new ArrayList(); for (RuleDescriptionData r : rulesThatWillBeApplied) { RuleId ruleAppliedId = new RuleId(r.getId()); ruleIdsApplied.add(ruleAppliedId); } - Task trTask = service.applyColumnRule(tabularResourceId, - columnLocalId, ruleIdsApplied); + Task trTask = service.applyColumnRule(tabularResourceId, columnLocalId, ruleIdsApplied); logger.debug("Rules On Column Apply: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.RuleOnColumnApply, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.RuleOnColumnApply, applyAndDetachColumnRulesSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } else { return null; @@ -10455,83 +8757,58 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in apply rules on column: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in apply rules on column: " + e.getLocalizedMessage()); } } - /** - * - * @param applyTableRuleSession - * @param httpRequest - * @return - * @throws TDGWTServiceException - */ - public String startApplyTableRule( - ApplyTableRuleSession applyTableRuleSession, - HttpServletRequest httpRequest) throws TDGWTServiceException { + public String startApplyTableRule(ApplyTableRuleSession applyTableRuleSession, HttpServletRequest httpRequest) + throws TDGWTServiceException { try { - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); logger.debug("StartApplyTableRule: " + applyTableRuleSession); - SessionUtil.setApplyTableRuleSession(httpRequest, - serviceCredentials, applyTableRuleSession); + SessionUtil.setApplyTableRuleSession(httpRequest, serviceCredentials, applyTableRuleSession); if (applyTableRuleSession == null) { logger.error("Apply Table Rule Session is null: "); - throw new TDGWTServiceException( - "Error in apply rule on table: ApplyTableRuleSession is null"); + throw new TDGWTServiceException("Error in apply rule on table: ApplyTableRuleSession is null"); } if (applyTableRuleSession.getRuleDescriptionData() == null) { - logger.error("Apply Table Rule Session: RuleDescriptionData is null: " - + applyTableRuleSession); - throw new TDGWTServiceException( - "Error in apply rule on table: rule description is null"); + logger.error("Apply Table Rule Session: RuleDescriptionData is null: " + applyTableRuleSession); + throw new TDGWTServiceException("Error in apply rule on table: rule description is null"); } if (applyTableRuleSession.getPlaceHolderToColumnMap() == null) { - logger.error("Apply Table Rule Session: PlaceHolderToColumnMap is null: " - + applyTableRuleSession); - throw new TDGWTServiceException( - "Error in apply rule on table: map is null"); + logger.error("Apply Table Rule Session: PlaceHolderToColumnMap is null: " + applyTableRuleSession); + throw new TDGWTServiceException("Error in apply rule on table: map is null"); } TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(applyTableRuleSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(applyTableRuleSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(applyTableRuleSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - RuleId ruleId = new RuleId(applyTableRuleSession - .getRuleDescriptionData().getId()); + RuleId ruleId = new RuleId(applyTableRuleSession.getRuleDescriptionData().getId()); - Task trTask = service.applyTableRule(tabularResourceId, - applyTableRuleSession.getPlaceHolderToColumnMap(), ruleId); + Task trTask = service.applyTableRule(tabularResourceId, applyTableRuleSession.getPlaceHolderToColumnMap(), + ruleId); logger.debug("Rules On Table Apply: TaskId " + trTask.getId()); - TaskWrapper taskWrapper = new TaskWrapper(trTask, - UIOperationsId.RuleOnTableApply, + TaskWrapper taskWrapper = new TaskWrapper(trTask, UIOperationsId.RuleOnTableApply, applyTableRuleSession.getTrId()); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); return trTask.getId().getValue(); } catch (TDGWTServiceException e) { @@ -10539,77 +8816,55 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in apply rules on table: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in apply rules on table: " + e.getLocalizedMessage()); } } - /** - * - * @param detachColumnRulesSession - * @param httpRequest - * @return - * @throws TDGWTServiceException - */ - public void setDetachColumnnRules( - DetachColumnRulesSession detachColumnRulesSession, - HttpServletRequest httpRequest) throws TDGWTServiceException { + public void setDetachColumnnRules(DetachColumnRulesSession detachColumnRulesSession, HttpServletRequest httpRequest) + throws TDGWTServiceException { try { // HttpSession session = this.getThreadLocalRequest().getSession(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setDetachColumnRulesSession(httpRequest, - serviceCredentials, detachColumnRulesSession); + SessionUtil.setDetachColumnRulesSession(httpRequest, serviceCredentials, detachColumnRulesSession); if (detachColumnRulesSession == null) { logger.error("DetachColumnRulesSession is null"); - throw new TDGWTServiceException( - "Error in detach rules on column: DetachColumnRulesSession is null"); + throw new TDGWTServiceException("Error in detach rules on column: DetachColumnRulesSession is null"); } TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(detachColumnRulesSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(detachColumnRulesSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(detachColumnRulesSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); ColumnData column = detachColumnRulesSession.getColumn(); if (column == null) { logger.error("Error in detach rules on column: No column selected."); - throw new TDGWTServiceException( - "Error in detach rules on column: No column selected."); + throw new TDGWTServiceException("Error in detach rules on column: No column selected."); } - ColumnLocalId columnLocalId = new ColumnLocalId( - column.getColumnId()); + ColumnLocalId columnLocalId = new ColumnLocalId(column.getColumnId()); - ArrayList rules = detachColumnRulesSession - .getRules(); + ArrayList rules = detachColumnRulesSession.getRules(); ArrayList ruleIds = new ArrayList(); if (rules != null && rules.size() > 0) { for (RuleDescriptionData r : rules) { RuleId ruleId = new RuleId(r.getId()); ruleIds.add(ruleId); } - service.detachColumnRules(tabularResourceId, columnLocalId, - ruleIds); + service.detachColumnRules(tabularResourceId, columnLocalId, ruleIds); } return; @@ -10618,12 +8873,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in detach rules on column: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in detach rules on column: " + e.getLocalizedMessage()); } } @@ -10631,46 +8884,38 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements /** * * @param detachTableRulesSession + * Session * @param httpRequest - * @return + * Http servlet request * @throws TDGWTServiceException + * Exception */ - public void setDetachTableRules( - DetachTableRulesSession detachTableRulesSession, - HttpServletRequest httpRequest) throws TDGWTServiceException { + public void setDetachTableRules(DetachTableRulesSession detachTableRulesSession, HttpServletRequest httpRequest) + throws TDGWTServiceException { try { // HttpSession session = this.getThreadLocalRequest().getSession(); - ServiceCredentials serviceCredentials = SessionUtil - .getServiceCredentials(httpRequest); + ServiceCredentials serviceCredentials = SessionUtil.getServiceCredentials(httpRequest); - SessionUtil.setDetachTableRulesSession(httpRequest, - serviceCredentials, detachTableRulesSession); + SessionUtil.setDetachTableRulesSession(httpRequest, serviceCredentials, detachTableRulesSession); if (detachTableRulesSession == null) { logger.error("DetachTableRulesSession is null"); - throw new TDGWTServiceException( - "Error in detach rules on table: DetachTableRulesSession is null"); + throw new TDGWTServiceException("Error in detach rules on table: DetachTableRulesSession is null"); } TabularDataService service = TabularDataServiceFactory.getService(); - checkTRId(detachTableRulesSession.getTrId(), httpRequest, - serviceCredentials); + checkTRId(detachTableRulesSession.getTrId(), httpRequest, serviceCredentials); TabularResourceId tabularResourceId = new TabularResourceId( Long.valueOf(detachTableRulesSession.getTrId().getId())); - TabularResource tabularResource = service - .getTabularResource(tabularResourceId); + TabularResource tabularResource = service.getTabularResource(tabularResourceId); - checkTabularResourceIsFlow(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceLocked(tabularResource, httpRequest, - serviceCredentials); - checkTabularResourceIsFinal(tabularResource, httpRequest, - serviceCredentials); + checkTabularResourceIsFlow(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceLocked(tabularResource, httpRequest, serviceCredentials); + checkTabularResourceIsFinal(tabularResource, httpRequest, serviceCredentials); - ArrayList rules = detachTableRulesSession - .getRules(); + ArrayList rules = detachTableRulesSession.getRules(); List ruleIds = new ArrayList(); if (rules != null && rules.size() > 0) { for (RuleDescriptionData r : rules) { @@ -10687,12 +8932,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements } catch (SecurityException e) { e.printStackTrace(); ResourceBundle messages = getResourceBundle(httpRequest); - throw new TDGWTServiceException( - messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); + throw new TDGWTServiceException(messages.getString(TDGWTServiceMessagesConstants.securityExceptionRights)); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error in detach rules on column: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error in detach rules on column: " + e.getLocalizedMessage()); } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceMessagesConstants.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceMessagesConstants.java index 286e2ca..f91159e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceMessagesConstants.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceMessagesConstants.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.gwtservice.server; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TDGWTServiceMessagesConstants { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDLogsServlet.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDLogsServlet.java index 62f7875..487b353 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDLogsServlet.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDLogsServlet.java @@ -25,8 +25,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TDLogsServlet extends HttpServlet { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDRStudioServlet.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDRStudioServlet.java index ee3fa93..6732edc 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDRStudioServlet.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDRStudioServlet.java @@ -23,8 +23,8 @@ import org.slf4j.LoggerFactory; /** * Returns a RSTudio link * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TDRStudioServlet extends HttpServlet { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TabularDataRowsXServlet.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TabularDataRowsXServlet.java index 29e4f3e..155cb01 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TabularDataRowsXServlet.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TabularDataRowsXServlet.java @@ -23,8 +23,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TabularDataRowsXServlet extends HttpServlet { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/encoding/EncodingPGSupported.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/encoding/EncodingPGSupported.java index b4cd8e8..1e7e44c 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/encoding/EncodingPGSupported.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/encoding/EncodingPGSupported.java @@ -4,8 +4,8 @@ import java.util.ArrayList; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum EncodingPGSupported { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/CSVFileUploadSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/CSVFileUploadSession.java index 2b20b18..4026074 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/CSVFileUploadSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/CSVFileUploadSession.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.file.FileUploadState; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CSVFileUploadSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/CodelistMappingFileUploadSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/CodelistMappingFileUploadSession.java index bb95171..260c5e1 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/CodelistMappingFileUploadSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/CodelistMappingFileUploadSession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.file.FileUploadState; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodelistMappingFileUploadSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/FileUploadListener.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/FileUploadListener.java index 394e285..98f2b05 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/FileUploadListener.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/FileUploadListener.java @@ -9,8 +9,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.file.FileUploadState; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class FileUploadListener implements ProgressListener { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/FileUtil.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/FileUtil.java index 080bd5f..8bce980 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/FileUtil.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/file/FileUtil.java @@ -20,25 +20,23 @@ import org.slf4j.LoggerFactory; /** * * @author Giancarlo Panichi - * email: g.panichi@isti.cnr.it + * * */ public class FileUtil { - private static final Logger logger = LoggerFactory - .getLogger(FileUtil.class); + private static final Logger logger = LoggerFactory.getLogger(FileUtil.class); - public static final String[] ZIP_MIMETYPES = new String[] { - "application/x-compress", "application/x-compressed", - "application/x-gzip", "application/x-winzip", "application/x-zip", - "application/zip", "multipart/x-zip" }; + public static final String[] ZIP_MIMETYPES = new String[] { "application/x-compress", "application/x-compressed", + "application/x-gzip", "application/x-winzip", "application/x-zip", "application/zip", "multipart/x-zip" }; /** * Check if the content type is a zip type. * * @param contentType * the content type to check. - * @return true if is a zip file, false otherwise. + * @return True if is a zip file, false otherwise. + * */ public static boolean isZipContentType(String contentType) { for (String zip_mimetype : ZIP_MIMETYPES) @@ -51,13 +49,14 @@ public class FileUtil { * Unzip the specified stream * * @param is - * the zip stream. + * the zip stream * @param os - * the output stream. + * the output stream + * @return Entry name * @throws Exception + * Exception */ - public static String unZip(InputStream is, OutputStream os) - throws Exception { + public static String unZip(InputStream is, OutputStream os) throws Exception { try { ZipInputStream zis = new ZipInputStream(is); ZipEntry entry; @@ -93,29 +92,28 @@ public class FileUtil { return message.toString(); } - public static void setImportFileCSV(CSVFileUploadSession fileUploadSession, - InputStream is, String name, String mimeType) throws Exception { - + public static void setImportFileCSV(CSVFileUploadSession fileUploadSession, InputStream is, String name, + String mimeType) throws Exception { + File csvTmp = setImportFile(is, "import", ".csv", name, mimeType); fileUploadSession.setCsvName(name); fileUploadSession.setCsvFile(csvTmp); } - - public static void setImportFileCodelistMapping(CodelistMappingFileUploadSession fileUploadSession, - InputStream is, String name, String mimeType) throws Exception { - + + public static void setImportFileCodelistMapping(CodelistMappingFileUploadSession fileUploadSession, InputStream is, + String name, String mimeType) throws Exception { + File xmlTmp = setImportFile(is, "importCodMap", ".xml", name, mimeType); fileUploadSession.setCodelistMappingName(name); fileUploadSession.setCodelistMappingFile(xmlTmp); } - - public static File setImportFile(InputStream is, String tempName, - String extention, String name, String mimeType) throws Exception { + public static File setImportFile(InputStream is, String tempName, String extention, String name, String mimeType) + throws Exception { File fileTmp = File.createTempFile(tempName, extention); fileTmp.deleteOnExit(); diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4AddColumn.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4AddColumn.java index f0f554b..c87ddf4 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4AddColumn.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4AddColumn.java @@ -26,8 +26,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for add column * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4AddColumn extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4CSVExport.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4CSVExport.java index 68dc186..3b3d278 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4CSVExport.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4CSVExport.java @@ -21,8 +21,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for CSV Export * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4CSVExport extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4CSVImport.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4CSVImport.java index bad99c2..ba56af4 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4CSVImport.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4CSVImport.java @@ -21,8 +21,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for CSV Import * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4CSVImport extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChangeColumnType.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChangeColumnType.java index bd21f85..adaa179 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChangeColumnType.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChangeColumnType.java @@ -29,8 +29,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for change column type * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4ChangeColumnType extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChangeColumnsPosition.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChangeColumnsPosition.java index acf5de6..74d68db 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChangeColumnsPosition.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChangeColumnsPosition.java @@ -23,8 +23,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for change column position * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4ChangeColumnsPosition extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChangeTableType.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChangeTableType.java index ccee048..bf68bce 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChangeTableType.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChangeTableType.java @@ -17,8 +17,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for change table type * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4ChangeTableType extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChartTopRating.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChartTopRating.java index 5cfef23..16527d1 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChartTopRating.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ChartTopRating.java @@ -17,8 +17,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for Top Rating Chart creation * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4ChartTopRating extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Clone.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Clone.java index 38e611c..01c3ce6 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Clone.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Clone.java @@ -19,8 +19,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for delete column * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4Clone extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4CodelistMapping.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4CodelistMapping.java index 644c6ff..28e6b6c 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4CodelistMapping.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4CodelistMapping.java @@ -21,8 +21,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for codelist mapping * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4CodelistMapping extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4DataMinerOperation.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4DataMinerOperation.java index 09271b0..c21cae4 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4DataMinerOperation.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4DataMinerOperation.java @@ -19,8 +19,8 @@ import org.slf4j.LoggerFactory; /** * Operation DataMiner * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4DataMinerOperation extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4DeleteColumn.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4DeleteColumn.java index 0fda58a..f668398 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4DeleteColumn.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4DeleteColumn.java @@ -18,8 +18,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for delete column * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4DeleteColumn extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4DeleteRows.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4DeleteRows.java index fcb5e5a..a79615c 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4DeleteRows.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4DeleteRows.java @@ -18,8 +18,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for delete rows * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4DeleteRows extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Denormalization.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Denormalization.java index c85b629..1b240bb 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Denormalization.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Denormalization.java @@ -22,8 +22,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for Denormalization * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4Denormalization extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Duplicates.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Duplicates.java index ec985f9..f32b8de 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Duplicates.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Duplicates.java @@ -23,8 +23,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for duplicates * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4Duplicates extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4EditRow.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4EditRow.java index 1236da5..9fb1046 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4EditRow.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4EditRow.java @@ -21,8 +21,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for edit and add row * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4EditRow extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ExtractCodelist.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ExtractCodelist.java index e5daa4b..e7a9f07 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ExtractCodelist.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ExtractCodelist.java @@ -19,8 +19,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for extract codelist * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4ExtractCodelist extends diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4FilterColumn.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4FilterColumn.java index 6db4390..aa59281 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4FilterColumn.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4FilterColumn.java @@ -18,8 +18,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for delete column * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4FilterColumn extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GeometryCreatePoint.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GeometryCreatePoint.java index 73ff370..023ebe3 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GeometryCreatePoint.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GeometryCreatePoint.java @@ -34,8 +34,8 @@ import static org.gcube.data.analysis.tabulardata.expression.dsl.Types.*; /** * Operation Execution for change table type * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4GeometryCreatePoint extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GeospatialCreateCoordinates.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GeospatialCreateCoordinates.java index b59b25f..dab0054 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GeospatialCreateCoordinates.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GeospatialCreateCoordinates.java @@ -24,8 +24,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for change table type * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4GeospatialCreateCoordinates extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GeospatialDownscaleCSquare.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GeospatialDownscaleCSquare.java index 41c0ba3..37ad255 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GeospatialDownscaleCSquare.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GeospatialDownscaleCSquare.java @@ -18,8 +18,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for change table type * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4GeospatialDownscaleCSquare extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GroupBy.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GroupBy.java index 0abe290..b11798b 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GroupBy.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4GroupBy.java @@ -15,8 +15,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for groupBy * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4GroupBy extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4JSONExport.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4JSONExport.java index 01fa4ed..ea694cd 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4JSONExport.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4JSONExport.java @@ -21,8 +21,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for JSON Export * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4JSONExport extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4LabelColumn.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4LabelColumn.java index c5a6000..f5f8e4e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4LabelColumn.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4LabelColumn.java @@ -24,8 +24,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for change label column * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4LabelColumn extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4MapCreation.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4MapCreation.java index 93e7594..25087df 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4MapCreation.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4MapCreation.java @@ -22,8 +22,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for Map Creation * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4MapCreation extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4MergeColumn.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4MergeColumn.java index df85e92..ea5ad9f 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4MergeColumn.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4MergeColumn.java @@ -22,8 +22,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for merge column * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4MergeColumn extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Normalization.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Normalization.java index d2bbf9f..18d267a 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Normalization.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Normalization.java @@ -24,8 +24,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for Normalization * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4Normalization extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceBatch.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceBatch.java index 3ddd083..c665f49 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceBatch.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceBatch.java @@ -22,8 +22,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for replace batch * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4ReplaceBatch extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceByExternal.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceByExternal.java index e6f59b4..21518f1 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceByExternal.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceByExternal.java @@ -33,8 +33,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for replace by external tabular resource * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4ReplaceByExternal extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceColumn.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceColumn.java index d2b55e8..b856351 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceColumn.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceColumn.java @@ -19,8 +19,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for replace column * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4ReplaceColumn extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceColumnByExpression.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceColumnByExpression.java index b359a29..2f85a34 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceColumnByExpression.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4ReplaceColumnByExpression.java @@ -19,8 +19,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for replace column * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4ReplaceColumnByExpression extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXCodelistExport.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXCodelistExport.java index 0766963..4e52cdb 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXCodelistExport.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXCodelistExport.java @@ -27,8 +27,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for sdmx codelist export * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4SDMXCodelistExport extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXCodelistImport.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXCodelistImport.java index f80a688..936a204 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXCodelistImport.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXCodelistImport.java @@ -21,8 +21,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for sdmx codelist import * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4SDMXCodelistImport extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXDatasetExport.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXDatasetExport.java index a95717a..deaa561 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXDatasetExport.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXDatasetExport.java @@ -27,8 +27,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for sdmx Dataset export * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4SDMXDatasetExport extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXTemplateExport.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXTemplateExport.java index 021ee9c..5571bff 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXTemplateExport.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SDMXTemplateExport.java @@ -31,8 +31,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for sdmx Template export * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4SDMXTemplateExport extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SplitColumn.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SplitColumn.java index bdc96f5..28fccf1 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SplitColumn.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4SplitColumn.java @@ -22,8 +22,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for split column * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4SplitColumn extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4StatisticalOperation.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4StatisticalOperation.java index ddbcbba..1ccc908 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4StatisticalOperation.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4StatisticalOperation.java @@ -18,8 +18,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for union * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4StatisticalOperation extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4TimeAggregation.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4TimeAggregation.java index 59c87ff..11da636 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4TimeAggregation.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4TimeAggregation.java @@ -15,8 +15,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for Time Aggregation * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4TimeAggregation extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Union.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Union.java index 38660ee..ce361f4 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Union.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecution4Union.java @@ -19,8 +19,8 @@ import org.slf4j.LoggerFactory; /** * Operation Execution for union * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecution4Union extends OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecutionBuilder.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecutionBuilder.java index 1ee4f28..703d31d 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecutionBuilder.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecutionBuilder.java @@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceExcept /** * Abstract class for build Operation Execution * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ abstract class OpExecutionBuilder { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecutionDirector.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecutionDirector.java index a354c35..b69a742 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecutionDirector.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecutionDirector.java @@ -9,8 +9,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceExcept /** * Operation Execution Director * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecutionDirector { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecutionSpec.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecutionSpec.java index 84c2ffa..614f053 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecutionSpec.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/opexecution/OpExecutionSpec.java @@ -6,8 +6,8 @@ import org.gcube.data.analysis.tabulardata.commons.webservice.types.operations.O /** * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OpExecutionSpec { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/resource/ResourceTDCreator.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/resource/ResourceTDCreator.java index 2e215f1..5a745c3 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/resource/ResourceTDCreator.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/resource/ResourceTDCreator.java @@ -28,8 +28,8 @@ import org.slf4j.LoggerFactory; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ResourceTDCreator { @@ -45,12 +45,7 @@ public class ResourceTDCreator { this.serviceCredentials = serviceCredentials; } - /** - * - * @param resources - * @return - * @throws TDGWTServiceException - */ + public ArrayList createResourcesDescriptorTD( List resources) throws TDGWTServiceException { ArrayList resourcesTD = new ArrayList(); @@ -98,11 +93,7 @@ public class ResourceTDCreator { return resourcesTD; } - /** - * - * @param resource - * @return - */ + protected ResourceTD createResourceTD(Resource resource) throws TDGWTServiceException { ResourceTD resourceTD = null; diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/resource/ResourceTypeMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/resource/ResourceTypeMap.java index dba0d2e..c5c34f4 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/resource/ResourceTypeMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/resource/ResourceTypeMap.java @@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDType; /** * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ResourceTypeMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/social/TDMNotifications.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/social/TDMNotifications.java index 729bc0c..3cd2998 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/social/TDMNotifications.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/social/TDMNotifications.java @@ -22,13 +22,12 @@ import org.slf4j.LoggerFactory; /** * TDMNotification notification sharing TR, templates or rules * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TDMNotifications extends Thread { - private static Logger logger = LoggerFactory - .getLogger(TDMNotifications.class); + private static Logger logger = LoggerFactory.getLogger(TDMNotifications.class); private ServiceCredentials serviceCredentials; private NotificationType notificationType; private ShareTabResource shareTabularResource; @@ -41,8 +40,12 @@ public class TDMNotifications extends Thread { /** * Share Tabular Resource * + * @param request + * Request * @param serviceCredentials + * Service credentials * @param shareTabularResource + * Share tabular resource */ public TDMNotifications(HttpServletRequest request, ServiceCredentials serviceCredentials, ShareTabResource shareTabularResource) { @@ -50,46 +53,49 @@ public class TDMNotifications extends Thread { this.shareTabularResource = shareTabularResource; this.notificationType = NotificationType.TDM_TAB_RESOURCE_SHARE; site = new SocialNetworkingSite(request); - user = new SocialNetworkingUser(serviceCredentials.getUserName(), - serviceCredentials.getEmail(), serviceCredentials.getFullName(), - serviceCredentials.getUserAvatarURL()); + user = new SocialNetworkingUser(serviceCredentials.getUserName(), serviceCredentials.getEmail(), + serviceCredentials.getFullName(), serviceCredentials.getUserAvatarURL()); scope = serviceCredentials.getScope(); } /** * + * @param request + * Request * @param serviceCredentials + * Service credentials * @param shareRule + * Share rule */ - public TDMNotifications(HttpServletRequest request, ServiceCredentials serviceCredentials, - ShareRule shareRule) { + public TDMNotifications(HttpServletRequest request, ServiceCredentials serviceCredentials, ShareRule shareRule) { this.serviceCredentials = serviceCredentials; this.shareRule = shareRule; this.notificationType = NotificationType.TDM_RULE_SHARE; site = new SocialNetworkingSite(request); - user = new SocialNetworkingUser(serviceCredentials.getUserName(), - serviceCredentials.getEmail(), serviceCredentials.getFullName(), - serviceCredentials.getUserAvatarURL()); + user = new SocialNetworkingUser(serviceCredentials.getUserName(), serviceCredentials.getEmail(), + serviceCredentials.getFullName(), serviceCredentials.getUserAvatarURL()); scope = serviceCredentials.getScope(); } /** * + * @param request + * Request * @param serviceCredentials + * Service credentials * @param shareTemplate + * Share template */ - public TDMNotifications(HttpServletRequest request, - ServiceCredentials serviceCredentials, + public TDMNotifications(HttpServletRequest request, ServiceCredentials serviceCredentials, ShareTemplate shareTemplate) { this.serviceCredentials = serviceCredentials; this.shareTemplate = shareTemplate; this.notificationType = NotificationType.TDM_TEMPLATE_SHARE; site = new SocialNetworkingSite(request); - user = new SocialNetworkingUser(serviceCredentials.getUserName(), - serviceCredentials.getEmail(), serviceCredentials.getFullName(), - serviceCredentials.getUserAvatarURL()); + user = new SocialNetworkingUser(serviceCredentials.getUserName(), serviceCredentials.getEmail(), + serviceCredentials.getFullName(), serviceCredentials.getUserAvatarURL()); scope = serviceCredentials.getScope(); } @@ -112,42 +118,29 @@ public class TDMNotifications extends Thread { } private void tabularResourceNotify() { - NotificationsManager nm = new ApplicationNotificationsManager(site, - scope, user, Constants.APPLICATION_ID); + NotificationsManager nm = new ApplicationNotificationsManager(site, scope, user, Constants.APPLICATION_ID); for (Contacts contact : shareTabularResource.getContacts()) { if (contact.isGroup()) { try { - List members = WorkspaceUtil - .getMembersByGroup(contact.getLogin()); + List members = WorkspaceUtil.getMembersByGroup(contact.getLogin()); for (String member : members) { try { - nm.notifyTDMTabularResourceSharing(member, - shareTabularResource.getTabResource() - .getName(), new String( - Constants.TABULAR_RESOURCE_ID - + "=" - + shareTabularResource - .getTabResource() - .getTrId().getId())); + nm.notifyTDMTabularResourceSharing(member, shareTabularResource.getTabResource().getName(), + new String(Constants.TABULAR_RESOURCE_ID + "=" + + shareTabularResource.getTabResource().getTrId().getId())); } catch (Exception e) { - logger.error("Error in the notification(Type: " - + notificationType - + " - " - + serviceCredentials.getUserName() - + " share tabular resource id=" - + shareTabularResource.getTabResource() - .getTrId().getId() + " with " - + member + "): " + e.getLocalizedMessage()); + logger.error("Error in the notification(Type: " + notificationType + " - " + + serviceCredentials.getUserName() + " share tabular resource id=" + + shareTabularResource.getTabResource().getTrId().getId() + " with " + member + + "): " + e.getLocalizedMessage()); e.printStackTrace(); } } } catch (Exception e) { - logger.error("Error in the notification(No members found for group " - + contact.getLogin() - + "): " + logger.error("Error in the notification(No members found for group " + contact.getLogin() + "): " + e.getLocalizedMessage()); e.printStackTrace(); } @@ -155,20 +148,13 @@ public class TDMNotifications extends Thread { } else { try { nm.notifyTDMTabularResourceSharing(contact.getLogin(), - shareTabularResource.getTabResource().getName(), - new String(Constants.TABULAR_RESOURCE_ID - + "=" - + shareTabularResource.getTabResource() - .getTrId().getId())); + shareTabularResource.getTabResource().getName(), new String(Constants.TABULAR_RESOURCE_ID + + "=" + shareTabularResource.getTabResource().getTrId().getId())); } catch (Exception e) { - logger.error("Error in the notification(Type: " - + notificationType - + " - " - + serviceCredentials.getUserName() - + " share tabular resource id=" - + shareTabularResource.getTabResource().getTrId() - .getId() + " with " + contact.getLogin() + logger.error("Error in the notification(Type: " + notificationType + " - " + + serviceCredentials.getUserName() + " share tabular resource id=" + + shareTabularResource.getTabResource().getTrId().getId() + " with " + contact.getLogin() + "): " + e.getLocalizedMessage()); e.printStackTrace(); } @@ -178,54 +164,42 @@ public class TDMNotifications extends Thread { } private void ruleNotify() { - NotificationsManager nm = new ApplicationNotificationsManager(site, - scope, user, Constants.APPLICATION_ID); + NotificationsManager nm = new ApplicationNotificationsManager(site, scope, user, Constants.APPLICATION_ID); for (Contacts contact : shareRule.getContacts()) { if (contact.isGroup()) { try { - List members = WorkspaceUtil - .getMembersByGroup(contact.getLogin()); + List members = WorkspaceUtil.getMembersByGroup(contact.getLogin()); for (String member : members) { try { nm.notifyTDMObjectSharing(member, notificationType, - shareRule.getRuleDescriptionData() - .getName(), null); + shareRule.getRuleDescriptionData().getName(), null); } catch (Exception e) { - logger.error("Error in the notification(Type: " - + notificationType - + " - " - + serviceCredentials.getUserName() - + " share rule id=" - + shareRule.getRuleDescriptionData() - .getId() + " with " + member - + "): " + e.getLocalizedMessage()); + logger.error("Error in the notification(Type: " + notificationType + " - " + + serviceCredentials.getUserName() + " share rule id=" + + shareRule.getRuleDescriptionData().getId() + " with " + member + "): " + + e.getLocalizedMessage()); e.printStackTrace(); } } } catch (Exception e) { - logger.error("Error in the notification(No members found for group " - + contact.getLogin() - + "): " + logger.error("Error in the notification(No members found for group " + contact.getLogin() + "): " + e.getLocalizedMessage()); e.printStackTrace(); } } else { try { - nm.notifyTDMObjectSharing(contact.getLogin(), - notificationType, shareRule - .getRuleDescriptionData().getName(), null); + nm.notifyTDMObjectSharing(contact.getLogin(), notificationType, + shareRule.getRuleDescriptionData().getName(), null); } catch (Exception e) { - logger.error("Error in the notification(Type: " - + notificationType + " - " + logger.error("Error in the notification(Type: " + notificationType + " - " + serviceCredentials.getUserName() + " share rule id=" - + shareRule.getRuleDescriptionData().getId() - + " with " + contact.getLogin() + "): " + + shareRule.getRuleDescriptionData().getId() + " with " + contact.getLogin() + "): " + e.getLocalizedMessage()); e.printStackTrace(); } @@ -236,53 +210,42 @@ public class TDMNotifications extends Thread { } private void templateNotify() { - NotificationsManager nm = new ApplicationNotificationsManager(site, - scope, user, Constants.APPLICATION_ID); + NotificationsManager nm = new ApplicationNotificationsManager(site, scope, user, Constants.APPLICATION_ID); for (Contacts contact : shareTemplate.getContacts()) { if (contact.isGroup()) { try { - List members = WorkspaceUtil - .getMembersByGroup(contact.getLogin()); + List members = WorkspaceUtil.getMembersByGroup(contact.getLogin()); for (String member : members) { try { nm.notifyTDMObjectSharing(member, notificationType, - shareTemplate.getTemplateData().getName(), - null); + shareTemplate.getTemplateData().getName(), null); } catch (Exception e) { - logger.error("Error in the notification(Type: " - + notificationType + " - " - + serviceCredentials.getUserName() - + " share template id=" - + shareTemplate.getTemplateData().getId() - + " with " + member + "): " + logger.error("Error in the notification(Type: " + notificationType + " - " + + serviceCredentials.getUserName() + " share template id=" + + shareTemplate.getTemplateData().getId() + " with " + member + "): " + e.getLocalizedMessage()); e.printStackTrace(); } } } catch (Exception e) { - logger.error("Error in the notification(No members found for group " - + contact.getLogin() - + "): " + logger.error("Error in the notification(No members found for group " + contact.getLogin() + "): " + e.getLocalizedMessage()); e.printStackTrace(); } } else { try { - nm.notifyTDMObjectSharing(contact.getLogin(), - notificationType, shareTemplate.getTemplateData() - .getName(), null); + nm.notifyTDMObjectSharing(contact.getLogin(), notificationType, + shareTemplate.getTemplateData().getName(), null); } catch (Exception e) { - logger.error("Error in the notification(Type: " - + notificationType + " - " + logger.error("Error in the notification(Type: " + notificationType + " - " + serviceCredentials.getUserName() + " share template id=" - + shareTemplate.getTemplateData().getId() - + " with " + contact.getLogin() + "): " + + shareTemplate.getTemplateData().getId() + " with " + contact.getLogin() + "): " + e.getLocalizedMessage()); e.printStackTrace(); } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/storage/FilesStorage.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/storage/FilesStorage.java index 6034f07..9b686be 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/storage/FilesStorage.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/storage/FilesStorage.java @@ -25,35 +25,33 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class FilesStorage { - private static final Logger logger = LoggerFactory - .getLogger(FilesStorage.class); + private static final Logger logger = LoggerFactory.getLogger(FilesStorage.class); /** * * @param user + * User * @param file - * @return + * File + * @return File id */ public String storageCSVTempFile(String user, File file) { try { - IClient client = new StorageClient(user, AccessType.PUBLIC, - MemoryType.VOLATILE).getClient(); + IClient client = new StorageClient(user, AccessType.PUBLIC, MemoryType.VOLATILE).getClient(); String remotePath = "/CSVimport/" + file.getName(); logger.debug("remotePath: " + remotePath); - String id = client.put(true).LFile(file.getAbsolutePath()) - .RFile(remotePath); + String id = client.put(true).LFile(file.getAbsolutePath()).RFile(remotePath); return id; } catch (Throwable e) { - logger.error("Error no csv file loaded on storage" - + e.getLocalizedMessage()); + logger.error("Error no csv file loaded on storage" + e.getLocalizedMessage()); e.printStackTrace(); throw e; } @@ -63,21 +61,20 @@ public class FilesStorage { /** * * @param user + * User * @param file - * @return + * File + * @return File id */ public String storageCodelistMappingTempFile(String user, File file) { try { - IClient client = new StorageClient(user, AccessType.PUBLIC, - MemoryType.VOLATILE).getClient(); + IClient client = new StorageClient(user, AccessType.PUBLIC, MemoryType.VOLATILE).getClient(); String remotePath = "/CodelistMappingImport/" + file.getName(); logger.debug("remotePath: " + remotePath); - String id = client.put(true).LFile(file.getAbsolutePath()) - .RFile(remotePath); + String id = client.put(true).LFile(file.getAbsolutePath()).RFile(remotePath); return id; } catch (Throwable e) { - logger.error("Error no codelist mapping file loaded on storage" - + e.getLocalizedMessage()); + logger.error("Error no codelist mapping file loaded on storage" + e.getLocalizedMessage()); e.printStackTrace(); throw e; } @@ -87,19 +84,20 @@ public class FilesStorage { /** * * @param user + * User * @param url - * @return + * Url + * @return File id * @throws TDGWTServiceException + * Exception */ - public String storageCodelistMappingTempFile(String user, String url) - throws TDGWTServiceException { + public String storageCodelistMappingTempFile(String user, String url) throws TDGWTServiceException { InputStream is = null; try { URL address = new URL(url); is = address.openStream(); - IClient client = new StorageClient(user, AccessType.PUBLIC, - MemoryType.VOLATILE).getClient(); + IClient client = new StorageClient(user, AccessType.PUBLIC, MemoryType.VOLATILE).getClient(); String remotePath = "/CodelistMappingImport/" + address.getFile(); logger.debug("remotePath: " + remotePath); String id = client.put(true).LFile(is).RFile(remotePath); @@ -107,15 +105,12 @@ public class FilesStorage { return id; } catch (IOException e) { - logger.error("Error no codelist mapping file loaded on storage" - + e.getLocalizedMessage()); + logger.error("Error no codelist mapping file loaded on storage" + e.getLocalizedMessage()); e.printStackTrace(); throw new TDGWTServiceException( - "Error no codelist mapping file loaded on storage" - + e.getLocalizedMessage()); + "Error no codelist mapping file loaded on storage" + e.getLocalizedMessage()); } catch (Throwable e) { - logger.error("Error no codelist mapping file loaded on storage" - + e.getLocalizedMessage()); + logger.error("Error no codelist mapping file loaded on storage" + e.getLocalizedMessage()); e.printStackTrace(); throw e; } @@ -127,14 +122,14 @@ public class FilesStorage { * * @param user * User - * @param remotePath - * File path on storage + * @param wi + * Workspace item * @param file - * Destination file + * File * @throws TDGWTServiceException + * Exception */ - public void retrieveFile(String user, WorkspaceItem wi, File file) - throws TDGWTServiceException { + public void retrieveFile(String user, WorkspaceItem wi, File file) throws TDGWTServiceException { InputStream is = null; try { @@ -142,9 +137,8 @@ public class FilesStorage { // SMPUrl smsHome = new SMPUrl(gcubeItem.getPublicLink()); URL url = new URL(gcubeItem.getPublicLink()); - logger.debug("smsHome: [host:" + url.getHost() + " path:" - + url.getPath() + " ref:" + url.getRef() + " userinfo:" - + url.getUserInfo() + " ]"); + logger.debug("smsHome: [host:" + url.getHost() + " path:" + url.getPath() + " ref:" + url.getRef() + + " userinfo:" + url.getUserInfo() + " ]"); URLConnection uc = null; uc = (URLConnection) url.openConnection(); is = uc.getInputStream(); @@ -152,9 +146,7 @@ public class FilesStorage { } catch (Throwable e) { logger.error("Error retrieving file from storage", e); e.printStackTrace(); - throw new TDGWTServiceException( - "Error retrieving file from storage: " - + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving file from storage: " + e.getLocalizedMessage(), e); } try { @@ -168,13 +160,9 @@ public class FilesStorage { } bos.close(); } catch (Throwable e) { - logger.error( - "Error trasferring file from storage: " - + e.getLocalizedMessage(), e); + logger.error("Error trasferring file from storage: " + e.getLocalizedMessage(), e); e.printStackTrace(); - throw new TDGWTServiceException( - "Error trasferring file from storage: " - + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error trasferring file from storage: " + e.getLocalizedMessage(), e); } } @@ -183,13 +171,14 @@ public class FilesStorage { * * @param user * User - * @param remotePath - * File path on storage - * @return InputStream back to read the file + * + * @param wi + * Workspace item + * @return Input stream * @throws TDGWTServiceException + * Exception */ - public InputStream retrieveInputStream(String user, WorkspaceItem wi) - throws TDGWTServiceException { + public InputStream retrieveInputStream(String user, WorkspaceItem wi) throws TDGWTServiceException { InputStream is = null; try { @@ -197,9 +186,8 @@ public class FilesStorage { // SMPUrl smsHome = new SMPUrl(gcubeItem.getPublicLink()); URL url = new URL(gcubeItem.getPublicLink()); - logger.debug("smsHome: [host:" + url.getHost() + " path:" - + url.getPath() + " ref:" + url.getRef() + " userinfo:" - + url.getUserInfo() + " ]"); + logger.debug("smsHome: [host:" + url.getHost() + " path:" + url.getPath() + " ref:" + url.getRef() + + " userinfo:" + url.getUserInfo() + " ]"); URLConnection uc = null; uc = (URLConnection) url.openConnection(); is = uc.getInputStream(); @@ -207,9 +195,7 @@ public class FilesStorage { } catch (Throwable e) { logger.error("Error retrieving file from storage", e); e.printStackTrace(); - throw new TDGWTServiceException( - "Error retrieving file from storage: " - + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving file from storage: " + e.getLocalizedMessage(), e); } return is; @@ -218,24 +204,21 @@ public class FilesStorage { /** * - * @param user - * User - * @param remotePath - * File path on storage - * @return InputStream back to read the file + * @param uri + * Usi + * @return Input stream * @throws TDGWTServiceException + * Exception */ - public InputStream retrieveInputStream(String uri) - throws TDGWTServiceException { + public InputStream retrieveInputStream(String uri) throws TDGWTServiceException { InputStream is = null; try { // SMPUrl smsHome = new SMPUrl(uri); URL url = new URL(uri); - logger.debug("smsHome: [host:" + url.getHost() + " path:" - + url.getPath() + " ref:" + url.getRef() + " userinfo:" - + url.getUserInfo() + " ]"); + logger.debug("smsHome: [host:" + url.getHost() + " path:" + url.getPath() + " ref:" + url.getRef() + + " userinfo:" + url.getUserInfo() + " ]"); URLConnection uc = null; uc = (URLConnection) url.openConnection(); is = uc.getInputStream(); @@ -243,9 +226,7 @@ public class FilesStorage { } catch (Throwable e) { logger.error("Error retrieving file from storage", e); e.printStackTrace(); - throw new TDGWTServiceException( - "Error retrieving file from storage: " - + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving file from storage: " + e.getLocalizedMessage(), e); } return is; @@ -254,25 +235,31 @@ public class FilesStorage { /** * + * @param uri + * Uri * @param user * User - * @param remotePath - * File path on storage - * @return InputStream back to read the file + * @param item_name + * Item name + * @param item_description + * Item description + * @param item_mimetype + * Item mime type + * @param item_folder + * Destination folder * @throws TDGWTServiceException + * Exception */ - public void createItemOnWorkspace(String uri, String user, - String item_name, String item_description, String item_mimetype, - String item_folder) throws TDGWTServiceException { + public void createItemOnWorkspace(String uri, String user, String item_name, String item_description, + String item_mimetype, String item_folder) throws TDGWTServiceException { InputStream is = null; try { // SMPUrl smsHome = new SMPUrl(uri); URL url = new URL(uri); - logger.debug("smsHome: [host:" + url.getHost() + " path:" - + url.getPath() + " ref:" + url.getRef() + " userinfo:" - + url.getUserInfo() + " ]"); + logger.debug("smsHome: [host:" + url.getHost() + " path:" + url.getPath() + " ref:" + url.getRef() + + " userinfo:" + url.getUserInfo() + " ]"); URLConnection uc = null; uc = (URLConnection) url.openConnection(); @@ -283,21 +270,16 @@ public class FilesStorage { WorkspaceFolder folder = (WorkspaceFolder) ws.getItem(item_folder); String uniqueName = WorkspaceUtil.getUniqueName(item_name, folder); - logger.debug("ws.createExternalFile [folder: " + folder - + ", uniqueName: " + uniqueName + ", description: " - + item_description + ", mimetype: " + item_mimetype - + ", InputStream: " + is + "]"); - WorkspaceUtil.createExternalFile(folder, uniqueName, - item_description, item_mimetype, is); + logger.debug("ws.createExternalFile [folder: " + folder + ", uniqueName: " + uniqueName + ", description: " + + item_description + ", mimetype: " + item_mimetype + ", InputStream: " + is + "]"); + WorkspaceUtil.createExternalFile(folder, uniqueName, item_description, item_mimetype, is); is.close(); } catch (Throwable e) { logger.error("Error creating item on workspace", e); e.printStackTrace(); - throw new TDGWTServiceException( - "Error creating item on workspace: " - + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error creating item on workspace: " + e.getLocalizedMessage(), e); } } @@ -305,16 +287,22 @@ public class FilesStorage { /** * * @param storageId + * Storage id * @param user + * User * @param item_name + * Item name * @param item_description + * Item description * @param item_mimetype + * Item mime type * @param item_folder + * Destination Folder * @throws TDGWTServiceException + * Exception */ - public void createItemOnWorkspaceByStorageId(String storageId, String user, - String item_name, String item_description, String item_mimetype, - String item_folder) throws TDGWTServiceException { + public void createItemOnWorkspaceByStorageId(String storageId, String user, String item_name, + String item_description, String item_mimetype, String item_folder) throws TDGWTServiceException { try { @@ -323,19 +311,14 @@ public class FilesStorage { WorkspaceFolder folder = (WorkspaceFolder) ws.getItem(item_folder); String uniqueName = WorkspaceUtil.getUniqueName(item_name, folder); - logger.debug("ws.createExternalFile [folder: " + folder - + ", uniqueName: " + uniqueName + ", description: " - + item_description + ", mimetype: " + item_mimetype - + ", StorageId: " + storageId + "]"); - WorkspaceUtil.createExternalFile(folder, uniqueName, - item_description, item_mimetype, storageId); + logger.debug("ws.createExternalFile [folder: " + folder + ", uniqueName: " + uniqueName + ", description: " + + item_description + ", mimetype: " + item_mimetype + ", StorageId: " + storageId + "]"); + WorkspaceUtil.createExternalFile(folder, uniqueName, item_description, item_mimetype, storageId); } catch (Throwable e) { logger.error("Error creating item on workspace", e); e.printStackTrace(); - throw new TDGWTServiceException( - "Error creating item on workspace: " - + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error creating item on workspace: " + e.getLocalizedMessage(), e); } } @@ -343,28 +326,29 @@ public class FilesStorage { /** * * @param user + * User * @param scope + * Scope + * @return Folder id * @throws TDGWTServiceException + * Exception */ - public String getVREFolderIdByScope(String user, String scope) - throws TDGWTServiceException { + public String getVREFolderIdByScope(String user, String scope) throws TDGWTServiceException { try { Workspace ws = HomeLibrary.getUserWorkspace(user); WorkspaceSharedFolder folder = ws.getVREFolderByScope(scope); - if(folder!=null){ + if (folder != null) { return folder.getId(); } else { return null; } - + } catch (Throwable e) { logger.error("Error retrieving VRE folder by scope!", e); e.printStackTrace(); - throw new TDGWTServiceException( - "Error retrieving VRE folder by scope: " - + e.getLocalizedMessage(), e); + throw new TDGWTServiceException("Error retrieving VRE folder by scope: " + e.getLocalizedMessage(), e); } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ColumnDataTypeMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ColumnDataTypeMap.java index 7ac3fcf..5b24b5d 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ColumnDataTypeMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ColumnDataTypeMap.java @@ -11,8 +11,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataT /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ColumnDataTypeMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ColumnMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ColumnMap.java index 0108aab..f01b6e3 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ColumnMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ColumnMap.java @@ -19,8 +19,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ColumnMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ColumnTypeCodeMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ColumnTypeCodeMap.java index b2dd4f1..7b3440e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ColumnTypeCodeMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ColumnTypeCodeMap.java @@ -15,7 +15,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeC /** * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ public class ColumnTypeCodeMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ExpressionGenerator.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ExpressionGenerator.java index 229a68c..47b11f3 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ExpressionGenerator.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ExpressionGenerator.java @@ -29,8 +29,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ExpressionGenerator { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ExtractCodelistOperationMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ExtractCodelistOperationMap.java index cadea86..9f4ba26 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ExtractCodelistOperationMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ExtractCodelistOperationMap.java @@ -27,8 +27,8 @@ import org.slf4j.LoggerFactory; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ExtractCodelistOperationMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ExtractReferences.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ExtractReferences.java index d1df93b..f9cbfdf 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ExtractReferences.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ExtractReferences.java @@ -12,7 +12,7 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ public class ExtractReferences { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/JobClassifierMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/JobClassifierMap.java index 880a8a9..4f96171 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/JobClassifierMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/JobClassifierMap.java @@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.task.JobSClassifier; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class JobClassifierMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/LicenceMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/LicenceMap.java index 9cc49ef..9a07d13 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/LicenceMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/LicenceMap.java @@ -6,8 +6,8 @@ import org.gcube.data.analysis.tabulardata.commons.utils.Licence; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class LicenceMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/OperationDefinitionMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/OperationDefinitionMap.java index 3b3e253..4d84f6a 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/OperationDefinitionMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/OperationDefinitionMap.java @@ -9,8 +9,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OperationDefinitionMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/PeriodTypeMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/PeriodTypeMap.java index c3491a1..fd878b6 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/PeriodTypeMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/PeriodTypeMap.java @@ -10,8 +10,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ValueDataFo /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class PeriodTypeMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/QueryService.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/QueryService.java index 75ba54b..cc31a6d 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/QueryService.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/QueryService.java @@ -38,19 +38,17 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class QueryService { - private static Logger logger = LoggerFactory - .getLogger(QueryService.class); + private static Logger logger = LoggerFactory.getLogger(QueryService.class); - public static ArrayList queryOccurences( - TabularDataService service, - OccurrencesForReplaceBatchColumnSession occurrencesSession, - Direction direction) throws TDGWTServiceException { + public static ArrayList queryOccurences(TabularDataService service, + OccurrencesForReplaceBatchColumnSession occurrencesSession, Direction direction) + throws TDGWTServiceException { try { @@ -61,7 +59,7 @@ public class QueryService { TableId tableId; if (column.getTrId().isViewTable()) { - tableId= new TableId(new Long(column.getTrId().getReferenceTargetTableId())); + tableId = new TableId(new Long(column.getTrId().getReferenceTargetTableId())); } else { tableId = new TableId(new Long(column.getTrId().getTableId())); } @@ -73,31 +71,22 @@ public class QueryService { if (conditionCode == null) { logger.debug("Replace Batch no validations"); if (column.isViewColumn()) { - //Use View for Occurrence + // Use View for Occurrence tableId = new TableId(new Long(column.getTrId().getTableId())); - - ColumnLocalId sourceColumnId = new ColumnLocalId(column - .getColumnViewData() - .getSourceTableDimensionColumnId()); - querySelect = new QuerySelect(Arrays.asList( - new QueryColumn(columnId), new QueryColumn( - sourceColumnId), new QueryColumn(columnId, - Function.COUNT))); - logger.debug("Occurences querySelect:" - + querySelect.toString()); - queryGroup = new QueryGroup(Arrays.asList(columnId, - sourceColumnId)); - logger.debug("Occurences queryGroup:" - + queryGroup.toString()); + + ColumnLocalId sourceColumnId = new ColumnLocalId( + column.getColumnViewData().getSourceTableDimensionColumnId()); + querySelect = new QuerySelect(Arrays.asList(new QueryColumn(columnId), + new QueryColumn(sourceColumnId), new QueryColumn(columnId, Function.COUNT))); + logger.debug("Occurences querySelect:" + querySelect.toString()); + queryGroup = new QueryGroup(Arrays.asList(columnId, sourceColumnId)); + logger.debug("Occurences queryGroup:" + queryGroup.toString()); } else { - querySelect = new QuerySelect(Arrays.asList( - new QueryColumn(columnId), new QueryColumn( - columnId, Function.COUNT))); - logger.debug("Occurences querySelect:" - + querySelect.toString()); + querySelect = new QuerySelect( + Arrays.asList(new QueryColumn(columnId), new QueryColumn(columnId, Function.COUNT))); + logger.debug("Occurences querySelect:" + querySelect.toString()); queryGroup = new QueryGroup(Arrays.asList(columnId)); - logger.debug("Occurences queryGroup:" - + queryGroup.toString()); + logger.debug("Occurences queryGroup:" + queryGroup.toString()); } } else { logger.debug("Replace Batch from validations"); @@ -106,32 +95,23 @@ public class QueryService { break; case AmbiguousValueOnExternalReference: if (column.isViewColumn()) { - ColumnLocalId sourceColumnId = new ColumnLocalId(column - .getColumnViewData() - .getSourceTableDimensionColumnId()); + ColumnLocalId sourceColumnId = new ColumnLocalId( + column.getColumnViewData().getSourceTableDimensionColumnId()); - querySelect = new QuerySelect(Arrays.asList( - new QueryColumn(columnId), new QueryColumn( - sourceColumnId), new QueryColumn( - columnId, Function.COUNT))); - logger.debug("Occurences querySelect:" - + querySelect.toString()); - queryGroup = new QueryGroup(Arrays.asList(columnId, - sourceColumnId)); - logger.debug("Occurences queryGroup:" - + queryGroup.toString()); + querySelect = new QuerySelect(Arrays.asList(new QueryColumn(columnId), + new QueryColumn(sourceColumnId), new QueryColumn(columnId, Function.COUNT))); + logger.debug("Occurences querySelect:" + querySelect.toString()); + queryGroup = new QueryGroup(Arrays.asList(columnId, sourceColumnId)); + logger.debug("Occurences queryGroup:" + queryGroup.toString()); } else { // ColumnLocalId idColumn = // retrieveColumnLocalIdOFIdColumnType( // column.getTrId(), service); - querySelect = new QuerySelect(Arrays.asList( - new QueryColumn(columnId), new QueryColumn( - columnId, Function.COUNT))); - logger.debug("Occurences querySelect:" - + querySelect.toString()); + querySelect = new QuerySelect( + Arrays.asList(new QueryColumn(columnId), new QueryColumn(columnId, Function.COUNT))); + logger.debug("Occurences querySelect:" + querySelect.toString()); queryGroup = new QueryGroup(Arrays.asList(columnId)); - logger.debug("Occurences queryGroup:" - + queryGroup.toString()); + logger.debug("Occurences queryGroup:" + queryGroup.toString()); } break; case CastValidation: @@ -163,28 +143,19 @@ public class QueryService { case MissingValueOnExternalReference: default: if (column.isViewColumn()) { - ColumnLocalId sourceColumnId = new ColumnLocalId(column - .getColumnViewData() - .getSourceTableDimensionColumnId()); - querySelect = new QuerySelect(Arrays.asList( - new QueryColumn(columnId), new QueryColumn( - sourceColumnId), new QueryColumn( - columnId, Function.COUNT))); - logger.debug("Occurences querySelect:" - + querySelect.toString()); - queryGroup = new QueryGroup(Arrays.asList(columnId, - sourceColumnId)); - logger.debug("Occurences queryGroup:" - + queryGroup.toString()); + ColumnLocalId sourceColumnId = new ColumnLocalId( + column.getColumnViewData().getSourceTableDimensionColumnId()); + querySelect = new QuerySelect(Arrays.asList(new QueryColumn(columnId), + new QueryColumn(sourceColumnId), new QueryColumn(columnId, Function.COUNT))); + logger.debug("Occurences querySelect:" + querySelect.toString()); + queryGroup = new QueryGroup(Arrays.asList(columnId, sourceColumnId)); + logger.debug("Occurences queryGroup:" + queryGroup.toString()); } else { - querySelect = new QuerySelect(Arrays.asList( - new QueryColumn(columnId), new QueryColumn( - columnId, Function.COUNT))); - logger.debug("Occurences querySelect:" - + querySelect.toString()); + querySelect = new QuerySelect( + Arrays.asList(new QueryColumn(columnId), new QueryColumn(columnId, Function.COUNT))); + logger.debug("Occurences querySelect:" + querySelect.toString()); queryGroup = new QueryGroup(Arrays.asList(columnId)); - logger.debug("Occurences queryGroup:" - + queryGroup.toString()); + logger.debug("Occurences queryGroup:" + queryGroup.toString()); } break; } @@ -193,12 +164,10 @@ public class QueryService { QueryOrder queryOrder = null; switch (direction) { case ASC: - queryOrder = new QueryOrder(columnId, - QueryOrderDirection.ASCENDING); + queryOrder = new QueryOrder(columnId, QueryOrderDirection.ASCENDING); break; case DESC: - queryOrder = new QueryOrder(columnId, - QueryOrderDirection.DESCENDING); + queryOrder = new QueryOrder(columnId, QueryOrderDirection.DESCENDING); break; default: break; @@ -209,12 +178,10 @@ public class QueryService { logger.debug("Occurences queryPage all"); QueryFilter queryFilter = null; - if (occurrencesSession.getShowType().compareTo( - ShowOccurrencesType.ONLYERRORS) == 0) { + if (occurrencesSession.getShowType().compareTo(ShowOccurrencesType.ONLYERRORS) == 0) { logger.debug("Filter on error"); if (occurrencesSession.isHasValidationColumns()) { - Expression exp = ExpressionGenerator - .genReplaceBatchOccurrencesFilter(occurrencesSession); + Expression exp = ExpressionGenerator.genReplaceBatchOccurrencesFilter(occurrencesSession); logger.debug("Expression: " + exp); if (exp != null) { queryFilter = new QueryFilter(exp); @@ -229,10 +196,8 @@ public class QueryService { logger.debug("No Filter on error"); } - logger.debug("Query on " + tableId.toString() + " queryPage:" - + queryPage + ", queryFilter:" + queryFilter - + ", querySelect:" + querySelect + ", queryGroup:" - + queryGroup + ", queryOrder:" + queryOrder); + logger.debug("Query on " + tableId.toString() + " queryPage:" + queryPage + ", queryFilter:" + queryFilter + + ", querySelect:" + querySelect + ", queryGroup:" + queryGroup + ", queryOrder:" + queryOrder); if (querySelect != null) { logger.debug("Query Select Columns:" + querySelect.getColumns()); @@ -247,87 +212,58 @@ public class QueryService { if (queryOrder == null) { if (queryFilter == null) { if (queryGroup == null) { - logger.debug("1-QueryAsJson-->tableId:" + tableId - + ", queryPage:" + queryPage + logger.debug("1-QueryAsJson-->tableId:" + tableId + ", queryPage:" + queryPage + ", querySelect:" + querySelect); - serviceJson = service.queryAsJson(tableId, - queryPage, querySelect); + serviceJson = service.queryAsJson(tableId, queryPage, querySelect); } else { - logger.debug("2-QueryAsJson-->tableId:" + tableId - + ", queryPage:" + queryPage - + ", querySelect:" + querySelect - + ", queryGroup:" + queryGroup); - serviceJson = service.queryAsJson(tableId, - queryPage, querySelect, queryGroup); + logger.debug("2-QueryAsJson-->tableId:" + tableId + ", queryPage:" + queryPage + + ", querySelect:" + querySelect + ", queryGroup:" + queryGroup); + serviceJson = service.queryAsJson(tableId, queryPage, querySelect, queryGroup); } } else { if (queryGroup == null) { - logger.debug("3-QueryAsJson-->[tableId:" + tableId - + ", queryPage:" + queryPage - + ", queryFilter:" + queryFilter - + ", querySelect:" + querySelect + "]"); - serviceJson = service.queryAsJson(tableId, - queryPage, queryFilter, querySelect); + logger.debug("3-QueryAsJson-->[tableId:" + tableId + ", queryPage:" + queryPage + + ", queryFilter:" + queryFilter + ", querySelect:" + querySelect + "]"); + serviceJson = service.queryAsJson(tableId, queryPage, queryFilter, querySelect); } else { - logger.debug("4-QueryAsJson-->[tableId:" + tableId - + ", queryPage:" + queryPage - + ", queryFilter:" + queryFilter - + ", querySelect:" + querySelect - + ", queryGroup:" + queryGroup + "]"); - serviceJson = service.queryAsJson(tableId, - queryPage, queryFilter, querySelect, - queryGroup); + logger.debug("4-QueryAsJson-->[tableId:" + tableId + ", queryPage:" + queryPage + + ", queryFilter:" + queryFilter + ", querySelect:" + querySelect + ", queryGroup:" + + queryGroup + "]"); + serviceJson = service.queryAsJson(tableId, queryPage, queryFilter, querySelect, queryGroup); } } } else { if (queryFilter == null) { if (queryGroup == null) { - logger.debug("5-QueryAsJson-->[tableId:" + tableId - + ", queryPage:" + queryPage - + ", queryOrder:" + queryOrder - + ", querySelect:" + querySelect + "]"); - serviceJson = service.queryAsJson(tableId, - queryPage, queryOrder, querySelect); + logger.debug("5-QueryAsJson-->[tableId:" + tableId + ", queryPage:" + queryPage + + ", queryOrder:" + queryOrder + ", querySelect:" + querySelect + "]"); + serviceJson = service.queryAsJson(tableId, queryPage, queryOrder, querySelect); } else { - logger.debug("6-QueryAsJson-->[tableId:" + tableId - + ", queryPage:" + queryPage - + ", queryOrder:" + queryOrder - + ", querySelect:" + querySelect - + ", queryGroup:" + queryGroup + "]"); - serviceJson = service.queryAsJson(tableId, - queryPage, queryOrder, querySelect, - queryGroup); + logger.debug("6-QueryAsJson-->[tableId:" + tableId + ", queryPage:" + queryPage + + ", queryOrder:" + queryOrder + ", querySelect:" + querySelect + ", queryGroup:" + + queryGroup + "]"); + serviceJson = service.queryAsJson(tableId, queryPage, queryOrder, querySelect, queryGroup); } } else { if (queryGroup == null) { - logger.debug("7-QueryAsJson-->[tableId:" + tableId - + ", queryPage:" + queryPage - + ", queryFilter:" + queryFilter - + ", queryOrder:" + queryOrder - + ", querySelect:" + querySelect + "]"); - serviceJson = service.queryAsJson(tableId, - queryPage, queryFilter, queryOrder, - querySelect); + logger.debug("7-QueryAsJson-->[tableId:" + tableId + ", queryPage:" + queryPage + + ", queryFilter:" + queryFilter + ", queryOrder:" + queryOrder + ", querySelect:" + + querySelect + "]"); + serviceJson = service.queryAsJson(tableId, queryPage, queryFilter, queryOrder, querySelect); } else { - logger.debug("8-QueryAsJson-->[tableId:" + tableId - + ", queryPage:" + queryPage - + ", queryFilter:" + queryFilter - + ", queryOrder:" + queryOrder - + ", querySelect:" + querySelect - + ", queryGroup:" + queryGroup + "]"); - serviceJson = service.queryAsJson(tableId, - queryPage, queryFilter, queryOrder, - querySelect, queryGroup); + logger.debug("8-QueryAsJson-->[tableId:" + tableId + ", queryPage:" + queryPage + + ", queryFilter:" + queryFilter + ", queryOrder:" + queryOrder + ", querySelect:" + + querySelect + ", queryGroup:" + queryGroup + "]"); + serviceJson = service.queryAsJson(tableId, queryPage, queryFilter, queryOrder, querySelect, + queryGroup); } } } } catch (Throwable e) { - logger.debug("Error by running the query on the server:" - + e.getLocalizedMessage()); + logger.debug("Error by running the query on the server:" + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException( - "An error occurred while running query on service", e); + throw new TDGWTServiceException("An error occurred while running query on service", e); } logger.debug("Created serviceJson"); @@ -349,14 +285,10 @@ public class QueryService { currentRow = rows.getJSONArray(i); if (conditionCode == null) { if (column.isViewColumn()) { - occurence = new Occurrences( - currentRow.getString(0), - currentRow.getString(1), + occurence = new Occurrences(currentRow.getString(0), currentRow.getString(1), currentRow.getInt(2)); } else { - occurence = new Occurrences( - currentRow.getString(0), - currentRow.getInt(1)); + occurence = new Occurrences(currentRow.getString(0), currentRow.getInt(1)); } } else { switch (conditionCode) { @@ -364,14 +296,10 @@ public class QueryService { break; case AmbiguousValueOnExternalReference: if (column.isViewColumn()) { - occurence = new Occurrences( - currentRow.getString(0), - currentRow.getString(1), + occurence = new Occurrences(currentRow.getString(0), currentRow.getString(1), currentRow.getInt(2)); } else { - occurence = new Occurrences( - currentRow.getString(0), "1", - currentRow.getInt(1)); + occurence = new Occurrences(currentRow.getString(0), "1", currentRow.getInt(1)); } break; case CastValidation: @@ -404,14 +332,10 @@ public class QueryService { case MissingValueOnExternalReference: default: if (column.isViewColumn()) { - occurence = new Occurrences( - currentRow.getString(0), - currentRow.getString(1), + occurence = new Occurrences(currentRow.getString(0), currentRow.getString(1), currentRow.getInt(2)); } else { - occurence = new Occurrences( - currentRow.getString(0), - currentRow.getInt(1)); + occurence = new Occurrences(currentRow.getString(0), currentRow.getInt(1)); } break; @@ -424,19 +348,16 @@ public class QueryService { } catch (JSONException e) { - logger.error("An error occurred while parsing json document\n" - + "At Row " + i + ",Column " + j + "\nRow Content: " - + currentRow + "\nLenght rows " + totalRows, e); + logger.error("An error occurred while parsing json document\n" + "At Row " + i + ",Column " + j + + "\nRow Content: " + currentRow + "\nLenght rows " + totalRows, e); e.printStackTrace(); - throw new TDGWTServiceException( - "An error occurred, while reading json of service", e); + throw new TDGWTServiceException("An error occurred, while reading json of service", e); } logger.debug("Retieved occurences: size " + occurences.size()); return occurences; } catch (Throwable e) { - logger.error("QueryService - error on queryOccurences():" - + e.getLocalizedMessage()); + logger.error("QueryService - error on queryOccurences():" + e.getLocalizedMessage()); e.printStackTrace(); throw new TDGWTServiceException(e.getLocalizedMessage()); } @@ -445,20 +366,22 @@ public class QueryService { /** * Retrieve ColumnLocalId value of IdColumnType - * + * * @param trId + * TR id * @param service - * @return + * Tabular data service + * @return Column local id * @throws TDGWTServiceException + * Exception */ - public static ColumnLocalId retrieveColumnLocalIdOFIdColumnType(TRId trId, - TabularDataService service) throws TDGWTServiceException { + public static ColumnLocalId retrieveColumnLocalIdOFIdColumnType(TRId trId, TabularDataService service) + throws TDGWTServiceException { try { ColumnLocalId columnLocalId = null; Table table; - table = service.getTable(new TableId( - Long.valueOf(trId.getTableId()))); + table = service.getTable(new TableId(Long.valueOf(trId.getTableId()))); List cols = table.getColumns(); for (Column c : cols) { @@ -470,72 +393,58 @@ public class QueryService { return columnLocalId; } catch (NumberFormatException e) { - logger.error("QueryService - retrieveColumnLocalIdOFIdColumn: " - + e.getLocalizedMessage()); + logger.error("QueryService - retrieveColumnLocalIdOFIdColumn: " + e.getLocalizedMessage()); e.printStackTrace(); throw new TDGWTServiceException(e.getLocalizedMessage()); } catch (NoSuchTableException e) { - logger.error("QueryService - retrieveColumnLocalIdOFIdColumn: " - + e.getLocalizedMessage()); + logger.error("QueryService - retrieveColumnLocalIdOFIdColumn: " + e.getLocalizedMessage()); e.printStackTrace(); throw new TDGWTServiceException(e.getLocalizedMessage()); } catch (Throwable e) { - logger.error("QueryService - retrieveColumnLocalIdOFIdColumn: " - + e.getLocalizedMessage()); + logger.error("QueryService - retrieveColumnLocalIdOFIdColumn: " + e.getLocalizedMessage()); e.printStackTrace(); throw new TDGWTServiceException(e.getLocalizedMessage()); } } - public static String retrieveColumnDimensionValue(String rowId, - ColumnData column, TabularDataService service) + public static String retrieveColumnDimensionValue(String rowId, ColumnData column, TabularDataService service) throws TDGWTServiceException { try { - logger.debug("RetriveColumnDimensionValue: [rowId=" + rowId - + ", column=" + column + "]"); + logger.debug("RetriveColumnDimensionValue: [rowId=" + rowId + ", column=" + column + "]"); column.getColumnViewData().getSourceTableDimensionColumnId(); - TableId tableId = new TableId(new Long(column.getTrId() - .getTableId())); + TableId tableId = new TableId(new Long(column.getTrId().getTableId())); ColumnLocalId columnId = new ColumnLocalId(column.getColumnId()); QuerySelect querySelect = null; if (!column.isViewColumn()) { - logger.error("The column selected is not a view column:" - + column); - throw new TDGWTServiceException( - "The column selected is not a view column"); + logger.error("The column selected is not a view column:" + column); + throw new TDGWTServiceException("The column selected is not a view column"); } - ColumnLocalId sourceColumnId = new ColumnLocalId(column - .getColumnViewData().getSourceTableDimensionColumnId()); - querySelect = new QuerySelect(Arrays.asList(new QueryColumn( - columnId), new QueryColumn(sourceColumnId))); + ColumnLocalId sourceColumnId = new ColumnLocalId( + column.getColumnViewData().getSourceTableDimensionColumnId()); + querySelect = new QuerySelect(Arrays.asList(new QueryColumn(columnId), new QueryColumn(sourceColumnId))); logger.debug("QuerySelect:" + querySelect.toString()); QueryPage queryPage = null;// All occurences logger.debug("Occurences queryPage all"); - ColumnLocalId idColumn = retrieveColumnLocalIdOFIdColumnType( - column.getTrId(), service); + ColumnLocalId idColumn = retrieveColumnLocalIdOFIdColumnType(column.getTrId(), service); ColumnReference cr = new ColumnReference(tableId, idColumn); - Equals rowIdEqual = new Equals(cr, new TDInteger( - Integer.parseInt(rowId))); + Equals rowIdEqual = new Equals(cr, new TDInteger(Integer.parseInt(rowId))); QueryFilter queryFilter = new QueryFilter(rowIdEqual); - logger.debug("Query on " + tableId.toString() + " queryPage:" - + queryPage + ", queryFilter:" + queryFilter + logger.debug("Query on " + tableId.toString() + " queryPage:" + queryPage + ", queryFilter:" + queryFilter + ", querySelect:" + querySelect); String serviceJson = null; - logger.debug("3-QueryAsJson-->[tableId:" + tableId + ", queryPage:" - + queryPage + ", queryFilter:" + queryFilter - + ", querySelect:" + querySelect + "]"); - serviceJson = service.queryAsJson(tableId, queryPage, queryFilter, - querySelect); + logger.debug("3-QueryAsJson-->[tableId:" + tableId + ", queryPage:" + queryPage + ", queryFilter:" + + queryFilter + ", querySelect:" + querySelect + "]"); + serviceJson = service.queryAsJson(tableId, queryPage, queryFilter, querySelect); logger.debug("Created serviceJson"); // logger.debug(serviceJson); @@ -558,13 +467,11 @@ public class QueryService { } if (dimensionValue == null) { - logger.error("The column selected has not a dimension with valid value: " - + column + ", dimenensionValue: " + dimensionValue); - throw new TDGWTServiceException( - "The column selected has not a dimension with valid value"); + logger.error("The column selected has not a dimension with valid value: " + column + + ", dimenensionValue: " + dimensionValue); + throw new TDGWTServiceException("The column selected has not a dimension with valid value"); } else { - logger.debug("Retrieved: [ColumnValue:" + colValue - + ", DimensionValue:" + dimensionValue + "]"); + logger.debug("Retrieved: [ColumnValue:" + colValue + ", DimensionValue:" + dimensionValue + "]"); } return dimensionValue; diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TDTypeValueMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TDTypeValueMap.java index 2a49d3d..a577a34 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TDTypeValueMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TDTypeValueMap.java @@ -17,8 +17,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TDTypeValueMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TRTasksManager.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TRTasksManager.java index 1bcba6f..fd9c972 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TRTasksManager.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TRTasksManager.java @@ -7,8 +7,8 @@ import org.gcube.data.analysis.tabulardata.service.operation.Task; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TRTasksManager implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TabularResourceTypeMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TabularResourceTypeMap.java index 5660874..e1cef81 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TabularResourceTypeMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TabularResourceTypeMap.java @@ -7,8 +7,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TabularResourceTypeMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TaskStateMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TaskStateMap.java index 665346c..e522309 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TaskStateMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/TaskStateMap.java @@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.task.State; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TaskStateMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ValueMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ValueMap.java index ea2147d..55692ed 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ValueMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/ValueMap.java @@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ public class ValueMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/WorkerStateMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/WorkerStateMap.java index cbe00ea..dab48db 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/WorkerStateMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/trservice/WorkerStateMap.java @@ -5,8 +5,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.task.WorkerState; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class WorkerStateMap { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/uriresolver/UriResolverTDClient.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/uriresolver/UriResolverTDClient.java index 0dc3d60..0ed23b0 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/uriresolver/UriResolverTDClient.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/uriresolver/UriResolverTDClient.java @@ -14,8 +14,8 @@ import org.slf4j.LoggerFactory; * Client for retrieve link * * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class UriResolverTDClient { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/util/ServiceCredentials.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/util/ServiceCredentials.java index 0497cf0..49989a5 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/util/ServiceCredentials.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/util/ServiceCredentials.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author Giancarlo Panichi email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ServiceCredentials implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/Constants.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/Constants.java index 7bdf8cd..1620294 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/Constants.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/Constants.java @@ -5,8 +5,8 @@ package org.gcube.portlets.user.td.gwtservice.shared; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class Constants { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/chart/ChartSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/chart/ChartSession.java index f5b72d7..1dc4ae3 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/chart/ChartSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/chart/ChartSession.java @@ -12,8 +12,8 @@ import com.google.web.bindery.event.shared.EventBus; /** * Chart Session * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ChartSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/chart/ChartTopRatingSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/chart/ChartTopRatingSession.java index 21bf610..c36485f 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/chart/ChartTopRatingSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/chart/ChartTopRatingSession.java @@ -10,32 +10,24 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ChartTopRatingSession implements Serializable { - + private static final long serialVersionUID = 4988917715929182427L; - + private TRId trId; private ColumnData column; private Integer sampleSize; private String valueOperation; - + public ChartTopRatingSession() { super(); } - - /** - * - * @param trId - * @param column - * @param sampleSize - * @param valueOperation - */ - public ChartTopRatingSession(TRId trId, ColumnData column, - Integer sampleSize, String valueOperation) { + + public ChartTopRatingSession(TRId trId, ColumnData column, Integer sampleSize, String valueOperation) { super(); this.trId = trId; this.column = column; @@ -77,16 +69,8 @@ public class ChartTopRatingSession implements Serializable { @Override public String toString() { - return "ChartTopRatingSession [trId=" + trId + ", column=" + column - + ", sampleSize=" + sampleSize + ", valueOperation=" - + valueOperation + "]"; + return "ChartTopRatingSession [trId=" + trId + ", column=" + column + ", sampleSize=" + sampleSize + + ", valueOperation=" + valueOperation + "]"; } - - - - - - - } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/codelisthelper/CodelistMappingSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/codelisthelper/CodelistMappingSession.java index 55e0e7e..eab5359 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/codelisthelper/CodelistMappingSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/codelisthelper/CodelistMappingSession.java @@ -10,8 +10,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodelistMappingSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/AvailableCharsetList.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/AvailableCharsetList.java index a4766ad..ce23530 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/AvailableCharsetList.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/AvailableCharsetList.java @@ -7,7 +7,8 @@ import java.io.Serializable; import java.util.ArrayList; /** - * @author Federico De Faveri defaveri@isti.cnr.it + * + * @author Giancarlo Panichi * */ public class AvailableCharsetList implements Serializable { @@ -21,27 +22,16 @@ public class AvailableCharsetList implements Serializable { super(); } - /** - * @param charsetList - * @param defaultCharset - */ - public AvailableCharsetList(ArrayList charsetList, - String defaultCharset) { + public AvailableCharsetList(ArrayList charsetList, String defaultCharset) { super(); this.charsetList = charsetList; this.defaultCharset = defaultCharset; } - /** - * @return the charsetList - */ public ArrayList getCharsetList() { return charsetList; } - /** - * @return the defaultCharset - */ public String getDefaultCharset() { return defaultCharset; } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVExportSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVExportSession.java index b68046d..52e2fa3 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVExportSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVExportSession.java @@ -12,8 +12,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CSVExportSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVFileUtil.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVFileUtil.java index ec8e364..4316526 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVFileUtil.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVFileUtil.java @@ -32,8 +32,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CSVFileUtil { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVImportSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVImportSession.java index fda1c2c..22c078d 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVImportSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVImportSession.java @@ -11,8 +11,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CSVImportSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVImportState.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVImportState.java index 18e8ac4..1a7155b 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVImportState.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVImportState.java @@ -5,8 +5,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.csv; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum CSVImportState { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVParserConfiguration.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVParserConfiguration.java index 7d91f3d..87e0031 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVParserConfiguration.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVParserConfiguration.java @@ -8,16 +8,14 @@ import java.nio.charset.Charset; import org.gcube.portlets.user.td.gwtservice.shared.file.HeaderPresence; - - /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ -public class CSVParserConfiguration implements Serializable{ - +public class CSVParserConfiguration implements Serializable { + /** * */ @@ -26,17 +24,11 @@ public class CSVParserConfiguration implements Serializable{ private char delimiter; private char comment; private HeaderPresence headerPresence; - + public CSVParserConfiguration() { super(); } - - /** - * @param charset - * @param delimiter - * @param comment - * @param hasHeader - */ + public CSVParserConfiguration(Charset charset, char delimiter, char comment, HeaderPresence headerPresence) { super(); this.charset = charset; @@ -52,37 +44,22 @@ public class CSVParserConfiguration implements Serializable{ this.headerPresence = headerPresence; } - /** - * @return the charset - */ public Charset getCharset() { return charset; } - /** - * @return the delimiter - */ public char getDelimiter() { return delimiter; } - /** - * @return the comment - */ public char getComment() { return comment; } - /** - * @return the headerPresence - */ public HeaderPresence getHeaderPresence() { return headerPresence; } - /** - * {@inheritDoc} - */ @Override public String toString() { StringBuilder builder = new StringBuilder(); diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVRowError.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVRowError.java index 64fdeb2..4927dfa 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVRowError.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CSVRowError.java @@ -5,31 +5,34 @@ package org.gcube.portlets.user.td.gwtservice.shared.csv; import java.io.Serializable; - /** * Errors for row * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CSVRowError implements Serializable { - + private static final long serialVersionUID = 4680781887858741657L; - + private static int seed; - + private int id; private int lineNumber; private String lineValue; private String errorDescription; - - public CSVRowError(){} - + + public CSVRowError() { + } + /** - * @param lineNumber the row number. - * @param lineValue the line value. - * @param errorDescription the error description. + * @param lineNumber + * the row number. + * @param lineValue + * the line value. + * @param errorDescription + * the error description. */ public CSVRowError(int lineNumber, String lineValue, String errorDescription) { this.id = seed++; diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CheckCSVSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CheckCSVSession.java index 0e56c2a..8808656 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CheckCSVSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/csv/CheckCSVSession.java @@ -5,8 +5,8 @@ import java.util.ArrayList; /** * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CheckCSVSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/document/CodelistDocument.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/document/CodelistDocument.java index 5c1c7e5..1b895ed 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/document/CodelistDocument.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/document/CodelistDocument.java @@ -3,8 +3,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.document; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodelistDocument implements SDMXDocument { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/document/DatasetDocument.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/document/DatasetDocument.java index ae1415c..4ba3adf 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/document/DatasetDocument.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/document/DatasetDocument.java @@ -3,8 +3,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.document; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class DatasetDocument implements SDMXDocument { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/document/SDMXDocument.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/document/SDMXDocument.java index 9bc863e..beaf51f 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/document/SDMXDocument.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/document/SDMXDocument.java @@ -10,8 +10,8 @@ import java.io.Serializable; /** * SDMX document type interface. All SDMX document type have to implement this interface. - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface SDMXDocument extends Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTIsFinalException.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTIsFinalException.java index 8ba24c8..2fed9cd 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTIsFinalException.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTIsFinalException.java @@ -3,14 +3,13 @@ package org.gcube.portlets.user.td.gwtservice.shared.exception; /** * ASL Session Expired Exception * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ -public class TDGWTIsFinalException extends TDGWTServiceException { +public class TDGWTIsFinalException extends TDGWTServiceException { - private static final long serialVersionUID = 4306091799912937920L; - + /** * */ @@ -20,18 +19,21 @@ public class TDGWTIsFinalException extends TDGWTServiceException { /** * @param message + * Message */ public TDGWTIsFinalException(String message) { super(message); } - + /** * * @param message - * @param t + * Message + * @param throwable + * Error */ - public TDGWTIsFinalException(String message,Throwable t) { - super(message,t); + public TDGWTIsFinalException(String message, Throwable throwable) { + super(message, throwable); } - + } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTIsFlowException.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTIsFlowException.java index 6a37aaf..0dcfd6e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTIsFlowException.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTIsFlowException.java @@ -3,14 +3,13 @@ package org.gcube.portlets.user.td.gwtservice.shared.exception; /** * ASL Session Expired Exception * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ -public class TDGWTIsFlowException extends TDGWTServiceException { +public class TDGWTIsFlowException extends TDGWTServiceException { - private static final long serialVersionUID = 4306091799912937920L; - + /** * */ @@ -20,18 +19,21 @@ public class TDGWTIsFlowException extends TDGWTServiceException { /** * @param message + * Message */ public TDGWTIsFlowException(String message) { super(message); } - + /** * * @param message - * @param t + * Message + * @param throwable + * Error */ - public TDGWTIsFlowException(String message,Throwable t) { - super(message,t); + public TDGWTIsFlowException(String message, Throwable throwable) { + super(message, throwable); } - + } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTIsLockedException.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTIsLockedException.java index 141abee..0b1f5e5 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTIsLockedException.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTIsLockedException.java @@ -3,14 +3,13 @@ package org.gcube.portlets.user.td.gwtservice.shared.exception; /** * ASL Session Expired Exception * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ -public class TDGWTIsLockedException extends TDGWTServiceException { +public class TDGWTIsLockedException extends TDGWTServiceException { - private static final long serialVersionUID = 4306091799912937920L; - + /** * */ @@ -20,18 +19,21 @@ public class TDGWTIsLockedException extends TDGWTServiceException { /** * @param message + * Message */ public TDGWTIsLockedException(String message) { super(message); } - + /** * * @param message - * @param t + * Message + * @param throwable + * Error */ - public TDGWTIsLockedException(String message,Throwable t) { - super(message,t); + public TDGWTIsLockedException(String message, Throwable throwable) { + super(message, throwable); } - + } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTServiceException.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTServiceException.java index 28d7782..0908f12 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTServiceException.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTServiceException.java @@ -5,8 +5,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.exception; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TDGWTServiceException extends Exception { @@ -22,15 +22,21 @@ public class TDGWTServiceException extends Exception { /** * @param message + * Message */ public TDGWTServiceException(String message) { super(message); } - - - public TDGWTServiceException(String message,Throwable t) { - super(message,t); + + /** + * + * @param message + * Message + * @param throwable + * Error + */ + public TDGWTServiceException(String message, Throwable throwable) { + super(message, throwable); } - } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTSessionExpiredException.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTSessionExpiredException.java index b55a821..ddf6ff5 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTSessionExpiredException.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/exception/TDGWTSessionExpiredException.java @@ -3,14 +3,13 @@ package org.gcube.portlets.user.td.gwtservice.shared.exception; /** * ASL Session Expired Exception * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ -public class TDGWTSessionExpiredException extends TDGWTServiceException { +public class TDGWTSessionExpiredException extends TDGWTServiceException { - private static final long serialVersionUID = 4306091799912937920L; - + /** * */ @@ -20,18 +19,21 @@ public class TDGWTSessionExpiredException extends TDGWTServiceException { /** * @param message + * Message */ public TDGWTSessionExpiredException(String message) { super(message); } - + /** * * @param message - * @param t + * Message + * @param throwable + * Error */ - public TDGWTSessionExpiredException(String message,Throwable t) { - super(message,t); + public TDGWTSessionExpiredException(String message, Throwable throwable) { + super(message, throwable); } - + } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/extract/ExtractCodelistSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/extract/ExtractCodelistSession.java index 3f36028..422a302 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/extract/ExtractCodelistSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/extract/ExtractCodelistSession.java @@ -12,8 +12,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ExtractCodelistSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/extract/ExtractCodelistTargetColumn.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/extract/ExtractCodelistTargetColumn.java index 875871c..7508dfb 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/extract/ExtractCodelistTargetColumn.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/extract/ExtractCodelistTargetColumn.java @@ -8,7 +8,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnMockU /** * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ public class ExtractCodelistTargetColumn implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/file/FileUploadMonitor.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/file/FileUploadMonitor.java index f7662fc..75640af 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/file/FileUploadMonitor.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/file/FileUploadMonitor.java @@ -7,8 +7,8 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class FileUploadMonitor implements Serializable { @@ -34,16 +34,11 @@ public class FileUploadMonitor implements Serializable { this.percentDone=0; } - /** - * @return the totalLenght - */ + public long getTotalLenght() { return totalLenght; } - /** - * @return the elaboratedLenght - */ public long getElaboratedLenght() { return elaboratedLenght; } @@ -53,9 +48,6 @@ public class FileUploadMonitor implements Serializable { return state; } - /** - * @return the failureDetails - */ public String getFailureDetails() { return failureDetails; } @@ -81,30 +73,18 @@ public class FileUploadMonitor implements Serializable { this.state = state; } - /** - * @return the reason - */ public String getFailureReason() { return failureReason; } - /** - * @param totalLenght the totalLenght to set - */ public void setTotalLenght(long totalLenght) { this.totalLenght = totalLenght; } - /** - * @param elaboratedLenght the elaboratedLenght to set - */ public void setElaboratedLenght(long elaboratedLenght) { this.elaboratedLenght = elaboratedLenght; } - /** - * @param failed the failed to set - */ public void setFailed(String failureReason, String failureDetails) { this.state = FileUploadState.FAILED; this.failureReason = failureReason; diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/file/FileUploadState.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/file/FileUploadState.java index 024973b..bcb26ad 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/file/FileUploadState.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/file/FileUploadState.java @@ -4,7 +4,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.file; /** - * @author Federico De Faveri defaveri@isti.cnr.it + * + * @author Giancarlo Panichi * */ public enum FileUploadState { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/file/HeaderPresence.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/file/HeaderPresence.java index bd72dbc..67edffc 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/file/HeaderPresence.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/file/HeaderPresence.java @@ -5,8 +5,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.file; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum HeaderPresence { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/function/aggregate/TdAggregateFunction.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/function/aggregate/TdAggregateFunction.java index 5a9f5d5..998536c 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/function/aggregate/TdAggregateFunction.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/function/aggregate/TdAggregateFunction.java @@ -1,29 +1,18 @@ package org.gcube.portlets.user.td.gwtservice.shared.function.aggregate; - /** * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TdAggregateFunction extends TdBaseComboDataBean { - /** - * - */ private static final long serialVersionUID = 2341132987652197369L; - /** - * - */ public TdAggregateFunction() { } - /** - * @param id - * @param label - */ public TdAggregateFunction(String id, String label) { super(id, label); } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/function/aggregate/TdBaseComboDataBean.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/function/aggregate/TdBaseComboDataBean.java index 9319417..a1a4d35 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/function/aggregate/TdBaseComboDataBean.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/function/aggregate/TdBaseComboDataBean.java @@ -4,30 +4,20 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TdBaseComboDataBean implements Serializable { - /** - * - */ private static final long serialVersionUID = 5022327067102919324L; private String id; private String label; - /** - * - */ public TdBaseComboDataBean() { } - /** - * @param id - * @param label - */ public TdBaseComboDataBean(String id, String label) { this.id = id; this.label = label; diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/geometry/GeometryCreatePointSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/geometry/GeometryCreatePointSession.java index 2b94260..3a28cc6 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/geometry/GeometryCreatePointSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/geometry/GeometryCreatePointSession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class GeometryCreatePointSession implements Serializable { @@ -22,15 +22,7 @@ public class GeometryCreatePointSession implements Serializable { public GeometryCreatePointSession() { } - /** - * - * @param trId - * @param latitude - * @param longitude - * @param columnLabel - */ - public GeometryCreatePointSession(TRId trId, ColumnData latitude, - ColumnData longitude, String columnLabel) { + public GeometryCreatePointSession(TRId trId, ColumnData latitude, ColumnData longitude, String columnLabel) { super(); this.trId = trId; this.latitude = latitude; @@ -72,9 +64,8 @@ public class GeometryCreatePointSession implements Serializable { @Override public String toString() { - return "GeometryCreatePointSession [trId=" + trId + ", latitude=" - + latitude + ", longitude=" + longitude + ", columnLabel=" - + columnLabel + "]"; + return "GeometryCreatePointSession [trId=" + trId + ", latitude=" + latitude + ", longitude=" + longitude + + ", columnLabel=" + columnLabel + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/geospatial/GeospatialCreateCoordinatesSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/geospatial/GeospatialCreateCoordinatesSession.java index d59e420..aaa9b61 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/geospatial/GeospatialCreateCoordinatesSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/geospatial/GeospatialCreateCoordinatesSession.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class GeospatialCreateCoordinatesSession implements Serializable { @@ -26,22 +26,8 @@ public class GeospatialCreateCoordinatesSession implements Serializable { public GeospatialCreateCoordinatesSession() { } - /** - * - * @param trId - * @param latitude - * @param longitude - * @param type - * @param hasQuadrant - * TODO - * @param quadrant - * TODO - * @param resolution - * TODO - */ - public GeospatialCreateCoordinatesSession(TRId trId, ColumnData latitude, - ColumnData longitude, GeospatialCoordinatesType type, - boolean hasQuadrant, ColumnData quadrant, Double resolution) { + public GeospatialCreateCoordinatesSession(TRId trId, ColumnData latitude, ColumnData longitude, + GeospatialCoordinatesType type, boolean hasQuadrant, ColumnData quadrant, Double resolution) { super(); this.trId = trId; this.latitude = latitude; @@ -110,10 +96,9 @@ public class GeospatialCreateCoordinatesSession implements Serializable { @Override public String toString() { - return "GeospatialCreateCoordinatesSession [trId=" + trId - + ", latitude=" + latitude + ", longitude=" + longitude - + ", type=" + type + ", hasQuadrant=" + hasQuadrant - + ", quadrant=" + quadrant + ", resolution=" + resolution + "]"; + return "GeospatialCreateCoordinatesSession [trId=" + trId + ", latitude=" + latitude + ", longitude=" + + longitude + ", type=" + type + ", hasQuadrant=" + hasQuadrant + ", quadrant=" + quadrant + + ", resolution=" + resolution + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/geospatial/GeospatialDownscaleCSquareSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/geospatial/GeospatialDownscaleCSquareSession.java index 401b268..6806675 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/geospatial/GeospatialDownscaleCSquareSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/geospatial/GeospatialDownscaleCSquareSession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class GeospatialDownscaleCSquareSession implements Serializable { @@ -20,24 +20,14 @@ public class GeospatialDownscaleCSquareSession implements Serializable { public GeospatialDownscaleCSquareSession() { } - - - /** - * - * @param trId - * @param csquareColumn - * @param type - */ - public GeospatialDownscaleCSquareSession(TRId trId, - ColumnData csquareColumn, String resolution) { + + public GeospatialDownscaleCSquareSession(TRId trId, ColumnData csquareColumn, String resolution) { super(); this.trId = trId; this.csquareColumn = csquareColumn; this.resolution = resolution; } - - public TRId getTrId() { return trId; } @@ -54,25 +44,18 @@ public class GeospatialDownscaleCSquareSession implements Serializable { this.csquareColumn = csquareColumn; } - public String getResolution() { return resolution; } - public void setResolution(String resolution) { this.resolution = resolution; } - @Override public String toString() { - return "GeospatialDownscaleCSquareSession [trId=" + trId - + ", csquareColumn=" + csquareColumn + ", resolution=" + return "GeospatialDownscaleCSquareSession [trId=" + trId + ", csquareColumn=" + csquareColumn + ", resolution=" + resolution + "]"; } - - - } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/history/OpHistory.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/history/OpHistory.java index d6f5b15..3bb87f6 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/history/OpHistory.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/history/OpHistory.java @@ -5,7 +5,7 @@ import java.io.Serializable; /** * History step * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ public class OpHistory implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/history/RollBackSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/history/RollBackSession.java index b161afa..66a1f92 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/history/RollBackSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/history/RollBackSession.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class RollBackSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/i18n/InfoLocale.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/i18n/InfoLocale.java index 392a14b..887f6e4 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/i18n/InfoLocale.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/i18n/InfoLocale.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InfoLocale implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/json/JSONExportSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/json/JSONExportSession.java index 90e2db6..1bbb13a 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/json/JSONExportSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/json/JSONExportSession.java @@ -12,8 +12,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class JSONExportSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/licenses/LicenceData.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/licenses/LicenceData.java index a929f3f..4794074 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/licenses/LicenceData.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/licenses/LicenceData.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class LicenceData implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/map/MapCreationSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/map/MapCreationSession.java index ca0a1fd..f940c66 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/map/MapCreationSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/map/MapCreationSession.java @@ -11,8 +11,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class MapCreationSession implements Serializable { @@ -37,31 +37,11 @@ public class MapCreationSession implements Serializable { public MapCreationSession() { super(); } - - /** - * - * @param trId - * @param columns - * @param existsGeometryColumn - * @param countGeometryColumns - * @param geometryColumns - * @param name - * @param feature - * @param useView - * @param geometry - * @param username - * @param metaAbstract - * @param metaPurpose - * @param metaCredits - * @param metaKeywords - */ - public MapCreationSession(TRId trId, ArrayList columns, - boolean existsGeometryColumn, int countGeometryColumns, - ArrayList geometryColumns, String name, - ArrayList feature, boolean useView, - ColumnData geometry, String username, String metaAbstract, - String metaPurpose, String metaCredits, - ArrayList metaKeywords) { + + public MapCreationSession(TRId trId, ArrayList columns, boolean existsGeometryColumn, + int countGeometryColumns, ArrayList geometryColumns, String name, ArrayList feature, + boolean useView, ColumnData geometry, String username, String metaAbstract, String metaPurpose, + String metaCredits, ArrayList metaKeywords) { super(); this.trId = trId; this.columns = columns; @@ -193,15 +173,11 @@ public class MapCreationSession implements Serializable { @Override public String toString() { - return "MapCreationSession [trId=" + trId + ", columns=" + columns - + ", existsGeometryColumn=" + existsGeometryColumn - + ", countGeometryColumns=" + countGeometryColumns - + ", geometryColumns=" + geometryColumns + ", name=" + name - + ", feature=" + feature + ", useView=" + useView - + ", geometry=" + geometry + ", username=" + username - + ", metaAbstract=" + metaAbstract + ", metaPurpose=" - + metaPurpose + ", metaCredits=" + metaCredits - + ", metaKeywords=" + metaKeywords + "]"; + return "MapCreationSession [trId=" + trId + ", columns=" + columns + ", existsGeometryColumn=" + + existsGeometryColumn + ", countGeometryColumns=" + countGeometryColumns + ", geometryColumns=" + + geometryColumns + ", name=" + name + ", feature=" + feature + ", useView=" + useView + ", geometry=" + + geometry + ", username=" + username + ", metaAbstract=" + metaAbstract + ", metaPurpose=" + + metaPurpose + ", metaCredits=" + metaCredits + ", metaKeywords=" + metaKeywords + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/BackgroundOperationMonitor.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/BackgroundOperationMonitor.java index 1ce92b0..e41c54a 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/BackgroundOperationMonitor.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/BackgroundOperationMonitor.java @@ -12,8 +12,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.operations.UIOperatio /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class BackgroundOperationMonitor implements Serializable { @@ -34,37 +34,14 @@ public class BackgroundOperationMonitor implements Serializable { private TRId trId; private String tabularResourceId; private String tabularResourceName; - - - - + public BackgroundOperationMonitor() { super(); } - - /** - * - * @param taskId - * @param progress - * @param state - * @param errorCause - * @param submitter - * @param startTime - * @param endTime - * @param inBackground - * @param abort - * @param hidden - * @param operationId - * @param trId - * @param tabularResourceId - * @param tabularResourceName - */ - public BackgroundOperationMonitor(String taskId, float progress, - State state, Throwable errorCause, String submitter, - Date startTime, Date endTime, boolean inBackground, boolean abort, - boolean hidden, UIOperationsId operationId, TRId trId, - String tabularResourceId, String tabularResourceName) { + public BackgroundOperationMonitor(String taskId, float progress, State state, Throwable errorCause, + String submitter, Date startTime, Date endTime, boolean inBackground, boolean abort, boolean hidden, + UIOperationsId operationId, TRId trId, String tabularResourceId, String tabularResourceName) { super(); this.taskId = taskId; this.progress = progress; @@ -82,8 +59,6 @@ public class BackgroundOperationMonitor implements Serializable { this.tabularResourceName = tabularResourceName; } - - public UIOperationsId getOperationId() { return operationId; } @@ -123,8 +98,7 @@ public class BackgroundOperationMonitor implements Serializable { public void setTrId(TRId trId) { this.trId = trId; } - - + public boolean isHidden() { return hidden; } @@ -132,7 +106,7 @@ public class BackgroundOperationMonitor implements Serializable { public void setHidden(boolean hidden) { this.hidden = hidden; } - + public String getTabularResourceName() { return tabularResourceName; } @@ -197,22 +171,13 @@ public class BackgroundOperationMonitor implements Serializable { this.tabularResourceId = tabularResourceId; } - @Override public String toString() { - return "BackgroundOperationMonitor [taskId=" + taskId + ", progress=" - + progress + ", state=" + state + ", errorCause=" + errorCause - + ", submitter=" + submitter + ", startTime=" + startTime - + ", endTime=" + endTime + ", inBackground=" + inBackground - + ", abort=" + abort + ", hidden=" + hidden + ", operationId=" - + operationId + ", trId=" + trId + ", tabularResourceId=" - + tabularResourceId + ", tabularResourceName=" - + tabularResourceName + "]"; + return "BackgroundOperationMonitor [taskId=" + taskId + ", progress=" + progress + ", state=" + state + + ", errorCause=" + errorCause + ", submitter=" + submitter + ", startTime=" + startTime + ", endTime=" + + endTime + ", inBackground=" + inBackground + ", abort=" + abort + ", hidden=" + hidden + + ", operationId=" + operationId + ", trId=" + trId + ", tabularResourceId=" + tabularResourceId + + ", tabularResourceName=" + tabularResourceName + "]"; } - - - - - } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/BackgroundOperationMonitorCreator.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/BackgroundOperationMonitorCreator.java index 1b93323..0ae774a 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/BackgroundOperationMonitorCreator.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/BackgroundOperationMonitorCreator.java @@ -42,15 +42,14 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class BackgroundOperationMonitorCreator { private static final String SECURITY_EXCEPTION_RIGHTS = "Security exception, you don't have the required rights!"; - private static Logger logger = LoggerFactory - .getLogger(BackgroundOperationMonitorCreator.class); + private static Logger logger = LoggerFactory.getLogger(BackgroundOperationMonitorCreator.class); // private static SimpleDateFormat sdf = new SimpleDateFormat( // "yyyy-MM-dd HH:mm"); @@ -63,43 +62,26 @@ public class BackgroundOperationMonitorCreator { private TaskWrapper taskWrapper; private OperationMonitorSession operationMonitorSession; - /** - * - * @param task - * @param startTRId - * @param operationMonitorSession - */ - public BackgroundOperationMonitorCreator(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TaskWrapper taskWrapper, - OperationMonitorSession operationMonitorSession) { + public BackgroundOperationMonitorCreator(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TaskWrapper taskWrapper, OperationMonitorSession operationMonitorSession) { this.httpRequest = httpRequest; this.serviceCredentials = serviceCredentials; this.taskWrapper = taskWrapper; this.operationMonitorSession = operationMonitorSession; - logger.debug("BackgroundOperationMonitorCreator: " + taskWrapper + " " - + operationMonitorSession); + logger.debug("BackgroundOperationMonitorCreator: " + taskWrapper + " " + operationMonitorSession); } - /** - * - * @return - * @throws TDGWTServiceException - */ public OperationMonitor create() throws TDGWTServiceException { - OperationMonitor operationMonitor = new OperationMonitor( - operationMonitorSession.getTaskId(), + OperationMonitor operationMonitor = new OperationMonitor(operationMonitorSession.getTaskId(), taskWrapper.getOperationId()); - if (taskWrapper == null || taskWrapper.getTask() == null - || taskWrapper.getTask().getId() == null + if (taskWrapper == null || taskWrapper.getTask() == null || taskWrapper.getTask().getId() == null || taskWrapper.getTask().getId().getValue() == null || taskWrapper.getTask().getId().getValue().isEmpty()) { logger.debug("Task is null"); - throw new TDGWTServiceException( - "Error in Operation Monitor task is null"); + throw new TDGWTServiceException("Error in Operation Monitor task is null"); } else { - operationMonitor - .setTaskId(taskWrapper.getTask().getId().getValue()); + operationMonitor.setTaskId(taskWrapper.getTask().getId().getValue()); if (operationMonitorSession.isAbort()) { Task task = taskWrapper.getTask(); @@ -108,41 +90,34 @@ public class BackgroundOperationMonitorCreator { // taskS.setState(State.ABORTED); operationMonitor.setTask(taskS); // operationMonitor.setAbort(true); - SessionUtil.setTaskInBackground(httpRequest, - serviceCredentials, taskWrapper); + SessionUtil.setTaskInBackground(httpRequest, serviceCredentials, taskWrapper); postOperation(operationMonitor); } else { if (operationMonitorSession.isHidden()) { TaskS taskS = createTaskS(); operationMonitor.setTask(taskS); operationMonitor.setHidden(true); - SessionUtil.removeTaskInBackground(httpRequest, - serviceCredentials, taskWrapper); - SessionUtil.setHiddenTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.removeTaskInBackground(httpRequest, serviceCredentials, taskWrapper); + SessionUtil.setHiddenTask(httpRequest, serviceCredentials, taskWrapper); postOperation(operationMonitor); } else { if (!operationMonitorSession.isInBackground()) { TaskS taskS = createTaskS(); operationMonitor.setTask(taskS); operationMonitor.setInBackground(false); - SessionUtil.removeTaskInBackground(httpRequest, - serviceCredentials, taskWrapper); - SessionUtil.setStartedTask(httpRequest, - serviceCredentials, taskWrapper); + SessionUtil.removeTaskInBackground(httpRequest, serviceCredentials, taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); postOperation(operationMonitor); } else { TaskStatus status = taskWrapper.getTask().getStatus(); if (status == null) { logger.debug("Services TaskStatus : null"); - throw new TDGWTServiceException( - "Error in OperationMonitor Status is null"); + throw new TDGWTServiceException("Error in OperationMonitor Status is null"); } else { TaskS taskS = createTaskS(); operationMonitor.setTask(taskS); } - SessionUtil.setTaskInBackground(httpRequest, - serviceCredentials, taskWrapper); + SessionUtil.setTaskInBackground(httpRequest, serviceCredentials, taskWrapper); postOperation(operationMonitor); } } @@ -163,22 +138,17 @@ public class BackgroundOperationMonitorCreator { ArrayList validationsJobS = new ArrayList(); int j = 1; for (ValidationJob valJob : job.getValidationJobs()) { - ValidationsJobS validationJ = new ValidationsJobS( - String.valueOf(j), WorkerStateMap.map(valJob - .getStatus()), valJob.getProgress(), - valJob.getDescription(), valJob.getErrorMessage(), - valJob.getHumaReadableStatus()); + ValidationsJobS validationJ = new ValidationsJobS(String.valueOf(j), + WorkerStateMap.map(valJob.getStatus()), valJob.getProgress(), valJob.getDescription(), + valJob.getErrorMessage(), valJob.getHumaReadableStatus()); validationsJobS.add(validationJ); j++; } - JobSClassifier jobClassifier = JobClassifierMap.map(job - .getJobClassifier()); + JobSClassifier jobClassifier = JobClassifierMap.map(job.getJobClassifier()); - JobS jobS = new JobS(String.valueOf(i), job.getProgress(), - job.getHumaReadableStatus(), jobClassifier, - job.getDescription(), WorkerStateMap.map(job.getStatus()), - job.getErrorMessage(), validationsJobS); + JobS jobS = new JobS(String.valueOf(i), job.getProgress(), job.getHumaReadableStatus(), jobClassifier, + job.getDescription(), WorkerStateMap.map(job.getStatus()), job.getErrorMessage(), validationsJobS); jobSList.add(jobS); i++; @@ -200,31 +170,23 @@ public class BackgroundOperationMonitorCreator { } - taskS = new TaskS(taskWrapper.getTask().getId().getValue(), - taskWrapper.getTask().getProgress(), - TaskStateMap.map(taskWrapper.getTask().getStatus()), - taskWrapper.getTask().getErrorCause(), taskWrapper - .getTask().getSubmitter(), taskWrapper.getTask() - .getStartTime(), - taskWrapper.getTask().getEndTime(), jobSList, - collateralTRIds, String.valueOf(taskWrapper.getTask() - .getTabularResourceId().getValue())); + taskS = new TaskS(taskWrapper.getTask().getId().getValue(), taskWrapper.getTask().getProgress(), + TaskStateMap.map(taskWrapper.getTask().getStatus()), taskWrapper.getTask().getErrorCause(), + taskWrapper.getTask().getSubmitter(), taskWrapper.getTask().getStartTime(), + taskWrapper.getTask().getEndTime(), jobSList, collateralTRIds, + String.valueOf(taskWrapper.getTask().getTabularResourceId().getValue())); } catch (Throwable e) { - logger.error("error retrieving information about the task, " - + e.getLocalizedMessage()); + logger.error("error retrieving information about the task, " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException( - "error retrieving information about the task, " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("error retrieving information about the task, " + e.getLocalizedMessage()); } logger.debug("Retrieved task information"); return taskS; } - protected void postOperation(OperationMonitor operationMonitor) - throws TDGWTServiceException { + protected void postOperation(OperationMonitor operationMonitor) throws TDGWTServiceException { retrieveNameOfTabularResourceOnWhicWasLaunchedTheTask(operationMonitor); @@ -235,8 +197,7 @@ public class BackgroundOperationMonitorCreator { logger.error("Task Exception: task is failed"); } else { - logger.error("Task exception: " - + errorCause.getLocalizedMessage()); + logger.error("Task exception: " + errorCause.getLocalizedMessage()); errorCause.printStackTrace(); } break; @@ -252,10 +213,8 @@ public class BackgroundOperationMonitorCreator { break; case ABORTED: operationMonitor.setAbort(true); - SessionUtil.removeTaskInBackground(httpRequest, serviceCredentials, - taskWrapper); - SessionUtil.setAbortedTasks(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.removeTaskInBackground(httpRequest, serviceCredentials, taskWrapper); + SessionUtil.setAbortedTasks(httpRequest, serviceCredentials, taskWrapper); break; case STOPPED: logger.debug("Task Result:" + taskWrapper.getTask().getResult()); @@ -269,8 +228,7 @@ public class BackgroundOperationMonitorCreator { } - protected void updateInformations(OperationMonitor operationMonitor) - throws TDGWTServiceException { + protected void updateInformations(OperationMonitor operationMonitor) throws TDGWTServiceException { TRId trId; // TabResource tabResource; Table table; @@ -283,8 +241,7 @@ public class BackgroundOperationMonitorCreator { exportMetadata = table.getMetadata(ExportMetadata.class); logger.debug("ExportMetadata: " + exportMetadata); - operationMonitor.setTrId(SessionUtil.getTRId(httpRequest, - serviceCredentials)); + operationMonitor.setTrId(SessionUtil.getTRId(httpRequest, serviceCredentials)); /* * TabExportMetadata trExportMetadata; trExportMetadata = new @@ -303,8 +260,7 @@ public class BackgroundOperationMonitorCreator { logger.debug("Table retrived: " + table.toString()); // exportMetadata = table.getMetadata(ExportMetadata.class); // logger.debug("ExportMetadata: " + exportMetadata); - operationMonitor.setTrId(SessionUtil.getTRId(httpRequest, - serviceCredentials)); + operationMonitor.setTrId(SessionUtil.getTRId(httpRequest, serviceCredentials)); break; case JSONExport: table = taskWrapper.getTask().getResult().getPrimaryTable(); @@ -312,8 +268,7 @@ public class BackgroundOperationMonitorCreator { exportMetadata = table.getMetadata(ExportMetadata.class); logger.debug("ExportMetadata: " + exportMetadata); - operationMonitor.setTrId(SessionUtil.getTRId(httpRequest, - serviceCredentials)); + operationMonitor.setTrId(SessionUtil.getTRId(httpRequest, serviceCredentials)); /* * trExportMetadata = new TabExportMetadata(); @@ -339,12 +294,10 @@ public class BackgroundOperationMonitorCreator { } - protected TRId retrieveTabularResourceBasicData(TRId trId) - throws TDGWTServiceException { + protected TRId retrieveTabularResourceBasicData(TRId trId) throws TDGWTServiceException { try { TabularDataService service = TabularDataServiceFactory.getService(); - TabularResourceId tabularResourceId = new TabularResourceId( - new Long(trId.getId())); + TabularResourceId tabularResourceId = new TabularResourceId(new Long(trId.getId())); TabularResource tr = service.getTabularResource(tabularResourceId); Table table = service.getLastTable(tabularResourceId); @@ -352,11 +305,9 @@ public class BackgroundOperationMonitorCreator { Table viewTable = null; if (table.contains(DatasetViewTableMetadata.class)) { - DatasetViewTableMetadata dwm = table - .getMetadata(DatasetViewTableMetadata.class); + DatasetViewTableMetadata dwm = table.getMetadata(DatasetViewTableMetadata.class); try { - viewTable = service.getTable(dwm - .getTargetDatasetViewTableId()); + viewTable = service.getTable(dwm.getTargetDatasetViewTableId()); } catch (Exception e) { logger.error("view table not found"); } @@ -364,20 +315,15 @@ public class BackgroundOperationMonitorCreator { TRId newTRId; if (viewTable == null) { - newTRId = new TRId( - String.valueOf(tr.getId().getValue()), - TabularResourceTypeMap.map(tr.getTabularResourceType()), - tr.getTableType(), String.valueOf(table.getId() - .getValue()), table.getTableType().getName()); + newTRId = new TRId(String.valueOf(tr.getId().getValue()), + TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), + String.valueOf(table.getId().getValue()), table.getTableType().getName()); } else { - newTRId = new TRId( - String.valueOf(tr.getId().getValue()), - TabularResourceTypeMap.map(tr.getTabularResourceType()), - tr.getTableType(), String.valueOf(viewTable.getId() - .getValue()), viewTable.getTableType() - .getName(), String.valueOf(table.getId() - .getValue()), true); + newTRId = new TRId(String.valueOf(tr.getId().getValue()), + TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), + String.valueOf(viewTable.getId().getValue()), viewTable.getTableType().getName(), + String.valueOf(table.getId().getValue()), true); } @@ -389,24 +335,20 @@ public class BackgroundOperationMonitorCreator { throw new TDGWTServiceException(SECURITY_EXCEPTION_RIGHTS); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error on Service: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error on Service: " + e.getLocalizedMessage()); } } /** * Save export data on Workspace - * - * @param httpRequest - * @param user + * * @param exportMetadata - * @param exportSession + * Export Metadata * @throws TDGWTServiceException + * Exception */ - protected void saveCSVExportInDestination(ExportMetadata exportMetadata) - throws TDGWTServiceException { - CSVExportSession exportSession = SessionUtil.getCSVExportSession( - httpRequest, serviceCredentials); + protected void saveCSVExportInDestination(ExportMetadata exportMetadata) throws TDGWTServiceException { + CSVExportSession exportSession = SessionUtil.getCSVExportSession(httpRequest, serviceCredentials); String user = serviceCredentials.getUserName(); logger.debug("Save Export In Destination"); @@ -414,25 +356,18 @@ public class BackgroundOperationMonitorCreator { if (exportSession.getDestination().getId().compareTo("Workspace") == 0) { logger.debug("Save on Workspace"); - boolean end = SessionUtil.getCSVExportEnd(httpRequest, - serviceCredentials); + boolean end = SessionUtil.getCSVExportEnd(httpRequest, serviceCredentials); if (end == false) { - SessionUtil.setCSVExportEnd(httpRequest, serviceCredentials, - true); - logger.debug("Create Item On Workspace: [ storageId: " - + exportMetadata.getUri() + " ,user: " + user - + " ,fileName: " + exportSession.getFileName() - + " ,fileDescription: " - + exportSession.getFileDescription() - + " ,mimetype: text/csv" + " ,folder: " + SessionUtil.setCSVExportEnd(httpRequest, serviceCredentials, true); + logger.debug("Create Item On Workspace: [ storageId: " + exportMetadata.getUri() + " ,user: " + user + + " ,fileName: " + exportSession.getFileName() + " ,fileDescription: " + + exportSession.getFileDescription() + " ,mimetype: text/csv" + " ,folder: " + exportSession.getItemId() + "]"); FilesStorage storage = new FilesStorage(); - storage.createItemOnWorkspaceByStorageId( - exportMetadata.getUri(), user, - exportSession.getFileName() + ".csv", - exportSession.getFileDescription(), "text/csv", + storage.createItemOnWorkspaceByStorageId(exportMetadata.getUri(), user, + exportSession.getFileName() + ".csv", exportSession.getFileDescription(), "text/csv", exportSession.getItemId()); } else { @@ -440,24 +375,21 @@ public class BackgroundOperationMonitorCreator { } } else { logger.error("Destination No Present"); - throw new TDGWTServiceException( - "Error in exportCSV CSVExportMonitor: no destination present"); + throw new TDGWTServiceException("Error in exportCSV CSVExportMonitor: no destination present"); } } /** * Save export json data on Workspace * - * @param httpRequest - * @param user + * * @param exportMetadata - * @param exportSession + * Export Metadata * @throws TDGWTServiceException + * Exception */ - protected void saveJSONExportInDestination(ExportMetadata exportMetadata) - throws TDGWTServiceException { - JSONExportSession exportSession = SessionUtil.getJSONExportSession( - httpRequest, serviceCredentials); + protected void saveJSONExportInDestination(ExportMetadata exportMetadata) throws TDGWTServiceException { + JSONExportSession exportSession = SessionUtil.getJSONExportSession(httpRequest, serviceCredentials); String user = serviceCredentials.getUserName(); logger.debug("Save Export In Destination"); @@ -465,26 +397,19 @@ public class BackgroundOperationMonitorCreator { if (exportSession.getDestination().getId().compareTo("Workspace") == 0) { logger.debug("Save on Workspace"); - boolean end = SessionUtil.getJSONExportEnd(httpRequest, - serviceCredentials); + boolean end = SessionUtil.getJSONExportEnd(httpRequest, serviceCredentials); if (end == false) { - SessionUtil.setJSONExportEnd(httpRequest, serviceCredentials, - true); + SessionUtil.setJSONExportEnd(httpRequest, serviceCredentials, true); - logger.debug("Create Item On Workspace: [ storageId: " - + exportMetadata.getUri() + " ,user: " + user - + " ,fileName: " + exportSession.getFileName() - + " ,fileDescription: " - + exportSession.getFileDescription() - + " ,mimetype: application/json" + " ,folder: " + logger.debug("Create Item On Workspace: [ storageId: " + exportMetadata.getUri() + " ,user: " + user + + " ,fileName: " + exportSession.getFileName() + " ,fileDescription: " + + exportSession.getFileDescription() + " ,mimetype: application/json" + " ,folder: " + exportSession.getItemId() + "]"); FilesStorage storage = new FilesStorage(); - storage.createItemOnWorkspaceByStorageId( - exportMetadata.getUri(), user, - exportSession.getFileName() + ".json", - exportSession.getFileDescription(), "application/json", + storage.createItemOnWorkspaceByStorageId(exportMetadata.getUri(), user, + exportSession.getFileName() + ".json", exportSession.getFileDescription(), "application/json", exportSession.getItemId()); } else { @@ -492,26 +417,21 @@ public class BackgroundOperationMonitorCreator { } } else { logger.error("Destination No Present"); - throw new TDGWTServiceException( - "Error in export json: no destination present"); + throw new TDGWTServiceException("Error in export json: no destination present"); } } - private String retrieveTabularResourceIdFromTable(TableId tableId) - throws TDGWTServiceException { + private String retrieveTabularResourceIdFromTable(TableId tableId) throws TDGWTServiceException { try { TabularDataService service = TabularDataServiceFactory.getService(); Table table = service.getTable(tableId); if (table.contains(TableDescriptorMetadata.class)) { - TableDescriptorMetadata tdm = table - .getMetadata(TableDescriptorMetadata.class); + TableDescriptorMetadata tdm = table.getMetadata(TableDescriptorMetadata.class); return String.valueOf(tdm.getRefId()); } else { - throw new TDGWTServiceException( - "No TableDescriptorMetadata present in tableId: " - + tableId); + throw new TDGWTServiceException("No TableDescriptorMetadata present in tableId: " + tableId); } } catch (Exception e) { @@ -520,8 +440,8 @@ public class BackgroundOperationMonitorCreator { } - private void retrieveNameOfTabularResourceOnWhicWasLaunchedTheTask( - OperationMonitor operationMonitor) throws TDGWTServiceException { + private void retrieveNameOfTabularResourceOnWhicWasLaunchedTheTask(OperationMonitor operationMonitor) + throws TDGWTServiceException { try { TabularDataService service = TabularDataServiceFactory.getService(); @@ -543,8 +463,7 @@ public class BackgroundOperationMonitorCreator { try { tabIdL = new Long(tabRId); } catch (NumberFormatException e) { - logger.debug("No valid tabular resource id: " + tabRId + " " - + e.getLocalizedMessage()); + logger.debug("No valid tabular resource id: " + tabRId + " " + e.getLocalizedMessage()); operationMonitor.setTabularResourceName("NoName"); return; } @@ -555,8 +474,7 @@ public class BackgroundOperationMonitorCreator { return; } - logger.debug("retrieveNameOfTabularResourceOnWhicWasLaunchedTheTask(): on TabularResourceId " - + tabIdL); + logger.debug("retrieveNameOfTabularResourceOnWhicWasLaunchedTheTask(): on TabularResourceId " + tabIdL); TabularResourceId tabularResourceId = new TabularResourceId(tabIdL); TabularResource tr = service.getTabularResource(tabularResourceId); diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/BackgroundOperationMonitorSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/BackgroundOperationMonitorSession.java index 22ba945..cf96d41 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/BackgroundOperationMonitorSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/BackgroundOperationMonitorSession.java @@ -5,8 +5,8 @@ import java.util.ArrayList; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class BackgroundOperationMonitorSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/CSVExportMonitor.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/CSVExportMonitor.java index 2df99b5..c53806f 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/CSVExportMonitor.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/CSVExportMonitor.java @@ -11,8 +11,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CSVExportMonitor implements Serializable { @@ -29,7 +29,7 @@ private static final long serialVersionUID = -5998841163159590481L; public float getProgress(){ return progress; - }; + } public State getStatus(){ return status; diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/CSVImportMonitor.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/CSVImportMonitor.java index 788d85d..438f631 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/CSVImportMonitor.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/CSVImportMonitor.java @@ -10,8 +10,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CSVImportMonitor implements Serializable { @@ -26,7 +26,7 @@ private static final long serialVersionUID = -5998841163159590481L; public float getProgress(){ return progress; - }; + } public State getStatus(){ return status; diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/OperationMonitor.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/OperationMonitor.java index 33ec187..81f6639 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/OperationMonitor.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/OperationMonitor.java @@ -11,8 +11,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.operations.UIOperatio /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OperationMonitor implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/OperationMonitorCreator.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/OperationMonitorCreator.java index 7ce6c25..aa6864c 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/OperationMonitorCreator.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/OperationMonitorCreator.java @@ -43,15 +43,14 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OperationMonitorCreator { private static final String SECURITY_EXCEPTION_RIGHTS = "Security exception, you don't have the required rights!"; - private static Logger logger = LoggerFactory - .getLogger(OperationMonitorCreator.class); + private static Logger logger = LoggerFactory.getLogger(OperationMonitorCreator.class); // private static SimpleDateFormat sdf = new SimpleDateFormat( // "yyyy-MM-dd HH:mm"); @@ -64,15 +63,8 @@ public class OperationMonitorCreator { private TaskWrapper taskWrapper; private OperationMonitorSession operationMonitorSession; - /** - * - * @param task - * @param startTRId - * @param operationMonitorSession - */ - public OperationMonitorCreator(HttpServletRequest httpRequest, - ServiceCredentials serviceCredentials, TaskWrapper taskWrapper, - OperationMonitorSession operationMonitorSession) { + public OperationMonitorCreator(HttpServletRequest httpRequest, ServiceCredentials serviceCredentials, + TaskWrapper taskWrapper, OperationMonitorSession operationMonitorSession) { this.httpRequest = httpRequest; this.serviceCredentials = serviceCredentials; this.taskWrapper = taskWrapper; @@ -80,26 +72,17 @@ public class OperationMonitorCreator { } - /** - * - * @return - * @throws TDGWTServiceException - */ public OperationMonitor create() throws TDGWTServiceException { - OperationMonitor operationMonitor = new OperationMonitor( - operationMonitorSession.getTaskId(), + OperationMonitor operationMonitor = new OperationMonitor(operationMonitorSession.getTaskId(), taskWrapper.getOperationId()); - if (taskWrapper == null || taskWrapper.getTask() == null - || taskWrapper.getTask().getId() == null + if (taskWrapper == null || taskWrapper.getTask() == null || taskWrapper.getTask().getId() == null || taskWrapper.getTask().getId().getValue() == null || taskWrapper.getTask().getId().getValue().isEmpty()) { logger.debug("Task is null"); - throw new TDGWTServiceException( - "Error in Operation Monitor task is null"); + throw new TDGWTServiceException("Error in Operation Monitor task is null"); } else { - operationMonitor - .setTaskId(taskWrapper.getTask().getId().getValue()); + operationMonitor.setTaskId(taskWrapper.getTask().getId().getValue()); if (operationMonitorSession.isAbort()) { Task task = taskWrapper.getTask(); @@ -108,18 +91,15 @@ public class OperationMonitorCreator { // taskS.setState(State.ABORTED); operationMonitor.setTask(taskS); // operationMonitor.setAbort(true); - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); postOperation(operationMonitor); } else { if (operationMonitorSession.isInBackground()) { TaskS taskS = createTaskS(); operationMonitor.setTask(taskS); operationMonitor.setInBackground(true); - SessionUtil.setTaskInBackground(httpRequest, - serviceCredentials, taskWrapper); - SessionUtil.removeStartedTask(httpRequest, - serviceCredentials, taskWrapper); + SessionUtil.setTaskInBackground(httpRequest, serviceCredentials, taskWrapper); + SessionUtil.removeStartedTask(httpRequest, serviceCredentials, taskWrapper); postOperation(operationMonitor); } else { @@ -127,21 +107,18 @@ public class OperationMonitorCreator { try { status = taskWrapper.getTask().getStatus(); } catch (Throwable e) { - logger.debug("Error retrieving task status: " - + taskWrapper.getTask() + " " + logger.debug("Error retrieving task status: " + taskWrapper.getTask() + " " + e.getLocalizedMessage()); e.printStackTrace(); } if (status == null) { logger.debug("Services TaskStatus : null"); - throw new TDGWTServiceException( - "Error in OperationMonitor Status is null"); + throw new TDGWTServiceException("Error in OperationMonitor Status is null"); } else { TaskS taskS = createTaskS(); operationMonitor.setTask(taskS); } - SessionUtil.setStartedTask(httpRequest, serviceCredentials, - taskWrapper); + SessionUtil.setStartedTask(httpRequest, serviceCredentials, taskWrapper); postOperation(operationMonitor); } } @@ -161,22 +138,17 @@ public class OperationMonitorCreator { ArrayList validationsJobS = new ArrayList(); int j = 1; for (ValidationJob valJob : job.getValidationJobs()) { - ValidationsJobS validationJ = new ValidationsJobS( - String.valueOf(j), WorkerStateMap.map(valJob - .getStatus()), valJob.getProgress(), - valJob.getDescription(), valJob.getErrorMessage(), - valJob.getHumaReadableStatus()); + ValidationsJobS validationJ = new ValidationsJobS(String.valueOf(j), + WorkerStateMap.map(valJob.getStatus()), valJob.getProgress(), valJob.getDescription(), + valJob.getErrorMessage(), valJob.getHumaReadableStatus()); validationsJobS.add(validationJ); j++; } - JobSClassifier jobClassifier = JobClassifierMap.map(job - .getJobClassifier()); + JobSClassifier jobClassifier = JobClassifierMap.map(job.getJobClassifier()); - JobS jobS = new JobS(String.valueOf(i), job.getProgress(), - job.getHumaReadableStatus(), jobClassifier, - job.getDescription(), WorkerStateMap.map(job.getStatus()), - job.getErrorMessage(), validationsJobS); + JobS jobS = new JobS(String.valueOf(i), job.getProgress(), job.getHumaReadableStatus(), jobClassifier, + job.getDescription(), WorkerStateMap.map(job.getStatus()), job.getErrorMessage(), validationsJobS); jobSList.add(jobS); i++; @@ -198,29 +170,21 @@ public class OperationMonitorCreator { } - taskS = new TaskS(taskWrapper.getTask().getId().getValue(), - taskWrapper.getTask().getProgress(), - TaskStateMap.map(taskWrapper.getTask().getStatus()), - taskWrapper.getTask().getErrorCause(), taskWrapper - .getTask().getSubmitter(), taskWrapper.getTask() - .getStartTime(), - taskWrapper.getTask().getEndTime(), jobSList, - collateralTRIds, String.valueOf(taskWrapper.getTask() - .getTabularResourceId().getValue())); + taskS = new TaskS(taskWrapper.getTask().getId().getValue(), taskWrapper.getTask().getProgress(), + TaskStateMap.map(taskWrapper.getTask().getStatus()), taskWrapper.getTask().getErrorCause(), + taskWrapper.getTask().getSubmitter(), taskWrapper.getTask().getStartTime(), + taskWrapper.getTask().getEndTime(), jobSList, collateralTRIds, + String.valueOf(taskWrapper.getTask().getTabularResourceId().getValue())); } catch (Throwable e) { - logger.error("error retrieving information about the task, " - + e.getLocalizedMessage()); + logger.error("error retrieving information about the task, " + e.getLocalizedMessage()); e.printStackTrace(); - throw new TDGWTServiceException( - "error retrieving information about the task, " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("error retrieving information about the task, " + e.getLocalizedMessage()); } logger.debug("Retrieved task information"); return taskS; } - protected void postOperation(OperationMonitor operationMonitor) - throws TDGWTServiceException { + protected void postOperation(OperationMonitor operationMonitor) throws TDGWTServiceException { switch (operationMonitor.getTask().getState()) { case FAILED: @@ -229,8 +193,7 @@ public class OperationMonitorCreator { logger.error("Task Exception: task is failed"); } else { - logger.error("Task exception: " - + errorCause.getLocalizedMessage()); + logger.error("Task exception: " + errorCause.getLocalizedMessage()); errorCause.printStackTrace(); } break; @@ -258,8 +221,7 @@ public class OperationMonitorCreator { } } - protected void updateInformations(OperationMonitor operationMonitor) - throws TDGWTServiceException { + protected void updateInformations(OperationMonitor operationMonitor) throws TDGWTServiceException { TRId trId; TabResource tabResource; Table table; @@ -273,8 +235,7 @@ public class OperationMonitorCreator { exportMetadata = table.getMetadata(ExportMetadata.class); logger.debug("ExportMetadata: " + exportMetadata); - operationMonitor.setTrId(SessionUtil.getTRId(httpRequest, - serviceCredentials)); + operationMonitor.setTrId(SessionUtil.getTRId(httpRequest, serviceCredentials)); /* * trExportMetadata = new TabExportMetadata(); @@ -292,8 +253,7 @@ public class OperationMonitorCreator { logger.debug("Table retrived: " + table.toString()); // exportMetadata = table.getMetadata(ExportMetadata.class); // logger.debug("ExportMetadata: " + exportMetadata); - operationMonitor.setTrId(SessionUtil.getTRId(httpRequest, - serviceCredentials)); + operationMonitor.setTrId(SessionUtil.getTRId(httpRequest, serviceCredentials)); break; case JSONExport: table = taskWrapper.getTask().getResult().getPrimaryTable(); @@ -301,8 +261,7 @@ public class OperationMonitorCreator { exportMetadata = table.getMetadata(ExportMetadata.class); logger.debug("ExportMetadata: " + exportMetadata); - operationMonitor.setTrId(SessionUtil.getTRId(httpRequest, - serviceCredentials)); + operationMonitor.setTrId(SessionUtil.getTRId(httpRequest, serviceCredentials)); /* * trExportMetadata = new TabExportMetadata(); @@ -321,22 +280,18 @@ public class OperationMonitorCreator { trId = retrieveTabularResourceBasicData(trId); operationMonitor.setTrId(trId); - tabResource = SessionUtil.getCSVImportTabResource(httpRequest, - serviceCredentials); + tabResource = SessionUtil.getCSVImportTabResource(httpRequest, serviceCredentials); if (tabResource != null) { tabResource.setTrId(trId); - SessionUtil.setTabResource(httpRequest, serviceCredentials, - tabResource); + SessionUtil.setTabResource(httpRequest, serviceCredentials, tabResource); } else { tabResource = new TabResource(); tabResource.setTrId(trId); - SessionUtil.setTabResource(httpRequest, serviceCredentials, - tabResource); + SessionUtil.setTabResource(httpRequest, serviceCredentials, tabResource); } logger.debug("CurrentTabResource set:" + tabResource); SessionUtil.setTRId(httpRequest, serviceCredentials, trId); - SessionUtil.addToCurrentTabularResourcesOpen(httpRequest, - serviceCredentials, tabResource); + SessionUtil.addToCurrentTabularResourcesOpen(httpRequest, serviceCredentials, tabResource); break; case SDMXImport: trId = new TRId(); @@ -344,22 +299,18 @@ public class OperationMonitorCreator { trId = retrieveTabularResourceBasicData(trId); operationMonitor.setTrId(trId); - tabResource = SessionUtil.getSDMXImportTabResource(httpRequest, - serviceCredentials); + tabResource = SessionUtil.getSDMXImportTabResource(httpRequest, serviceCredentials); if (tabResource != null) { tabResource.setTrId(trId); - SessionUtil.setTabResource(httpRequest, serviceCredentials, - tabResource); + SessionUtil.setTabResource(httpRequest, serviceCredentials, tabResource); } else { tabResource = new TabResource(); tabResource.setTrId(trId); - SessionUtil.setTabResource(httpRequest, serviceCredentials, - tabResource); + SessionUtil.setTabResource(httpRequest, serviceCredentials, tabResource); } logger.debug("CurrentTabResource set:" + tabResource); SessionUtil.setTRId(httpRequest, serviceCredentials, trId); - SessionUtil.addToCurrentTabularResourcesOpen(httpRequest, - serviceCredentials, tabResource); + SessionUtil.addToCurrentTabularResourcesOpen(httpRequest, serviceCredentials, tabResource); break; case Clone: trId = new TRId(); @@ -371,17 +322,14 @@ public class OperationMonitorCreator { trId = new TRId(taskWrapper.getTrId().getId()); trId = retrieveTabularResourceBasicData(trId); operationMonitor.setTrId(trId); - tabResource = SessionUtil.getTabResource(httpRequest, - serviceCredentials); + tabResource = SessionUtil.getTabResource(httpRequest, serviceCredentials); if (tabResource != null) { tabResource.setTrId(trId); - SessionUtil.setTabResource(httpRequest, serviceCredentials, - tabResource); + SessionUtil.setTabResource(httpRequest, serviceCredentials, tabResource); } else { tabResource = new TabResource(); tabResource.setTrId(trId); - SessionUtil.setTabResource(httpRequest, serviceCredentials, - tabResource); + SessionUtil.setTabResource(httpRequest, serviceCredentials, tabResource); } logger.debug("CurrentTabResource set:" + tabResource); SessionUtil.setTRId(httpRequest, serviceCredentials, trId); @@ -391,13 +339,11 @@ public class OperationMonitorCreator { } - protected TRId retrieveTabularResourceBasicData(TRId trId) - throws TDGWTServiceException { + protected TRId retrieveTabularResourceBasicData(TRId trId) throws TDGWTServiceException { try { TabularDataService service = TabularDataServiceFactory.getService(); - TabularResourceId tabularResourceId = new TabularResourceId( - new Long(trId.getId())); + TabularResourceId tabularResourceId = new TabularResourceId(new Long(trId.getId())); TabularResource tr = service.getTabularResource(tabularResourceId); if (tr == null) { @@ -415,11 +361,9 @@ public class OperationMonitorCreator { Table viewTable = null; if (table.contains(DatasetViewTableMetadata.class)) { - DatasetViewTableMetadata dwm = table - .getMetadata(DatasetViewTableMetadata.class); + DatasetViewTableMetadata dwm = table.getMetadata(DatasetViewTableMetadata.class); try { - viewTable = service.getTable(dwm - .getTargetDatasetViewTableId()); + viewTable = service.getTable(dwm.getTargetDatasetViewTableId()); } catch (Exception e) { logger.error("view table not found"); } @@ -427,20 +371,15 @@ public class OperationMonitorCreator { TRId newTRId; if (viewTable == null) { - newTRId = new TRId( - String.valueOf(tr.getId().getValue()), - TabularResourceTypeMap.map(tr.getTabularResourceType()), - tr.getTableType(), String.valueOf(table.getId() - .getValue()), table.getTableType().getName()); + newTRId = new TRId(String.valueOf(tr.getId().getValue()), + TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), + String.valueOf(table.getId().getValue()), table.getTableType().getName()); } else { - newTRId = new TRId( - String.valueOf(tr.getId().getValue()), - TabularResourceTypeMap.map(tr.getTabularResourceType()), - tr.getTableType(), String.valueOf(viewTable.getId() - .getValue()), viewTable.getTableType() - .getName(), String.valueOf(table.getId() - .getValue()), true); + newTRId = new TRId(String.valueOf(tr.getId().getValue()), + TabularResourceTypeMap.map(tr.getTabularResourceType()), tr.getTableType(), + String.valueOf(viewTable.getId().getValue()), viewTable.getTableType().getName(), + String.valueOf(table.getId().getValue()), true); } @@ -454,24 +393,21 @@ public class OperationMonitorCreator { throw new TDGWTServiceException(SECURITY_EXCEPTION_RIGHTS); } catch (Throwable e) { e.printStackTrace(); - throw new TDGWTServiceException("Error Retrieving Basic Data: " - + e.getLocalizedMessage()); + throw new TDGWTServiceException("Error Retrieving Basic Data: " + e.getLocalizedMessage()); } } /** * Save export csv data on Workspace * - * @param httpRequest - * @param user + * * @param exportMetadata - * @param exportSession + * Export Metadata * @throws TDGWTServiceException + * Exception */ - protected void saveCSVExportInDestination(ExportMetadata exportMetadata) - throws TDGWTServiceException { - CSVExportSession exportSession = SessionUtil.getCSVExportSession( - httpRequest, serviceCredentials); + protected void saveCSVExportInDestination(ExportMetadata exportMetadata) throws TDGWTServiceException { + CSVExportSession exportSession = SessionUtil.getCSVExportSession(httpRequest, serviceCredentials); String user = serviceCredentials.getUserName(); logger.debug("Save Export In Destination"); @@ -479,25 +415,18 @@ public class OperationMonitorCreator { if (exportSession.getDestination().getId().compareTo("Workspace") == 0) { logger.debug("Save on Workspace"); - boolean end = SessionUtil.getCSVExportEnd(httpRequest, - serviceCredentials); + boolean end = SessionUtil.getCSVExportEnd(httpRequest, serviceCredentials); if (end == false) { - SessionUtil.setCSVExportEnd(httpRequest, serviceCredentials, - true); + SessionUtil.setCSVExportEnd(httpRequest, serviceCredentials, true); - logger.debug("Create Item On Workspace: [ storageId: " - + exportMetadata.getUri() + " ,user: " + user - + " ,fileName: " + exportSession.getFileName() - + " ,fileDescription: " - + exportSession.getFileDescription() - + " ,mimetype: text/csv" + " ,folder: " + logger.debug("Create Item On Workspace: [ storageId: " + exportMetadata.getUri() + " ,user: " + user + + " ,fileName: " + exportSession.getFileName() + " ,fileDescription: " + + exportSession.getFileDescription() + " ,mimetype: text/csv" + " ,folder: " + exportSession.getItemId() + "]"); FilesStorage storage = new FilesStorage(); - storage.createItemOnWorkspaceByStorageId( - exportMetadata.getUri(), user, - exportSession.getFileName() + ".csv", - exportSession.getFileDescription(), "text/csv", + storage.createItemOnWorkspaceByStorageId(exportMetadata.getUri(), user, + exportSession.getFileName() + ".csv", exportSession.getFileDescription(), "text/csv", exportSession.getItemId()); } else { @@ -505,24 +434,21 @@ public class OperationMonitorCreator { } } else { logger.error("Destination No Present"); - throw new TDGWTServiceException( - "Error in export csv: no destination present"); + throw new TDGWTServiceException("Error in export csv: no destination present"); } } /** * Save export json data on Workspace * - * @param httpRequest - * @param user + * * @param exportMetadata - * @param exportSession + * Export Metadata * @throws TDGWTServiceException + * Exception */ - protected void saveJSONExportInDestination(ExportMetadata exportMetadata) - throws TDGWTServiceException { - JSONExportSession exportSession = SessionUtil.getJSONExportSession( - httpRequest, serviceCredentials); + protected void saveJSONExportInDestination(ExportMetadata exportMetadata) throws TDGWTServiceException { + JSONExportSession exportSession = SessionUtil.getJSONExportSession(httpRequest, serviceCredentials); String user = serviceCredentials.getUserName(); logger.debug("Save Export In Destination"); @@ -530,26 +456,19 @@ public class OperationMonitorCreator { if (exportSession.getDestination().getId().compareTo("Workspace") == 0) { logger.debug("Save on Workspace"); - boolean end = SessionUtil.getJSONExportEnd(httpRequest, - serviceCredentials); + boolean end = SessionUtil.getJSONExportEnd(httpRequest, serviceCredentials); if (end == false) { - SessionUtil.setJSONExportEnd(httpRequest, serviceCredentials, - true); + SessionUtil.setJSONExportEnd(httpRequest, serviceCredentials, true); - logger.debug("Create Item On Workspace: [ storageId: " - + exportMetadata.getUri() + " ,user: " + user - + " ,fileName: " + exportSession.getFileName() - + " ,fileDescription: " - + exportSession.getFileDescription() - + " ,mimetype: application/json" + " ,folder: " + logger.debug("Create Item On Workspace: [ storageId: " + exportMetadata.getUri() + " ,user: " + user + + " ,fileName: " + exportSession.getFileName() + " ,fileDescription: " + + exportSession.getFileDescription() + " ,mimetype: application/json" + " ,folder: " + exportSession.getItemId() + "]"); FilesStorage storage = new FilesStorage(); - storage.createItemOnWorkspaceByStorageId( - exportMetadata.getUri(), user, - exportSession.getFileName() + ".json", - exportSession.getFileDescription(), "application/json", + storage.createItemOnWorkspaceByStorageId(exportMetadata.getUri(), user, + exportSession.getFileName() + ".json", exportSession.getFileDescription(), "application/json", exportSession.getItemId()); } else { @@ -557,26 +476,21 @@ public class OperationMonitorCreator { } } else { logger.error("Destination No Present"); - throw new TDGWTServiceException( - "Error in export json: no destination present"); + throw new TDGWTServiceException("Error in export json: no destination present"); } } - private String retrieveTabularResourceIdFromTable(TableId tableId) - throws TDGWTServiceException { + private String retrieveTabularResourceIdFromTable(TableId tableId) throws TDGWTServiceException { try { TabularDataService service = TabularDataServiceFactory.getService(); Table table = service.getTable(tableId); if (table.contains(TableDescriptorMetadata.class)) { - TableDescriptorMetadata tdm = table - .getMetadata(TableDescriptorMetadata.class); + TableDescriptorMetadata tdm = table.getMetadata(TableDescriptorMetadata.class); return String.valueOf(tdm.getRefId()); } else { - throw new TDGWTServiceException( - "No TableDescriptorMetadata present in tableId: " - + tableId); + throw new TDGWTServiceException("No TableDescriptorMetadata present in tableId: " + tableId); } } catch (Exception e) { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/OperationMonitorSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/OperationMonitorSession.java index ef1c306..7488117 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/OperationMonitorSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/OperationMonitorSession.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OperationMonitorSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/SDMXExportMonitor.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/SDMXExportMonitor.java index 1d03224..8cebd6b 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/SDMXExportMonitor.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/SDMXExportMonitor.java @@ -9,8 +9,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SDMXExportMonitor implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/SDMXImportMonitor.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/SDMXImportMonitor.java index da9bde5..f1dfd44 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/SDMXImportMonitor.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/monitor/SDMXImportMonitor.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SDMXImportMonitor implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/AppliedRulesResponseData.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/AppliedRulesResponseData.java index 2663691..3470723 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/AppliedRulesResponseData.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/AppliedRulesResponseData.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.rule.description.RuleDescrip /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class AppliedRulesResponseData implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/ApplyAndDetachColumnRulesSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/ApplyAndDetachColumnRulesSession.java index b669771..58725d6 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/ApplyAndDetachColumnRulesSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/ApplyAndDetachColumnRulesSession.java @@ -9,8 +9,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ApplyAndDetachColumnRulesSession implements Serializable { @@ -25,13 +25,6 @@ public class ApplyAndDetachColumnRulesSession implements Serializable { super(); } - /** - * - * @param trId - * @param column - * @param rulesThatWillBeApplied - * @param rulesThatWillBeDetached - */ public ApplyAndDetachColumnRulesSession(TRId trId, ColumnData column, ArrayList rulesThatWillBeApplied, ArrayList rulesThatWillBeDetached) { @@ -62,8 +55,7 @@ public class ApplyAndDetachColumnRulesSession implements Serializable { return rulesThatWillBeApplied; } - public void setRulesThatWillBeApplied( - ArrayList rulesThatWillBeApplied) { + public void setRulesThatWillBeApplied(ArrayList rulesThatWillBeApplied) { this.rulesThatWillBeApplied = rulesThatWillBeApplied; } @@ -71,18 +63,14 @@ public class ApplyAndDetachColumnRulesSession implements Serializable { return rulesThatWillBeDetached; } - public void setRulesThatWillBeDetached( - ArrayList rulesThatWillBeDetached) { + public void setRulesThatWillBeDetached(ArrayList rulesThatWillBeDetached) { this.rulesThatWillBeDetached = rulesThatWillBeDetached; } @Override public String toString() { - return "ApplyAndDetachColumnRulesSession [trId=" + trId + ", column=" - + column + ", rulesThatWillBeApplied=" + rulesThatWillBeApplied - + ", rulesThatWillBeDetached=" + rulesThatWillBeDetached + "]"; + return "ApplyAndDetachColumnRulesSession [trId=" + trId + ", column=" + column + ", rulesThatWillBeApplied=" + + rulesThatWillBeApplied + ", rulesThatWillBeDetached=" + rulesThatWillBeDetached + "]"; } - - } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/ApplyTableRuleSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/ApplyTableRuleSession.java index 7876e78..17e9fdb 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/ApplyTableRuleSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/ApplyTableRuleSession.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ApplyTableRuleSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/DetachColumnRulesSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/DetachColumnRulesSession.java index d5f22a9..6b414eb 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/DetachColumnRulesSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/DetachColumnRulesSession.java @@ -9,8 +9,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class DetachColumnRulesSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/DetachTableRulesSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/DetachTableRulesSession.java index 0d3025e..0b3e773 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/DetachTableRulesSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/DetachTableRulesSession.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class DetachTableRulesSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/RuleColumnPlaceHolderDescriptor.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/RuleColumnPlaceHolderDescriptor.java index f42d601..5aa2fa8 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/RuleColumnPlaceHolderDescriptor.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/RuleColumnPlaceHolderDescriptor.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataT /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class RuleColumnPlaceHolderDescriptor implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/RuleScopeType.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/RuleScopeType.java index 8ffae3b..6843480 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/RuleScopeType.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/RuleScopeType.java @@ -3,15 +3,13 @@ package org.gcube.portlets.user.td.gwtservice.shared.rule; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum RuleScopeType { TABLE("Table"), COLUMN("Column"); - /** - * @param text - */ + private RuleScopeType(final String id) { this.id = id; } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/description/RuleDescriptionData.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/description/RuleDescriptionData.java index f3fb677..a297e1e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/description/RuleDescriptionData.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/description/RuleDescriptionData.java @@ -11,8 +11,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class RuleDescriptionData implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDBaseColumnRuleType.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDBaseColumnRuleType.java index 1711152..98fd917 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDBaseColumnRuleType.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDBaseColumnRuleType.java @@ -4,8 +4,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataT /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TDBaseColumnRuleType extends TDRuleColumnType { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDDimensionColumnRuleType.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDDimensionColumnRuleType.java index 206c15b..824d186 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDDimensionColumnRuleType.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDDimensionColumnRuleType.java @@ -4,8 +4,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.DimensionRe /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TDDimensionColumnRuleType extends TDRuleColumnType { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDRuleColumnType.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDRuleColumnType.java index d1d85eb..b787c6d 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDRuleColumnType.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDRuleColumnType.java @@ -4,8 +4,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.rule.type; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TDRuleColumnType extends TDRuleType { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDRuleTableType.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDRuleTableType.java index 7a0951a..b924b2a 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDRuleTableType.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDRuleTableType.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.rule.RuleColumnPlaceHolderDe /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TDRuleTableType extends TDRuleType { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDRuleType.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDRuleType.java index de9f881..20a9ffc 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDRuleType.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/type/TDRuleType.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public abstract class TDRuleType implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/sdmx/SDMXExportSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/sdmx/SDMXExportSession.java index 42d8d47..b277118 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/sdmx/SDMXExportSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/sdmx/SDMXExportSession.java @@ -13,8 +13,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SDMXExportSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/sdmx/SDMXImportSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/sdmx/SDMXImportSession.java index 51a3fb8..25ddfb6 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/sdmx/SDMXImportSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/sdmx/SDMXImportSession.java @@ -14,8 +14,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Codelist; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SDMXImportSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/sdmx/SDMXTemplateExportSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/sdmx/SDMXTemplateExportSession.java index 44affdc..c39fdde 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/sdmx/SDMXTemplateExportSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/sdmx/SDMXTemplateExportSession.java @@ -12,8 +12,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Agencies; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SDMXTemplateExportSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/Contacts.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/Contacts.java index 7781fa7..04d3202 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/Contacts.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/Contacts.java @@ -2,6 +2,11 @@ package org.gcube.portlets.user.td.gwtservice.shared.share; import java.io.Serializable; +/** + * + * @author Giancarlo Panichi + * + */ public class Contacts implements Serializable { private static final long serialVersionUID = 8727398755200080050L; @@ -14,12 +19,7 @@ public class Contacts implements Serializable { } - - /** - * @param id - * @param login - * @param isGroup - */ + public Contacts(String id, String login, boolean isGroup) { this.id = id; this.login = login; diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/ShareRule.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/ShareRule.java index 054ea29..6d3a44d 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/ShareRule.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/ShareRule.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.rule.description.RuleDescrip /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ShareRule implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/ShareTabResource.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/ShareTabResource.java index dbb3c07..fe874c8 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/ShareTabResource.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/ShareTabResource.java @@ -5,7 +5,11 @@ import java.util.ArrayList; import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource; - +/** + * + * @author Giancarlo Panichi + * + */ public class ShareTabResource implements Serializable { private static final long serialVersionUID = -4803711252511329006L; diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/ShareTemplate.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/ShareTemplate.java index 8c02ac2..cb4cf2b 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/ShareTemplate.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/share/ShareTemplate.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.template.TemplateData; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ShareTemplate implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/FileSource.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/FileSource.java index e96f801..33296fc 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/FileSource.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/FileSource.java @@ -1,7 +1,11 @@ package org.gcube.portlets.user.td.gwtservice.shared.source; - +/** + * + * @author Giancarlo Panichi + * + */ public class FileSource implements Source { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/SDMXRegistrySource.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/SDMXRegistrySource.java index 8af0135..9c361b8 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/SDMXRegistrySource.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/SDMXRegistrySource.java @@ -1,18 +1,17 @@ package org.gcube.portlets.user.td.gwtservice.shared.source; - - - - +/** + * + * @author Giancarlo Panichi + * + */ public class SDMXRegistrySource implements Source { - - + private static final long serialVersionUID = 3254879141340681969L; public static final SDMXRegistrySource INSTANCE = new SDMXRegistrySource(); - + protected String url; - /** * {@inheritDoc} @@ -42,7 +41,7 @@ public class SDMXRegistrySource implements Source { public void setUrl(String url) { this.url = url; } - + /** * {@inheritDoc} */ @@ -60,7 +59,5 @@ public class SDMXRegistrySource implements Source { builder.append("]"); return builder.toString(); } - - - + } \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/Source.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/Source.java index 964a109..6a9674a 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/Source.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/Source.java @@ -2,26 +2,32 @@ package org.gcube.portlets.user.td.gwtservice.shared.source; import java.io.Serializable; - +/** + * + * @author Giancarlo Panichi + * + */ public interface Source extends Serializable { - + /** * Returns the document type id. + * * @return the document type id. */ public String getId(); - + /** * Returns the document type name. + * * @return the document type name. */ public String getName(); - + /** * Returns the document type description. + * * @return the document type description. */ public String getDescription(); - - + } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/SourceType.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/SourceType.java index 171e802..f4ba408 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/SourceType.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/SourceType.java @@ -1,23 +1,22 @@ package org.gcube.portlets.user.td.gwtservice.shared.source; +/** + * + * @author Giancarlo Panichi + * + */ public enum SourceType { - FILE("File"), - URL("Url"), - WORKSPACE("Workspace"), - SDMXRegistry("SDMXRegistry"); - - /** - * @param text - */ + FILE("File"), URL("Url"), WORKSPACE("Workspace"), SDMXRegistry("SDMXRegistry"); + private SourceType(final String id) { this.id = id; } private final String id; - + @Override public String toString() { return id; } - + } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/UrlSource.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/UrlSource.java index b59c294..bea6b19 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/UrlSource.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/UrlSource.java @@ -1,15 +1,16 @@ package org.gcube.portlets.user.td.gwtservice.shared.source; - - +/** + * + * @author Giancarlo Panichi + * + */ public class UrlSource implements Source { - - + private static final long serialVersionUID = -5990408094142286488L; - + public static final UrlSource INSTANCE = new UrlSource(); - - + /** * {@inheritDoc} */ @@ -46,7 +47,5 @@ public class UrlSource implements Source { builder.append("]"); return builder.toString(); } - - - + } \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/WorkspaceSource.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/WorkspaceSource.java index cb91e69..bcbe0d7 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/WorkspaceSource.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/source/WorkspaceSource.java @@ -1,16 +1,16 @@ package org.gcube.portlets.user.td.gwtservice.shared.source; - - - +/** + * + * @author Giancarlo Panichi + * + */ public class WorkspaceSource implements Source { - - + private static final long serialVersionUID = 2826706131664617270L; - + public static final WorkspaceSource INSTANCE = new WorkspaceSource(); - - + /** * {@inheritDoc} */ @@ -47,7 +47,5 @@ public class WorkspaceSource implements Source { builder.append("]"); return builder.toString(); } - - - + } \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/statistical/DataMinerOperationSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/statistical/DataMinerOperationSession.java index 209fe87..b5223e6 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/statistical/DataMinerOperationSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/statistical/DataMinerOperationSession.java @@ -10,8 +10,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class DataMinerOperationSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/statistical/StatisticalOperationSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/statistical/StatisticalOperationSession.java index f598a5e..fa641dd 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/statistical/StatisticalOperationSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/statistical/StatisticalOperationSession.java @@ -10,8 +10,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class StatisticalOperationSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/InvocationS.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/InvocationS.java index 0e6ab81..25d20b1 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/InvocationS.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/InvocationS.java @@ -7,7 +7,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.RefColumn; /** * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ public class InvocationS implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/JobS.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/JobS.java index 9c9bf47..c1c0117 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/JobS.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/JobS.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.table.Validations; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class JobS implements Serializable { @@ -34,19 +34,26 @@ public class JobS implements Serializable { * For Validation Tasks * * @param id + * Id * @param progress + * Progress * @param humaReadableStatus + * Human redable status + * @param jobClassifier + * Job classifier * @param description + * Description * @param validations + * List of validations * @param invocation + * Invocation */ - public JobS(String id, float progress, String humaReadableStatus, - JobSClassifier jobClassifier, String description, ArrayList validations, - InvocationS invocation) { + public JobS(String id, float progress, String humaReadableStatus, JobSClassifier jobClassifier, String description, + ArrayList validations, InvocationS invocation) { this.id = id; this.progress = progress; this.humaReadableStatus = humaReadableStatus; - this.jobClassifier=jobClassifier; + this.jobClassifier = jobClassifier; this.description = description; this.validations = validations; this.invocation = invocation; @@ -58,21 +65,30 @@ public class JobS implements Serializable { /** * For Operation Monitor * + * * @param id + * Id * @param progress + * Progress * @param humaReadableStatus + * Human readable status + * @param jobClassifier + * Job classifier * @param description - * @param errorMessage + * Description * @param workerState + * Worker state + * @param errorMessage + * Error message * @param validationsJobs + * Validations jobs */ - public JobS(String id, float progress, String humaReadableStatus, - JobSClassifier jobClassifier,String description, WorkerState workerState, - Throwable errorMessage, ArrayList validationsJobs) { + public JobS(String id, float progress, String humaReadableStatus, JobSClassifier jobClassifier, String description, + WorkerState workerState, Throwable errorMessage, ArrayList validationsJobs) { this.id = id; this.progress = progress; this.humaReadableStatus = humaReadableStatus; - this.jobClassifier=jobClassifier; + this.jobClassifier = jobClassifier; this.description = description; this.validationsJobS = validationsJobs; this.errorMessage = errorMessage; @@ -163,15 +179,10 @@ public class JobS implements Serializable { @Override public String toString() { - return "JobS [id=" + id + ", progress=" + progress - + ", humaReadableStatus=" + humaReadableStatus - + ", jobClassifier=" + jobClassifier + ", description=" - + description + ", invocation=" + invocation + ", validations=" - + validations + ", errorMessage=" + errorMessage - + ", workerState=" + workerState + ", validationsJobS=" - + validationsJobS + "]"; + return "JobS [id=" + id + ", progress=" + progress + ", humaReadableStatus=" + humaReadableStatus + + ", jobClassifier=" + jobClassifier + ", description=" + description + ", invocation=" + invocation + + ", validations=" + validations + ", errorMessage=" + errorMessage + ", workerState=" + workerState + + ", validationsJobS=" + validationsJobS + "]"; } - - } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/JobSClassifier.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/JobSClassifier.java index 0d64eb2..b8ac095 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/JobSClassifier.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/JobSClassifier.java @@ -6,8 +6,8 @@ import java.util.List; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum JobSClassifier implements Serializable{ diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/State.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/State.java index 3899ffe..e1f9069 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/State.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/State.java @@ -6,8 +6,8 @@ import java.io.Serializable; * Are the possible states of a task on the service * * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum State implements Serializable{ @@ -20,9 +20,7 @@ public enum State implements Serializable{ ABORTED("Aborted"), FAILED("Failed"); - /** - * @param text - */ + private State(final String id) { this.id = id; } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskResubmitSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskResubmitSession.java index 654e25c..53e2787 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskResubmitSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskResubmitSession.java @@ -6,7 +6,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ public class TaskResubmitSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskResumeSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskResumeSession.java index 60086de..4d8326f 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskResumeSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskResumeSession.java @@ -9,8 +9,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TaskResumeSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskS.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskS.java index a90e829..b0a2176 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskS.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskS.java @@ -8,7 +8,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ public class TaskS implements Serializable { @@ -30,23 +30,8 @@ public class TaskS implements Serializable { } - /** - * - * @param id - * @param progress - * @param state - * @param errorCause - * @param submitter - * @param startTime - * @param endTime - * @param jobs - * @param collateralTRIds - * @param tabularResourceId TODO - * - */ - public TaskS(String id, float progress, State state, Throwable errorCause, - String submitter, Date startTime, Date endTime, - ArrayList jobs, ArrayList collateralTRIds, String tabularResourceId) { + public TaskS(String id, float progress, State state, Throwable errorCause, String submitter, Date startTime, + Date endTime, ArrayList jobs, ArrayList collateralTRIds, String tabularResourceId) { this.id = id; this.progress = progress; this.state = state; @@ -56,7 +41,7 @@ public class TaskS implements Serializable { this.endTime = endTime; this.jobs = jobs; this.collateralTRIds = collateralTRIds; - this.tabularResourceId=tabularResourceId; + this.tabularResourceId = tabularResourceId; } public String getId() { @@ -130,7 +115,7 @@ public class TaskS implements Serializable { public void setCollateralTRIds(ArrayList collateralTRIds) { this.collateralTRIds = collateralTRIds; } - + public String getTabularResourceId() { return tabularResourceId; } @@ -141,13 +126,9 @@ public class TaskS implements Serializable { @Override public String toString() { - return "TaskS [id=" + id + ", progress=" + progress + ", state=" - + state + ", errorCause=" + errorCause + ", submitter=" - + submitter + ", startTime=" + startTime + ", endTime=" - + endTime + ", jobs=" + jobs + ", collateralTRIds=" - + collateralTRIds + ", tabularResourceId=" + tabularResourceId - + "]"; + return "TaskS [id=" + id + ", progress=" + progress + ", state=" + state + ", errorCause=" + errorCause + + ", submitter=" + submitter + ", startTime=" + startTime + ", endTime=" + endTime + ", jobs=" + jobs + + ", collateralTRIds=" + collateralTRIds + ", tabularResourceId=" + tabularResourceId + "]"; } - } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskWrapper.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskWrapper.java index e776e10..622ecb7 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskWrapper.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/TaskWrapper.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.operations.UIOperatio /** * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TaskWrapper implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/ValidationsJobS.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/ValidationsJobS.java index ad39a2b..e72f469 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/ValidationsJobS.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/ValidationsJobS.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ValidationsJobS implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/ValidationsTasksMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/ValidationsTasksMetadata.java index 76d8842..84b9d48 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/ValidationsTasksMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/ValidationsTasksMetadata.java @@ -7,8 +7,8 @@ import java.util.ArrayList; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ValidationsTasksMetadata implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/WorkerState.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/WorkerState.java index d3d2b8e..4afd2f5 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/WorkerState.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/task/WorkerState.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.task; /** * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum WorkerState { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateApplySession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateApplySession.java index 7ffb595..225ff49 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateApplySession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateApplySession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * Apply Template Session * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TemplateApplySession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateColumnData.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateColumnData.java index 97be4c1..b6ba4b7 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateColumnData.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateColumnData.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeC /** * * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TemplateColumnData implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateData.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateData.java index 779af5e..22552e2 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateData.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateData.java @@ -10,8 +10,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.share.Contacts; * Template Description * * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TemplateData implements Serializable { @@ -30,18 +30,7 @@ public class TemplateData implements Serializable { super(); } - /** - * - * @param id - * @param name - * @param description - * @param agency - * @param category - * @param owner - * @param contacts - */ - public TemplateData(long id, String name, String description, - String agency, String category, Contacts owner, + public TemplateData(long id, String name, String description, String agency, String category, Contacts owner, ArrayList contacts, Date creationDate) { super(); this.id = id; @@ -66,7 +55,7 @@ public class TemplateData implements Serializable { return name; } - public void setName(String name) { + public void setName(String name) { this.name = name; } @@ -128,10 +117,9 @@ public class TemplateData implements Serializable { @Override public String toString() { - return "TemplateData [id=" + id + ", name=" + name + ", description=" - + description + ", agency=" + agency + ", category=" + category - + ", owner=" + owner + ", contacts=" + contacts - + ", creationDate=" + creationDate + "]"; + return "TemplateData [id=" + id + ", name=" + name + ", description=" + description + ", agency=" + agency + + ", category=" + category + ", owner=" + owner + ", contacts=" + contacts + ", creationDate=" + + creationDate + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateDeleteSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateDeleteSession.java index a6279db..ddaa3f6 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateDeleteSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/template/TemplateDeleteSession.java @@ -6,8 +6,8 @@ import java.util.ArrayList; /** * Delete Template Session * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TemplateDeleteSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/ConditionCode.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/ConditionCode.java index eef441f..3ef08d2 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/ConditionCode.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/ConditionCode.java @@ -3,8 +3,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr; /** * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum ConditionCode { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/ConditionCodeMap.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/ConditionCodeMap.java index d870357..48e1cef 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/ConditionCodeMap.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/ConditionCodeMap.java @@ -1,27 +1,21 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr; - /** * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ConditionCodeMap { - - /** - * - * @param conditionCode - * @return - */ + public static ConditionCode mapConditionCode(int conditionCode) { - ConditionCode[] conditions=ConditionCode.values(); - for(ConditionCode cond:conditions){ - if(cond.getValue()==conditionCode){ + ConditionCode[] conditions = ConditionCode.values(); + for (ConditionCode cond : conditions) { + if (cond.getValue() == conditionCode) { return cond; } } - + return ConditionCode.GenericValidity; } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/DimensionRow.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/DimensionRow.java index d7af084..6ee0337 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/DimensionRow.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/DimensionRow.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class DimensionRow implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/RefColumn.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/RefColumn.java index 57d34d9..a09946c 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/RefColumn.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/RefColumn.java @@ -4,7 +4,7 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" + * @author Giancarlo Panichi * */ public class RefColumn implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/TabResource.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/TabResource.java index 290c4cf..ce5bb7a 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/TabResource.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/TabResource.java @@ -9,8 +9,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TabResource implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/TableData.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/TableData.java index b28f2cc..80febb0 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/TableData.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/TableData.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TableData implements Serializable { @@ -20,7 +20,7 @@ public class TableData implements Serializable { protected String name; protected String typeName; protected String typeCode; - protected String metaData; //Metadata Description + protected String metaData; // Metadata Description protected ArrayList listColumnData; protected TRId trId; @@ -28,26 +28,33 @@ public class TableData implements Serializable { public TableData() { } - + /** * - * @param id Only for insert in grid - * @param name Name - * @param typeName For example: Dataset View - * @param typeCode For example: DATASETVIEW - * @param metaData A description - * @param listColumnData + * @param id + * Only for insert in grid + * @param name + * Name + * @param typeName + * For example: Dataset View + * @param typeCode + * For example: DATASETVIEW + * @param metaData + * A description + * @param listColumnData + * List of Column Data * @param trId + * TR id */ - public TableData(String id, String name, String typeName, String typeCode, - String metaData, ArrayList listColumnData, TRId trId) { - this.id=id; - this.name=name; - this.typeName=typeName; - this.typeCode=typeCode; - this.metaData=metaData; - this.listColumnData=listColumnData; - this.trId=trId; + public TableData(String id, String name, String typeName, String typeCode, String metaData, + ArrayList listColumnData, TRId trId) { + this.id = id; + this.name = name; + this.typeName = typeName; + this.typeCode = typeCode; + this.metaData = metaData; + this.listColumnData = listColumnData; + this.trId = trId; } public String getName() { @@ -108,10 +115,8 @@ public class TableData implements Serializable { @Override public String toString() { - return "TableData [id=" + id + ", name=" + name + ", typeName=" - + typeName + ", typeCode=" + typeCode + ", metaData=" - + metaData + ", listColumnData=" + listColumnData + ", trId=" - + trId + "]"; + return "TableData [id=" + id + ", name=" + name + ", typeName=" + typeName + ", typeCode=" + typeCode + + ", metaData=" + metaData + ", listColumnData=" + listColumnData + ", trId=" + trId + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/Occurrences.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/Occurrences.java index f997f39..26ddf18 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/Occurrences.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/Occurrences.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class Occurrences implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/OccurrencesForReplaceBatchColumnSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/OccurrencesForReplaceBatchColumnSession.java index e8ee98d..c970206 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/OccurrencesForReplaceBatchColumnSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/OccurrencesForReplaceBatchColumnSession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OccurrencesForReplaceBatchColumnSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/ReplaceBatchColumnSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/ReplaceBatchColumnSession.java index 6a30255..9741b09 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/ReplaceBatchColumnSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/ReplaceBatchColumnSession.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ReplaceBatchColumnSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/ReplaceEntry.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/ReplaceEntry.java index 4ace38e..b225e34 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/ReplaceEntry.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/ReplaceEntry.java @@ -4,30 +4,21 @@ import java.io.Serializable; import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow; - - public class ReplaceEntry implements Serializable { - + private static final long serialVersionUID = 1630393311734647924L; - + protected String value; - protected String rowId;//For view column, contains the value of the associated dimension column + protected String rowId;// For view column, contains the value of the + // associated dimension column protected Integer number; protected String replacementValue; protected DimensionRow replacementDimensionRow; - - public ReplaceEntry(){ - + + public ReplaceEntry() { + } - - /** - * Create a ReplaceEntry for normal column type - * - * @param value - * @param number - * @param replacementValue - * @param replacementDimensionRow - */ + public ReplaceEntry(String value, Integer number, String replacementValue, DimensionRow replacementDimensionRow) { this.value = value; this.rowId = null; @@ -36,15 +27,8 @@ public class ReplaceEntry implements Serializable { this.replacementDimensionRow = replacementDimensionRow; } - /** - * Create a ReplaceEntry for view column type - * - * @param value - * @param number - * @param replacementValue - * @param replacementDimensionRow - */ - public ReplaceEntry(String value, String rowId, Integer number, String replacementValue, DimensionRow replacementDimensionRow) { + public ReplaceEntry(String value, String rowId, Integer number, String replacementValue, + DimensionRow replacementDimensionRow) { this.value = value; this.rowId = rowId; this.number = number; @@ -94,17 +78,8 @@ public class ReplaceEntry implements Serializable { @Override public String toString() { - return "ReplaceEntry [value=" + value + ", rowId=" + rowId - + ", number=" + number + ", replacementValue=" - + replacementValue + ", replacementDimensionRow=" - + replacementDimensionRow + "]"; + return "ReplaceEntry [value=" + value + ", rowId=" + rowId + ", number=" + number + ", replacementValue=" + + replacementValue + ", replacementDimensionRow=" + replacementDimensionRow + "]"; } - - - - - - } - diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/ShowOccurrencesType.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/ShowOccurrencesType.java index efec143..9495eac 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/ShowOccurrencesType.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/batch/ShowOccurrencesType.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.batch; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum ShowOccurrencesType { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/clone/CloneTabularResourceSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/clone/CloneTabularResourceSession.java index bf6ea65..fec2bc0 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/clone/CloneTabularResourceSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/clone/CloneTabularResourceSession.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CloneTabularResourceSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/AddColumnSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/AddColumnSession.java index c6e0dd6..01df026 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/AddColumnSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/AddColumnSession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnMockU /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class AddColumnSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/ChangeColumnsPositionSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/ChangeColumnsPositionSession.java index c4bdb2e..2e9e87e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/ChangeColumnsPositionSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/ChangeColumnsPositionSession.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ChangeColumnsPositionSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/DeleteColumnSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/DeleteColumnSession.java index 40c02bf..77cb2f2 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/DeleteColumnSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/DeleteColumnSession.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class DeleteColumnSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/FilterColumnSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/FilterColumnSession.java index 2857f25..91c7fef 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/FilterColumnSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/FilterColumnSession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class FilterColumnSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/LabelColumnSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/LabelColumnSession.java index 510486e..7de59d5 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/LabelColumnSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/LabelColumnSession.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class LabelColumnSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/MergeColumnSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/MergeColumnSession.java index 983a467..3198dc3 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/MergeColumnSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/MergeColumnSession.java @@ -9,8 +9,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeC /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class MergeColumnSession implements Serializable { @@ -29,14 +29,7 @@ public class MergeColumnSession implements Serializable { } - /** - * - * @param columnData - * @param label - * @param mergeColumnType - * @param mergeColumnDataType - * @param expression - */ + public MergeColumnSession(ColumnData columnDataSource1, ColumnData columnDataSource2, String label, diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/ReplaceColumnByExpressionSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/ReplaceColumnByExpressionSession.java index bd352d2..eb885b1 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/ReplaceColumnByExpressionSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/ReplaceColumnByExpressionSession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ReplaceColumnByExpressionSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/ReplaceColumnSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/ReplaceColumnSession.java index eded136..7ec4ca2 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/ReplaceColumnSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/ReplaceColumnSession.java @@ -7,16 +7,16 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ReplaceColumnSession implements Serializable { private static final long serialVersionUID = -1896235499708614266L; - private String value; //Original value - private String replaceValue; //New value + private String value; // Original value + private String replaceValue; // New value private TRId trId; private ColumnData columnData; private String rowId; @@ -26,9 +26,21 @@ public class ReplaceColumnSession implements Serializable { } - //Simple Replace - public ReplaceColumnSession(String value, String replaceValue, TRId trId, - ColumnData columnData, String rowId) { + /** + * Simple Replace + * + * @param value + * Value + * @param replaceValue + * Replace Value + * @param trId + * TR id + * @param columnData + * Column data + * @param rowId + * Row id + */ + public ReplaceColumnSession(String value, String replaceValue, TRId trId, ColumnData columnData, String rowId) { this.value = value; this.replaceValue = replaceValue; this.trId = trId; @@ -36,11 +48,25 @@ public class ReplaceColumnSession implements Serializable { this.rowId = rowId; this.replaceDimension = false; } - - - //Dimension Replace - public ReplaceColumnSession(String value, String replaceValue, TRId trId, - ColumnData columnData, String rowId, boolean replaceDimension) { + + /** + * Dimension Replace + * + * @param value + * Value + * @param replaceValue + * Repalce value + * @param trId + * TR id + * @param columnData + * Column data + * @param rowId + * Row id + * @param replaceDimension + * Replace Dimension + */ + public ReplaceColumnSession(String value, String replaceValue, TRId trId, ColumnData columnData, String rowId, + boolean replaceDimension) { this.value = value; this.replaceValue = replaceValue; this.trId = trId; @@ -99,10 +125,8 @@ public class ReplaceColumnSession implements Serializable { @Override public String toString() { - return "ReplaceColumnSession [value=" + value + ", replaceValue=" - + replaceValue + ", trId=" + trId + ", columnData=" - + columnData + ", rowId=" + rowId + ", replaceDimension=" - + replaceDimension + "]"; + return "ReplaceColumnSession [value=" + value + ", replaceValue=" + replaceValue + ", trId=" + trId + + ", columnData=" + columnData + ", rowId=" + rowId + ", replaceDimension=" + replaceDimension + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/SplitColumnSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/SplitColumnSession.java index 1a6d456..703bfe0 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/SplitColumnSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/SplitColumnSession.java @@ -10,8 +10,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeC /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SplitColumnSession implements Serializable { @@ -32,23 +32,9 @@ public class SplitColumnSession implements Serializable { } - /** - * - * @param columnData - * @param expressions - * @param label1 - * @param firstSplitColumnType - * @param firstSplitColumnDataType - * @param label2 - * @param secondSplitColumnType - * @param secondSplitColumnDataType - */ - public SplitColumnSession(ColumnData columnData, - ArrayList expressions, String label1, - ColumnTypeCode firstSplitColumnType, - ColumnDataType firstSplitColumnDataType, String label2, - ColumnTypeCode secondSplitColumnType, - ColumnDataType secondSplitColumnDataType, boolean deleteColumn) { + public SplitColumnSession(ColumnData columnData, ArrayList expressions, String label1, + ColumnTypeCode firstSplitColumnType, ColumnDataType firstSplitColumnDataType, String label2, + ColumnTypeCode secondSplitColumnType, ColumnDataType secondSplitColumnDataType, boolean deleteColumn) { this.columnData = columnData; this.expressions = expressions; this.label1 = label1; @@ -113,8 +99,7 @@ public class SplitColumnSession implements Serializable { return firstSplitColumnDataType; } - public void setFirstSplitColumnDataType( - ColumnDataType firstSplitColumnDataType) { + public void setFirstSplitColumnDataType(ColumnDataType firstSplitColumnDataType) { this.firstSplitColumnDataType = firstSplitColumnDataType; } @@ -122,8 +107,7 @@ public class SplitColumnSession implements Serializable { return secondSplitColumnDataType; } - public void setSecondSplitColumnDataType( - ColumnDataType secondSplitColumnDataType) { + public void setSecondSplitColumnDataType(ColumnDataType secondSplitColumnDataType) { this.secondSplitColumnDataType = secondSplitColumnDataType; } @@ -137,14 +121,10 @@ public class SplitColumnSession implements Serializable { @Override public String toString() { - return "SplitColumnSession [columnData=" + columnData - + ", expressions=" + expressions + ", label1=" + label1 - + ", firstSplitColumnType=" + firstSplitColumnType - + ", firstSplitColumnDataType=" + firstSplitColumnDataType - + ", label2=" + label2 + ", secondSplitColumnType=" - + secondSplitColumnType + ", secondSplitColumnDataType=" - + secondSplitColumnDataType + ", deleteColumn=" + deleteColumn - + "]"; + return "SplitColumnSession [columnData=" + columnData + ", expressions=" + expressions + ", label1=" + label1 + + ", firstSplitColumnType=" + firstSplitColumnType + ", firstSplitColumnDataType=" + + firstSplitColumnDataType + ", label2=" + label2 + ", secondSplitColumnType=" + secondSplitColumnType + + ", secondSplitColumnDataType=" + secondSplitColumnDataType + ", deleteColumn=" + deleteColumn + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/mapping/ColumnMappingData.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/mapping/ColumnMappingData.java index 969c2ae..a2c986a 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/mapping/ColumnMappingData.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/mapping/ColumnMappingData.java @@ -2,37 +2,38 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.column.mapping; import java.io.Serializable; - import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow; /** * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ColumnMappingData implements Serializable { private static final long serialVersionUID = 733237646914552402L; - + protected DimensionRow sourceArg; protected DimensionRow targetArg; - + /** * */ - public ColumnMappingData(){ - + public ColumnMappingData() { + } - + /** * * @param sourceArg + * Source dimension row * @param targetArg + * Target dimension row */ - public ColumnMappingData(DimensionRow sourceArg, DimensionRow targetArg){ - this.sourceArg=sourceArg; - this.targetArg=targetArg; + public ColumnMappingData(DimensionRow sourceArg, DimensionRow targetArg) { + this.sourceArg = sourceArg; + this.targetArg = targetArg; } public DimensionRow getSourceArg() { @@ -53,11 +54,7 @@ public class ColumnMappingData implements Serializable { @Override public String toString() { - return "ColumnMappingData [sourceArg=" + sourceArg + ", targetArg=" - + targetArg + "]"; + return "ColumnMappingData [sourceArg=" + sourceArg + ", targetArg=" + targetArg + "]"; } - - - - + } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/mapping/ColumnMappingList.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/mapping/ColumnMappingList.java index 89304cb..578f6b8 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/mapping/ColumnMappingList.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/mapping/ColumnMappingList.java @@ -5,8 +5,8 @@ import java.util.ArrayList; /** * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ColumnMappingList implements Serializable { @@ -27,13 +27,15 @@ public class ColumnMappingList implements Serializable { /** * * @param id + * Id * @param name + * Name * @param mapping + * Mapping */ - public ColumnMappingList(String id, String name, - ArrayList mapping) { - this.id=id; - this.name=name; + public ColumnMappingList(String id, String name, ArrayList mapping) { + this.id = id; + this.name = name; this.mapping = mapping; } @@ -64,8 +66,7 @@ public class ColumnMappingList implements Serializable { @Override public String toString() { - return "ColumnMappingList [id=" + id + ", name=" + name + ", mapping=" - + mapping + "]"; + return "ColumnMappingList [id=" + id + ", name=" + name + ", mapping=" + mapping + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/type/ChangeColumnTypeSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/type/ChangeColumnTypeSession.java index ac93d81..0d0452e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/type/ChangeColumnTypeSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/column/type/ChangeColumnTypeSession.java @@ -9,7 +9,6 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeC import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.PeriodDataType; import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ValueDataFormat; - public class ChangeColumnTypeSession implements Serializable { private static final long serialVersionUID = 7154832921853261421L; @@ -31,13 +30,24 @@ public class ChangeColumnTypeSession implements Serializable { } - /* + /** * For change to Dimension + * + * @param columnData + * Column data + * @param columnTypeCode + * Column type code + * @param columnDataType + * Column data type + * @param columnTypeCodeTarget + * Column type code target + * @param columnDataTypeTarget + * Column data type target + * @param codelistColumnReference + * Codelist column reference */ - public ChangeColumnTypeSession(ColumnData columnData, - ColumnTypeCode columnTypeCode, ColumnDataType columnDataType, - ColumnTypeCode columnTypeCodeTarget, - ColumnDataType columnDataTypeTarget, + public ChangeColumnTypeSession(ColumnData columnData, ColumnTypeCode columnTypeCode, ColumnDataType columnDataType, + ColumnTypeCode columnTypeCodeTarget, ColumnDataType columnDataTypeTarget, ColumnData codelistColumnReference) { this.columnData = columnData; this.columnTypeCode = columnTypeCode; @@ -48,15 +58,27 @@ public class ChangeColumnTypeSession implements Serializable { } - /* + /** * For change to Dimension with mapping + * + * @param columnData + * Column data + * @param columnTypeCode + * Column tpye code + * @param columnDataType + * Column data type + * @param columnTypeCodeTarget + * Column type code target + * @param columnDataTypeTarget + * Column data type target + * @param codelistColumnReference + * Codelist column reference + * @param columnMappingList + * Column mapping list */ - public ChangeColumnTypeSession(ColumnData columnData, - ColumnTypeCode columnTypeCode, ColumnDataType columnDataType, - ColumnTypeCode columnTypeCodeTarget, - ColumnDataType columnDataTypeTarget, - ColumnData codelistColumnReference, - ColumnMappingList columnMappingList) { + public ChangeColumnTypeSession(ColumnData columnData, ColumnTypeCode columnTypeCode, ColumnDataType columnDataType, + ColumnTypeCode columnTypeCodeTarget, ColumnDataType columnDataTypeTarget, + ColumnData codelistColumnReference, ColumnMappingList columnMappingList) { this.columnData = columnData; this.columnTypeCode = columnTypeCode; this.columnDataType = columnDataType; @@ -121,7 +143,7 @@ public class ChangeColumnTypeSession implements Serializable { public void setPeriodDataType(PeriodDataType timeDimensionType) { this.timeDimensionType = timeDimensionType; } - + public ValueDataFormat getValueDataFormat() { return valueDataFormat; } @@ -148,17 +170,11 @@ public class ChangeColumnTypeSession implements Serializable { @Override public String toString() { - return "ChangeColumnTypeSession [columnData=" + columnData - + ", columnTypeCode=" + columnTypeCode + ", columnDataType=" - + columnDataType + ", columnTypeCodeTarget=" - + columnTypeCodeTarget + ", columnDataTypeTarget=" - + columnDataTypeTarget + ", locale=" + locale - + ", timeDimensionType=" + timeDimensionType - + ", timeDataFormat=" + valueDataFormat - + ", codelistColumnReference=" + codelistColumnReference - + ", columnMappingList=" + columnMappingList + "]"; + return "ChangeColumnTypeSession [columnData=" + columnData + ", columnTypeCode=" + columnTypeCode + + ", columnDataType=" + columnDataType + ", columnTypeCodeTarget=" + columnTypeCodeTarget + + ", columnDataTypeTarget=" + columnDataTypeTarget + ", locale=" + locale + ", timeDimensionType=" + + timeDimensionType + ", timeDataFormat=" + valueDataFormat + ", codelistColumnReference=" + + codelistColumnReference + ", columnMappingList=" + columnMappingList + "]"; } - - } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/groupby/GroupBySession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/groupby/GroupBySession.java index d91f458..e596f95 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/groupby/GroupBySession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/groupby/GroupBySession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class GroupBySession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/groupby/TimeAggregationSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/groupby/TimeAggregationSession.java index 5a3335d..462bbc9 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/groupby/TimeAggregationSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/groupby/TimeAggregationSession.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TimeAggregationSession implements Serializable { @@ -24,12 +24,7 @@ public class TimeAggregationSession implements Serializable { } - /** - * - * @param trId - * @param column - * @param map - */ + public TimeAggregationSession(TRId trId, ColumnData column, HashMap map) { super(); diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRAgencyMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRAgencyMetadata.java index 485c04d..df4a1a4 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRAgencyMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRAgencyMetadata.java @@ -4,8 +4,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TRAgencyMetadata implements TRMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRDescriptionMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRDescriptionMetadata.java index 6deecd0..1880158 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRDescriptionMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRDescriptionMetadata.java @@ -4,8 +4,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TRDescriptionMetadata implements TRMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRLicenceMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRLicenceMetadata.java index 20094e6..a89e5b5 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRLicenceMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRLicenceMetadata.java @@ -4,8 +4,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TRLicenceMetadata implements TRMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRLocalizedText.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRLocalizedText.java index 0eba9ba..26ad840 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRLocalizedText.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRLocalizedText.java @@ -6,8 +6,8 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TRLocalizedText implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRMetadata.java index 112b3a8..717d431 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRMetadata.java @@ -5,8 +5,8 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface TRMetadata extends Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRNameMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRNameMetadata.java index 6b3b6f3..6ac025e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRNameMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRNameMetadata.java @@ -4,8 +4,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TRNameMetadata implements TRMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRRightsMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRRightsMetadata.java index 4bf19c9..00134f2 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRRightsMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRRightsMetadata.java @@ -4,8 +4,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TRRightsMetadata implements TRMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRValidSinceMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRValidSinceMetadata.java index 2c70522..4d8e9ab 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRValidSinceMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRValidSinceMetadata.java @@ -6,8 +6,8 @@ import java.util.Date; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TRValidSinceMetadata implements TRMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRValidUntilMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRValidUntilMetadata.java index af50c15..76c39b5 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRValidUntilMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/metadata/TRValidUntilMetadata.java @@ -4,8 +4,8 @@ import java.util.Date; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TRValidUntilMetadata implements TRMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/normalization/DenormalizationSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/normalization/DenormalizationSession.java index fd98d4a..b74c8ca 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/normalization/DenormalizationSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/normalization/DenormalizationSession.java @@ -5,38 +5,29 @@ import java.io.Serializable; import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; - /** * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class DenormalizationSession implements Serializable { - + private static final long serialVersionUID = 4139331553059193758L; - + protected TRId trId; protected ColumnData valueColumn; protected ColumnData attributeColumn; - - + public DenormalizationSession() { } - - /** - * - * @param trId - * @param valueColumn - * @param attributeColumn - */ - public DenormalizationSession(TRId trId, ColumnData valueColumn, - ColumnData attributeColumn ) { + + public DenormalizationSession(TRId trId, ColumnData valueColumn, ColumnData attributeColumn) { this.trId = trId; this.valueColumn = valueColumn; this.attributeColumn = attributeColumn; - + } public TRId getTrId() { @@ -65,10 +56,8 @@ public class DenormalizationSession implements Serializable { @Override public String toString() { - return "DenormalizationSession [trId=" + trId + ", valueColumn=" - + valueColumn + ", attributeColumn=" + attributeColumn + "]"; + return "DenormalizationSession [trId=" + trId + ", valueColumn=" + valueColumn + ", attributeColumn=" + + attributeColumn + "]"; } - - + } - diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/normalization/NormalizationSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/normalization/NormalizationSession.java index 926281f..6371a82 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/normalization/NormalizationSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/normalization/NormalizationSession.java @@ -6,41 +6,31 @@ import java.util.ArrayList; import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; - /** * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class NormalizationSession implements Serializable { - + private static final long serialVersionUID = 4139331553059193758L; - protected TRId trId; protected ArrayList columns; protected String normalizedColumnName; protected String valueColumnName; - - + public NormalizationSession() { } - - /** - * - * @param trId - * @param columns - * @param normalizedColumnName - * @param valueColumnName - */ - public NormalizationSession(TRId trId, ArrayList columns,String normalizedColumnName, - String valueColumnName ) { + + public NormalizationSession(TRId trId, ArrayList columns, String normalizedColumnName, + String valueColumnName) { this.trId = trId; this.columns = columns; - this.normalizedColumnName=normalizedColumnName; - this.valueColumnName=valueColumnName; + this.normalizedColumnName = normalizedColumnName; + this.valueColumnName = valueColumnName; } public TRId getTrId() { @@ -77,13 +67,8 @@ public class NormalizationSession implements Serializable { @Override public String toString() { - return "NormalizationSession [trId=" + trId + ", columns=" + columns - + ", normalizedColumnName=" + normalizedColumnName - + ", valueColumnName=" + valueColumnName + "]"; + return "NormalizationSession [trId=" + trId + ", columns=" + columns + ", normalizedColumnName=" + + normalizedColumnName + ", valueColumnName=" + valueColumnName + "]"; } - - - } - diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/open/TDOpenSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/open/TDOpenSession.java index 48ecd47..d5c9722 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/open/TDOpenSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/open/TDOpenSession.java @@ -10,8 +10,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TDOpenSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/paging/CodelistPagingLoadConfig.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/paging/CodelistPagingLoadConfig.java index 0ee7558..8afbc22 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/paging/CodelistPagingLoadConfig.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/paging/CodelistPagingLoadConfig.java @@ -5,8 +5,8 @@ import java.util.ArrayList; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodelistPagingLoadConfig implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/paging/CodelistPagingLoadResult.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/paging/CodelistPagingLoadResult.java index 458320e..2b0a2f4 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/paging/CodelistPagingLoadResult.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/paging/CodelistPagingLoadResult.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class CodelistPagingLoadResult implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/paging/OrderInfo.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/paging/OrderInfo.java index e0cfa6b..e742797 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/paging/OrderInfo.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/paging/OrderInfo.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class OrderInfo implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/replacebyexternal/ReplaceByExternalColumnsMapping.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/replacebyexternal/ReplaceByExternalColumnsMapping.java index e1b3542..a57ab5e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/replacebyexternal/ReplaceByExternalColumnsMapping.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/replacebyexternal/ReplaceByExternalColumnsMapping.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ReplaceByExternalColumnsMapping implements Serializable { @@ -22,12 +22,7 @@ public class ReplaceByExternalColumnsMapping implements Serializable { } - /** - * - * @param columnLabel - * @param currentColumn - * @param externalColumn - */ + public ReplaceByExternalColumnsMapping(String columnLabel, ColumnData currentColumn, ColumnData externalColumn) { super(); diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/replacebyexternal/ReplaceByExternalSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/replacebyexternal/ReplaceByExternalSession.java index bacf484..6f444f3 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/replacebyexternal/ReplaceByExternalSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/replacebyexternal/ReplaceByExternalSession.java @@ -9,8 +9,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ReplaceByExternalSession implements Serializable { @@ -28,24 +28,10 @@ public class ReplaceByExternalSession implements Serializable { public ReplaceByExternalSession() { } - - /** - * - * @param trId - * @param currentTabularResource - * @param externalTabularResource - * @param currentColumn - * @param replaceColumn - * @param currentColumns - * @param externalColumns - * @param columnsMatch - */ - public ReplaceByExternalSession(TRId trId, - TabResource currentTabularResource, - TabResource externalTabularResource, ColumnData currentColumn, - ColumnData replaceColumn, ArrayList currentColumns, - ArrayList externalColumns, - ArrayList columnsMatch) { + + public ReplaceByExternalSession(TRId trId, TabResource currentTabularResource, TabResource externalTabularResource, + ColumnData currentColumn, ColumnData replaceColumn, ArrayList currentColumns, + ArrayList externalColumns, ArrayList columnsMatch) { super(); this.trId = trId; this.currentTabularResource = currentTabularResource; @@ -117,20 +103,16 @@ public class ReplaceByExternalSession implements Serializable { return columnsMatch; } - public void setColumnsMatch( - ArrayList columnsMatch) { + public void setColumnsMatch(ArrayList columnsMatch) { this.columnsMatch = columnsMatch; } @Override public String toString() { - return "ReplaceByExternalSession [trId=" + trId - + ", currentTabularResource=" + currentTabularResource - + ", externalTabularResource=" + externalTabularResource - + ", currentColumn=" + currentColumn + ", replaceColumn=" - + replaceColumn + ", currentColumns=" + currentColumns - + ", externalColumns=" + externalColumns + ", columnsMatch=" - + columnsMatch + "]"; + return "ReplaceByExternalSession [trId=" + trId + ", currentTabularResource=" + currentTabularResource + + ", externalTabularResource=" + externalTabularResource + ", currentColumn=" + currentColumn + + ", replaceColumn=" + replaceColumn + ", currentColumns=" + currentColumns + ", externalColumns=" + + externalColumns + ", columnsMatch=" + columnsMatch + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/InternalURITD.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/InternalURITD.java index 5576c04..ccf2843 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/InternalURITD.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/InternalURITD.java @@ -4,8 +4,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.thumbnail.ThumbnailTD /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class InternalURITD extends ResourceTD { @@ -21,11 +21,6 @@ public class InternalURITD extends ResourceTD { super(); } - /** - * - * @param fileId - * @param id - */ public InternalURITD(String id, String mimeType, ThumbnailTD thumbnailTD) { super(id); this.id = id; @@ -64,8 +59,7 @@ public class InternalURITD extends ResourceTD { @Override public String toString() { - return "InternalURITD [id=" + id + ", mimeType=" + mimeType - + ", thumbnailTD=" + thumbnailTD + "]"; + return "InternalURITD [id=" + id + ", mimeType=" + mimeType + ", thumbnailTD=" + thumbnailTD + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/RemoveResourceSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/RemoveResourceSession.java index cd7317c..1537ae3 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/RemoveResourceSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/RemoveResourceSession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class RemoveResourceSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/ResourceTD.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/ResourceTD.java index ab202f7..fe695d9 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/ResourceTD.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/ResourceTD.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ResourceTD implements Serializable { @@ -16,24 +16,16 @@ public class ResourceTD implements Serializable { public ResourceTD() { } - - /** - * - * @param stringValue - */ + public ResourceTD(String stringValue) { super(); this.stringValue = stringValue; } - - public String getStringValue() { return stringValue; } - - @Override public String toString() { return "ResourceTD [stringValue=" + stringValue + "]"; diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/ResourceTDDescriptor.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/ResourceTDDescriptor.java index 4d8a08d..0aa2aca 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/ResourceTDDescriptor.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/ResourceTDDescriptor.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ResourceTDDescriptor implements Serializable { @@ -22,20 +22,9 @@ public class ResourceTDDescriptor implements Serializable { public ResourceTDDescriptor() { } - - /** - * - * @param id - * @param name - * @param description - * @param creationDate - * @param creatorId - * @param resourceType - * @param resourceTD - */ - public ResourceTDDescriptor(long id, String name, String description, - String creationDate, long creatorId, ResourceTDType resourceType, - ResourceTD resourceTD) { + + public ResourceTDDescriptor(long id, String name, String description, String creationDate, long creatorId, + ResourceTDType resourceType, ResourceTD resourceTD) { super(); this.id = id; this.name = name; @@ -104,13 +93,9 @@ public class ResourceTDDescriptor implements Serializable { @Override public String toString() { - return "ResourceDescriptorTD [id=" + id + ", name=" + name - + ", description=" + description + ", creationDate=" - + creationDate + ", creatorId=" + creatorId + ", resourceType=" - + resourceType + ", resourceTD=" + resourceTD + "]"; + return "ResourceDescriptorTD [id=" + id + ", name=" + name + ", description=" + description + ", creationDate=" + + creationDate + ", creatorId=" + creatorId + ", resourceType=" + resourceType + ", resourceTD=" + + resourceTD + "]"; } - - - } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/ResourceTDType.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/ResourceTDType.java index 1430d22..e0e8930 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/ResourceTDType.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/ResourceTDType.java @@ -1,21 +1,16 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.resources; - /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public enum ResourceTDType { - CHART("Chart"), GUESSER("Guesser"), MAP("Map"), CODELIST("Codelist"), CSV( - "CSV"), SDMX("SDMX"), JSON("JSON"), GENERIC_FILE("Generic File"), GENERIC_TABLE( - "Generic Table"); + CHART("Chart"), GUESSER("Guesser"), MAP("Map"), CODELIST("Codelist"), CSV("CSV"), SDMX("SDMX"), JSON( + "JSON"), GENERIC_FILE("Generic File"), GENERIC_TABLE("Generic Table"); - /** - * @param text - */ private ResourceTDType(final String id) { this.id = id; } @@ -26,8 +21,5 @@ public enum ResourceTDType { public String toString() { return id; } - - - } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/SaveResourceSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/SaveResourceSession.java index bc97808..148a6ed 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/SaveResourceSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/SaveResourceSession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.mime.MimeTypeSupport; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class SaveResourceSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/StringResourceTD.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/StringResourceTD.java index 946a8c0..042661d 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/StringResourceTD.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/StringResourceTD.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.resources; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class StringResourceTD extends ResourceTD { @@ -16,10 +16,6 @@ public class StringResourceTD extends ResourceTD { super(); } - /** - * - * @param value - */ public StringResourceTD(String value) { super(value); this.value = value; diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/TableResourceTD.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/TableResourceTD.java index c8d77b6..d7eba6c 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/TableResourceTD.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/resources/TableResourceTD.java @@ -2,8 +2,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.resources; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TableResourceTD extends ResourceTD { @@ -16,11 +16,6 @@ public class TableResourceTD extends ResourceTD { super(); } - /** - * - * @param fileId - * @param uri - */ public TableResourceTD(long tableId, String tableStringValue) { super(tableStringValue); this.tableId = tableId; @@ -43,8 +38,7 @@ public class TableResourceTD extends ResourceTD { @Override public String toString() { - return "TableResourceTD [tableId=" + tableId + ", tableStringValue=" - + tableStringValue + "]"; + return "TableResourceTD [tableId=" + tableId + ", tableStringValue=" + tableStringValue + "]"; } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/rows/DeleteRowsSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/rows/DeleteRowsSession.java index 8afc314..7dabfe7 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/rows/DeleteRowsSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/rows/DeleteRowsSession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class DeleteRowsSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/rows/DuplicatesSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/rows/DuplicatesSession.java index 9c3015a..56d4e26 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/rows/DuplicatesSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/rows/DuplicatesSession.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class DuplicatesSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/rows/EditRowSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/rows/EditRowSession.java index 85c8a05..227cf96 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/rows/EditRowSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/rows/EditRowSession.java @@ -9,8 +9,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class EditRowSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/ChangeTableTypeSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/ChangeTableTypeSession.java index 315ced0..c3d0e57 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/ChangeTableTypeSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/ChangeTableTypeSession.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.TableType; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class ChangeTableTypeSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/Validations.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/Validations.java index a7481ba..cd68535 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/Validations.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/Validations.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.ConditionCode; /** * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class Validations implements Serializable { @@ -18,31 +18,20 @@ public class Validations implements Serializable { private boolean valid; private ConditionCode conditionCode; private String validationColumnColumnId; - - /** - * - */ + public Validations() { } - - /** - * - * @param id - * @param description - * @param valid - * @param conditionCode - * @param validationColumnColumnId - */ - public Validations(String id, String title, String description, boolean valid, ConditionCode conditionCode - , String validationColumnColumnId) { + + public Validations(String id, String title, String description, boolean valid, ConditionCode conditionCode, + String validationColumnColumnId) { this.id = id; - this.title=title; + this.title = title; this.description = description; this.valid = valid; this.conditionCode = conditionCode; - this.validationColumnColumnId=validationColumnColumnId; - + this.validationColumnColumnId = validationColumnColumnId; + } public String getId() { @@ -95,18 +84,8 @@ public class Validations implements Serializable { @Override public String toString() { - return "Validations [id=" + id + ", title=" + title + ", description=" - + description + ", valid=" + valid + ", conditionCode=" - + conditionCode + ", validationColumnColumnId=" - + validationColumnColumnId + "]"; + return "Validations [id=" + id + ", title=" + title + ", description=" + description + ", valid=" + valid + + ", conditionCode=" + conditionCode + ", validationColumnColumnId=" + validationColumnColumnId + "]"; } - - - - - - - - } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabDescriptionsMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabDescriptionsMetadata.java index f895e4d..8e94928 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabDescriptionsMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabDescriptionsMetadata.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRLocalizedText; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TabDescriptionsMetadata implements TabMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabExportMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabExportMetadata.java index b9fcec3..dbfb69f 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabExportMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabExportMetadata.java @@ -4,8 +4,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TabExportMetadata implements TabMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabGenericMapMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabGenericMapMetadata.java index 63e61b7..c9ac992 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabGenericMapMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabGenericMapMetadata.java @@ -5,8 +5,8 @@ import java.util.HashMap; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TabGenericMapMetadata implements TabMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabImportMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabImportMetadata.java index 27e9171..96af850 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabImportMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabImportMetadata.java @@ -3,8 +3,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TabImportMetadata implements TabMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabMetadata.java index cc48dd1..716dd89 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabMetadata.java @@ -5,8 +5,8 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public interface TabMetadata extends Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabNamesMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabNamesMetadata.java index d287c09..e9375a5 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabNamesMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabNamesMetadata.java @@ -7,8 +7,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRLocalizedText; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TabNamesMetadata implements TabMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabValidationsMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabValidationsMetadata.java index b0e9ccb..f37f934 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabValidationsMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabValidationsMetadata.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.table.Validations; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TabValidationsMetadata implements TabMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabVersionMetadata.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabVersionMetadata.java index 6512309..eba8d49 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabVersionMetadata.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/table/metadata/TabVersionMetadata.java @@ -4,8 +4,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TabVersionMetadata implements TabMetadata { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/type/Agencies.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/type/Agencies.java index d4ebdd9..e06ce21 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/type/Agencies.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/type/Agencies.java @@ -7,67 +7,45 @@ import java.io.Serializable; /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class Agencies implements Serializable { - + private static final long serialVersionUID = -8353499109124097114L; - + private String id; private String name; private String description; private String nameLabel; - - - public Agencies(){} - - /** - * @param id - * @param name - * @param agencyId - */ + + public Agencies() { + } + public Agencies(String id, String name, String description) { this.id = id; this.name = name; this.description = description; - this.nameLabel=id; + this.nameLabel = id; } - /** - * @return the id - */ public String getId() { return id; } - /** - * @return the name - */ public String getName() { return name; } - /** - * @return the description - */ public String getDescription() { return description; } - - /** - * - * @return label - */ + public String getNameLabel() { return nameLabel; } - - /** - * {@inheritDoc} - */ @Override public String toString() { StringBuilder builder = new StringBuilder(); diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/type/Codelist.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/type/Codelist.java index 2cc0406..6af8f77 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/type/Codelist.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/type/Codelist.java @@ -8,29 +8,24 @@ import java.io.Serializable; /** * * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class Codelist implements Serializable { - + private static final long serialVersionUID = -8353499109124097114L; - + private String id; private String name; private String agencyId; private String version; private String description; - - public Codelist(){} - - /** - * @param id - * @param name - * @param agencyId - */ - public Codelist(String id, String name, String agencyId,String version, String description) { + public Codelist() { + } + + public Codelist(String id, String name, String agencyId, String version, String description) { this.id = id; this.name = name; this.agencyId = agencyId; @@ -38,46 +33,26 @@ public class Codelist implements Serializable { this.description = description; } - /** - * @return the id - */ public String getId() { return id; } - /** - * @return the name - */ public String getName() { return name; } - /** - * @return the agencyId - */ public String getAgencyId() { return agencyId; } - - /** - * @return the version - */ public String getVersion() { return version; } - - - /** - * @return the version - */ + public String getDescription() { return description; } - - /** - * {@inheritDoc} - */ + @Override public String toString() { StringBuilder builder = new StringBuilder(); @@ -92,7 +67,7 @@ public class Codelist implements Serializable { builder.append(", description="); builder.append(description); builder.append("]"); - + return builder.toString(); } } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/type/Dataset.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/type/Dataset.java index df7aadb..1044a6b 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/type/Dataset.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/type/Dataset.java @@ -8,28 +8,23 @@ import java.io.Serializable; /** * * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class Dataset implements Serializable { - + private static final long serialVersionUID = -8353499109124097114L; - + protected String id; protected String name; protected String agencyId; protected String version; protected String description; - - public Dataset(){} - - /** - * @param id - * @param name - * @param agencyId - */ + public Dataset() { + } + public Dataset(String id, String name, String agencyId, String version, String description) { this.id = id; this.name = name; @@ -38,45 +33,26 @@ public class Dataset implements Serializable { this.description = description; } - /** - * @return the id - */ public String getId() { return id; } - /** - * @return the name - */ public String getName() { return name; } - /** - * @return the agencyId - */ public String getAgencyId() { return agencyId; } - /** - * @return the version - */ public String getVersion() { return version; } - - - /** - * @return the version - */ + public String getDescription() { return description; } - - /** - * {@inheritDoc} - */ + @Override public String toString() { StringBuilder builder = new StringBuilder(); diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/union/UnionColumnsMapping.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/union/UnionColumnsMapping.java index 6ddeeaf..7a4160c 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/union/UnionColumnsMapping.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/union/UnionColumnsMapping.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; /** * - * @author "Giancarlo Panichi" - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class UnionColumnsMapping implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/union/UnionSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/union/UnionSession.java index 32a70af..341c576 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/union/UnionSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/union/UnionSession.java @@ -8,8 +8,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class UnionSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/uriresolver/UriResolverSession.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/uriresolver/UriResolverSession.java index 469fae9..308644b 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/uriresolver/UriResolverSession.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/uriresolver/UriResolverSession.java @@ -6,8 +6,8 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.uriresolver.Applicati /** * - * @author giancarlo email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class UriResolverSession implements Serializable { diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/user/UserInfo.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/user/UserInfo.java index cf24fb9..d9cffd9 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/user/UserInfo.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/user/UserInfo.java @@ -4,8 +4,8 @@ import java.io.Serializable; /** * - * @author giancarlo - * email: g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class UserInfo implements Serializable { @@ -23,16 +23,7 @@ public class UserInfo implements Serializable { super(); } - /** - * - * @param username - * @param groupId - * @param groupName - * @param scope - * @param scopeName - * @param userEmailAddress - * @param userFullName - */ + public UserInfo(String username, String groupId, String groupName, String scope, String userEmailAddress, String userFullName) { super(); diff --git a/src/test/java/org/gcube/portlets/user/td/gwtservice/client/GwtTestTDGWTService.java b/src/test/java/org/gcube/portlets/user/td/gwtservice/client/GwtTestTDGWTService.java index 8ef77f7..8094cd5 100644 --- a/src/test/java/org/gcube/portlets/user/td/gwtservice/client/GwtTestTDGWTService.java +++ b/src/test/java/org/gcube/portlets/user/td/gwtservice/client/GwtTestTDGWTService.java @@ -18,8 +18,8 @@ import com.google.gwt.user.client.rpc.ServiceDefTarget; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class GwtTestTDGWTService extends GWTTestCase { diff --git a/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestMetadata.java b/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestMetadata.java index 9ba321a..8013a23 100644 --- a/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestMetadata.java +++ b/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestMetadata.java @@ -24,8 +24,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TestMetadata { diff --git a/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestService.java b/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestService.java index f1b0525..10f4200 100644 --- a/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestService.java +++ b/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestService.java @@ -23,8 +23,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TestService { diff --git a/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestServiceColumn.java b/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestServiceColumn.java index 1c138f3..35e9307 100644 --- a/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestServiceColumn.java +++ b/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestServiceColumn.java @@ -13,8 +13,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TestServiceColumn { diff --git a/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestServiceOperations.java b/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestServiceOperations.java index 70ffec3..e924777 100644 --- a/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestServiceOperations.java +++ b/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestServiceOperations.java @@ -11,8 +11,8 @@ import org.slf4j.LoggerFactory; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TestServiceOperations { diff --git a/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestServiceTable.java b/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestServiceTable.java index 1db0ef8..a03e9b8 100644 --- a/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestServiceTable.java +++ b/src/test/java/org/gcube/portlets/user/td/gwtservice/client/TestServiceTable.java @@ -10,8 +10,8 @@ import org.junit.Test; /** * - * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * @author Giancarlo Panichi + * * */ public class TestServiceTable {