From 464c764fb1ba2a987674a190723e49bb0d0d8439 Mon Sep 17 00:00:00 2001 From: brinn <brinn> Date: Fri, 1 Jun 2012 11:26:49 +0000 Subject: [PATCH] Run Clean-up to add @Override annotations for Java 1.6. SVN: 25448 --- .../generic/client/console/Assignment.java | 1 + .../client/console/RegisterDataSetType.java | 6 + .../console/RegisterExperimentType.java | 4 + .../client/console/RegisterMaterialType.java | 4 + .../client/console/RegisterPropertyType.java | 1 + .../client/console/RegisterSampleType.java | 10 + .../generic/client/console/RegisterType.java | 1 + .../openbis/generic/client/console/Set.java | 1 + .../application/AbstractAsyncCallback.java | 3 + .../AbstractClientPluginFactory.java | 2 + .../AbstractPluginViewContext.java | 23 +++ .../AsyncCallbackWithProgressBar.java | 5 + .../application/CallbackListenerAdapter.java | 4 + .../client/web/client/application/Client.java | 5 + .../client/application/CommonViewContext.java | 25 +++ .../client/application/FormPanelListener.java | 1 + .../GlobalSearchTabItemFactory.java | 1 + .../application/ManagedPropertySection.java | 12 ++ .../application/MatchingEntitiesPanel.java | 2 + .../web/client/application/ProjectViewer.java | 3 + .../SearchableEntitySelectionWidget.java | 1 + .../application/ShowResultSetCutInfo.java | 1 + ...abaseModificationObserverWithCallback.java | 1 + ...CompositeDatabaseModificationObserver.java | 2 + ...eModificationObserverWithMainObserver.java | 1 + .../DatabaseModificationAwareObject.java | 4 + .../framework/DebugPanelManager.java | 2 + .../application/framework/DefaultTabItem.java | 6 + .../framework/DisplaySettingsManager.java | 4 + .../framework/DisplayTypeIDGenerator.java | 2 + .../application/framework/HtmlPage.java | 2 + .../application/framework/LoginPage.java | 7 +- .../application/framework/MainPagePanel.java | 2 + .../application/framework/MainTabPanel.java | 7 + .../locator/AbstractViewLocatorResolver.java | 4 + .../AttachmentDownloadLocatorResolver.java | 4 + .../locator/BrowserLocatorResolver.java | 1 + .../locator/GlobalSearchLocatorResolver.java | 1 + .../locator/HomeLocatorResolver.java | 1 + .../locator/MaterialLocatorResolver.java | 1 + .../application/locator/OpenViewAction.java | 1 + .../locator/PermlinkLocatorResolver.java | 1 + .../locator/ProjectLocatorResolver.java | 1 + .../SampleRegistrationLocatorResolver.java | 1 + .../locator/SampleSearchLocatorResolver.java | 2 + .../locator/SearchLocatorResolver.java | 1 + .../client/application/menu/ActionMenu.java | 1 + .../menu/TabActionMenuItemFactory.java | 2 + .../web/client/application/menu/TopMenu.java | 2 + .../administration/AdministrationMenu.java | 2 + .../application/menu/modules/ModulesMenu.java | 1 + .../application/menu/user/LoggedUserMenu.java | 1 + .../menu/user/action/AboutBoxAction.java | 1 + .../user/action/ChangeUserSettingsAction.java | 3 + .../menu/user/action/LoginAction.java | 1 + .../menu/user/action/LogoutAction.java | 1 + .../application/model/DataSetTypeModel.java | 3 +- .../application/model/MaterialTypeModel.java | 3 +- .../application/model/SampleTypeModel.java | 3 +- .../model/VocabularyTermModel.java | 1 + .../plugin/ClientPluginAdapter.java | 5 + .../DefaultClientPluginFactoryProvider.java | 2 + .../ModuleInitializationController.java | 2 + .../application/renderer/LinkRenderer.java | 3 + .../renderer/MaterialRenderer.java | 1 + .../renderer/MultilineStringCellRenderer.java | 1 + .../application/renderer/PersonRenderer.java | 2 + .../renderer/RealNumberRenderer.java | 2 + .../renderer/TimestampStringCellRenderer.java | 1 + .../VocabularyTermStringCellRenderer.java | 1 + .../application/renderer/YesNoRenderer.java | 1 + .../core/CustomColumnStringRenderer.java | 1 + .../ui/AbstractRegistrationForm.java | 2 + .../client/application/ui/AbstractViewer.java | 5 + .../ui/AbstractViewerWithVerticalSplit.java | 3 + .../ui/AuthorizationGroupGrid.java | 2 + .../ui/AuthorizationGroupSelectionWidget.java | 1 + .../application/ui/BasicLoginCallback.java | 3 + .../ui/ColumnSettingsConfigurer.java | 4 + .../application/ui/ComponentEventLogger.java | 2 + .../ui/CustomImportTypeSelectionWidget.java | 1 + .../application/ui/LoginPanelAutofill.java | 1 + .../application/ui/PersonSelectionWidget.java | 1 + .../ui/PropertyValueRenderers.java | 5 + .../application/ui/RoleAssignmentGrid.java | 1 + .../application/ui/RowLayoutManager.java | 12 ++ .../web/client/application/ui/SpaceGrid.java | 1 + .../application/ui/SpaceSelectionWidget.java | 1 + .../client/application/ui/TypedTableGrid.java | 46 +++++ .../ui/TypedTableGridColumnDefinitionUI.java | 7 + .../AddPersonToAuthorizationGroupDialog.java | 1 + .../ui/amc/AddRoleAssignmentDialog.java | 1 + .../application/ui/amc/RoleListBox.java | 1 + .../ui/attachment/AttachmentBrowser.java | 9 + .../specific/GridCustomColumnDefinition.java | 13 ++ .../ui/data/AbstractExternalDataGrid.java | 4 + .../application/ui/data/ComputationData.java | 1 + .../ui/data/DataSetArchivingMenu.java | 5 + .../ui/data/DataSetComputeUtils.java | 2 + .../ui/data/DataSetProcessingMenu.java | 2 + .../ui/data/DataSetReportGenerator.java | 1 + .../ui/data/DataSetSearchHitGrid.java | 6 + .../ui/data/DataSetTypeSelectionWidget.java | 1 + .../ui/data/DataSetUploadForm.java | 1 + .../ui/data/FileFormatTypeGrid.java | 1 + .../data/FileFormatTypeSelectionWidget.java | 1 + .../data/ReportingPluginSelectionWidget.java | 2 + .../ui/deletion/DeletionForceOptions.java | 1 + .../application/ui/deletion/DeletionGrid.java | 1 + .../entity_type/AbstractEntityTypeGrid.java | 1 + .../ui/experiment/ExperimentBrowserGrid.java | 6 + .../experiment/ExperimentBrowserToolbar.java | 6 + .../ExperimentDataSetArchivingMenu.java | 5 + .../ExperimentTypeSelectionWidget.java | 1 + .../ProjectSelectionTreeGridContainer.java | 5 + .../ui/experiment/ProjectSelectionWidget.java | 1 + .../ui/field/ChosenEntitySetter.java | 1 + .../ui/field/DataSetChooserField.java | 1 + .../ui/field/EntityChooserDialog.java | 2 + .../ui/field/ExperimentChooserField.java | 5 + .../application/ui/field/HyperlinkField.java | 1 + .../ui/field/MultilineVarcharField.java | 1 + .../application/ui/field/ParameterField.java | 3 + .../ui/field/SampleChooserButton.java | 4 + .../ui/field/SampleChooserField.java | 5 + .../application/ui/field/ScriptField.java | 3 +- .../field/VocabularyTermSelectionWidget.java | 3 + .../client/application/ui/field/XmlField.java | 1 + .../ui/file/AttachmentsFileFieldManager.java | 1 + .../application/ui/grid/ColumnListener.java | 1 + .../ui/grid/ColumnSettingsChooser.java | 3 + .../ui/grid/ColumnSettingsDialog.java | 3 + .../application/ui/grid/ColumnUtils.java | 2 + .../application/ui/grid/ExtendedGridView.java | 4 +- .../ui/grid/ListColumnFilterWidget.java | 6 + .../ui/grid/TextColumnFilterWidget.java | 5 + .../entity/PropertyTypesCriteriaProvider.java | 3 + .../column/GridCustomColumnGrid.java | 6 +- ...dCustomExpressionEditOrRegisterDialog.java | 5 + .../common/GridColumnChooserDialog.java | 1 + .../filter/FilterSelectionWidget.java | 1 + .../expressions/filter/FilterToolbar.java | 4 + .../filter/GridCustomFilterGrid.java | 1 + .../listener/OpenEntityDetailsTabAction.java | 1 + .../OpenEntityDetailsTabClickListener.java | 1 + .../OpenEntityEditorTabClickListener.java | 1 + ...OpenExperimentBrowserTabClickListener.java | 1 + .../managed_property/ManagedPropertyGrid.java | 4 + .../ui/material/MaterialBrowserGrid.java | 5 + .../ui/material/MaterialBrowserToolbar.java | 6 + .../material/MaterialTypeSelectionWidget.java | 1 + .../application/ui/project/ProjectGrid.java | 4 +- .../AbstractSimplePropertyValueRenderer.java | 1 + .../ObjectArrayPropertyValueRenderer.java | 1 + .../DataTypeSelectionWidget.java | 1 + ...EntityTypePropertyTypeSelectionWidget.java | 1 + .../PropertyTypeAssignmentForm.java | 8 + .../PropertyTypeAssignmentGrid.java | 3 + .../ui/property_type/PropertyTypeGrid.java | 1 + .../PropertyTypeSelectionWidget.java | 1 + .../ui/sample/SampleBrowserGrid.java | 14 ++ .../ui/sample/SampleBrowserToolbar.java | 8 + .../ui/sample/SampleSearchHitGrid.java | 2 + .../ui/sample/SampleTypeSelectionWidget.java | 1 + .../AbstractScriptEditRegisterForm.java | 4 + .../ui/script/ScriptExecutionFramework.java | 1 + .../application/ui/script/ScriptGrid.java | 3 +- .../search/DetailedDataSetSearchToolbar.java | 1 + .../DetailedSearchFieldsSelectionWidget.java | 1 + .../ui/search/DetailedSearchToolbar.java | 4 + .../ui/search/DetailedSearchWindow.java | 1 + .../ui/user/ChangeUserSettingsDialog.java | 2 + .../ui/vocabulary/VocabularyGrid.java | 2 + .../VocabularyRegistrationFieldSet.java | 3 + .../vocabulary/VocabularySelectionWidget.java | 3 + .../ui/vocabulary/VocabularyTermGrid.java | 7 +- .../vocabulary/VocabularyTermValidator.java | 1 + .../AbstractDataConfirmationDialog.java | 1 + .../ui/widget/CheckBoxGroupWithModel.java | 1 + .../application/ui/widget/DropDownList.java | 4 + .../ui/widget/EntityRegistrationPanel.java | 2 + .../application/ui/widget/FieldUtil.java | 4 + .../application/ui/widget/HistoryWidget.java | 1 + .../client/application/ui/widget/InfoBox.java | 2 + .../widget/PopupDialogBasedInfoHandler.java | 2 + .../application/ui/widget/SectionsPanel.java | 1 + .../client/application/ui/wizard/Wizard.java | 5 + .../util/CompositeMessageProvider.java | 3 + .../util/DictonaryBasedMessageProvider.java | 3 + .../web/client/application/util/GWTUtils.java | 3 + .../application/util/IDelegatedAction.java | 2 + .../application/util/ToolTipAction.java | 9 +- .../client/application/util/WidgetUtils.java | 1 + .../application/util/lang/Entities.java | 9 + .../application/util/log/ProfilingTable.java | 12 ++ .../client/dto/DefaultResultSetConfig.java | 9 + .../client/web/client/dto/ResultSet.java | 1 + .../client/dto/ResultSetWithEntityTypes.java | 1 + .../web/client/dto/SearchableEntity.java | 1 + .../web/client/dto/TypedTableResultSet.java | 1 + .../web/server/AbstractClientService.java | 17 ++ ...actOriginalDataProviderWithoutHeaders.java | 2 + ...entServiceExceptionTranslatingAdvisor.java | 3 + .../web/server/CommonClientService.java | 177 +++++++++++++++++- .../StringHtmlEscapingPointcutAdvisor.java | 2 + .../web/server/UploadServiceServlet.java | 1 + .../resultset/AbstractTableModelProvider.java | 1 + .../server/resultset/AlphanumComparator.java | 1 + .../web/server/resultset/CacheManager.java | 1 + .../resultset/CachedResultSetManager.java | 16 ++ .../web/server/resultset/ColumnSortUtils.java | 1 + .../server/resultset/DataProviderAdapter.java | 2 + .../server/resultset/DefaultResultSet.java | 4 + .../EntityPropertyHistoryProvider.java | 1 + .../server/resultset/ExperimentProvider.java | 1 + .../resultset/MatchingEntitiesProvider.java | 1 + .../web/server/resultset/SampleProvider.java | 1 + .../resultset/TableDataProviderFactory.java | 6 + .../generic/server/AbstractServer.java | 16 ++ .../server/AuthenticationServiceHolder.java | 3 + .../openbis/generic/server/CacheFilter.java | 3 + .../server/CommonBusinessObjectFactory.java | 30 +++ .../openbis/generic/server/CommonServer.java | 168 ++++++++++++++++- .../generic/server/CommonServerLogger.java | 155 +++++++++++++++ .../DatabaseLastModificationAdvisor.java | 1 + .../openbis/generic/server/ETLService.java | 68 +++++++ .../generic/server/ETLServiceLogger.java | 66 +++++++ .../server/GenericHttpSessionListener.java | 4 + .../server/MaintenanceTaskStarter.java | 2 + .../generic/server/MaterialHelper.java | 8 + .../ServerExceptionTranslatingAdvisor.java | 3 + .../generic/server/SessionFactory.java | 1 + .../generic/server/TrackingServer.java | 3 + .../generic/server/TrackingServerLogger.java | 2 + .../WhiteListBasedRemoteHostValidator.java | 1 + .../v1/GeneralInformationChangingService.java | 6 + ...neralInformationChangingServiceLogger.java | 5 + .../api/v1/GeneralInformationService.java | 30 +++ .../v1/GeneralInformationServiceLogger.java | 28 +++ ...riaToDetailedSearchCriteriaTranslator.java | 8 + .../server/api/v1/WebInformationService.java | 3 + .../authorization/ActiveAuthorization.java | 2 + .../AlwaysStatusOkAccessController.java | 1 + .../authorization/AuthorizationAdvisor.java | 1 + .../AuthorizationDataProvider.java | 41 ++++ .../DefaultAccessController.java | 1 + .../DefaultReturnValueFilter.java | 2 + .../server/authorization/NoAuthorization.java | 2 + .../authorization/NoReturnValueFilter.java | 1 + .../authorization/PredicateFactory.java | 1 + .../server/batch/DataSetBatchUpdate.java | 4 + .../server/batch/SampleBatchRegistration.java | 4 + .../server/batch/SampleBatchUpdate.java | 4 + .../business/DataStoreServiceFactory.java | 1 + .../PropertiesBatchEvaluationErrors.java | 1 + .../business/PropertiesBatchManager.java | 4 + .../business/bo/AbstractBusinessObject.java | 39 ++++ .../server/business/bo/AttachmentBO.java | 3 + .../business/bo/AuthorizationGroupBO.java | 9 + .../server/business/bo/CorePluginTable.java | 2 + .../generic/server/business/bo/DataBO.java | 18 ++ .../server/business/bo/DataSetTable.java | 25 +++ .../server/business/bo/DataStoreBO.java | 2 + .../business/bo/DeletedDataSetTable.java | 2 + .../server/business/bo/DeletionTable.java | 2 + .../bo/EntityPropertiesConverter.java | 10 + .../server/business/bo/EntityTypeBO.java | 7 + .../business/bo/EntityTypePropertyTypeBO.java | 6 + .../server/business/bo/ExperimentBO.java | 16 +- .../server/business/bo/ExperimentTable.java | 8 + .../business/bo/GridCustomColumnBO.java | 5 + .../business/bo/GridCustomFilterBO.java | 5 + .../generic/server/business/bo/GroupBO.java | 7 + .../generic/server/business/bo/ISampleBO.java | 1 + .../server/business/bo/MaterialBO.java | 8 + .../server/business/bo/MaterialTable.java | 5 + .../bo/PlaceholderPropertyCreator.java | 2 + .../generic/server/business/bo/ProjectBO.java | 13 +- .../server/business/bo/PropertyTypeBO.java | 3 + .../server/business/bo/PropertyTypeTable.java | 4 + .../business/bo/RoleAssignmentTable.java | 2 + .../business/bo/RootEntitiesFinder.java | 1 + .../generic/server/business/bo/SampleBO.java | 19 +- .../server/business/bo/SampleTable.java | 6 + .../generic/server/business/bo/ScriptBO.java | 6 + .../generic/server/business/bo/TrashBO.java | 13 ++ .../server/business/bo/VocabularyBO.java | 13 ++ .../server/business/bo/VocabularyTermBO.java | 3 + .../bo/common/AbstractBatchIterator.java | 4 + .../bo/common/EntityPropertiesEnricher.java | 4 + .../bo/datasetlister/DatasetLister.java | 18 ++ .../bo/datasetlister/DatasetListerDAO.java | 3 + .../DefaultBatchDynamicPropertyEvaluator.java | 3 + ...ummyDynamicPropertyEvaluationRunnable.java | 3 + .../DynamicPropertyEvaluationRunnable.java | 1 + .../DynamicPropertyEvaluator.java | 3 + .../calculator/AbstractEntityAdaptor.java | 5 + .../calculator/BasicPropertyAdaptor.java | 3 + .../calculator/DynamicPropertyAdaptor.java | 3 + .../datasetlister/DataSetLister.java | 1 + .../experimentlister/ExperimentLister.java | 2 + .../samplelister/SampleLister.java | 4 + .../EntityInformationProvider.java | 7 + .../bo/materiallister/MaterialLister.java | 4 + .../bo/materiallister/MaterialListerDAO.java | 3 + .../bo/samplelister/SampleLister.java | 6 + .../bo/samplelister/SampleListerDAO.java | 3 + .../bo/samplelister/SampleListingWorker.java | 1 + .../importer/DatabaseInstanceImporter.java | 1 + .../business/search/DataSetSearchManager.java | 6 + .../business/search/SampleSearchManager.java | 6 + .../coreplugin/CorePluginRegistrator.java | 1 + ...ataStoreServerBasedDataSourceProvider.java | 3 + .../DynamicPropertyEvaluationScheduler.java | 6 + .../server/dataaccess/IDAOFactory.java | 1 + .../server/dataaccess/IVocabularyTermDAO.java | 1 + .../server/dataaccess/PropertyValidator.java | 5 + .../server/dataaccess/db/AbstractDAO.java | 14 +- .../db/AbstractGenericEntityDAO.java | 7 + ...bstractGenericEntityWithPropertiesDAO.java | 5 + .../dataaccess/db/AbstractSQLArray.java | 8 + .../server/dataaccess/db/AttachmentDAO.java | 5 + .../db/AuthorizationDAOFactory.java | 17 ++ .../dataaccess/db/AuthorizationGroupDAO.java | 3 + .../server/dataaccess/db/ByteArrayMapper.java | 3 + .../server/dataaccess/db/CodeSequenceDAO.java | 1 + .../server/dataaccess/db/CorePluginDAO.java | 6 +- .../server/dataaccess/db/DAOFactory.java | 22 +++ .../server/dataaccess/db/DAOUtils.java | 4 +- .../generic/server/dataaccess/db/DataDAO.java | 57 +++++- .../server/dataaccess/db/DataSetTypeDAO.java | 1 + .../server/dataaccess/db/DataStoreDAO.java | 7 +- .../dataaccess/db/DatabaseInstanceDAO.java | 7 + .../server/dataaccess/db/DeletionDAO.java | 19 ++ .../dataaccess/db/EntityOperationsLogDAO.java | 2 + .../db/EntityPropertyHistoryDAO.java | 1 + .../dataaccess/db/EntityPropertyTypeDAO.java | 16 ++ .../server/dataaccess/db/EntityTypeDAO.java | 7 +- .../server/dataaccess/db/EventDAO.java | 2 + .../server/dataaccess/db/ExperimentDAO.java | 20 +- .../dataaccess/db/FileFormatTypeDAO.java | 3 + .../dataaccess/db/GridCustomColumnDAO.java | 2 + .../dataaccess/db/GridCustomFilterDAO.java | 2 + .../dataaccess/db/HibernateSearchDAO.java | 13 +- .../dataaccess/db/IndexCreationUtil.java | 3 + .../server/dataaccess/db/LocatorTypeDAO.java | 1 + .../server/dataaccess/db/LongArrayMapper.java | 3 + .../server/dataaccess/db/LongSetMapper.java | 3 + .../server/dataaccess/db/MaterialDAO.java | 10 +- .../server/dataaccess/db/PermIdDAO.java | 2 + .../server/dataaccess/db/PersonDAO.java | 7 + .../dataaccess/db/PostRegistrationDAO.java | 3 + .../server/dataaccess/db/ProjectDAO.java | 4 + .../server/dataaccess/db/PropertyTypeDAO.java | 12 +- .../server/dataaccess/db/QueryDAO.java | 2 + .../dataaccess/db/RelationshipTypeDAO.java | 1 + .../dataaccess/db/RoleAssignmentDAO.java | 7 + .../server/dataaccess/db/SampleDAO.java | 22 +++ .../server/dataaccess/db/SampleTypeDAO.java | 6 +- .../server/dataaccess/db/ScriptDAO.java | 3 + .../db/SerializableObjectMapper.java | 3 + .../dataaccess/db/SimpleSQLLongArray.java | 3 + .../dataaccess/db/SimpleSQLStringArray.java | 3 + .../server/dataaccess/db/SpaceDAO.java | 4 + .../dataaccess/db/StringArrayMapper.java | 3 + .../server/dataaccess/db/VocabularyDAO.java | 4 + .../dataaccess/db/VocabularyTermDAO.java | 1 + .../db/search/DefaultFullTextIndexer.java | 3 + .../db/search/FullTextIndexUpdater.java | 4 + .../db/search/FullTextIndexerRunnable.java | 1 + .../db/search/HibernateSearchContext.java | 1 + .../PackageBasedIndexedEntityFinder.java | 2 + .../migration/MigrationStepFrom022To023.java | 2 + .../migration/MigrationStepFrom023To024.java | 2 + .../migration/MigrationStepFrom025To026.java | 1 + .../migration/MigrationStepFrom036To037.java | 1 + .../migration/MigrationStepFrom046To047.java | 1 + .../jython/api/v1/IDataSetTypeImmutable.java | 1 + .../jython/api/v1/IScriptImmutable.java | 1 + .../jython/api/v1/impl/DataSetType.java | 5 + .../api/v1/impl/DataSetTypeImmutable.java | 7 + .../jython/api/v1/impl/ExperimentType.java | 1 + .../api/v1/impl/ExperimentTypeImmutable.java | 3 + .../jython/api/v1/impl/FileFormatType.java | 1 + .../api/v1/impl/FileFormatTypeImmutable.java | 2 + .../MasterDataRegistrationScriptRunner.java | 1 + .../impl/MasterDataRegistrationService.java | 1 + .../MasterDataRegistrationTransaction.java | 32 ++++ .../jython/api/v1/impl/MaterialType.java | 1 + .../api/v1/impl/MaterialTypeImmutable.java | 3 + .../api/v1/impl/PropertyAssignment.java | 10 + .../v1/impl/PropertyAssignmentImmutable.java | 6 + .../jython/api/v1/impl/PropertyType.java | 8 + .../api/v1/impl/PropertyTypeImmutable.java | 10 + .../server/jython/api/v1/impl/SampleType.java | 7 + .../api/v1/impl/SampleTypeImmutable.java | 9 + .../jython/api/v1/impl/ScriptImmutable.java | 5 + .../server/jython/api/v1/impl/Vocabulary.java | 6 + .../api/v1/impl/VocabularyImmutable.java | 7 + .../jython/api/v1/impl/VocabularyTerm.java | 3 + .../api/v1/impl/VocabularyTermImmutable.java | 5 + .../server/plugin/AbstractPluginRegistry.java | 1 + .../task/DataSetRegistrationSummaryTask.java | 11 +- .../server/task/DemoMaintenanceTask.java | 2 + ...amicPropertyEvaluationMaintenanceTask.java | 2 + .../task/MaterialExternalDBSyncTask.java | 5 + ...eUnusedUnofficialTermsMaintenanceTask.java | 2 + .../server/util/GroupIdentifierHelper.java | 6 + .../server/util/KeyExtractorFactory.java | 5 + .../server/util/LifeCycleListener.java | 5 + .../generic/shared/AbstractServerLogger.java | 14 ++ .../openbis/generic/shared/ICommonServer.java | 1 + .../shared/LogMessagePrefixGenerator.java | 2 + .../generic/shared/OpenBisServiceFactory.java | 1 + .../generic/shared/api/v1/Translator.java | 1 + .../AbstractDatabaseInstancePredicate.java | 1 + .../AbstractExpressionPredicate.java | 1 + .../predicate/AbstractPredicate.java | 1 + .../predicate/ArrayPredicate.java | 1 + .../predicate/AtomicOperationsPredicate.java | 1 + .../predicate/CollectionPredicate.java | 1 + .../predicate/DataSetUpdatesPredicate.java | 1 + .../DelegatedNullableAbstractPredicate.java | 1 + .../predicate/DelegatedPredicate.java | 1 + .../predicate/ExperimentUpdatesPredicate.java | 1 + .../ListSamplesByPropertyPredicate.java | 1 + .../NewDataSetsWithTypePredicate.java | 1 + .../NewExperimentsWithTypePredicate.java | 1 + .../NewSamplesWithTypePredicate.java | 1 + .../predicate/ProjectUpdatesPredicate.java | 1 + .../predicate/RevertDeletionPredicate.java | 1 + ...pleOwnerIdentifierCollectionPredicate.java | 1 + .../SampleOwnerIdentifierPredicate.java | 1 + .../predicate/SampleUpdatesPredicate.java | 1 + .../UpdatedExperimentsWithTypePredicate.java | 1 + .../AbstractIdentifierValidator.java | 1 + .../validator/AbstractValidator.java | 2 + ...ataSetByExperimentIdentifierValidator.java | 1 + .../basic/BasicEntityInformationHolder.java | 5 + .../EntityVisitComparatorByTimeStamp.java | 1 + .../generic/shared/basic/PrimitiveValue.java | 1 + .../basic/dto/AbstractEntityProperty.java | 15 ++ .../shared/basic/dto/AbstractExpression.java | 5 + .../generic/shared/basic/dto/Attachment.java | 1 + .../shared/basic/dto/AttachmentVersions.java | 1 + .../shared/basic/dto/AuthorizationGroup.java | 2 + ...deWithRegistrationAndModificationDate.java | 1 + .../generic/shared/basic/dto/CorePlugin.java | 1 + .../generic/shared/basic/dto/DataSet.java | 2 + .../dto/DataSetAttributeSearchFieldKind.java | 2 + .../shared/basic/dto/DatasetLocation.java | 3 + .../dto/DatastoreServiceDescription.java | 3 + .../shared/basic/dto/DateTableCell.java | 1 + .../shared/basic/dto/DeletedDataSet.java | 1 + .../basic/dto/DeletedDataSetLocation.java | 3 + .../shared/basic/dto/DeletedEntity.java | 6 + .../generic/shared/basic/dto/Deletion.java | 1 + .../shared/basic/dto/DoubleTableCell.java | 1 + .../shared/basic/dto/DssLinkTableCell.java | 1 + .../shared/basic/dto/EntityReference.java | 5 + .../shared/basic/dto/EntityTableCell.java | 1 + .../generic/shared/basic/dto/EntityType.java | 1 + .../basic/dto/EntityTypePropertyType.java | 1 + .../generic/shared/basic/dto/Experiment.java | 8 + .../ExperimentAttributeSearchFieldKind.java | 2 + .../shared/basic/dto/ExternalData.java | 8 + .../basic/dto/GeneratedImageTableCell.java | 1 + .../generic/shared/basic/dto/Identifier.java | 3 + .../shared/basic/dto/ImageTableCell.java | 1 + .../shared/basic/dto/IntegerTableCell.java | 1 + ...ManagedComboBoxInputWidgetDescription.java | 1 + .../basic/dto/ManagedEntityProperty.java | 20 ++ .../dto/ManagedHtmlWidgetDescription.java | 1 + .../dto/ManagedInputWidgetDescription.java | 7 + ...edMultilineTextInputWidgetDescription.java | 1 + .../shared/basic/dto/ManagedProperty.java | 7 + .../dto/ManagedTableWidgetDescription.java | 1 + .../ManagedTextInputWidgetDescription.java | 1 + .../basic/dto/ManagedUiActionDescription.java | 7 + .../ManagedUiActionDescriptionFactory.java | 3 + .../basic/dto/ManagedUiDescription.java | 6 + .../dto/ManagedUiTableActionDescription.java | 7 + .../shared/basic/dto/MatchingEntity.java | 11 ++ .../generic/shared/basic/dto/Material.java | 6 + .../dto/MaterialAttributeSearchFieldKind.java | 2 + .../shared/basic/dto/NewBasicExperiment.java | 2 + .../generic/shared/basic/dto/NewDataSet.java | 2 + .../shared/basic/dto/NewExperiment.java | 2 + .../generic/shared/basic/dto/NewMaterial.java | 2 + .../generic/shared/basic/dto/NewSample.java | 2 + .../shared/basic/dto/ParameterValue.java | 1 + .../shared/basic/dto/PersonAdapter.java | 2 + .../shared/basic/dto/PersonTableCell.java | 1 + .../generic/shared/basic/dto/Project.java | 2 + .../shared/basic/dto/PropertyType.java | 5 + .../generic/shared/basic/dto/Sample.java | 8 + .../dto/SampleAttributeSearchFieldKind.java | 2 + .../generic/shared/basic/dto/Script.java | 5 + .../SerializableComparableIDDecorator.java | 1 + .../generic/shared/basic/dto/Space.java | 2 + .../shared/basic/dto/StringTableCell.java | 1 + .../basic/dto/TableModelRowWithObject.java | 1 + .../dto/TypedTableGridColumnDefinition.java | 6 + .../basic/dto/VocabularyTermTableCell.java | 1 + .../shared/coreplugin/CorePluginScanner.java | 1 + .../shared/dto/AbstractDeletedEntityPE.java | 2 + .../shared/dto/AbstractIdAndCodeHolder.java | 2 + .../generic/shared/dto/AbstractTypePE.java | 1 + .../shared/dto/AttachmentContentPE.java | 1 + .../generic/shared/dto/AttachmentPE.java | 3 + .../shared/dto/AuthorizationGroupPE.java | 3 + .../cisd/openbis/generic/shared/dto/Code.java | 1 + .../generic/shared/dto/CorePluginPE.java | 1 + .../openbis/generic/shared/dto/DataPE.java | 13 ++ .../shared/dto/DataSetBatchUpdatesDTO.java | 1 + .../generic/shared/dto/DataSetPropertyPE.java | 3 + .../generic/shared/dto/DataSetTypePE.java | 1 + .../shared/dto/DataSetTypePropertyTypePE.java | 3 + .../generic/shared/dto/DataStorePE.java | 2 + .../generic/shared/dto/DataTypePE.java | 2 + .../shared/dto/DatabaseInstancePE.java | 2 + .../shared/dto/DatasetDescription.java | 2 + .../generic/shared/dto/DeletedDataPE.java | 5 + .../shared/dto/DeletedExperimentPE.java | 5 + .../generic/shared/dto/DeletedSamplePE.java | 5 + .../generic/shared/dto/DeletionPE.java | 2 + .../dto/EntityOperationsLogEntryPE.java | 1 + .../generic/shared/dto/EntityPropertyPE.java | 3 + .../shared/dto/EntityTypePropertyTypePE.java | 1 + .../openbis/generic/shared/dto/EventPE.java | 1 + .../generic/shared/dto/ExperimentPE.java | 14 ++ .../shared/dto/ExperimentPropertyPE.java | 3 + .../generic/shared/dto/ExperimentTypePE.java | 1 + .../dto/ExperimentTypePropertyTypePE.java | 3 + .../generic/shared/dto/FileFormatTypePE.java | 1 + .../shared/dto/GridCustomColumnPE.java | 2 + .../shared/dto/GridCustomFilterPE.java | 2 + .../cisd/openbis/generic/shared/dto/Id.java | 1 + .../generic/shared/dto/LocatorTypePE.java | 1 + .../generic/shared/dto/MaterialPE.java | 12 ++ .../shared/dto/MaterialPropertyPE.java | 3 + .../generic/shared/dto/MaterialTypePE.java | 1 + .../dto/MaterialTypePropertyTypePE.java | 3 + .../openbis/generic/shared/dto/PersonPE.java | 2 + .../shared/dto/PostRegistrationPE.java | 1 + .../openbis/generic/shared/dto/ProjectPE.java | 5 + .../generic/shared/dto/PropertyTypePE.java | 3 + .../openbis/generic/shared/dto/QueryPE.java | 2 + .../shared/dto/RelationshipTypePE.java | 2 + .../generic/shared/dto/RoleAssignmentPE.java | 1 + .../openbis/generic/shared/dto/SamplePE.java | 14 ++ .../generic/shared/dto/SamplePropertyPE.java | 3 + .../generic/shared/dto/SampleTypePE.java | 1 + .../shared/dto/SampleTypePropertyTypePE.java | 3 + .../openbis/generic/shared/dto/ScriptPE.java | 2 + .../openbis/generic/shared/dto/Session.java | 2 + .../dto/SimpleDataSetInformationDTO.java | 2 + .../generic/shared/dto/SimpleSession.java | 3 + .../openbis/generic/shared/dto/SpacePE.java | 3 + .../generic/shared/dto/VocabularyPE.java | 3 + .../generic/shared/dto/VocabularyTermPE.java | 3 + .../shared/dto/VocabularyTermWithStats.java | 1 + .../hibernate/InternalNamespaceValidator.java | 2 + .../dto/hibernate/LocationValidator.java | 2 + .../dto/identifier/SampleOwnerIdentifier.java | 1 + .../dto/identifier/SpaceIdentifier.java | 1 + .../SimpleTableModelBuilderAdaptor.java | 13 ++ .../managed_property/structured/Element.java | 11 ++ .../structured/ElementFactory.java | 6 + .../structured/EntityLinkElement.java | 2 + .../XmlStructuredPropertyConverter.java | 2 + .../parser/NewSampleParserObjectFactory.java | 5 +- .../parser/SampleUploadSectionsParser.java | 2 + .../UpdatedSampleParserObjectFactory.java | 12 +- .../generic/shared/util/CacheManager.java | 3 + .../shared/util/SimplePropertyValidator.java | 6 + .../shared/util/SimpleTableModelBuilder.java | 5 + .../shared/util/TypedTableModelBuilder.java | 32 ++++ .../plugin/AbstractSampleServerPlugin.java | 1 + .../application/ClientPluginFactory.java | 7 + .../client/application/DemoViewContext.java | 1 + .../client/application/module/DemoModule.java | 4 + .../application/module/StatisticsWidget.java | 2 + .../module/TopMenuItemDemoModuleMenu.java | 2 + .../client/web/server/DemoClientService.java | 3 + .../server/DemoBusinessObjectFactory.java | 1 + .../demo/server/DemoSampleServerPlugin.java | 2 + .../plugin/demo/server/DemoServer.java | 4 + .../plugin/demo/server/DemoServerLogger.java | 3 + ...AbstractGenericEntityRegistrationForm.java | 2 + .../application/ClientPluginFactory.java | 15 +- .../client/application/GeneralImportForm.java | 1 + .../application/GenericViewContext.java | 1 + .../dataset/AbstractDataSetsSection.java | 2 + .../application/dataset/DataViewSection.java | 3 + .../GenericDataSetBatchUpdateForm.java | 1 + .../dataset/GenericDataSetEditForm.java | 13 ++ .../dataset/GenericDataSetViewer.java | 9 + ...stractExperimentBatchRegistrationForm.java | 1 + ...ractGenericExperimentRegisterEditForm.java | 2 + .../experiment/ExperimentDataSetBrowser.java | 1 + .../experiment/ExperimentPropertiesPanel.java | 2 + .../experiment/ExperimentSamplesSection.java | 4 +- .../experiment/GenericExperimentViewer.java | 8 + ...AbstractMaterialBatchRegistrationForm.java | 1 + .../material/GenericMaterialViewer.java | 4 + ...AbstractGenericSampleRegisterEditForm.java | 4 + .../sample/EntityConnectionTypeProvider.java | 3 + .../GenericSampleBatchRegistrationForm.java | 2 + .../sample/GenericSampleBatchUpdateForm.java | 1 + .../sample/GenericSampleViewer.java | 6 + .../sample/SampleDataSetBrowser.java | 1 + .../client/web/server/DataSetLoader.java | 1 + .../client/web/server/ExperimentLoader.java | 1 + .../web/server/GenericClientService.java | 23 ++- .../client/web/server/MaterialLoader.java | 1 + .../web/server/UpdatedExperimentLoader.java | 1 + .../parser/MaterialUploadSectionsParser.java | 2 + .../UpdatedDataSetParserObjectFactory.java | 12 +- .../server/AbstractGenericServerPlugin.java | 1 + .../server/ExperimentBatchRegistration.java | 4 + .../generic/server/ExperimentBatchUpdate.java | 4 + .../server/GenericBusinessObjectFactory.java | 12 ++ .../server/GenericDataSetServerPlugin.java | 1 + .../GenericDataSetTypeSlaveServerPlugin.java | 2 + .../server/GenericSampleServerPlugin.java | 1 + .../GenericSampleTypeSlaveServerPlugin.java | 3 + .../plugin/generic/server/GenericServer.java | 33 +++- .../generic/server/GenericServerLogger.java | 23 +++ .../query/client/api/v1/QueryApiFacade.java | 9 + .../application/ClientPluginFactory.java | 2 + .../application/DisplayTypeIDGenerator.java | 2 + .../web/client/application/QueryModule.java | 4 + .../client/application/QuerySectionPanel.java | 4 + .../client/application/QueryViewContext.java | 1 + .../locator/QueryLocatorResolver.java | 1 + .../application/module/QueryBrowserGrid.java | 7 +- .../module/QueryDatabaseSelectionWidget.java | 1 + .../application/module/QueryEditor.java | 18 +- .../module/QueryModuleDatabaseMenuItem.java | 6 + .../module/QuerySelectionWidget.java | 1 + .../application/module/QueryViewer.java | 6 + .../module/RunCannedQueryToolbar.java | 11 +- .../module/RunCustomQueryToolbar.java | 6 + .../application/module/SQLQueryField.java | 1 + .../client/web/server/QueryClientService.java | 11 ++ .../cisd/openbis/plugin/query/server/DAO.java | 2 + .../QueryDatabaseDefinitionProvider.java | 3 + .../plugin/query/server/QueryServer.java | 9 + .../query/server/QueryServerLogger.java | 8 + .../query/server/api/v1/QueryApiLogger.java | 9 + .../query/server/api/v1/QueryApiServer.java | 10 + .../authorization/AuthorizationChecker.java | 1 + .../result_filter/DataSetGroupLoader.java | 1 + .../result_filter/ExperimentGroupLoader.java | 1 + .../result_filter/GroupLoaderFactory.java | 1 + .../result_filter/SampleGroupLoader.java | 1 + .../query/shared/basic/dto/QueryDatabase.java | 1 + .../shared/basic/dto/QueryExpression.java | 3 + .../application/FileFormatTypeGridTest.java | 7 +- .../web/client/application/SearchCommand.java | 1 + .../web/client/application/SearchTest.java | 1 + .../application/VocabularyBrowserTest.java | 5 +- .../application/locator/OpenViewCommand.java | 1 + .../client/application/ui/ActivateTab.java | 1 + .../application/ui/InvokeActionMenu.java | 1 + .../web/client/application/ui/Login.java | 1 + .../web/client/application/ui/Logout.java | 1 + .../ui/amc/CreateAuthorizationGroup.java | 7 +- .../application/ui/amc/CreateGroup.java | 6 +- .../application/ui/amc/CreatePerson.java | 5 +- .../application/ui/amc/FillAddPersonForm.java | 4 +- .../ui/amc/FillRoleAssignmentForm.java | 8 +- .../application/ui/amc/RemovePerson.java | 1 + .../ui/amc/ShowAuthorizationGroup.java | 1 + .../application/ui/data/ShowDataSet.java | 3 +- .../ui/data/ShowDataSetEditor.java | 4 +- .../experiment/ChooseTypeOfNewExperiment.java | 4 +- .../ui/experiment/ListExperiments.java | 4 +- .../ui/experiment/ShowExperiment.java | 1 + .../ui/experiment/ShowExperimentEditor.java | 4 +- .../filter/ApplyFilterCommand.java | 4 +- .../filter/CheckFiltersTableCommand.java | 5 +- .../ui/material/ListMaterials.java | 4 +- .../project/FillProjectRegistrationForm.java | 4 +- .../FillPropertyTypeAssignmentForm.java | 10 +- .../FillPropertyTypeRegistrationForm.java | 4 +- .../ui/sample/ChooseTypeOfNewSample.java | 4 +- .../ui/sample/ExportSamplesTestCommand.java | 2 + .../application/ui/sample/ListSamples.java | 6 +- .../application/ui/sample/ShowSample.java | 1 + .../ui/search/FillSearchCriteria.java | 4 +- .../FillVocabularyRegistrationForm.java | 1 + .../AbstractDefaultTestCommand.java | 2 + .../testframework/AbstractGWTTestCase.java | 3 + .../testframework/AbstractProperty.java | 8 + .../ChangeTableColumnSettingsCommand.java | 1 + .../testframework/CheckTableCommand.java | 1 + .../testframework/FailureExpectation.java | 3 + .../web/client/testframework/GWTTestUtil.java | 9 + .../client/testframework/RemoteConsole.java | 4 + .../WaitForAllActiveCallbacksFinish.java | 1 + .../client/testframework/WidgetPicker.java | 1 + .../ViewLocatorResolverRegistryTest.java | 1 + .../web/server/CommonClientServiceTest.java | 2 + .../server/calculator/RowCalculatorTest.java | 5 + .../resultset/CachedResultSetManagerTest.java | 9 + .../server/util/CustomColumnUtilsTest.java | 5 + .../web/server/util/FilterUtilsTest.java | 5 + .../generic/server/AbstractServerTest.java | 1 + .../generic/server/ETLServiceTest.java | 4 + ...GeneralInformationChangingServiceTest.java | 1 + .../api/v1/GeneralInformationServiceTest.java | 4 + .../authorization/AuthorizationTestUtil.java | 4 + .../server/business/bo/CollectionMatcher.java | 2 + .../server/business/bo/DataBOTest.java | 2 + .../server/business/bo/DataSetTableTest.java | 6 + .../bo/EntityPropertiesConverterTest.java | 1 + .../server/business/bo/SampleBOTest.java | 2 + .../server/business/bo/VocabularyBOTest.java | 1 + .../bo/datasetlister/DatasetListerTest.java | 5 + .../DynamicPropertyEvaluatorTest.java | 1 + .../datasetlister/DataSetListerTest.java | 1 + .../AbstractBatchIteratorTest.java | 4 +- .../DatabaseInstanceImporterTest.java | 2 + .../db/AbstractDAOWithoutContextTest.java | 1 + .../dataaccess/db/EntityTypeDAOTest.java | 1 + .../server/dataaccess/db/EventDAOTest.java | 1 + .../dataaccess/db/SqlDataMigrationTest.java | 1 + .../DataSetRegistrationSummaryTaskTest.java | 3 +- .../generic/server/util/TestInitializer.java | 1 + .../generic/shared/RegressionTestCase.java | 1 + .../shared/basic/utils/GroupByMapTest.java | 1 + .../coreplugin/CorePluginScannerTest.java | 1 + .../UpdatedSampleParserObjectFactoryTest.java | 4 +- .../generic/shared/util/CacheManagerTest.java | 1 + .../application/dataset/CheckDataSet.java | 3 + .../dataset/FillDataSetEditForm.java | 6 +- .../dataset/GenericDataSetEditorTest.java | 1 + .../client/application/dataset/Property.java | 1 + .../experiment/CheckExperiment.java | 3 + .../experiment/DownloadAttachment.java | 1 + .../experiment/FillExperimentEditForm.java | 9 +- .../FillExperimentRegistrationForm.java | 4 +- ...nericExperimentAttachmentDownloadTest.java | 3 + .../GenericExperimentRegistrationTest.java | 3 +- .../GenericExperimentViewerTest.java | 2 + .../application/experiment/Property.java | 1 + .../application/sample/CheckSample.java | 3 + .../sample/FillSampleRegistrationForm.java | 8 +- .../sample/GenericSampleRegistrationTest.java | 3 +- .../sample/GenericSampleViewerTest.java | 5 +- .../client/application/sample/Property.java | 2 + .../web/server/GenericClientServiceTest.java | 17 ++ ...UpdatedDataSetParserObjectFactoryTest.java | 40 ++-- .../generic/server/GenericServerTest.java | 4 + .../DateBasedSearchesThroughJsonApiTest.java | 6 + .../GeneralInformationServiceJsonApiTest.java | 4 + ...atchMaterialRegistrationAndUpdateTest.java | 1 + .../systemtest/DataSetListingTest.java | 1 + .../openbis/systemtest/DeletionTestCase.java | 1 + .../openbis/systemtest/HistoryRowMapper.java | 1 + .../systemtest/PropertiesHistoryTest.java | 1 + .../systemtest/SamplesListingTest.java | 1 + .../openbis/systemtest/SystemTestCase.java | 2 + .../api/v1/GeneralInformationServiceTest.java | 6 + .../DynamicPropertiesEvaluationTest.java | 4 + .../generic/ExperimentRegistrationTest.java | 2 + .../plugin/query/QueryEditingTest.java | 1 + 769 files changed, 3651 insertions(+), 161 deletions(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/Assignment.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/Assignment.java index ab30c30a156..124c26d82b4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/Assignment.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/Assignment.java @@ -28,6 +28,7 @@ class Assignment implements ICommand private static final String MANDATORY = "mandatory"; + @Override public void execute(ICommonServer server, String sessionToken, ScriptContext context, String argument) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterDataSetType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterDataSetType.java index fdda49e35c8..d76edf79c3d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterDataSetType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterDataSetType.java @@ -31,6 +31,7 @@ class RegisterDataSetType extends AbstractRegisterEntityType<DataSetType> implem { DESCRIPTION("description") { + @Override public void setAttributeFor(DataSetType type, String value) { type.setDescription(value); @@ -39,6 +40,7 @@ class RegisterDataSetType extends AbstractRegisterEntityType<DataSetType> implem }, PATTERN("main-pattern") { + @Override public void setAttributeFor(DataSetType type, String value) { type.setMainDataSetPattern(value); @@ -47,6 +49,7 @@ class RegisterDataSetType extends AbstractRegisterEntityType<DataSetType> implem }, PATH("main-path") { + @Override public void setAttributeFor(DataSetType type, String value) { type.setMainDataSetPath(value); @@ -61,11 +64,13 @@ class RegisterDataSetType extends AbstractRegisterEntityType<DataSetType> implem this.attributeName = attributeName; } + @Override public String getAttributeName() { return attributeName; } + @Override public void setDefaultFor(DataSetType type) { } @@ -88,6 +93,7 @@ class RegisterDataSetType extends AbstractRegisterEntityType<DataSetType> implem return attributeSetters; } + @Override public void execute(ICommonServer server, String sessionToken, ScriptContext context, String argument) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterExperimentType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterExperimentType.java index 667d732a52d..72d9c6bb7ea 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterExperimentType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterExperimentType.java @@ -32,6 +32,7 @@ public class RegisterExperimentType extends AbstractRegisterEntityType<Experimen { DESCRIPTION("description") { + @Override public void setAttributeFor(ExperimentType experimentType, String value) { experimentType.setDescription(value); @@ -45,11 +46,13 @@ public class RegisterExperimentType extends AbstractRegisterEntityType<Experimen this.attributeName = attributeName; } + @Override public String getAttributeName() { return attributeName; } + @Override public void setDefaultFor(ExperimentType type) { } @@ -72,6 +75,7 @@ public class RegisterExperimentType extends AbstractRegisterEntityType<Experimen return attributeSetters; } + @Override public void execute(ICommonServer server, String sessionToken, ScriptContext context, String argument) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterMaterialType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterMaterialType.java index 56b42bd0f14..27ce1f057b5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterMaterialType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterMaterialType.java @@ -32,6 +32,7 @@ public class RegisterMaterialType extends AbstractRegisterEntityType<MaterialTyp { DESCRIPTION("description") { + @Override public void setAttributeFor(MaterialType materialType, String value) { materialType.setDescription(value); @@ -45,11 +46,13 @@ public class RegisterMaterialType extends AbstractRegisterEntityType<MaterialTyp this.attributeName = attributeName; } + @Override public String getAttributeName() { return attributeName; } + @Override public void setDefaultFor(MaterialType type) { } @@ -72,6 +75,7 @@ public class RegisterMaterialType extends AbstractRegisterEntityType<MaterialTyp return attributeSetters; } + @Override public void execute(ICommonServer server, String sessionToken, ScriptContext context, String argument) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterPropertyType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterPropertyType.java index 5fcf3dd654e..946953cdd66 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterPropertyType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterPropertyType.java @@ -46,6 +46,7 @@ public class RegisterPropertyType implements ICommand && tokens.get(3).equals(TYPE); } + @Override public void execute(ICommonServer server, String sessionToken, ScriptContext context, String argument) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterSampleType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterSampleType.java index 9e05e078a99..6dd5d231aff 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterSampleType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterSampleType.java @@ -31,6 +31,7 @@ public class RegisterSampleType extends AbstractRegisterEntityType<SampleType> i { DESCRIPTION("description") { + @Override public void setAttributeFor(SampleType sampleType, String value) { sampleType.setDescription(value); @@ -39,6 +40,7 @@ public class RegisterSampleType extends AbstractRegisterEntityType<SampleType> i LISTABLE("listable") { + @Override public void setAttributeFor(SampleType sampleType, String value) { sampleType.setListable(Boolean.parseBoolean(value)); @@ -47,6 +49,7 @@ public class RegisterSampleType extends AbstractRegisterEntityType<SampleType> i SHOW_CONTAINER("show-container") { + @Override public void setAttributeFor(SampleType sampleType, String value) { sampleType.setShowContainer(Boolean.parseBoolean(value)); @@ -55,6 +58,7 @@ public class RegisterSampleType extends AbstractRegisterEntityType<SampleType> i SHOW_PARENTS("show-parents") { + @Override public void setAttributeFor(SampleType sampleType, String value) { sampleType.setShowParents(Boolean.parseBoolean(value)); @@ -63,6 +67,7 @@ public class RegisterSampleType extends AbstractRegisterEntityType<SampleType> i UNIQUE_SUBCODES("unique-subcodes") { + @Override public void setAttributeFor(SampleType sampleType, String value) { sampleType.setSubcodeUnique(Boolean.parseBoolean(value)); @@ -71,6 +76,7 @@ public class RegisterSampleType extends AbstractRegisterEntityType<SampleType> i AUTO_GENERATE_CODES("auto-generate-codes") { + @Override public void setAttributeFor(SampleType sampleType, String value) { sampleType.setAutoGeneratedCode(Boolean.parseBoolean(value)); @@ -79,6 +85,7 @@ public class RegisterSampleType extends AbstractRegisterEntityType<SampleType> i GENERATED_CODES_PREFIX("generated-codes-prefix") { + @Override public void setAttributeFor(SampleType sampleType, String value) { sampleType.setGeneratedCodePrefix(value); @@ -98,11 +105,13 @@ public class RegisterSampleType extends AbstractRegisterEntityType<SampleType> i this.attributeName = attributeName; } + @Override public String getAttributeName() { return attributeName; } + @Override public void setDefaultFor(SampleType sampleType) { } @@ -125,6 +134,7 @@ public class RegisterSampleType extends AbstractRegisterEntityType<SampleType> i return attributeSetters; } + @Override public void execute(ICommonServer server, String sessionToken, ScriptContext context, String argument) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterType.java index 3c4f510dfd4..8a7b0f57ac7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/RegisterType.java @@ -37,6 +37,7 @@ class RegisterType implements ICommand commands.put("MATERIAL", new RegisterMaterialType()); } + @Override public void execute(ICommonServer server, String sessionToken, ScriptContext context, String argument) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/Set.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/Set.java index f73e7650cd6..7ff7c841f17 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/Set.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/console/Set.java @@ -26,6 +26,7 @@ import ch.systemsx.cisd.openbis.generic.shared.ICommonServer; class Set implements ICommand { + @Override public void execute(ICommonServer server, String sessionToken, ScriptContext context, String argument) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AbstractAsyncCallback.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AbstractAsyncCallback.java index da2c68c2da0..ff8bdf158be 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AbstractAsyncCallback.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AbstractAsyncCallback.java @@ -207,6 +207,7 @@ public abstract class AbstractAsyncCallback<T> implements AsyncCallback<T> // AsyncCallback // + @Override public final void onFailure(final Throwable caught) { if (isIncompatibleServerException(caught)) @@ -316,10 +317,12 @@ public abstract class AbstractAsyncCallback<T> implements AsyncCallback<T> }); } + @Override public final void onSuccess(final T result) { performSuccessActionOrIgnore(new IDelegatedAction() { + @Override public void execute() { doOnSuccess(result); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AbstractClientPluginFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AbstractClientPluginFactory.java index 198ceff7bb5..931f93167cf 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AbstractClientPluginFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AbstractClientPluginFactory.java @@ -49,11 +49,13 @@ public abstract class AbstractClientPluginFactory<V extends IViewContext<? exten return viewContext; } + @Override public final IModule tryGetModule() { return module; } + @Override public boolean isEnabled() { return true; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AbstractPluginViewContext.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AbstractPluginViewContext.java index a5bd28f469e..83dc5a6f9a8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AbstractPluginViewContext.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AbstractPluginViewContext.java @@ -79,56 +79,67 @@ public abstract class AbstractPluginViewContext<T extends IClientServiceAsync> i // IViewContext // + @Override public final T getService() { return service; } + @Override public String getPropertyOrNull(String key) { return getPropertyOrNull(this, key); } + @Override public final IViewContext<ICommonClientServiceAsync> getCommonViewContext() { return commonViewContext; } + @Override public final ICommonClientServiceAsync getCommonService() { return commonViewContext.getService(); } + @Override public final GenericViewModel getModel() { return commonViewContext.getModel(); } + @Override public void initDisplaySettingsManager() { commonViewContext.initDisplaySettingsManager(); } + @Override public DisplaySettingsManager getDisplaySettingsManager() { return commonViewContext.getDisplaySettingsManager(); } + @Override public final IPageController getPageController() { return commonViewContext.getPageController(); } + @Override public final IClientPluginFactoryProvider getClientPluginFactoryProvider() { return commonViewContext.getClientPluginFactoryProvider(); } + @Override public final IGenericImageBundle getImageBundle() { return commonViewContext.getImageBundle(); } + @Override public boolean isDebuggingEnabled() { return commonViewContext.isDebuggingEnabled(); @@ -137,35 +148,41 @@ public abstract class AbstractPluginViewContext<T extends IClientServiceAsync> i // -------- IProfilingTable delegate /** @see IProfilingTable#log */ + @Override public int log(String description) { return commonViewContext.log(description); } + @Override public void log(int taskId, String description) { commonViewContext.log(taskId, description); } /** @see IProfilingTable#logStop */ + @Override public void logStop(int taskId) { commonViewContext.logStop(taskId); } /** @see IProfilingTable#clearLog */ + @Override public void clearLog() { commonViewContext.clearLog(); } /** @see IProfilingTable#getLoggedEvents() */ + @Override public List<String> getLoggedEvents() { return commonViewContext.getLoggedEvents(); } /** @see IProfilingTable#isLoggingEnabled() */ + @Override public boolean isLoggingEnabled() { return commonViewContext.isLoggingEnabled(); @@ -174,18 +191,21 @@ public abstract class AbstractPluginViewContext<T extends IClientServiceAsync> i // -------- IMessageProvider delegate /** @see IMessageProvider#containsKey(String) */ + @Override public boolean containsKey(String key) { return commonViewContext.containsKey(key); } /** @see IMessageProvider#getMessage(String, Object...) */ + @Override public String getMessage(String key, Object... parameters) { return commonViewContext.getMessage(key, parameters); } /** @see IMessageProvider#getName() */ + @Override public String getName() { return commonViewContext.getName(); @@ -193,11 +213,13 @@ public abstract class AbstractPluginViewContext<T extends IClientServiceAsync> i // -------- + @Override public void addMessageSource(String messageSource) { commonViewContext.addMessageSource(messageSource); } + @Override public ViewLocatorResolverRegistry getLocatorResolverRegistry() { // Delegate to the common view context @@ -212,6 +234,7 @@ public abstract class AbstractPluginViewContext<T extends IClientServiceAsync> i } + @Override public boolean isSimpleOrEmbeddedMode() { return commonViewContext.isSimpleOrEmbeddedMode(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AsyncCallbackWithProgressBar.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AsyncCallbackWithProgressBar.java index 7673d615455..c7453397a5a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AsyncCallbackWithProgressBar.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/AsyncCallbackWithProgressBar.java @@ -36,10 +36,12 @@ public class AsyncCallbackWithProgressBar<T> implements AsyncCallback<T> { final AsyncCallback<Void> dummyCallback = new AsyncCallback<Void>() { + @Override public void onFailure(Throwable caught) { } + @Override public void onSuccess(Void result) { } @@ -49,6 +51,7 @@ public class AsyncCallbackWithProgressBar<T> implements AsyncCallback<T> return new IDelegatedAction() { + @Override public void execute() { progressCallback.onSuccess(null); @@ -76,12 +79,14 @@ public class AsyncCallbackWithProgressBar<T> implements AsyncCallback<T> this.progressBar = createAndShowProgressBar(progressMessage); } + @Override public void onFailure(Throwable caught) { progressBar.hide(); decoratedCallback.onFailure(caught); } + @Override public void onSuccess(T result) { progressBar.hide(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/CallbackListenerAdapter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/CallbackListenerAdapter.java index 516be6e2d10..9cdd735f6b5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/CallbackListenerAdapter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/CallbackListenerAdapter.java @@ -34,11 +34,13 @@ public class CallbackListenerAdapter<T> implements ICallbackListener<T> // ICallbackListener // + @Override public void finishOnSuccessOf(final AbstractAsyncCallback<T> callback, final T result) { } + @Override public void onFailureOf(final IMessageProvider messageProvider, final AbstractAsyncCallback<T> callback, final String failureMessage, final Throwable throwable) @@ -46,10 +48,12 @@ public class CallbackListenerAdapter<T> implements ICallbackListener<T> } + @Override public void registerCallback(AbstractAsyncCallback<?> callback) { } + @Override public void ignoreCallback(AbstractAsyncCallback<?> callback) { } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Client.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Client.java index bf45071dcc3..5f118fcc5e8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Client.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Client.java @@ -104,6 +104,7 @@ public class Client implements EntryPoint, ValueChangeHandler<String> // // IPageController // + @Override public final void reload(final boolean logout) { if (logout) @@ -183,6 +184,7 @@ public class Client implements EntryPoint, ValueChangeHandler<String> controllers.add(controller); } + @Override public final void onModuleLoad() { onModuleLoad(WindowUtils.createOpenUrlController()); @@ -372,11 +374,13 @@ public class Client implements EntryPoint, ValueChangeHandler<String> new AsyncCallback<Void>() { + @Override public void onSuccess(Void result) { History.newItem(lastHistoryOrNull); } + @Override public void onFailure(Throwable reason) { // Do not try to open the last history location @@ -438,6 +442,7 @@ public class Client implements EntryPoint, ValueChangeHandler<String> handlerRegistry.registerHandler(new SampleRegistrationLocatorResolver(context)); } + @Override public void onValueChange(ValueChangeEvent<String> event) { UrlParamsHelper.createNavigateToCurrentUrlAction(viewContext).execute(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/CommonViewContext.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/CommonViewContext.java index f7ca9c0b5f0..52fdf7258f1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/CommonViewContext.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/CommonViewContext.java @@ -124,26 +124,31 @@ public final class CommonViewContext implements IViewContext<ICommonClientServic // IViewContext // + @Override public final ICommonClientServiceAsync getService() { return service; } + @Override public String getTechnology() { return TECHNOLOGY_NAME; } + @Override public String getPropertyOrNull(String key) { return AbstractPluginViewContext.getPropertyOrNull(this, key); } + @Override public final GenericViewModel getModel() { return viewModel; } + @Override public void initDisplaySettingsManager() { final DisplaySettings loggedUserDisplaySettings = @@ -153,6 +158,7 @@ public final class CommonViewContext implements IViewContext<ICommonClientServic .getApplicationInfo().getWebClientConfiguration()); } + @Override public DisplaySettingsManager getDisplaySettingsManager() { assert displaySettingsManager != null : "displaySettingsManager not initialized"; @@ -164,6 +170,7 @@ public final class CommonViewContext implements IViewContext<ICommonClientServic { IDelegatedAction settingsUpdater = new IDelegatedAction() { + @Override public void execute() { service.updateDisplaySettings(displaySettings, new VoidAsyncCallback<Void>( @@ -173,54 +180,64 @@ public final class CommonViewContext implements IViewContext<ICommonClientServic return new DisplaySettingsManager(displaySettings, settingsUpdater, this); } + @Override public final IGenericImageBundle getImageBundle() { return imageBundle; } + @Override public final IPageController getPageController() { return pageController; } + @Override public final IClientPluginFactoryProvider getClientPluginFactoryProvider() { return clientPluginFactoryProvider; } + @Override public final IViewContext<ICommonClientServiceAsync> getCommonViewContext() { return this; } /** @see IMessageProvider#containsKey(String) */ + @Override public boolean containsKey(String key) { return messageProvider.containsKey(key); } /** @see IMessageProvider#getMessage(String, Object...) */ + @Override public String getMessage(String key, Object... parameters) { return messageProvider.getMessage(key, parameters); } /** @see IMessageProvider#getName() */ + @Override public String getName() { return messageProvider.getName(); } + @Override public ICommonClientServiceAsync getCommonService() { return getService(); } + @Override public void addMessageSource(String messageSource) { messageProvider.add(new DictonaryBasedMessageProvider(messageSource)); } + @Override public ViewLocatorResolverRegistry getLocatorResolverRegistry() { return locatorHandlerRegistry; @@ -228,41 +245,49 @@ public final class CommonViewContext implements IViewContext<ICommonClientServic // ----- delegation to profilingTable + @Override public final void clearLog() { profilingTable.clearLog(); } + @Override public final List<String> getLoggedEvents() { return profilingTable.getLoggedEvents(); } + @Override public final int log(String description) { return profilingTable.log(description); } + @Override public void log(int taskId, String description) { profilingTable.log(taskId, description); } + @Override public final void logStop(int taskId) { profilingTable.logStop(taskId); } + @Override public boolean isLoggingEnabled() { return profilingTable.isLoggingEnabled(); } + @Override public boolean isDebuggingEnabled() { return isDebuggingEnabled; } + @Override public boolean isSimpleOrEmbeddedMode() { return ClientStaticState.isSimpleMode(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/FormPanelListener.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/FormPanelListener.java index 2317fd13e40..7acf5ffd605 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/FormPanelListener.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/FormPanelListener.java @@ -54,6 +54,7 @@ abstract public class FormPanelListener implements Listener<FormEvent> } } + @Override public final void handleEvent(final FormEvent be) { final String msg = be.getResultHtml(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/GlobalSearchTabItemFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/GlobalSearchTabItemFactory.java index 37759a3b76b..396c6a9a6f3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/GlobalSearchTabItemFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/GlobalSearchTabItemFactory.java @@ -79,6 +79,7 @@ public class GlobalSearchTabItemFactory { private boolean firstCall = true; + @Override public void postRefresh(boolean wasSuccessful) { if (firstCall == false) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ManagedPropertySection.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ManagedPropertySection.java index 23864349be5..c477855709b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ManagedPropertySection.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ManagedPropertySection.java @@ -60,20 +60,24 @@ public class ManagedPropertySection extends DisposableTabContent private static final IDisposableComponent DUMMY_CONTENT = new IDisposableComponent() { + @Override public void update(Set<DatabaseModificationKind> observedModifications) { } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.EMPTY_ARRAY; } + @Override public Component getComponent() { return new ContentPanel(); } + @Override public void dispose() { } @@ -105,11 +109,13 @@ public class ManagedPropertySection extends DisposableTabContent setIds(new IDisplayTypeIDGenerator() { + @Override public String createID(String suffix) { return createID() + suffix; } + @Override public String createID() { return ID_PREFIX + gridIdSuffix; @@ -163,20 +169,24 @@ public class ManagedPropertySection extends DisposableTabContent final Html htmlComponent = extractHtmlComponent(); return new IDisposableComponent() { + @Override public void update(Set<DatabaseModificationKind> observedModifications) { } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.EMPTY_ARRAY; } + @Override public Component getComponent() { return htmlComponent; } + @Override public void dispose() { @@ -206,6 +216,7 @@ public class ManagedPropertySection extends DisposableTabContent final IManagedPropertyGridInformationProvider gridInfo = new IManagedPropertyGridInformationProvider() { + @Override public String getKey() { return gridIdSuffix; @@ -216,6 +227,7 @@ public class ManagedPropertySection extends DisposableTabContent new IOnGridComponentGeneratedAction() { + @Override public void execute(IDisposableComponent gridComponent) { replaceContent(gridComponent); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/MatchingEntitiesPanel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/MatchingEntitiesPanel.java index 66eca7e3c5d..1dc81bfc053 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/MatchingEntitiesPanel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/MatchingEntitiesPanel.java @@ -99,12 +99,14 @@ public final class MatchingEntitiesPanel extends TypedTableGrid<MatchingEntity> ICellListenerAndLinkGenerator<MatchingEntity> listenerLinkGenerator = new ICellListenerAndLinkGenerator<MatchingEntity>() { + @Override public void handle(TableModelRowWithObject<MatchingEntity> rowItem, boolean specialKeyPressed) { showEntityViewer(rowItem, false, specialKeyPressed); } + @Override public String tryGetLink(MatchingEntity entity, ISerializableComparable comparableValue) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ProjectViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ProjectViewer.java index 4d2f0546d90..4f7482cfb81 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ProjectViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ProjectViewer.java @@ -84,6 +84,7 @@ public final class ProjectViewer extends AbstractViewer<IEntityInformationHolder } addToolBarButton(createDeleteButton(new IDelegatedAction() { + @Override public void execute() { new ProjectListDeletionConfirmationDialog(viewContext, originalProject, @@ -197,11 +198,13 @@ public final class ProjectViewer extends AbstractViewer<IEntityInformationHolder ProjectGrid.showEntityViewer(originalProject, true, viewContext, inBackground); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { reloadAllData(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.PROJECT); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchableEntitySelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchableEntitySelectionWidget.java index b7205ee1397..3384efa2547 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchableEntitySelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchableEntitySelectionWidget.java @@ -91,6 +91,7 @@ final class SearchableEntitySelectionWidget extends callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.EMPTY_ARRAY; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ShowResultSetCutInfo.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ShowResultSetCutInfo.java index 100d5ab54fa..d57e4a09f77 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ShowResultSetCutInfo.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ShowResultSetCutInfo.java @@ -30,6 +30,7 @@ public class ShowResultSetCutInfo<T extends IResultSetHolder<?>> implements IOnS this.viewContext = viewContext; } + @Override public void execute(T result) { if (result != null diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/AbstractDatabaseModificationObserverWithCallback.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/AbstractDatabaseModificationObserverWithCallback.java index b4eaa8dd73b..344dd3b64a2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/AbstractDatabaseModificationObserverWithCallback.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/AbstractDatabaseModificationObserverWithCallback.java @@ -30,6 +30,7 @@ public abstract class AbstractDatabaseModificationObserverWithCallback implement private IDelegatedAction action; + @Override public final void setSuccessfulUpdateCallback(IDelegatedAction action) { this.action = action; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/CompositeDatabaseModificationObserver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/CompositeDatabaseModificationObserver.java index 4af39ab4786..9383ae7e538 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/CompositeDatabaseModificationObserver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/CompositeDatabaseModificationObserver.java @@ -55,6 +55,7 @@ public class CompositeDatabaseModificationObserver implements IDatabaseModificat } } + @Override public DatabaseModificationKind[] getRelevantModifications() { Set<DatabaseModificationKind> relevantModifications = @@ -66,6 +67,7 @@ public class CompositeDatabaseModificationObserver implements IDatabaseModificat return relevantModifications.toArray(DatabaseModificationKind.EMPTY_ARRAY); } + @Override public void update(final Set<DatabaseModificationKind> observedModifications) { for (IDatabaseModificationObserver observer : registeredObservers) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/CompositeDatabaseModificationObserverWithMainObserver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/CompositeDatabaseModificationObserverWithMainObserver.java index e932cb8e798..965b317e556 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/CompositeDatabaseModificationObserverWithMainObserver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/CompositeDatabaseModificationObserverWithMainObserver.java @@ -60,6 +60,7 @@ public class CompositeDatabaseModificationObserverWithMainObserver extends { mainObserver.setSuccessfulUpdateCallback(new IDelegatedAction() { + @Override public void execute() { updateOtherObservers(observedModifications); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DatabaseModificationAwareObject.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DatabaseModificationAwareObject.java index 05f32deef80..659c2795ae0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DatabaseModificationAwareObject.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DatabaseModificationAwareObject.java @@ -46,11 +46,13 @@ public class DatabaseModificationAwareObject<T> implements IDatabaseModification return new IDatabaseModificationObserver() { + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.EMPTY_ARRAY; } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { // do nothing @@ -71,11 +73,13 @@ public class DatabaseModificationAwareObject<T> implements IDatabaseModification return modificationObserver; } + @Override public DatabaseModificationKind[] getRelevantModifications() { return modificationObserver.getRelevantModifications(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { modificationObserver.update(observedModifications); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DebugPanelManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DebugPanelManager.java index 43511636617..494ac9621bc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DebugPanelManager.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DebugPanelManager.java @@ -66,6 +66,7 @@ public class DebugPanelManager implements DebugPanelWidget.Listener } // @Override + @Override public void onShow() { panelComponent.reset(sm = @@ -80,6 +81,7 @@ public class DebugPanelManager implements DebugPanelWidget.Listener } // @Override + @Override public void onReset() { sys.removeListener(sm); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DefaultTabItem.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DefaultTabItem.java index 8235423717a..b7d5050f995 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DefaultTabItem.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DefaultTabItem.java @@ -127,6 +127,7 @@ public class DefaultTabItem implements ITabItem { return new IDelegatedAction() { + @Override public void execute() { disposableComponent.dispose(); @@ -156,21 +157,25 @@ public class DefaultTabItem implements ITabItem // // ITabItem // + @Override public final Component getComponent() { return component; } + @Override public final TabTitleUpdater getTabTitleUpdater() { return titleUpdater; } + @Override public boolean isCloseConfirmationNeeded() { return isCloseConfirmationNeeded; } + @Override public void onActivate(String linkOrNull) { if (linkOrNull != null) @@ -188,6 +193,7 @@ public class DefaultTabItem implements ITabItem GWTUtils.updatePageTitle(getTabTitleUpdater().getCurrentTitle()); } + @Override public void onClose() { if (disposerActionOrNull != null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DisplaySettingsManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DisplaySettingsManager.java index 451674ad4f3..e066628e5e4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DisplaySettingsManager.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DisplaySettingsManager.java @@ -86,6 +86,7 @@ public class DisplaySettingsManager { return new IDelayedUpdater() { + @Override public void executeDelayed(int delayMs) { // in simple view mode or anonymous login settings are temporary - don't @@ -96,6 +97,7 @@ public class DisplaySettingsManager { final DelayedTask delayedTask = new DelayedTask(new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent event) { settingsUpdater.execute(); @@ -103,6 +105,7 @@ public class DisplaySettingsManager }); return new IDelayedUpdater() { + @Override public void executeDelayed(int delayMs) { delayedTask.delay(delayMs); @@ -135,6 +138,7 @@ public class DisplaySettingsManager { Listener<ColumnModelEvent> listener = new Listener<ColumnModelEvent>() { + @Override public void handleEvent(ColumnModelEvent event) { if (event.getType() == Events.ColumnMove) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DisplayTypeIDGenerator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DisplayTypeIDGenerator.java index 04e1550fd9f..36eaf88488e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DisplayTypeIDGenerator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/DisplayTypeIDGenerator.java @@ -125,11 +125,13 @@ public enum DisplayTypeIDGenerator implements IDisplayTypeIDGenerator this.genericNameOrPrefix = genericNameOrPrefix; } + @Override public String createID() { return genericNameOrPrefix; } + @Override public String createID(String suffix) { return createID() + suffix; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/HtmlPage.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/HtmlPage.java index ab88fe973b5..26c8dbf1cb0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/HtmlPage.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/HtmlPage.java @@ -68,11 +68,13 @@ public class HtmlPage extends HTML private final class HelpRequestCallback implements RequestCallback { + @Override public final void onError(final Request request, final Throwable ex) { displayException(ex); } + @Override public final void onResponseReceived(final Request request, final Response response) { displayHelp(response.getText()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/LoginPage.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/LoginPage.java index fa8021baaa3..4870acf671a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/LoginPage.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/LoginPage.java @@ -22,9 +22,10 @@ import com.google.gwt.user.client.ui.Anchor; import com.google.gwt.user.client.ui.CellPanel; import com.google.gwt.user.client.ui.DockPanel; import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.HasHorizontalAlignment; +import com.google.gwt.user.client.ui.HasVerticalAlignment; import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.Widget; import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; @@ -52,7 +53,7 @@ final class LoginPage extends com.google.gwt.user.client.ui.VerticalPanel setSpacing(CELL_SPACING); setWidth("100%"); this.setHeight("100%"); - setHorizontalAlignment(VerticalPanel.ALIGN_CENTER); + setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); final Widget loginPanel = createLoginPanel(viewContext); final Anchor logo = createLogo(viewContext); final Widget footerPanel = createFooter(viewContext); @@ -66,7 +67,7 @@ final class LoginPage extends com.google.gwt.user.client.ui.VerticalPanel add(northPanel); add(loginPanel); add(footerPanel); - this.setCellVerticalAlignment(footerPanel, VerticalPanel.ALIGN_BOTTOM); + this.setCellVerticalAlignment(footerPanel, HasVerticalAlignment.ALIGN_BOTTOM); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/MainPagePanel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/MainPagePanel.java index bac5bcc448d..e9302e20fb7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/MainPagePanel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/MainPagePanel.java @@ -64,6 +64,7 @@ public class MainPagePanel extends ContentPanel implements IMainPanel return WelcomePanelHelper.createWelcomePanel(viewContext, PREFIX); } + @Override public final void open(final AbstractTabItemFactory tabItemFactory) { GWTUtils.updatePageTitle(tabItemFactory.getTabTitle()); @@ -73,6 +74,7 @@ public class MainPagePanel extends ContentPanel implements IMainPanel layout(); } + @Override public final void reset() { if (content != null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/MainTabPanel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/MainTabPanel.java index e8cda2d5d8a..8122bf741e1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/MainTabPanel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/framework/MainTabPanel.java @@ -90,6 +90,7 @@ public class MainTabPanel extends TabPanel implements IMainPanel DefaultTabItem.createWithUpdater(BLANK_TAB_TITLE, mainComponent, new IDelegatedAction() { + @Override public void execute() { mainComponent.removeAll(); @@ -121,6 +122,7 @@ public class MainTabPanel extends TabPanel implements IMainPanel * be generated out of given {@link ITabItem}. * </p> */ + @Override public final void open(final AbstractTabItemFactory tabItemFactory) { boolean inBackground = tabItemFactory.isInBackground(); @@ -165,6 +167,7 @@ public class MainTabPanel extends TabPanel implements IMainPanel } /** closes all opened tabs */ + @Override public final void reset() { for (TabItem openTab : new ArrayList<TabItem>(openTabs.values())) @@ -313,6 +316,7 @@ public class MainTabPanel extends TabPanel implements IMainPanel { return new Listener<ComponentEvent>() { + @Override public final void handleEvent(final ComponentEvent be) { if (be.getType() == AppEvents.CloseViewer) @@ -327,6 +331,7 @@ public class MainTabPanel extends TabPanel implements IMainPanel { return new Listener<TabPanelEvent>() { + @Override public final void handleEvent(final TabPanelEvent be) { if (be.getType().equals(Events.Close)) @@ -341,6 +346,7 @@ public class MainTabPanel extends TabPanel implements IMainPanel { return new Listener<TabPanelEvent>() { + @Override public final void handleEvent(final TabPanelEvent be) { if (be.getType().equals(Events.Select)) @@ -355,6 +361,7 @@ public class MainTabPanel extends TabPanel implements IMainPanel { return new Listener<TabPanelEvent>() { + @Override public void handleEvent(final TabPanelEvent be) { be.setCancelled(true); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/AbstractViewLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/AbstractViewLocatorResolver.java index 37d7c3d5dc8..f3dfa08eb7a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/AbstractViewLocatorResolver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/AbstractViewLocatorResolver.java @@ -25,11 +25,13 @@ public abstract class AbstractViewLocatorResolver implements IViewLocatorResolve this.handledAction = handledAction; } + @Override public boolean canHandleLocator(ViewLocator locator) { return handledAction.equals(locator.tryGetAction()); } + @Override public void locatorExists(ViewLocator locator, AsyncCallback<Void> callback) { callback.onSuccess(null); @@ -128,6 +130,7 @@ public abstract class AbstractViewLocatorResolver implements IViewLocatorResolve this.callback = callback; } + @Override public final void onSuccess(T result) { if (result != null) @@ -139,6 +142,7 @@ public abstract class AbstractViewLocatorResolver implements IViewLocatorResolve } } + @Override public final void onFailure(Throwable caught) { callback.onFailure(null); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/AttachmentDownloadLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/AttachmentDownloadLocatorResolver.java index 9ac52fd6b2c..149235be833 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/AttachmentDownloadLocatorResolver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/AttachmentDownloadLocatorResolver.java @@ -30,6 +30,7 @@ public class AttachmentDownloadLocatorResolver extends AbstractViewLocatorResolv this.viewContext = viewContext; } + @Override public void resolve(ViewLocator locator) throws UserFailureException { String entityKindValueOrNull = locator.tryGetEntity(); @@ -130,16 +131,19 @@ public class AttachmentDownloadLocatorResolver extends AbstractViewLocatorResolv return new IAttachmentHolder() { + @Override public AttachmentHolderKind getAttachmentHolderKind() { return attachmentHolderKind; } + @Override public Long getId() { return result.getId(); } + @Override public String getCode() { return result.getCode(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/BrowserLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/BrowserLocatorResolver.java index 7aaebf89125..5ee7c47a659 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/BrowserLocatorResolver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/BrowserLocatorResolver.java @@ -30,6 +30,7 @@ public class BrowserLocatorResolver extends AbstractViewLocatorResolver this.viewContext = viewContext; } + @Override public void resolve(ViewLocator locator) throws UserFailureException { EntityKind entityKind = getEntityKind(locator); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/GlobalSearchLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/GlobalSearchLocatorResolver.java index 87ff512707c..f5348074d2d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/GlobalSearchLocatorResolver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/GlobalSearchLocatorResolver.java @@ -29,6 +29,7 @@ public class GlobalSearchLocatorResolver extends AbstractViewLocatorResolver } + @Override public void resolve(ViewLocator locator) throws UserFailureException { final SearchableEntity selectedSearchableEntity = getSearchableEntity(locator); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/HomeLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/HomeLocatorResolver.java index b5317301edb..2d03e98742b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/HomeLocatorResolver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/HomeLocatorResolver.java @@ -30,6 +30,7 @@ public class HomeLocatorResolver extends AbstractViewLocatorResolver this.viewContext = viewContext; } + @Override public void resolve(final ViewLocator locator) throws UserFailureException { DispatcherHelper.dispatchNaviEvent(new AbstractTabItemFactory() diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/MaterialLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/MaterialLocatorResolver.java index 4d87d61b763..07e89e68297 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/MaterialLocatorResolver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/MaterialLocatorResolver.java @@ -52,6 +52,7 @@ public class MaterialLocatorResolver extends AbstractViewLocatorResolver } } + @Override public void resolve(ViewLocator locator) throws UserFailureException { // If there is exactly one material matching given parameters open its detail view, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/OpenViewAction.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/OpenViewAction.java index 7cd2629760d..c07fafb004c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/OpenViewAction.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/OpenViewAction.java @@ -44,6 +44,7 @@ public class OpenViewAction implements IDelegatedAction return registry.canResolve(viewLocator) == false; } + @Override public void execute() { openView(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/PermlinkLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/PermlinkLocatorResolver.java index 5ad0f698bf7..5bfb17f6b2f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/PermlinkLocatorResolver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/PermlinkLocatorResolver.java @@ -42,6 +42,7 @@ public class PermlinkLocatorResolver extends AbstractViewLocatorResolver callback.onFailure(null); } + @Override public void resolve(ViewLocator locator) throws UserFailureException { // If a permlink has been specified, open a viewer on the specified diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/ProjectLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/ProjectLocatorResolver.java index da10ccb173c..abbdae6a27c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/ProjectLocatorResolver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/ProjectLocatorResolver.java @@ -54,6 +54,7 @@ public class ProjectLocatorResolver extends AbstractViewLocatorResolver } } + @Override public void resolve(ViewLocator locator) throws UserFailureException { assert (PROJECT.equals(locator.tryGetEntity())); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/SampleRegistrationLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/SampleRegistrationLocatorResolver.java index be0e6822c76..17cf2b5b4c3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/SampleRegistrationLocatorResolver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/SampleRegistrationLocatorResolver.java @@ -41,6 +41,7 @@ public class SampleRegistrationLocatorResolver extends AbstractViewLocatorResolv this.viewContext = viewContext; } + @Override public void resolve(final ViewLocator locator) throws UserFailureException { SampleRegistrationConfig config = new SampleRegistrationConfig(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/SampleSearchLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/SampleSearchLocatorResolver.java index e5a8ef735c9..d2d2b800a66 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/SampleSearchLocatorResolver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/SampleSearchLocatorResolver.java @@ -79,12 +79,14 @@ public class SampleSearchLocatorResolver this.historyToken = historyToken; } + @Override public final void onFailure(Throwable caught) { // Error in the search -- notify the user MessageBox.alert("Error", caught.getMessage(), null); } + @Override public final void onSuccess(ResultSetWithEntityTypes<Sample> result) { // If the search found just one sample, show it in the details view. If many samples diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/SearchLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/SearchLocatorResolver.java index 27439c82e03..f295d4ea1ce 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/SearchLocatorResolver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/SearchLocatorResolver.java @@ -45,6 +45,7 @@ public class SearchLocatorResolver extends AbstractViewLocatorResolver this.viewContext = viewContext; } + @Override public void resolve(ViewLocator locator) throws UserFailureException { // Extract the search criteria from the ViewLocator and dispatch to a resolver that can diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/ActionMenu.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/ActionMenu.java index 24a00c84275..46b072e77f5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/ActionMenu.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/ActionMenu.java @@ -67,6 +67,7 @@ public class ActionMenu extends MenuItem { this(actionMenu, messageProvider, new IDelegatedAction() { + @Override public void execute() { if (messageProvider instanceof IViewContext<?>) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/TabActionMenuItemFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/TabActionMenuItemFactory.java index e27084388ad..379ed1357f3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/TabActionMenuItemFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/TabActionMenuItemFactory.java @@ -35,11 +35,13 @@ public class TabActionMenuItemFactory { IActionMenuItem menuItem = new IActionMenuItem() { + @Override public String getMenuId() { return widgetIDPrefix + "_" + definition.getName(); } + @Override public String getMenuText(IMessageProvider messageProvider) { return messageProvider.getMessage(definition.getName() + "_menu_item"); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/TopMenu.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/TopMenu.java index 02cf78bf2ea..0eac739769a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/TopMenu.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/TopMenu.java @@ -80,11 +80,13 @@ public class TopMenu extends LayoutContainer VOCABULARY_MENU_BROWSE, VOCABULARY_MENU_NEW, GENERAL_IMPORT_MENU, CUSTOM_IMPORT_MENU; + @Override public String getMenuId() { return ID + "_" + this.name(); } + @Override public String getMenuText(IMessageProvider messageProvider) { return messageProvider.getMessage(this.name()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/administration/AdministrationMenu.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/administration/AdministrationMenu.java index 9071cb2b4d2..f00127c208c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/administration/AdministrationMenu.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/administration/AdministrationMenu.java @@ -59,6 +59,7 @@ public class AdministrationMenu extends TopMenuItem setMenu(submenu); submenu.addListener(Events.BeforeHide, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { viewContext.log("start hiding menu '" + getText() + "'"); @@ -66,6 +67,7 @@ public class AdministrationMenu extends TopMenuItem }); submenu.addListener(Events.Hide, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { viewContext.log("finished hiding menu '" + getText() + "'"); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/modules/ModulesMenu.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/modules/ModulesMenu.java index 74f3326bc28..79ceff936c3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/modules/ModulesMenu.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/modules/ModulesMenu.java @@ -88,6 +88,7 @@ public class ModulesMenu extends TopMenuItem implements IModuleInitializationObs } } + @Override public void notify(List<IModule> successfullyInitializedModules) { addModuleItems(successfullyInitializedModules); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/LoggedUserMenu.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/LoggedUserMenu.java index 1da819f8f6b..fa22fd14382 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/LoggedUserMenu.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/LoggedUserMenu.java @@ -99,6 +99,7 @@ public final class LoggedUserMenu extends TopMenuItem // all tabs will be closed after reset of display settings return new IDelegatedAction() { + @Override public void execute() { final IMainPanel tabPanelOrNull = componentProvider.tryGetMainTabPanel(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/AboutBoxAction.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/AboutBoxAction.java index ad170e2f6f2..5a6c4fe03a7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/AboutBoxAction.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/AboutBoxAction.java @@ -35,6 +35,7 @@ public class AboutBoxAction implements IDelegatedAction this.viewContext = viewContext; } + @Override public void execute() { MessageBox diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/ChangeUserSettingsAction.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/ChangeUserSettingsAction.java index 6c44f2df8b3..6cd4ba278ed 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/ChangeUserSettingsAction.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/ChangeUserSettingsAction.java @@ -42,10 +42,12 @@ public class ChangeUserSettingsAction implements IDelegatedAction this.onDisplaySettingsResetAction = onDisplaySettingsResetAction; } + @Override public void execute() { IDelegatedAction saveCallback = new IDelegatedAction() { + @Override public void execute() { menu.refreshTitle(); @@ -53,6 +55,7 @@ public class ChangeUserSettingsAction implements IDelegatedAction }; IDelegatedAction resetCallback = new IDelegatedAction() { + @Override public void execute() { onDisplaySettingsResetAction.execute(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/LoginAction.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/LoginAction.java index c3a804bcc16..122d580e51e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/LoginAction.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/LoginAction.java @@ -21,6 +21,7 @@ public final class LoginAction implements IDelegatedAction logoutAction = new LogoutAction(viewContext); } + @Override public void execute() { UrlBuilder urlBuilder = Window.Location.createUrlBuilder(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/LogoutAction.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/LogoutAction.java index 4810609ff39..d2051bbedad 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/LogoutAction.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/menu/user/action/LogoutAction.java @@ -34,6 +34,7 @@ public class LogoutAction implements IDelegatedAction this.viewContext = viewContext; } + @Override public void execute() { DisplaySettings displaySettings = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/DataSetTypeModel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/DataSetTypeModel.java index f6c0f931808..f7eb5569866 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/DataSetTypeModel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/DataSetTypeModel.java @@ -24,7 +24,6 @@ import com.extjs.gxt.ui.client.data.ModelData; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.renderer.TooltipRenderer; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityType; -import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType; /** * {@link ModelData} for {@link DataSetType}. @@ -73,7 +72,7 @@ public class DataSetTypeModel extends SimplifiedBaseModelData private static DataSetTypeModel createTypeInFileModel() { final DataSetType typeInFile = new DataSetType(); - typeInFile.setCode(SampleType.DEFINED_IN_FILE); + typeInFile.setCode(EntityType.DEFINED_IN_FILE); return new DataSetTypeModel(typeInFile); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/MaterialTypeModel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/MaterialTypeModel.java index 5f752285688..2042763d337 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/MaterialTypeModel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/MaterialTypeModel.java @@ -22,6 +22,7 @@ import java.util.List; import com.extjs.gxt.ui.client.data.ModelData; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.renderer.TooltipRenderer; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.MaterialType; /** @@ -81,7 +82,7 @@ public class MaterialTypeModel extends SimplifiedBaseModelData private static MaterialTypeModel createTypeInFileModel() { final MaterialType typeInFile = new MaterialType(); - typeInFile.setCode(MaterialType.DEFINED_IN_FILE); + typeInFile.setCode(EntityType.DEFINED_IN_FILE); return new MaterialTypeModel(typeInFile); } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/SampleTypeModel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/SampleTypeModel.java index b9e290dec09..db05ec7f652 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/SampleTypeModel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/SampleTypeModel.java @@ -22,6 +22,7 @@ import java.util.List; import com.extjs.gxt.ui.client.data.ModelData; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.renderer.TooltipRenderer; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType; /** @@ -88,7 +89,7 @@ public class SampleTypeModel extends SimplifiedBaseModelData private static SampleTypeModel createTypeInFileModel() { final SampleType typeInFile = new SampleType(); - typeInFile.setCode(SampleType.DEFINED_IN_FILE); + typeInFile.setCode(EntityType.DEFINED_IN_FILE); typeInFile.setListable(false); return new SampleTypeModel(typeInFile); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/VocabularyTermModel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/VocabularyTermModel.java index 95d4a0ad2ca..6305222a54b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/VocabularyTermModel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/VocabularyTermModel.java @@ -84,6 +84,7 @@ public class VocabularyTermModel extends SimplifiedBaseModel implements // // Comparable // + @Override public int compareTo(VocabularyTermModel o) { if (isOfficial() == o.isOfficial()) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/plugin/ClientPluginAdapter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/plugin/ClientPluginAdapter.java index b42bdb86769..5043d784b1c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/plugin/ClientPluginAdapter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/plugin/ClientPluginAdapter.java @@ -39,27 +39,32 @@ public class ClientPluginAdapter<E extends BasicEntityType, I extends IIdAndCode // IClientPlugin // + @Override public Widget createBatchRegistrationForEntityType(final E entityType) { throw new UnsupportedOperationException("Not yet implemented."); } + @Override public Widget createBatchUpdateForEntityType(E entityType) { throw new UnsupportedOperationException("Not yet implemented."); } + @Override public AbstractTabItemFactory createEntityViewer(final IEntityInformationHolderWithPermId entity) { throw new UnsupportedOperationException("Not yet implemented."); } + @Override public DatabaseModificationAwareWidget createRegistrationForEntityType(final E entityType, final ActionContext context) { throw new UnsupportedOperationException("Not yet implemented."); } + @Override public AbstractTabItemFactory createEntityEditor(I identifiable) { throw new UnsupportedOperationException("Not yet implemented."); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/plugin/DefaultClientPluginFactoryProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/plugin/DefaultClientPluginFactoryProvider.java index 2140647c198..5532ae04f1c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/plugin/DefaultClientPluginFactoryProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/plugin/DefaultClientPluginFactoryProvider.java @@ -98,6 +98,7 @@ public class DefaultClientPluginFactoryProvider implements IClientPluginFactoryP // // IClientPluginFactoryProvider // + @Override public final IClientPluginFactory getClientPluginFactory(final EntityKind entityKind, final BasicEntityType entityType) { @@ -131,6 +132,7 @@ public class DefaultClientPluginFactoryProvider implements IClientPluginFactoryP return modules; } + @Override public void registerModuleInitializationObserver(IModuleInitializationObserver observer) { ModuleInitializationController.createAndInitialize(getUninitializedModules()).addObserver( diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/plugin/ModuleInitializationController.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/plugin/ModuleInitializationController.java index 73ffb754edc..3478659e9f6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/plugin/ModuleInitializationController.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/plugin/ModuleInitializationController.java @@ -138,11 +138,13 @@ public class ModuleInitializationController this.module = module; } + @Override public void onFailure(Throwable caught) { controller.onInitializationFailure(caught, module); } + @Override public void onSuccess(Void result) { controller.onInitializationSuccess(module); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/LinkRenderer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/LinkRenderer.java index 90a3191f280..1515e83b308 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/LinkRenderer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/LinkRenderer.java @@ -62,6 +62,7 @@ public class LinkRenderer { return new GridCellRenderer<BaseEntityModel<?>>() { + @Override public Object render(BaseEntityModel<?> model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BaseEntityModel<?>> store, Grid<BaseEntityModel<?>> grid) @@ -98,6 +99,7 @@ public class LinkRenderer { return new GridCellRenderer<BaseEntityModel<?>>() { + @Override @SuppressWarnings("deprecation") public Object render(BaseEntityModel<?> model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BaseEntityModel<?>> store, @@ -154,6 +156,7 @@ public class LinkRenderer return new GridCellRenderer<BaseEntityModel<?>>() { + @Override public Object render(BaseEntityModel<?> model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BaseEntityModel<?>> store, Grid<BaseEntityModel<?>> grid) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/MaterialRenderer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/MaterialRenderer.java index 971e05f5622..d1dda0cf04c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/MaterialRenderer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/MaterialRenderer.java @@ -44,6 +44,7 @@ public class MaterialRenderer implements GridCellRenderer<BaseEntityModel<?>> this.columnIndex = columnIndex; } + @Override @SuppressWarnings("deprecation") public Object render(BaseEntityModel<?> model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BaseEntityModel<?>> store, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/MultilineStringCellRenderer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/MultilineStringCellRenderer.java index ac6b8ca6eaf..08de8ca0055 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/MultilineStringCellRenderer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/MultilineStringCellRenderer.java @@ -12,6 +12,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget. public class MultilineStringCellRenderer implements GridCellRenderer<BaseEntityModel<?>> { + @Override public Object render(BaseEntityModel<?> model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BaseEntityModel<?>> store, Grid<BaseEntityModel<?>> grid) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/PersonRenderer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/PersonRenderer.java index e814ea7234f..f64962e97c9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/PersonRenderer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/PersonRenderer.java @@ -56,6 +56,7 @@ public final class PersonRenderer public static final GridCellRenderer<BaseEntityModel<?>> REGISTRATOR_RENDERER = new GridCellRenderer<BaseEntityModel<?>>() { + @Override @SuppressWarnings("unchecked") public Object render(BaseEntityModel<?> model, String property, ColumnData config, int rowIndex, int colIndex, @@ -75,6 +76,7 @@ public final class PersonRenderer public static final GridCellRenderer<BaseEntityModel<?>> MODIFIER_RENDERER = new GridCellRenderer<BaseEntityModel<?>>() { + @Override @SuppressWarnings("unchecked") public Object render(BaseEntityModel<?> model, String property, ColumnData config, int rowIndex, int colIndex, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/RealNumberRenderer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/RealNumberRenderer.java index 43c93d3e1f7..260c3b4fc59 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/RealNumberRenderer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/RealNumberRenderer.java @@ -74,11 +74,13 @@ public final class RealNumberRenderer implements GridCellRenderer<BaseEntityMode this.realNumberFormatingParameters = realNumberFormatingParameters; } + @Override public String render(float value) { return render("" + value, realNumberFormatingParameters, false); } + @Override public Object render(BaseEntityModel<?> model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BaseEntityModel<?>> store, Grid<BaseEntityModel<?>> grid) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/TimestampStringCellRenderer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/TimestampStringCellRenderer.java index ad7305fbe81..2a071207bf1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/TimestampStringCellRenderer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/TimestampStringCellRenderer.java @@ -37,6 +37,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.BasicConstant; public class TimestampStringCellRenderer implements GridCellRenderer<BaseEntityModel<?>> { + @Override public Object render(BaseEntityModel<?> model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BaseEntityModel<?>> store, Grid<BaseEntityModel<?>> grid) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/VocabularyTermStringCellRenderer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/VocabularyTermStringCellRenderer.java index 57e755749bd..312fd6b45a2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/VocabularyTermStringCellRenderer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/VocabularyTermStringCellRenderer.java @@ -25,6 +25,7 @@ public class VocabularyTermStringCellRenderer implements GridCellRenderer<BaseEn this.columnIndex = columnIndex; } + @Override public Object render(BaseEntityModel<?> model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BaseEntityModel<?>> store, Grid<BaseEntityModel<?>> grid) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/YesNoRenderer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/YesNoRenderer.java index 6637289941a..7fdeadc1598 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/YesNoRenderer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/YesNoRenderer.java @@ -17,6 +17,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.SimpleYesNoRenderer; public final class YesNoRenderer implements GridCellRenderer<ModelData> { + @Override public Object render(ModelData model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<ModelData> store, Grid<ModelData> grid) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/customcolumn/core/CustomColumnStringRenderer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/customcolumn/core/CustomColumnStringRenderer.java index a3bf7131007..6b44c117ac7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/customcolumn/core/CustomColumnStringRenderer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/renderer/customcolumn/core/CustomColumnStringRenderer.java @@ -32,6 +32,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.PrimitiveValue; public class CustomColumnStringRenderer implements GridCellRenderer<BaseEntityModel<?>> { + @Override public Object render(BaseEntityModel<?> model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BaseEntityModel<?>> store, Grid<BaseEntityModel<?>> grid) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractRegistrationForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractRegistrationForm.java index cba88396e44..78c121304fc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractRegistrationForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractRegistrationForm.java @@ -285,11 +285,13 @@ public abstract class AbstractRegistrationForm extends ContentPanel // Listener // + @Override public final void handleEvent(final FieldEvent be) { resetInfoBox(); } + @Override public final void onClick(ClickEvent sender) { resetInfoBox(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewer.java index 74fefd790d4..24da8b5a011 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewer.java @@ -134,6 +134,7 @@ public abstract class AbstractViewer<D extends IEntityInformationHolder> extends result.setId(getId() + ID_EDIT_SUFFIX); result.addListener(Events.Select, new Listener<ButtonEvent>() { + @Override public void handleEvent(ButtonEvent be) { showEntityEditor(be.isShiftKey()); @@ -154,6 +155,7 @@ public abstract class AbstractViewer<D extends IEntityInformationHolder> extends result.setId(getId() + ID_DELETE_SUFFIX); result.addListener(Events.Select, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { deleteAction.execute(); @@ -175,6 +177,7 @@ public abstract class AbstractViewer<D extends IEntityInformationHolder> extends Button result = new Button(viewContext.getMessage(Dict.BUTTON_REVERT_DELETION)); result.addListener(Events.Select, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { revertAction.execute(); @@ -369,6 +372,7 @@ public abstract class AbstractViewer<D extends IEntityInformationHolder> extends } } + @Override public void notify(List<IModule> modules) { moduleSectionManager.initialize(modules); @@ -410,6 +414,7 @@ public abstract class AbstractViewer<D extends IEntityInformationHolder> extends { IDelegatedAction refreshAction = new IDelegatedAction() { + @Override public void execute() { reloadAllData(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewerWithVerticalSplit.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewerWithVerticalSplit.java index 5f43a8ecb70..add2eb78493 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewerWithVerticalSplit.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AbstractViewerWithVerticalSplit.java @@ -99,6 +99,7 @@ public abstract class AbstractViewerWithVerticalSplit<D extends IEntityInformati final String panelId = getLeftPanelId(); getLayout().addListener(Events.Collapse, new Listener<BorderLayoutEvent>() { + @Override public void handleEvent(BorderLayoutEvent be) { viewContext.log(panelId + " Collapsed"); @@ -109,6 +110,7 @@ public abstract class AbstractViewerWithVerticalSplit<D extends IEntityInformati }); getLayout().addListener(Events.Expand, new Listener<BorderLayoutEvent>() { + @Override public void handleEvent(BorderLayoutEvent be) { viewContext.log(panelId + " Expand"); @@ -119,6 +121,7 @@ public abstract class AbstractViewerWithVerticalSplit<D extends IEntityInformati }); getLayout().addListener(Events.AfterLayout, new Listener<LayoutEvent>() { + @Override public void handleEvent(LayoutEvent le) { final Integer size = panel.getOffsetWidth(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AuthorizationGroupGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AuthorizationGroupGrid.java index 022279757f9..4f6b989519c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AuthorizationGroupGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AuthorizationGroupGrid.java @@ -105,6 +105,7 @@ public class AuthorizationGroupGrid extends TypedTableGrid<AuthorizationGroup> viewContext.getMessage(Dict.BUTTON_SHOW_USERS), new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<AuthorizationGroup>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<AuthorizationGroup>> selectedItem, boolean keyPressed) @@ -137,6 +138,7 @@ public class AuthorizationGroupGrid extends TypedTableGrid<AuthorizationGroup> new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<AuthorizationGroup>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<AuthorizationGroup>> selectedItem, boolean keyPressed) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AuthorizationGroupSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AuthorizationGroupSelectionWidget.java index 791f6039dd3..f1613bc219f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AuthorizationGroupSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/AuthorizationGroupSelectionWidget.java @@ -69,6 +69,7 @@ public final class AuthorizationGroupSelectionWidget extends viewContext.getCommonService().listAuthorizationGroups(callback); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.AUTHORIZATION_GROUP); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/BasicLoginCallback.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/BasicLoginCallback.java index b4dbf54dbd1..ab6a0906526 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/BasicLoginCallback.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/BasicLoginCallback.java @@ -77,6 +77,7 @@ public class BasicLoginCallback extends AbstractAsyncCallback<SessionContext> // Listener // + @Override public void handleEvent(final MessageBoxEvent be) { viewContext.getPageController().reload(false); @@ -104,6 +105,7 @@ public class BasicLoginCallback extends AbstractAsyncCallback<SessionContext> AsyncCallback<Boolean> callback = new AsyncCallback<Boolean>() { + @Override public void onSuccess(Boolean result) { if (result == false) @@ -112,6 +114,7 @@ public class BasicLoginCallback extends AbstractAsyncCallback<SessionContext> } } + @Override public void onFailure(Throwable caught) { cancel(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ColumnSettingsConfigurer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ColumnSettingsConfigurer.java index 1b5a5158e13..6e561404aff 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ColumnSettingsConfigurer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ColumnSettingsConfigurer.java @@ -102,21 +102,25 @@ public class ColumnSettingsConfigurer<T extends Serializable> displaySettingsManager.storeSettings(gridDisplayTypeID, new IDisplaySettingsGetter() { + @Override public Object getModifier() { return browserGrid; } + @Override public List<String> getFilteredColumnIds() { return filteredColumnIds; } + @Override public ColumnModel getColumnModel() { return newColumnModel; } + @Override public SortInfo getSortState() { return browserGrid.getGridSortInfo(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ComponentEventLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ComponentEventLogger.java index 5c6ae0d01b4..7aca7ef2186 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ComponentEventLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ComponentEventLogger.java @@ -62,6 +62,7 @@ public class ComponentEventLogger final Object dummySource = new Object(); component.addListener(eventPair.beforeEvent, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { String id = component.getId(); @@ -84,6 +85,7 @@ public class ComponentEventLogger }); component.addListener(eventPair.afterEvent, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { Object key = be.getSource(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/CustomImportTypeSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/CustomImportTypeSelectionWidget.java index 647cdf67e3a..b0149f7973a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/CustomImportTypeSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/CustomImportTypeSelectionWidget.java @@ -52,6 +52,7 @@ public class CustomImportTypeSelectionWidget extends ModelDataPropertyNames.TOOLTIP)); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] {}; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/LoginPanelAutofill.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/LoginPanelAutofill.java index ae00335e7d5..63795617dc8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/LoginPanelAutofill.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/LoginPanelAutofill.java @@ -95,6 +95,7 @@ public class LoginPanelAutofill extends VerticalPanel formPanel.addSubmitHandler(new SubmitHandler() { + @Override public void onSubmit(SubmitEvent event) { if (!isUserInputValid()) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/PersonSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/PersonSelectionWidget.java index 803680c63bb..3e50b7e216a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/PersonSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/PersonSelectionWidget.java @@ -77,6 +77,7 @@ public final class PersonSelectionWidget extends DropDownList<PersonModel, Perso viewContext.getCommonService().listPersons(callback); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.PERSON); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/PropertyValueRenderers.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/PropertyValueRenderers.java index 7921650f2e0..0f19e3951ae 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/PropertyValueRenderers.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/PropertyValueRenderers.java @@ -269,6 +269,7 @@ public final class PropertyValueRenderers // IPropertyValueRenderer // + @Override public Widget getAsWidget(IEntityProperty object) { // strip error prefix from error message @@ -425,6 +426,7 @@ public final class PropertyValueRenderers // AbstractPropertyValueRenderer // + @Override public FlowPanel getAsWidget(final T entity) { final String displayText = getDisplayText(entity); @@ -467,12 +469,14 @@ public final class PropertyValueRenderers // // AbstractPropertyValueRenderer // + @Override public Widget getAsWidget(final Project project) { final String displayText = project.getIdentifier(); final String href = LinkExtractor.tryExtract(project); final ClickHandler listener = new ClickHandler() { + @Override public void onClick(ClickEvent event) { OpenEntityDetailsTabHelper.open(viewContext, project, @@ -537,6 +541,7 @@ public final class PropertyValueRenderers // AbstractPropertyValueRenderer // + @Override public Widget getAsWidget(String object) { return createMultilineHtmlWidget(object); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/RoleAssignmentGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/RoleAssignmentGrid.java index 58ac03b34cc..12ee4b8e3b0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/RoleAssignmentGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/RoleAssignmentGrid.java @@ -99,6 +99,7 @@ public class RoleAssignmentGrid extends TypedTableGrid<RoleAssignment> new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<RoleAssignment>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<RoleAssignment>> selectedItem, boolean keyPressed) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/RowLayoutManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/RowLayoutManager.java index e9bf01e5c99..abf35d97342 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/RowLayoutManager.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/RowLayoutManager.java @@ -68,26 +68,31 @@ public class RowLayoutManager private static final IManipulator HEIGHT_MANIPULATOR = new IManipulator() { + @Override public void setFor(RowData rowData, double newValue) { rowData.setHeight(newValue); } + @Override public double getFor(RowData rowData) { return rowData.getHeight(); } + @Override public int getFrameSizeFor(ContentPanel panel) { return panel.isRendered() ? panel.getFrameHeight() : 0; } + @Override public int getSize(Container<?> container) { return container.getHeight(); } + @Override public int getPositionFrom(DragEvent dragEvent) { return dragEvent.getY(); @@ -96,26 +101,31 @@ public class RowLayoutManager private static final IManipulator WIDTH_MANIPULATOR = new IManipulator() { + @Override public void setFor(RowData rowData, double newValue) { rowData.setWidth(newValue); } + @Override public double getFor(RowData rowData) { return rowData.getWidth(); } + @Override public int getFrameSizeFor(ContentPanel panel) { return panel.isRendered() ? panel.getFrameWidth() : 0; } + @Override public int getSize(Container<?> container) { return container.getWidth(); } + @Override public int getPositionFrom(DragEvent dragEvent) { return dragEvent.getX(); @@ -172,6 +182,7 @@ public class RowLayoutManager adjustRelative(); Listener<BaseEvent> listener = new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent event) { adjustRelative(); @@ -210,6 +221,7 @@ public class RowLayoutManager { return new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { SplitBar splitBar = new SplitBar(LayoutRegion.NORTH, contentPanel); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/SpaceGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/SpaceGrid.java index f8b833b3542..9f183d3f23b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/SpaceGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/SpaceGrid.java @@ -111,6 +111,7 @@ public class SpaceGrid extends TypedTableGrid<Space> viewContext.getMessage(Dict.BUTTON_EDIT), new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<Space>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<Space>> selectedItem, boolean keyPressed) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/SpaceSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/SpaceSelectionWidget.java index 73505c2eeb5..6a0a2bf36f4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/SpaceSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/SpaceSelectionWidget.java @@ -221,6 +221,7 @@ public class SpaceSelectionWidget extends DropDownList<SpaceModel, Space> callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.SPACE); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/TypedTableGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/TypedTableGrid.java index 73669a34bc6..62903e70417 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/TypedTableGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/TypedTableGrid.java @@ -240,6 +240,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta this.header = header; } + @Override public String tryGetLink(T entity, final ISerializableComparable value) { if (value == null || value.toString().length() == 0) @@ -266,6 +267,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta return LinkExtractor.createPermlink(entityKind, value.toString()); } + @Override public void handle(TableModelRowWithObject<T> rowItem, boolean specialKeyPressed) { ISerializableComparable cellValue = rowItem.getValues().get(header.getIndex()); @@ -341,11 +343,13 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta newValueOrNull == null ? null : StringEscapeUtils.unescapeHtml(newValueOrNull); } + @Override public String getColumnID() { return columnID; } + @Override public String tryGetNewValue() { return newValueOrNull; @@ -476,6 +480,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta grid.addListener(Events.HeaderContextMenu, new Listener<GridEvent<ModelData>>() { + @Override public void handleEvent(final GridEvent<ModelData> ge) { Menu menu = ge.getMenu(); @@ -502,6 +507,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta { return new ICellListener<TableModelRowWithObject<T>>() { + @Override public void handle(TableModelRowWithObject<T> rowItem, boolean keyPressed) { showEntityViewer(rowItem, false, keyPressed); @@ -515,6 +521,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta // - no 'overflow' button when some buttons don't fit into pagingToolbar pagingLoader.addListener(Loader.Load, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { pagingToolbar.syncSize(); @@ -523,6 +530,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta // - hidden paging toolbar pagingToolbar.addListener(Events.AfterLayout, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { contentPanel.syncSize(); @@ -531,6 +539,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta // - bottom toolbar is not resized when new filter row appears filterToolbar.addListener(Events.AfterLayout, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { contentPanel.syncSize(); @@ -666,6 +675,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta { return new IDelegatedAction() { + @Override public void execute() { if (resultSetKeyOrNull != null && pendingFetchManager.hasNoPendingFetch()) @@ -737,6 +747,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta final TypedTableGrid<T> self = this; return new DisposableEntityChooser<TableModelRowWithObject<T>>() { + @Override public List<TableModelRowWithObject<T>> getSelected() { List<BaseEntityModel<TableModelRowWithObject<T>>> items = getSelectedItems(); @@ -749,6 +760,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta return result; } + @Override public void dispose() { debug("dispose a browser"); @@ -759,16 +771,19 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta } } + @Override public Component getComponent() { return mainComponent; } + @Override public DatabaseModificationKind[] getRelevantModifications() { return self.getRelevantModifications(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { self.update(observedModifications); @@ -1004,12 +1019,14 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta { final Listener<MessageBoxEvent> listener = new Listener<MessageBoxEvent>() { + @Override public void handleEvent(MessageBoxEvent me) { if (me.getButtonClicked().getItemId().equals(Dialog.YES)) { tableModificationsManager.saveModifications(new IDelegatedAction() { + @Override public void execute() { // ignore this callback and refresh the table @@ -1167,11 +1184,13 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta final TypedTableGrid<T> delegate = this; return new IBrowserGridActionInvoker() { + @Override public void export(boolean allColumns) { delegate.export(allColumns); } + @Override public void refresh() { int id = log("refresh in action invoker"); @@ -1179,11 +1198,13 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta viewContext.logStop(id); } + @Override public void configure() { delegate.configureColumnSettings(); } + @Override public void toggleFilters(boolean show) { if (show) @@ -1239,6 +1260,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta { return new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<T>>>() { + @Override public void invoke(BaseEntityModel<TableModelRowWithObject<T>> selectedItem, boolean keyPressed) { @@ -1254,6 +1276,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta { return new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<T>>>() { + @Override public void invoke(BaseEntityModel<TableModelRowWithObject<T>> selectedItem, boolean keyPressed) { @@ -1335,6 +1358,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta button.setEnabled(false); addGridSelectionChangeListener(new Listener<SelectionChangedEvent<ModelData>>() { + @Override public void handleEvent(SelectionChangedEvent<ModelData> se) { boolean enabled = se.getSelection().size() > 0; @@ -1352,6 +1376,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta button.setEnabled(false); addGridSelectionChangeListener(new Listener<SelectionChangedEvent<ModelData>>() { + @Override public void handleEvent(SelectionChangedEvent<ModelData> se) { boolean enabled = se.getSelection().size() == 1; @@ -1370,6 +1395,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta { addGridSelectionChangeListener(new Listener<SelectionChangedEvent<ModelData>>() { + @Override public void handleEvent(SelectionChangedEvent<ModelData> se) { boolean noSelected = se.getSelection().size() == 0; @@ -1410,6 +1436,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta { return new IDelegatedAction() { + @Override public void execute() { int id = log("execute refrish grid action"); @@ -1690,21 +1717,25 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta { return new IDisplaySettingsGetter() { + @Override public ColumnModel getColumnModel() { return TypedTableGrid.this.getFullColumnModel(); } + @Override public List<String> getFilteredColumnIds() { return filterToolbar.extractFilteredColumnIds(); } + @Override public Object getModifier() { return TypedTableGrid.this; } + @Override public SortInfo getSortState() { return TypedTableGrid.this.getGridSortInfo(); @@ -1721,6 +1752,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta return filterToolbar.rebuildColumnFilters(filteredColumns); } + @Override public List<IColumnDefinition<TableModelRowWithObject<T>>> getColumnDefinitions( List<String> columnIds) { @@ -1769,6 +1801,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta { return new IDataRefreshCallback() { + @Override public void postRefresh(boolean wasSuccessful) { if (customColumnsMetadataProvider.getHasChangedAndSetFalse()) @@ -1793,6 +1826,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta { return new IDataRefreshCallback() { + @Override public void postRefresh(boolean wasSuccessful) { c1.postRefresh(wasSuccessful); @@ -2039,6 +2073,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta editorGrid.addListener(Events.BeforeEdit, new Listener<GridEvent<BaseEntityModel<TableModelRowWithObject<T>>>>() { + @Override public void handleEvent( GridEvent<BaseEntityModel<TableModelRowWithObject<T>>> event) { @@ -2066,6 +2101,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta editorGrid.addListener(Events.AfterEdit, new Listener<GridEvent<BaseEntityModel<TableModelRowWithObject<T>>>>() { + @Override public void handleEvent( GridEvent<BaseEntityModel<TableModelRowWithObject<T>>> event) { @@ -2093,6 +2129,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta }); editorGrid.addListener(Events.SortChange, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { saveColumnDisplaySettings(); @@ -2290,11 +2327,13 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta // // @Override + @Override public boolean isTableDirty() { return isApplyModificationsComplete() == false; } + @Override public void saveModifications() { saveModifications(null); @@ -2305,6 +2344,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta this.afterSaveActionOrNull = afterSaveAction; } + @Override public void saveModifications(IDelegatedAction afterSaveAction) { setAfterSaveAction(afterSaveAction); @@ -2316,6 +2356,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta } } + @Override public void cancelModifications() { clearModifications(); @@ -2323,6 +2364,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta refresh(); // WORKAROUND remove this refresh after LMS-2397 is resolved } + @Override public void handleEditingEvent(BaseEntityModel<TableModelRowWithObject<T>> model, String columnID, String newValueOrNull) { @@ -2335,6 +2377,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta modificationsForModel.add(new Modification(columnID, newValueOrNull)); } + @Override public AsyncCallback<EntityPropertyUpdatesResult> createApplyModificationsCallback( final BaseEntityModel<TableModelRowWithObject<T>> model, final List<IModification> modifications) @@ -2463,6 +2506,7 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta * * @return id at which grid display settings are saved. */ + @Override public String getGridDisplayTypeID() { return createGridDisplayTypeID(null); @@ -2715,11 +2759,13 @@ public abstract class TypedTableGrid<T extends Serializable> extends LayoutConta return Collections.<String> emptyList(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] {}; } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { refreshGridSilently(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/TypedTableGridColumnDefinitionUI.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/TypedTableGridColumnDefinitionUI.java index 44e34ed2f92..66e82c3f779 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/TypedTableGridColumnDefinitionUI.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/TypedTableGridColumnDefinitionUI.java @@ -56,6 +56,7 @@ public class TypedTableGridColumnDefinitionUI<T extends Serializable> extends this(null, null, null, null, null); } + @Override public int getWidth() { return header.getDefaultColumnWidth(); @@ -66,11 +67,13 @@ public class TypedTableGridColumnDefinitionUI<T extends Serializable> extends this.hidden = hidden; } + @Override public boolean isHidden() { return hidden; } + @Override public boolean isEditable() { return header.isEditable(); @@ -81,6 +84,7 @@ public class TypedTableGridColumnDefinitionUI<T extends Serializable> extends return false; } + @Override public String tryGetLink(TableModelRowWithObject<T> entity) { if (linkGeneratorOrNull == null) @@ -92,18 +96,21 @@ public class TypedTableGridColumnDefinitionUI<T extends Serializable> extends return objectOrNull == null ? null : linkGeneratorOrNull.tryGetLink(objectOrNull, value); } + @Override public boolean isNumeric() { DataTypeCode type = header.getDataType(); return type == DataTypeCode.INTEGER || type == DataTypeCode.REAL; } + @Override public boolean isVocabulary() { DataTypeCode type = header.getDataType(); return type == DataTypeCode.CONTROLLEDVOCABULARY; } + @Override public Vocabulary tryGetVocabulary() { return header.tryGetVocabulary(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddPersonToAuthorizationGroupDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddPersonToAuthorizationGroupDialog.java index 7f2a5c0d2bb..7efacb9aa24 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddPersonToAuthorizationGroupDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddPersonToAuthorizationGroupDialog.java @@ -102,6 +102,7 @@ public class AddPersonToAuthorizationGroupDialog extends AbstractRegistrationDia singlePersonField, multiplePersonsField); radioGroup.addListener(Events.Change, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { GWTUtils.updateVisibleField(singlePersonRadio.getValue(), multiplePersonsRadio diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddRoleAssignmentDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddRoleAssignmentDialog.java index f2ba98f6077..750d23cc08e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddRoleAssignmentDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/AddRoleAssignmentDialog.java @@ -112,6 +112,7 @@ public class AddRoleAssignmentDialog extends AbstractRegistrationDialog radioGroup.addListener(Events.Change, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { GWTUtils.updateVisibleField(personRadio.getValue(), authGroupRadio.getValue(), diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/RoleListBox.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/RoleListBox.java index 73f3f1d364b..4f804cf8e55 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/RoleListBox.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/RoleListBox.java @@ -49,6 +49,7 @@ public class RoleListBox extends ListBox addChangeHandler(new ChangeHandler() { + @Override public final void onChange(final ChangeEvent sender) { updateWidgetsVisibility(groupWidget); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/attachment/AttachmentBrowser.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/attachment/AttachmentBrowser.java index 539f1d9d702..03a5edecb3e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/attachment/AttachmentBrowser.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/attachment/AttachmentBrowser.java @@ -199,6 +199,7 @@ public class AttachmentBrowser extends TypedTableGrid<AttachmentVersions> registerListenerAndLinkGeneratorForAnyMode(AttachmentGridColumnIDs.FILE_NAME, new ICellListenerAndLinkGenerator<AttachmentVersions>() { + @Override public void handle(TableModelRowWithObject<AttachmentVersions> rowItem, boolean specialKeyPressed) { @@ -211,6 +212,7 @@ public class AttachmentBrowser extends TypedTableGrid<AttachmentVersions> AttachmentDownloadHelper.download(fileName, version, attachmentHolder); } + @Override public String tryGetLink(AttachmentVersions entity, ISerializableComparable comparableValue) { @@ -224,6 +226,7 @@ public class AttachmentBrowser extends TypedTableGrid<AttachmentVersions> registerListenerAndLinkGeneratorForAnyMode(AttachmentGridColumnIDs.VERSION, new ICellListenerAndLinkGenerator<AttachmentVersions>() { + @Override public void handle(TableModelRowWithObject<AttachmentVersions> rowItem, boolean keyPressed) { @@ -237,6 +240,7 @@ public class AttachmentBrowser extends TypedTableGrid<AttachmentVersions> showVersionsPanel(fileName, versions, keyPressed); } + @Override public String tryGetLink(AttachmentVersions entity, ISerializableComparable comparableValue) { @@ -316,6 +320,7 @@ public class AttachmentBrowser extends TypedTableGrid<AttachmentVersions> new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<AttachmentVersions>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<AttachmentVersions>> selectedItem, boolean keyPressed) @@ -349,6 +354,7 @@ public class AttachmentBrowser extends TypedTableGrid<AttachmentVersions> { return new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<AttachmentVersions>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<AttachmentVersions>> selectedItem, boolean keyPressed) @@ -547,6 +553,7 @@ public class AttachmentBrowser extends TypedTableGrid<AttachmentVersions> attachmentGrid.addListener(Events.CellClick, new Listener<GridEvent<AttachmentVersionModel>>() { + @Override public void handleEvent(final GridEvent<AttachmentVersionModel> be) { if (ColumnListener.isLinkTarget(be)) @@ -607,6 +614,7 @@ public class AttachmentBrowser extends TypedTableGrid<AttachmentVersions> column.setRenderer(new GridCellRenderer<AttachmentVersionModel>() { + @Override public Object render(AttachmentVersionModel model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<AttachmentVersionModel> store, @@ -635,6 +643,7 @@ public class AttachmentBrowser extends TypedTableGrid<AttachmentVersions> column.setRenderer(new GridCellRenderer<AttachmentVersionModel>() { + @Override public Object render(AttachmentVersionModel model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<AttachmentVersionModel> store, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/columns/specific/GridCustomColumnDefinition.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/columns/specific/GridCustomColumnDefinition.java index 4d796c046ae..b72a7ea05fc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/columns/specific/GridCustomColumnDefinition.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/columns/specific/GridCustomColumnDefinition.java @@ -37,32 +37,38 @@ public class GridCustomColumnDefinition<T> implements IColumnDefinitionUI<T> this.columnMetadata = columnMetadata; } + @Override public int getWidth() { return 150; } + @Override public boolean isHidden() { return true; } + @Override public boolean isNumeric() { DataTypeCode dataType = columnMetadata.getDataType(); return dataType == DataTypeCode.INTEGER || dataType == DataTypeCode.REAL; } + @Override public boolean isVocabulary() { return columnMetadata.getDataType() == DataTypeCode.CONTROLLEDVOCABULARY; } + @Override public Vocabulary tryGetVocabulary() { return null; } + @Override public boolean isEditable() { return false; @@ -73,16 +79,19 @@ public class GridCustomColumnDefinition<T> implements IColumnDefinitionUI<T> return false; } + @Override public DataTypeCode tryToGetDataType() { return null; } + @Override public String tryGetLink(T entity) { return null; } + @Override public Comparable<?> tryGetComparableValue(GridRowModel<T> rowModel) { return getPrimitiveValue(rowModel); @@ -95,22 +104,26 @@ public class GridCustomColumnDefinition<T> implements IColumnDefinitionUI<T> return value; } + @Override public String getValue(GridRowModel<T> rowModel) { String value = getPrimitiveValue(rowModel).toString(); return value != null ? value : ""; } + @Override public String getHeader() { return columnMetadata.getLabel(); } + @Override public String getIdentifier() { return columnMetadata.getCode(); } + @Override public String tryToGetProperty(String key) { return null; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/AbstractExternalDataGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/AbstractExternalDataGrid.java index 492509e0029..3fd598a4a79 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/AbstractExternalDataGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/AbstractExternalDataGrid.java @@ -86,6 +86,7 @@ public abstract class AbstractExternalDataGrid extends AbstractEntityGrid<Extern registerListenerAndLinkGenerator(ExternalDataGridColumnIDs.PROJECT, new ICellListenerAndLinkGenerator<ExternalData>() { + @Override public void handle(TableModelRowWithObject<ExternalData> rowItem, boolean specialKeyPressed) { @@ -96,6 +97,7 @@ public abstract class AbstractExternalDataGrid extends AbstractEntityGrid<Extern specialKeyPressed, href); } + @Override public String tryGetLink(ExternalData entity, ISerializableComparable comparableValue) { @@ -269,6 +271,7 @@ public abstract class AbstractExternalDataGrid extends AbstractEntityGrid<Extern { return new IDelegatedActionWithResult<SelectedAndDisplayedItems>() { + @Override public SelectedAndDisplayedItems execute() { return new SelectedAndDisplayedItems(getSelectedBaseObjects(), @@ -299,6 +302,7 @@ public abstract class AbstractExternalDataGrid extends AbstractEntityGrid<Extern return new GridCellRenderer<BaseEntityModel<?>>() { + @Override public Object render(BaseEntityModel<?> model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BaseEntityModel<?>> store, Grid<BaseEntityModel<?>> grid) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ComputationData.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ComputationData.java index 4c4e316911b..6f8037df528 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ComputationData.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ComputationData.java @@ -53,6 +53,7 @@ class ComputationData implements ISelectedDataSetsProvider return computationAction; } + @Override public List<ExternalData> getSelectedDataSets() { List<TableModelRowWithObject<ExternalData>> selectedItems = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetArchivingMenu.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetArchivingMenu.java index fe32086bd07..56544022b10 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetArchivingMenu.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetArchivingMenu.java @@ -97,11 +97,13 @@ public class DataSetArchivingMenu extends TextToolItem return taskKind; } + @Override public String getMenuId() { return this.name(); } + @Override public String getMenuText(IMessageProvider messageProvider) { return messageProvider.getMessage(this.name()); @@ -121,6 +123,7 @@ public class DataSetArchivingMenu extends TextToolItem { return new IDelegatedAction() { + @Override public void execute() { final SelectedAndDisplayedItems selectedAndDisplayedItems = @@ -168,6 +171,7 @@ public class DataSetArchivingMenu extends TextToolItem return computationAction; } + @Override public List<ExternalData> getSelectedDataSets() { List<ExternalData> selectedDataSets = selectedAndDisplayedItems.getSelectedDataSets(); @@ -181,6 +185,7 @@ public class DataSetArchivingMenu extends TextToolItem { return new IComputationAction() { + @Override public void execute(DatastoreServiceDescription service, boolean computeOnSelected) { DisplayedOrSelectedDatasetCriteria criteria = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetComputeUtils.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetComputeUtils.java index 39889715f6c..b84b6a3df08 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetComputeUtils.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetComputeUtils.java @@ -42,6 +42,7 @@ public class DataSetComputeUtils { return new IDelegatedAction() { + @Override public void execute() { final SelectedAndDisplayedItems selectedAndDisplayedItems = @@ -70,6 +71,7 @@ public class DataSetComputeUtils { return new IComputationAction() { + @Override public void execute(DatastoreServiceDescription service, boolean computeOnSelected) { DisplayedOrSelectedDatasetCriteria criteria = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetProcessingMenu.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetProcessingMenu.java index f7edd59d75d..ca713cfd10a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetProcessingMenu.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetProcessingMenu.java @@ -67,11 +67,13 @@ public class DataSetProcessingMenu extends TextToolItem service, null); final IActionMenuItem menuItemKind = new IActionMenuItem() { + @Override public String getMenuText(IMessageProvider messageProvider) { return service.getLabel(); } + @Override public String getMenuId() { return service.getKey(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetReportGenerator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetReportGenerator.java index 101c3a4a0d2..f907fb7e817 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetReportGenerator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetReportGenerator.java @@ -77,6 +77,7 @@ public class DataSetReportGenerator return new IOnReportComponentGeneratedAction() { + @Override public void execute(final IDisposableComponent reportComponent) { final String reportDate = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetSearchHitGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetSearchHitGrid.java index 15c42954295..b72b0934d8d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetSearchHitGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetSearchHitGrid.java @@ -132,6 +132,7 @@ public class DataSetSearchHitGrid extends AbstractExternalDataGrid implements { return new IOnReportComponentGeneratedAction() { + @Override public void execute(IDisposableComponent newGridComponent) { final LayoutContainer container = containerHolder.getContainer(); @@ -211,6 +212,7 @@ public class DataSetSearchHitGrid extends AbstractExternalDataGrid implements viewContext.getService().searchForDataSets(chosenSearchCriteria, resultSetConfig, callback); } + @Override public void refresh(DetailedSearchCriteria newCriteria, List<PropertyType> propertyTypes) { chosenSearchCriteria = newCriteria; @@ -252,21 +254,25 @@ public class DataSetSearchHitGrid extends AbstractExternalDataGrid implements return containerHolder.getDisposableComponent(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { getDisposableComponent().update(observedModifications); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return getDisposableComponent().getRelevantModifications(); } + @Override public Component getComponent() { return getDisposableComponent().getComponent(); } + @Override public void dispose() { getDisposableComponent().dispose(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetTypeSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetTypeSelectionWidget.java index cede3418ce1..2783456d111 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetTypeSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetTypeSelectionWidget.java @@ -95,6 +95,7 @@ public final class DataSetTypeSelectionWidget extends DropDownList<DataSetTypeMo callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetUploadForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetUploadForm.java index ecd6b75608f..08f57b44428 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetUploadForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/DataSetUploadForm.java @@ -121,6 +121,7 @@ public class DataSetUploadForm extends AbstractRegistrationForm connectedWithSampleCheckbox.addListener(Events.Change, new Listener<FieldEvent>() { + @Override public void handleEvent(FieldEvent be) { updateFieldsVisibility(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/FileFormatTypeGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/FileFormatTypeGrid.java index e49ac91a74a..21090447b17 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/FileFormatTypeGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/FileFormatTypeGrid.java @@ -99,6 +99,7 @@ public class FileFormatTypeGrid extends TypedTableGrid<FileFormatType> new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<FileFormatType>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<FileFormatType>> selectedItem, boolean keyPressed) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/FileFormatTypeSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/FileFormatTypeSelectionWidget.java index fc8e73c5e30..443fc809d9f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/FileFormatTypeSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/FileFormatTypeSelectionWidget.java @@ -97,6 +97,7 @@ public final class FileFormatTypeSelectionWidget extends viewContext.getService().listFileTypes(callback); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.FILE_FORMAT_TYPE); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ReportingPluginSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ReportingPluginSelectionWidget.java index 6813671c7b3..ed3c6cbb51a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ReportingPluginSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ReportingPluginSelectionWidget.java @@ -64,6 +64,7 @@ public class ReportingPluginSelectionWidget extends { return new IDataRefreshCallback() { + @Override public void postRefresh(boolean wasSuccessful) { // hide combo box if there are no services @@ -103,6 +104,7 @@ public class ReportingPluginSelectionWidget extends .listDataStoreServices(DataStoreServiceKind.QUERIES, callback); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[0]; // don't update diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/deletion/DeletionForceOptions.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/deletion/DeletionForceOptions.java index d5bb5737438..fc3afaa20cd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/deletion/DeletionForceOptions.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/deletion/DeletionForceOptions.java @@ -61,6 +61,7 @@ public class DeletionForceOptions extends Composite fieldSet.setExpanded(false); fieldSet.addListener(Events.Collapse, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { forceNotExistingLocations.setValue(false); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/deletion/DeletionGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/deletion/DeletionGrid.java index 4f93f43e7be..cdc5603a698 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/deletion/DeletionGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/deletion/DeletionGrid.java @@ -123,6 +123,7 @@ public class DeletionGrid extends TypedTableGrid<Deletion> allowMultipleSelection(); // we allow revert of multiple deletions addGridSelectionChangeListener(new Listener<SelectionChangedEvent<ModelData>>() { + @Override public void handleEvent(SelectionChangedEvent<ModelData> be) { deletePermanentlyButton.setEnabled(be.getSelection().size() == 1); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/entity_type/AbstractEntityTypeGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/entity_type/AbstractEntityTypeGrid.java index 7bda398c5fe..8b4db03e2af 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/entity_type/AbstractEntityTypeGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/entity_type/AbstractEntityTypeGrid.java @@ -96,6 +96,7 @@ abstract public class AbstractEntityTypeGrid<T extends EntityType> extends Typed new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<T>>>() { + @Override public void invoke(BaseEntityModel<TableModelRowWithObject<T>> selectedItem, boolean keyPressed) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentBrowserGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentBrowserGrid.java index d018b758fbf..dd22513cf05 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentBrowserGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentBrowserGrid.java @@ -177,6 +177,7 @@ public class ExperimentBrowserGrid extends AbstractEntityGrid<Experiment> registerListenerAndLinkGenerator(ExperimentBrowserGridColumnIDs.PROJECT, new ICellListenerAndLinkGenerator<Experiment>() { + @Override public void handle(TableModelRowWithObject<Experiment> rowItem, boolean specialKeyPressed) { @@ -186,6 +187,7 @@ public class ExperimentBrowserGrid extends AbstractEntityGrid<Experiment> specialKeyPressed, href); } + @Override public String tryGetLink(Experiment entity, ISerializableComparable comparableValue) { @@ -265,6 +267,7 @@ public class ExperimentBrowserGrid extends AbstractEntityGrid<Experiment> { return new IDelegatedActionWithResult<SelectedAndDisplayedItems>() { + @Override public SelectedAndDisplayedItems execute() { return new SelectedAndDisplayedItems(getSelectedBaseObjects(), @@ -299,6 +302,7 @@ public class ExperimentBrowserGrid extends AbstractEntityGrid<Experiment> { return new IDelegatedAction() { + @Override public void execute() { if (criteriaProvider.tryGetCriteria() != null) @@ -394,6 +398,7 @@ public class ExperimentBrowserGrid extends AbstractEntityGrid<Experiment> { criteriaProvider.update(observedModifications, new IDataRefreshCallback() { + @Override public void postRefresh(boolean wasSuccessful) { // update the browser @@ -406,6 +411,7 @@ public class ExperimentBrowserGrid extends AbstractEntityGrid<Experiment> { return new IDelegatedActionWithResult<DisplayedAndSelectedExperiments>() { + @Override public DisplayedAndSelectedExperiments execute() { return new DisplayedAndSelectedExperiments(getSelectedBaseObjects(), diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentBrowserToolbar.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentBrowserToolbar.java index 3877176c852..c014eafd299 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentBrowserToolbar.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentBrowserToolbar.java @@ -107,6 +107,7 @@ class ExperimentBrowserToolbar extends ToolBar implements IDisposableComponent, add(selectExperimentTypeCombo); } + @Override public final ListExperimentsCriteria tryGetCriteria() { final ExperimentType selectedType = @@ -134,6 +135,7 @@ class ExperimentBrowserToolbar extends ToolBar implements IDisposableComponent, super.onRender(parent, pos); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] @@ -142,6 +144,7 @@ class ExperimentBrowserToolbar extends ToolBar implements IDisposableComponent, edit(ObjectKind.PROPERTY_TYPE_ASSIGNMENT) }; } + @Override public void update(Set<DatabaseModificationKind> observedModifications, IDataRefreshCallback entityTypeRefreshCallback) { @@ -160,15 +163,18 @@ class ExperimentBrowserToolbar extends ToolBar implements IDisposableComponent, } } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { } + @Override public Component getComponent() { return this; } + @Override public void dispose() { selectExperimentTypeCombo.dispose(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentDataSetArchivingMenu.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentDataSetArchivingMenu.java index ff76840f861..59627d5eb0b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentDataSetArchivingMenu.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentDataSetArchivingMenu.java @@ -103,11 +103,13 @@ public class ExperimentDataSetArchivingMenu extends TextToolItem return taskKind; } + @Override public String getMenuId() { return this.name(); } + @Override public String getMenuText(IMessageProvider messageProvider) { return messageProvider.getMessage(this.name()); @@ -127,6 +129,7 @@ public class ExperimentDataSetArchivingMenu extends TextToolItem { return new IDelegatedAction() { + @Override public void execute() { final SelectedAndDisplayedItems selectedAndDisplayedItems = @@ -174,6 +177,7 @@ public class ExperimentDataSetArchivingMenu extends TextToolItem return computationAction; } + @Override public List<Experiment> getSelectedExperiments() { List<TableModelRowWithObject<Experiment>> items = selectedAndDisplayedItems.getSelectedItems(); @@ -192,6 +196,7 @@ public class ExperimentDataSetArchivingMenu extends TextToolItem { return new IComputationAction() { + @Override public void execute(DatastoreServiceDescription service, boolean computeOnSelected) { DisplayedCriteriaOrSelectedEntityHolder<TableModelRowWithObject<Experiment>> criteria = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentTypeSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentTypeSelectionWidget.java index f7e4ec4b7bc..86a84aa36ae 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentTypeSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ExperimentTypeSelectionWidget.java @@ -93,6 +93,7 @@ public final class ExperimentTypeSelectionWidget extends callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ProjectSelectionTreeGridContainer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ProjectSelectionTreeGridContainer.java index 73181cf55a5..192ad3b960b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ProjectSelectionTreeGridContainer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ProjectSelectionTreeGridContainer.java @@ -238,6 +238,7 @@ public final class ProjectSelectionTreeGridContainer extends LayoutContainer imp final String href = LinkExtractor.tryExtract(project); final ClickHandler listener = new ClickHandler() { + @Override public void onClick(ClickEvent event) { OpenEntityDetailsTabHelper.open(viewContext, project, @@ -436,21 +437,25 @@ public final class ProjectSelectionTreeGridContainer extends LayoutContainer imp GWTUtils.setSelectedItem(tree, ModelDataPropertyNames.CODE, spaceCode); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.PROJECT); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { refreshTree(); } + @Override public Component getComponent() { return this; } + @Override public void dispose() { if (resultSetKey != null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ProjectSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ProjectSelectionWidget.java index b3969ba508d..c157e2656cc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ProjectSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ProjectSelectionWidget.java @@ -195,6 +195,7 @@ public final class ProjectSelectionWidget extends .setSelectedItem(this, ModelDataPropertyNames.PROJECT_IDENTIFIER, projectIdentifier); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.PROJECT); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ChosenEntitySetter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ChosenEntitySetter.java index 154a35ab39b..bba7ff22de0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ChosenEntitySetter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ChosenEntitySetter.java @@ -44,6 +44,7 @@ public abstract class ChosenEntitySetter<T> extends TriggerField<String> impleme listeners.add(listener); } + @Override public void setChosenEntities(List<T> entityOrNull) { if (entityOrNull != null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/DataSetChooserField.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/DataSetChooserField.java index 3e3858607eb..8b03e622e5d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/DataSetChooserField.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/DataSetChooserField.java @@ -78,6 +78,7 @@ public class DataSetChooserField extends ChosenEntitySetter<ExternalData> new IChosenEntitiesSetter<TableModelRowWithObject<ExternalData>>() { + @Override public void setChosenEntities(List<TableModelRowWithObject<ExternalData>> row) { field.setChosenEntities(TableModelRowWithObject.getObjects(row)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/EntityChooserDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/EntityChooserDialog.java index 64587545870..ce661c38a14 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/EntityChooserDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/EntityChooserDialog.java @@ -85,6 +85,7 @@ class EntityChooserDialog<T> extends SimpleDialog { return new IDelegatedAction() { + @Override public void execute() { entityBrowser.dispose(); @@ -99,6 +100,7 @@ class EntityChooserDialog<T> extends SimpleDialog { return new IDelegatedAction() { + @Override public void execute() { entityBrowser.dispose(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ExperimentChooserField.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ExperimentChooserField.java index 9b41feac29d..5610de92f8f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ExperimentChooserField.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ExperimentChooserField.java @@ -75,21 +75,25 @@ public class ExperimentChooserField extends ChosenEntitySetter<TableModelRowWith chooserField.setFieldLabel(labelField); return new ExperimentChooserFieldAdaptor() { + @Override public Field<?> getField() { return chooserField; } + @Override public ExperimentChooserField getChooserField() { return chooserField; } + @Override public ExperimentIdentifier tryToGetValue() { return chooserField.tryGetIdentifier(); } + @Override public void updateOriginalValue() { ExperimentIdentifier valueOrNull = tryToGetValue(); @@ -97,6 +101,7 @@ public class ExperimentChooserField extends ChosenEntitySetter<TableModelRowWith chooserField.setOriginalValue(textValue); } + @Override public void updateValue(ExperimentIdentifier identifierOrNull) { chooserField.updateValue(identifierOrNull); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/HyperlinkField.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/HyperlinkField.java index db6b75e093b..d14c75a2291 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/HyperlinkField.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/HyperlinkField.java @@ -60,6 +60,7 @@ public class HyperlinkField extends VarcharField private final static String DEFAULT_PROTOCOL = "http://"; + @Override public String validate(Field<?> field, final String fieldValue) { // add default protocol if none is provided diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/MultilineVarcharField.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/MultilineVarcharField.java index bfea3cf55b8..e3fc678a474 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/MultilineVarcharField.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/MultilineVarcharField.java @@ -73,6 +73,7 @@ public class MultilineVarcharField extends TextArea { addListener(Events.OnKeyDown, new Listener<FieldEvent>() { + @Override public void handleEvent(FieldEvent be) { if (be.getKeyCode() == KeyCodes.KEY_TAB) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ParameterField.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ParameterField.java index a753d5ff290..85d340e3191 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ParameterField.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ParameterField.java @@ -117,6 +117,7 @@ public class ParameterField extends TriggerField<ModelData> implements IParamete setWidth(100); } + @Override public ParameterWithValue getParameterWithValue() { return new ParameterWithValue(parameterName, getRawValue()); @@ -253,6 +254,7 @@ public class ParameterField extends TriggerField<ModelData> implements IParamete callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[0]; @@ -288,6 +290,7 @@ public class ParameterField extends TriggerField<ModelData> implements IParamete } } + @Override public ParameterWithValue getParameterWithValue() { return new ParameterWithValue(parameterName, getRawValue()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/SampleChooserButton.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/SampleChooserButton.java index 2e983c96efc..bb8aa10d504 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/SampleChooserButton.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/SampleChooserButton.java @@ -106,16 +106,19 @@ public class SampleChooserButton extends Button implements final Field<?> chooserField = new AdapterField(chooserButton); return new SampleChooserButtonAdaptor() { + @Override public Field<?> getField() { return chooserField; } + @Override public SampleChooserButton getChooserButton() { return chooserButton; } + @Override public String getValue() { return chooserButton.getValue(); @@ -150,6 +153,7 @@ public class SampleChooserButton extends Button implements super(buttonText); } + @Override public void setChosenEntities(List<TableModelRowWithObject<Sample>> entities) { if (entities == null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/SampleChooserField.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/SampleChooserField.java index 600e7b0c1fd..4d69130ddeb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/SampleChooserField.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/SampleChooserField.java @@ -95,21 +95,25 @@ public class SampleChooserField extends ChosenEntitySetter<TableModelRowWithObje { return new SampleChooserFieldAdaptor() { + @Override public Field<?> getField() { return chooserField; } + @Override public SampleChooserField getChooserField() { return chooserField; } + @Override public String getValue() { return chooserField.getValue(); } + @Override public void updateOriginalValue() { String valueOrNull = getValue(); @@ -117,6 +121,7 @@ public class SampleChooserField extends ChosenEntitySetter<TableModelRowWithObje chooserField.setOriginalValue(textValue); } + @Override public void updateValue(String identifierOrNull) { chooserField.updateValue(identifierOrNull); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ScriptField.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ScriptField.java index 850d7554ac2..bc90a6f1146 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ScriptField.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/ScriptField.java @@ -17,7 +17,6 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.field; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IMessageProvider; -import ch.systemsx.cisd.openbis.plugin.query.client.web.client.application.Dict; /** * A text area to specify a script. @@ -33,7 +32,7 @@ public class ScriptField extends MultilineVarcharField public ScriptField(IMessageProvider messageProvider) { - super(messageProvider.getMessage(Dict.SCRIPT), true, 20); + super(messageProvider.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.SCRIPT), true, 20); getMessages().setBlankText(BLANK_TEXT_MSG); treatTabKeyAsInput(); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/VocabularyTermSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/VocabularyTermSelectionWidget.java index d129462008c..45c2ccf1c82 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/VocabularyTermSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/VocabularyTermSelectionWidget.java @@ -169,6 +169,7 @@ public class VocabularyTermSelectionWidget extends this.code = code; } + @Override public void execute() { VocabularyTermSelectionWidget.this.typedValueOrNull = code; @@ -180,6 +181,7 @@ public class VocabularyTermSelectionWidget extends private abstract class AddNewTermListener implements Listener<BaseEvent> { + @Override public void handleEvent(BaseEvent be) { if (VocabularyTermSelectionWidget.this.vocabularyOrNull != null && condition()) @@ -338,6 +340,7 @@ public class VocabularyTermSelectionWidget extends callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.VOCABULARY_TERM); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/XmlField.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/XmlField.java index 94d9157a23d..9f86a27bbb3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/XmlField.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/field/XmlField.java @@ -54,6 +54,7 @@ public class XmlField extends MultilineVarcharField /** {@link Validator} that checks if a value is a well formed XML document. */ protected class XMLValidator implements Validator { + @Override public String validate(Field<?> field, final String fieldValue) { // try to parse the value as an XML file - if it fails then it is not a well-formed XML diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/file/AttachmentsFileFieldManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/file/AttachmentsFileFieldManager.java index 18adcf8b353..2ec16529760 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/file/AttachmentsFileFieldManager.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/file/AttachmentsFileFieldManager.java @@ -124,6 +124,7 @@ public class AttachmentsFileFieldManager extends FileFieldManager<AttachmentFile result.sinkEvents(Event.ONCLICK); result.addListener(Events.OnClick, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { AttachmentFileUploadField newField = addField(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnListener.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnListener.java index 55978cfd72a..48657cbdfdd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnListener.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnListener.java @@ -65,6 +65,7 @@ public final class ColumnListener<T, M extends BaseEntityModel<T>> implements * This method does nothing if no cell listener has been registered for column determined by the * event. */ + @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public void handleEvent(GridEvent be) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnSettingsChooser.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnSettingsChooser.java index 2c275f3b3b7..6c6d0280b35 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnSettingsChooser.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnSettingsChooser.java @@ -181,6 +181,7 @@ class ColumnSettingsChooser grid.getSelectionModel().addListener(Events.SelectionChange, new Listener<SelectionChangedEvent<ModelData>>() { + @Override public void handleEvent(SelectionChangedEvent<ModelData> se) { if (grid.getSelectionModel().getSelectedItems().size() == 1) @@ -295,6 +296,7 @@ class ColumnSettingsChooser return LinkRenderer.getLinkWidget(title, new ClickHandler() { + @Override public void onClick(ClickEvent event) { for (ColumnDataModel m : grid.getStore().getModels()) @@ -315,6 +317,7 @@ class ColumnSettingsChooser return LinkRenderer.getLinkWidget(title, new ClickHandler() { + @Override public void onClick(ClickEvent event) { int counter = 0; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnSettingsDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnSettingsDialog.java index 3d331062083..12d47ee8d50 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnSettingsDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnSettingsDialog.java @@ -74,6 +74,7 @@ public class ColumnSettingsDialog extends Dialog TabItem columnsTab = createTabItem(columnChooser.getComponent(), Dict.COLUMNS, ""); columnsTab.addListener(Events.Select, new Listener<TabPanelEvent>() { + @Override public final void handleEvent(final TabPanelEvent be) { columnChooser.refresh(); @@ -101,6 +102,7 @@ public class ColumnSettingsDialog extends Dialog onCloseAction = new IDelegatedAction() { + @Override public void execute() { columnDataModelProvider.onClose(columnChooser.getModels()); @@ -113,6 +115,7 @@ public class ColumnSettingsDialog extends Dialog { onCloseAction = new IDelegatedAction() { + @Override public void execute() { columnDataModelProvider.onClose(columnChooser.getModels()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnUtils.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnUtils.java index fbac66ab910..f637d87fdcc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnUtils.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ColumnUtils.java @@ -162,6 +162,7 @@ public class ColumnUtils editor = new StringBasedCellEditor(materialChooser); materialChooser.addListener(Events.TriggerClick, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { editor.setAllowBlur(true); @@ -170,6 +171,7 @@ public class ColumnUtils materialChooser .addChosenEntityListener(new IChosenEntitiesListener<TableModelRowWithObject<Material>>() { + @Override public void entitiesChosen( List<TableModelRowWithObject<Material>> entities) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ExtendedGridView.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ExtendedGridView.java index be9fb62c8b7..3588cbc6fa4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ExtendedGridView.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ExtendedGridView.java @@ -91,9 +91,9 @@ public class ExtendedGridView extends GridView List<Node> nodes = extractNodes(td); for (Node n : nodes) { - if (Element.is(n)) + if (com.google.gwt.dom.client.Element.is(n)) { - com.google.gwt.dom.client.Element e = Element.as(n); + com.google.gwt.dom.client.Element e = com.google.gwt.dom.client.Element.as(n); if (e.getTagName().equalsIgnoreCase("img") == false) { e.getStyle().setWidth(0, com.google.gwt.dom.client.Style.Unit.PX); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ListColumnFilterWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ListColumnFilterWidget.java index e9b7e31eee0..09607fd2695 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ListColumnFilterWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/ListColumnFilterWidget.java @@ -108,6 +108,7 @@ public class ListColumnFilterWidget<T> extends ComboBox<ModelData> implements { return new DelayedTask(new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { onFilterAction.execute(); @@ -166,6 +167,7 @@ public class ListColumnFilterWidget<T> extends ComboBox<ModelData> implements return models; } + @Override public IColumnFilterWidget<T> createOrRefresh(List<String> distinctValuesOrNull) { if (distinctValuesOrNull == null) @@ -196,6 +198,7 @@ public class ListColumnFilterWidget<T> extends ComboBox<ModelData> implements return (String) model.get(MODEL_VALUE_KEY); } + @Override public GridColumnFilterInfo<T> getFilter() { return new GridColumnFilterInfo<T>(filteredField, tryGetFilterPattern()); @@ -219,16 +222,19 @@ public class ListColumnFilterWidget<T> extends ComboBox<ModelData> implements return pattern; } + @Override public String getFilteredColumnId() { return filteredField.getIdentifier(); } + @Override public void setFilteredField(IColumnDefinition<T> filteredField) { this.filteredField = filteredField; } + @Override public Widget getWidget() { return this; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/TextColumnFilterWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/TextColumnFilterWidget.java index e2458c87982..18e5cf51b42 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/TextColumnFilterWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/TextColumnFilterWidget.java @@ -54,12 +54,14 @@ public class TextColumnFilterWidget<T/* entity */> extends StoreFilterField<Mode setToolTip(label); } + @Override public String getFilteredColumnId() { return filteredField.getIdentifier(); } /** @return filter with the pattern */ + @Override public GridColumnFilterInfo<T> getFilter() { String pattern = getRawValue(); @@ -88,16 +90,19 @@ public class TextColumnFilterWidget<T/* entity */> extends StoreFilterField<Mode return true; // never called } + @Override public Widget getWidget() { return this; } + @Override public void setFilteredField(IColumnDefinition<T> filteredField) { this.filteredField = filteredField; } + @Override public IColumnFilterWidget<T> createOrRefresh(List<String> distinctValuesOrNull) { if (distinctValuesOrNull == null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/entity/PropertyTypesCriteriaProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/entity/PropertyTypesCriteriaProvider.java index 604104a4159..46d1f5a1f3f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/entity/PropertyTypesCriteriaProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/entity/PropertyTypesCriteriaProvider.java @@ -77,6 +77,7 @@ public class PropertyTypesCriteriaProvider implements ICriteriaProvider<Property } } + @Override public PropertyTypesCriteria tryGetCriteria() { if (criteria.tryGetPropertyTypes() == null) @@ -88,11 +89,13 @@ public class PropertyTypesCriteriaProvider implements ICriteriaProvider<Property } } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.PROPERTY_TYPE_ASSIGNMENT); } + @Override public void update(Set<DatabaseModificationKind> observedModifications, IDataRefreshCallback dataRefreshCallback) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/column/GridCustomColumnGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/column/GridCustomColumnGrid.java index 3938b4cf4b0..c0b0445151a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/column/GridCustomColumnGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/column/GridCustomColumnGrid.java @@ -46,6 +46,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDele import ch.systemsx.cisd.openbis.generic.client.web.client.dto.CustomGridColumnGridColumnIDs; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.DefaultResultSetConfig; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.GridRowModels; +import ch.systemsx.cisd.openbis.generic.client.web.client.dto.IResultSetConfig; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.TableExportCriteria; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.TypedTableResultSet; import ch.systemsx.cisd.openbis.generic.shared.basic.GridRowModel; @@ -114,6 +115,7 @@ public class GridCustomColumnGrid extends TypedTableGrid<GridCustomColumn> viewContext.getMessage(Dict.BUTTON_EDIT), new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<GridCustomColumn>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<GridCustomColumn>> selectedItem, boolean keyPressed) @@ -284,10 +286,11 @@ public class GridCustomColumnGrid extends TypedTableGrid<GridCustomColumn> // we want to fetch all custom columns, not just one page. We will update the whole grid // model with it. There should not be that many custom columns. resultSetConfig.setOffset(0); - resultSetConfig.setLimit(DefaultResultSetConfig.NO_LIMIT); + resultSetConfig.setLimit(IResultSetConfig.NO_LIMIT); AsyncCallback<TypedTableResultSet<GridCustomColumn>> wrappedCallback = new AsyncCallback<TypedTableResultSet<GridCustomColumn>>() { + @Override public void onSuccess(TypedTableResultSet<GridCustomColumn> result) { List<TableModelRowWithObject<GridCustomColumn>> allCustomColumns = @@ -318,6 +321,7 @@ public class GridCustomColumnGrid extends TypedTableGrid<GridCustomColumn> result.getResultSet().setList(allModel.cloneWithData(pageResult)); } + @Override public void onFailure(Throwable caught) { callback.onFailure(caught); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/AbstractGridCustomExpressionEditOrRegisterDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/AbstractGridCustomExpressionEditOrRegisterDialog.java index 5e4ab37e717..e37baa68158 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/AbstractGridCustomExpressionEditOrRegisterDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/AbstractGridCustomExpressionEditOrRegisterDialog.java @@ -124,6 +124,7 @@ abstract public class AbstractGridCustomExpressionEditOrRegisterDialog extends result.sinkEvents(Event.ONCLICK); result.addListener(Events.OnClick, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { GridColumnChooserDialog.show(viewContext, columnDataModelProvider, gridId, @@ -175,21 +176,25 @@ abstract public class AbstractGridCustomExpressionEditOrRegisterDialog extends return new IExpressionHolder() { + @Override public int getCursorPos() { return expressionField.getCursorPos(); } + @Override public String getValue() { return expressionField.getValue(); } + @Override public void setCursorPos(int position) { expressionField.setCursorPos(position); } + @Override public void setValue(String value) { expressionField.setValue(value); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/GridColumnChooserDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/GridColumnChooserDialog.java index 2fde2747f2f..33e9b574492 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/GridColumnChooserDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/common/GridColumnChooserDialog.java @@ -61,6 +61,7 @@ class GridColumnChooserDialog extends Dialog columnChooserComponent.sinkEvents(Event.ONDBLCLICK); columnChooserComponent.addListener(Events.OnDoubleClick, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { insertColumnsIntoExpression(expressionField, columnChooser); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/FilterSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/FilterSelectionWidget.java index cd07eff4cef..e76185c1dcf 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/FilterSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/FilterSelectionWidget.java @@ -82,6 +82,7 @@ public final class FilterSelectionWidget extends DropDownList<FilterModel, GridC callback); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.GRID_CUSTOM_FILTER); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/FilterToolbar.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/FilterToolbar.java index 6f4d0f7fa22..61e81dd6695 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/FilterToolbar.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/FilterToolbar.java @@ -115,6 +115,7 @@ public class FilterToolbar<T> extends ToolBar implements IDatabaseModificationOb }); filterSelectionWidget.addPostRefreshCallback(new IDataRefreshCallback() { + @Override public void postRefresh(boolean wasSuccessful) { updateFilterFields(); @@ -196,11 +197,13 @@ public class FilterToolbar<T> extends ToolBar implements IDatabaseModificationOb return null; } + @Override public DatabaseModificationKind[] getRelevantModifications() { return filterSelectionWidget.getRelevantModifications(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { filterSelectionWidget.update(observedModifications); @@ -247,6 +250,7 @@ public class FilterToolbar<T> extends ToolBar implements IDatabaseModificationOb List<Widget> filterWidgets = new ArrayList<Widget>(); IDelegatedAction updateApplyButtonAction = new IDelegatedAction() { + @Override public void execute() { updateApplyToolEnabledState(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/GridCustomFilterGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/GridCustomFilterGrid.java index 2415100aa0b..baa8b486c86 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/GridCustomFilterGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/GridCustomFilterGrid.java @@ -110,6 +110,7 @@ public class GridCustomFilterGrid extends TypedTableGrid<GridCustomFilter> viewContext.getMessage(Dict.BUTTON_EDIT), new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<GridCustomFilter>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<GridCustomFilter>> selectedItem, boolean keyPressed) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenEntityDetailsTabAction.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenEntityDetailsTabAction.java index a815e9bb49a..01fcdbfb4ad 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenEntityDetailsTabAction.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenEntityDetailsTabAction.java @@ -53,6 +53,7 @@ public final class OpenEntityDetailsTabAction implements IDelegatedAction this.keyPressed = keyPressed; } + @Override public void execute() { final EntityKind entityKind = entity.getEntityKind(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenEntityDetailsTabClickListener.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenEntityDetailsTabClickListener.java index 1d4d0655f09..a018c610dc8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenEntityDetailsTabClickListener.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenEntityDetailsTabClickListener.java @@ -47,6 +47,7 @@ public class OpenEntityDetailsTabClickListener implements ClickHandler return entity; } + @Override public void onClick(ClickEvent event) { new OpenEntityDetailsTabAction(getEntity(), viewContext, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenEntityEditorTabClickListener.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenEntityEditorTabClickListener.java index 78930ee19c0..ca3090ec309 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenEntityEditorTabClickListener.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenEntityEditorTabClickListener.java @@ -53,6 +53,7 @@ public final class OpenEntityEditorTabClickListener implements ClickHandler this.viewContext = viewContext; } + @Override public void onClick(ClickEvent event) { showEntityEditor(viewContext, entity, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenExperimentBrowserTabClickListener.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenExperimentBrowserTabClickListener.java index dd641b1be16..a603620e634 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenExperimentBrowserTabClickListener.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/listener/OpenExperimentBrowserTabClickListener.java @@ -50,6 +50,7 @@ public class OpenExperimentBrowserTabClickListener implements ClickHandler this.forceReopen = forceReopen; } + @Override public void onClick(ClickEvent event) { final AbstractTabItemFactory tabView = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/managed_property/ManagedPropertyGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/managed_property/ManagedPropertyGrid.java index b3fa226b4b2..3dab47b71c9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/managed_property/ManagedPropertyGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/managed_property/ManagedPropertyGrid.java @@ -208,21 +208,25 @@ public class ManagedPropertyGrid extends TypedTableGrid<ReportRowModel> return new IBrowserGridActionInvoker() { + @Override public void toggleFilters(boolean show) { delegate.toggleFilters(show); } + @Override public void refresh() { onRefreshAction.execute(); } + @Override public void export(boolean allColumns) { delegate.export(allColumns); } + @Override public void configure() { delegate.configure(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/MaterialBrowserGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/MaterialBrowserGrid.java index cd0108de8b2..48961953748 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/MaterialBrowserGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/MaterialBrowserGrid.java @@ -125,16 +125,19 @@ public class MaterialBrowserGrid extends AbstractEntityGrid<Material> final ICriteriaProvider<ListMaterialDisplayCriteria> criteriaProvider = new ICriteriaProvider<ListMaterialDisplayCriteria>() { + @Override public ListMaterialDisplayCriteria tryGetCriteria() { return criteria; } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[0]; } + @Override public void update(Set<DatabaseModificationKind> observedModifications, IDataRefreshCallback postRefreshCallback) { @@ -237,6 +240,7 @@ public class MaterialBrowserGrid extends AbstractEntityGrid<Material> { return new IDelegatedAction() { + @Override public void execute() { if (criteriaProvider.tryGetCriteria() != null) @@ -344,6 +348,7 @@ public class MaterialBrowserGrid extends AbstractEntityGrid<Material> { return new IDelegatedActionWithResult<DisplayedAndSelectedMaterials>() { + @Override public DisplayedAndSelectedMaterials execute() { return new DisplayedAndSelectedMaterials(getSelectedBaseObjects(), diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/MaterialBrowserToolbar.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/MaterialBrowserToolbar.java index 4eb60fb9fe6..73131901cf4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/MaterialBrowserToolbar.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/MaterialBrowserToolbar.java @@ -88,6 +88,7 @@ public class MaterialBrowserToolbar extends ToolBar implements IDisposableCompon add(selectMaterialTypeCombo); } + @Override public final ListMaterialDisplayCriteria tryGetCriteria() { final MaterialType selectedType = selectMaterialTypeCombo.tryGetSelectedMaterialType(); @@ -104,6 +105,7 @@ public class MaterialBrowserToolbar extends ToolBar implements IDisposableCompon super.onRender(parent, pos); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] @@ -112,6 +114,7 @@ public class MaterialBrowserToolbar extends ToolBar implements IDisposableCompon edit(ObjectKind.PROPERTY_TYPE_ASSIGNMENT) }; } + @Override public void update(Set<DatabaseModificationKind> observedModifications, IDataRefreshCallback entityTypeRefreshCallback) { @@ -127,15 +130,18 @@ public class MaterialBrowserToolbar extends ToolBar implements IDisposableCompon } } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { } + @Override public Component getComponent() { return this; } + @Override public void dispose() { if (selectMaterialTypeCombo != null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/MaterialTypeSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/MaterialTypeSelectionWidget.java index bf12910c1c0..5c5e88122f9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/MaterialTypeSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/MaterialTypeSelectionWidget.java @@ -169,6 +169,7 @@ public final class MaterialTypeSelectionWidget extends } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/project/ProjectGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/project/ProjectGrid.java index 0691ff4cfa3..e40adf6f9a4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/project/ProjectGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/project/ProjectGrid.java @@ -111,6 +111,7 @@ public class ProjectGrid extends TypedTableGrid<Project> viewContext.getMessage(Dict.BUTTON_SHOW_DETAILS), new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<Project>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<Project>> selectedItem, boolean keyPressed) @@ -127,6 +128,7 @@ public class ProjectGrid extends TypedTableGrid<Project> viewContext.getMessage(Dict.BUTTON_EDIT), new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<Project>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<Project>> selectedItem, boolean keyPressed) @@ -265,7 +267,7 @@ public class ProjectGrid extends TypedTableGrid<Project> @Override public String getId() { - return ProjectEditForm.createId(projectId); + return AbstractProjectEditRegisterForm.createId(projectId); } @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property/AbstractSimplePropertyValueRenderer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property/AbstractSimplePropertyValueRenderer.java index 2c5c2a5b932..f9767a9c10d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property/AbstractSimplePropertyValueRenderer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property/AbstractSimplePropertyValueRenderer.java @@ -50,6 +50,7 @@ public abstract class AbstractSimplePropertyValueRenderer<T> extends return renderNotNull(object); } + @Override public Widget getAsWidget(final T object) { // default widget is a simple HTML span element wrapped around text diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property/ObjectArrayPropertyValueRenderer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property/ObjectArrayPropertyValueRenderer.java index 11222baff6c..9ea8d9e5a82 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property/ObjectArrayPropertyValueRenderer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property/ObjectArrayPropertyValueRenderer.java @@ -42,6 +42,7 @@ public final class ObjectArrayPropertyValueRenderer<T> extends AbstractPropertyV // AbstractPropertyValueRenderer // + @Override public Widget getAsWidget(T[] objects) { FlowPanel panel = new FlowPanel(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/DataTypeSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/DataTypeSelectionWidget.java index 48a192e735f..43543575160 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/DataTypeSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/DataTypeSelectionWidget.java @@ -105,6 +105,7 @@ public final class DataTypeSelectionWidget extends DropDownList<DataTypeModel, D callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.EMPTY_ARRAY; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/EntityTypePropertyTypeSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/EntityTypePropertyTypeSelectionWidget.java index 91e8c87654e..432cc225247 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/EntityTypePropertyTypeSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/EntityTypePropertyTypeSelectionWidget.java @@ -149,6 +149,7 @@ public final class EntityTypePropertyTypeSelectionWidget callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.PROPERTY_TYPE); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentForm.java index 37ffcca8b81..70865db7cc7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentForm.java @@ -181,6 +181,7 @@ public final class PropertyTypeAssignmentForm extends LayoutContainer implements { return new IScriptTypeProvider() { + @Override public ScriptType tryGetScriptType() { return isManaged() ? ScriptType.MANAGED_PROPERTY : ScriptType.DYNAMIC_PROPERTY; @@ -229,6 +230,7 @@ public final class PropertyTypeAssignmentForm extends LayoutContainer implements result.setLabelSeparator(""); result.addListener(Events.Change, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { scriptChooser.setRawValue(""); @@ -258,6 +260,7 @@ public final class PropertyTypeAssignmentForm extends LayoutContainer implements propertyTypeSelectionWidget.addListener(Events.SelectionChange, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { updatePropertyTypeRelatedFields(); @@ -322,6 +325,7 @@ public final class PropertyTypeAssignmentForm extends LayoutContainer implements result.addListener(Events.Focus, new InfoBoxResetListener(infoBox)); result.addListener(Events.SelectionChange, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { updateEntityTypePropertyTypeRelatedFields(); @@ -376,6 +380,7 @@ public final class PropertyTypeAssignmentForm extends LayoutContainer implements scriptableCheckbox.setValue(false); scriptableCheckbox.addListener(Events.Change, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { updateShownInEditView(); @@ -426,6 +431,7 @@ public final class PropertyTypeAssignmentForm extends LayoutContainer implements shownInEditViewCheckBox.setVisible(false); shownInEditViewCheckBox.addListener(Events.Change, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { // Make sure the User triggered the change @@ -722,11 +728,13 @@ public final class PropertyTypeAssignmentForm extends LayoutContainer implements getTypeSelectionWidget().refreshStore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return modificationManager.getRelevantModifications(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { modificationManager.update(observedModifications); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentGrid.java index c64f5506b71..ee1bbdb400c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentGrid.java @@ -210,6 +210,7 @@ public class PropertyTypeAssignmentGrid extends TypedTableGrid<EntityTypePropert new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<EntityTypePropertyType<?>>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<EntityTypePropertyType<?>>> selectedItem, boolean keyPressed) @@ -231,6 +232,7 @@ public class PropertyTypeAssignmentGrid extends TypedTableGrid<EntityTypePropert viewContext.getMessage(Dict.UNASSIGN_BUTTON_LABEL), new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<EntityTypePropertyType<?>>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<EntityTypePropertyType<?>>> selectedItem, boolean keyPressed) @@ -331,6 +333,7 @@ public class PropertyTypeAssignmentGrid extends TypedTableGrid<EntityTypePropert mandatoryCheckbox.addListener(Events.Change, new Listener<FieldEvent>() { + @Override public void handleEvent(FieldEvent be) { defaultValueField.setVisible(getMandatoryValue() diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeGrid.java index c436769536c..2286aa34a86 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeGrid.java @@ -109,6 +109,7 @@ public class PropertyTypeGrid extends TypedTableGrid<PropertyType> new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<PropertyType>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<PropertyType>> selectedItem, boolean keyPressed) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeSelectionWidget.java index 3aff5d0f703..27542047d9c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeSelectionWidget.java @@ -147,6 +147,7 @@ public final class PropertyTypeSelectionWidget extends callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.PROPERTY_TYPE); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleBrowserGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleBrowserGrid.java index fe5b94a1190..f7ae5b7b2a3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleBrowserGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleBrowserGrid.java @@ -91,10 +91,12 @@ public class SampleBrowserGrid extends AbstractEntityGrid<Sample> protected static final IDirectlyConnectedController DUMMY_DIRECTLY_CONNECTED_CONTROLLER = new IDirectlyConnectedController() { + @Override public void setOnChangeAction(IDelegatedAction onChangeAction) { } + @Override public boolean isOnlyDirectlyConnected() { return true; @@ -313,6 +315,7 @@ public class SampleBrowserGrid extends AbstractEntityGrid<Sample> }; } + @Override public List<PropertyType> tryGetPropertyTypes() { PropertyTypesCriteria propertyTypesCriteria = propertyTypeProvider.tryGetCriteria(); @@ -325,22 +328,26 @@ public class SampleBrowserGrid extends AbstractEntityGrid<Sample> } } + @Override public ListSampleDisplayCriteria tryGetCriteria() { return criteria; } + @Override public void update(Set<DatabaseModificationKind> observedModifications, IDataRefreshCallback dataRefreshCallback) { propertyTypeProvider.update(observedModifications, dataRefreshCallback); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return propertyTypeProvider.getRelevantModifications(); } + @Override public void setEntityTypes(Set<SampleType> entityTypes) { criteria.setAllSampleType(SampleType.createAllSampleType(entityTypes, false)); @@ -367,6 +374,7 @@ public class SampleBrowserGrid extends AbstractEntityGrid<Sample> this.directlyConnectedController = directlyConnectedController; directlyConnectedController.setOnChangeAction(new IDelegatedAction() { + @Override public void execute() { refresh(); @@ -391,6 +399,7 @@ public class SampleBrowserGrid extends AbstractEntityGrid<Sample> registerListenerAndLinkGenerator(SampleGridColumnIDs.PROJECT, new ICellListenerAndLinkGenerator<Sample>() { + @Override public void handle(TableModelRowWithObject<Sample> rowItem, boolean specialKeyPressed) { @@ -401,6 +410,7 @@ public class SampleBrowserGrid extends AbstractEntityGrid<Sample> specialKeyPressed, href); } + @Override public String tryGetLink(Sample entity, ISerializableComparable comparableValue) { @@ -503,6 +513,7 @@ public class SampleBrowserGrid extends AbstractEntityGrid<Sample> { getCriteriaProvider().update(observedModifications, new IDataRefreshCallback() { + @Override public void postRefresh(boolean wasSuccessful) { } @@ -522,6 +533,7 @@ public class SampleBrowserGrid extends AbstractEntityGrid<Sample> new HashSet<DatabaseModificationKind>(); getCriteriaProvider().update(observedModifications, new IDataRefreshCallback() { + @Override public void postRefresh(boolean wasSuccessful) { refresh(); @@ -601,6 +613,7 @@ public class SampleBrowserGrid extends AbstractEntityGrid<Sample> { return new IDelegatedActionWithResult<DisplayedAndSelectedEntities<TableModelRowWithObject<Sample>>>() { + @Override public DisplayedAndSelectedEntities<TableModelRowWithObject<Sample>> execute() { TableExportCriteria<TableModelRowWithObject<Sample>> tableExportCriteria = @@ -670,6 +683,7 @@ public class SampleBrowserGrid extends AbstractEntityGrid<Sample> { return new IDelegatedAction() { + @Override public void execute() { if (getCriteriaProvider().tryGetCriteria() != null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleBrowserToolbar.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleBrowserToolbar.java index f5c0b9d058f..f207032ac56 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleBrowserToolbar.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleBrowserToolbar.java @@ -94,15 +94,18 @@ final class SampleBrowserToolbar extends ToolBar implements ISampleCriteriaProvi sampleTypeDisplayID); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { } + @Override public Component getComponent() { return this; } + @Override public void dispose() { if (selectSpaceCombo != null) @@ -111,6 +114,7 @@ final class SampleBrowserToolbar extends ToolBar implements ISampleCriteriaProvi } } + @Override public ListSampleDisplayCriteria tryGetCriteria() { final SampleType selectedType = tryGetSelectedSampleType(); @@ -140,6 +144,7 @@ final class SampleBrowserToolbar extends ToolBar implements ISampleCriteriaProvi return selectSampleTypeCombo.tryGetSelectedSampleType(); } + @Override public List<PropertyType> tryGetPropertyTypes() { final SampleType selectedType = tryGetSelectedSampleType(); @@ -194,6 +199,7 @@ final class SampleBrowserToolbar extends ToolBar implements ISampleCriteriaProvi super.onRender(parent, pos); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] @@ -203,6 +209,7 @@ final class SampleBrowserToolbar extends ToolBar implements ISampleCriteriaProvi edit(ObjectKind.PROPERTY_TYPE_ASSIGNMENT) }; } + @Override public void update(Set<DatabaseModificationKind> observedModifications, IDataRefreshCallback entityTypeRefreshCallback) { @@ -229,6 +236,7 @@ final class SampleBrowserToolbar extends ToolBar implements ISampleCriteriaProvi || observedModifications.contains(edit(objectKind)); } + @Override public void setEntityTypes(Set<SampleType> availableEntityTypes) { // TODO 2009-08-27, Tomasz Pylak: use this info to narrow properties when displaying "all" diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleSearchHitGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleSearchHitGrid.java index 8aeebbfdb1a..5c6cf05a625 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleSearchHitGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleSearchHitGrid.java @@ -130,6 +130,7 @@ public class SampleSearchHitGrid extends SampleBrowserGrid implements IDetailedS super.addEntityOperationButtons(); } + @Override public void refresh(DetailedSearchCriteria newCriteria, List<PropertyType> propertyTypes) { ListSampleDisplayCriteria criteriaOrNull = tryGetDisplayCriteria(); @@ -168,6 +169,7 @@ public class SampleSearchHitGrid extends SampleBrowserGrid implements IDetailedS super.listTableRows(resultSetConfig, callback); } + @Override public IDelegatedActionWithResult<SelectedAndDisplayedItems> getSelectedAndDisplayedItemsAction() { throw new UnsupportedOperationException(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleTypeSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleTypeSelectionWidget.java index 131d1c70216..3a07ed134bd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleTypeSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/SampleTypeSelectionWidget.java @@ -138,6 +138,7 @@ public class SampleTypeSelectionWidget extends DropDownList<SampleTypeModel, Sam callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/AbstractScriptEditRegisterForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/AbstractScriptEditRegisterForm.java index 80b7c7ccd96..c9d50d9e8dc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/AbstractScriptEditRegisterForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/AbstractScriptEditRegisterForm.java @@ -131,6 +131,7 @@ abstract public class AbstractScriptEditRegisterForm extends AbstractRegistratio scriptField.addListener(Events.Change, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { scriptExecution.update(scriptField.getValue()); @@ -165,6 +166,7 @@ abstract public class AbstractScriptEditRegisterForm extends AbstractRegistratio return new IValidable() { + @Override public boolean isValid() { return panel.isValid(); @@ -268,6 +270,7 @@ abstract public class AbstractScriptEditRegisterForm extends AbstractRegistratio private final static String CALCULATE_DEFINITION_NOT_FOUND_MSG = "Multiline script should contain definition of 'calculate()' function."; + @Override public String validate(Field<?> field, final String fieldValue) { if (fieldValue.contains(NEWLINE)) @@ -292,6 +295,7 @@ abstract public class AbstractScriptEditRegisterForm extends AbstractRegistratio private static class ManagedPropertyScriptValidator implements Validator { + @Override public String validate(Field<?> field, String value) { // TODO Auto-generated method stub diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/ScriptExecutionFramework.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/ScriptExecutionFramework.java index 3f626df1ff1..b5827bc79aa 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/ScriptExecutionFramework.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/ScriptExecutionFramework.java @@ -250,6 +250,7 @@ public class ScriptExecutionFramework ClickHandler listener = new ClickHandler() { + @Override public void onClick(final ClickEvent event) { final boolean ifSpecialKeyPressed = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/ScriptGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/ScriptGrid.java index e2a561e0eab..2b69faa7009 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/ScriptGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/script/ScriptGrid.java @@ -121,6 +121,7 @@ public class ScriptGrid extends TypedTableGrid<Script> viewContext.getMessage(Dict.BUTTON_EDIT), new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<Script>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<Script>> selectedItem, boolean keyPressed) @@ -220,7 +221,7 @@ public class ScriptGrid extends TypedTableGrid<Script> @Override public String getId() { - return ScriptEditForm.createId(scriptId); + return AbstractScriptEditRegisterForm.createId(scriptId); } @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedDataSetSearchToolbar.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedDataSetSearchToolbar.java index f751c4f9956..7a00edd6aa3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedDataSetSearchToolbar.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedDataSetSearchToolbar.java @@ -46,6 +46,7 @@ public class DetailedDataSetSearchToolbar extends DetailedSearchToolbar IAddProcessingPluginsMenuAction addPluginsAction = new IAddProcessingPluginsMenuAction() { + @Override public void addProcessingPlugins(DataSetProcessingMenu menu) { add(new SeparatorToolItem()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchFieldsSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchFieldsSelectionWidget.java index 24f34866543..bbcf609f019 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchFieldsSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchFieldsSelectionWidget.java @@ -311,6 +311,7 @@ public final class DetailedSearchFieldsSelectionWidget extends callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.PROPERTY_TYPE); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchToolbar.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchToolbar.java index a6c8c3e0ba8..17f70cd707c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchToolbar.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchToolbar.java @@ -65,20 +65,24 @@ public class DetailedSearchToolbar extends ToolBar implements IDisposableCompone } } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { } + @Override public DatabaseModificationKind[] getRelevantModifications() { return null; } + @Override public Component getComponent() { return this; } + @Override public void dispose() { } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchWindow.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchWindow.java index 3c4e25afced..62748052260 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchWindow.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/DetailedSearchWindow.java @@ -163,6 +163,7 @@ public class DetailedSearchWindow extends Dialog { widget.addListener(KeyboardEvents.Enter, new Listener<ComponentEvent>() { + @Override public void handleEvent(ComponentEvent ce) { EventType type = ce.getType(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/user/ChangeUserSettingsDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/user/ChangeUserSettingsDialog.java index 7b71a31f1c8..5353b76e1eb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/user/ChangeUserSettingsDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/user/ChangeUserSettingsDialog.java @@ -205,6 +205,7 @@ public class ChangeUserSettingsDialog extends AbstractSaveDialog Listener<BaseEvent> listener = new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { layout(true); @@ -273,6 +274,7 @@ public class ChangeUserSettingsDialog extends AbstractSaveDialog viewContext.getMessage(Dict.RESET_USER_SETTINGS_CONFIRMATION_MSG); MessageBox.confirm(title, msg, new Listener<MessageBoxEvent>() { + @Override public void handleEvent(MessageBoxEvent messageEvent) { if (messageEvent.getButtonClicked().getItemId().equals(Dialog.YES)) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyGrid.java index 51c9837fff6..15eed2b6867 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyGrid.java @@ -202,6 +202,7 @@ public class VocabularyGrid extends TypedTableGrid<Vocabulary> viewContext.getMessage(Dict.BUTTON_SHOW_DETAILS), new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<Vocabulary>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<Vocabulary>> selectedItem, boolean keyPressed) @@ -217,6 +218,7 @@ public class VocabularyGrid extends TypedTableGrid<Vocabulary> new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<Vocabulary>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<Vocabulary>> selectedItem, boolean keyPressed) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyRegistrationFieldSet.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyRegistrationFieldSet.java index 4a94ad34d14..02167f707ed 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyRegistrationFieldSet.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyRegistrationFieldSet.java @@ -194,6 +194,7 @@ public final class VocabularyRegistrationFieldSet extends FieldSet // If user changes value of this checkbox to true a confirmation window will be shown. result.addListener(Events.Change, new Listener<FieldEvent>() { + @Override public void handleEvent(FieldEvent be) { if (result.getValue() == true) @@ -244,6 +245,7 @@ public final class VocabularyRegistrationFieldSet extends FieldSet // manually clear invalid messages on focus (automatic validation is turned off) result.addListener(Events.Focus, new Listener<FieldEvent>() { + @Override public void handleEvent(FieldEvent be) { result.clearInvalid(); @@ -303,6 +305,7 @@ public final class VocabularyRegistrationFieldSet extends FieldSet result.setLabelSeparator(""); result.addListener(Events.Change, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { Boolean useFreeText = freeText.getValue(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularySelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularySelectionWidget.java index a5ed013cd53..dd67cb9a5bb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularySelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularySelectionWidget.java @@ -96,11 +96,13 @@ public class VocabularySelectionWidget extends DropDownList<BaseModelData, Vocab viewContext.getService().listVocabularies(false, true, criteria, new AsyncCallback<TypedTableResultSet<Vocabulary>>() { + @Override public void onFailure(Throwable caught) { callback.onFailure(caught); } + @Override public void onSuccess(TypedTableResultSet<Vocabulary> result) { List<TableModelRowWithObject<Vocabulary>> rows = @@ -115,6 +117,7 @@ public class VocabularySelectionWidget extends DropDownList<BaseModelData, Vocab }); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyTermGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyTermGrid.java index 9bbb952b1de..39aa572c7fc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyTermGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyTermGrid.java @@ -73,6 +73,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.dto.DefaultResultSetCo import ch.systemsx.cisd.openbis.generic.client.web.client.dto.TableExportCriteria; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.TypedTableResultSet; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.CommonGridIDs; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DatabaseModificationKind; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DatabaseModificationKind.ObjectKind; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModelRowWithObject; @@ -143,7 +144,7 @@ public class VocabularyTermGrid extends TypedTableGrid<VocabularyTermWithStats> super.createColumnsDefinition(); definitions.setGridCellRendererFor(VocabularyTermGridIDs.URL, LinkRenderer.createExternalLinkRenderer()); - definitions.setGridCellRendererFor(VocabularyTermGridIDs.DESCRIPTION, + definitions.setGridCellRendererFor(CommonGridIDs.DESCRIPTION, createMultilineStringCellRenderer()); return definitions; } @@ -181,6 +182,7 @@ public class VocabularyTermGrid extends TypedTableGrid<VocabularyTermWithStats> new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<VocabularyTermWithStats>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<VocabularyTermWithStats>> selectedItem, boolean keyPressed) @@ -573,7 +575,7 @@ public class VocabularyTermGrid extends TypedTableGrid<VocabularyTermWithStats> @Override protected List<String> getColumnIdsOfFilters() { - return Arrays.asList(VocabularyTermGridIDs.CODE, VocabularyTermGridIDs.LABEL); + return Arrays.asList(CommonGridIDs.CODE, CommonGridIDs.LABEL); } @Override @@ -778,6 +780,7 @@ public class VocabularyTermGrid extends TypedTableGrid<VocabularyTermWithStats> dialog.setAcceptAction(new IDelegatedAction() { + @Override public void execute() { deleteAndReplace(termsToBeDeleted, termsToBeReplaced); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyTermValidator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyTermValidator.java index 02e8ed57902..1bc1b2afe1f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyTermValidator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/VocabularyTermValidator.java @@ -59,6 +59,7 @@ final class VocabularyTermValidator implements Validator return terms; } + @Override final public String validate(Field<?> field, String value) { final List<String> terms = VocabularyTermValidator.getTerms(value); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/AbstractDataConfirmationDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/AbstractDataConfirmationDialog.java index 555867df505..9f1f1d02c45 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/AbstractDataConfirmationDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/AbstractDataConfirmationDialog.java @@ -144,6 +144,7 @@ public abstract class AbstractDataConfirmationDialog<T> extends Dialog { return new IDelegatedAction() { + @Override public void execute() { refreshMessage(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/CheckBoxGroupWithModel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/CheckBoxGroupWithModel.java index 34ae431cc82..bbdf35736a2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/CheckBoxGroupWithModel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/CheckBoxGroupWithModel.java @@ -79,6 +79,7 @@ public class CheckBoxGroupWithModel<T> extends CheckBoxGroup final CheckBoxWithModel<T> checkBox = new CheckBoxWithModel<T>(item, false); checkBox.addListener(Events.Change, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { T changedItem = checkBox.getItem(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/DropDownList.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/DropDownList.java index 979f7a69459..eb34968ce7d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/DropDownList.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/DropDownList.java @@ -148,6 +148,7 @@ abstract public class DropDownList<M extends ModelData, E> extends ComboBox<M> i StoreFilter<M> filter = new StoreFilter<M>() { + @Override public boolean select(Store<M> s, M parent, M item, String property) { String v = comboBox.getRawValue(); @@ -217,11 +218,13 @@ abstract public class DropDownList<M extends ModelData, E> extends ComboBox<M> i this.allowValueNotFromList = allowValueNotFromList; } + @Override public Component getComponent() { return this; } + @Override public void dispose() { if (resultSetKey != null && viewContextOrNull != null) @@ -231,6 +234,7 @@ abstract public class DropDownList<M extends ModelData, E> extends ComboBox<M> i } } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { refreshStore(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/EntityRegistrationPanel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/EntityRegistrationPanel.java index 989d418ee12..70d5f0cb8ea 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/EntityRegistrationPanel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/EntityRegistrationPanel.java @@ -176,11 +176,13 @@ abstract public class EntityRegistrationPanel<T extends ModelData, S extends Dro return observer; } + @Override public DatabaseModificationKind[] getRelevantModifications() { return createCompositeDatabaseModificationObserver().getRelevantModifications(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { createCompositeDatabaseModificationObserver().update(observedModifications); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/FieldUtil.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/FieldUtil.java index f93ed150e75..7079fe8e8f5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/FieldUtil.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/FieldUtil.java @@ -139,6 +139,7 @@ public class FieldUtil final IDelegatedAction alignInfoIcon = new IDelegatedAction() { + @Override public void execute() { infoIcon.el().alignTo(field.getElement(), INFO_LINK_POSITION, @@ -148,6 +149,7 @@ public class FieldUtil field.addListener(Events.Render, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { Element parent = field.el().getParent().dom; @@ -168,6 +170,7 @@ public class FieldUtil }); field.addListener(Events.Show, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { if (field.isRendered()) @@ -191,6 +194,7 @@ public class FieldUtil info.sinkEvents(Events.OnClick.getEventCode()); info.addListener(Events.OnClick, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent e) { MessageBox.info("Info", message, null); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/HistoryWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/HistoryWidget.java index 049842c81cb..704ee04b63f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/HistoryWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/HistoryWidget.java @@ -198,6 +198,7 @@ public class HistoryWidget extends ContentPanel } final ClickHandler listener = new ClickHandler() { + @Override public void onClick(ClickEvent event) { OpenEntityDetailsTabHelper.open(viewContext, entityKind, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/InfoBox.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/InfoBox.java index 853bd14b777..d39e8a58cd2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/InfoBox.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/InfoBox.java @@ -62,6 +62,7 @@ public final class InfoBox extends Html implements IInfoHandler /** * Display given <var>text</var> as <i>error</i> text. */ + @Override public final void displayError(final String text) { display(text, Type.ERROR); @@ -70,6 +71,7 @@ public final class InfoBox extends Html implements IInfoHandler /** * Display given <var>text</var> as <i>info</i> text. */ + @Override public final void displayInfo(final String text) { display(text, Type.INFO); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/PopupDialogBasedInfoHandler.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/PopupDialogBasedInfoHandler.java index d02959d7875..b371bb19f88 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/PopupDialogBasedInfoHandler.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/PopupDialogBasedInfoHandler.java @@ -27,11 +27,13 @@ public class PopupDialogBasedInfoHandler implements IInfoHandler { public static final IInfoHandler INSTANCE = new PopupDialogBasedInfoHandler(); + @Override public void displayInfo(String text) { MessageBox.info("Info", text, null); } + @Override public void displayError(String text) { MessageBox.alert("Error", text, null); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/SectionsPanel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/SectionsPanel.java index 159ca6ce787..6cb4af0e3fa 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/SectionsPanel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/widget/SectionsPanel.java @@ -144,6 +144,7 @@ public class SectionsPanel extends LayoutContainer addListener(Events.Select, new Listener<TabPanelEvent>() { + @Override public void handleEvent(TabPanelEvent be) { tabContent.setContentVisible(true); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/wizard/Wizard.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/wizard/Wizard.java index 6044d99e1e9..cd567741ce2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/wizard/Wizard.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/wizard/Wizard.java @@ -60,6 +60,7 @@ public class Wizard<M extends IWizardDataModel> extends LayoutContainer implemen workflowModel = model.getWorkflow(); workflowModel.addStateChangeListener(new IWizardStateChangeListener() { + @Override public void stateChanged(IWizardState previousStateOrNull, IWizardState currentStateOrNull) { @@ -90,20 +91,24 @@ public class Wizard<M extends IWizardDataModel> extends LayoutContainer implemen workflowModel.nextState(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[0]; } + @Override public Component getComponent() { return this; } + @Override public void dispose() { for (WizardPage<M> page : visitedPages) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/CompositeMessageProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/CompositeMessageProvider.java index cebd970e637..fb6142a61fb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/CompositeMessageProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/CompositeMessageProvider.java @@ -43,6 +43,7 @@ public final class CompositeMessageProvider implements IMessageProvider // IMessageProvider // + @Override public String getName() { if (name == null) @@ -61,6 +62,7 @@ public final class CompositeMessageProvider implements IMessageProvider return name; } + @Override public final boolean containsKey(final String key) { for (final IMessageProvider messageProvider : messageProviders) @@ -73,6 +75,7 @@ public final class CompositeMessageProvider implements IMessageProvider return false; } + @Override public final String getMessage(final String key, final Object... parameters) { IMessageProvider defaultMessageProvider = tryGetDefaultDictionary(key); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/DictonaryBasedMessageProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/DictonaryBasedMessageProvider.java index 63883b03b0b..6e957ad86b4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/DictonaryBasedMessageProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/DictonaryBasedMessageProvider.java @@ -42,16 +42,19 @@ public final class DictonaryBasedMessageProvider implements IMessageProvider // IMessageProvider // + @Override public String getName() { return dictionaryName; } + @Override public final boolean containsKey(final String key) { return dictionary.keySet().contains(key); } + @Override public final String getMessage(final String key, final Object... parameters) { String message; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/GWTUtils.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/GWTUtils.java index 7df0c5a9ad3..0aef3401bad 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/GWTUtils.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/GWTUtils.java @@ -111,6 +111,7 @@ public final class GWTUtils new SimpleDialog(panel, heading, okButtonLabel, messageProvider); dialog.setAcceptAction(new IDelegatedAction() { + @Override public void execute() { MessageBox.alert("Error Details", detailedMsg, null); @@ -131,6 +132,7 @@ public final class GWTUtils { private final static int MARGIN = 30; + @Override public void handleEvent(BaseEvent be) { comboBox.setMinListWidth(MARGIN @@ -445,6 +447,7 @@ public final class GWTUtils { Window.addWindowClosingHandler(new ClosingHandler() { + @Override public void onWindowClosing(ClosingEvent event) { event.setMessage(msgOrNull); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/IDelegatedAction.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/IDelegatedAction.java index 96b07b475a9..82816c7268c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/IDelegatedAction.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/IDelegatedAction.java @@ -28,10 +28,12 @@ public interface IDelegatedAction extends ScheduledCommand { public static IDelegatedAction DO_NOTHING = new IDelegatedAction() { + @Override public void execute() { } }; + @Override void execute(); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/ToolTipAction.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/ToolTipAction.java index 6cccb06467e..c0adb8afe1c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/ToolTipAction.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/ToolTipAction.java @@ -56,6 +56,7 @@ public class ToolTipAction { return new Listener<ComponentEvent>() { + @Override public void handleEvent(ComponentEvent ce) { Element source = aTarget.getElement(); @@ -64,8 +65,8 @@ public class ToolTipAction { EventTarget from = ce.getEvent().getRelatedEventTarget(); if (from == null - || (Element.is(source) && Element.is(from) && !DOM.isOrHasChild( - source, (Element) Element.as(from)))) + || (com.google.gwt.dom.client.Element.is(source) && com.google.gwt.dom.client.Element.is(from) && !DOM.isOrHasChild( + source, (Element) com.google.gwt.dom.client.Element.as(from)))) { onTargetOver(ce); } @@ -73,8 +74,8 @@ public class ToolTipAction { EventTarget to = ce.getEvent().getRelatedEventTarget(); if (to == null - || (Element.is(source) && Element.is(to) && !DOM.isOrHasChild( - source, (Element) Element.as(to)))) + || (com.google.gwt.dom.client.Element.is(source) && com.google.gwt.dom.client.Element.is(to) && !DOM.isOrHasChild( + source, (Element) com.google.gwt.dom.client.Element.as(to)))) { onTargetOut(ce); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/WidgetUtils.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/WidgetUtils.java index a600287a040..532a5cf1619 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/WidgetUtils.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/WidgetUtils.java @@ -56,6 +56,7 @@ public class WidgetUtils { result.addListener(Events.Change, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { onChangeActionOrNull.execute(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/lang/Entities.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/lang/Entities.java index 655cc6fd17d..8028e4d8545 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/lang/Entities.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/lang/Entities.java @@ -464,6 +464,7 @@ class Entities /** * {@inheritDoc} */ + @Override public void add(String name, int value) { mapNameToValue.put(name, new Integer(value)); @@ -473,6 +474,7 @@ class Entities /** * {@inheritDoc} */ + @Override public String name(int value) { return (String) mapValueToName.get(value); @@ -481,6 +483,7 @@ class Entities /** * {@inheritDoc} */ + @Override public int value(String name) { Object value = mapNameToValue.get(name); @@ -501,6 +504,7 @@ class Entities /** * {@inheritDoc} */ + @Override public void add(String name, int value) { mapNameToValue.put(name, new Integer(value)); @@ -510,6 +514,7 @@ class Entities /** * {@inheritDoc} */ + @Override public String name(int value) { return mapValueToName.get(new Integer(value)); @@ -518,6 +523,7 @@ class Entities /** * {@inheritDoc} */ + @Override public int value(String name) { Object value = mapNameToValue.get(name); @@ -640,6 +646,7 @@ class Entities /** * {@inheritDoc} */ + @Override public void add(String name, int value) { ensureCapacity(size + 1); @@ -670,6 +677,7 @@ class Entities /** * {@inheritDoc} */ + @Override public String name(int value) { for (int i = 0; i < size; ++i) @@ -685,6 +693,7 @@ class Entities /** * {@inheritDoc} */ + @Override public int value(String name) { for (int i = 0; i < size; ++i) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/log/ProfilingTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/log/ProfilingTable.java index aa34b5c9222..54cec3fbcef 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/log/ProfilingTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/log/ProfilingTable.java @@ -48,29 +48,35 @@ public class ProfilingTable implements IProfilingTable { return new IProfilingTable() { + @Override public void clearLog() { } + @Override public List<String> getLoggedEvents() { return new ArrayList<String>(); } + @Override public boolean isLoggingEnabled() { return false; } + @Override public int log(String description) { return 0; } + @Override public void log(int taskId, String description) { } + @Override public void logStop(int taskId) { } @@ -83,6 +89,7 @@ public class ProfilingTable implements IProfilingTable this.stopEvents = new HashMap<Integer, Date>(); } + @Override public boolean isLoggingEnabled() { return true; @@ -125,6 +132,7 @@ public class ProfilingTable implements IProfilingTable * @return id of the logged task. Use this id in {@link #logStop} method to measure the time * between event start and stop. */ + @Override public int log(String description) { int taskId = startEvents.size(); @@ -136,6 +144,7 @@ public class ProfilingTable implements IProfilingTable * Logs the event with the specified id. Use {@link #log(String)} if you do not want to manage * the events ids. */ + @Override public void log(int taskId, String description) { startEvents.add(new ProfilingEventStarted(taskId, description)); @@ -145,17 +154,20 @@ public class ProfilingTable implements IProfilingTable * Logs end of the event. It's cheap to call this method. Call this method only if you want to * measure time between start and stop. */ + @Override public void logStop(int taskId) { stopEvents.put(taskId, new Date()); } + @Override public void clearLog() { startEvents.clear(); stopEvents.clear(); } + @Override public List<String> getLoggedEvents() { List<String> result = new ArrayList<String>(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/DefaultResultSetConfig.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/DefaultResultSetConfig.java index 56cd7fb1cf3..6a0d104178d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/DefaultResultSetConfig.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/DefaultResultSetConfig.java @@ -81,6 +81,7 @@ public class DefaultResultSetConfig<K, T> implements IResultSetConfig<K, T>, IsS this.cacheConfig = cacheConfig; } + @Override public GridFilters<T> getFilters() { return filters; @@ -91,6 +92,7 @@ public class DefaultResultSetConfig<K, T> implements IResultSetConfig<K, T>, IsS this.availableColumns = availableColumns; } + @Override public Set<String> getIDsOfPresentedColumns() { return idsOfPresentedColumns; @@ -128,26 +130,31 @@ public class DefaultResultSetConfig<K, T> implements IResultSetConfig<K, T>, IsS // IResultSetConfig // + @Override public final int getLimit() { return limit; } + @Override public final int getOffset() { return offset; } + @Override public final Set<IColumnDefinition<T>> getAvailableColumns() { return availableColumns; } + @Override public final SortInfo getSortInfo() { return sortInfo; } + @Override public final ResultSetFetchConfig<K> getCacheConfig() { return cacheConfig; @@ -163,6 +170,7 @@ public class DefaultResultSetConfig<K, T> implements IResultSetConfig<K, T>, IsS this.gridDisplayIdOrNull = gridDisplayIdOrNull; } + @Override public String tryGetGridDisplayId() { return gridDisplayIdOrNull; @@ -172,6 +180,7 @@ public class DefaultResultSetConfig<K, T> implements IResultSetConfig<K, T>, IsS * Does this result set return long error messages from errors on custom columns? Defaults to * false. */ + @Override public boolean isCustomColumnErrorMessageLong() { return (errorMessageFormatFlags & (1 << ERROR_MESSAGE_FLAG_JYTHON_LONG)) > 0; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/ResultSet.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/ResultSet.java index 5cc03fa2fd5..827ee628524 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/ResultSet.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/ResultSet.java @@ -83,6 +83,7 @@ public final class ResultSet<T> implements IsSerializable, IResultSetHolder<T> return totalLength; } + @Override public ResultSet<T> getResultSet() { return this; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/ResultSetWithEntityTypes.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/ResultSetWithEntityTypes.java index 70db9a8a27e..beeb93b6094 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/ResultSetWithEntityTypes.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/ResultSetWithEntityTypes.java @@ -54,6 +54,7 @@ public class ResultSetWithEntityTypes<T extends IEntityInformationHolder> implem this.availableEntityTypes = availableEntityTypes; } + @Override public ResultSet<T> getResultSet() { return resultSet; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/SearchableEntity.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/SearchableEntity.java index bcb48ec48e1..46cc3d11ef0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/SearchableEntity.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/SearchableEntity.java @@ -59,6 +59,7 @@ public final class SearchableEntity implements IsSerializable, Comparable<Search return getDescription(); } + @Override public final int compareTo(final SearchableEntity o) { assert o != null : "Unspecified searchable entity"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/TypedTableResultSet.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/TypedTableResultSet.java index 2ede4c20271..d18cf96e72f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/TypedTableResultSet.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/dto/TypedTableResultSet.java @@ -43,6 +43,7 @@ public class TypedTableResultSet<T extends Serializable> implements IsSerializab { } + @Override public final ResultSet<TableModelRowWithObject<T>> getResultSet() { return resultSet; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/AbstractClientService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/AbstractClientService.java index 61218186153..fa477ae7fb1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/AbstractClientService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/AbstractClientService.java @@ -235,6 +235,7 @@ public abstract class AbstractClientService implements IClientService, } } + @Override public String getOnlineHelpGenericRootURL() { return onlineHelpGenericRootURL; @@ -250,6 +251,7 @@ public abstract class AbstractClientService implements IClientService, } } + @Override public String getOnlineHelpGenericPageTemplate() { return onlineHelpGenericPageTemplate; @@ -265,6 +267,7 @@ public abstract class AbstractClientService implements IClientService, } } + @Override public String getOnlineHelpSpecificRootURL() { return onlineHelpSpecificRootURL; @@ -280,6 +283,7 @@ public abstract class AbstractClientService implements IClientService, } } + @Override public String getOnlineHelpSpecificPageTemplate() { return onlineHelpSpecificPageTemplate; @@ -375,6 +379,7 @@ public abstract class AbstractClientService implements IClientService, return new CachedResultSetManager<String>(new TokenBasedResultSetKeyGenerator(), new ICustomColumnsProvider() { + @Override public List<GridCustomColumn> getGridCustomColumn(String sessionToken, String gridDisplayId) { @@ -394,6 +399,7 @@ public abstract class AbstractClientService implements IClientService, listEntities(criteria, new IOriginalDataProvider<TableModelRowWithObject<ReportRowModel>>() { + @Override public List<TableModelRowWithObject<ReportRowModel>> getOriginalData( int maxSize) throws UserFailureException { @@ -402,6 +408,7 @@ public abstract class AbstractClientService implements IClientService, .getRows()); } + @Override public List<TableModelColumnHeader> getHeaders() { return reportTableModel.getHeader(); @@ -417,6 +424,7 @@ public abstract class AbstractClientService implements IClientService, // IClientService // + @Override public final ApplicationInfo getApplicationInfo() { final ApplicationInfo applicationInfo = new ApplicationInfo(); @@ -467,6 +475,7 @@ public abstract class AbstractClientService implements IClientService, return results; } + @Override public final List<CustomImport> getCustomImports() { return extractCustomImportProperties(); @@ -499,6 +508,7 @@ public abstract class AbstractClientService implements IClientService, return false; } + @Override public final SessionContext tryToGetCurrentSessionContext(boolean anonymous) { try @@ -521,6 +531,7 @@ public abstract class AbstractClientService implements IClientService, } } + @Override public final SessionContext tryToLoginAnonymously() { try @@ -537,6 +548,7 @@ public abstract class AbstractClientService implements IClientService, } } + @Override public final SessionContext tryToLogin(final String userID, final String password) { try @@ -580,6 +592,7 @@ public abstract class AbstractClientService implements IClientService, return createSessionContext(session); } + @Override public void setBaseURL(String baseURL) { try @@ -597,6 +610,7 @@ public abstract class AbstractClientService implements IClientService, } } + @Override public void updateDisplaySettings(DisplaySettings displaySettings) { try @@ -614,6 +628,7 @@ public abstract class AbstractClientService implements IClientService, } } + @Override public DisplaySettings resetDisplaySettings() { try @@ -633,6 +648,7 @@ public abstract class AbstractClientService implements IClientService, return null; } + @Override public void changeUserHomeGroup(TechId groupIdOrNull) { try @@ -649,6 +665,7 @@ public abstract class AbstractClientService implements IClientService, } } + @Override public final void logout(DisplaySettings displaySettings, boolean simpleViewMode) { try diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/AbstractOriginalDataProviderWithoutHeaders.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/AbstractOriginalDataProviderWithoutHeaders.java index 94322b05a2c..8c981c62380 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/AbstractOriginalDataProviderWithoutHeaders.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/AbstractOriginalDataProviderWithoutHeaders.java @@ -37,12 +37,14 @@ public abstract class AbstractOriginalDataProviderWithoutHeaders<T> implements private List<T> originalData; + @Override public List<TableModelColumnHeader> getHeaders() { // Collections.emptyList() can not be serialized by GWT return NO_HEADERS; } + @Override public List<T> getOriginalData(int maxSize) throws UserFailureException { // dummy implementation diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/ClientServiceExceptionTranslatingAdvisor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/ClientServiceExceptionTranslatingAdvisor.java index 828b1e393d2..6fa85ff19ac 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/ClientServiceExceptionTranslatingAdvisor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/ClientServiceExceptionTranslatingAdvisor.java @@ -47,11 +47,13 @@ public class ClientServiceExceptionTranslatingAdvisor extends DefaultPointcutAdv private static class AllClientServiceMethodsPointcut implements Pointcut { + @Override public MethodMatcher getMethodMatcher() { return MethodMatcher.TRUE; } + @Override public ClassFilter getClassFilter() { return new RootClassFilter(IClientService.class); @@ -61,6 +63,7 @@ public class ClientServiceExceptionTranslatingAdvisor extends DefaultPointcutAdv private static class UserFailureExceptionTranslatingInterceptor implements MethodInterceptor { + @Override public Object invoke(MethodInvocation invocation) throws Throwable { try diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientService.java index d36920adca2..3dc1263e65c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientService.java @@ -266,6 +266,7 @@ public final class CommonClientService extends AbstractClientService implements * Assumes that preparation of the export ( {@link #prepareExportSamples(TableExportCriteria)} * has been invoked before and returned with an exportDataKey passed here as a parameter. */ + @Override public final String getExportTable(final String exportDataKey, final String lineSeparator) { // NOTE: no generics in GWT @@ -285,6 +286,7 @@ public final class CommonClientService extends AbstractClientService implements return TSVRenderer.createTable(dataProvider, lineSeparator); } + @Override public final void removeResultSet(final String resultSetKey) { try @@ -307,12 +309,14 @@ public final class CommonClientService extends AbstractClientService implements // IGenericClientService // + @Override public final void registerGroup(final String groupCode, final String descriptionOrNull) { final String sessionToken = getSessionToken(); commonServer.registerSpace(sessionToken, groupCode, descriptionOrNull); } + @Override public final void updateGroup(final ISpaceUpdates updates) { assert updates != null : "Unspecified updates."; @@ -321,6 +325,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.updateSpace(sessionToken, updates); } + @Override public final void updateScript(final IScriptUpdates updates) { assert updates != null : "Unspecified updates."; @@ -329,12 +334,14 @@ public final class CommonClientService extends AbstractClientService implements commonServer.updateScript(sessionToken, updates); } + @Override public final void registerPerson(final String code) { final String sessionToken = getSessionToken(); commonServer.registerPerson(sessionToken, code); } + @Override public final void registerGroupRole(final RoleWithHierarchy role, final String group, final Grantee grantee) { @@ -344,12 +351,14 @@ public final class CommonClientService extends AbstractClientService implements commonServer.registerSpaceRole(sessionToken, role.getRoleCode(), groupIdentifier, grantee); } + @Override public final void registerInstanceRole(final RoleWithHierarchy role, final Grantee grantee) { final String sessionToken = getSessionToken(); commonServer.registerInstanceRole(sessionToken, role.getRoleCode(), grantee); } + @Override public final void deleteGroupRole(final RoleWithHierarchy role, final String group, final Grantee grantee) { @@ -359,12 +368,14 @@ public final class CommonClientService extends AbstractClientService implements commonServer.deleteSpaceRole(sessionToken, role.getRoleCode(), groupIdentifier, grantee); } + @Override public final void deleteInstanceRole(final RoleWithHierarchy role, final Grantee grantee) { final String sessionToken = getSessionToken(); commonServer.deleteInstanceRole(sessionToken, role.getRoleCode(), grantee); } + @Override public final List<SampleType> listSampleTypes() { final String sessionToken = getSessionToken(); @@ -375,115 +386,135 @@ public final class CommonClientService extends AbstractClientService implements // --------- methods preparing exported content. Note: GWT does not support // generic methods :( + @Override public String prepareExportSamples(TableExportCriteria<TableModelRowWithObject<Sample>> criteria) { return prepareExportEntities(criteria); } + @Override public final String prepareExportExperiments( final TableExportCriteria<TableModelRowWithObject<Experiment>> criteria) { return prepareExportEntities(criteria); } + @Override public final String prepareExportMatchingEntities( final TableExportCriteria<TableModelRowWithObject<MatchingEntity>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportPropertyTypes( TableExportCriteria<TableModelRowWithObject<PropertyType>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportEntityPropertyHistory( TableExportCriteria<TableModelRowWithObject<EntityPropertyHistory>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportPropertyTypeAssignments( TableExportCriteria<TableModelRowWithObject<EntityTypePropertyType<?>>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportProjects( TableExportCriteria<TableModelRowWithObject<Project>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportDeletions( TableExportCriteria<TableModelRowWithObject<Deletion>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportVocabularies( final TableExportCriteria<TableModelRowWithObject<Vocabulary>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportVocabularyTerms( TableExportCriteria<TableModelRowWithObject<VocabularyTermWithStats>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportMaterialTypes( final TableExportCriteria<TableModelRowWithObject<MaterialType>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportExperimentTypes( final TableExportCriteria<TableModelRowWithObject<ExperimentType>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportSampleTypes( final TableExportCriteria<TableModelRowWithObject<SampleType>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportDataSetTypes( final TableExportCriteria<TableModelRowWithObject<DataSetType>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportFileTypes(TableExportCriteria<FileFormatType> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportAttachmentVersions( TableExportCriteria<TableModelRowWithObject<AttachmentVersions>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportScripts(TableExportCriteria<TableModelRowWithObject<Script>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportGroups(TableExportCriteria<TableModelRowWithObject<Space>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportPersons(TableExportCriteria<TableModelRowWithObject<Person>> criteria) { return prepareExportEntities(criteria); } + @Override public String prepareExportRoleAssignments( TableExportCriteria<TableModelRowWithObject<RoleAssignment>> criteria) { @@ -492,6 +523,7 @@ public final class CommonClientService extends AbstractClientService implements // ---------------- methods which list entities using cache + @Override public final ResultSetWithEntityTypes<Sample> listSamples( final ListSampleDisplayCriteria listCriteria) { @@ -500,12 +532,14 @@ public final class CommonClientService extends AbstractClientService implements commonServer, sessionToken, listCriteria)); } + @Override public TypedTableResultSet<Sample> listSamples2(ListSampleDisplayCriteria2 criteria) { SampleProvider provider = new SampleProvider(commonServer, getSessionToken(), criteria); return listEntities(provider, criteria); } + @Override public TypedTableResultSet<ExternalData> searchForDataSets( final DetailedSearchCriteria criteria, final IResultSetConfig<String, TableModelRowWithObject<ExternalData>> resultSetConfig) @@ -521,6 +555,7 @@ public final class CommonClientService extends AbstractClientService implements }, resultSetConfig); } + @Override public TypedTableResultSet<ExternalData> searchForDataSets( RelatedDataSetCriteria<? extends IEntityInformationHolder> criteria, final IResultSetConfig<String, TableModelRowWithObject<ExternalData>> resultSetConfig) @@ -556,6 +591,7 @@ public final class CommonClientService extends AbstractClientService implements return new DataSetRelatedEntities(entities); } + @Override public final TypedTableResultSet<Experiment> listExperiments( final ListExperimentsCriteria listCriteria) { @@ -564,12 +600,14 @@ public final class CommonClientService extends AbstractClientService implements listCriteria); } + @Override public TypedTableResultSet<PropertyType> listPropertyTypes( DefaultResultSetConfig<String, TableModelRowWithObject<PropertyType>> criteria) { return listEntities(new PropertyTypeProvider(commonServer, getSessionToken()), criteria); } + @Override public TypedTableResultSet<EntityPropertyHistory> listEntityPropertyHistory( ListEntityPropertyHistoryCriteria criteria) { @@ -578,6 +616,7 @@ public final class CommonClientService extends AbstractClientService implements new EntityPropertyHistoryProvider(commonServer, sessionToken, criteria), criteria); } + @Override public final TypedTableResultSet<MatchingEntity> listMatchingEntities( final SearchableEntity searchableEntityOrNull, final String queryText, final boolean useWildcardSearchMode, @@ -591,6 +630,7 @@ public final class CommonClientService extends AbstractClientService implements return listEntities(provider, resultSetConfig); } + @Override public TypedTableResultSet<EntityTypePropertyType<?>> listPropertyTypeAssignments( DefaultResultSetConfig<String, TableModelRowWithObject<EntityTypePropertyType<?>>> criteria) { @@ -598,6 +638,7 @@ public final class CommonClientService extends AbstractClientService implements criteria); } + @Override public TypedTableResultSet<Space> listGroups( DefaultResultSetConfig<String, TableModelRowWithObject<Space>> criteria) { @@ -605,6 +646,7 @@ public final class CommonClientService extends AbstractClientService implements return listEntities(spacesProvider, criteria); } + @Override public TypedTableResultSet<Script> listScripts(final ListScriptsCriteria criteria) { ScriptProvider scriptProvider = @@ -613,6 +655,7 @@ public final class CommonClientService extends AbstractClientService implements return listEntities(scriptProvider, criteria); } + @Override public List<AuthorizationGroup> listAuthorizationGroups() throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -622,6 +665,7 @@ public final class CommonClientService extends AbstractClientService implements return authGroups; } + @Override public TypedTableResultSet<Person> listPersons(final ListPersonsCriteria criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -631,6 +675,7 @@ public final class CommonClientService extends AbstractClientService implements criteria); } + @Override public final List<Person> listPersons() throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -639,6 +684,7 @@ public final class CommonClientService extends AbstractClientService implements return persons; } + @Override public TypedTableResultSet<RoleAssignment> listRoleAssignments( DefaultResultSetConfig<String, TableModelRowWithObject<RoleAssignment>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -654,6 +700,7 @@ public final class CommonClientService extends AbstractClientService implements return roles; } + @Override public TypedTableResultSet<Project> listProjects( DefaultResultSetConfig<String, TableModelRowWithObject<Project>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -662,6 +709,7 @@ public final class CommonClientService extends AbstractClientService implements return listEntities(projectsProvider, criteria); } + @Override public TypedTableResultSet<Vocabulary> listVocabularies(boolean withTerms, boolean excludeInternal, DefaultResultSetConfig<String, TableModelRowWithObject<Vocabulary>> criteria) @@ -673,6 +721,7 @@ public final class CommonClientService extends AbstractClientService implements return listEntities(provider, criteria); } + @Override public TypedTableResultSet<VocabularyTermWithStats> listVocabularyTerms( final Vocabulary vocabulary, DefaultResultSetConfig<String, TableModelRowWithObject<VocabularyTermWithStats>> criteria) @@ -682,6 +731,7 @@ public final class CommonClientService extends AbstractClientService implements return listEntities(vocabularyTermsProvider, criteria); } + @Override public TypedTableResultSet<MaterialType> listMaterialTypes( DefaultResultSetConfig<String, TableModelRowWithObject<MaterialType>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -696,6 +746,7 @@ public final class CommonClientService extends AbstractClientService implements }, criteria); } + @Override public TypedTableResultSet<SampleType> listSampleTypes( DefaultResultSetConfig<String, TableModelRowWithObject<SampleType>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -703,6 +754,7 @@ public final class CommonClientService extends AbstractClientService implements return listEntities(new SampleTypeProvider(commonServer, getSessionToken()), criteria); } + @Override public TypedTableResultSet<ExperimentType> listExperimentTypes( DefaultResultSetConfig<String, TableModelRowWithObject<ExperimentType>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -717,6 +769,7 @@ public final class CommonClientService extends AbstractClientService implements }, criteria); } + @Override public TypedTableResultSet<DataSetType> listDataSetTypes( DefaultResultSetConfig<String, TableModelRowWithObject<DataSetType>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -724,6 +777,7 @@ public final class CommonClientService extends AbstractClientService implements return listEntities(new DataSetTypeProvider(commonServer, getSessionToken()), criteria); } + @Override public TypedTableResultSet<FileFormatType> listFileTypes( DefaultResultSetConfig<String, TableModelRowWithObject<FileFormatType>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -733,6 +787,7 @@ public final class CommonClientService extends AbstractClientService implements return listEntities(provider, criteria); } + @Override public TypedTableResultSet<ExternalData> listSampleDataSets(final TechId sampleId, DefaultResultSetConfig<String, TableModelRowWithObject<ExternalData>> criteria, final boolean showOnlyDirectlyConnected) @@ -749,6 +804,7 @@ public final class CommonClientService extends AbstractClientService implements }, criteria); } + @Override public TypedTableResultSet<ExternalData> listExperimentDataSets(final TechId experimentId, DefaultResultSetConfig<String, TableModelRowWithObject<ExternalData>> criteria, final boolean onlyDirectlyConnected) @@ -765,6 +821,7 @@ public final class CommonClientService extends AbstractClientService implements }, criteria); } + @Override public TypedTableResultSet<ExternalData> listDataSetRelationships(final TechId datasetId, final DataSetRelationshipRole role, final DefaultResultSetConfig<String, TableModelRowWithObject<ExternalData>> criteria) @@ -782,6 +839,7 @@ public final class CommonClientService extends AbstractClientService implements // ---------------- end list using cache ---------- + @Override public final List<SearchableEntity> listSearchableEntities() throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -800,6 +858,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public List<ExperimentType> listExperimentTypes() throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -808,6 +867,7 @@ public final class CommonClientService extends AbstractClientService implements return experimentTypes; } + @Override public List<PropertyType> listPropertyTypes(boolean withRelations) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -817,6 +877,7 @@ public final class CommonClientService extends AbstractClientService implements return propertyTypes; } + @Override public final List<DataType> listDataTypes() throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -825,6 +886,7 @@ public final class CommonClientService extends AbstractClientService implements return dataTypes; } + @Override public String assignPropertyType(NewETPTAssignment assignment) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -832,6 +894,7 @@ public final class CommonClientService extends AbstractClientService implements return commonServer.assignPropertyType(sessionToken, assignment); } + @Override public void updatePropertyTypeAssignment(NewETPTAssignment assignmentUpdates) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -839,6 +902,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.updatePropertyTypeAssignment(sessionToken, assignmentUpdates); } + @Override public void unassignPropertyType(EntityKind entityKind, String propertyTypeCode, String entityTypeCode) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -848,6 +912,7 @@ public final class CommonClientService extends AbstractClientService implements entityTypeCode); } + @Override public int countPropertyTypedEntities(EntityKind entityKind, String propertyTypeCode, String entityTypeCode) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -857,6 +922,7 @@ public final class CommonClientService extends AbstractClientService implements entityTypeCode); } + @Override public final void registerPropertyType(final PropertyType propertyType) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -865,6 +931,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.registerPropertyType(sessionToken, propertyType); } + @Override public final void updatePropertyType(final IPropertyTypeUpdates updates) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -874,6 +941,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.updatePropertyType(sessionToken, updates); } + @Override public final void updateVocabularyTerm(final IVocabularyTermUpdates updates) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -883,6 +951,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.updateVocabularyTerm(sessionToken, updates); } + @Override public final void registerVocabulary(final String termsSessionKey, final NewVocabulary vocabulary) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -900,6 +969,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.registerVocabulary(sessionToken, vocabulary); } + @Override public final void updateVocabulary(final IVocabularyUpdates updates) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -967,6 +1037,7 @@ public final class CommonClientService extends AbstractClientService implements new BisTabFileLoader<VocabularyTerm>( new IParserObjectFactoryFactory<VocabularyTerm>() { + @Override public final IParserObjectFactory<VocabularyTerm> createFactory( final IPropertyMapper propertyMapper) throws ParserException @@ -1015,8 +1086,8 @@ public final class CommonClientService extends AbstractClientService implements */ private VocabularyTermBatchUpdateDetails createBasicBatchUpdateDetails() { - boolean updateLabel = isColumnAvailable(UpdatedVocabularyTerm.LABEL); - boolean updateDescription = isColumnAvailable(UpdatedVocabularyTerm.DESCRIPTION); + boolean updateLabel = isColumnAvailable(VocabularyTerm.LABEL); + boolean updateDescription = isColumnAvailable(VocabularyTerm.DESCRIPTION); return new VocabularyTermBatchUpdateDetails(updateLabel, updateDescription); } @@ -1087,6 +1158,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public void addVocabularyTerms(TechId vocabularyId, List<String> vocabularyTerms, Long previousTermOrdinal) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -1101,6 +1173,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public void addUnofficialVocabularyTerm(TechId vocabularyId, String code, String label, String description, Long previousTermOrdinal) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -1112,6 +1185,7 @@ public final class CommonClientService extends AbstractClientService implements description, previousTermOrdinal); } + @Override public void deleteVocabularyTerms(TechId vocabularyId, List<VocabularyTerm> termsToBeDeleted, List<VocabularyTermReplacement> termsToBeReplaced) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -1125,6 +1199,7 @@ public final class CommonClientService extends AbstractClientService implements termsToBeReplaced); } + @Override public void makeVocabularyTermsOfficial(TechId vocabularyId, List<VocabularyTerm> termsToBeOfficial) { @@ -1135,6 +1210,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.makeVocabularyTermsOfficial(sessionToken, vocabularyId, termsToBeOfficial); } + @Override public List<VocabularyTerm> listVocabularyTerms(Vocabulary vocabulary) { final String sessionToken = getSessionToken(); @@ -1143,6 +1219,7 @@ public final class CommonClientService extends AbstractClientService implements return new ArrayList<VocabularyTerm>(terms); } + @Override public void registerProject(String sessionKey, final Project project) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1166,6 +1243,7 @@ public final class CommonClientService extends AbstractClientService implements } + @Override public String prepareExportDataSetSearchHits( TableExportCriteria<TableModelRowWithObject<ExternalData>> exportCriteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -1173,6 +1251,7 @@ public final class CommonClientService extends AbstractClientService implements return prepareExportEntities(exportCriteria); } + @Override public List<MaterialType> listMaterialTypes() throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1181,6 +1260,7 @@ public final class CommonClientService extends AbstractClientService implements return materialTypes; } + @Override public List<DataSetType> listDataSetTypes() throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1189,6 +1269,7 @@ public final class CommonClientService extends AbstractClientService implements return types; } + @Override public TypedTableResultSet<Material> listMaterials(final ListMaterialDisplayCriteria criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1204,6 +1285,7 @@ public final class CommonClientService extends AbstractClientService implements }, criteria); } + @Override public String prepareExportMaterials( TableExportCriteria<TableModelRowWithObject<Material>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -1211,6 +1293,7 @@ public final class CommonClientService extends AbstractClientService implements return prepareExportEntities(criteria); } + @Override public void registerMaterialType(MaterialType entityType) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1218,6 +1301,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.registerMaterialType(sessionToken, entityType); } + @Override public void registerExperimentType(ExperimentType entityType) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1225,6 +1309,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.registerExperimentType(sessionToken, entityType); } + @Override public void registerSampleType(SampleType entityType) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1232,6 +1317,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.registerSampleType(sessionToken, entityType); } + @Override public void registerDataSetType(DataSetType entityType) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1239,6 +1325,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.registerDataSetType(sessionToken, entityType); } + @Override public void registerFileType(FileFormatType type) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1246,6 +1333,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.registerFileFormatType(sessionToken, type); } + @Override public void updateEntityType(EntityKind entityKind, EntityType entityType) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1267,6 +1355,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public String uploadDataSets( DisplayedOrSelectedDatasetCriteria displayedOrSelectedDatasetCriteria, DataSetUploadParameters uploadParameters) @@ -1290,6 +1379,7 @@ public final class CommonClientService extends AbstractClientService implements return commonServer.uploadDataSets(sessionToken, dataSetCodes, uploadContext); } + @Override public void deleteDataSet(String singleData, String reason, DeletionType deletionType, boolean forceNotExistingLocations, boolean forceDisallowedTypes) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -1308,6 +1398,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public void deleteDataSets( DisplayedOrSelectedDatasetCriteria displayedOrSelectedDatasetCriteria, String reason, DeletionType deletionType, boolean forceNotExistingLocations, @@ -1328,6 +1419,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public void deleteSamples(List<TechId> sampleIds, String reason, DeletionType deletionType) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1335,6 +1427,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.deleteSamples(sessionToken, sampleIds, reason, deletionType); } + @Override public void deleteSample(TechId sampleId, String reason, DeletionType deletionType) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1343,6 +1436,7 @@ public final class CommonClientService extends AbstractClientService implements deletionType); } + @Override public void deleteSamples(DisplayedOrSelectedIdHolderCriteria<? extends IIdHolder> criteria, String reason, DeletionType deletionType) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -1352,6 +1446,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.deleteSamples(sessionToken, sampleIds, reason, deletionType); } + @Override public void deleteExperiment(TechId experimentId, String reason, DeletionType deletionType) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1360,6 +1455,7 @@ public final class CommonClientService extends AbstractClientService implements reason, deletionType); } + @Override public void deleteExperiments( DisplayedOrSelectedIdHolderCriteria<TableModelRowWithObject<Experiment>> criteria, String reason, DeletionType deletionType) @@ -1370,6 +1466,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.deleteExperiments(sessionToken, experimentIds, reason, deletionType); } + @Override public void deleteVocabularies(List<TechId> vocabularyIds, String reason) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1377,6 +1474,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.deleteVocabularies(sessionToken, vocabularyIds, reason); } + @Override public void deletePropertyTypes(List<TechId> propertyTypeIds, String reason) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1384,6 +1482,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.deletePropertyTypes(sessionToken, propertyTypeIds, reason); } + @Override public void deleteProjects(List<TechId> projectIds, String reason) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1391,6 +1490,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.deleteProjects(sessionToken, projectIds, reason); } + @Override public void deleteGroups(List<TechId> groupIds, String reason) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1398,6 +1498,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.deleteSpaces(sessionToken, groupIds, reason); } + @Override public void deleteScripts(List<TechId> scriptIds) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1405,6 +1506,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.deleteScripts(sessionToken, scriptIds); } + @Override public void deleteAttachments(TechId holderId, AttachmentHolderKind holderKind, List<String> fileNames, String reason) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -1424,6 +1526,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public TypedTableResultSet<AttachmentVersions> listAttachmentVersions( final TechId holderId, final AttachmentHolderKind holderKind, @@ -1434,11 +1537,13 @@ public final class CommonClientService extends AbstractClientService implements holderId, holderKind), criteria); } + @Override public LastModificationState getLastModificationState() { return commonServer.getLastModificationState(getSessionToken()); } + @Override public final Experiment getExperimentInfo(final String experimentIdentifier) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1450,6 +1555,7 @@ public final class CommonClientService extends AbstractClientService implements return experiment; } + @Override public Experiment getExperimentInfoByPermId(String experimentPermId) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1460,6 +1566,7 @@ public final class CommonClientService extends AbstractClientService implements return getExperimentInfo(new TechId(expInfo.getId())); } + @Override public final Experiment getExperimentInfo(final TechId experimentId) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1469,6 +1576,7 @@ public final class CommonClientService extends AbstractClientService implements return experiment; } + @Override public Project getProjectInfo(TechId projectId) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1477,6 +1585,7 @@ public final class CommonClientService extends AbstractClientService implements return project; } + @Override public Project getProjectInfo(BasicProjectIdentifier projectIdentifier) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1486,6 +1595,7 @@ public final class CommonClientService extends AbstractClientService implements return project; } + @Override public String generateCode(String prefix) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1493,6 +1603,7 @@ public final class CommonClientService extends AbstractClientService implements return commonServer.generateCode(sessionToken, prefix); } + @Override public Date updateProject(final ProjectUpdates updates) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1522,6 +1633,7 @@ public final class CommonClientService extends AbstractClientService implements return updatesDTO; } + @Override public void deleteEntityTypes(EntityKind entityKind, List<String> entityTypesCodes) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1543,6 +1655,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public IEntityInformationHolderWithPermId getEntityInformationHolder(EntityKind entityKind, String permId) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -1551,6 +1664,7 @@ public final class CommonClientService extends AbstractClientService implements return commonServer.getEntityInformationHolder(sessionToken, entityKind, permId); } + @Override public IEntityInformationHolderWithPermId getMaterialInformationHolder( MaterialIdentifier identifier) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -1559,6 +1673,7 @@ public final class CommonClientService extends AbstractClientService implements return commonServer.getMaterialInformationHolder(sessionToken, identifier); } + @Override public Material getMaterialInfo(MaterialIdentifier identifier) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1566,6 +1681,7 @@ public final class CommonClientService extends AbstractClientService implements return commonServer.getMaterialInfo(sessionToken, identifier); } + @Override public Material getMaterialInfo(TechId techId) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1575,6 +1691,7 @@ public final class CommonClientService extends AbstractClientService implements return material; } + @Override public String getTemplate(EntityKind entityKind, String type, boolean autoGenerate, boolean withExperiments, boolean withSpace, BatchOperationKind operationKind) { @@ -1583,6 +1700,7 @@ public final class CommonClientService extends AbstractClientService implements withExperiments, withSpace, operationKind); } + @Override public List<FileFormatType> listFileTypes() { final String sessionToken = getSessionToken(); @@ -1590,6 +1708,7 @@ public final class CommonClientService extends AbstractClientService implements return types; } + @Override public void deleteFileFormatTypes(List<String> fileFormatTypeCodes) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1597,12 +1716,14 @@ public final class CommonClientService extends AbstractClientService implements commonServer.deleteFileFormatTypes(sessionToken, fileFormatTypeCodes); } + @Override public void updateFileFormatType(AbstractType type) { final String sessionToken = getSessionToken(); commonServer.updateFileFormatType(sessionToken, type); } + @Override public void updateAttachment(TechId holderId, AttachmentHolderKind holderKind, Attachment attachment) { @@ -1621,6 +1742,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public void addAttachment(final TechId holderId, String sessionKey, final AttachmentHolderKind holderKind, final NewAttachment attachment) { @@ -1653,6 +1775,7 @@ public final class CommonClientService extends AbstractClientService implements "Problem occured when updating managed property. " + "Contact instance admin about a possible bug in script definition."; + @Override public void updateManagedProperty(TechId entityId, EntityKind entityKind, IManagedProperty managedProperty, IManagedUiAction updateAction) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -1697,6 +1820,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public List<DatastoreServiceDescription> listDataStoreServices( DataStoreServiceKind dataStoreServiceKind) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -1705,6 +1829,7 @@ public final class CommonClientService extends AbstractClientService implements return commonServer.listDataStoreServices(sessionToken, dataStoreServiceKind); } + @Override public TableModelReference createReportFromDatasets( DatastoreServiceDescription serviceDescription, DisplayedOrSelectedDatasetCriteria displayedOrSelectedDatasetCriteria) @@ -1719,6 +1844,7 @@ public final class CommonClientService extends AbstractClientService implements return new TableModelReference(resultSetKey, tableModel.getHeader()); } + @Override public TableModelReference createReportFromTableModel(TableModel tableModel) { // WORKAROUND Need to unescape table model that was provided by the client. @@ -1729,17 +1855,20 @@ public final class CommonClientService extends AbstractClientService implements return new TableModelReference(resultSetKey, tableModel.getHeader()); } + @Override public TypedTableResultSet<ReportRowModel> listReport( IResultSetConfig<String, TableModelRowWithObject<ReportRowModel>> resultSetConfig) { IOriginalDataProvider<TableModelRowWithObject<ReportRowModel>> dataProvider = new IOriginalDataProvider<TableModelRowWithObject<ReportRowModel>>() { + @Override public List<TableModelColumnHeader> getHeaders() { return null; } + @Override public List<TableModelRowWithObject<ReportRowModel>> getOriginalData( int maxSize) throws UserFailureException { @@ -1750,6 +1879,7 @@ public final class CommonClientService extends AbstractClientService implements return new TypedTableResultSet<ReportRowModel>(listEntities(resultSetConfig, dataProvider)); } + @Override public String prepareExportReport( TableExportCriteria<TableModelRowWithObject<ReportRowModel>> criteria) { @@ -1856,6 +1986,7 @@ public final class CommonClientService extends AbstractClientService implements return result; } + @Override public void processDatasets(DatastoreServiceDescription serviceDescription, DisplayedOrSelectedDatasetCriteria displayedOrSelectedDatasetCriteria) { @@ -1865,6 +1996,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.processDatasets(sessionToken, serviceDescription, datasetCodes); } + @Override public ArchivingResult archiveDatasets( DisplayedOrSelectedDatasetCriteria displayedOrSelectedDatasetCriteria) { @@ -1874,6 +2006,7 @@ public final class CommonClientService extends AbstractClientService implements return new ArchivingResult(datasetCodes.size(), result); } + @Override public ArchivingResult unarchiveDatasets( DisplayedOrSelectedDatasetCriteria displayedOrSelectedDatasetCriteria) { @@ -1883,12 +2016,14 @@ public final class CommonClientService extends AbstractClientService implements return new ArchivingResult(datasetCodes.size(), result); } + @Override public void deleteAuthorizationGroups(List<TechId> groupIds, String reason) { final String sessionToken = getSessionToken(); commonServer.deleteAuthorizationGroups(sessionToken, groupIds, reason); } + @Override public TypedTableResultSet<AuthorizationGroup> listAuthorizationGroups( DefaultResultSetConfig<String, TableModelRowWithObject<AuthorizationGroup>> resultSetConfig) { @@ -1896,24 +2031,28 @@ public final class CommonClientService extends AbstractClientService implements resultSetConfig); } + @Override public String prepareExportAuthorizationGroups( TableExportCriteria<TableModelRowWithObject<AuthorizationGroup>> exportCriteria) { return prepareExportEntities(exportCriteria); } + @Override public void registerAuthorizationGroup(NewAuthorizationGroup newAuthorizationGroup) { final String sessionToken = getSessionToken(); commonServer.registerAuthorizationGroup(sessionToken, newAuthorizationGroup); } + @Override public void registerScript(Script script) { final String sessionToken = getSessionToken(); commonServer.registerScript(sessionToken, script); } + @Override public List<Person> listPersonsInAuthorizationGroup(TechId group) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -1921,6 +2060,7 @@ public final class CommonClientService extends AbstractClientService implements return commonServer.listPersonInAuthorizationGroup(sessionToken, group); } + @Override public void updateAuthorizationGroup(AuthorizationGroupUpdates updates) { assert updates != null : "Unspecified updates."; @@ -1929,6 +2069,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.updateAuthorizationGroup(sessionToken, updates); } + @Override public void addPersonsToAuthorizationGroup(TechId authorizationGroupId, List<String> personsCodes) { @@ -1937,6 +2078,7 @@ public final class CommonClientService extends AbstractClientService implements personsCodes); } + @Override public void removePersonsFromAuthorizationGroup(TechId authorizationGroupId, List<String> personsCodes) { @@ -1978,12 +2120,14 @@ public final class CommonClientService extends AbstractClientService implements // -- custom grid filters + @Override public List<GridCustomFilter> listFilters(String gridId) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { return commonServer.listFilters(getSessionToken(), gridId); } + @Override public TypedTableResultSet<GridCustomFilter> listFilters( final String gridId, DefaultResultSetConfig<String, TableModelRowWithObject<GridCustomFilter>> resultSetConfig) @@ -1993,6 +2137,7 @@ public final class CommonClientService extends AbstractClientService implements resultSetConfig); } + @Override public String prepareExportFilters( TableExportCriteria<TableModelRowWithObject<GridCustomFilter>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -2000,6 +2145,7 @@ public final class CommonClientService extends AbstractClientService implements return prepareExportEntities(criteria); } + @Override public void registerFilter(NewColumnOrFilter filter) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2007,12 +2153,14 @@ public final class CommonClientService extends AbstractClientService implements commonServer.registerFilter(getSessionToken(), filter); } + @Override public void deleteFilters(List<TechId> filterIds) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { commonServer.deleteFilters(getSessionToken(), filterIds); } + @Override public final void updateFilter(final IExpressionUpdates updates) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2022,12 +2170,14 @@ public final class CommonClientService extends AbstractClientService implements // -- grid custom columns + @Override public List<GridCustomColumn> listGridCustomColumns(String gridId) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { return commonServer.listGridCustomColumns(getSessionToken(), gridId); } + @Override public TypedTableResultSet<GridCustomColumn> listGridCustomColumns( final String gridId, DefaultResultSetConfig<String, TableModelRowWithObject<GridCustomColumn>> resultSetConfig) @@ -2037,6 +2187,7 @@ public final class CommonClientService extends AbstractClientService implements resultSetConfig); } + @Override public String prepareExportColumns( TableExportCriteria<TableModelRowWithObject<GridCustomColumn>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -2044,6 +2195,7 @@ public final class CommonClientService extends AbstractClientService implements return prepareExportEntities(criteria); } + @Override public void registerColumn(NewColumnOrFilter newColumn) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2051,12 +2203,14 @@ public final class CommonClientService extends AbstractClientService implements commonServer.registerGridCustomColumn(getSessionToken(), newColumn); } + @Override public void deleteColumns(List<TechId> columnIds) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { commonServer.deleteGridCustomColumns(getSessionToken(), columnIds); } + @Override public void updateColumn(IExpressionUpdates updates) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2067,6 +2221,7 @@ public final class CommonClientService extends AbstractClientService implements // -- + @Override public Boolean keepSessionAlive() throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2081,6 +2236,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public void updateVocabularyTerms(String termsSessionKey, TechId vocabularyId) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2091,6 +2247,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.updateVocabularyTerms(sessionToken, vocabularyId, extractedTerms); } + @Override public void deleteMaterials( DisplayedOrSelectedIdHolderCriteria<TableModelRowWithObject<Material>> criteria, String reason) @@ -2101,6 +2258,7 @@ public final class CommonClientService extends AbstractClientService implements commonServer.deleteMaterials(sessionToken, materialIds, reason); } + @Override public ArchivingResult lockDatasets(DisplayedOrSelectedDatasetCriteria criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2110,6 +2268,7 @@ public final class CommonClientService extends AbstractClientService implements return new ArchivingResult(datasetCodes.size(), result); } + @Override public ArchivingResult unlockDatasets(DisplayedOrSelectedDatasetCriteria criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2119,6 +2278,7 @@ public final class CommonClientService extends AbstractClientService implements return new ArchivingResult(datasetCodes.size(), result); } + @Override public LinkModel retrieveLinkFromDataSet(DatastoreServiceDescription serviceDescription, String dataSetCode) { @@ -2128,6 +2288,7 @@ public final class CommonClientService extends AbstractClientService implements return url; } + @Override public Script getScriptInfo(TechId scriptId) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2136,6 +2297,7 @@ public final class CommonClientService extends AbstractClientService implements return script; } + @Override public String evaluate(DynamicPropertyEvaluationInfo info) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2143,6 +2305,7 @@ public final class CommonClientService extends AbstractClientService implements return commonServer.evaluate(sessionToken, info); } + @Override public IEntityInformationHolderWithPermId getEntityInformationHolder(BasicEntityDescription info) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2150,6 +2313,7 @@ public final class CommonClientService extends AbstractClientService implements return commonServer.getEntityInformationHolder(sessionToken, info); } + @Override public ArchivingResult archiveDatasets( DisplayedCriteriaOrSelectedEntityHolder<TableModelRowWithObject<Experiment>> criteria) { @@ -2159,6 +2323,7 @@ public final class CommonClientService extends AbstractClientService implements return new ArchivingResult(datasetCodes.size(), result); } + @Override public ArchivingResult unarchiveDatasets( DisplayedCriteriaOrSelectedEntityHolder<TableModelRowWithObject<Experiment>> criteria) { @@ -2168,6 +2333,7 @@ public final class CommonClientService extends AbstractClientService implements return new ArchivingResult(datasetCodes.size(), result); } + @Override public ArchivingResult lockDatasets( DisplayedCriteriaOrSelectedEntityHolder<TableModelRowWithObject<Experiment>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -2178,6 +2344,7 @@ public final class CommonClientService extends AbstractClientService implements return new ArchivingResult(datasetCodes.size(), result); } + @Override public ArchivingResult unlockDatasets( DisplayedCriteriaOrSelectedEntityHolder<TableModelRowWithObject<Experiment>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -2188,6 +2355,7 @@ public final class CommonClientService extends AbstractClientService implements return new ArchivingResult(datasetCodes.size(), result); } + @Override public EntityPropertyUpdatesResult updateProperties(EntityPropertyUpdates updates) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2226,6 +2394,7 @@ public final class CommonClientService extends AbstractClientService implements return result; } + @Override public TypedTableResultSet<Deletion> listDeletions( DefaultResultSetConfig<String, TableModelRowWithObject<Deletion>> criteria) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -2235,6 +2404,7 @@ public final class CommonClientService extends AbstractClientService implements return listEntities(deletionsProvider, criteria); } + @Override public void revertDeletions(List<TechId> deletionIds) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2248,6 +2418,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public void deletePermanently(List<TechId> deletionIds, boolean forceNotExistingLocations, boolean forceDisallowedTypes) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException @@ -2263,6 +2434,7 @@ public final class CommonClientService extends AbstractClientService implements } } + @Override public void emptyTrash(boolean forceNotExistingLocations, boolean forceDisallowedTypes) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { @@ -2271,6 +2443,7 @@ public final class CommonClientService extends AbstractClientService implements forceDisallowedTypes); } + @Override public String performCustomImport(String sessionKey, String customImportCode) { HttpSession httpSession = getHttpSession(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/StringHtmlEscapingPointcutAdvisor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/StringHtmlEscapingPointcutAdvisor.java index 6b609c8c85b..ab40b41357b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/StringHtmlEscapingPointcutAdvisor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/StringHtmlEscapingPointcutAdvisor.java @@ -75,6 +75,7 @@ public class StringHtmlEscapingPointcutAdvisor extends DefaultPointcutAdvisor return new RootClassFilter(IClientService.class); } + @Override @SuppressWarnings("rawtypes") public boolean matches(Method method, Class targetClass) { @@ -104,6 +105,7 @@ public class StringHtmlEscapingPointcutAdvisor extends DefaultPointcutAdvisor * Get the session token and any guarded parameters and invoke the guards on those * parameters. */ + @Override public Object invoke(MethodInvocation methodInvocation) throws Throwable { Object result = methodInvocation.proceed(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/UploadServiceServlet.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/UploadServiceServlet.java index 017d7905bfb..b9c356dce5f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/UploadServiceServlet.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/UploadServiceServlet.java @@ -208,6 +208,7 @@ public final class UploadServiceServlet extends AbstractCommandController @Private static class SessionFilesSetter implements ISessionFilesSetter { + @Override public boolean addFilesToSession(final HttpSession session, final MultipartHttpServletRequest multipartRequest, String sessionKey) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/AbstractTableModelProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/AbstractTableModelProvider.java index 6598db5a88f..fd177326954 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/AbstractTableModelProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/AbstractTableModelProvider.java @@ -39,6 +39,7 @@ public abstract class AbstractTableModelProvider<T extends Serializable> impleme * Creates the table model with the specified maximum number of rows. If * {@link Integer#MAX_VALUE} is specified the complete table will be created. */ + @Override public TypedTableModel<T> getTableModel(int maxSize) { if (tableModel == null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/AlphanumComparator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/AlphanumComparator.java index f092d236298..75fad5e9d1d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/AlphanumComparator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/AlphanumComparator.java @@ -89,6 +89,7 @@ public class AlphanumComparator implements Comparator<String> return chunk.toString(); } + @Override public int compare(String s1, String s2) { int thisMarker = 0; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/CacheManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/CacheManager.java index a0ea9f43f31..20bf9d639a2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/CacheManager.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/CacheManager.java @@ -98,6 +98,7 @@ public class CacheManager<K, T> // IResultSetKeyProvider // + @Override public final String createKey() { return tokenGenerator.getNewToken(System.currentTimeMillis()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/CachedResultSetManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/CachedResultSetManager.java index c1f8033ab82..5048ff8a934 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/CachedResultSetManager.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/CachedResultSetManager.java @@ -170,11 +170,13 @@ public final class CachedResultSetManager<K> implements IResultSetManager<K>, Se headerColumnDefinitions.add(new IColumnDefinition<T>() { + @Override public String getValue(GridRowModel<T> rowModel) { throw new UnsupportedOperationException(); } + @Override public Comparable<?> tryGetComparableValue(GridRowModel<T> rowModel) { T originalObject = rowModel.getOriginalObject(); @@ -186,21 +188,25 @@ public final class CachedResultSetManager<K> implements IResultSetManager<K>, Se return null; } + @Override public String getHeader() { throw new UnsupportedOperationException(); } + @Override public String getIdentifier() { return header.getId(); } + @Override public DataTypeCode tryToGetDataType() { return null; } + @Override public String tryToGetProperty(String key) { throw new UnsupportedOperationException(); @@ -457,6 +463,7 @@ public final class CachedResultSetManager<K> implements IResultSetManager<K>, Se { this(resultSetKeyProvider, customColumnsProvider, new IColumnCalculator() { + @Override public <T> List<PrimitiveValue> evalCustomColumn(List<T> data, GridCustomColumn customColumn, Set<IColumnDefinition<T>> availableColumns, boolean errorMessagesAreLong) @@ -667,6 +674,7 @@ public final class CachedResultSetManager<K> implements IResultSetManager<K>, Se // IDataManager // + @Override public final <T> IResultSet<K, T> getResultSet(final String sessionToken, final IResultSetConfig<K, T> resultConfig, final IOriginalDataProvider<T> dataProvider) { @@ -834,6 +842,7 @@ public final class CachedResultSetManager<K> implements IResultSetManager<K>, Se new TableMap<String, GridColumnFilterInfo<T>>(filterInfosOrNull, new IKeyExtractor<String, GridColumnFilterInfo<T>>() { + @Override public String getKey(GridColumnFilterInfo<T> e) { return e.getFilteredField().getIdentifier(); @@ -873,26 +882,31 @@ public final class CachedResultSetManager<K> implements IResultSetManager<K>, Se { return new Future<TableData<T>>() { + @Override public boolean cancel(boolean mayInterruptIfRunning) { return true; } + @Override public boolean isCancelled() { return false; } + @Override public boolean isDone() { return true; } + @Override public TableData<T> get() throws InterruptedException, ExecutionException { return tableData; } + @Override public TableData<T> get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { @@ -907,6 +921,7 @@ public final class CachedResultSetManager<K> implements IResultSetManager<K>, Se Future<TableData<T>> future; Callable<TableData<T>> callable = new Callable<TableData<T>>() { + @Override public TableData<T> call() throws Exception { List<T> rows = dataProvider.getOriginalData(Integer.MAX_VALUE); @@ -971,6 +986,7 @@ public final class CachedResultSetManager<K> implements IResultSetManager<K>, Se return new DefaultResultSet<K, T>(dataKey, list, size, partial); } + @Override public final void removeResultSet(final K resultSetKey) { assert resultSetKey != null : "Unspecified data key holder."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/ColumnSortUtils.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/ColumnSortUtils.java index 970308e15b4..90ebb4b1235 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/ColumnSortUtils.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/ColumnSortUtils.java @@ -44,6 +44,7 @@ class ColumnSortUtils this.sortField = sortField; } + @Override @SuppressWarnings("rawtypes") public int compare(GridRowModel<T> o1, GridRowModel<T> o2) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/DataProviderAdapter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/DataProviderAdapter.java index 4df58b4410f..459058061bd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/DataProviderAdapter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/DataProviderAdapter.java @@ -42,6 +42,7 @@ public final class DataProviderAdapter<T extends Serializable> implements this.provider = provider; } + @Override public List<TableModelRowWithObject<T>> getOriginalData(int maxSize) throws UserFailureException { @@ -49,6 +50,7 @@ public final class DataProviderAdapter<T extends Serializable> implements return tableModel.getRows(); } + @Override public List<TableModelColumnHeader> getHeaders() { return tableModel == null ? Collections.<TableModelColumnHeader> emptyList() : tableModel diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/DefaultResultSet.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/DefaultResultSet.java index f4333a9d498..f0c4eb0b7c3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/DefaultResultSet.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/DefaultResultSet.java @@ -48,21 +48,25 @@ public final class DefaultResultSet<K, T> implements IResultSet<K, T> // IResult // + @Override public final K getResultSetKey() { return resultSetKey; } + @Override public final GridRowModels<T> getList() { return list; } + @Override public final int getTotalLength() { return totalLength; } + @Override public boolean isPartial() { return partial; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/EntityPropertyHistoryProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/EntityPropertyHistoryProvider.java index 82f4ca0d520..045728e254c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/EntityPropertyHistoryProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/EntityPropertyHistoryProvider.java @@ -56,6 +56,7 @@ public class EntityPropertyHistoryProvider extends criteria.getEntityID()); Collections.sort(history, new Comparator<EntityPropertyHistory>() { + @Override public int compare(EntityPropertyHistory e1, EntityPropertyHistory e2) { long d1 = e1.getValidUntilDate().getTime(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/ExperimentProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/ExperimentProvider.java index 39d279e7ff9..0ef7b239776 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/ExperimentProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/ExperimentProvider.java @@ -134,6 +134,7 @@ public class ExperimentProvider extends AbstractCommonTableModelProvider<Experim new TableMap<String, ExperimentType>(experimentTypes, new IKeyExtractor<String, ExperimentType>() { + @Override public String getKey(ExperimentType e) { return e.getCode(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/MatchingEntitiesProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/MatchingEntitiesProvider.java index e3edc4415da..fdde2395af1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/MatchingEntitiesProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/MatchingEntitiesProvider.java @@ -57,6 +57,7 @@ public class MatchingEntitiesProvider implements ITableModelProvider<MatchingEnt this.useWildcardSearchMode = useWildcardSearchMode; } + @Override public TypedTableModel<MatchingEntity> getTableModel(int maxSize) { List<MatchingEntity> entities = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/SampleProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/SampleProvider.java index 4bcef5f98c2..d8ec57887b5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/SampleProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/SampleProvider.java @@ -152,6 +152,7 @@ public class SampleProvider extends AbstractCommonTableModelProvider<Sample> new TableMap<String, SampleType>(sampleTypes, new IKeyExtractor<String, SampleType>() { + @Override public String getKey(SampleType e) { return e.getCode(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/TableDataProviderFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/TableDataProviderFactory.java index 6bf8def1176..998a1c40140 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/TableDataProviderFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/TableDataProviderFactory.java @@ -43,11 +43,13 @@ public class TableDataProviderFactory this.availableColumns = availableColumns; } + @Override public String tryToGetProperty(String columnID, String key) { return getDefinition(columnID).tryToGetProperty(key); } + @Override public Comparable<?> getValue(String columnID, List<? extends Comparable<?>> rowValues) { Integer index = indexMap.get(columnID); @@ -58,6 +60,7 @@ public class TableDataProviderFactory return rowValues.get(index); } + @Override public Collection<String> getAllColumnIDs() { List<String> result = new ArrayList<String>(); @@ -68,6 +71,7 @@ public class TableDataProviderFactory return result; } + @Override public List<String> getAllColumnTitles() { List<String> result = new ArrayList<String>(); @@ -113,6 +117,7 @@ public class TableDataProviderFactory this.rows = rows; } + @Override public List<List<? extends Comparable<?>>> getRows() { List<IColumnDefinition<T>> definitions = @@ -164,6 +169,7 @@ public class TableDataProviderFactory this.rows = rows; } + @Override public List<List<? extends Comparable<?>>> getRows() { List<IColumnDefinition<T>> definitions = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractServer.java index af9c2d6ff3f..b78370f8ff3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractServer.java @@ -109,6 +109,7 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp this.person = person; } + @Override public Principal tryToGetPrincipal(String userID) { Principal result = @@ -367,16 +368,19 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp // IServer // + @Override public final IAuthSession getAuthSession(final String sessionToken) throws UserFailureException { return new SimpleSession(sessionManager.getSession(sessionToken)); } + @Override public int getVersion() { return 1; } + @Override @Transactional(readOnly = true) public final void logout(final String sessionToken) throws UserFailureException { @@ -389,6 +393,7 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp } } + @Override public SessionContextDTO tryToAuthenticateAnonymously() { if (userForAnonymousLogin == null) @@ -405,6 +410,7 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp new AuthenticatedPersonBasedPrincipalProvider(person))); } + @Override public final SessionContextDTO tryToAuthenticate(final String user, final String password) { return tryToAuthenticate(sessionManager.tryToOpenSession(user, password)); @@ -579,6 +585,7 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp return result; } + @Override public SessionContextDTO tryGetSession(String sessionToken) { try @@ -591,6 +598,7 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp } } + @Override public boolean isArchivingConfigured(String sessionToken) { final List<DataStorePE> stores = daoFactory.getDataStoreDAO().listDataStores(); @@ -604,6 +612,7 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp return false; } + @Override public void saveDisplaySettings(String sessionToken, DisplaySettings displaySettings, int maxEntityVisits) { @@ -648,6 +657,7 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp } } + @Override public DisplaySettings getDefaultDisplaySettings(String sessionToken) { PersonPE systemUser = @@ -660,6 +670,7 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp return systemUser.getDisplaySettings(); } + @Override public void changeUserHomeSpace(String sessionToken, TechId groupIdOrNull) { final Session session = getSessionManager().getSession(sessionToken); @@ -674,18 +685,21 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp } } + @Override public void setBaseIndexURL(String sessionToken, String baseIndexURL) { final Session session = getSessionManager().getSession(sessionToken); session.setBaseIndexURL(baseIndexURL); } + @Override public String getBaseIndexURL(String sessionToken) { final Session session = getSessionManager().getSession(sessionToken); return session.getBaseIndexURL(); } + @Override public List<GridCustomColumn> listGridCustomColumns(String sessionToken, String gridId) { Session session = getSession(sessionToken); @@ -708,6 +722,7 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp return result; } + @Override public void setSessionUser(String sessionToken, String userID) { Session session = getSession(sessionToken); @@ -775,6 +790,7 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp final IMailClient mailClient = new MailClient(mailClientParameters); Runnable task = new Runnable() { + @Override public void run() { StringWriter writer = new StringWriter(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AuthenticationServiceHolder.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AuthenticationServiceHolder.java index 461900109f6..091c4f9e20b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AuthenticationServiceHolder.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AuthenticationServiceHolder.java @@ -43,17 +43,20 @@ public final class AuthenticationServiceHolder implements FactoryBean // FactoryBean // + @Override public final Object getObject() throws Exception { return authenticationService; } + @Override @SuppressWarnings("rawtypes") public final Class getObjectType() { return IAuthenticationService.class; } + @Override public final boolean isSingleton() { return true; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CacheFilter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CacheFilter.java index 1f606b5e760..b32608ce913 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CacheFilter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CacheFilter.java @@ -50,6 +50,7 @@ public class CacheFilter implements Filter private static final String NO_CACHE = ".nocache."; + @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { @@ -76,10 +77,12 @@ public class CacheFilter implements Filter || requestURI.endsWith(".png") || requestURI.endsWith(".ico"); } + @Override public void destroy() { } + @Override public void init(FilterConfig arg0) throws ServletException { } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonBusinessObjectFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonBusinessObjectFactory.java index adf146888f2..23b4a08239e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonBusinessObjectFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonBusinessObjectFactory.java @@ -97,153 +97,183 @@ public final class CommonBusinessObjectFactory extends AbstractBusinessObjectFac super(daoFactory, dssFactory); } + @Override public final IAttachmentBO createAttachmentBO(final Session session) { return new AttachmentBO(getDaoFactory(), session); } + @Override public final IGroupBO createGroupBO(final Session session) { return new GroupBO(getDaoFactory(), session); } + @Override public final IScriptBO createScriptBO(final Session session) { return new ScriptBO(getDaoFactory(), session); } + @Override public final IRoleAssignmentTable createRoleAssignmentTable(final Session session) { return new RoleAssignmentTable(getDaoFactory(), session); } + @Override public final ISampleTable createSampleTable(final Session session) { return new SampleTable(getDaoFactory(), session); } + @Override public ISampleLister createSampleLister(Session session) { return SampleLister.create(getDaoFactory(), session.getBaseIndexURL()); } + @Override public IDatasetLister createDatasetLister(Session session) { return DatasetLister.create(getDaoFactory(), session.getBaseIndexURL()); } + @Override public IMaterialLister createMaterialLister(Session session) { return MaterialLister.create(getDaoFactory(), session.getBaseIndexURL()); } + @Override public final ISampleBO createSampleBO(final Session session) { return new SampleBO(getDaoFactory(), session); } + @Override public IDataBO createDataBO(Session session) { return new DataBO(getDaoFactory(), session); } + @Override public final IDataSetTable createDataSetTable(final Session session) { return new DataSetTable(getDaoFactory(), getDSSFactory(), session); } + @Override public IDeletedDataSetTable createDeletedDataSetTable(Session session) { return new DeletedDataSetTable(getDaoFactory(), getDSSFactory(), session); } + @Override public IExperimentTable createExperimentTable(final Session session) { return new ExperimentTable(getDaoFactory(), session); } + @Override public IMaterialTable createMaterialTable(final Session session) { return new MaterialTable(getDaoFactory(), session); } + @Override public final IExperimentBO createExperimentBO(final Session session) { return new ExperimentBO(getDaoFactory(), session); } + @Override public final IPropertyTypeTable createPropertyTypeTable(final Session session) { return new PropertyTypeTable(getDaoFactory(), session); } + @Override public final IPropertyTypeBO createPropertyTypeBO(final Session session) { return new PropertyTypeBO(getDaoFactory(), session); } + @Override public final IVocabularyBO createVocabularyBO(Session session) { return new VocabularyBO(getDaoFactory(), session); } + @Override public final IVocabularyTermBO createVocabularyTermBO(Session session) { return new VocabularyTermBO(getDaoFactory(), session); } + @Override public IEntityTypePropertyTypeBO createEntityTypePropertyTypeBO(Session session, EntityKind entityKind) { return new EntityTypePropertyTypeBO(getDaoFactory(), session, entityKind); } + @Override public IProjectBO createProjectBO(Session session) { return new ProjectBO(getDaoFactory(), session); } + @Override public IEntityTypeBO createEntityTypeBO(Session session) { return new EntityTypeBO(getDaoFactory(), session); } + @Override public IMaterialBO createMaterialBO(Session session) { return new MaterialBO(getDaoFactory(), session); } + @Override public IAuthorizationGroupBO createAuthorizationGroupBO(Session session) { return new AuthorizationGroupBO(getDaoFactory(), session); } + @Override public IGridCustomFilterOrColumnBO createGridCustomFilterBO(Session session) { return new GridCustomFilterBO(getDaoFactory(), session); } + @Override public IGridCustomFilterOrColumnBO createGridCustomColumnBO(Session session) { return new GridCustomColumnBO(getDaoFactory(), session); } + @Override public ITrashBO createTrashBO(Session session) { return new TrashBO(getDaoFactory(), this, session); } + @Override public IDeletionTable createDeletionTable(Session session) { return new DeletionTable(getDaoFactory(), session); } + @Override public ICorePluginTable createCorePluginTable(Session session, IMasterDataScriptRegistrationRunner masterDataScriptRunner) { return new CorePluginTable(getDaoFactory(), session, masterDataScriptRunner); } + @Override public IDataStoreBO createDataStoreBO(Session session) { return new DataStoreBO(getDaoFactory(), session, getDSSFactory()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java index bb23e1147a8..d07a2aca3b6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java @@ -141,6 +141,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IScriptUpdates; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ISpaceUpdates; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IVocabularyTermUpdates; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IVocabularyUpdates; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Identifier; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.LastModificationState; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.LinkModel; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ListMaterialCriteria; @@ -157,7 +158,6 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewAuthorizationGroup; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewColumnOrFilter; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewDataSet; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewETPTAssignment; -import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewMaterial; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewSample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewVocabulary; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Person; @@ -299,6 +299,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt /** * Creates a logger used to log invocations of objects of this class. */ + @Override public final ICommonServerForInternalUse createLogger(IInvocationLoggerContext context) { return new CommonServerLogger(getSessionManager(), context); @@ -308,6 +309,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt // ISystemAuthenticator // + @Override public SessionContextDTO tryToAuthenticateAsSystem() { final PersonPE systemUser = getSystemUser(); @@ -328,6 +330,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt // IGenericServer // + @Override public final List<Space> listSpaces(final String sessionToken, final DatabaseInstanceIdentifier identifier) { @@ -344,6 +347,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return SpaceTranslator.translate(spaces); } + @Override public final void registerSpace(final String sessionToken, final String spaceCode, final String descriptionOrNull) { @@ -353,6 +357,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt groupBO.save(); } + @Override public final void updateScript(final String sessionToken, final IScriptUpdates updates) { assert sessionToken != null : "Unspecified session token"; @@ -363,6 +368,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt bo.update(updates); } + @Override public final void updateSpace(final String sessionToken, final ISpaceUpdates updates) { assert sessionToken != null : "Unspecified session token"; @@ -373,11 +379,13 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt groupBO.update(updates); } + @Override public final void registerPerson(final String sessionToken, final String userID) { registerPersons(sessionToken, Arrays.asList(userID)); } + @Override public final List<RoleAssignment> listRoleAssignments(final String sessionToken) { checkSession(sessionToken); @@ -386,6 +394,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return RoleAssignmentTranslator.translate(roles); } + @Override public final void registerSpaceRole(final String sessionToken, final RoleCode roleCode, final SpaceIdentifier spaceIdentifier, final Grantee grantee) { @@ -402,6 +411,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } + @Override public final void registerInstanceRole(final String sessionToken, final RoleCode roleCode, final Grantee grantee) { @@ -419,6 +429,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } + @Override public final void deleteSpaceRole(final String sessionToken, final RoleCode roleCode, final SpaceIdentifier spaceIdentifier, final Grantee grantee) { @@ -454,6 +465,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt getDAOFactory().getRoleAssignmentDAO().deleteRoleAssignment(roleAssignment); } + @Override public final void deleteInstanceRole(final String sessionToken, final RoleCode roleCode, final Grantee grantee) { @@ -477,6 +489,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt roleAssignmentDAO.deleteRoleAssignment(roleAssignment); } + @Override public final List<Person> listPersons(final String sessionToken) { checkSession(sessionToken); @@ -485,6 +498,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return PersonTranslator.translate(persons); } + @Override public final List<Project> listProjects(final String sessionToken) { checkSession(sessionToken); @@ -493,6 +507,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return ProjectTranslator.translate(projects); } + @Override public final List<SampleType> listSampleTypes(final String sessionToken) { checkSession(sessionToken); @@ -502,6 +517,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt new HashMap<PropertyTypePE, PropertyType>()); } + @Override public final List<Sample> listSamples(final String sessionToken, final ListSampleCriteria criteria) { @@ -510,6 +526,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return sampleLister.list(new ListOrSearchSampleCriteria(criteria)); } + @Override public List<Sample> searchForSamples(String sessionToken, DetailedSearchCriteria criteria) { final Session session = getSession(sessionToken); @@ -518,6 +535,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return searchHelper.searchForSamples(criteria); } + @Override public final List<ExternalData> listSampleExternalData(final String sessionToken, final TechId sampleId, final boolean showOnlyDirectlyConnected) { @@ -529,6 +547,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return datasets; } + @Override public final List<ExternalData> listExperimentExternalData(final String sessionToken, final TechId experimentId, boolean showOnlyDirectlyConnected) { @@ -541,6 +560,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } // 'fast' implementation + @Override public List<ExternalData> listDataSetRelationships(String sessionToken, TechId datasetId, DataSetRelationshipRole role) { @@ -565,6 +585,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return datasets; } + @Override public final List<PropertyType> listPropertyTypes(final String sessionToken, boolean withRelations) { @@ -584,12 +605,14 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt new HashMap<PropertyTypePE, PropertyType>()); } + @Override public List<EntityTypePropertyType<?>> listEntityTypePropertyTypes(String sessionToken) { List<PropertyType> propertyTypes = listPropertyTypes(sessionToken, true); return extractAssignments(propertyTypes); } + @Override public List<EntityPropertyHistory> listEntityPropertyHistory(String sessionToken, EntityKind entityKind, TechId entityID) { @@ -635,6 +658,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public final List<MatchingEntity> listMatchingEntities(final String sessionToken, final SearchableEntity[] searchableEntities, final String queryText, final boolean useWildcardSearchMode, int maxSize) @@ -653,30 +677,35 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return list; } + @Override public final List<Experiment> listExperiments(final String sessionToken, final ExperimentType experimentType, final ProjectIdentifier projectIdentifier) { return listExperiments(sessionToken, experimentType, null, projectIdentifier, false, false); } + @Override public final List<Experiment> listExperimentsHavingSamples(final String sessionToken, final ExperimentType experimentType, final ProjectIdentifier projectIdentifier) { return listExperiments(sessionToken, experimentType, null, projectIdentifier, true, false); } + @Override public final List<Experiment> listExperimentsHavingDataSets(final String sessionToken, final ExperimentType experimentType, final ProjectIdentifier projectIdentifier) { return listExperiments(sessionToken, experimentType, null, projectIdentifier, false, true); } + @Override public final List<Experiment> listExperiments(final String sessionToken, final ExperimentType experimentType, final SpaceIdentifier spaceIdentifier) { return listExperiments(sessionToken, experimentType, spaceIdentifier, null, false, false); } + @Override public List<Experiment> listExperiments(String sessionToken, List<ExperimentIdentifier> experimentIdentifiers) { @@ -711,6 +740,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return ExperimentTranslator.translate(experiments, session.getBaseIndexURL()); } + @Override public final List<ExperimentType> listExperimentTypes(final String sessionToken) { final List<ExperimentTypePE> experimentTypes = @@ -718,6 +748,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return ExperimentTranslator.translate(experimentTypes); } + @Override public List<MaterialType> listMaterialTypes(String sessionToken) { final List<MaterialTypePE> materialTypes = @@ -726,6 +757,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt new HashMap<PropertyTypePE, PropertyType>()); } + @Override public MaterialType getMaterialType(String sessionToken, String code) { final EntityTypePE materialType = findEntityType(EntityKind.MATERIAL, code); @@ -743,6 +775,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return types; } + @Override public final List<DataType> listDataTypes(final String sessionToken) { assert sessionToken != null : "Unspecified session token"; @@ -751,6 +784,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt final List<DataType> dataTypes = DataTypeTranslator.translate(dataTypePEs); Collections.sort(dataTypes, new Comparator<DataType>() { + @Override public int compare(DataType o1, DataType o2) { return o1.getCode().name().compareTo(o2.getCode().name()); @@ -759,6 +793,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return dataTypes; } + @Override public List<FileFormatType> listFileFormatTypes(String sessionToken) { assert sessionToken != null : "Unspecified session token"; @@ -768,6 +803,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt final List<FileFormatType> fileFormatTypes = TypeTranslator.translate(fileFormatTypePEs); Collections.sort(fileFormatTypes, new Comparator<FileFormatType>() { + @Override public int compare(FileFormatType o1, FileFormatType o2) { return o1.getCode().compareTo(o2.getCode()); @@ -776,6 +812,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return fileFormatTypes; } + @Override public final List<Vocabulary> listVocabularies(final String sessionToken, final boolean withTerms, boolean excludeInternal) { @@ -799,6 +836,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt HibernateUtils.initialize(vocabularyPE.getTerms()); } + @Override public String assignPropertyType(final String sessionToken, NewETPTAssignment assignment) { assert sessionToken != null : "Unspecified session token"; @@ -832,6 +870,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void updatePropertyTypeAssignment(final String sessionToken, NewETPTAssignment assignmentUpdates) { @@ -846,6 +885,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt etptBO.updateLoadedAssignment(assignmentUpdates); } + @Override public void unassignPropertyType(String sessionToken, EntityKind entityKind, String propertyTypeCode, String entityTypeCode) { @@ -859,6 +899,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt etptBO.deleteLoadedAssignment(); } + @Override public int countPropertyTypedEntities(String sessionToken, EntityKind entityKind, String propertyTypeCode, String entityTypeCode) { @@ -871,6 +912,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return etptBO.countAssignmentValues(propertyTypeCode, entityTypeCode); } + @Override public final void registerPropertyType(final String sessionToken, final PropertyType propertyType) { @@ -883,6 +925,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt propertyTypeBO.save(); } + @Override public final void updatePropertyType(final String sessionToken, final IPropertyTypeUpdates updates) { @@ -894,6 +937,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt propertyTypeBO.update(updates); } + @Override public final void registerVocabulary(final String sessionToken, final NewVocabulary vocabulary) { assert sessionToken != null : "Unspecified session token"; @@ -905,6 +949,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt vocabularyBO.save(); } + @Override public final void updateVocabulary(final String sessionToken, final IVocabularyUpdates updates) { assert sessionToken != null : "Unspecified session token"; @@ -915,6 +960,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt vocabularyBO.update(updates); } + @Override public void addVocabularyTerms(String sessionToken, TechId vocabularyId, List<String> vocabularyTerms, Long previousTermOrdinal) { @@ -929,6 +975,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt vocabularyBO.save(); } + @Override public void addUnofficialVocabularyTerm(String sessionToken, TechId vocabularyId, String code, String label, String description, Long previousTermOrdinal) { @@ -944,6 +991,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt vocabularyBO.save(); } + @Override public final void updateVocabularyTerm(final String sessionToken, final IVocabularyTermUpdates updates) { @@ -956,6 +1004,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt vocabularyTermBO.update(updates); } + @Override public void deleteVocabularyTerms(String sessionToken, TechId vocabularyId, List<VocabularyTerm> termsToBeDeleted, List<VocabularyTermReplacement> termsToBeReplaced) { @@ -969,6 +1018,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt vocabularyBO.save(); } + @Override public void makeVocabularyTermsOfficial(String sessionToken, TechId vocabularyId, List<VocabularyTerm> termsToBeOfficial) { @@ -981,6 +1031,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt vocabularyTermBO.makeOfficial(termsToBeOfficial); } + @Override public void registerProject(String sessionToken, ProjectIdentifier projectIdentifier, String description, String leaderId, Collection<NewAttachment> attachments) { @@ -997,6 +1048,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } + @Override public List<ExternalData> searchForDataSets(String sessionToken, DetailedSearchCriteria criteria) { final Session session = getSession(sessionToken); @@ -1005,6 +1057,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return searchHelper.searchForDataSets(criteria); } + @Override public ExternalData getDataSetInfo(final String sessionToken, final TechId datasetId) { final Session session = getSession(sessionToken); @@ -1018,6 +1071,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return DataSetTranslator.translate(dataset, session.getBaseIndexURL(), false); } + @Override public DataSetUpdateResult updateDataSet(String sessionToken, DataSetUpdatesDTO updates) { final Session session = getSession(sessionToken); @@ -1033,6 +1087,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return result; } + @Override public List<ExternalData> listRelatedDataSets(String sessionToken, DataSetRelatedEntities relatedEntities, boolean withDetails) { @@ -1094,6 +1149,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public List<Material> listMaterials(String sessionToken, ListMaterialCriteria criteria, boolean withProperties) { @@ -1102,6 +1158,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return materialLister.list(criteria, withProperties); } + @Override public void registerSampleType(String sessionToken, SampleType entityType) { final Session session = getSession(sessionToken); @@ -1110,11 +1167,13 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt entityTypeBO.save(); } + @Override public void updateSampleType(String sessionToken, EntityType entityType) { updateEntityType(sessionToken, EntityKind.SAMPLE, entityType); } + @Override public void registerMaterialType(String sessionToken, MaterialType entityType) { final Session session = getSession(sessionToken); @@ -1123,11 +1182,13 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt entityTypeBO.save(); } + @Override public void updateMaterialType(String sessionToken, EntityType entityType) { updateEntityType(sessionToken, EntityKind.MATERIAL, entityType); } + @Override public void registerExperimentType(String sessionToken, ExperimentType entityType) { final Session session = getSession(sessionToken); @@ -1136,11 +1197,13 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt entityTypeBO.save(); } + @Override public void updateExperimentType(String sessionToken, EntityType entityType) { updateEntityType(sessionToken, EntityKind.EXPERIMENT, entityType); } + @Override public void registerFileFormatType(String sessionToken, FileFormatType type) { checkSession(sessionToken); @@ -1157,6 +1220,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void registerDataSetType(String sessionToken, DataSetType entityType) { final Session session = getSession(sessionToken); @@ -1165,6 +1229,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt entityTypeBO.save(); } + @Override public void updateDataSetType(String sessionToken, EntityType entityType) { updateEntityType(sessionToken, EntityKind.DATA_SET, entityType); @@ -1207,6 +1272,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void deleteDataSets(String sessionToken, List<String> dataSetCodes, String reason, DeletionType type, boolean forceNotExistingLocations, boolean isTrashEnabled) { @@ -1214,6 +1280,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt false, isTrashEnabled); } + @Override public void deleteDataSetsForced(String sessionToken, List<String> dataSetCodes, String reason, DeletionType type, boolean forceNotExistingLocations, boolean isTrashEnabled) { @@ -1261,6 +1328,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void deleteSamples(String sessionToken, List<TechId> sampleIds, String reason, DeletionType deletionType) { @@ -1279,6 +1347,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void deleteExperiments(String sessionToken, List<TechId> experimentIds, String reason, DeletionType deletionType) { @@ -1297,6 +1366,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void deleteVocabularies(String sessionToken, List<TechId> vocabularyIds, String reason) { Session session = getSession(sessionToken); @@ -1307,6 +1377,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void deletePropertyTypes(String sessionToken, List<TechId> propertyTypeIds, String reason) { Session session = getSession(sessionToken); @@ -1318,6 +1389,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } // TODO 2009-06-24 IA: add unit tests to project deletion (all layers) + @Override public void deleteProjects(String sessionToken, List<TechId> projectIds, String reason) { Session session = getSession(sessionToken); @@ -1328,6 +1400,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void deleteSpaces(String sessionToken, List<TechId> groupIds, String reason) { Session session = getSession(sessionToken); @@ -1338,6 +1411,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void deleteScripts(String sessionToken, List<TechId> scriptIds) { Session session = getSession(sessionToken); @@ -1348,6 +1422,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void deleteExperimentAttachments(String sessionToken, TechId experimentId, List<String> fileNames, String reason) { @@ -1357,6 +1432,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt deleteHolderAttachments(session, experimentBO.getExperiment(), fileNames, reason); } + @Override public void updateExperimentAttachments(String sessionToken, TechId experimentId, Attachment attachment) { @@ -1368,6 +1444,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt attachmentBO.save(); } + @Override public void addExperimentAttachment(String sessionToken, TechId experimentId, NewAttachment attachment) { @@ -1378,6 +1455,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt bo.save(); } + @Override public void deleteSampleAttachments(String sessionToken, TechId sampleId, List<String> fileNames, String reason) { @@ -1387,6 +1465,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt deleteHolderAttachments(session, sampleBO.getSample(), fileNames, reason); } + @Override public void deleteProjectAttachments(String sessionToken, TechId projectId, List<String> fileNames, String reason) { @@ -1403,6 +1482,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt attachmentBO.deleteHolderAttachments(holder, fileNames, reason); } + @Override public List<Attachment> listExperimentAttachments(String sessionToken, TechId experimentId) { Session session = getSession(sessionToken); @@ -1413,6 +1493,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt session.getBaseIndexURL()); } + @Override public List<Attachment> listSampleAttachments(String sessionToken, TechId sampleId) { Session session = getSession(sessionToken); @@ -1422,6 +1503,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt session.getBaseIndexURL()); } + @Override public List<Attachment> listProjectAttachments(String sessionToken, TechId projectId) { Session session = getSession(sessionToken); @@ -1436,6 +1518,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return getDAOFactory().getAttachmentDAO().listAttachments(holder); } + @Override public String uploadDataSets(String sessionToken, List<String> dataSetCodes, DataSetUploadContext uploadContext) { @@ -1445,6 +1528,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return dataSetTable.uploadLoadedDataSetsToCIFEX(uploadContext); } + @Override public List<VocabularyTermWithStats> listVocabularyTermsWithStatistics(String sessionToken, Vocabulary vocabulary) { @@ -1454,6 +1538,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return vocabularyBO.countTermsUsageStatistics(); } + @Override public Set<VocabularyTerm> listVocabularyTerms(String sessionToken, Vocabulary vocabulary) { final Session session = getSession(sessionToken); @@ -1462,6 +1547,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return VocabularyTermTranslator.translateTerms(vocabularyBO.enrichWithTerms()); } + @Override public List<DataSetType> listDataSetTypes(String sessionToken) { final List<DataSetTypePE> dataSetTypes = listEntityTypes(sessionToken, EntityKind.DATA_SET); @@ -1469,12 +1555,14 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt new HashMap<PropertyTypePE, PropertyType>()); } + @Override public LastModificationState getLastModificationState(String sessionToken) { checkSession(sessionToken); return lastModificationState; } + @Override public final SampleParentWithDerived getSampleInfo(final String sessionToken, final TechId sampleId) { @@ -1491,6 +1579,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt .getSampleInfo(session, sample), session.getBaseIndexURL()); } + @Override public SampleUpdateResult updateSample(String sessionToken, SampleUpdatesDTO updates) { final Session session = getSession(sessionToken); @@ -1506,6 +1595,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return result; } + @Override public Experiment getExperimentInfo(final String sessionToken, final ExperimentIdentifier identifier) { @@ -1525,6 +1615,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt ExperimentTranslator.LoadableFields.ATTACHMENTS); } + @Override public Experiment getExperimentInfo(final String sessionToken, final TechId experimentId) { final Session session = getSession(sessionToken); @@ -1538,6 +1629,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt ExperimentTranslator.LoadableFields.ATTACHMENTS); } + @Override public ExperimentUpdateResult updateExperiment(String sessionToken, ExperimentUpdatesDTO updates) { final Session session = getSession(sessionToken); @@ -1551,6 +1643,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return result; } + @Override public Project getProjectInfo(String sessionToken, TechId projectId) { final Session session = getSession(sessionToken); @@ -1561,6 +1654,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return ProjectTranslator.translate(project); } + @Override public Project getProjectInfo(String sessionToken, ProjectIdentifier projectIdentifier) { final Session session = getSession(sessionToken); @@ -1570,6 +1664,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return ProjectTranslator.translate(project); } + @Override public Material getMaterialInfo(String sessionToken, final MaterialIdentifier identifier) { Session session = getSession(sessionToken); @@ -1579,6 +1674,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return MaterialTranslator.translate(materialBO.getMaterial()); } + @Override public Material getMaterialInfo(final String sessionToken, final TechId materialId) { final Session session = getSession(sessionToken); @@ -1589,12 +1685,14 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return MaterialTranslator.translate(material, true); } + @Override public IEntityInformationHolderWithPermId getMaterialInformationHolder(String sessionToken, MaterialIdentifier identifier) { return getMaterialInfo(sessionToken, identifier); } + @Override public Date updateMaterial(String sessionToken, TechId materialId, List<IEntityProperty> properties, Date version) { @@ -1605,6 +1703,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return materialBO.getMaterial().getModificationDate(); } + @Override public IEntityInformationHolderWithPermId getEntityInformationHolder(String sessionToken, final EntityKind entityKind, final String permId) { @@ -1651,12 +1750,14 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return new BasicEntityInformationHolder(kind, entityType, code, id, permId); } + @Override public String generateCode(String sessionToken, String prefix) { checkSession(sessionToken); return prefix + getDAOFactory().getCodeSequenceDAO().getNextCodeSequenceId(); } + @Override public Date updateProject(String sessionToken, ProjectUpdatesDTO updates) { final Session session = getSession(sessionToken); @@ -1678,12 +1779,14 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void deleteDataSetTypes(String sessionToken, List<String> entityTypesCodes) throws UserFailureException { deleteEntityTypes(sessionToken, EntityKind.DATA_SET, entityTypesCodes); } + @Override public void deleteExperimentTypes(String sessionToken, List<String> entityTypesCodes) throws UserFailureException { @@ -1691,6 +1794,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } + @Override public void deleteMaterialTypes(String sessionToken, List<String> entityTypesCodes) throws UserFailureException { @@ -1698,12 +1802,14 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } + @Override public void deleteSampleTypes(String sessionToken, List<String> entityTypesCodes) throws UserFailureException { deleteEntityTypes(sessionToken, EntityKind.SAMPLE, entityTypesCodes); } + @Override public void deleteFileFormatTypes(String sessionToken, List<String> codes) throws UserFailureException { @@ -1733,6 +1839,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public String getTemplateColumns(String sessionToken, EntityKind entityKind, String type, boolean autoGenerate, boolean withExperiments, boolean withSpace, BatchOperationKind operationKind) @@ -1784,7 +1891,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt case SAMPLE: if (autoGenerate == false) { - columns.add(NewSample.IDENTIFIER_COLUMN); + columns.add(Identifier.IDENTIFIER_COLUMN); } columns.add(NewSample.CONTAINER); columns.add(NewSample.PARENTS); @@ -1800,7 +1907,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt ((SampleTypePE) entityType).getSampleTypePropertyTypes()); break; case DATA_SET: - columns.add(NewDataSet.CODE); + columns.add(Code.CODE); columns.add(NewDataSet.CONTAINER); columns.add(NewDataSet.PARENTS); columns.add(NewDataSet.EXPERIMENT); @@ -1810,12 +1917,12 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt ((DataSetTypePE) entityType).getDataSetTypePropertyTypes()); break; case MATERIAL: - columns.add(NewMaterial.CODE); + columns.add(Code.CODE); addPropertiesToTemplateColumns(columns, ((MaterialTypePE) entityType).getMaterialTypePropertyTypes()); break; case EXPERIMENT: - columns.add(NewSample.IDENTIFIER_COLUMN); + columns.add(Identifier.IDENTIFIER_COLUMN); if (operationKind == BatchOperationKind.UPDATE) { columns.add("project"); @@ -1920,6 +2027,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return typeOrNull; } + @Override public void updateFileFormatType(String sessionToken, AbstractType type) { checkSession(sessionToken); @@ -1930,6 +2038,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } + @Override public void updateProjectAttachments(String sessionToken, TechId projectId, Attachment attachment) { @@ -1941,6 +2050,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt attachmentBO.save(); } + @Override public void addProjectAttachments(String sessionToken, TechId projectId, NewAttachment attachment) { @@ -1951,6 +2061,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt bo.save(); } + @Override public void updateSampleAttachments(String sessionToken, TechId sampleId, Attachment attachment) { Session session = getSession(sessionToken); @@ -1961,6 +2072,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt attachmentBO.save(); } + @Override public void addSampleAttachments(String sessionToken, TechId sampleId, NewAttachment attachment) { Session session = getSession(sessionToken); @@ -1970,6 +2082,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt bo.save(); } + @Override public List<DatastoreServiceDescription> listDataStoreServices(String sessionToken, DataStoreServiceKind dataStoreServiceKind) { @@ -1999,6 +2112,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return result; } + @Override public TableModel createReportFromDatasets(String sessionToken, DatastoreServiceDescription serviceDescription, List<String> datasetCodes) { @@ -2008,6 +2122,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt serviceDescription.getDatastoreCode(), datasetCodes); } + @Override public TableModel createReportFromAggregationService(String sessionToken, DatastoreServiceDescription serviceDescription, Map<String, Object> parameters) { @@ -2017,6 +2132,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt serviceDescription.getDatastoreCode(), parameters); } + @Override public void processDatasets(String sessionToken, DatastoreServiceDescription serviceDescription, List<String> datasetCodes) { @@ -2027,6 +2143,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt serviceDescription.getDatastoreCode(), datasetCodes, parameterBindings); } + @Override public void registerAuthorizationGroup(String sessionToken, NewAuthorizationGroup newAuthorizationGroup) { @@ -2036,6 +2153,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt bo.save(); } + @Override public void registerScript(String sessionToken, Script script) { Session session = getSession(sessionToken); @@ -2044,6 +2162,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt bo.save(); } + @Override public void deleteAuthorizationGroups(String sessionToken, List<TechId> groupIds, String reason) { Session session = getSession(sessionToken); @@ -2055,6 +2174,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public List<AuthorizationGroup> listAuthorizationGroups(String sessionToken) { checkSession(sessionToken); @@ -2064,6 +2184,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return AuthorizationGroupTranslator.translate(persons); } + @Override public List<Script> listScripts(String sessionToken, ScriptType scriptTypeOrNull, EntityKind entityKindOrNull) { @@ -2074,6 +2195,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return ScriptTranslator.translate(scripts); } + @Override public Date updateAuthorizationGroup(String sessionToken, AuthorizationGroupUpdates updates) { final Session session = getSession(sessionToken); @@ -2083,6 +2205,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return bo.getAuthorizationGroup().getModificationDate(); } + @Override public List<Person> listPersonInAuthorizationGroup(String sessionToken, TechId authorizatonGroupId) { @@ -2092,6 +2215,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return PersonTranslator.translate(bo.getAuthorizationGroup().getPersons()); } + @Override public void addPersonsToAuthorizationGroup(String sessionToken, TechId authorizationGroupId, List<String> personsCodes) { @@ -2116,6 +2240,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return inexistent; } + @Override public void removePersonsFromAuthorizationGroup(String sessionToken, TechId authorizationGroupId, List<String> personsCodes) { @@ -2154,6 +2279,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public List<GridCustomFilter> listFilters(String sessionToken, String gridId) { checkSession(sessionToken); @@ -2163,18 +2289,21 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return GridCustomFilterTranslator.translate(filters); } + @Override public void registerFilter(String sessionToken, NewColumnOrFilter filter) { IGridCustomFilterOrColumnBO bo = createGridCustomFilterBO(sessionToken); registerFilterOrColumn(filter, bo); } + @Override public void deleteFilters(String sessionToken, List<TechId> filterIds) { IGridCustomFilterOrColumnBO bo = createGridCustomFilterBO(sessionToken); deleteFiltersOrColumns(filterIds, bo); } + @Override public void updateFilter(String sessionToken, IExpressionUpdates updates) { assert updates != null : "Unspecified updates"; @@ -2183,18 +2312,21 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt // -- columns + @Override public void registerGridCustomColumn(String sessionToken, NewColumnOrFilter column) { IGridCustomFilterOrColumnBO bo = createGridCustomColumnBO(sessionToken); registerFilterOrColumn(column, bo); } + @Override public void deleteGridCustomColumns(String sessionToken, List<TechId> columnIds) { IGridCustomFilterOrColumnBO bo = createGridCustomColumnBO(sessionToken); deleteFiltersOrColumns(columnIds, bo); } + @Override public void updateGridCustomColumn(String sessionToken, IExpressionUpdates updates) { assert updates != null : "Unspecified updates"; @@ -2203,11 +2335,13 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt // -- + @Override public void keepSessionAlive(String sessionToken) throws UserFailureException { checkSession(sessionToken); } + @Override public void updateVocabularyTerms(String sessionToken, TechId vocabularyId, List<VocabularyTerm> terms) { @@ -2218,6 +2352,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt bo.save(); } + @Override public void deleteMaterials(String sessionToken, List<TechId> materialIds, String reason) { Session session = getSession(sessionToken); @@ -2225,6 +2360,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt materialTable.deleteByTechIds(materialIds, reason); } + @Override public int lockDatasets(String sessionToken, List<String> datasetCodes) { Session session = getSession(sessionToken); @@ -2233,6 +2369,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return dataSetTable.lockDatasets(); } + @Override public int unlockDatasets(String sessionToken, List<String> datasetCodes) { Session session = getSession(sessionToken); @@ -2241,6 +2378,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return dataSetTable.unlockDatasets(); } + @Override public LinkModel retrieveLinkFromDataSet(String sessionToken, DatastoreServiceDescription serviceDescription, String dataSetCode) { @@ -2250,6 +2388,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt serviceDescription.getDatastoreCode(), dataSetCode); } + @Override public Script getScriptInfo(String sessionToken, TechId scriptId) { getSession(sessionToken); @@ -2257,6 +2396,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return ScriptTranslator.translate(script); } + @Override public String evaluate(String sessionToken, DynamicPropertyEvaluationInfo info) { Session session = getSession(sessionToken); @@ -2277,6 +2417,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public IEntityInformationHolderWithPermId getEntityInformationHolder(String sessionToken, BasicEntityDescription info) { @@ -2324,6 +2465,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return entity; } + @Override public void updateManagedPropertyOnExperiment(String sessionToken, TechId experimentId, IManagedProperty managedProperty, IManagedUiAction updateAction) { @@ -2343,6 +2485,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt experimentBO.save(); } + @Override public void updateManagedPropertyOnSample(String sessionToken, TechId experimentId, IManagedProperty managedProperty, IManagedUiAction updateAction) { @@ -2362,6 +2505,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt sampleBO.save(); } + @Override public void updateManagedPropertyOnDataSet(String sessionToken, TechId experimentId, IManagedProperty managedProperty, IManagedUiAction updateAction) { @@ -2381,6 +2525,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt dataSetBO.save(); } + @Override public void updateManagedPropertyOnMaterial(String sessionToken, TechId experimentId, IManagedProperty managedProperty, IManagedUiAction updateAction) { @@ -2440,6 +2585,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt .getEntityTypePropertyType().getScript().getScript()); } + @Override public String getDefaultPutDataStoreBaseURL(String sessionToken) { checkSession(sessionToken); @@ -2455,6 +2601,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return dataStores.get(0).getDownloadUrl(); } + @Override public void updateDataSetProperties(String sessionToken, TechId entityId, List<PropertyUpdates> modifiedProperties) { @@ -2489,6 +2636,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void updateExperimentProperties(String sessionToken, TechId entityId, List<PropertyUpdates> modifiedProperties) { @@ -2511,6 +2659,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void updateSampleProperties(String sessionToken, TechId entityId, List<PropertyUpdates> modifiedProperties) { @@ -2526,6 +2675,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public void updateMaterialProperties(String sessionToken, TechId entityId, List<PropertyUpdates> modifiedProperties) { @@ -2547,6 +2697,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return properties; } + @Override public final List<Deletion> listDeletions(final String sessionToken, boolean withDeletedEntities) { Session session = getSession(sessionToken); @@ -2555,6 +2706,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return deletionTable.getDeletions(); } + @Override public final void revertDeletions(final String sessionToken, final List<TechId> deletionIds) { final Session session = getSession(sessionToken); @@ -2566,12 +2718,14 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt } } + @Override public final void deletePermanently(final String sessionToken, final List<TechId> deletionIds, boolean forceNotExistingLocations) { deletePermanentlyCommon(sessionToken, deletionIds, forceNotExistingLocations, false); } + @Override public void deletePermanentlyForced(String sessionToken, List<TechId> deletionIds, boolean forceNotExistingLocations) { @@ -2620,6 +2774,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt .getDescription(), entity.getIdentifier(), exception.getMessage()); } + @Override public void registerPlugin(String sessionToken, CorePlugin plugin, ICorePluginResourceLoader resourceLoader) { @@ -2633,6 +2788,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt pluginTable.registerPlugin(plugin, resourceLoader); } + @Override public List<DataStore> listDataStores() { IDataStoreDAO dataStoreDAO = getDAOFactory().getDataStoreDAO(); @@ -2640,6 +2796,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return DataStoreTranslator.translate(dataStorePEs); } + @Override public List<Material> searchForMaterials(String sessionToken, DetailedSearchCriteria criteria) { final Session session = getSession(sessionToken); @@ -2648,6 +2805,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt return searchHelper.searchForMaterials(criteria); } + @Override public String performCustomImport(String sessionToken, String customImportCode, CustomImportFile customImportFile) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServerLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServerLogger.java index 6aebf240e38..4b813323024 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServerLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServerLogger.java @@ -142,11 +142,13 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe // IGenericServer // + @Override public SessionContextDTO tryToAuthenticateAsSystem() { return null; } + @Override public List<Space> listSpaces(final String sessionToken, final DatabaseInstanceIdentifier identifier) { @@ -161,40 +163,47 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public void registerSpace(final String sessionToken, final String groupCode, final String descriptionOrNull) { logTracking(sessionToken, "register_space", "CODE(%s)", groupCode); } + @Override public void updateScript(String sessionToken, IScriptUpdates updates) { logTracking(sessionToken, "update_script", "SCRIPT(%s)", updates.getId()); } + @Override public void updateSpace(String sessionToken, ISpaceUpdates updates) { logTracking(sessionToken, "update_space", "SPACE(%s)", updates); } + @Override public List<Person> listPersons(final String sessionToken) { logAccess(sessionToken, "list_persons"); return null; } + @Override public void registerPerson(final String sessionToken, final String userID) { logTracking(sessionToken, "register_person", "CODE(%s)", userID); } + @Override public List<RoleAssignment> listRoleAssignments(final String sessionToken) { logAccess(sessionToken, "list_roles"); return null; } + @Override public void registerSpaceRole(final String sessionToken, final RoleCode roleCode, final SpaceIdentifier spaceIdentifier, final Grantee grantee) { @@ -203,6 +212,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe } + @Override public void registerInstanceRole(final String sessionToken, final RoleCode roleCode, final Grantee grantee) { @@ -210,6 +220,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe } + @Override public void deleteSpaceRole(final String sessionToken, final RoleCode roleCode, final SpaceIdentifier spaceIdentifier, final Grantee grantee) { @@ -218,6 +229,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe } + @Override public void deleteInstanceRole(final String sessionToken, final RoleCode roleCode, final Grantee grantee) { @@ -225,12 +237,14 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe } + @Override public final List<SampleType> listSampleTypes(final String sessionToken) { logAccess(sessionToken, "list_sample_types"); return null; } + @Override public List<Sample> listSamples(String sessionToken, ListSampleCriteria criteria) { if (criteria.isIncludeSpace()) @@ -275,6 +289,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public final List<ExternalData> listSampleExternalData(final String sessionToken, final TechId sampleId, final boolean showOnlyDirectlyConnected) { @@ -283,6 +298,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public List<ExternalData> listExperimentExternalData(final String sessionToken, final TechId experimentId, boolean showOnlyDirectlyConnected) { @@ -291,6 +307,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public List<ExternalData> listDataSetRelationships(String sessionToken, TechId datasetId, DataSetRelationshipRole role) { @@ -298,6 +315,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public final List<MatchingEntity> listMatchingEntities(final String sessionToken, final SearchableEntity[] searchableEntities, final String queryText, final boolean useWildcardSearchMode, int maxSIze) @@ -314,6 +332,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe newSample.getSampleType(), newSample.getIdentifier()); } + @Override public List<Experiment> listExperiments(final String sessionToken, final ExperimentType experimentType, final ProjectIdentifier project) { @@ -321,6 +340,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public List<Experiment> listExperimentsHavingSamples(final String sessionToken, final ExperimentType experimentType, final ProjectIdentifier project) { @@ -329,6 +349,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public List<Experiment> listExperimentsHavingDataSets(final String sessionToken, final ExperimentType experimentType, final ProjectIdentifier project) { @@ -337,6 +358,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public List<Experiment> listExperiments(final String sessionToken, final ExperimentType experimentType, final SpaceIdentifier space) { @@ -344,24 +366,28 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public List<Project> listProjects(final String sessionToken) { logAccess(sessionToken, "list_projects"); return null; } + @Override public List<ExperimentType> listExperimentTypes(final String sessionToken) { logAccess(sessionToken, "list_experiment_types"); return null; } + @Override public List<PropertyType> listPropertyTypes(final String sessionToken, boolean withRelations) { logAccess(sessionToken, "list_property_types", withRelations ? "WITH_RELATIONS" : ""); return null; } + @Override public List<EntityPropertyHistory> listEntityPropertyHistory(String sessionToken, EntityKind entityKind, TechId entityID) { @@ -370,12 +396,14 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public final List<DataType> listDataTypes(final String sessionToken) { logAccess(sessionToken, "list_data_types"); return null; } + @Override public final List<Script> listScripts(final String sessionToken, ScriptType scriptTypeOrNull, EntityKind entityKindOrNull) { @@ -384,12 +412,14 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public List<FileFormatType> listFileFormatTypes(String sessionToken) { logAccess(sessionToken, "list_file_format_types"); return null; } + @Override public final List<Vocabulary> listVocabularies(final String sessionToken, boolean withTerms, boolean excludeInternal) { @@ -397,6 +427,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public String assignPropertyType(final String sessionToken, NewETPTAssignment assignment) { final String entityTypeFormat = assignment.getEntityKind().name() + "_TYPE(%S)"; @@ -408,6 +439,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public void updatePropertyTypeAssignment(String sessionToken, NewETPTAssignment assignmentUpdates) { @@ -419,6 +451,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe assignmentUpdates.getSection(), assignmentUpdates.getOrdinal()); } + @Override public void unassignPropertyType(String sessionToken, EntityKind entityKind, String propertyTypeCode, String entityTypeCode) { @@ -427,6 +460,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe + entityTypeFormat, propertyTypeCode, entityTypeCode); } + @Override public int countPropertyTypedEntities(String sessionToken, EntityKind entityKind, String propertyTypeCode, String entityTypeCode) { @@ -436,6 +470,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return 0; } + @Override public final void registerPropertyType(final String sessionToken, final PropertyType propertyType) { @@ -443,22 +478,26 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe propertyType.getCode()); } + @Override public void updatePropertyType(String sessionToken, IPropertyTypeUpdates updates) { logTracking(sessionToken, "update_property_type", "PROPERTY_TYPE(%s)", updates); } + @Override public final void registerVocabulary(final String sessionToken, final NewVocabulary vocabulary) { logTracking(sessionToken, "register_vocabulary", "VOCABULARY(%s)", vocabulary.getCode()); } + @Override public void updateVocabulary(String sessionToken, IVocabularyUpdates updates) { logTracking(sessionToken, "update_vocabulary", "ID(%s) CODE(%s)", updates.getId(), updates.getCode()); } + @Override public void addVocabularyTerms(String sessionToken, TechId vocabularyId, List<String> vocabularyTerms, Long previousTermOrdinal) { @@ -466,6 +505,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe vocabularyId, abbreviate(vocabularyTerms), Long.toString(previousTermOrdinal)); } + @Override public void addUnofficialVocabularyTerm(String sessionToken, TechId vocabularyId, String code, String label, String description, Long previousTermOrdinal) { @@ -474,11 +514,13 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe code, label, description, Long.toString(previousTermOrdinal)); } + @Override public void updateVocabularyTerm(String sessionToken, IVocabularyTermUpdates updates) { logTracking(sessionToken, "update_vocabulary_term", "VOCABULARY_TERM(%s)", updates); } + @Override public void deleteVocabularyTerms(String sessionToken, TechId vocabularyId, List<VocabularyTerm> termsToBeDeleted, List<VocabularyTermReplacement> termsToBeReplaced) { @@ -487,6 +529,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe abbreviate(termsToBeDeleted), abbreviate(termsToBeReplaced)); } + @Override public void makeVocabularyTermsOfficial(String sessionToken, TechId vocabularyId, List<VocabularyTerm> termsToBeOfficial) { @@ -494,6 +537,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe "VOCABULARY_ID(%s) OFFICIAL(%s)", vocabularyId, abbreviate(termsToBeOfficial)); } + @Override public void registerProject(String sessionToken, ProjectIdentifier projectIdentifier, String description, String leaderId, Collection<NewAttachment> attachments) { @@ -501,30 +545,35 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe projectIdentifier, abbreviate(attachments)); } + @Override public List<ExternalData> searchForDataSets(String sessionToken, DetailedSearchCriteria criteria) { logAccess(sessionToken, "search_for_datasets", "criteria(%s)", criteria); return null; } + @Override public List<Sample> searchForSamples(String sessionToken, DetailedSearchCriteria criteria) { logAccess(sessionToken, "search_for_samples", "criteria(%s)", criteria); return null; } + @Override public ExternalData getDataSetInfo(String sessionToken, TechId datasetId) { logAccess(sessionToken, "getDataSetInfo", "datasetId(%s)", datasetId.getId()); return null; } + @Override public DataSetUpdateResult updateDataSet(String sessionToken, DataSetUpdatesDTO updates) { logTracking(sessionToken, "updateDataSet", "DATA_SET(%s)", updates.getDatasetId()); return null; } + @Override public List<ExternalData> listRelatedDataSets(String sessionToken, DataSetRelatedEntities entities, boolean withDetails) { @@ -532,12 +581,14 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public List<MaterialType> listMaterialTypes(String sessionToken) { logAccess(sessionToken, "list_material_types"); return null; } + @Override public MaterialType getMaterialType(String sessionToken, String code) { logAccess(sessionToken, "get_material_type", "CODE(%s)", code); @@ -552,6 +603,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public List<Material> listMaterials(String sessionToken, ListMaterialCriteria criteria, boolean withProperties) { @@ -561,51 +613,61 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public void registerMaterialType(String sessionToken, MaterialType entityType) { logTracking(sessionToken, "register_material_type", "CODE(%s)", entityType.getCode()); } + @Override public void updateMaterialType(String sessionToken, EntityType entityType) { logTracking(sessionToken, "update_material_type", "CODE(%s)", entityType.getCode()); } + @Override public void registerSampleType(String sessionToken, SampleType entityType) { logTracking(sessionToken, "register_sample_type", "CODE(%s)", entityType.getCode()); } + @Override public void updateSampleType(String sessionToken, EntityType entityType) { logTracking(sessionToken, "update_sample_type", "CODE(%s)", entityType.getCode()); } + @Override public void registerExperimentType(String sessionToken, ExperimentType entityType) { logTracking(sessionToken, "register_experiment_type", "CODE(%s)", entityType.getCode()); } + @Override public void updateExperimentType(String sessionToken, EntityType entityType) { logTracking(sessionToken, "update_experiment_type", "CODE(%s)", entityType.getCode()); } + @Override public void registerFileFormatType(String sessionToken, FileFormatType type) { logTracking(sessionToken, "register_file_format_type", "CODE(%s)", type.getCode()); } + @Override public void registerDataSetType(String sessionToken, DataSetType entityType) { logTracking(sessionToken, "register_data_set_type", "CODE(%s)", entityType.getCode()); } + @Override public void updateDataSetType(String sessionToken, EntityType entityType) { logTracking(sessionToken, "update_data_set_type", "CODE(%s)", entityType.getCode()); } + @Override public void deleteDataSets(String sessionToken, List<String> dataSetCodes, String reason, DeletionType type, boolean forceNotExistingLocations, boolean isTrashEnabled) { @@ -614,6 +676,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe abbreviate(dataSetCodes), reason, forceNotExistingLocations); } + @Override public void deleteDataSetsForced(String sessionToken, List<String> dataSetCodes, String reason, DeletionType type, boolean forceNotExistingLocations, boolean isTrashEnabled) { @@ -622,6 +685,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe abbreviate(dataSetCodes), reason, forceNotExistingLocations); } + @Override public void deleteSamples(String sessionToken, List<TechId> sampleIds, String reason, DeletionType deletionType) { @@ -629,6 +693,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe abbreviate(sampleIds), reason); } + @Override public void deleteExperiments(String sessionToken, List<TechId> experimentIds, String reason, DeletionType deletionType) { @@ -636,35 +701,41 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe deletionType, abbreviate(experimentIds), reason); } + @Override public void deleteVocabularies(String sessionToken, List<TechId> vocabularyIds, String reason) { logTracking(sessionToken, "delete_vocabularies", "IDS(%s) REASON(%s)", abbreviate(vocabularyIds), reason); } + @Override public void deletePropertyTypes(String sessionToken, List<TechId> propertyTypeIds, String reason) { logTracking(sessionToken, "delete_property_types", "IDS(%s) REASON(%s)", abbreviate(propertyTypeIds), reason); } + @Override public void deleteProjects(String sessionToken, List<TechId> projectIds, String reason) { logTracking(sessionToken, "delete_projects", "IDS(%s) REASON(%s)", abbreviate(projectIds), reason); } + @Override public void deleteSpaces(String sessionToken, List<TechId> groupIds, String reason) { logTracking(sessionToken, "delete_spaces", "IDS(%s) REASON(%s)", abbreviate(groupIds), reason); } + @Override public void deleteScripts(String sessionToken, List<TechId> scriptIds) { logTracking(sessionToken, "delete_scripts", "IDS(%s)", abbreviate(scriptIds)); } + @Override public void deleteExperimentAttachments(String sessionToken, TechId experimentId, List<String> fileNames, String reason) { @@ -672,6 +743,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe experimentId, abbreviate(fileNames), reason); } + @Override public void deleteSampleAttachments(String sessionToken, TechId experimentId, List<String> fileNames, String reason) { @@ -679,6 +751,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe experimentId, abbreviate(fileNames), reason); } + @Override public void deleteProjectAttachments(String sessionToken, TechId experimentId, List<String> fileNames, String reason) { @@ -686,24 +759,28 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe experimentId, abbreviate(fileNames), reason); } + @Override public List<Attachment> listExperimentAttachments(String sessionToken, TechId experimentId) { logAccess(sessionToken, "list_experiment_attachments", "ID(%s)", experimentId); return null; } + @Override public List<Attachment> listSampleAttachments(String sessionToken, TechId sampleId) { logAccess(sessionToken, "list_sample_attachments", "ID(%s)", sampleId); return null; } + @Override public List<Attachment> listProjectAttachments(String sessionToken, TechId projectId) { logAccess(sessionToken, "list_project_attachments", "ID(%s)", projectId); return null; } + @Override public String uploadDataSets(String sessionToken, List<String> dataSetCodes, DataSetUploadContext uploadContext) { @@ -712,6 +789,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public List<VocabularyTermWithStats> listVocabularyTermsWithStatistics(String sessionToken, Vocabulary vocabulary) { @@ -720,23 +798,27 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public Set<VocabularyTerm> listVocabularyTerms(String sessionToken, Vocabulary vocabulary) { logAccess(sessionToken, "list_vocabulary_terms", "VOCABULARY(%s)", vocabulary.getCode()); return null; } + @Override public List<DataSetType> listDataSetTypes(String sessionToken) { logAccess(sessionToken, "list_data_set_types"); return null; } + @Override public LastModificationState getLastModificationState(String sessionToken) { return null; } + @Override public final SampleParentWithDerived getSampleInfo(final String sessionToken, final TechId sampleId) { @@ -744,6 +826,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public SampleUpdateResult updateSample(String sessionToken, SampleUpdatesDTO updates) { logTracking(sessionToken, "edit_sample", @@ -753,6 +836,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public Experiment getExperimentInfo(final String sessionToken, final ExperimentIdentifier identifier) { @@ -760,30 +844,35 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public Experiment getExperimentInfo(final String sessionToken, final TechId experimentId) { logAccess(sessionToken, "get_experiment_info", "ID(%s)", experimentId); return null; } + @Override public ExperimentUpdateResult updateExperiment(String sessionToken, ExperimentUpdatesDTO updates) { logTracking(sessionToken, "update_experiment", "EXPERIMENT(%s)", updates.getExperimentId()); return null; } + @Override public Project getProjectInfo(String sessionToken, TechId projectId) { logAccess(sessionToken, "get_project_info", "ID(%s)", projectId); return null; } + @Override public Project getProjectInfo(String sessionToken, ProjectIdentifier projectIdentifier) { logAccess(sessionToken, "get_project_info", "IDENTIFIER(%s)", projectIdentifier); return null; } + @Override public IEntityInformationHolderWithPermId getEntityInformationHolder(String sessionToken, ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind entityKind, String permId) { @@ -793,6 +882,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public IEntityInformationHolderWithPermId getMaterialInformationHolder(String sessionToken, MaterialIdentifier identifier) { @@ -800,18 +890,21 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public Material getMaterialInfo(String sessionToken, MaterialIdentifier identifier) { logTracking(sessionToken, "getMaterialInfo", " IDENTIFIER(%S) ", identifier); return null; } + @Override public Material getMaterialInfo(final String sessionToken, final TechId materialId) { logAccess(sessionToken, "get_material_info", "ID(%s)", materialId); return null; } + @Override public Date updateMaterial(String sessionToken, TechId materialId, List<IEntityProperty> properties, Date version) { @@ -819,12 +912,14 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public String generateCode(String sessionToken, String prefix) { logAccess(sessionToken, "generate_code", "PREFIX(%s)", prefix); return null; } + @Override public Date updateProject(String sessionToken, ProjectUpdatesDTO updates) { logTracking(sessionToken, "edit_project", "PROJECT_ID(%s) ATTACHMENTS_ADDED(%s)", @@ -832,29 +927,34 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public void deleteDataSetTypes(String sessionToken, List<String> entityTypesCodes) { logTracking(sessionToken, "delete_data_set_types", "CODES(%s)", abbreviate(entityTypesCodes)); } + @Override public void deleteExperimentTypes(String sessionToken, List<String> entityTypesCodes) { logTracking(sessionToken, "delete_experiment_types", "CODES(%s)", abbreviate(entityTypesCodes)); } + @Override public void deleteMaterialTypes(String sessionToken, List<String> entityTypesCodes) { logTracking(sessionToken, "delete_material_types", "CODES(%s)", abbreviate(entityTypesCodes)); } + @Override public void deleteSampleTypes(String sessionToken, List<String> entityTypesCodes) { logTracking(sessionToken, "delete_sample_types", "CODES(%s)", abbreviate(entityTypesCodes)); } + @Override public String getTemplateColumns(String sessionToken, EntityKind entityKind, String type, boolean autoGenerate, boolean withExperiments, boolean withSpace, BatchOperationKind operationKind) @@ -866,17 +966,20 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public void deleteFileFormatTypes(String sessionToken, List<String> codes) { logTracking(sessionToken, "delete_file_format_types", "CODES(%s)", abbreviate(codes)); } + @Override public void updateFileFormatType(String sessionToken, AbstractType type) { logTracking(sessionToken, "update_file_format_type", "CODE(%s)", type.getCode()); } + @Override public void updateExperimentAttachments(String sessionToken, TechId experimentId, Attachment attachment) { @@ -884,6 +987,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe "EXPERIMENT_ID(%s) ATTACHMENT(%s)", experimentId, attachment.getFileName()); } + @Override public void addExperimentAttachment(String sessionToken, TechId experimentId, NewAttachment attachment) { @@ -891,6 +995,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe experimentId, attachment.getFileName()); } + @Override public void updateProjectAttachments(String sessionToken, TechId projectId, Attachment attachment) { @@ -898,6 +1003,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe projectId, attachment.getFileName()); } + @Override public void addProjectAttachments(String sessionToken, TechId projectId, NewAttachment attachment) { @@ -905,18 +1011,21 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe projectId, attachment.getFileName()); } + @Override public void updateSampleAttachments(String sessionToken, TechId sampleId, Attachment attachment) { logTracking(sessionToken, "update_sample_attachment", "SAMPLE_ID(%s) ATTACHMENT(%s)", sampleId, attachment.getFileName()); } + @Override public void addSampleAttachments(String sessionToken, TechId sampleId, NewAttachment attachment) { logTracking(sessionToken, "add_sample_attachment", "SAMPLE_ID(%s) ATTACHMENT(%s)", sampleId, attachment.getFileName()); } + @Override public List<DatastoreServiceDescription> listDataStoreServices(String sessionToken, DataStoreServiceKind dataStoreServiceKind) { @@ -924,6 +1033,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public TableModel createReportFromDatasets(String sessionToken, DatastoreServiceDescription serviceDescription, List<String> datasetCodes) { @@ -932,6 +1042,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public void processDatasets(String sessionToken, DatastoreServiceDescription serviceDescription, List<String> datasetCodes) { @@ -939,6 +1050,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe serviceDescription, abbreviate(datasetCodes)); } + @Override public void registerAuthorizationGroup(String sessionToken, NewAuthorizationGroup newAuthorizationGroup) { @@ -947,12 +1059,14 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe } + @Override public void registerScript(String sessionToken, Script script) { logTracking(sessionToken, "registerScript", "NAME(%s)", script.getName()); } + @Override public void deleteAuthorizationGroups(String sessionToken, List<TechId> authGroupIds, String reason) { @@ -960,18 +1074,21 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe abbreviate(authGroupIds)); } + @Override public List<AuthorizationGroup> listAuthorizationGroups(String sessionToken) { logAccess(sessionToken, "listAuthorizatonGroups"); return null; } + @Override public Date updateAuthorizationGroup(String sessionToken, AuthorizationGroupUpdates updates) { logTracking(sessionToken, "updateAuthorizationGroup", "TECH_ID(%s)", updates.getId()); return null; } + @Override public List<Person> listPersonInAuthorizationGroup(String sessionToken, TechId authorizatonGroupId) { @@ -979,6 +1096,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public void addPersonsToAuthorizationGroup(String sessionToken, TechId authorizationGroupId, List<String> personsCodes) { @@ -986,6 +1104,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe authorizationGroupId, abbreviate(personsCodes)); } + @Override public void removePersonsFromAuthorizationGroup(String sessionToken, TechId authorizationGroupId, List<String> personsCodes) { @@ -993,22 +1112,26 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe authorizationGroupId, abbreviate(personsCodes)); } + @Override public List<GridCustomFilter> listFilters(String sessionToken, String gridId) { logAccess(sessionToken, "listFilters", "GRID(%s)", gridId); return null; } + @Override public void registerFilter(String sessionToken, NewColumnOrFilter filter) { logTracking(sessionToken, "registerFilter", "FILTER(%s)", filter); } + @Override public void deleteFilters(String sessionToken, List<TechId> filterIds) { logTracking(sessionToken, "deleteFilters", "TECH_IDS(%s)", abbreviate(filterIds)); } + @Override public void updateFilter(String sessionToken, IExpressionUpdates updates) { logTracking(sessionToken, "updateFilters", "ID(%s) NAME(%s)", updates.getId(), @@ -1017,27 +1140,32 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe // -- columns + @Override public void registerGridCustomColumn(String sessionToken, NewColumnOrFilter column) { logTracking(sessionToken, "registerGridCustomColumn", "COLUMN(%s)", column); } + @Override public void deleteGridCustomColumns(String sessionToken, List<TechId> columnIds) { logTracking(sessionToken, "deleteGridCustomColumns", "TECH_IDS(%s)", abbreviate(columnIds)); } + @Override public void updateGridCustomColumn(String sessionToken, IExpressionUpdates updates) { logTracking(sessionToken, "updateGridCustomColumn", "ID(%s) NAME(%s)", updates.getId(), updates.getName()); } + @Override public void keepSessionAlive(String sessionToken) { logAccess(Level.DEBUG, sessionToken, "keepSessionAlive", "TOKEN(%s)", sessionToken); } + @Override public void updateVocabularyTerms(String sessionToken, TechId vocabularyId, List<VocabularyTerm> terms) { @@ -1045,24 +1173,28 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe abbreviate(terms), vocabularyId); } + @Override public void deleteMaterials(String sessionToken, List<TechId> materialIds, String reason) { logTracking(sessionToken, "delete_materials", "IDS(%s) REASON(%s)", abbreviate(materialIds), reason); } + @Override public int lockDatasets(String sessionToken, List<String> datasetCodes) { logTracking(sessionToken, "lockDatasets", "DATASETS(%s)", abbreviate(datasetCodes)); return 0; } + @Override public int unlockDatasets(String sessionToken, List<String> datasetCodes) { logTracking(sessionToken, "unlockDatasets", "DATASETS(%s)", abbreviate(datasetCodes)); return 0; } + @Override public LinkModel retrieveLinkFromDataSet(String sessionToken, DatastoreServiceDescription serviceDescription, String dataSetCode) { @@ -1073,12 +1205,14 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe } } + @Override public Script getScriptInfo(String sessionToken, TechId scriptId) { logAccess(sessionToken, "getScriptInfo", "SCRIPT(%s)", scriptId); return null; } + @Override public String evaluate(String sessionToken, DynamicPropertyEvaluationInfo info) { logAccess(sessionToken, "evaluate", "%s(%s)", info.getEntityKind().name(), @@ -1086,6 +1220,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public IEntityInformationHolderWithPermId getEntityInformationHolder(String sessionToken, BasicEntityDescription info) { @@ -1094,6 +1229,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public void updateManagedPropertyOnExperiment(String sessionToken, TechId experimentId, IManagedProperty managedProperty, IManagedUiAction updateAction) { @@ -1102,6 +1238,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe managedProperty.getPropertyTypeCode(), updateAction.getName()); } + @Override public void updateManagedPropertyOnSample(String sessionToken, TechId sampleId, IManagedProperty managedProperty, IManagedUiAction updateAction) { @@ -1110,6 +1247,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe updateAction.getName()); } + @Override public void updateManagedPropertyOnDataSet(String sessionToken, TechId dataSetId, IManagedProperty managedProperty, IManagedUiAction updateAction) { @@ -1118,6 +1256,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe updateAction.getName()); } + @Override public void updateManagedPropertyOnMaterial(String sessionToken, TechId materialId, IManagedProperty managedProperty, IManagedUiAction updateAction) { @@ -1126,12 +1265,14 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe managedProperty.getPropertyTypeCode(), updateAction.getName()); } + @Override public String getDefaultPutDataStoreBaseURL(String sessionToken) { logAccess(sessionToken, "getDefaultPutDataStoreBaseURL"); return null; } + @Override public void updateDataSetProperties(String sessionToken, TechId entityId, List<PropertyUpdates> modifiedProperties) { @@ -1139,6 +1280,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe entityId, abbreviate(modifiedProperties)); } + @Override public void updateExperimentProperties(String sessionToken, TechId entityId, List<PropertyUpdates> modifiedProperties) { @@ -1146,6 +1288,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe entityId, abbreviate(modifiedProperties)); } + @Override public void updateSampleProperties(String sessionToken, TechId entityId, List<PropertyUpdates> modifiedProperties) { @@ -1153,6 +1296,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe entityId, abbreviate(modifiedProperties)); } + @Override public void updateMaterialProperties(String sessionToken, TechId entityId, List<PropertyUpdates> modifiedProperties) @@ -1161,6 +1305,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe entityId, abbreviate(modifiedProperties)); } + @Override public List<Experiment> listExperiments(String sessionToken, List<ExperimentIdentifier> experimentIdentifiers) { @@ -1169,17 +1314,20 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public List<Deletion> listDeletions(String sessionToken, boolean withDeletedEntities) { logAccess(sessionToken, "listDeletions", "WITH_ENTITIES(%s)", withDeletedEntities); return null; } + @Override public void revertDeletions(String sessionToken, List<TechId> deletionIds) { logTracking(sessionToken, "revertDeletions", "ID(%s)", abbreviate(deletionIds)); } + @Override public void deletePermanently(String sessionToken, List<TechId> deletionIds, boolean forceNotExistingLocations) { @@ -1187,6 +1335,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe abbreviate(deletionIds), forceNotExistingLocations); } + @Override public void deletePermanentlyForced(String sessionToken, List<TechId> deletionIds, boolean forceNotExistingLocations) { @@ -1195,12 +1344,14 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe forceNotExistingLocations); } + @Override public List<EntityTypePropertyType<?>> listEntityTypePropertyTypes(String sessionToken) { logTracking(sessionToken, "listEntityTypePropertyTypes", ""); return null; } + @Override public void registerPlugin(String sessionToken, CorePlugin plugin, ICorePluginResourceLoader resourceLoader) { @@ -1208,18 +1359,21 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe resourceLoader); } + @Override public List<DataStore> listDataStores() { logTracking("internal_call", "listDataStores", ""); return null; } + @Override public List<Material> searchForMaterials(String sessionToken, DetailedSearchCriteria criteria) { logAccess(sessionToken, "search_for_materials", "criteria(%s)", criteria); return null; } + @Override public TableModel createReportFromAggregationService(String sessionToken, DatastoreServiceDescription serviceDescription, Map<String, Object> parameters) { @@ -1228,6 +1382,7 @@ final class CommonServerLogger extends AbstractServerLogger implements ICommonSe return null; } + @Override public String performCustomImport(String sessionToken, String customImportCode, CustomImportFile customImportFile) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/DatabaseLastModificationAdvisor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/DatabaseLastModificationAdvisor.java index 7325ec4c515..9d4b5ed930f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/DatabaseLastModificationAdvisor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/DatabaseLastModificationAdvisor.java @@ -95,6 +95,7 @@ public final class DatabaseLastModificationAdvisor extends DefaultPointcutAdviso this.state = state; } + @Override public final Object invoke(final MethodInvocation methodInvocation) throws Throwable { long currentTimestamp = new Date().getTime(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLService.java index 67b12e378bd..1713b8e9667 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLService.java @@ -216,6 +216,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements IETLLIMSService.class, PROGRESS_TIMEOUT, sessionFactory)); } + @Override public IETLLIMSService createLogger(IInvocationLoggerContext context) { return new ETLServiceLogger(getSessionManager(), context); @@ -227,6 +228,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return IServer.VERSION; } + @Override public ServiceConversationDTO startConversation(String sessionToken, String clientUrl, String typeId) { @@ -239,11 +241,13 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return server.startConversation(typeId, clientId); } + @Override public void send(ServiceMessage message) { server.getIncomingMessageTransport().send(message); } + @Override public DatabaseInstance getHomeDatabaseInstance(String sessionToken) { return DatabaseInstanceTranslator.translate(getHomeDatabaseInstance()); @@ -254,6 +258,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return daoFactory.getHomeDatabaseInstance(); } + @Override public void registerDataStoreServer(String sessionToken, DataStoreServerInfo info) { Session session = getSession(sessionToken); @@ -394,23 +399,27 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements serviceDescription.toString(), missingCodesText)); } + @Override public String createDataSetCode(String sessionToken) throws UserFailureException { return createPermId(sessionToken); } + @Override public String createPermId(String sessionToken) throws UserFailureException { checkSession(sessionToken); // throws exception if invalid sessionToken return daoFactory.getPermIdDAO().createPermId(); } + @Override public long drawANewUniqueID(String sessionToken) throws UserFailureException { checkSession(sessionToken); return daoFactory.getCodeSequenceDAO().getNextCodeSequenceId(); } + @Override public List<Experiment> listExperiments(String sessionToken, List<ExperimentIdentifier> experimentIdentifiers, ExperimentFetchOptions experimentFetchOptions) throws UserFailureException @@ -451,6 +460,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements } } + @Override public List<Experiment> listExperimentsForProjects(String sessionToken, List<ProjectIdentifier> projectIdentifiers, ExperimentFetchOptions experimentFetchOptions) @@ -498,6 +508,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements } } + @Override public Experiment tryToGetExperiment(String sessionToken, ExperimentIdentifier experimentIdentifier) throws UserFailureException { @@ -515,6 +526,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements LoadableFields.PROPERTIES); } + @Override public List<Sample> listSamples(String sessionToken, ListSampleCriteria criteria) { final Session session = getSession(sessionToken); @@ -522,6 +534,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return sampleLister.list(new ListOrSearchSampleCriteria(criteria)); } + @Override public Sample tryGetSampleWithExperiment(String sessionToken, SampleIdentifier sampleIdentifier) throws UserFailureException { @@ -538,6 +551,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return SampleTranslator.translate(sample, session.getBaseIndexURL(), true, true); } + @Override public SampleIdentifier tryToGetSampleIdentifier(String sessionToken, String samplePermID) throws UserFailureException { @@ -586,6 +600,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements HibernateUtils.initialize(experiment.getProperties()); } + @Override public ExperimentType getExperimentType(String sessionToken, String experimentTypeCode) throws UserFailureException { @@ -604,6 +619,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return ExperimentTypeTranslator.translate(experimentType, null); } + @Override public SampleType getSampleType(String sessionToken, String sampleTypeCode) throws UserFailureException { @@ -620,6 +636,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return SampleTypeTranslator.translate(sampleType, null); } + @Override public DataSetTypeWithVocabularyTerms getDataSetType(String sessionToken, String dataSetTypeCode) throws UserFailureException { @@ -654,6 +671,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return result; } + @Override public List<ExternalData> listDataSetsByExperimentID(String sessionToken, TechId experimentID) throws UserFailureException { @@ -664,6 +682,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return datasets; } + @Override public List<ExternalData> listDataSetsBySampleID(final String sessionToken, final TechId sampleId, final boolean showOnlyDirectlyConnected) { @@ -675,6 +694,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return datasets; } + @Override public List<ExternalData> listDataSetsByCode(String sessionToken, List<String> dataSetCodes) { final Session session = getSession(sessionToken); @@ -682,6 +702,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return datasetLister.listByDatasetCode(dataSetCodes); } + @Override public List<Project> listProjects(String sessionToken) { checkSession(sessionToken); @@ -690,6 +711,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return ProjectTranslator.translate(projects); } + @Override public List<Experiment> listExperiments(String sessionToken, ProjectIdentifier projectIdentifier) { final Session session = getSession(sessionToken); @@ -701,6 +723,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return ExperimentTranslator.translate(experiments, session.getBaseIndexURL()); } + @Override public IEntityProperty[] tryToGetPropertiesOfTopSampleRegisteredFor(String sessionToken, SampleIdentifier sampleIdentifier) throws UserFailureException { @@ -726,6 +749,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements new HashMap<PropertyTypePE, PropertyType>()); } + @Override public void registerEntities(String sessionToken, EntityCollectionForCreationOrUpdate collection) throws UserFailureException { @@ -748,6 +772,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements } } + @Override public long registerExperiment(String sessionToken, NewExperiment experiment) throws UserFailureException { @@ -761,6 +786,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return experimentBO.getExperiment().getId(); } + @Override public void registerSamples(String sessionToken, final List<NewSamplesWithTypes> newSamplesWithType, String userIDOrNull) throws UserFailureException @@ -775,6 +801,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements } } + @Override public long registerSample(String sessionToken, NewSample newSample, String userIDOrNull) throws UserFailureException { @@ -797,12 +824,14 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return persons.get(0); } + @Override public void updateSample(String sessionToken, SampleUpdatesDTO updates) { final Session session = getSession(sessionToken); updateSampleInternal(updates, session); } + @Override public void registerDataSet(String sessionToken, SampleIdentifier sampleIdentifier, NewExternalData externalData) throws UserFailureException { @@ -813,6 +842,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements registerDataSetInternal(session, sampleIdentifier, externalData); } + @Override public void registerDataSet(String sessionToken, ExperimentIdentifier experimentIdentifier, NewExternalData externalData) throws UserFailureException { @@ -823,6 +853,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements registerDataSetInternal(session, experimentIdentifier, externalData); } + @Override public void addPropertiesToDataSet(String sessionToken, List<NewProperty> properties, String dataSetCode, SpaceIdentifier space) throws UserFailureException { @@ -832,6 +863,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements dataBO.addPropertiesToDataSet(dataSetCode, properties); } + @Override public void updateShareIdAndSize(String sessionToken, String dataSetCode, String shareId, long size) { @@ -857,6 +889,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements dataSetDAO.updateDataSet(dataSet, session.tryGetPerson()); } + @Override public void updateDataSetStatuses(String sessionToken, List<String> dataSetCodes, DataSetArchivingStatus newStatus, boolean presentInArchive) throws UserFailureException { @@ -866,6 +899,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements dataBO.updateStatuses(dataSetCodes, newStatus, presentInArchive); } + @Override public boolean compareAndSetDataSetStatus(String sessionToken, String dataSetCode, DataSetArchivingStatus oldStatus, DataSetArchivingStatus newStatus, boolean newPresentInArchive) throws UserFailureException @@ -877,6 +911,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return dataBO.compareAndSetDataSetStatus(oldStatus, newStatus, newPresentInArchive); } + @Override public ExternalData tryGetDataSet(String sessionToken, String dataSetCode) throws UserFailureException { @@ -897,18 +932,21 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return DataSetTranslator.translate(dataPE, session.getBaseIndexURL()); } + @Override public void checkInstanceAdminAuthorization(String sessionToken) throws UserFailureException { checkSession(sessionToken); // do nothing, the access rights specified in method annotations are checked by a proxy } + @Override public void checkSpacePowerUserAuthorization(String sessionToken) throws UserFailureException { checkSession(sessionToken); // do nothing, the access rights specified in method annotations are checked by a proxy } + @Override public void checkDataSetAccess(String sessionToken, String dataSetCode) throws UserFailureException { @@ -916,12 +954,14 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements // do nothing, the access rights specified in method annotations are checked by a proxy } + @Override public void checkDataSetCollectionAccess(String sessionToken, List<String> dataSetCodes) { checkSession(sessionToken); // do nothing, the access rights specified in method annotations are checked by a proxy } + @Override public void checkSpaceAccess(String sessionToken, SpaceIdentifier spaceId) throws UserFailureException { @@ -929,6 +969,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements // do nothing, the access rights specified in method annotations are checked by a proxy } + @Override public List<Sample> listSamplesByCriteria(String sessionToken, ListSamplesByPropertyCriteria criteria) throws UserFailureException { @@ -941,6 +982,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return SampleTranslator.translate(sampleTable.getSamples(), ""); } + @Override public List<DataSetShareId> listShareIds(String sessionToken, String dataStoreCode) throws UserFailureException { @@ -950,6 +992,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return datasetLister.listAllDataSetShareIdsByDataStore(dataStore.getId()); } + @Override public List<SimpleDataSetInformationDTO> listDataSets(String sessionToken, String dataStoreCode) throws UserFailureException { @@ -957,6 +1000,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return SimpleDataSetHelper.translate(dataSets); } + @Override public List<ExternalData> listAvailableDataSets(String sessionToken, String dataStoreCode, ArchiverDataSetCriteria criteria) { @@ -965,6 +1009,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return datasetLister.listByArchiverCriteria(dataStoreCode, criteria); } + @Override public List<ExternalData> listDataSets(String sessionToken, String dataStoreCode, TrackingDataSetCriteria criteria) { @@ -1008,6 +1053,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return dataStore; } + @Override public List<DeletedDataSet> listDeletedDataSets(String sessionToken, Long lastSeenDeletionEventIdOrNull, Date maxDeletionDataOrNull) { @@ -1016,12 +1062,14 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements maxDeletionDataOrNull); } + @Override public ExternalData tryGetDataSetForServer(String sessionToken, String dataSetCode) throws UserFailureException { return tryGetDataSet(sessionToken, dataSetCode); } + @Override public Collection<VocabularyTerm> listVocabularyTerms(String sessionToken, String vocabularyCode) throws UserFailureException { @@ -1036,6 +1084,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return VocabularyTermTranslator.translateTerms(vocabularyOrNull.getTerms()); } + @Override public List<String> generateCodes(String sessionToken, String prefix, int number) { checkSession(sessionToken); @@ -1047,6 +1096,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return result; } + @Override public List<Person> listAdministrators(String sessionToken) { checkSession(sessionToken); @@ -1070,6 +1120,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return PersonTranslator.translate(admins); } + @Override public Person tryPersonWithUserIdOrEmail(String sessionToken, String useridOrEmail) { checkSession(sessionToken); @@ -1096,6 +1147,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return personDao.tryFindPersonByEmail(userIdOrEmail); } + @Override public Sample registerSampleAndDataSet(String sessionToken, NewSample newSample, NewExternalData externalData, String userIdOrNull) throws UserFailureException { @@ -1114,6 +1166,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return result; } + @Override public Sample updateSampleAndRegisterDataSet(String sessionToken, SampleUpdatesDTO updates, NewExternalData externalData) { @@ -1198,6 +1251,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return samplePE; } + @Override public Space tryGetSpace(String sessionToken, SpaceIdentifier spaceIdentifier) { @@ -1217,6 +1271,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements } } + @Override public Project tryGetProject(String sessionToken, ProjectIdentifier projectIdentifier) { final Session session = getSession(sessionToken); @@ -1233,6 +1288,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements } } + @Override public Material tryGetMaterial(String sessionToken, MaterialIdentifier materialIdentifier) { final Session session = getSession(sessionToken); @@ -1248,12 +1304,14 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements } } + @Override public AtomicEntityOperationResult performEntityOperations(String sessionToken, AtomicEntityOperationDetails operationDetails) { return this.performEntityOperations(sessionToken, operationDetails, new IProgressListener() { + @Override public void update(String label, int totalItemsToProcess, int numItemsProcessed) { } @@ -1299,6 +1357,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements samplesUpdated, samplesCreated, materialsCreated, dataSetsCreated, dataSetsUpdated); } + @Override public Boolean didEntityOperationsSucceed(String token, TechId registrationId) { if (registrationId == null) @@ -1596,6 +1655,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return externalDataBO; } + @Override public List<Sample> searchForSamples(String sessionToken, SearchCriteria searchCriteria) { Session session = getSession(sessionToken); @@ -1607,6 +1667,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return searchHelper.searchForSamples(detailedSearchCriteria); } + @Override public List<ExternalData> searchForDataSets(String sessionToken, SearchCriteria searchCriteria) { Session session = getSession(sessionToken); @@ -1618,6 +1679,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements return searchHelper.searchForDataSets(detailedSearchCriteria); } + @Override public List<Material> listMaterials(String sessionToken, ListMaterialCriteria criteria, boolean withProperties) { @@ -1653,6 +1715,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements } + @Override @SuppressWarnings("deprecation") public void removeDataSetsPermanently(String sessionToken, List<String> dataSetCodes, String reason) @@ -1662,6 +1725,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements permanentlyDeleteDataSets(session, dataSetTable, dataSetCodes, reason, true, false); } + @Override public void updateDataSet(String sessionToken, DataSetUpdatesDTO dataSetUpdates) { final Session session = getSession(sessionToken); @@ -1669,11 +1733,13 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements dataSetBO.update(dataSetUpdates); } + @Override public List<String> getTrustedCrossOriginDomains(String sessionToken) { return trustedOriginDomainProvider.getTrustedDomains(); } + @Override public void setStorageConfirmed(String sessionToken, String dataSetCode) { assert sessionToken != null : "Unspecified session token."; @@ -1687,6 +1753,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements daoFactory.getPostRegistrationDAO().addDataSet(dataBO.getData()); } + @Override public void markSuccessfulPostRegistration(String sessionToken, String dataSetCode) { assert sessionToken != null : "Unspecified session token."; @@ -1703,6 +1770,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements } } + @Override public List<ExternalData> listDataSetsForPostRegistration(String sessionToken, String dataStoreCode) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceLogger.java index e0c3493135f..9fcbbeec043 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceLogger.java @@ -88,6 +88,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe super(sessionManager, context); } + @Override public ServiceConversationDTO startConversation(String sessionToken, String clientUrl, String typeId) { @@ -95,34 +96,40 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public void send(ServiceMessage message) { logTracking(message.toString(), "send", ""); } + @Override public String createDataSetCode(String sessionToken) throws UserFailureException { logTracking(sessionToken, "createDataSetCode", ""); return null; } + @Override public String createPermId(String sessionToken) throws UserFailureException { logTracking(sessionToken, "createPermId", ""); return null; } + @Override public long drawANewUniqueID(String sessionToken) throws UserFailureException { logTracking(sessionToken, "drawANewUniqueID", ""); return 0; } + @Override public DatabaseInstance getHomeDatabaseInstance(String sessionToken) { return null; } + @Override public void registerDataStoreServer(String sessionToken, DataStoreServerInfo info) { String code = info.getDataStoreCode(); @@ -139,6 +146,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe services.getProcessingServiceDescriptions()); } + @Override public long registerSample(String sessionToken, NewSample newSample, String userIDOrNull) throws UserFailureException { @@ -147,11 +155,13 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return 0; } + @Override public void updateSample(String sessionToken, SampleUpdatesDTO updates) { logTracking(sessionToken, "updateSample", "SAMPLE(%S)", updates.getSampleIdentifier()); } + @Override public void registerEntities(String sessionToken, EntityCollectionForCreationOrUpdate collection) throws UserFailureException { @@ -161,6 +171,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe newExperiments.size(), newDataSets.size()); } + @Override public long registerExperiment(String sessionToken, NewExperiment experiment) throws UserFailureException { @@ -169,6 +180,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return 0; } + @Override public void registerDataSet(String sessionToken, SampleIdentifier sampleIdentifier, NewExternalData externalData) throws UserFailureException { @@ -176,6 +188,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe externalData); } + @Override public void registerDataSet(String sessionToken, ExperimentIdentifier experimentIdentifier, NewExternalData externalData) throws UserFailureException { @@ -189,6 +202,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe logTracking(sessionToken, "deleteDataSet", "DATA_SET(%s) REASON(%s)", dataSetCode, reason); } + @Override public Experiment tryToGetExperiment(String sessionToken, ExperimentIdentifier experimentIdentifier) throws UserFailureException { @@ -196,12 +210,14 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public List<Sample> listSamples(String sessionToken, ListSampleCriteria criteria) { logAccess(sessionToken, "listSamples", "CRITERIA(%s)", criteria); return null; } + @Override public Sample tryGetSampleWithExperiment(String sessionToken, SampleIdentifier sampleIdentifier) throws UserFailureException { @@ -209,6 +225,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public SampleIdentifier tryToGetSampleIdentifier(String sessionToken, String samplePermID) throws UserFailureException { @@ -216,6 +233,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public ExperimentType getExperimentType(String sessionToken, String experimentTypeCode) throws UserFailureException { @@ -223,6 +241,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public SampleType getSampleType(String sessionToken, String sampleTypeCode) throws UserFailureException { @@ -230,12 +249,14 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public DataSetTypeWithVocabularyTerms getDataSetType(String sessionToken, String dataSetTypeCode) { logAccess(sessionToken, "getDataSetType", "DATA_SET_TYPE(%s)", dataSetTypeCode); return null; } + @Override public List<ExternalData> listDataSetsByExperimentID(String sessionToken, TechId experimentID) throws UserFailureException { @@ -243,6 +264,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public List<ExternalData> listDataSetsBySampleID(final String sessionToken, final TechId sampleId, final boolean showOnlyDirectlyConnected) { @@ -250,6 +272,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public List<ExternalData> listDataSetsByCode(String sessionToken, List<String> dataSetCodes) throws UserFailureException { @@ -257,6 +280,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public IEntityProperty[] tryToGetPropertiesOfTopSampleRegisteredFor(String sessionToken, SampleIdentifier sampleIdentifier) throws UserFailureException { @@ -265,34 +289,40 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public void checkInstanceAdminAuthorization(String sessionToken) throws UserFailureException { logAccess(sessionToken, "checkInstanceAdminAuthorization"); } + @Override public void checkSpacePowerUserAuthorization(String sessionToken) throws UserFailureException { logAccess(sessionToken, "checkSpacePowerUserAuthorization"); } + @Override public void checkDataSetAccess(String sessionToken, String dataSetCode) throws UserFailureException { logAccess(sessionToken, "checkDataSetAccess", "DATA_SET(%s)", dataSetCode); } + @Override public void checkDataSetCollectionAccess(String sessionToken, List<String> dataSetCodes) { logTracking(sessionToken, "checkDataSetCollectionAccess", "DATA_SET_CODES(%s)", dataSetCodes); } + @Override public void checkSpaceAccess(String sessionToken, SpaceIdentifier spaceId) throws UserFailureException { logAccess(sessionToken, "checkSpaceAccess", "SPACE(%s)", spaceId); } + @Override public ExternalData tryGetDataSet(String sessionToken, String dataSetCode) throws UserFailureException { @@ -300,6 +330,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public List<Sample> listSamplesByCriteria(String sessionToken, ListSamplesByPropertyCriteria criteria) throws UserFailureException { @@ -307,6 +338,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public List<DataSetShareId> listShareIds(String sessionToken, String dataStore) throws UserFailureException { @@ -314,6 +346,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public List<SimpleDataSetInformationDTO> listDataSets(String sessionToken, String dataStore) throws UserFailureException { @@ -321,6 +354,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public List<ExternalData> listAvailableDataSets(String sessionToken, String dataStoreCode, ArchiverDataSetCriteria criteria) { @@ -329,6 +363,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public List<ExternalData> listDataSets(String sessionToken, String dataStoreCode, TrackingDataSetCriteria criteria) { @@ -346,6 +381,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public List<DeletedDataSet> listDeletedDataSets(String sessionToken, Long lastSeenDeletionEventIdOrNull, Date maxDeletionDateOrNull) { @@ -356,6 +392,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public void addPropertiesToDataSet(String sessionToken, List<NewProperty> properties, String dataSetCode, SpaceIdentifier space) throws UserFailureException { @@ -363,6 +400,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe properties.size()); } + @Override public void updateShareIdAndSize(String sessionToken, String dataSetCode, String shareId, long size) throws UserFailureException { @@ -370,6 +408,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe "DATA_SET_CODE(%s) SHARE_ID(%s) SIZE(%s)", dataSetCode, shareId, size); } + @Override public void updateDataSetStatuses(String sessionToken, List<String> dataSetCodes, DataSetArchivingStatus newStatus, boolean presentInArchive) throws UserFailureException { @@ -378,6 +417,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe newStatus, presentInArchive); } + @Override public boolean compareAndSetDataSetStatus(String token, String dataSetCode, DataSetArchivingStatus oldStatus, DataSetArchivingStatus newStatus, boolean newPresentInArchive) throws UserFailureException @@ -394,6 +434,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public ExternalData tryGetDataSetForServer(String sessionToken, String dataSetCode) throws UserFailureException { @@ -402,6 +443,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public Collection<VocabularyTerm> listVocabularyTerms(String sessionToken, String vocabulary) throws UserFailureException { @@ -409,6 +451,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public void registerSamples(String sessionToken, List<NewSamplesWithTypes> newSamplesWithType, String userIdOrNull) throws UserFailureException { @@ -433,24 +476,28 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return sb.toString(); } + @Override public List<String> generateCodes(String sessionToken, String prefix, int number) { logAccess(sessionToken, "generateCodes", "PREFIX(%s) NUMBER(%s)", prefix, number); return null; } + @Override public List<Person> listAdministrators(String sessionToken) { logAccess(sessionToken, "listAdministrators"); return null; } + @Override public Person tryPersonWithUserIdOrEmail(String sessionToken, String useridOrEmail) { logAccess(sessionToken, "tryPersonWithUserIdOrEmail", "USERID_OR_EMAIL(%s)", useridOrEmail); return null; } + @Override public Sample registerSampleAndDataSet(String sessionToken, NewSample newSample, NewExternalData externalData, String userIdOrNull) throws UserFailureException { @@ -460,6 +507,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public Sample updateSampleAndRegisterDataSet(String sessionToken, SampleUpdatesDTO updates, NewExternalData externalData) { @@ -468,6 +516,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public AtomicEntityOperationResult performEntityOperations(String sessionToken, AtomicEntityOperationDetails operationDetails) { @@ -475,24 +524,28 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public Space tryGetSpace(String sessionToken, SpaceIdentifier spaceIdentifier) { logAccess(sessionToken, "tryGetSpace", "%s", spaceIdentifier); return null; } + @Override public Project tryGetProject(String sessionToken, ProjectIdentifier projectIdentifier) { logAccess(sessionToken, "tryGetProject", "%s", projectIdentifier); return null; } + @Override public List<Experiment> listExperiments(String sessionToken, ProjectIdentifier projectIdentifier) { logAccess(sessionToken, "listExperiments", "%s", projectIdentifier); return null; } + @Override public List<Experiment> listExperiments(String sessionToken, List<ExperimentIdentifier> experimentIdentifiers, ExperimentFetchOptions experimentFetchOptions) @@ -503,6 +556,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public List<Experiment> listExperimentsForProjects(String sessionToken, List<ProjectIdentifier> projectIdentifiers, ExperimentFetchOptions experimentFetchOptions) @@ -513,30 +567,35 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public List<Project> listProjects(String sessionToken) { logAccess(sessionToken, "listProjects"); return null; } + @Override public List<Sample> searchForSamples(String sessionToken, SearchCriteria searchCriteria) { logAccess(sessionToken, "searchForSamples", "%s", searchCriteria); return null; } + @Override public List<ExternalData> searchForDataSets(String sessionToken, SearchCriteria searchCriteria) { logAccess(sessionToken, "searchForDataSets", "%s", searchCriteria); return null; } + @Override public Material tryGetMaterial(String sessionToken, MaterialIdentifier materialIdentifier) { logAccess(sessionToken, "tryGetMaterial", "%s", materialIdentifier); return null; } + @Override public List<Material> listMaterials(String sessionToken, ListMaterialCriteria criteria, boolean withProperties) { @@ -545,6 +604,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public void removeDataSetsPermanently(String sessionToken, List<String> dataSetCodes, String reason) { @@ -552,27 +612,32 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe CollectionUtils.abbreviate(dataSetCodes, 5), reason); } + @Override public void updateDataSet(String sessionToken, DataSetUpdatesDTO dataSetUpdates) { logAccess(sessionToken, "updateDataSet", "DATA_SET_UPDATES(%s)", dataSetUpdates); } + @Override public List<String> getTrustedCrossOriginDomains(String sessionToken) { logAccess(sessionToken, "getTrustedCrossOriginDomains"); return null; } + @Override public void setStorageConfirmed(String sessionToken, String dataSetCode) { logAccess(sessionToken, "setStorageConfirmed", "DATA_SET_CODE(%s)", dataSetCode); } + @Override public void markSuccessfulPostRegistration(String sessionToken, String dataSetCode) { logAccess(sessionToken, "markSuccessfulPostRegistration", "DATA_SET_CODE(%s)", dataSetCode); } + @Override public List<ExternalData> listDataSetsForPostRegistration(String sessionToken, String dataStoreCode) { @@ -581,6 +646,7 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe return null; } + @Override public Boolean didEntityOperationsSucceed(String token, TechId registrationId) { logAccess(Level.DEBUG, token, "didEntityOperationsSucceed", "REGISTRATION_ID(%s)", diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/GenericHttpSessionListener.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/GenericHttpSessionListener.java index 823cef47eb8..73f686a9c09 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/GenericHttpSessionListener.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/GenericHttpSessionListener.java @@ -56,11 +56,13 @@ public final class GenericHttpSessionListener implements HttpSessionListener private static final long serialVersionUID = 1L; + @Override public void sessionWillPassivate(HttpSessionEvent arg0) { logSessionEvent("sessionWillPassivate", arg0); } + @Override public void sessionDidActivate(HttpSessionEvent arg0) { logSessionEvent("sessionDidActivate", arg0); @@ -71,12 +73,14 @@ public final class GenericHttpSessionListener implements HttpSessionListener // HttpSessionListener // + @Override public final void sessionCreated(final HttpSessionEvent sessionEvent) { logSessionEvent("sessionCreated", sessionEvent); sessionEvent.getSession().setAttribute(LOGGING_ACTIVATION_PARAM, loggingActivationListener); } + @Override public final void sessionDestroyed(final HttpSessionEvent sessionEvent) { final HttpSession httpSession = sessionEvent.getSession(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/MaintenanceTaskStarter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/MaintenanceTaskStarter.java index ee1aee76025..1ab3f90f337 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/MaintenanceTaskStarter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/MaintenanceTaskStarter.java @@ -37,11 +37,13 @@ public class MaintenanceTaskStarter implements ApplicationContextAware, Initiali @Resource(name = ExposablePropertyPlaceholderConfigurer.PROPERTY_CONFIGURER_BEAN_NAME) private ExposablePropertyPlaceholderConfigurer configurer; + @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { CommonServiceProvider.setApplicationContext(applicationContext); } + @Override public void afterPropertiesSet() throws Exception { MaintenanceTaskParameters[] tasks = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/MaterialHelper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/MaterialHelper.java index 298efbddff0..35f7d3950a2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/MaterialHelper.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/MaterialHelper.java @@ -109,6 +109,7 @@ public class MaterialHelper IBatchOperation<NewMaterial> strategy = new IBatchOperation<NewMaterial>() { + @Override public void execute(List<NewMaterial> entities) { final IMaterialTable materialTable = @@ -118,16 +119,19 @@ public class MaterialHelper registeredMaterials.addAll(materialTable.getMaterials()); } + @Override public List<NewMaterial> getAllEntities() { return newMaterials; } + @Override public String getEntityName() { return "material"; } + @Override public String getOperationName() { return "register"; @@ -160,6 +164,7 @@ public class MaterialHelper session.tryGetPerson()); IBatchOperation<NewMaterial> strategy = new IBatchOperation<NewMaterial>() { + @Override public void execute(List<NewMaterial> entities) { List<MaterialUpdateDTO> materialUpdates = new ArrayList<MaterialUpdateDTO>(); @@ -183,16 +188,19 @@ public class MaterialHelper updateMaterials(materialUpdates); } + @Override public List<NewMaterial> getAllEntities() { return newMaterials; } + @Override public String getEntityName() { return "material"; } + @Override public String getOperationName() { return "update"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServerExceptionTranslatingAdvisor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServerExceptionTranslatingAdvisor.java index 3919f785e8d..2a9a6d43841 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServerExceptionTranslatingAdvisor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServerExceptionTranslatingAdvisor.java @@ -56,11 +56,13 @@ public class ServerExceptionTranslatingAdvisor extends DefaultPointcutAdvisor private static class AllServerMethodsPointcut implements Pointcut { + @Override public MethodMatcher getMethodMatcher() { return MethodMatcher.TRUE; } + @Override public ClassFilter getClassFilter() { return new RootClassFilter(IServer.class); @@ -69,6 +71,7 @@ public class ServerExceptionTranslatingAdvisor extends DefaultPointcutAdvisor private static class UserFailureExceptionTranslatingInterceptor implements MethodInterceptor { + @Override public Object invoke(MethodInvocation invocation) throws Throwable { try diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/SessionFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/SessionFactory.java index 9626234fafe..b910428f793 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/SessionFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/SessionFactory.java @@ -32,6 +32,7 @@ public final class SessionFactory implements ISessionFactory<Session> // ISessionFactory // + @Override public final Session create(final String sessionToken, final String userName, final Principal principal, final String remoteHost, final long sessionStart, final int expirationTime) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/TrackingServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/TrackingServer.java index e328de81b89..e53dbf6049b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/TrackingServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/TrackingServer.java @@ -70,6 +70,7 @@ public final class TrackingServer extends AbstractServer<ITrackingServer> implem /** * Creates a logger used to log invocations of objects of this class. */ + @Override public final ITrackingServer createLogger(IInvocationLoggerContext context) { return new TrackingServerLogger(getSessionManager(), context); @@ -79,6 +80,7 @@ public final class TrackingServer extends AbstractServer<ITrackingServer> implem // ITrackingServer // + @Override public List<Sample> listSamples(String sessionToken, TrackingSampleCriteria criteria) { final Session session = getSession(sessionToken); @@ -100,6 +102,7 @@ public final class TrackingServer extends AbstractServer<ITrackingServer> implem } } + @Override public List<ExternalData> listDataSets(String sessionToken, TrackingDataSetCriteria criteria) { final Session session = getSession(sessionToken); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/TrackingServerLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/TrackingServerLogger.java index 640b70c7ee6..a8bc90ddd22 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/TrackingServerLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/TrackingServerLogger.java @@ -50,6 +50,7 @@ final class TrackingServerLogger extends AbstractServerLogger implements ITracki // ITrackingServer // + @Override public List<ExternalData> listDataSets(String sessionToken, TrackingDataSetCriteria criteria) { logTracking(sessionToken, "list_data_sets", "SAMPLE_TYPE(%s) LAST_DATASET_ID(%s)", criteria @@ -57,6 +58,7 @@ final class TrackingServerLogger extends AbstractServerLogger implements ITracki return null; } + @Override public List<Sample> listSamples(String sessionToken, TrackingSampleCriteria criteria) { logTracking(sessionToken, "list_samples", diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/WhiteListBasedRemoteHostValidator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/WhiteListBasedRemoteHostValidator.java index 52c402d098b..5944f9a6ba7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/WhiteListBasedRemoteHostValidator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/WhiteListBasedRemoteHostValidator.java @@ -54,6 +54,7 @@ public class WhiteListBasedRemoteHostValidator implements IRemoteHostValidator allowedRemoteHosts.add(remoteHost); } + @Override public boolean isValidRemoteHost(String remoteHost) { return allowedRemoteHosts.contains(remoteHost); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingService.java index 9aa2e136947..40a5cabdcc3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingService.java @@ -63,11 +63,13 @@ public class GeneralInformationChangingService extends this.server = server; } + @Override public IGeneralInformationChangingService createLogger(IInvocationLoggerContext context) { return new GeneralInformationChangingServiceLogger(sessionManager, context); } + @Override @Transactional @RolesAllowed(RoleWithHierarchy.SPACE_USER) public void updateSampleProperties(String sessionToken, long sampleID, @@ -78,6 +80,7 @@ public class GeneralInformationChangingService extends EntityHelper.updateSampleProperties(server, sessionToken, new TechId(sampleID), properties); } + @Override @Transactional @RolesAllowed(RoleWithHierarchy.SPACE_POWER_USER) @DatabaseCreateOrDeleteModification(value = ObjectKind.VOCABULARY_TERM) @@ -88,6 +91,7 @@ public class GeneralInformationChangingService extends previousTermOrdinal); } + @Override @Transactional @RolesAllowed(RoleWithHierarchy.SPACE_POWER_USER) @DatabaseCreateOrDeleteModification(value = ObjectKind.VOCABULARY_TERM) @@ -99,11 +103,13 @@ public class GeneralInformationChangingService extends term.getLabel(), term.getDescription(), term.getPreviousTermOrdinal()); } + @Override public int getMajorVersion() { return 1; } + @Override public int getMinorVersion() { return 1; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingServiceLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingServiceLogger.java index e540715ad60..946c53ac234 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingServiceLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingServiceLogger.java @@ -39,12 +39,14 @@ class GeneralInformationChangingServiceLogger extends AbstractServerLogger imple super(sessionManagerNull, context); } + @Override public void updateSampleProperties(String sessionToken, long sampleID, Map<String, String> properties) { logTracking(sessionToken, "update-sample-properties", "SAMPLE(%s)", sampleID); } + @Override public void addUnofficialVocabularyTerm(String sessionToken, TechId vocabularyId, String code, String label, String description, Long previousTermOrdinal) { @@ -53,6 +55,7 @@ class GeneralInformationChangingServiceLogger extends AbstractServerLogger imple code, label, description, Long.toString(previousTermOrdinal)); } + @Override public void addUnofficialVocabularyTerm(String sessionToken, Long vocabularyId, NewVocabularyTerm term) { @@ -61,11 +64,13 @@ class GeneralInformationChangingServiceLogger extends AbstractServerLogger imple } + @Override public int getMajorVersion() { return 0; } + @Override public int getMinorVersion() { return 0; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationService.java index c223429ddc9..fefd01ef67a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationService.java @@ -133,11 +133,13 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio this.commonServer = commonServer; } + @Override public IGeneralInformationService createLogger(IInvocationLoggerContext context) { return new GeneralInformationServiceLogger(sessionManager, context); } + @Override @Transactional // this is not a readOnly transaction - it can create new users public String tryToAuthenticateForAllServices(String userID, String userPassword) @@ -146,12 +148,14 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return session == null ? null : session.getSessionToken(); } + @Override @Transactional(readOnly = true) public boolean isSessionActive(String sessionToken) { return tryGetSession(sessionToken) != null; } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.INSTANCE_OBSERVER) public Map<String, Set<Role>> listNamedRoleSets(String sessionToken) @@ -173,6 +177,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return namedRoleSets; } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = SimpleSpaceValidator.class) @@ -203,11 +208,13 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return result; } + @Override public int getMajorVersion() { return 1; } + @Override public int getMinorVersion() { return 17; @@ -279,6 +286,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio } } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = SampleByIdentiferValidator.class) @@ -289,6 +297,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio EnumSet.of(SampleFetchOption.PROPERTIES)); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = SampleByIdentiferValidator.class) @@ -316,6 +325,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return new SampleLister(getDAOFactory()); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = SampleByIdentiferValidator.class) @@ -338,6 +348,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return Translator.translateSamples(privateSamples); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = DataSetByExperimentIdentifierValidator.class) @@ -349,6 +360,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return listDataSets(sessionToken, samples, EnumSet.noneOf(Connections.class)); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = ExperimentByIdentiferValidator.class) @@ -360,6 +372,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return listExperiments(sessionToken, projects, experimentTypeString, false, false); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = ExperimentByIdentiferValidator.class) @@ -371,6 +384,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return listExperiments(sessionToken, projects, experimentTypeString, false, true); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = ExperimentByIdentiferValidator.class) @@ -449,6 +463,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return null; } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = DataSetByExperimentIdentifierValidator.class) @@ -464,6 +479,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return Translator.translate(externalData, EnumSet.noneOf(Connections.class)); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) public String getDefaultPutDataStoreBaseURL(String sessionToken) @@ -471,6 +487,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return commonServer.getDefaultPutDataStoreBaseURL(sessionToken); } + @Override @Transactional(readOnly = true) @RolesAllowed(value = { RoleWithHierarchy.SPACE_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) @@ -488,6 +505,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return data.getDataStore().getDownloadUrl(); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) public List<DataSetType> listDataSetTypes(String sessionToken) @@ -506,6 +524,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return dataSetTypes; } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) public HashMap<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary, List<ControlledVocabularyPropertyType.VocabularyTerm>> getVocabularyTermsMap( @@ -523,6 +542,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return vocabTerms; } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) public List<Vocabulary> listVocabularies(String sessionToken) @@ -537,6 +557,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return result; } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = DataSetByExperimentIdentifierValidator.class) @@ -558,6 +579,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return Translator.translate(dataSets, connectionsToGet); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = DataSetByExperimentIdentifierValidator.class) @@ -579,6 +601,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return Translator.translate(dataSets, connectionsToGet); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = DataSetByExperimentIdentifierValidator.class) @@ -605,6 +628,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return result; } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = DataSetByExperimentIdentifierValidator.class) @@ -654,6 +678,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio } } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = DataSetByExperimentIdentifierValidator.class) @@ -672,6 +697,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return Translator.translate(privateDataSets, EnumSet.noneOf(Connections.class)); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = ExperimentByIdentiferValidator.class) @@ -691,6 +717,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return Translator.translateExperiments(experiments); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = ProjectByIdentiferValidator.class) @@ -702,6 +729,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return Translator.translateProjects(commonServer.listProjects(sessionToken)); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @Capability("GET_MATERIALS_BY_CODES") @@ -715,6 +743,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio materialIdentifier, new Transformer<MaterialIdentifier, ch.systemsx.cisd.openbis.generic.shared.basic.dto.MaterialIdentifier>() { + @Override public ch.systemsx.cisd.openbis.generic.shared.basic.dto.MaterialIdentifier transform( MaterialIdentifier arg0) { @@ -733,6 +762,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio return Translator.translateMaterials(materials); } + @Override @Transactional(readOnly = true) @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @Capability("SEARCH_FOR_MATERIALS") diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationServiceLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationServiceLogger.java index 3b93997ef7b..62d479ba83a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationServiceLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationServiceLogger.java @@ -55,22 +55,26 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements super(sessionManager, context); } + @Override public String tryToAuthenticateForAllServices(String userID, String userPassword) { return null; } + @Override public boolean isSessionActive(String sessionToken) { return false; } + @Override public Map<String, Set<Role>> listNamedRoleSets(String sessionToken) { logAccess(sessionToken, "list-role-sets"); return null; } + @Override public List<SpaceWithProjectsAndRoleAssignments> listSpacesWithProjectsAndRoleAssignments( String sessionToken, String databaseInstanceCodeOrNull) { @@ -78,16 +82,19 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public int getMajorVersion() { return 0; } + @Override public int getMinorVersion() { return 0; } + @Override public List<Sample> listSamplesForExperiment(String sessionToken, String experimentIdentifierString) { @@ -96,12 +103,14 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public List<Sample> searchForSamples(String sessionToken, SearchCriteria searchCriteria) { logAccess(sessionToken, "search-for-samples", "SEARCH_CRITERIA(%s)", searchCriteria); return null; } + @Override public List<Sample> searchForSamples(String sessionToken, SearchCriteria searchCriteria, EnumSet<SampleFetchOption> fetchOptions) { @@ -110,12 +119,14 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public List<DataSet> listDataSets(String sessionToken, List<Sample> samples) { logAccess(sessionToken, "list-data-sets", "SAMPLES(%s)", abbreviate(samples)); return null; } + @Override public List<Experiment> listExperiments(String sessionToken, List<Project> projects, String experimentType) { @@ -123,6 +134,7 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public List<Experiment> listExperimentsHavingSamples(String sessionToken, List<Project> projects, String experimentType) { @@ -130,6 +142,7 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public List<Experiment> listExperimentsHavingDataSets(String sessionToken, List<Project> projects, String experimentType) { @@ -137,6 +150,7 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public List<DataSet> listDataSetsForSample(String sessionToken, Sample sample, boolean areOnlyDirectlyConnectedIncluded) { @@ -145,30 +159,35 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public String getDefaultPutDataStoreBaseURL(String sessionToken) { logAccess(sessionToken, "get-default-put-data-store-url"); return null; } + @Override public String tryGetDataStoreBaseURL(String sessionToken, String dataSetCode) { logAccess(sessionToken, "get-data-store-base-url", "DATA_SET(%s)", dataSetCode); return null; } + @Override public List<DataSetType> listDataSetTypes(String sessionToken) { logAccess(sessionToken, "list-data-set-types"); return null; } + @Override public HashMap<Vocabulary, List<VocabularyTerm>> getVocabularyTermsMap(String sessionToken) { logAccess(sessionToken, "get-vocabulary-terms-map"); return null; } + @Override public List<DataSet> listDataSets(String sessionToken, List<Sample> samples, EnumSet<Connections> connectionsToGet) { @@ -177,12 +196,14 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public List<DataSet> getDataSetMetaData(String sessionToken, List<String> dataSetCodes) { logAccess(sessionToken, "get-data-set-meta-data", "DATA_SETS(%s)", abbreviate(dataSetCodes)); return null; } + @Override public List<DataSet> getDataSetMetaData(String sessionToken, List<String> dataSetCodes, EnumSet<DataSetFetchOption> fetchOptions) { @@ -192,12 +213,14 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public List<DataSet> searchForDataSets(String sessionToken, SearchCriteria searchCriteria) { logAccess(sessionToken, "search-for-data-sets", "SEARCH_CRITERIA(%s)", searchCriteria); return null; } + @Override public List<Experiment> listExperiments(String sessionToken, List<String> experimentIdentifiers) { logAccess(sessionToken, "list-experiments", "EXPERIMENT_IDENTIFIERS(%s)", @@ -205,12 +228,14 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public List<Project> listProjects(String sessionToken) { logAccess(sessionToken, "list-projects"); return null; } + @Override public List<ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Vocabulary> listVocabularies( String sessionToken) { @@ -218,6 +243,7 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public List<DataSet> listDataSetsForExperiments(String sessionToken, List<Experiment> experiments, EnumSet<Connections> connectionsToGet) { @@ -226,6 +252,7 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public List<Material> getMaterialByCodes(String sessionToken, List<MaterialIdentifier> materialIdentifier) { @@ -235,6 +262,7 @@ class GeneralInformationServiceLogger extends AbstractServerLogger implements return null; } + @Override public List<Material> searchForMaterials(String sessionToken, SearchCriteria searchCriteria) { logAccess(sessionToken, "search-for-materials", "SEARCH_CRITERIA(%s)", searchCriteria); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/SearchCriteriaToDetailedSearchCriteriaTranslator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/SearchCriteriaToDetailedSearchCriteriaTranslator.java index 24cbd8ace3b..b42f75159ef 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/SearchCriteriaToDetailedSearchCriteriaTranslator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/SearchCriteriaToDetailedSearchCriteriaTranslator.java @@ -145,6 +145,7 @@ public class SearchCriteriaToDetailedSearchCriteriaTranslator public static class SampleAttributeTranslator implements IMatchClauseAttributeTranslator { + @Override public IAttributeSearchFieldKind convertMatchClauseAttributeToAttributeSearchFieldKind( MatchClauseAttribute attribute) { @@ -167,6 +168,7 @@ public class SearchCriteriaToDetailedSearchCriteriaTranslator return ans; } + @Override public IAttributeSearchFieldKind convertMatchClauseAttributeToAttributeSearchFieldKind( MatchClauseTimeAttribute attribute) { @@ -190,6 +192,7 @@ public class SearchCriteriaToDetailedSearchCriteriaTranslator public static class ExperimentAttributeTranslator implements IMatchClauseAttributeTranslator { + @Override public IAttributeSearchFieldKind convertMatchClauseAttributeToAttributeSearchFieldKind( MatchClauseAttribute attribute) { @@ -214,6 +217,7 @@ public class SearchCriteriaToDetailedSearchCriteriaTranslator return ans; } + @Override public IAttributeSearchFieldKind convertMatchClauseAttributeToAttributeSearchFieldKind( MatchClauseTimeAttribute attribute) { @@ -236,6 +240,7 @@ public class SearchCriteriaToDetailedSearchCriteriaTranslator public static class MaterialAttributeTranslator implements IMatchClauseAttributeTranslator { + @Override public IAttributeSearchFieldKind convertMatchClauseAttributeToAttributeSearchFieldKind( MatchClauseAttribute attribute) { @@ -254,6 +259,7 @@ public class SearchCriteriaToDetailedSearchCriteriaTranslator return ans; } + @Override public IAttributeSearchFieldKind convertMatchClauseAttributeToAttributeSearchFieldKind( MatchClauseTimeAttribute attribute) { @@ -275,6 +281,7 @@ public class SearchCriteriaToDetailedSearchCriteriaTranslator public static class DataSetAttributeTranslator implements IMatchClauseAttributeTranslator { + @Override public IAttributeSearchFieldKind convertMatchClauseAttributeToAttributeSearchFieldKind( MatchClauseAttribute attribute) { @@ -293,6 +300,7 @@ public class SearchCriteriaToDetailedSearchCriteriaTranslator return ans; } + @Override public IAttributeSearchFieldKind convertMatchClauseAttributeToAttributeSearchFieldKind( MatchClauseTimeAttribute attribute) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/WebInformationService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/WebInformationService.java index c1d8e59d8b1..45d8a3e4fb5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/WebInformationService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/WebInformationService.java @@ -37,16 +37,19 @@ public class WebInformationService implements IWebInformationService @Private public IRequestContextProvider requestContextProvider; + @Override public int getMajorVersion() { return 1; } + @Override public int getMinorVersion() { return 0; } + @Override public String getSessionToken() { HttpSession httpSession = requestContextProvider.getHttpServletRequest().getSession(false); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/ActiveAuthorization.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/ActiveAuthorization.java index 7e138a798a5..2f53ebe55e1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/ActiveAuthorization.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/ActiveAuthorization.java @@ -38,11 +38,13 @@ public final class ActiveAuthorization implements IAuthorizationComponentFactory // IAuthorizationComponentFactory // + @Override public final IAccessController createAccessController() { return new DefaultAccessController(daoFactory); } + @Override public final IReturnValueFilter createReturnValueFilter() { return new DefaultReturnValueFilter(daoFactory); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/AlwaysStatusOkAccessController.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/AlwaysStatusOkAccessController.java index 12a94fa9c62..3fff7cf228e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/AlwaysStatusOkAccessController.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/AlwaysStatusOkAccessController.java @@ -48,6 +48,7 @@ public final class AlwaysStatusOkAccessController implements IAccessController // IAccessController // + @Override public final Status isAuthorized(final IAuthSession session, final Method method, final Argument<?>[] arguments) throws UserFailureException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationAdvisor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationAdvisor.java index eb66eb30f0d..64fe8f8951e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationAdvisor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationAdvisor.java @@ -146,6 +146,7 @@ public final class AuthorizationAdvisor extends DefaultPointcutAdvisor // MethodInterceptor // + @Override public final Object invoke(final MethodInvocation methodInvocation) throws Throwable { final IAuthSession session = obtainSession(methodInvocation); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationDataProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationDataProvider.java index c003c1afa97..beb0dd3e415 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationDataProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationDataProvider.java @@ -62,42 +62,50 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid } } + @Override public List<SpacePE> listSpaces() { return daoFactory.getSpaceDAO().listSpaces(); } + @Override public SpacePE tryGetSpace(DatabaseInstancePE databaseInstance, String spaceCode) { return daoFactory.getSpaceDAO().tryFindSpaceByCodeAndDatabaseInstance(spaceCode, homeDatabaseInstance); } + @Override public ExperimentPE tryGetExperimentByPermId(String permId) { return daoFactory.getExperimentDAO().tryGetByPermID(permId); } + @Override public SamplePE tryGetSampleByPermId(String permId) { return daoFactory.getSampleDAO().tryToFindByPermID(permId); } + @Override public DatabaseInstancePE getHomeDatabaseInstance() { return homeDatabaseInstance; } + @Override public DatabaseInstancePE tryFindDatabaseInstanceByCode(String databaseInstanceCode) { return codeToDbInstanceMap.get(databaseInstanceCode); } + @Override public DatabaseInstancePE tryFindDatabaseInstanceByUUID(String databaseInstanceUUID) { return uuidToDbInstanceMap.get(databaseInstanceUUID); } + @Override public ProjectPE tryGetProject(String dataSetCode) { DataPE dataSet = daoFactory.getDataDAO().tryToFindDataSetByCode(dataSetCode); @@ -110,6 +118,7 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid } } + @Override public DataSetAccessPE tryGetDatasetAccessData(String dataSetCode) { Set<DataSetAccessPE> results = getDatasetCollectionAccessData(Arrays.asList(dataSetCode)); @@ -118,6 +127,7 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid return results.iterator().next(); } + @Override public Set<DataSetAccessPE> getDatasetCollectionAccessData(final List<String> dataSetCodes) { Session sess = daoFactory.getSessionFactory().getCurrentSession(); @@ -133,6 +143,7 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid BatchOperationExecutor.executeInBatches(new IBatchOperation<String>() { + @Override public void execute(List<String> entities) { query.setParameterList(DataSetAccessPE.DATA_SET_CODES_PARAMETER_NAME, entities); @@ -140,16 +151,19 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid fullResults.addAll(results); } + @Override public List<String> getAllEntities() { return dataSetCodes; } + @Override public String getEntityName() { return "dataset"; } + @Override public String getOperationName() { return "authorization"; @@ -159,6 +173,7 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid return fullResults; } + @Override public Set<SampleAccessPE> getSampleCollectionAccessData(final List<TechId> sampleTechIds) { Session sess = daoFactory.getSessionFactory().getCurrentSession(); @@ -173,6 +188,7 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid BatchOperationExecutor.executeInBatches(new IBatchOperation<TechId>() { + @Override public void execute(List<TechId> entities) { querySpaceSamples.setParameterList(SampleAccessPE.SAMPLE_IDS_PARAMETER_NAME, @@ -185,16 +201,19 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid fullResults.addAll(sharedSamples); } + @Override public List<TechId> getAllEntities() { return sampleTechIds; } + @Override public String getEntityName() { return "sample"; } + @Override public String getOperationName() { return "authorization"; @@ -204,6 +223,7 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid return fullResults; } + @Override public Set<DataSetAccessPE> getDeletedDatasetCollectionAccessData(final List<TechId> deletionIds) { Session sess = daoFactory.getSessionFactory().getCurrentSession(); @@ -219,6 +239,7 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid BatchOperationExecutor.executeInBatches(new IBatchOperation<TechId>() { + @Override public void execute(List<TechId> entities) { query.setParameterList(DataSetAccessPE.DELETION_IDS_PARAMETER_NAME, @@ -227,16 +248,19 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid fullResults.addAll(results); } + @Override public List<TechId> getAllEntities() { return deletionIds; } + @Override public String getEntityName() { return "deletion"; } + @Override public String getOperationName() { return "authorization"; @@ -246,6 +270,7 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid return fullResults; } + @Override public Set<SampleAccessPE> getDeletedSampleCollectionAccessData(final List<TechId> deletionIds) { Session sess = daoFactory.getSessionFactory().getCurrentSession(); @@ -260,6 +285,7 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid BatchOperationExecutor.executeInBatches(new IBatchOperation<TechId>() { + @Override public void execute(List<TechId> entities) { querySpaceSamples.setParameterList(SampleAccessPE.DELETION_IDS_PARAMETER_NAME, @@ -272,16 +298,19 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid fullResults.addAll(sharedSamples); } + @Override public List<TechId> getAllEntities() { return deletionIds; } + @Override public String getEntityName() { return "deletion"; } + @Override public String getOperationName() { return "authorization"; @@ -291,6 +320,7 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid return fullResults; } + @Override public Set<ExperimentAccessPE> getDeletedExperimentCollectionAccessData( final List<TechId> deletionIds) { @@ -308,6 +338,7 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid BatchOperationExecutor.executeInBatches(new IBatchOperation<TechId>() { + @Override public void execute(List<TechId> entities) { query.setParameterList(ExperimentAccessPE.DELETION_IDS_PARAMETER_NAME, @@ -316,16 +347,19 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid fullResults.addAll(results); } + @Override public List<TechId> getAllEntities() { return deletionIds; } + @Override public String getEntityName() { return "deletion"; } + @Override public String getOperationName() { return "authorization"; @@ -335,6 +369,7 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid return fullResults; } + @Override public SpacePE tryGetSpace(SpaceOwnerKind kind, TechId techId) { switch (kind) @@ -355,31 +390,37 @@ final public class AuthorizationDataProvider implements IAuthorizationDataProvid return null; } + @Override public SamplePE getSample(TechId techId) { return daoFactory.getSampleDAO().getByTechId(techId); } + @Override public SamplePE tryGetSample(PermId id) { return daoFactory.getSampleDAO().tryToFindByPermID(id.getId()); } + @Override public GridCustomFilterPE getGridCustomFilter(TechId techId) { return daoFactory.getGridCustomFilterDAO().getByTechId(techId); } + @Override public GridCustomColumnPE getGridCustomColumn(TechId techId) { return daoFactory.getGridCustomColumnDAO().getByTechId(techId); } + @Override public QueryPE getQuery(TechId techId) { return daoFactory.getQueryDAO().getByTechId(techId); } + @Override public List<DeletionPE> getDeletions(List<TechId> deletionIds) { return daoFactory.getDeletionDAO().findAllById(TechId.asLongs(deletionIds)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/DefaultAccessController.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/DefaultAccessController.java index 7cd02d3234d..abedf42d8bf 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/DefaultAccessController.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/DefaultAccessController.java @@ -140,6 +140,7 @@ public final class DefaultAccessController implements IAccessController } } + @Override public final Status isAuthorized(final IAuthSession session, final Method method, final Argument<?>[] arguments) throws UserFailureException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/DefaultReturnValueFilter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/DefaultReturnValueFilter.java index 6b967b9c2f5..c937eab91a3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/DefaultReturnValueFilter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/DefaultReturnValueFilter.java @@ -229,6 +229,7 @@ public final class DefaultReturnValueFilter implements IReturnValueFilter // IReturnValueFilter // + @Override public final Object applyFilter(final IAuthSession session, final Method method, final Object returnValueOrNull) { @@ -283,6 +284,7 @@ public final class DefaultReturnValueFilter implements IReturnValueFilter // IValidator // + @Override public final boolean isValid(final T object) { return validator.isValid(person, object); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/NoAuthorization.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/NoAuthorization.java index bee58e0848f..14da5d05023 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/NoAuthorization.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/NoAuthorization.java @@ -29,11 +29,13 @@ public final class NoAuthorization implements IAuthorizationComponentFactory // IAuthorizationComponentFactory // + @Override public final IAccessController createAccessController() { return AlwaysStatusOkAccessController.getInstance(); } + @Override public final IReturnValueFilter createReturnValueFilter() { return new NoReturnValueFilter(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/NoReturnValueFilter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/NoReturnValueFilter.java index 473bf20e307..6281b6e4415 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/NoReturnValueFilter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/NoReturnValueFilter.java @@ -33,6 +33,7 @@ public final class NoReturnValueFilter implements IReturnValueFilter // IReturnValueFilter // + @Override public final Object applyFilter(final IAuthSession session, final Method method, final Object returnValueOrNull) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/PredicateFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/PredicateFactory.java index 6264f289964..e9e1cb4a60a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/PredicateFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/PredicateFactory.java @@ -34,6 +34,7 @@ final class PredicateFactory implements IPredicateFactory // IPredicateProvider // + @Override public final <P extends IPredicate<T>, T> IPredicate<T> createPredicateForClass( final Class<P> predicateClass) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/batch/DataSetBatchUpdate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/batch/DataSetBatchUpdate.java index 7831adac1b1..6ff5dc2edaf 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/batch/DataSetBatchUpdate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/batch/DataSetBatchUpdate.java @@ -38,22 +38,26 @@ public class DataSetBatchUpdate implements IBatchOperation<DataSetBatchUpdatesDT this.entities = entities; } + @Override public void execute(List<DataSetBatchUpdatesDTO> updates) { businessTable.update(updates); businessTable.save(); } + @Override public List<DataSetBatchUpdatesDTO> getAllEntities() { return entities; } + @Override public String getEntityName() { return "data set"; } + @Override public String getOperationName() { return "update"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/batch/SampleBatchRegistration.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/batch/SampleBatchRegistration.java index b82aead9cbf..25dc0f9917a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/batch/SampleBatchRegistration.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/batch/SampleBatchRegistration.java @@ -43,22 +43,26 @@ public class SampleBatchRegistration implements IBatchOperation<NewSample> this.registratorOrNull = registratorOrNull; } + @Override public void execute(List<NewSample> batch) { businessTable.prepareForRegistration(batch, registratorOrNull); businessTable.save(); } + @Override public List<NewSample> getAllEntities() { return entities; } + @Override public String getEntityName() { return "sample"; } + @Override public String getOperationName() { return "registration"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/batch/SampleBatchUpdate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/batch/SampleBatchUpdate.java index e2195e4f835..a07a7470646 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/batch/SampleBatchUpdate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/batch/SampleBatchUpdate.java @@ -38,22 +38,26 @@ public class SampleBatchUpdate implements IBatchOperation<SampleBatchUpdatesDTO> this.entities = entities; } + @Override public void execute(List<SampleBatchUpdatesDTO> updates) { businessTable.prepareForUpdate(updates); businessTable.save(); } + @Override public List<SampleBatchUpdatesDTO> getAllEntities() { return entities; } + @Override public String getEntityName() { return "sample"; } + @Override public String getOperationName() { return "update"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/DataStoreServiceFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/DataStoreServiceFactory.java index ecebf09075e..34c8d3d0fb4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/DataStoreServiceFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/DataStoreServiceFactory.java @@ -35,6 +35,7 @@ public class DataStoreServiceFactory implements IDataStoreServiceFactory { private final Map<String, IDataStoreService> services = new HashMap<String, IDataStoreService>(); + @Override public IDataStoreService create(String serverURL) { IDataStoreService service = services.get(serverURL); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/PropertiesBatchEvaluationErrors.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/PropertiesBatchEvaluationErrors.java index d7bc1eb79fd..cba73be1c76 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/PropertiesBatchEvaluationErrors.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/PropertiesBatchEvaluationErrors.java @@ -204,6 +204,7 @@ class PropertiesBatchEvaluationErrors List<ErrorDetail> result = new ArrayList<ErrorDetail>(errorDetails.values()); Collections.sort(result, new Comparator<ErrorDetail>() { + @Override public int compare(ErrorDetail o1, ErrorDetail o2) { return o1.rows.get(0) - o2.rows.get(0); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/PropertiesBatchManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/PropertiesBatchManager.java index 7dd32bbb104..eb18d352545 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/PropertiesBatchManager.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/PropertiesBatchManager.java @@ -69,6 +69,7 @@ public class PropertiesBatchManager implements IPropertiesBatchManager private final Logger notificationLog = LogFactory.getLogger(LogCategory.NOTIFY, getClass()); + @Override public void manageProperties(SampleTypePE sampleType, List<NewSample> samples, PersonPE registrator) { @@ -78,6 +79,7 @@ public class PropertiesBatchManager implements IPropertiesBatchManager managePropertiesBeans(samples, sampleTypePropertyTypes, registrator); } + @Override public void manageProperties(ExperimentTypePE experimentType, List<? extends NewBasicExperiment> experiments, PersonPE registrator) { @@ -87,6 +89,7 @@ public class PropertiesBatchManager implements IPropertiesBatchManager managePropertiesBeans(experiments, entityTypePropertyTypes, registrator); } + @Override public void manageProperties(MaterialTypePE materialType, List<NewMaterial> materials, PersonPE registrator) { @@ -95,6 +98,7 @@ public class PropertiesBatchManager implements IPropertiesBatchManager managePropertiesBeans(materials, entityTypePropertyTypes, registrator); } + @Override public void manageProperties(DataSetTypePE dataSetType, List<NewDataSet> dataSets, PersonPE registrator) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBusinessObject.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBusinessObject.java index b27727d1942..2a0f5dbeb44 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBusinessObject.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBusinessObject.java @@ -109,6 +109,7 @@ abstract class AbstractBusinessObject implements IDAOFactory entityPropertiesConverter = converter; } + @Override public SessionFactory getSessionFactory() { return daoFactory.getSessionFactory(); @@ -207,191 +208,229 @@ abstract class AbstractBusinessObject implements IDAOFactory // IDAOFactory // + @Override public final DatabaseInstancePE getHomeDatabaseInstance() { return daoFactory.getHomeDatabaseInstance(); } + @Override public final ISpaceDAO getSpaceDAO() { return daoFactory.getSpaceDAO(); } + @Override public final IScriptDAO getScriptDAO() { return daoFactory.getScriptDAO(); } + @Override public final IPersonDAO getPersonDAO() { return daoFactory.getPersonDAO(); } + @Override public final IDatabaseInstanceDAO getDatabaseInstanceDAO() { return daoFactory.getDatabaseInstanceDAO(); } + @Override public final IRoleAssignmentDAO getRoleAssignmentDAO() { return daoFactory.getRoleAssignmentDAO(); } + @Override public final ISampleDAO getSampleDAO() { return daoFactory.getSampleDAO(); } + @Override public final ISampleTypeDAO getSampleTypeDAO() { return daoFactory.getSampleTypeDAO(); } + @Override public final IDataDAO getDataDAO() { return daoFactory.getDataDAO(); } + @Override public final IHibernateSearchDAO getHibernateSearchDAO() { return daoFactory.getHibernateSearchDAO(); } + @Override public IPropertyTypeDAO getPropertyTypeDAO() { return daoFactory.getPropertyTypeDAO(); } + @Override public IEntityTypeDAO getEntityTypeDAO(final EntityKind entityKind) { return daoFactory.getEntityTypeDAO(entityKind); } + @Override public IEntityPropertyTypeDAO getEntityPropertyTypeDAO(final EntityKind entityKind) { return daoFactory.getEntityPropertyTypeDAO(entityKind); } + @Override public IEntityPropertyHistoryDAO getEntityPropertyHistoryDAO() { return daoFactory.getEntityPropertyHistoryDAO(); } + @Override public IExperimentDAO getExperimentDAO() { return daoFactory.getExperimentDAO(); } + @Override public IProjectDAO getProjectDAO() { return daoFactory.getProjectDAO(); } + @Override public final IVocabularyDAO getVocabularyDAO() { return daoFactory.getVocabularyDAO(); } + @Override public final IVocabularyTermDAO getVocabularyTermDAO() { return daoFactory.getVocabularyTermDAO(); } + @Override public final IAttachmentDAO getAttachmentDAO() { return daoFactory.getAttachmentDAO(); } + @Override public IDataSetTypeDAO getDataSetTypeDAO() { return daoFactory.getDataSetTypeDAO(); } + @Override public IFileFormatTypeDAO getFileFormatTypeDAO() { return daoFactory.getFileFormatTypeDAO(); } + @Override public ILocatorTypeDAO getLocatorTypeDAO() { return daoFactory.getLocatorTypeDAO(); } + @Override public IMaterialDAO getMaterialDAO() { return daoFactory.getMaterialDAO(); } + @Override public ICodeSequenceDAO getCodeSequenceDAO() { return daoFactory.getCodeSequenceDAO(); } + @Override public IDataStoreDAO getDataStoreDAO() { return daoFactory.getDataStoreDAO(); } + @Override public IPermIdDAO getPermIdDAO() { return daoFactory.getPermIdDAO(); } + @Override public IEventDAO getEventDAO() { return daoFactory.getEventDAO(); } + @Override public final IDeletionDAO getDeletionDAO() { return daoFactory.getDeletionDAO(); } + @Override public void setBatchUpdateMode(boolean batchMode) { daoFactory.setBatchUpdateMode(batchMode); } + @Override public IAuthorizationGroupDAO getAuthorizationGroupDAO() { return daoFactory.getAuthorizationGroupDAO(); } + @Override public PersistencyResources getPersistencyResources() { return daoFactory.getPersistencyResources(); } + @Override public IGridCustomFilterDAO getGridCustomFilterDAO() { return daoFactory.getGridCustomFilterDAO(); } + @Override public IGridCustomColumnDAO getGridCustomColumnDAO() { return daoFactory.getGridCustomColumnDAO(); } + @Override public IQueryDAO getQueryDAO() { return daoFactory.getQueryDAO(); } + @Override public IRelationshipTypeDAO getRelationshipTypeDAO() { return daoFactory.getRelationshipTypeDAO(); } + @Override public ICorePluginDAO getCorePluginDAO() { return daoFactory.getCorePluginDAO(); } + @Override public IPostRegistrationDAO getPostRegistrationDAO() { return daoFactory.getPostRegistrationDAO(); } + @Override public IEntityOperationsLogDAO getEntityOperationsLogDAO() { return daoFactory.getEntityOperationsLogDAO(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AttachmentBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AttachmentBO.java index 16a75f31c59..645d10304f8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AttachmentBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AttachmentBO.java @@ -48,6 +48,7 @@ public final class AttachmentBO extends AbstractBusinessObject implements IAttac super(daoFactory, session); } + @Override public void deleteHolderAttachments(final AttachmentHolderPE holder, final List<String> fileNames, final String reason) { @@ -85,6 +86,7 @@ public final class AttachmentBO extends AbstractBusinessObject implements IAttac return String.format("%s/%s/%s", holder.getHolderName(), holder.getIdentifier(), fileName); } + @Override public void updateAttachment(AttachmentHolderPE holder, Attachment attachmentDTO) { load(holder, attachmentDTO.getFileName(), attachmentDTO.getVersion()); @@ -93,6 +95,7 @@ public final class AttachmentBO extends AbstractBusinessObject implements IAttac dataChanged = true; } + @Override public final void save() { assert attachment != null : "Can not save an undefined attachment."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AuthorizationGroupBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AuthorizationGroupBO.java index ee67953a3f6..2a86546d869 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AuthorizationGroupBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AuthorizationGroupBO.java @@ -76,6 +76,7 @@ public class AuthorizationGroupBO extends AbstractBusinessObject implements IAut @Private static class AuthorizationGroupFactory implements IAuthorizationGroupFactory { + @Override public AuthorizationGroupPE create(NewAuthorizationGroup newAuthorizationGroup, PersonPE registrator, DatabaseInstancePE homeDBInstance) { @@ -88,6 +89,7 @@ public class AuthorizationGroupBO extends AbstractBusinessObject implements IAut } } + @Override public void define(NewAuthorizationGroup newAuthorizationGroup) throws UserFailureException { assert newAuthorizationGroup != null : "Undefined new authorization group"; @@ -98,6 +100,7 @@ public class AuthorizationGroupBO extends AbstractBusinessObject implements IAut dataChanged = true; } + @Override public void save() throws UserFailureException { assert authorizationGroup != null : "Authorization group not loaded."; @@ -115,6 +118,7 @@ public class AuthorizationGroupBO extends AbstractBusinessObject implements IAut } } + @Override public void deleteByTechId(TechId authGroupId, String reason) { loadByTechId(authGroupId); @@ -130,6 +134,7 @@ public class AuthorizationGroupBO extends AbstractBusinessObject implements IAut } + @Override public void loadByTechId(TechId techId) { try @@ -155,11 +160,13 @@ public class AuthorizationGroupBO extends AbstractBusinessObject implements IAut return event; } + @Override public AuthorizationGroupPE getAuthorizationGroup() { return authorizationGroup; } + @Override public void update(AuthorizationGroupUpdates updates) { // TODO 2009-07-31,IA: add last update date check @@ -168,6 +175,7 @@ public class AuthorizationGroupBO extends AbstractBusinessObject implements IAut dataChanged = true; } + @Override public List<String> addPersons(List<String> personsCodes) { assert authorizationGroup != null : "Not initialized"; @@ -181,6 +189,7 @@ public class AuthorizationGroupBO extends AbstractBusinessObject implements IAut return inexistent; } + @Override public void removePersons(List<String> personsCodes) { assert authorizationGroup != null : "Not initialized"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/CorePluginTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/CorePluginTable.java index fe1134ae8e4..7d60c193a72 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/CorePluginTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/CorePluginTable.java @@ -58,12 +58,14 @@ public final class CorePluginTable extends AbstractBusinessObject implements ICo this.masterDataScriptRunner = masterDataScriptRunner; } + @Override public List<CorePlugin> listCorePluginsByName(String name) { List<CorePluginPE> pluginPEs = getCorePluginDAO().listCorePluginsByName(name); return CorePluginTranslator.translate(pluginPEs); } + @Override public void registerPlugin(CorePlugin plugin, ICorePluginResourceLoader resourceLoader) { assert plugin != null : "Unspecified plugin."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataBO.java index 584cd308f2a..75b76c3a155 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataBO.java @@ -86,11 +86,13 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO super(daoFactory, exampleSession, propertiesConverter); } + @Override public DataPE tryGetData() { return data; } + @Override public DataPE getData() { // TODO 2010-04-12, CR: This should throw an exception if the external data is null @@ -98,6 +100,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO return data; } + @Override public void loadByCode(String dataSetCode) { loadByCode(dataSetCode, true, false); @@ -114,6 +117,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO static final String PROPERTY_TYPES = "dataSetType.dataSetTypePropertyTypesInternal"; + @Override public void loadDataByTechId(TechId datasetId) { String[] connections = @@ -126,6 +130,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO } } + @Override public void enrichWithParentsAndExperiment() { if (data != null) @@ -134,6 +139,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO } } + @Override public void enrichWithChildren() { if (data != null) @@ -142,6 +148,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO } } + @Override public final void enrichWithProperties() { if (data != null) @@ -150,6 +157,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO } } + @Override public void enrichWithContainedDataSets() { if (data != null && data.isContainer()) @@ -158,6 +166,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO } } + @Override public void define(NewExternalData newData, SamplePE sample, SourceType sourceType) { assert sample != null : "Undefined sample."; @@ -179,6 +188,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO setParentDataSets(experiment, newData); } + @Override public void define(NewExternalData newData, ExperimentPE experiment, SourceType sourceType) { assert experiment != null : "Undefined experiment."; @@ -212,6 +222,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO replaceParents(data, parentsToAdd, false); } + @Override public void setContainedDataSets(ExperimentPE experiment, NewContainerDataSet newData) { SpacePE containerSpace = data.getSpace(); @@ -387,6 +398,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO return result; } + @Override public void save() throws UserFailureException { assert data != null : "Undefined external data."; @@ -427,6 +439,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO data.getDataSetType()); } + @Override public void addPropertiesToDataSet(String dataSetCode, List<NewProperty> properties) { loadByCode(dataSetCode); @@ -479,6 +492,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO return propertiesToUpdate; } + @Override public void update(DataSetUpdatesDTO updates) { loadDataByTechId(updates.getDatasetId()); @@ -634,12 +648,14 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO return result; } + @Override public void updateStatuses(List<String> dataSetCodes, DataSetArchivingStatus newStatus, boolean newPresentInArchive) { getDataDAO().updateDataSetStatuses(dataSetCodes, newStatus, newPresentInArchive); } + @Override public boolean compareAndSetDataSetStatus(DataSetArchivingStatus oldStatus, DataSetArchivingStatus newStatus, boolean newPresentInArchive) { @@ -656,6 +672,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO return true; } + @Override public void updateManagedProperty(IManagedProperty managedProperty) { final Set<DataSetPropertyPE> existingProperties = data.getProperties(); @@ -665,6 +682,7 @@ public class DataBO extends AbstractDataSetBusinessObject implements IDataBO type, managedProperty, registrator)); } + @Override public void setStorageConfirmed() { ExternalDataPE externalData = data.tryAsExternalData(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTable.java index 30565a55675..9c7ee2fd44f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTable.java @@ -205,12 +205,14 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements // IExternalDataTable // + @Override public final List<DataPE> getDataSets() { assert dataSets != null : "Data Sets not loaded."; return dataSets; } + @Override public List<ExternalDataPE> getNonDeletableExternalDataSets() { List<ExternalDataPE> result = new ArrayList<ExternalDataPE>(); @@ -225,6 +227,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements return result; } + @Override public final List<ExternalDataPE> getExternalData() { assert dataSets != null : "Data Sets not loaded."; @@ -237,11 +240,13 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements return result; } + @Override public void setDataSets(List<DataPE> dataSets) { this.dataSets = dataSets; } + @Override public void loadByDataSetCodes(List<String> dataSetCodes, boolean withProperties, boolean lockForUpdate) { @@ -252,6 +257,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements lockForUpdate)); } + @Override public void loadByIds(List<TechId> ids) { IDataDAO dataDAO = getDataDAO(); @@ -260,6 +266,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements dataSets.addAll(dataDAO.tryToFindFullDataSetsByIds(TechId.asLongs(ids), false, false)); } + @Override public final void loadBySampleTechId(final TechId sampleId) { assert sampleId != null : "Unspecified sample id"; @@ -268,6 +275,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements dataSets.addAll(getDataDAO().listDataSets(sample)); } + @Override public void loadByExperimentTechId(final TechId experimentId) { assert experimentId != null : "Unspecified experiment id"; @@ -277,6 +285,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements dataSets.addAll(getDataDAO().listDataSets(experiment)); } + @Override public void deleteLoadedDataSets(String reason, boolean forceNotExistingLocations, boolean forceDisallowedTypes) { @@ -346,6 +355,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements } } + @Override public String uploadLoadedDataSetsToCIFEX(DataSetUploadContext uploadContext) { assertDatasetsAreAvailable(dataSets); @@ -540,6 +550,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements ignoreNonExistingLocation)); } + @Override public void processDatasets(String datastoreServiceKey, String datastoreCode, List<String> datasetCodes, Map<String, String> parameterBindings) { @@ -569,6 +580,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements + "Conntact your administrator."); } + @Override public TableModel createReportFromDatasets(String datastoreServiceKey, String datastoreCode, List<String> datasetCodes) { @@ -622,6 +634,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements return dataStore; } + @Override public void loadByDataStore(DataStorePE dataStore) { assert dataStore != null : "Unspecified data store"; @@ -634,6 +647,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements // Archiving // + @Override public int archiveDatasets(boolean removeFromDataStore) { Map<DataStorePE, List<ExternalDataPE>> datasetsByStore = groupExternalDataByDataStores(); @@ -650,6 +664,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements return result; } + @Override public int unarchiveDatasets() { Map<DataStorePE, List<ExternalDataPE>> datasetsByStore = groupExternalDataByDataStores(); @@ -662,6 +677,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements return result; } + @Override public int lockDatasets() { Map<DataStorePE, List<ExternalDataPE>> datasetsByStore = groupExternalDataByDataStores(); @@ -669,6 +685,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements DataSetArchivingStatus.LOCKED); } + @Override public int unlockDatasets() { Map<DataStorePE, List<ExternalDataPE>> datasetsByStore = groupExternalDataByDataStores(); @@ -717,12 +734,14 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements { performArchivingAction(datasetsByStore, new IArchivingAction() { + @Override public void execute(String sessionToken, IDataStoreService service, List<DatasetDescription> descriptions, String userEmailOrNull) { service.unarchiveDatasets(sessionToken, descriptions, userEmailOrNull); } + @Override public DataSetArchivingStatus getStatusToRestoreOnFailure() { return DataSetArchivingStatus.ARCHIVED; @@ -737,6 +756,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements { performArchivingAction(datasetsByStore, new IArchivingAction() { + @Override public void execute(String sessionToken, IDataStoreService service, List<DatasetDescription> descriptions, String userEmailOrNull) { @@ -744,6 +764,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements removeFromDataStore); } + @Override public DataSetArchivingStatus getStatusToRestoreOnFailure() { return DataSetArchivingStatus.AVAILABLE; @@ -836,6 +857,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements getDataDAO().updateDataSetStatuses(codes, statusToRestoreOnFailure); } + @Override public void save() { assert dataChanged == true : "Data not changed"; @@ -864,6 +886,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements } } + @Override public void update(List<DataSetBatchUpdatesDTO> updates) { assert updates != null : "Unspecified updates."; @@ -945,6 +968,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements return dataSet; } + @Override public LinkModel retrieveLinkFromDataSet(String key, String datastoreCode, String dataSetCode) { DataStorePE dataStore = findDataStore(datastoreCode); @@ -966,6 +990,7 @@ public final class DataSetTable extends AbstractDataSetBusinessObject implements return service.retrieveLinkFromDataSet(sessionToken, key, dataSet); } + @Override public TableModel createReportFromAggregationService(String datastoreServiceKey, String datastoreCode, Map<String, Object> parameters) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataStoreBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataStoreBO.java index f6762ea24b7..e91455c231d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataStoreBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataStoreBO.java @@ -43,11 +43,13 @@ public class DataStoreBO implements IDataStoreBO this.dssFactory = dssFactory; } + @Override public void loadByCode(String dssCode) { this.dataStore = daoFactory.getDataStoreDAO().tryToFindDataStoreByCode(dssCode); } + @Override public void uploadFile(String dropboxName, CustomImportFile customImportFile) { assert dataStore != null : "data store not loaded."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DeletedDataSetTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DeletedDataSetTable.java index ca40ed55964..6498d4bfd2a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DeletedDataSetTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DeletedDataSetTable.java @@ -111,6 +111,7 @@ public final class DeletedDataSetTable extends AbstractDataSetBusinessObject imp // IExternalDataTable // + @Override public void loadByDataSetCodes(List<String> dataSetCodes) { IDataDAO dataDAO = getDataDAO(); @@ -119,6 +120,7 @@ public final class DeletedDataSetTable extends AbstractDataSetBusinessObject imp deletedDataSets.addAll(dataDAO.tryToFindDeletedDataSetsByCodes(dataSetCodes)); } + @Override public void permanentlyDeleteLoadedDataSets(String reason, boolean forceNotExistingLocations, boolean forceDisallowedTypes) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DeletionTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DeletionTable.java index 97228f29d14..4ddea9adba7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DeletionTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DeletionTable.java @@ -48,11 +48,13 @@ public class DeletionTable extends AbstractBusinessObject implements IDeletionTa super(daoFactory, session); } + @Override public List<Deletion> getDeletions() { return deletions; } + @Override public void load(boolean withEntities) { final List<DeletionPE> deletionPEs = getDeletionDAO().listAllEntities(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityPropertiesConverter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityPropertiesConverter.java index fcee03cfe6e..87d536497f3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityPropertiesConverter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityPropertiesConverter.java @@ -276,6 +276,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert // IEntityPropertiesConverter // + @Override public final <T extends EntityPropertyPE> List<T> convertProperties( final IEntityProperty[] properties, final String entityTypeCode, final PersonPE registrator) @@ -319,6 +320,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert return list; } + @Override public <T extends EntityPropertyPE> void checkMandatoryProperties(Collection<T> properties, EntityTypePE entityTypePE) { @@ -330,6 +332,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert entityTypePE)); } + @Override public <T extends EntityPropertyPE> void checkMandatoryProperties(Collection<T> properties, EntityTypePE entityTypePE, Map<EntityTypePE, List<EntityTypePropertyTypePE>> cache) { @@ -376,6 +379,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert } } + @Override public final String tryCreateValidatedPropertyValue(PropertyTypePE propertyType, EntityTypePropertyTypePE entityTypPropertyType, String value) { @@ -393,6 +397,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert return null; } + @Override public final <T extends EntityPropertyPE> T createValidatedProperty( PropertyTypePE propertyType, EntityTypePropertyTypePE entityTypPropertyType, final PersonPE registrator, String validatedValue) @@ -402,6 +407,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert validatedValue); } + @Override public final <T extends EntityPropertyPE> void setPropertyValue(final T entityProperty, final PropertyTypePE propertyType, final String validatedValue) { @@ -420,6 +426,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert } } + @Override public <T extends EntityPropertyPE> Set<T> updateProperties(Collection<T> oldProperties, EntityTypePE entityType, List<IEntityProperty> newProperties, PersonPE author) { @@ -448,6 +455,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert * Update the value of a managed property, assuming the managedProperty already has the updated * value. */ + @Override public <T extends EntityPropertyPE> Set<T> updateManagedProperty(Collection<T> oldProperties, EntityTypePE entityType, IManagedProperty managedProperty, PersonPE author) { @@ -475,6 +483,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert return convertProperties(propsArray, entityTypeCode, registrator, false, false); } + @Override public <T extends EntityPropertyPE> Set<T> updateProperties(Collection<T> oldProperties, EntityTypePE entityType, List<IEntityProperty> newProperties, PersonPE author, Set<String> propertiesToUpdate) @@ -543,6 +552,7 @@ public final class EntityPropertiesConverter implements IEntityPropertiesConvert // IKeyExtractor // + @Override public final PropertyTypePE getKey(final EntityTypePropertyTypePE e) { return e.getPropertyType(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityTypeBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityTypeBO.java index ae7bb373608..e73ae460181 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityTypeBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityTypeBO.java @@ -80,6 +80,7 @@ public final class EntityTypeBO extends AbstractBusinessObject implements IEntit return entityTypePE; } + @Override public final void save() throws UserFailureException { assert entityTypePE != null : "Entity type not defined."; @@ -93,6 +94,7 @@ public final class EntityTypeBO extends AbstractBusinessObject implements IEntit } } + @Override public void define(SampleType entityType) { SampleTypePE sampleTypePE = new SampleTypePE(); @@ -110,18 +112,21 @@ public final class EntityTypeBO extends AbstractBusinessObject implements IEntit this.entityTypePE = sampleTypePE; } + @Override public void define(MaterialType entityType) { this.entityKind = EntityKind.MATERIAL; this.entityTypePE = convertGeneric(entityType, entityKind, getHomeDatabaseInstance()); } + @Override public void define(ExperimentType entityType) { this.entityKind = EntityKind.EXPERIMENT; this.entityTypePE = convertGeneric(entityType, entityKind, getHomeDatabaseInstance()); } + @Override public void define(DataSetType entityType) { @@ -140,6 +145,7 @@ public final class EntityTypeBO extends AbstractBusinessObject implements IEntit this.entityTypePE = dataSetTypePE; } + @Override public void load(EntityKind kind, String code) { this.entityKind = kind; @@ -150,6 +156,7 @@ public final class EntityTypeBO extends AbstractBusinessObject implements IEntit } } + @Override public void delete() { assert entityKind != null; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityTypePropertyTypeBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityTypePropertyTypeBO.java index 2a4ccedf1d2..b5a821a453f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityTypePropertyTypeBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityTypePropertyTypeBO.java @@ -73,6 +73,7 @@ public class EntityTypePropertyTypeBO extends AbstractBusinessObject implements this.entityKind = entityKind; } + @Override public EntityTypePropertyTypePE getLoadedAssignment() { if (assignment == null) @@ -82,6 +83,7 @@ public class EntityTypePropertyTypeBO extends AbstractBusinessObject implements return assignment; } + @Override public void deleteLoadedAssignment() { if (assignment == null) @@ -92,6 +94,7 @@ public class EntityTypePropertyTypeBO extends AbstractBusinessObject implements assignment = null; } + @Override public void loadAssignment(String propertyTypeCode, String entityTypeCode) { EntityTypePE entityType = findEntityType(entityTypeCode); @@ -100,12 +103,14 @@ public class EntityTypePropertyTypeBO extends AbstractBusinessObject implements assignment = entityPropertyTypeDAO.tryFindAssignment(entityType, propertyType); } + @Override public int countAssignmentValues(String propertyTypeCode, String entityTypeCode) { IEntityPropertyTypeDAO entityPropertyTypeDAO = getEntityPropertyTypeDAO(entityKind); return entityPropertyTypeDAO.countAssignmentValues(entityTypeCode, propertyTypeCode); } + @Override public void createAssignment(NewETPTAssignment newAssignment) { EntityTypePE entityType = findEntityType(newAssignment.getEntityTypeCode()); @@ -202,6 +207,7 @@ public class EntityTypePropertyTypeBO extends AbstractBusinessObject implements return "MEMORY (in MB): free:" + freeMemory + " total:" + totalMemory + " max:" + maxMemory; } + @Override public void updateLoadedAssignment(NewETPTAssignment assignmentUpdates) { // if ordinal was changed some etpts need to be shifted by 1 diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBO.java index 5c5a0e9ce5b..052b7caf071 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBO.java @@ -38,6 +38,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IEntityProperty; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewAttachment; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewExperiment; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.api.IManagedProperty; +import ch.systemsx.cisd.openbis.generic.shared.dto.AttachmentHolderPE; import ch.systemsx.cisd.openbis.generic.shared.dto.AttachmentPE; import ch.systemsx.cisd.openbis.generic.shared.dto.EntityTypePE; import ch.systemsx.cisd.openbis.generic.shared.dto.EventPE; @@ -103,6 +104,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper return (ExperimentTypePE) experimentType; } + @Override public final ExperimentPE getExperiment() { checkExperimentLoaded(); @@ -120,6 +122,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper private static final String PROPERTY_TYPES = "experimentType.experimentTypePropertyTypesInternal"; + @Override public void loadDataByTechId(TechId experimentId) { String[] connections = @@ -133,12 +136,14 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper dataChanged = false; } + @Override public final void loadByExperimentIdentifier(final ExperimentIdentifier identifier) { experiment = getExperimentByIdentifier(identifier); dataChanged = false; } + @Override public final ExperimentPE tryFindByExperimentIdentifier(final ExperimentIdentifier identifier) { final ProjectPE project = tryGetProject(identifier); @@ -174,6 +179,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper identifier.getSpaceCode(), identifier.getProjectCode()); } + @Override public final void enrichWithProperties() { if (experiment != null) @@ -182,6 +188,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper } } + @Override public final void enrichWithAttachments() { if (experiment != null) @@ -190,6 +197,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper } } + @Override public AttachmentPE getExperimentFileAttachment(final String filename, final Integer versionOrNull) { @@ -244,6 +252,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper return latest; } + @Override public void deleteByTechIds(List<TechId> experimentIds, String reason) throws UserFailureException { @@ -277,6 +286,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper return String.format("%s [%s]", experiment.getIdentifier(), experiment.getPermId()); } + @Override public void define(NewExperiment newExperiment) { assert newExperiment != null : "Unspecified new experiment."; @@ -295,6 +305,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper dataChanged = true; } + @Override public final void addAttachment(final AttachmentPE experimentAttachment) { assert experiment != null : "no experiment has been loaded"; @@ -307,7 +318,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper { if (attachment != null) { - attachment.setFileName(ExperimentPE.escapeFileName(attachment.getFileName())); + attachment.setFileName(AttachmentHolderPE.escapeFileName(attachment.getFileName())); } } @@ -336,6 +347,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper experiment.setExperimentType((ExperimentTypePE) experimentType); } + @Override public void save() throws UserFailureException { if (dataChanged) @@ -395,6 +407,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper } } + @Override public void update(ExperimentUpdatesDTO updates) { loadDataByTechId(updates.getExperimentId()); @@ -581,6 +594,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper experiment.setCode(code); } + @Override public void updateManagedProperty(IManagedProperty managedProperty) { final Set<ExperimentPropertyPE> existingProperties = experiment.getProperties(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentTable.java index 0f8108c470e..96012618fad 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentTable.java @@ -76,12 +76,14 @@ public final class ExperimentTable extends AbstractBusinessObject implements IEx // IExperimentTable // + @Override public final void load(final String experimentTypeCode, final ProjectIdentifier projectIdentifier) { load(experimentTypeCode, projectIdentifier, false, false); } + @Override public final void load(final String experimentTypeCode, final ProjectIdentifier projectIdentifier, boolean onlyHavingSamples, boolean onlyHavingDataSets) @@ -109,6 +111,7 @@ public final class ExperimentTable extends AbstractBusinessObject implements IEx } } + @Override public final void load(final String experimentTypeCode, final SpaceIdentifier spaceIdentifier) { checkNotNull(experimentTypeCode, spaceIdentifier); @@ -132,6 +135,7 @@ public final class ExperimentTable extends AbstractBusinessObject implements IEx } } + @Override public final void load(final Collection<ExperimentIdentifier> identifiers) { checkNotEmpty(identifiers); @@ -183,12 +187,14 @@ public final class ExperimentTable extends AbstractBusinessObject implements IEx } } + @Override public final List<ExperimentPE> getExperiments() { assert experiments != null : "Experiments have not been loaded."; return experiments; } + @Override public void add(List<NewBasicExperiment> entities, ExperimentTypePE experimentTypePE) { experiments = new ArrayList<ExperimentPE>(); @@ -201,6 +207,7 @@ public final class ExperimentTable extends AbstractBusinessObject implements IEx dataChanged = true; } + @Override public void prepareForUpdate(List<ExperimentBatchUpdatesDTO> updates) { assert updates != null : "Unspecified experiments."; @@ -368,6 +375,7 @@ public final class ExperimentTable extends AbstractBusinessObject implements IEx } } + @Override public void save() { assert experiments != null : "Experiments not loaded."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GridCustomColumnBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GridCustomColumnBO.java index f9cc95d416f..57e6a93ac04 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GridCustomColumnBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GridCustomColumnBO.java @@ -48,6 +48,7 @@ public class GridCustomColumnBO extends AbstractBusinessObject implements super(daoFactory, session); } + @Override public void define(NewColumnOrFilter newColumn) throws UserFailureException { column = new GridCustomColumnPE(); @@ -69,6 +70,7 @@ public class GridCustomColumnBO extends AbstractBusinessObject implements return CUSTOM_COLUMN_ID_PREFIX + code; } + @Override public void loadDataByTechId(TechId id) { try @@ -81,6 +83,7 @@ public class GridCustomColumnBO extends AbstractBusinessObject implements } + @Override public void deleteByTechId(TechId groupId) throws UserFailureException { loadDataByTechId(groupId); @@ -93,6 +96,7 @@ public class GridCustomColumnBO extends AbstractBusinessObject implements } } + @Override public void save() throws UserFailureException { assert column != null : "Column not defined"; @@ -105,6 +109,7 @@ public class GridCustomColumnBO extends AbstractBusinessObject implements } } + @Override public void update(IExpressionUpdates updates) { loadDataByTechId(TechId.create(updates)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GridCustomFilterBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GridCustomFilterBO.java index 13a2aebeb01..a14dee35612 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GridCustomFilterBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GridCustomFilterBO.java @@ -42,6 +42,7 @@ public class GridCustomFilterBO extends AbstractBusinessObject implements super(daoFactory, session); } + @Override public void define(NewColumnOrFilter newFilter) throws UserFailureException { filter = new GridCustomFilterPE(); @@ -53,6 +54,7 @@ public class GridCustomFilterBO extends AbstractBusinessObject implements filter.setRegistrator(findPerson()); } + @Override public void loadDataByTechId(TechId id) { try @@ -65,6 +67,7 @@ public class GridCustomFilterBO extends AbstractBusinessObject implements } + @Override public void deleteByTechId(TechId groupId) throws UserFailureException { loadDataByTechId(groupId); @@ -77,6 +80,7 @@ public class GridCustomFilterBO extends AbstractBusinessObject implements } } + @Override public void save() throws UserFailureException { assert filter != null : "Filter not defined"; @@ -89,6 +93,7 @@ public class GridCustomFilterBO extends AbstractBusinessObject implements } } + @Override public void update(IExpressionUpdates updates) { loadDataByTechId(TechId.create(updates)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GroupBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GroupBO.java index f1f13625ab8..0275d684378 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GroupBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GroupBO.java @@ -57,6 +57,7 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO // IGroupBO // + @Override public final void save() throws UserFailureException { assert group != null : "Space not defined"; @@ -74,6 +75,7 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO } } + @Override public void update(ISpaceUpdates updates) { loadDataByTechId(TechId.create(updates)); @@ -88,6 +90,7 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO getSpaceDAO().validateAndSaveUpdatedEntity(group); } + @Override public final void define(String groupCode, final String descriptionOrNull) throws UserFailureException { @@ -103,11 +106,13 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO group.setRegistrator(findPerson()); } + @Override public SpacePE getGroup() throws UserFailureException { return group; } + @Override public void load(final GroupIdentifier groupIdentifier) throws UserFailureException { group = GroupIdentifierHelper.tryGetSpace(groupIdentifier, session.tryGetPerson(), this); @@ -118,6 +123,7 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO } } + @Override public void loadDataByTechId(TechId groupId) { try @@ -129,6 +135,7 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO } } + @Override public void deleteByTechId(TechId groupId, String reason) throws UserFailureException { loadDataByTechId(groupId); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ISampleBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ISampleBO.java index 3867b76c923..f81c2f08a32 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ISampleBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ISampleBO.java @@ -84,6 +84,7 @@ public interface ISampleBO extends IEntityBusinessObject /** * Writes changed are added data to the Data Access Layers. */ + @Override public void save() throws UserFailureException; /** diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/MaterialBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/MaterialBO.java index 4d4f35acaf5..f96838fa9fa 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/MaterialBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/MaterialBO.java @@ -55,12 +55,14 @@ public final class MaterialBO extends AbstractMaterialBusinessObject implements super(daoFactory, session); } + @Override public void loadDataByTechId(TechId materialId) { material = getMaterialById(materialId); dataChanged = false; } + @Override public void loadByMaterialIdentifier(MaterialIdentifier identifier) { material = getMaterialDAO().tryFindMaterial(identifier); @@ -72,6 +74,7 @@ public final class MaterialBO extends AbstractMaterialBusinessObject implements dataChanged = false; } + @Override public final void enrichWithProperties() { if (material != null) @@ -80,6 +83,7 @@ public final class MaterialBO extends AbstractMaterialBusinessObject implements } } + @Override public void save() throws UserFailureException { assert dataChanged : "Data not changed"; @@ -100,6 +104,7 @@ public final class MaterialBO extends AbstractMaterialBusinessObject implements material.getMaterialType()); } + @Override public void update(MaterialUpdateDTO materialUpdate) { loadDataByTechId(materialUpdate.getMaterialId()); @@ -118,11 +123,13 @@ public final class MaterialBO extends AbstractMaterialBusinessObject implements material.setProperties(convertProperties(type, existingProperties, properties)); } + @Override public MaterialPE getMaterial() { return material; } + @Override public void deleteByTechId(TechId materialId, String reason) { loadDataByTechId(materialId); @@ -150,6 +157,7 @@ public final class MaterialBO extends AbstractMaterialBusinessObject implements } + @Override public void updateManagedProperty(IManagedProperty managedProperty) { final Set<MaterialPropertyPE> existingProperties = material.getProperties(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/MaterialTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/MaterialTable.java index b9d31bb7210..e60c961bf6f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/MaterialTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/MaterialTable.java @@ -68,12 +68,14 @@ public final class MaterialTable extends AbstractMaterialBusinessObject implemen this.dataChanged = dataChanged; } + @Override public final List<MaterialPE> getMaterials() { assert materials != null : "Materials have not been loaded."; return materials; } + @Override public void add(List<NewMaterial> newMaterials, MaterialTypePE materialTypePE) { assert newMaterials != null : "New materials undefined."; @@ -91,6 +93,7 @@ public final class MaterialTable extends AbstractMaterialBusinessObject implemen dataChanged = true; } + @Override public void save() { assert materials != null : "Materials have not been loaded."; @@ -146,6 +149,7 @@ public final class MaterialTable extends AbstractMaterialBusinessObject implemen // ----------------- + @Override public void update(List<MaterialUpdateDTO> materialsUpdate) { setBatchUpdateMode(true); @@ -207,6 +211,7 @@ public final class MaterialTable extends AbstractMaterialBusinessObject implemen return names; } + @Override public void deleteByTechIds(List<TechId> materialIds, String reason) throws UserFailureException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PlaceholderPropertyCreator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PlaceholderPropertyCreator.java index f5d56d2fb0e..2bf9a051fb6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PlaceholderPropertyCreator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PlaceholderPropertyCreator.java @@ -29,6 +29,7 @@ class PlaceholderPropertyCreator implements IPropertyPlaceholderCreator * Adds placeholders for <var>dynamicProperties</var> to <var>definedProperties</var> if they * don't exist yet. */ + @Override public void addDynamicPropertiesPlaceholders(Set<IEntityProperty> definedProperties, Set<String> dynamicProperties) { @@ -40,6 +41,7 @@ class PlaceholderPropertyCreator implements IPropertyPlaceholderCreator * Adds placeholders for <var>managedProperties</var> to <var>definedProperties</var> if they * don't exist yet. */ + @Override public void addManagedPropertiesPlaceholders(Set<IEntityProperty> definedProperties, Set<String> managedProperties) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ProjectBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ProjectBO.java index 69e78f9b39a..d9e29e3a23e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ProjectBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ProjectBO.java @@ -33,6 +33,7 @@ import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDeletionDAO; import ch.systemsx.cisd.openbis.generic.server.util.GroupIdentifierHelper; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewAttachment; +import ch.systemsx.cisd.openbis.generic.shared.dto.AttachmentHolderPE; import ch.systemsx.cisd.openbis.generic.shared.dto.AttachmentPE; import ch.systemsx.cisd.openbis.generic.shared.dto.DeletedExperimentPE; import ch.systemsx.cisd.openbis.generic.shared.dto.DeletionPE; @@ -98,6 +99,7 @@ public final class ProjectBO extends AbstractBusinessObject implements IProjectB return result; } + @Override public final void save() { assert project != null : "Can not save an undefined project."; @@ -132,11 +134,13 @@ public final class ProjectBO extends AbstractBusinessObject implements IProjectB } } + @Override public final ProjectPE getProject() { return project; } + @Override public void define(ProjectIdentifier projectIdentifier, String description, String leaderId) throws UserFailureException { @@ -145,6 +149,7 @@ public final class ProjectBO extends AbstractBusinessObject implements IProjectB dataChanged = true; } + @Override public void loadByProjectIdentifier(ProjectIdentifier identifier) { String databaseInstanceCode = identifier.getDatabaseInstanceCode(); @@ -159,6 +164,7 @@ public final class ProjectBO extends AbstractBusinessObject implements IProjectB dataChanged = false; } + @Override public void loadDataByTechId(TechId projectId) { try @@ -172,6 +178,7 @@ public final class ProjectBO extends AbstractBusinessObject implements IProjectB dataChanged = false; } + @Override public final void addAttachment(final AttachmentPE attachment) { assert project != null : "no project has been loaded"; @@ -184,10 +191,11 @@ public final class ProjectBO extends AbstractBusinessObject implements IProjectB { if (attachment != null) { - attachment.setFileName(ProjectPE.escapeFileName(attachment.getFileName())); + attachment.setFileName(AttachmentHolderPE.escapeFileName(attachment.getFileName())); } } + @Override public AttachmentPE getProjectFileAttachment(final String filename, final Integer versionOrNull) { checkProjectLoaded(); @@ -250,6 +258,7 @@ public final class ProjectBO extends AbstractBusinessObject implements IProjectB } } + @Override public final void enrichWithAttachments() { if (project != null) @@ -258,6 +267,7 @@ public final class ProjectBO extends AbstractBusinessObject implements IProjectB } } + @Override public void update(ProjectUpdatesDTO updates) { loadDataByTechId(updates.getTechId()); @@ -301,6 +311,7 @@ public final class ProjectBO extends AbstractBusinessObject implements IProjectB return group; } + @Override public void deleteByTechId(TechId projectId, String reason) throws UserFailureException { loadDataByTechId(projectId); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PropertyTypeBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PropertyTypeBO.java index b3236013203..54bd2f4babd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PropertyTypeBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PropertyTypeBO.java @@ -68,6 +68,7 @@ public final class PropertyTypeBO extends VocabularyBO implements IPropertyTypeB // AbstractVocabularyBusinessObject // + @Override public final void define(final PropertyType propertyType) throws UserFailureException { assert propertyType != null : "Unspecified property type."; @@ -182,6 +183,7 @@ public final class PropertyTypeBO extends VocabularyBO implements IPropertyTypeB } } + @Override public void update(IPropertyTypeUpdates updates) { loadDataByTechId(TechId.create(updates)); @@ -200,6 +202,7 @@ public final class PropertyTypeBO extends VocabularyBO implements IPropertyTypeB getPropertyTypeDAO().validateAndSaveUpdatedEntity(propertyTypePE); } + @Override public final PropertyTypePE getPropertyType() { assert propertyTypePE != null : "Property type not defined."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PropertyTypeTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PropertyTypeTable.java index 150c1959d5a..702e93a8974 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PropertyTypeTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/PropertyTypeTable.java @@ -37,6 +37,7 @@ public final class PropertyTypeTable extends AbstractBusinessObject implements I super(daoFactory, session); } + @Override public List<PropertyTypePE> getPropertyTypes() { if (propertyTypes == null) @@ -46,16 +47,19 @@ public final class PropertyTypeTable extends AbstractBusinessObject implements I return propertyTypes; } + @Override public void load() { propertyTypes = getPropertyTypeDAO().listAllPropertyTypes(); } + @Override public void loadWithRelations() { propertyTypes = getPropertyTypeDAO().listAllPropertyTypesWithRelations(); } + @Override public final void enrichWithRelations() { if (propertyTypes == null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RoleAssignmentTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RoleAssignmentTable.java index a64d95371a1..2585bafc5a2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RoleAssignmentTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RoleAssignmentTable.java @@ -95,6 +95,7 @@ public final class RoleAssignmentTable extends AbstractBusinessObject implements // IRoleAssignmentTable // + @Override public final void add(final NewRoleAssignment newRoleAssignment) { if (roleAssignments == null) @@ -139,6 +140,7 @@ public final class RoleAssignmentTable extends AbstractBusinessObject implements // AbstractBusinessObject // + @Override public final void save() throws UserFailureException { assert roleAssignments != null : "Role assignments unspecified"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RootEntitiesFinder.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RootEntitiesFinder.java index 482997f0a68..3ca8ace59cf 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RootEntitiesFinder.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RootEntitiesFinder.java @@ -115,6 +115,7 @@ final class RootEntitiesFinder { return new Comparator<IIdentifierHolder>() { + @Override public int compare(IIdentifierHolder d1, IIdentifierHolder d2) { return d1.getIdentifier().compareTo(d2.getIdentifier()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBO.java index eade7827268..a7ac5d73dc6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBO.java @@ -32,6 +32,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IEntityProperty; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewAttachment; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewSample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.api.IManagedProperty; +import ch.systemsx.cisd.openbis.generic.shared.dto.AttachmentHolderPE; import ch.systemsx.cisd.openbis.generic.shared.dto.AttachmentPE; import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE; import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE; @@ -75,11 +76,13 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam // // ISampleBO // + @Override public SamplePE tryToGetSample() { return sample; } + @Override public void tryToLoadBySampleIdentifier(SampleIdentifier identifier) { assert identifier != null : "Unspecified identifier."; @@ -101,6 +104,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam sample = tryToGetSampleByTechId(sampleId); } + @Override public final SamplePE getSample() throws IllegalStateException { if (sample == null) @@ -110,6 +114,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam return sample; } + @Override public void loadDataByTechId(TechId sampleId) { onlyNewSamples = false; @@ -122,6 +127,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam dataChanged = spaceUpdated = false; } + @Override public final void loadBySampleIdentifier(final SampleIdentifier identifier) throws UserFailureException { @@ -133,6 +139,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam } } + @Override public final void loadBySamplePermId(final String permId) throws UserFailureException { tryToLoadBySamplePermId(permId); @@ -143,6 +150,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam } } + @Override public final void define(final NewSample newSample) { assert newSample != null : "Unspecified new sample."; @@ -152,6 +160,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam onlyNewSamples = true; } + @Override public final void save() { assert sample != null : "Sample not loaded."; @@ -197,6 +206,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam } } + @Override public void setExperiment(ExperimentPE experiment) { assert sample != null : "Sample not loaded."; @@ -253,6 +263,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam } } + @Override public void update(SampleUpdatesDTO updates) { loadDataByTechId(updates.getSampleIdOrNull()); @@ -304,6 +315,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam sample.setCode(code); } + @Override public void addAttachment(AttachmentPE sampleAttachment) { assert sample != null : "no sample has been loaded"; @@ -316,7 +328,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam { if (attachment != null) { - attachment.setFileName(SamplePE.escapeFileName(attachment.getFileName())); + attachment.setFileName(AttachmentHolderPE.escapeFileName(attachment.getFileName())); } } @@ -328,6 +340,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam } } + @Override public AttachmentPE getSampleFileAttachment(final String filename, final Integer versionOrNull) { checkSampleLoaded(); @@ -382,6 +395,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam return latest; } + @Override public final void enrichWithAttachments() { if (sample != null) @@ -390,6 +404,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam } } + @Override public final void enrichWithPropertyTypes() { if (sample != null) @@ -399,6 +414,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam } } + @Override public void enrichWithProperties() { if (sample != null) @@ -407,6 +423,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam } } + @Override public void updateManagedProperty(IManagedProperty managedProperty) { final Set<SamplePropertyPE> existingProperties = sample.getProperties(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleTable.java index b275594f8f7..ee5c8706d91 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleTable.java @@ -69,6 +69,7 @@ public final class SampleTable extends AbstractSampleBusinessObject implements I super(daoFactory, session); } + @Override public final void loadSamplesByCriteria(final ListSamplesByPropertyCriteria criteria) { onlyNewSamples = false; @@ -158,11 +159,13 @@ public final class SampleTable extends AbstractSampleBusinessObject implements I return group; } + @Override public final List<SamplePE> getSamples() { return samples; } + @Override public void prepareForRegistration(List<NewSample> newSamples, PersonPE registratorOrNull) throws UserFailureException { @@ -194,6 +197,7 @@ public final class SampleTable extends AbstractSampleBusinessObject implements I dataChanged = true; } + @Override public void save() throws UserFailureException { assert samples != null : "Samples not loaded."; @@ -282,6 +286,7 @@ public final class SampleTable extends AbstractSampleBusinessObject implements I properties, registrator, propertiesToUpdate)); } + @Override public void prepareForUpdate(List<SampleBatchUpdatesDTO> updates) { assert updates != null : "Unspecified samples."; @@ -327,6 +332,7 @@ public final class SampleTable extends AbstractSampleBusinessObject implements I return results; } + @Override public void deleteByTechIds(List<TechId> sampleIds, String reason) throws UserFailureException { try diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ScriptBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ScriptBO.java index 2e02498be19..93abadeea64 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ScriptBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ScriptBO.java @@ -67,12 +67,14 @@ public final class ScriptBO extends AbstractBusinessObject implements IScriptBO private static class ScriptFactory implements IScriptFactory { + @Override public ScriptPE create() { return new ScriptPE(); } } + @Override public void deleteByTechId(TechId groupId) throws UserFailureException { loadDataByTechId(groupId); @@ -85,6 +87,7 @@ public final class ScriptBO extends AbstractBusinessObject implements IScriptBO } } + @Override public void loadDataByTechId(TechId id) { try @@ -96,6 +99,7 @@ public final class ScriptBO extends AbstractBusinessObject implements IScriptBO } } + @Override public void save() throws UserFailureException { assert script != null : "Script not defined"; @@ -109,6 +113,7 @@ public final class ScriptBO extends AbstractBusinessObject implements IScriptBO } } + @Override public void define(Script newScript) throws UserFailureException { assert newScript != null : "Unspecified script."; @@ -122,6 +127,7 @@ public final class ScriptBO extends AbstractBusinessObject implements IScriptBO script.setEntityKind(newScript.getEntityKind()); } + @Override public void update(IScriptUpdates updates) { loadDataByTechId(TechId.create(updates)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/TrashBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/TrashBO.java index f7c446be98d..533819a1a4b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/TrashBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/TrashBO.java @@ -60,6 +60,7 @@ public class TrashBO extends AbstractBusinessObject implements ITrashBO this.boFactory = boFactory; } + @Override public void createDeletion(String reason) { try @@ -74,6 +75,7 @@ public class TrashBO extends AbstractBusinessObject implements ITrashBO } } + @Override public void trashSamples(final List<TechId> sampleIds) { assert deletion != null; @@ -99,6 +101,7 @@ public class TrashBO extends AbstractBusinessObject implements ITrashBO } } + @Override public void trashExperiments(final List<TechId> experimentIds) { assert deletion != null; @@ -115,6 +118,7 @@ public class TrashBO extends AbstractBusinessObject implements ITrashBO } } + @Override public void trashDataSets(final List<TechId> dataSetIds) { assert deletion != null; @@ -231,6 +235,7 @@ public class TrashBO extends AbstractBusinessObject implements ITrashBO trashDataSets(batchOperation.getResults()); } + @Override public void revertDeletion(TechId deletionId) { try @@ -264,21 +269,25 @@ public class TrashBO extends AbstractBusinessObject implements ITrashBO this.deletionDAO = deletionDAO; } + @Override public void execute(List<TechId> entities) { counter += deletionDAO.trash(entityKind, entities, deletion); } + @Override public List<TechId> getAllEntities() { return entityIds; } + @Override public String getEntityName() { return entityKind.getLabel(); } + @Override public String getOperationName() { return "trash"; @@ -305,21 +314,25 @@ public class TrashBO extends AbstractBusinessObject implements ITrashBO public abstract Collection<TechId> listAction(List<TechId> entities); + @Override public void execute(List<TechId> entities) { results.addAll(listAction(entities)); } + @Override public List<TechId> getAllEntities() { return entityIds; } + @Override public String getEntityName() { return entityKind.getLabel(); } + @Override public String getOperationName() { return operationName; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/VocabularyBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/VocabularyBO.java index 0022ecc2cbf..3517d2eeb55 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/VocabularyBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/VocabularyBO.java @@ -92,6 +92,7 @@ public class VocabularyBO extends AbstractBusinessObject implements IVocabularyB // AbstractVocabularyBusinessObject // + @Override public final void define(final NewVocabulary vocabulary) throws UserFailureException { assert vocabulary != null : "Unspecified vocabulary."; @@ -130,11 +131,13 @@ public class VocabularyBO extends AbstractBusinessObject implements IVocabularyB } } + @Override public void addNewTerms(List<String> newTermCodes, Long previousTermOrdinal) { addNewTerms(newTermCodes, previousTermOrdinal, true); } + @Override public void addNewUnofficialTerm(String code, String label, String description, Long previousTermOrdinal) { @@ -181,6 +184,7 @@ public class VocabularyBO extends AbstractBusinessObject implements IVocabularyB addTerm(term.getCode(), term.getDescription(), term.getLabel(), ordinal, isOfficial); } + @Override public void delete(List<VocabularyTerm> termsToBeDeleted, List<VocabularyTermReplacement> termsToBeReplaced) { @@ -255,6 +259,7 @@ public class VocabularyBO extends AbstractBusinessObject implements IVocabularyB term.setVocabulary(null); } + @Override public void save() throws UserFailureException { assert vocabularyPE != null : UNSPECIFIED_VOCABULARY; @@ -295,6 +300,7 @@ public class VocabularyBO extends AbstractBusinessObject implements IVocabularyB } } + @Override public void update(IVocabularyUpdates updates) { loadDataByTechId(TechId.create(updates)); @@ -312,6 +318,7 @@ public class VocabularyBO extends AbstractBusinessObject implements IVocabularyB getVocabularyDAO().validateAndSaveUpdatedEntity(vocabularyPE); } + @Override public final VocabularyPE getVocabulary() { assert vocabularyPE != null : UNSPECIFIED_VOCABULARY; @@ -323,6 +330,7 @@ public class VocabularyBO extends AbstractBusinessObject implements IVocabularyB return vocabularyPE; } + @Override public List<VocabularyTermWithStats> countTermsUsageStatistics() { assert vocabularyPE != null : UNSPECIFIED_VOCABULARY; @@ -346,6 +354,7 @@ public class VocabularyBO extends AbstractBusinessObject implements IVocabularyB return results; } + @Override public void load(String vocabularyCode) throws UserFailureException { tryLoad(vocabularyCode); @@ -361,6 +370,7 @@ public class VocabularyBO extends AbstractBusinessObject implements IVocabularyB vocabularyPE = getVocabularyDAO().tryFindVocabularyByCode(vocabularyCode); } + @Override public void loadDataByTechId(TechId vocabularyId) { try @@ -372,12 +382,14 @@ public class VocabularyBO extends AbstractBusinessObject implements IVocabularyB } } + @Override public Set<VocabularyTermPE> enrichWithTerms() { HibernateUtils.initialize(vocabularyPE.getTerms()); return vocabularyPE.getTerms(); } + @Override public void deleteByTechId(TechId vocabularyId, String reason) throws UserFailureException { loadDataByTechId(vocabularyId); @@ -411,6 +423,7 @@ public class VocabularyBO extends AbstractBusinessObject implements IVocabularyB return String.format("%s", vocabularyPE.getCode()); } + @Override public void updateTerms(List<VocabularyTerm> terms) { assert vocabularyPE != null : UNSPECIFIED_VOCABULARY; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/VocabularyTermBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/VocabularyTermBO.java index 67f7f2f2520..71cf4e2fee6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/VocabularyTermBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/VocabularyTermBO.java @@ -46,6 +46,7 @@ public final class VocabularyTermBO extends AbstractBusinessObject implements IV // IVocabularyTermBO // + @Override public void update(IVocabularyTermUpdates updates) { loadDataByTechId(TechId.create(updates)); @@ -72,6 +73,7 @@ public final class VocabularyTermBO extends AbstractBusinessObject implements IV getVocabularyTermDAO().validateAndSaveUpdatedEntity(vocabularyTermPE); } + @Override public final VocabularyTermPE getVocabularyTerm() { assert vocabularyTermPE != null : "Vocabulary term not defined."; @@ -89,6 +91,7 @@ public final class VocabularyTermBO extends AbstractBusinessObject implements IV } } + @Override public void makeOfficial(List<VocabularyTerm> termsToBeOfficial) { for (VocabularyTerm term : termsToBeOfficial) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/AbstractBatchIterator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/AbstractBatchIterator.java index bff06baf0ef..0bbcb4a45f0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/AbstractBatchIterator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/AbstractBatchIterator.java @@ -49,6 +49,7 @@ abstract public class AbstractBatchIterator<T> implements Iterable<T> this.items = items; } + @Override public Iterator<T> iterator() { final Iterator<Long> unprocessedItems = items.iterator(); @@ -56,11 +57,13 @@ abstract public class AbstractBatchIterator<T> implements Iterable<T> { private Iterator<T> fetchedResults = null; + @Override public boolean hasNext() { return fetchNextPortionIfNeeded(); } + @Override public T next() { fetchNextPortionIfNeeded(); @@ -92,6 +95,7 @@ abstract public class AbstractBatchIterator<T> implements Iterable<T> } } + @Override public void remove() { throw new NotImplementedException(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/EntityPropertiesEnricher.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/EntityPropertiesEnricher.java index 5c91e24a398..367cc739c89 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/EntityPropertiesEnricher.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/EntityPropertiesEnricher.java @@ -57,6 +57,7 @@ public final class EntityPropertiesEnricher implements IEntityPropertiesEnricher { private final static int BATCH_SIZE = 50000; + @Override public Iterable<GenericEntityPropertyRecord> getEntityPropertyGenericValues( LongSet entityIDs) { @@ -72,6 +73,7 @@ public final class EntityPropertiesEnricher implements IEntityPropertiesEnricher }; } + @Override public Iterable<VocabularyTermRecord> getEntityPropertyVocabularyTermValues( LongSet entityIDs) { @@ -86,6 +88,7 @@ public final class EntityPropertiesEnricher implements IEntityPropertiesEnricher }; } + @Override public Iterable<MaterialEntityPropertyRecord> getEntityPropertyMaterialValues( LongSet entityIDs) { @@ -108,6 +111,7 @@ public final class EntityPropertiesEnricher implements IEntityPropertiesEnricher * Enriches the entities with given <var>entityIDs</var> with its properties. The entities will * be resolved by the {@link IEntityPropertiesHolderResolver} and will be enriched in place. */ + @Override public void enrich(final LongSet entityIDs, final IEntityPropertiesHolderResolver entities) { final Long2ObjectMap<PropertyType> propertyTypes = getPropertyTypes(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetLister.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetLister.java index b3818e0bd05..a7c4dc57cce 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetLister.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetLister.java @@ -150,6 +150,7 @@ public class DatasetLister extends AbstractLister implements IDatasetLister this.baseIndexURL = baseIndexURL; } + @Override public List<ExternalData> listBySampleTechId(TechId sampleId, boolean showOnlyDirectlyConnected) { if (showOnlyDirectlyConnected) @@ -174,6 +175,7 @@ public class DatasetLister extends AbstractLister implements IDatasetLister } } + @Override public List<ExternalData> listBySampleIds(Collection<Long> sampleIds) { LongSet ids = new LongOpenHashSet(); @@ -184,6 +186,7 @@ public class DatasetLister extends AbstractLister implements IDatasetLister return enrichDatasets(query.getDatasetsForSamples(ids)); } + @Override public List<ExternalData> listByExperimentTechId(TechId experimentId, boolean showOnlyDirectlyConnected) { @@ -198,6 +201,7 @@ public class DatasetLister extends AbstractLister implements IDatasetLister return enrichDatasets(dataSets); } + @Override public Map<Long, Set<Long>> listParentIds(Collection<Long> dataSetIDs) { LongOpenHashSet ids = new LongOpenHashSet(); @@ -220,6 +224,7 @@ public class DatasetLister extends AbstractLister implements IDatasetLister return map; } + @Override public Map<Long, Set<Long>> listChildrenIds(Collection<Long> dataSetIDs) { LongOpenHashSet ids = new LongOpenHashSet(); @@ -242,11 +247,13 @@ public class DatasetLister extends AbstractLister implements IDatasetLister return map; } + @Override public Map<Sample, List<ExternalData>> listAllDataSetsFor(List<Sample> samples) { TableMap<Long, Sample> samplesByID = new TableMap<Long, Sample>(samples, new IKeyExtractor<Long, Sample>() { + @Override public Long getKey(Sample e) { return e.getId(); @@ -319,16 +326,19 @@ public class DatasetLister extends AbstractLister implements IDatasetLister } } + @Override public List<ExternalData> listByChildTechId(TechId childDatasetId) { return enrichDatasets(query.getParentDatasetsForChild(childDatasetId.getId())); } + @Override public List<ExternalData> listByContainerTechId(TechId containerDatasetId) { return enrichDatasets(query.getContainedDatasetsForContainer(containerDatasetId.getId())); } + @Override public List<ExternalData> listByParentTechIds(Collection<Long> parentDatasetIds) { DataIterator<DatasetRecord> childrenDataSets = @@ -336,11 +346,13 @@ public class DatasetLister extends AbstractLister implements IDatasetLister return enrichDatasets(childrenDataSets); } + @Override public List<ExternalData> listByDatasetIds(Collection<Long> datasetIds) { return enrichDatasets(query.getDatasets(new LongOpenHashSet(datasetIds))); } + @Override public List<ExternalData> listByDatasetCode(Collection<String> datasetCodes) { String[] codes = datasetCodes.toArray(new String[datasetCodes.size()]); @@ -350,11 +362,13 @@ public class DatasetLister extends AbstractLister implements IDatasetLister // return asList(createPrimaryDatasets(asList(datasets))); } + @Override public List<ExternalData> listByDataStore(long dataStoreID) { return enrichDatasets(query.getDatasetsByDataStoreId(dataStoreID)); } + @Override public List<DataSetShareId> listAllDataSetShareIdsByDataStore(long dataStoreID) { List<DataSetShareId> results = new ArrayList<DataSetShareId>(); @@ -371,6 +385,7 @@ public class DatasetLister extends AbstractLister implements IDatasetLister return results; } + @Override public List<ExternalData> listByTrackingCriteria(TrackingDataSetCriteria criteria) { DataIterator<DatasetRecord> dataSets; @@ -394,6 +409,7 @@ public class DatasetLister extends AbstractLister implements IDatasetLister return asList(datasetMap); } + @Override public List<ExternalData> listByArchiverCriteria(String dataStoreCode, ArchiverDataSetCriteria criteria) { @@ -539,6 +555,7 @@ public class DatasetLister extends AbstractLister implements IDatasetLister { propertiesEnricher.enrich(resultMap.keySet(), new IEntityPropertiesHolderResolver() { + @Override public ExternalData get(long id) { return resultMap.get(id); @@ -869,6 +886,7 @@ public class DatasetLister extends AbstractLister implements IDatasetLister return result; } + @Override public Map<Long, GenericEntityPropertyRecord> fetchProperties(List<Long> ids, String propertyTypeCode) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListerDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListerDAO.java index 1cceed3dc6b..0da2f9e89a1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListerDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListerDAO.java @@ -89,18 +89,21 @@ public final class DatasetListerDAO extends AbstractDAO { return new IEntityPropertySetListingQuery() { + @Override public Iterable<GenericEntityPropertyRecord> getEntityPropertyGenericValues( LongSet entityIDs) { return query.getEntityPropertyGenericValues(entityIDs); } + @Override public Iterable<MaterialEntityPropertyRecord> getEntityPropertyMaterialValues( LongSet entityIDs) { return query.getEntityPropertyMaterialValues(entityIDs); } + @Override public Iterable<VocabularyTermRecord> getEntityPropertyVocabularyTermValues( LongSet entityIDs) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DefaultBatchDynamicPropertyEvaluator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DefaultBatchDynamicPropertyEvaluator.java index c04e761a49e..3a383f6d8fb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DefaultBatchDynamicPropertyEvaluator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DefaultBatchDynamicPropertyEvaluator.java @@ -83,6 +83,7 @@ final class DefaultBatchDynamicPropertyEvaluator implements IBatchDynamicPropert { return new DynamicPropertyEvaluator(daoFactory, new IHibernateSessionProvider() { + @Override public Session getSession() { return hibernateSession; @@ -94,6 +95,7 @@ final class DefaultBatchDynamicPropertyEvaluator implements IBatchDynamicPropert // IDynamicPropertyEvaluator // + @Override public final <T extends IEntityInformationWithPropertiesHolder> List<Long> doEvaluateProperties( final Session hibernateSession, final Class<T> clazz) throws DataAccessException { @@ -147,6 +149,7 @@ final class DefaultBatchDynamicPropertyEvaluator implements IBatchDynamicPropert return new ArrayList<Long>(); } + @Override public <T extends IEntityInformationWithPropertiesHolder> List<Long> doEvaluateProperties( final Session hibernateSession, final Class<T> clazz, final List<Long> ids) throws DataAccessException diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DummyDynamicPropertyEvaluationRunnable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DummyDynamicPropertyEvaluationRunnable.java index 1a3aec0f8b1..eef2ea4fa22 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DummyDynamicPropertyEvaluationRunnable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DummyDynamicPropertyEvaluationRunnable.java @@ -43,11 +43,13 @@ public final class DummyDynamicPropertyEvaluationRunnable extends HibernateDaoSu operationLog.debug("dummy property evaluator created"); } + @Override public void clear() { operationLog.debug("clear"); } + @Override public void scheduleUpdate(DynamicPropertyEvaluationOperation operation) { operationLog.debug("scheduling " + operation); @@ -57,6 +59,7 @@ public final class DummyDynamicPropertyEvaluationRunnable extends HibernateDaoSu // Runnable // + @Override public final void run() { operationLog.debug("started"); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DynamicPropertyEvaluationRunnable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DynamicPropertyEvaluationRunnable.java index f04685f1611..477dc79fcd5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DynamicPropertyEvaluationRunnable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DynamicPropertyEvaluationRunnable.java @@ -70,6 +70,7 @@ public final class DynamicPropertyEvaluationRunnable extends HibernateDaoSupport // Runnable // + @Override @SuppressWarnings("unchecked") public final void run() { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DynamicPropertyEvaluator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DynamicPropertyEvaluator.java index 20c779119e1..0f39bbb50eb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DynamicPropertyEvaluator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DynamicPropertyEvaluator.java @@ -89,6 +89,7 @@ public class DynamicPropertyEvaluator implements IDynamicPropertyEvaluator return result; } + @Override public <T extends IEntityInformationWithPropertiesHolder> void evaluateProperties(T entity) { if (operationLog.isDebugEnabled()) @@ -149,11 +150,13 @@ public class DynamicPropertyEvaluator implements IDynamicPropertyEvaluator } } + @Override public List<EntityTypePropertyTypePE> getEvaluationPath() { return evaluationPath; } + @Override public String evaluateProperty(IEntityAdaptor entityAdaptor, EntityTypePropertyTypePE etpt) { // TODO 2010-11-22, Piotr Buczek: are values computed by dependent properties thrown away? diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/calculator/AbstractEntityAdaptor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/calculator/AbstractEntityAdaptor.java index 5555a3ea187..be53b6ce395 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/calculator/AbstractEntityAdaptor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/calculator/AbstractEntityAdaptor.java @@ -91,28 +91,33 @@ public class AbstractEntityAdaptor implements IEntityAdaptor propertiesByCode.put(property.propertyTypeCode().toUpperCase(), property); } + @Override public String code() { return code; } + @Override public IEntityPropertyAdaptor property(String propertyTypeCode) { return propertiesByCode.get(propertyTypeCode.toUpperCase()); } + @Override public String propertyValue(String propertyTypeCode) { final IEntityPropertyAdaptor propertyOrNull = property(propertyTypeCode); return propertyOrNull == null ? "" : propertyOrNull.valueAsString(); } + @Override public String propertyRendered(String propertyTypeCode) { final IEntityPropertyAdaptor propertyOrNull = property(propertyTypeCode); return propertyOrNull == null ? "" : propertyOrNull.renderedValue(); } + @Override public Collection<IEntityPropertyAdaptor> properties() { return propertiesByCode.values(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/calculator/BasicPropertyAdaptor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/calculator/BasicPropertyAdaptor.java index da821ce774e..0b7bfb87689 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/calculator/BasicPropertyAdaptor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/calculator/BasicPropertyAdaptor.java @@ -45,16 +45,19 @@ public class BasicPropertyAdaptor implements IEntityPropertyAdaptor this(code, value, null); } + @Override public String propertyTypeCode() { return code; } + @Override public String valueAsString() { return value; } + @Override public String renderedValue() { return valueAsString(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/calculator/DynamicPropertyAdaptor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/calculator/DynamicPropertyAdaptor.java index 314a0e77f96..9da076d5050 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/calculator/DynamicPropertyAdaptor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/calculator/DynamicPropertyAdaptor.java @@ -65,6 +65,7 @@ public class DynamicPropertyAdaptor implements IEntityPropertyAdaptor this.evaluator = evaluator; } + @Override public String valueAsString() { switch (state) @@ -102,11 +103,13 @@ public class DynamicPropertyAdaptor implements IEntityPropertyAdaptor return evaluator.evaluateProperty(entityAdaptor, etpt); } + @Override public String renderedValue() { return valueAsString(); } + @Override public String propertyTypeCode() { return code; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/datasetlister/DataSetLister.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/datasetlister/DataSetLister.java index cb6c9507a61..68471cd1c06 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/datasetlister/DataSetLister.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/datasetlister/DataSetLister.java @@ -63,6 +63,7 @@ public class DataSetLister implements IDataSetLister this.query = query; } + @Override public List<DataSet> getDataSetMetaData(List<String> dataSetCodes, DataSetFetchOptions dataSetFetchOptions) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/experimentlister/ExperimentLister.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/experimentlister/ExperimentLister.java index 12a7430a87b..4bebfe5bf5e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/experimentlister/ExperimentLister.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/experimentlister/ExperimentLister.java @@ -84,6 +84,7 @@ public class ExperimentLister implements IExperimentLister this.query = query; } + @Override public List<Experiment> listExperiments(List<ExperimentIdentifier> experimentIdentifiers, ExperimentFetchOptions experimentFetchOptions) { @@ -111,6 +112,7 @@ public class ExperimentLister implements IExperimentLister return handleResults(iterator, identifiers); } + @Override public List<Experiment> listExperimentsForProjects(List<ProjectIdentifier> projectIdentifiers, ExperimentFetchOptions experimentFetchOptions) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/SampleLister.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/SampleLister.java index 2ca776b0603..624bdd5f6ba 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/SampleLister.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/SampleLister.java @@ -51,6 +51,7 @@ public class SampleLister implements ISampleLister { private static final Comparator<Sample> SAMPLE_COMPARATOR = new Comparator<Sample>() { + @Override public int compare(Sample s1, Sample s2) { return s1.getIdentifier().compareTo(s2.getIdentifier()); @@ -60,6 +61,7 @@ public class SampleLister implements ISampleLister private static final Comparator<SampleRecord> SAMPLE_COMPARATOR2 = new Comparator<SampleRecord>() { + @Override public int compare(SampleRecord s1, SampleRecord s2) { return getIdentifier(s1).compareTo(getIdentifier(s2)); @@ -77,6 +79,7 @@ public class SampleLister implements ISampleLister private static final IKeyExtractor<Long, SampleRecord> ID_EXTRACTOR = new IKeyExtractor<Long, SampleRecord>() { + @Override public Long getKey(SampleRecord s) { return s.s_id; @@ -112,6 +115,7 @@ public class SampleLister implements ISampleLister return relationID; } + @Override public List<Sample> getSamples(Collection<Long> sampleIDs, EnumSet<SampleFetchOption> fetchOptions) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/managed_property/EntityInformationProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/managed_property/EntityInformationProvider.java index 077807f19ba..46bcbff7cb7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/managed_property/EntityInformationProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/managed_property/EntityInformationProvider.java @@ -54,6 +54,7 @@ public class EntityInformationProvider implements IEntityInformationProvider this.daoFactory = daoFactory; } + @Override public String getIdentifier(IEntityLinkElement entityLink) { final EntityKind entityKind = @@ -93,6 +94,7 @@ public class EntityInformationProvider implements IEntityInformationProvider identifierHolderOrNull = new IIdentifierHolder() { + @Override public String getIdentifier() { return new MaterialIdentifier(materialOrNull.getCode(), @@ -119,6 +121,7 @@ public class EntityInformationProvider implements IEntityInformationProvider return space; } + @Override public String getSamplePermId(String spaceCode, String sampleCode) { SpacePE space = tryGetSpaceByCode(spaceCode); @@ -126,6 +129,7 @@ public class EntityInformationProvider implements IEntityInformationProvider return (sample != null) ? sample.getPermId() : null; } + @Override public String getSamplePermId(String sampleIdentifier) { SampleIdentifier identifier = SampleIdentifierFactory.parse(sampleIdentifier); @@ -171,6 +175,7 @@ public class EntityInformationProvider implements IEntityInformationProvider return sample; } + @Override public List<String> getSampleParentPermIds(String spaceCode, String sampleCode) { SpacePE space = tryGetSpaceByCode(spaceCode); @@ -185,11 +190,13 @@ public class EntityInformationProvider implements IEntityInformationProvider return getSamplesPermIds(sample.getParents()); } + @Override public List<String> getSampleParentPermIds(String permId) { return getSamplesPermIds(getSampleByPermId(permId).getParents()); } + @Override public String getSamplePropertyValue(String permId, String propertyCode) { SamplePE sample = getSampleByPermId(permId); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/materiallister/MaterialLister.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/materiallister/MaterialLister.java index 92adbd3ca4b..3667cd416b6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/materiallister/MaterialLister.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/materiallister/MaterialLister.java @@ -109,6 +109,7 @@ public class MaterialLister extends AbstractLister implements IMaterialLister // Listing // + @Override public List<Material> list(ListMaterialCriteria criteria, boolean withProperties) { Long2ObjectMap<Material> materialMap = getMaterialsByCriteria(criteria); @@ -175,6 +176,7 @@ public class MaterialLister extends AbstractLister implements IMaterialLister String[] materialCodes = CollectionUtils.collect(identifiers, new Transformer<MaterialIdentifier, String>() { + @Override public String transform(MaterialIdentifier arg0) { return arg0.getCode(); @@ -295,6 +297,7 @@ public class MaterialLister extends AbstractLister implements IMaterialLister { propertiesEnricher.enrich(resultMap.keySet(), new IEntityPropertiesHolderResolver() { + @Override public Material get(long id) { return resultMap.get(id); @@ -312,6 +315,7 @@ public class MaterialLister extends AbstractLister implements IMaterialLister return map; } + @Override public void enrichWithProperties(List<Material> materials) { setEmptyProperties(materials); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/materiallister/MaterialListerDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/materiallister/MaterialListerDAO.java index a959a07de81..ff63d404a09 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/materiallister/MaterialListerDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/materiallister/MaterialListerDAO.java @@ -89,18 +89,21 @@ public final class MaterialListerDAO extends AbstractDAO { return new IEntityPropertySetListingQuery() { + @Override public Iterable<GenericEntityPropertyRecord> getEntityPropertyGenericValues( LongSet entityIDs) { return query.getEntityPropertyGenericValues(entityIDs); } + @Override public Iterable<MaterialEntityPropertyRecord> getEntityPropertyMaterialValues( LongSet entityIDs) { return query.getEntityPropertyMaterialValues(entityIDs); } + @Override public Iterable<VocabularyTermRecord> getEntityPropertyVocabularyTermValues( LongSet entityIDs) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleLister.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleLister.java index 63ffe527675..b201a674a24 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleLister.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleLister.java @@ -70,16 +70,19 @@ public class SampleLister implements ISampleLister this.referencedEntityDAO = referencedEntityDAO; } + @Override public List<Sample> list(final ListOrSearchSampleCriteria criteria) { return SampleListingWorker.create(criteria, baseIndexURL, dao, referencedEntityDAO).load(); } + @Override public long getRelationshipTypeID(String code) { return SampleListingWorker.getRelationId(dao.getQuery(), code); } + @Override public List<SampleSkeleton> listSampleBy(IValidator<SampleSkeleton> criteria) { DataIterator<SampleRecord> sampleSkeletons = dao.getQuery().getSampleSkeletons(); @@ -100,6 +103,7 @@ public class SampleLister implements ISampleLister return result; } + @Override public List<SampleRelationShipSkeleton> listSampleRelationShipsBy( IValidator<SampleRelationShipSkeleton> criteria) { @@ -120,6 +124,7 @@ public class SampleLister implements ISampleLister return result; } + @Override public Map<Long, Set<Long>> getChildToParentsIdsMap(Collection<Long> childrenIds) { LongOpenHashSet ids = new LongOpenHashSet(); @@ -145,6 +150,7 @@ public class SampleLister implements ISampleLister return map; } + @Override public Map<Long, Set<Long>> getParentToChildrenIdsMap(Collection<Long> parentIds) { LongOpenHashSet ids = new LongOpenHashSet(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListerDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListerDAO.java index c2047f8e230..412c171c699 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListerDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListerDAO.java @@ -88,18 +88,21 @@ public final class SampleListerDAO extends AbstractDAO { return new IEntityPropertySetListingQuery() { + @Override public Iterable<GenericEntityPropertyRecord> getEntityPropertyGenericValues( LongSet entityIDs) { return query.getEntityPropertyGenericValues(entityIDs); } + @Override public Iterable<MaterialEntityPropertyRecord> getEntityPropertyMaterialValues( LongSet entityIDs) { return query.getEntityPropertyMaterialValues(entityIDs); } + @Override public Iterable<VocabularyTermRecord> getEntityPropertyVocabularyTermValues( LongSet entityIDs) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorker.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorker.java index 161b5a5f169..eaf3028846c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorker.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorker.java @@ -275,6 +275,7 @@ final class SampleListingWorker extends AbstractLister samplePropertiesEnricherOrNull.enrich(sampleMap.keySet(), new IEntityPropertiesHolderResolver() { + @Override public Sample get(long id) { return sampleMap.get(id); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/importer/DatabaseInstanceImporter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/importer/DatabaseInstanceImporter.java index 437fc477f61..a63f0d063ca 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/importer/DatabaseInstanceImporter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/importer/DatabaseInstanceImporter.java @@ -128,6 +128,7 @@ public class DatabaseInstanceImporter // IDatabaseDumper // + @Override public final boolean createDatabaseDump(final String dataBaseName, final File dumpFile) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/search/DataSetSearchManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/search/DataSetSearchManager.java index a92f9da3a85..2ba9108c913 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/search/DataSetSearchManager.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/search/DataSetSearchManager.java @@ -46,17 +46,20 @@ public class DataSetSearchManager extends AbstractSearchManager<IDatasetLister> private final IRelationshipHandler CHILDREN_RELATIONSHIP_HANDLER = new IRelationshipHandler() { + @Override public Collection<Long> findRelatedIdsByCriteria(DetailedSearchCriteria criteria, List<DetailedSearchSubCriteria> otherSubCriterias) { return findDataSetIds(criteria, otherSubCriterias); } + @Override public Map<Long, Set<Long>> listIdsToRelatedIds(Collection<Long> dataSetIds) { return lister.listChildrenIds(dataSetIds); } + @Override public Map<Long, Set<Long>> listRelatedIdsToIds(Collection<Long> childrenDataSetIds) { return lister.listParentIds(childrenDataSetIds); @@ -66,17 +69,20 @@ public class DataSetSearchManager extends AbstractSearchManager<IDatasetLister> private final IRelationshipHandler PARENT_RELATIONSHIP_HANDLER = new IRelationshipHandler() { + @Override public Collection<Long> findRelatedIdsByCriteria(DetailedSearchCriteria criteria, List<DetailedSearchSubCriteria> otherSubCriterias) { return findDataSetIds(criteria, otherSubCriterias); } + @Override public Map<Long, Set<Long>> listIdsToRelatedIds(Collection<Long> dataSetIds) { return lister.listParentIds(dataSetIds); } + @Override public Map<Long, Set<Long>> listRelatedIdsToIds(Collection<Long> parentDataSetIds) { return lister.listChildrenIds(parentDataSetIds); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/search/SampleSearchManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/search/SampleSearchManager.java index 2c983e31370..b2199304f55 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/search/SampleSearchManager.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/search/SampleSearchManager.java @@ -47,17 +47,20 @@ public class SampleSearchManager extends AbstractSearchManager<ISampleLister> private final IRelationshipHandler CHILDREN_RELATIONSHIP_HANDLER = new IRelationshipHandler() { + @Override public Collection<Long> findRelatedIdsByCriteria(DetailedSearchCriteria criteria, List<DetailedSearchSubCriteria> otherSubCriterias) { return findSampleIds(criteria, otherSubCriterias); } + @Override public Map<Long, Set<Long>> listIdsToRelatedIds(Collection<Long> sampleIds) { return lister.getParentToChildrenIdsMap(sampleIds); } + @Override public Map<Long, Set<Long>> listRelatedIdsToIds(Collection<Long> childrenSampleIds) { return lister.getChildToParentsIdsMap(childrenSampleIds); @@ -67,17 +70,20 @@ public class SampleSearchManager extends AbstractSearchManager<ISampleLister> private final IRelationshipHandler PARENT_RELATIONSHIP_HANDLER = new IRelationshipHandler() { + @Override public Collection<Long> findRelatedIdsByCriteria(DetailedSearchCriteria criteria, List<DetailedSearchSubCriteria> otherSubCriterias) { return findSampleIds(criteria, otherSubCriterias); } + @Override public Map<Long, Set<Long>> listIdsToRelatedIds(Collection<Long> sampleIds) { return lister.getChildToParentsIdsMap(sampleIds); } + @Override public Map<Long, Set<Long>> listRelatedIdsToIds(Collection<Long> parentSampleIds) { return lister.getParentToChildrenIdsMap(parentSampleIds); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/coreplugin/CorePluginRegistrator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/coreplugin/CorePluginRegistrator.java index 76f0a783587..d1d9ad487f6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/coreplugin/CorePluginRegistrator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/coreplugin/CorePluginRegistrator.java @@ -72,6 +72,7 @@ public class CorePluginRegistrator implements InitializingBean } } + @Override public void afterPropertiesSet() throws Exception { registerPlugins(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/DataStoreServerBasedDataSourceProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/DataStoreServerBasedDataSourceProvider.java index cbeffcd392e..e3e2f099f0c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/DataStoreServerBasedDataSourceProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/DataStoreServerBasedDataSourceProvider.java @@ -58,6 +58,7 @@ public class DataStoreServerBasedDataSourceProvider implements IDataSourceProvid this.daoFactory = daoFactory; } + @Override public void afterPropertiesSet() throws Exception { init(ExtendedProperties.getSubset(configurer.getResolvedProps(), ROOT_KEY + ".", true)); @@ -79,6 +80,7 @@ public class DataStoreServerBasedDataSourceProvider implements IDataSourceProvid } } + @Override public DataSource getDataSourceByDataSetCode(String dataSetCode, String technology) { DataPE dataSet = daoFactory.getDataDAO().tryToFindDataSetByCode(dataSetCode); @@ -89,6 +91,7 @@ public class DataStoreServerBasedDataSourceProvider implements IDataSourceProvid return getDataSourceByDataStoreServerCode(dataSet.getDataStore().getCode(), technology); } + @Override public DataSource getDataSourceByDataStoreServerCode(String dssCode, String technology) { DataSource dataSource = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/DynamicPropertyEvaluationScheduler.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/DynamicPropertyEvaluationScheduler.java index 2280152065a..883d646ca59 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/DynamicPropertyEvaluationScheduler.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/DynamicPropertyEvaluationScheduler.java @@ -96,6 +96,7 @@ public final class DynamicPropertyEvaluationScheduler implements return new File(DYNAMIC_PROPERTY_EVALUATOR_QUEUE_FILENAME); } + @Override public void clear() { evaluatorQueue.clear(); @@ -105,6 +106,7 @@ public final class DynamicPropertyEvaluationScheduler implements } } + @Override public void scheduleUpdate(DynamicPropertyEvaluationOperation operation) { threadDebugLog("Scheduling update: " + operation); @@ -112,6 +114,7 @@ public final class DynamicPropertyEvaluationScheduler implements threadOperations.add(operation); } + @Override public void synchronizeThreadQueue() { List<DynamicPropertyEvaluationOperation> threadOperations = getThreadOperations(); @@ -129,6 +132,7 @@ public final class DynamicPropertyEvaluationScheduler implements } } + @Override public void clearThreadQueue() { threadDebugLog("Clearing scheduled operations"); @@ -145,11 +149,13 @@ public final class DynamicPropertyEvaluationScheduler implements } } + @Override public DynamicPropertyEvaluationOperation peekWait() throws InterruptedException { return evaluatorQueue.peekWait(); } + @Override public DynamicPropertyEvaluationOperation take() throws InterruptedException { return evaluatorQueue.take(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IDAOFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IDAOFactory.java index 1cbac222b2f..63403c349b5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IDAOFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IDAOFactory.java @@ -101,6 +101,7 @@ public interface IDAOFactory extends IAuthorizationDAOFactory public IAuthorizationGroupDAO getAuthorizationGroupDAO(); /** Returns an implementation of {@link IDeletionDAO}. */ + @Override public IDeletionDAO getDeletionDAO(); /** Returns an implementation of {@link ICorePluginDAO}. */ diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IVocabularyTermDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IVocabularyTermDAO.java index 534dec9359b..0cd0a522123 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IVocabularyTermDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IVocabularyTermDAO.java @@ -27,6 +27,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.VocabularyTermPE; public interface IVocabularyTermDAO extends IGenericDAO<VocabularyTermPE> { + @Override void validate(final VocabularyTermPE term); /** diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/PropertyValidator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/PropertyValidator.java index 71d1f260d80..11636cb4565 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/PropertyValidator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/PropertyValidator.java @@ -58,6 +58,7 @@ public final class PropertyValidator implements IPropertyValueValidator return map; } + @Override public final String validatePropertyValue(final PropertyTypePE propertyType, final String value) throws UserFailureException { @@ -127,6 +128,7 @@ public final class PropertyValidator implements IPropertyValueValidator // IDataTypeValidator // + @Override public final String validate(final String value) throws UserFailureException { assert value != null : "Unspecified value."; @@ -164,6 +166,7 @@ public final class PropertyValidator implements IPropertyValueValidator // IToStringConverter // + @Override public final String toString(final VocabularyTermPE term) { return term.getCode(); @@ -192,6 +195,7 @@ public final class PropertyValidator implements IPropertyValueValidator // IDataTypeValidator // + @Override public final String validate(final String value) throws UserFailureException { assert value != null : "Unspecified value."; @@ -249,6 +253,7 @@ public final class PropertyValidator implements IPropertyValueValidator // IDataTypeValidator // + @Override public final String validate(final String value) throws UserFailureException { assert value != null : "Unspecified value."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractDAO.java index cea86230d9a..0318755885a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractDAO.java @@ -82,14 +82,14 @@ public abstract class AbstractDAO extends HibernateDaoSupport } /* - private static Map<Class<?>, ClassValidator<?>> validators = - new HashMap<Class<?>, ClassValidator<?>>(); - */ + * private static Map<Class<?>, ClassValidator<?>> validators = + * new HashMap<Class<?>, ClassValidator<?>>(); + */ /** - * Validates given <i>Persistence Entity</i> using an appropriate {@link ClassValidator}. + * Validates given <i>Persistence Entity</i> using an appropriate {@link Validator}. */ @SuppressWarnings( - { "unchecked", "rawtypes" }) + { "rawtypes" }) protected final static <E> void validatePE(final E pe) throws DataIntegrityViolationException { @@ -215,6 +215,7 @@ public abstract class AbstractDAO extends HibernateDaoSupport // HibernateCallback // + @Override public final Object doInHibernate(final Session session) throws HibernateException, SQLException { @@ -259,6 +260,7 @@ public abstract class AbstractDAO extends HibernateDaoSupport // HibernateCallback // + @Override public final Object doInHibernate(final Session session) { return session.createSQLQuery(String.format(sql, parameters)).uniqueResult(); @@ -275,6 +277,7 @@ public abstract class AbstractDAO extends HibernateDaoSupport { final Object result = getHibernateTemplate().execute(new HibernateCallback() { + @Override public Object doInHibernate(Session sess) throws HibernateException, SQLException { SQLQuery sqlQuery = @@ -301,6 +304,7 @@ public abstract class AbstractDAO extends HibernateDaoSupport return getHibernateTemplate().execute(new HibernateCallback() { + @Override public final Object doInHibernate(final Session session) throws HibernateException, SQLException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractGenericEntityDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractGenericEntityDAO.java index 3063b7767a8..1915cc3eda3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractGenericEntityDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractGenericEntityDAO.java @@ -61,6 +61,7 @@ public abstract class AbstractGenericEntityDAO<T extends IIdHolder> extends Abst return entityClass; } + @Override public final T getByTechId(final TechId techId) throws DataAccessException { assert techId != null : "Technical identifier unspecified."; @@ -97,6 +98,7 @@ public abstract class AbstractGenericEntityDAO<T extends IIdHolder> extends Abst // TODO 2009-05-22, Tomasz Pylak: remove connections, it forces BOs to use strings with field // paths + @Override public final T tryGetByTechId(final TechId techId, String... connections) throws DataAccessException { @@ -116,6 +118,7 @@ public abstract class AbstractGenericEntityDAO<T extends IIdHolder> extends Abst return result; } + @Override public void validateAndSaveUpdatedEntity(T entity) throws DataAccessException { assert entity != null : "entity is null"; @@ -130,6 +133,7 @@ public abstract class AbstractGenericEntityDAO<T extends IIdHolder> extends Abst flushWithSqlExceptionHandling(getHibernateTemplate()); } + @Override public final void validate(T entity) { assert entity != null : "entity is null"; @@ -153,6 +157,7 @@ public abstract class AbstractGenericEntityDAO<T extends IIdHolder> extends Abst getHibernateTemplate().flush(); } + @Override public void persist(T entity) { assert entity != null : "entity unspecified"; @@ -170,6 +175,7 @@ public abstract class AbstractGenericEntityDAO<T extends IIdHolder> extends Abst } } + @Override public void delete(T entity) throws DataAccessException { assert entity != null : "entity unspecified"; @@ -185,6 +191,7 @@ public abstract class AbstractGenericEntityDAO<T extends IIdHolder> extends Abst } } + @Override public List<T> listAllEntities() throws DataAccessException { return cast(getHibernateTemplate().loadAll(getEntityClass())); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractGenericEntityWithPropertiesDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractGenericEntityWithPropertiesDAO.java index 1f253fe3a2a..1d22f50c263 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractGenericEntityWithPropertiesDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractGenericEntityWithPropertiesDAO.java @@ -175,21 +175,25 @@ public abstract class AbstractGenericEntityWithPropertiesDAO<T extends IEntityIn this.sqlInsertEvent = sqlInsertEvent; } + @Override public List<Long> getAllEntities() { return allEntityIds; } + @Override public String getEntityName() { return entityType.name(); } + @Override public String getOperationName() { return "permanently deleting"; } + @Override public void execute(final List<Long> batchEntityIds) { executeStatelessAction(createPermanentDeleteAction(batchEntityIds)); @@ -210,6 +214,7 @@ public abstract class AbstractGenericEntityWithPropertiesDAO<T extends IEntityIn this.entityIdsToDelete = entityIdsToDelete; } + @Override public Object doInStatelessSession(StatelessSession session) { final SQLQuery sqlQuerySelectPermIds = session.createSQLQuery(sqlSelectPermIds); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractSQLArray.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractSQLArray.java index 9dcc292067d..5b5dae8f3ae 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractSQLArray.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractSQLArray.java @@ -38,6 +38,7 @@ abstract class AbstractSQLArray implements Array /** * @throws UnsupportedOperationException */ + @Override public Object getArray(Map<String, Class<?>> map) throws SQLException, UnsupportedOperationException { @@ -47,6 +48,7 @@ abstract class AbstractSQLArray implements Array /** * @throws UnsupportedOperationException */ + @Override public Object getArray(long index, int count) throws SQLException, UnsupportedOperationException { @@ -56,6 +58,7 @@ abstract class AbstractSQLArray implements Array /** * @throws UnsupportedOperationException */ + @Override public Object getArray(long index, int count, Map<String, Class<?>> map) throws SQLException, UnsupportedOperationException { @@ -65,6 +68,7 @@ abstract class AbstractSQLArray implements Array /** * @throws UnsupportedOperationException */ + @Override public ResultSet getResultSet() throws SQLException, UnsupportedOperationException { throw new UnsupportedOperationException(); @@ -73,6 +77,7 @@ abstract class AbstractSQLArray implements Array /** * @throws UnsupportedOperationException */ + @Override public ResultSet getResultSet(Map<String, Class<?>> map) throws SQLException, UnsupportedOperationException { @@ -82,6 +87,7 @@ abstract class AbstractSQLArray implements Array /** * @throws UnsupportedOperationException */ + @Override public ResultSet getResultSet(long index, int count) throws SQLException, UnsupportedOperationException { @@ -91,6 +97,7 @@ abstract class AbstractSQLArray implements Array /** * @throws UnsupportedOperationException */ + @Override public ResultSet getResultSet(long index, int count, Map<String, Class<?>> map) throws SQLException, UnsupportedOperationException { @@ -100,6 +107,7 @@ abstract class AbstractSQLArray implements Array /** * @throws UnsupportedOperationException */ + @Override public void free() throws SQLException { throw new UnsupportedOperationException(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AttachmentDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AttachmentDAO.java index 6971255d58e..2680ff5b42a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AttachmentDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AttachmentDAO.java @@ -74,6 +74,7 @@ final class AttachmentDAO extends AbstractGenericEntityDAO<AttachmentPE> impleme // IAttachmentDAO // + @Override public final void createAttachment(final AttachmentPE attachment, final AttachmentHolderPE owner) throws DataAccessException { @@ -116,6 +117,7 @@ final class AttachmentDAO extends AbstractGenericEntityDAO<AttachmentPE> impleme attachment.setVersion(previousVersion + 1); } + @Override public final List<AttachmentPE> listAttachments(final AttachmentHolderPE owner) throws DataAccessException { @@ -132,6 +134,7 @@ final class AttachmentDAO extends AbstractGenericEntityDAO<AttachmentPE> impleme return result; } + @Override public final AttachmentPE tryFindAttachmentByOwnerAndFileName(final AttachmentHolderPE owner, final String fileName) throws DataAccessException { @@ -154,6 +157,7 @@ final class AttachmentDAO extends AbstractGenericEntityDAO<AttachmentPE> impleme return attachment; } + @Override public final AttachmentPE tryFindAttachmentByOwnerAndFileNameAndVersion( final AttachmentHolderPE owner, final String fileName, final int version) throws DataAccessException @@ -178,6 +182,7 @@ final class AttachmentDAO extends AbstractGenericEntityDAO<AttachmentPE> impleme return attachment; } + @Override public int deleteByOwnerAndFileName(final AttachmentHolderPE owner, final String fileName) throws DataAccessException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AuthorizationDAOFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AuthorizationDAOFactory.java index 98f116c69b3..2b5e07946ac 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AuthorizationDAOFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AuthorizationDAOFactory.java @@ -112,11 +112,13 @@ public class AuthorizationDAOFactory implements IAuthorizationDAOFactory deletionDAO = new DeletionDAO(sessionFactory, homeDatabaseInstance, persistencyResources); } + @Override public final PersistencyResources getPersistencyResources() { return persistencyResources; } + @Override public SessionFactory getSessionFactory() { return persistencyResources.getSessionFactoryOrNull(); @@ -181,71 +183,85 @@ public class AuthorizationDAOFactory implements IAuthorizationDAOFactory // IAuthorizationDAOFactory // + @Override public final DatabaseInstancePE getHomeDatabaseInstance() { return homeDatabaseInstance; } + @Override public final IDatabaseInstanceDAO getDatabaseInstanceDAO() { return databaseInstancesDAO; } + @Override public final ISpaceDAO getSpaceDAO() { return groupDAO; } + @Override public final IPersonDAO getPersonDAO() { return personDAO; } + @Override public final IRoleAssignmentDAO getRoleAssignmentDAO() { return roleAssignmentDAO; } + @Override public final IDataDAO getDataDAO() { return dataDAO; } + @Override public final IExperimentDAO getExperimentDAO() { return experimentDAO; } + @Override public final IProjectDAO getProjectDAO() { return projectDAO; } + @Override public final ISampleDAO getSampleDAO() { return sampleDAO; } + @Override public IGridCustomFilterDAO getGridCustomFilterDAO() { return gridCustomFilterDAO; } + @Override public IGridCustomColumnDAO getGridCustomColumnDAO() { return gridCustomColumnDAO; } + @Override public IQueryDAO getQueryDAO() { return queryDAO; } + @Override public IRelationshipTypeDAO getRelationshipTypeDAO() { return relationshipTypeDAO; } + @Override public IDeletionDAO getDeletionDAO() { return deletionDAO; @@ -256,6 +272,7 @@ public class AuthorizationDAOFactory implements IAuthorizationDAOFactory * * @see HibernateUtils#setBatchUpdateMode(org.hibernate.Session, boolean) */ + @Override public void setBatchUpdateMode(boolean batchMode) { SessionFactory sessionFactory = persistencyResources.getSessionFactoryOrNull(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AuthorizationGroupDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AuthorizationGroupDAO.java index 95285608d15..b426d1638cd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AuthorizationGroupDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AuthorizationGroupDAO.java @@ -53,6 +53,7 @@ public class AuthorizationGroupDAO extends AbstractGenericEntityDAO<Authorizatio super(sessionFactory, databaseInstance, ENTITY_CLASS); } + @Override public List<AuthorizationGroupPE> list() { final List<AuthorizationGroupPE> list = @@ -67,6 +68,7 @@ public class AuthorizationGroupDAO extends AbstractGenericEntityDAO<Authorizatio return list; } + @Override public void create(AuthorizationGroupPE authorizationGroup) { assert authorizationGroup != null : "Missing authorization group."; @@ -82,6 +84,7 @@ public class AuthorizationGroupDAO extends AbstractGenericEntityDAO<Authorizatio } } + @Override public AuthorizationGroupPE tryFindByCode(String code) { final Criteria criteria = getSession().createCriteria(ENTITY_CLASS); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ByteArrayMapper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ByteArrayMapper.java index 58d2cda9e9a..d5bdf9a91a8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ByteArrayMapper.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ByteArrayMapper.java @@ -30,11 +30,13 @@ import net.lemnik.eodsql.TypeMapper; */ public class ByteArrayMapper implements TypeMapper<byte[]> { + @Override public byte[] get(ResultSet results, int column) throws SQLException { return results.getBytes(column); } + @Override public void set(PreparedStatement statement, int column, byte[] obj) throws SQLException { if (obj != null) @@ -46,6 +48,7 @@ public class ByteArrayMapper implements TypeMapper<byte[]> } } + @Override public void set(ResultSet results, int column, byte[] obj) throws SQLException { results.updateBytes(column, obj); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/CodeSequenceDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/CodeSequenceDAO.java index 5350bfe6aec..6bbefd128d3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/CodeSequenceDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/CodeSequenceDAO.java @@ -35,6 +35,7 @@ public class CodeSequenceDAO extends AbstractDAO implements ICodeSequenceDAO super(sessionFactory, databaseInstance); } + @Override public long getNextCodeSequenceId() { return getNextSequenceId(SequenceNames.CODE_SEQUENCE); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/CorePluginDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/CorePluginDAO.java index cff5428cfe8..d830252a5e6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/CorePluginDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/CorePluginDAO.java @@ -21,7 +21,7 @@ import java.util.List; import org.apache.log4j.Logger; import org.hibernate.Criteria; import org.hibernate.SessionFactory; -import org.hibernate.criterion.DetachedCriteria; +import org.hibernate.criterion.CriteriaSpecification; import org.hibernate.criterion.Restrictions; import org.springframework.orm.hibernate3.HibernateTemplate; @@ -59,6 +59,7 @@ public class CorePluginDAO extends AbstractDAO implements ICorePluginDAO } } + @Override public void createCorePlugins(List<CorePluginPE> corePlugins) { HibernateTemplate template = getHibernateTemplate(); @@ -66,11 +67,12 @@ public class CorePluginDAO extends AbstractDAO implements ICorePluginDAO template.flush(); } + @Override public List<CorePluginPE> listCorePluginsByName(String name) { final Criteria criteria = getSession().createCriteria(ENTITY_CLASS); criteria.add(Restrictions.eq("name", name)); - criteria.setResultTransformer(DetachedCriteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); return cast(criteria.list()); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DAOFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DAOFactory.java index 42ba37ac55f..73b2764820e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DAOFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DAOFactory.java @@ -159,96 +159,115 @@ public final class DAOFactory extends AuthorizationDAOFactory implements IDAOFac // IDAOFactory // + @Override public final ISampleTypeDAO getSampleTypeDAO() { return sampleTypeDAO; } + @Override public final IHibernateSearchDAO getHibernateSearchDAO() { return hibernateSearchDAO; } + @Override public IEntityPropertyTypeDAO getEntityPropertyTypeDAO(final EntityKind entityKind) { return entityPropertyTypeDAOs.get(entityKind); } + @Override public IEntityPropertyHistoryDAO getEntityPropertyHistoryDAO() { return entityPropertyHistoryDAO; } + @Override public IEntityTypeDAO getEntityTypeDAO(final EntityKind entityKind) { return entityTypeDAOs.get(entityKind); } + @Override public IPropertyTypeDAO getPropertyTypeDAO() { return propertyTypeDAO; } + @Override public final IVocabularyDAO getVocabularyDAO() { return vocabularyDAO; } + @Override public final IVocabularyTermDAO getVocabularyTermDAO() { return vocabularyTermDAO; } + @Override public final IAttachmentDAO getAttachmentDAO() { return attachmentDAO; } + @Override public IDataSetTypeDAO getDataSetTypeDAO() { return dataSetTypeDAO; } + @Override public IFileFormatTypeDAO getFileFormatTypeDAO() { return fileFormatTypeDAO; } + @Override public ILocatorTypeDAO getLocatorTypeDAO() { return locatorTypeDAO; } + @Override public IMaterialDAO getMaterialDAO() { return materialDAO; } + @Override public ICodeSequenceDAO getCodeSequenceDAO() { return codeSequenceDAO; } + @Override public IDataStoreDAO getDataStoreDAO() { return dataStoreDAO; } + @Override public IPermIdDAO getPermIdDAO() { return permIdDAO; } + @Override public IEventDAO getEventDAO() { return eventDAO; } + @Override public IAuthorizationGroupDAO getAuthorizationGroupDAO() { return authorizationGroupDAO; } + @Override public IScriptDAO getScriptDAO() { return scriptDAO; @@ -264,16 +283,19 @@ public final class DAOFactory extends AuthorizationDAOFactory implements IDAOFac return fullTextIndexUpdateScheduler; } + @Override public ICorePluginDAO getCorePluginDAO() { return corePluginDAO; } + @Override public IPostRegistrationDAO getPostRegistrationDAO() { return postRegistrationDAO; } + @Override public IEntityOperationsLogDAO getEntityOperationsLogDAO() { return entityOperationsLogDAO; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DAOUtils.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DAOUtils.java index 759a5aba074..aa1bcaabd17 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DAOUtils.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DAOUtils.java @@ -21,6 +21,7 @@ import java.util.Collection; import java.util.List; import org.hibernate.Criteria; +import org.hibernate.criterion.CriteriaSpecification; import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Projections; import org.hibernate.criterion.Restrictions; @@ -53,7 +54,7 @@ final class DAOUtils ((Number) criteria.setProjection(Projections.rowCount()).uniqueResult()).intValue(); // Undo the rowCount projection criteria.setProjection(null); - criteria.setResultTransformer(Criteria.ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.ROOT_ENTITY); return count; } @@ -71,6 +72,7 @@ final class DAOUtils { return listByCollection(hibernateTemplate, new IDetachedCriteriaFactory() { + @Override public DetachedCriteria createCriteria() { return DetachedCriteria.forClass(entityClass); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataDAO.java index 4e8514906b1..37bda86aca9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataDAO.java @@ -33,6 +33,7 @@ import org.hibernate.HibernateException; import org.hibernate.SQLQuery; import org.hibernate.Session; import org.hibernate.StatelessSession; +import org.hibernate.criterion.CriteriaSpecification; import org.hibernate.criterion.Criterion; import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Projections; @@ -105,6 +106,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple // IExternalDataDAO // + @Override public boolean hasDataSet(SamplePE sample) throws DataAccessException { final DetachedCriteria criteria = DetachedCriteria.forClass(ExternalDataPE.class); @@ -115,6 +117,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return count > 0; } + @Override public final List<DataPE> listRelatedDataSets(final List<IEntityInformationHolder> entities, EntityKind entityKind) throws DataAccessException { @@ -139,6 +142,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple final List<DataPE> results = new ArrayList<DataPE>(); BatchOperationExecutor.executeInBatches(new IBatchOperation<Long>() { + @Override public void execute(List<Long> entityIds) { @@ -147,16 +151,19 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple results.addAll(list); } + @Override public List<Long> getAllEntities() { return ids; } + @Override public String getEntityName() { return "dataSet"; } + @Override public String getOperationName() { return "listRelatedDataSets"; @@ -172,6 +179,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return results; } + @Override public final List<DataPE> listDataSets(final SamplePE sample) throws DataAccessException { assert sample != null : "Unspecified sample."; @@ -193,6 +201,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return list; } + @Override public final List<DataPE> listExternalData(final DataStorePE dataStore) throws DataAccessException { @@ -208,6 +217,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return list; } + @Override public final List<DataPE> listDataSets(final ExperimentPE experiment) throws DataAccessException { @@ -239,6 +249,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple list.addAll(set); } + @Override public DataPE tryToFindDataSetByCode(String dataSetCode) { assert dataSetCode != null : "Unspecified data set code."; @@ -250,7 +261,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple criteria.add(codeEq); criteria.setFetchMode("dataSetType", FetchMode.JOIN); criteria.setFetchMode("dataStore", FetchMode.JOIN); - criteria.setResultTransformer(DetachedCriteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); final List<DataPE> list = cast(getHibernateTemplate().findByCriteria(criteria)); final DataPE entity = tryFindEntity(list, "data set"); @@ -262,6 +273,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return entity; } + @Override public List<DeletedDataPE> tryToFindDeletedDataSetsByCodes(Collection<String> dataSetCodes) { assert dataSetCodes != null : "Unspecified collection"; @@ -274,12 +286,13 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple final List<DeletedDataPE> list = DAOUtils.listByCollection(getHibernateTemplate(), new IDetachedCriteriaFactory() { + @Override public DetachedCriteria createCriteria() { final DetachedCriteria criteria = DetachedCriteria.forClass(DeletedDataPE.class); criteria.setFetchMode("dataStore", FetchMode.SELECT); - criteria.setResultTransformer(DetachedCriteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); return criteria; } }, "code", dataSetCodes); @@ -292,12 +305,14 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return list; } + @Override public List<DataPE> tryToFindFullDataSetsByIds(Collection<Long> ids, boolean withPropertyTypes, boolean lockForUpdate) { return tryToFindFullDataSets("id", ids, withPropertyTypes, lockForUpdate); } + @Override public List<DataPE> tryToFindFullDataSetsByCodes(Collection<String> dataSetCodes, boolean withPropertyTypes, boolean lockForUpdate) { @@ -349,6 +364,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple final List<DataPE> list = DAOUtils.listByCollection(getHibernateTemplate(), new IDetachedCriteriaFactory() { + @Override public DetachedCriteria createCriteria() { final DetachedCriteria criteria = @@ -364,7 +380,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple "dataSetType.dataSetTypePropertyTypesInternal", FetchMode.JOIN); } - criteria.setResultTransformer(DetachedCriteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); /** * lockForUpdate parameter is ignored. See LMS-2882 details @@ -384,6 +400,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return list; } + @Override public DataPE tryToFindFullDataSetByCode(String dataSetCode, boolean withPropertyTypes, boolean lockForUpdate) { @@ -403,7 +420,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple { criteria.setFetchMode("dataSetType.dataSetTypePropertyTypesInternal", FetchMode.JOIN); } - criteria.setResultTransformer(DetachedCriteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); /** * lockForUpdate parameter is ignored. See LMS-2882 details @@ -422,6 +439,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return entity; } + @Override public void updateDataSetStatuses(final List<String> dataSetCodes, final DataSetArchivingStatus status) { @@ -456,6 +474,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple // HibernateCallback // + @Override public final Object doInHibernate(final Session session) throws HibernateException, SQLException { @@ -483,6 +502,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple // HibernateCallback // + @Override public final Object doInHibernate(final Session session) throws HibernateException, SQLException { @@ -508,6 +528,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple } } + @Override public void updateDataSetStatuses(final List<String> dataSetCodes, final DataSetArchivingStatus status, final boolean presentInArchive) { @@ -542,6 +563,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple // HibernateCallback // + @Override public final Object doInHibernate(final Session session) throws HibernateException, SQLException { @@ -571,6 +593,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple // HibernateCallback // + @Override public final Object doInHibernate(final Session session) throws HibernateException, SQLException { @@ -601,6 +624,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple } } + @Override public void createDataSet(DataPE dataset, PersonPE modifier) { assert dataset != null : "Unspecified data set."; @@ -623,6 +647,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple } } + @Override public void updateDataSet(DataPE data, PersonPE modifier) { assert data != null : "Given external data can not be null."; @@ -698,6 +723,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple super.delete(entity); } + @Override public void delete(final List<TechId> dataIds, final PersonPE registrator, final String reason) throws DataAccessException { @@ -823,21 +849,25 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple this.additionalQueries = additionalQueries; } + @Override public List<Long> getAllEntities() { return allEntityIds; } + @Override public String getEntityName() { return entityType.name(); } + @Override public String getOperationName() { return "permanently deleting"; } + @Override public void execute(final List<Long> batchEntityIds) { executeStatelessAction(createPermanentDeleteAction(batchEntityIds)); @@ -858,6 +888,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple this.entityIdsToDelete = entityIdsToDelete; } + @Override public Object doInStatelessSession(StatelessSession session) { final SQLQuery sqlQuerySelectPermIds = session.createSQLQuery(sqlSelectPermIds); @@ -904,6 +935,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple { private static final long serialVersionUID = 1L; + @Override public Object transformTuple(Object[] values, String[] aliases) { DeletedDataSetLocation location = new DeletedDataSetLocation(); @@ -913,6 +945,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return location; } + @Override public List transformList(List list) { return list; @@ -958,6 +991,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple IToStringConverter<Object> delegatee = ToStringDefaultConverter .getInstance(); + @Override public String toString(Object value) { return value == null ? "" : delegatee.toString(value); @@ -978,6 +1012,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple } + @Override @SuppressWarnings("unchecked") public Set<TechId> findParentIds(final Collection<TechId> dataSetIds) { @@ -996,6 +1031,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple // HibernateCallback // + @Override public final Object doInHibernate(final Session session) { // we could remove this transformation if we choose to pass Long values @@ -1009,6 +1045,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple // data set relationship helper methods + @Override public List<DataPE> listByCode(Set<String> values) { if (values == null || values.isEmpty()) @@ -1024,6 +1061,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return list; } + @Override public void updateDataSets(List<DataPE> dataSets, PersonPE modifier) { assert dataSets != null : "Data sets not defined"; @@ -1056,12 +1094,14 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple scheduleDynamicPropertiesEvaluation(Arrays.asList(entity)); } + @Override public List<TechId> listDataSetIdsBySampleIds(final Collection<TechId> samples) { final List<Long> longIds = TechId.asLongs(samples); final List<Long> results = DAOUtils.listByCollection(getHibernateTemplate(), new IDetachedCriteriaFactory() { + @Override public DetachedCriteria createCriteria() { final DetachedCriteria criteria = @@ -1079,12 +1119,14 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return transformNumbers2TechIdList(results); } + @Override public List<TechId> listDataSetIdsByExperimentIds(final Collection<TechId> experiments) { final List<Long> longIds = TechId.asLongs(experiments); final List<Long> results = DAOUtils.listByCollection(getHibernateTemplate(), new IDetachedCriteriaFactory() { + @Override public DetachedCriteria createCriteria() { final DetachedCriteria criteria = @@ -1107,6 +1149,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return operationLog; } + @Override public List<TechId> listContainedDataSets(Collection<TechId> containerIds) { @@ -1116,12 +1159,14 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple BatchOperationExecutor.executeInBatches(new IBatchOperation<Long>() { + @Override public void execute(List<Long> batchIds) { List<Long> result = DAOUtils.listByCollection(getHibernateTemplate(), new IDetachedCriteriaFactory() { + @Override public DetachedCriteria createCriteria() { final DetachedCriteria criteria = @@ -1133,16 +1178,19 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple totalResults.addAll(result); } + @Override public List<Long> getAllEntities() { return longIds; } + @Override public String getEntityName() { return "dataSet"; } + @Override public String getOperationName() { return "listContainedDataSets"; @@ -1158,6 +1206,7 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple return transformNumbers2TechIdList(totalResults); } + @Override public List<TechId> listContainedDataSetsRecursively(Collection<TechId> containersIds) { LinkedHashSet<TechId> allIds = new LinkedHashSet<TechId>(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataSetTypeDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataSetTypeDAO.java index 40df6d96849..bed2eacae72 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataSetTypeDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataSetTypeDAO.java @@ -35,6 +35,7 @@ public class DataSetTypeDAO extends AbstractTypeDAO<DataSetTypePE> implements ID super(sessionFactory, databaseInstance, DataSetTypePE.class); } + @Override public DataSetTypePE tryToFindDataSetTypeByCode(String code) { return tryFindTypeByCode(code); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataStoreDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataStoreDAO.java index dad44e61110..80b3947f437 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataStoreDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataStoreDAO.java @@ -22,7 +22,7 @@ import org.apache.log4j.Logger; import org.hibernate.Criteria; import org.hibernate.FetchMode; import org.hibernate.SessionFactory; -import org.hibernate.criterion.DetachedCriteria; +import org.hibernate.criterion.CriteriaSpecification; import org.hibernate.criterion.Restrictions; import org.springframework.orm.hibernate3.HibernateTemplate; @@ -50,6 +50,7 @@ public class DataStoreDAO extends AbstractDAO implements IDataStoreDAO super(sessionFactory, databaseInstance); } + @Override public void createOrUpdateDataStore(DataStorePE dataStore) { assert dataStore != null : "Unspecified data store"; @@ -65,6 +66,7 @@ public class DataStoreDAO extends AbstractDAO implements IDataStoreDAO } } + @Override public DataStorePE tryToFindDataStoreByCode(String dataStoreCode) { assert dataStoreCode != null : "Unspecified data store code."; @@ -74,12 +76,13 @@ public class DataStoreDAO extends AbstractDAO implements IDataStoreDAO return (DataStorePE) criteria.uniqueResult(); } + @Override public List<DataStorePE> listDataStores() { final Criteria criteria = getSession().createCriteria(ENTITY_CLASS); criteria.add(Restrictions.eq("databaseInstance", getDatabaseInstance())); criteria.setFetchMode("servicesInternal", FetchMode.JOIN); - criteria.setResultTransformer(DetachedCriteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); final List<DataStorePE> list = cast(criteria.list()); if (operationLog.isDebugEnabled()) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DatabaseInstanceDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DatabaseInstanceDAO.java index e1c2def52f0..ec01d4e70bb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DatabaseInstanceDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DatabaseInstanceDAO.java @@ -93,6 +93,7 @@ final class DatabaseInstanceDAO extends AbstractGenericEntityDAO<DatabaseInstanc // IDatabaseInstancesDAO // + @Override public final DatabaseInstancePE getHomeInstance() throws DataAccessException { final List<DatabaseInstancePE> list = @@ -102,18 +103,21 @@ final class DatabaseInstanceDAO extends AbstractGenericEntityDAO<DatabaseInstanc return getEntity(list); } + @Override public final DatabaseInstancePE tryFindDatabaseInstanceByUUID(final String databaseInstanceUUID) throws DataAccessException { return tryFindDatabaseInstanceByCode(databaseInstanceUUID, true); } + @Override public final DatabaseInstancePE tryFindDatabaseInstanceByCode(final String databaseInstanceCode) throws DataAccessException { return tryFindDatabaseInstanceByCode(databaseInstanceCode, false); } + @Override public final void updateDatabaseInstancePE(final DatabaseInstancePE databaseInstancePE) throws DataAccessException { @@ -131,6 +135,7 @@ final class DatabaseInstanceDAO extends AbstractGenericEntityDAO<DatabaseInstanc } } + @Override public final List<DatabaseInstancePE> listDatabaseInstances() { final List<DatabaseInstancePE> list = cast(getHibernateTemplate().loadAll(ENTITY_CLASS)); @@ -143,6 +148,7 @@ final class DatabaseInstanceDAO extends AbstractGenericEntityDAO<DatabaseInstanc } + @Override public final DatabaseInstancePE getDatabaseInstanceById(final long databaseInstanceId) throws DataAccessException { @@ -156,6 +162,7 @@ final class DatabaseInstanceDAO extends AbstractGenericEntityDAO<DatabaseInstanc return databaseInstance; } + @Override public final void createDatabaseInstance(final DatabaseInstancePE databaseInstance) throws DataAccessException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DeletionDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DeletionDAO.java index 484b0fef0f7..36b61018c85 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DeletionDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DeletionDAO.java @@ -87,6 +87,7 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements // IDeletionDAO // + @Override public final void create(final DeletionPE deletion) throws DataAccessException { assert deletion != null : "Unspecified deletion"; @@ -101,6 +102,7 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements } } + @Override public void revert(DeletionPE deletion) throws DataAccessException { operationLog.info(String.format("REVERT: deletion %s.", deletion)); @@ -148,6 +150,7 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements int updatedRows = (Integer) executeStatelessAction(new StatelessHibernateCallback() { + @Override public Object doInStatelessSession(StatelessSession session) { String query = @@ -187,6 +190,7 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements int updatedRows = (Integer) executeStatelessAction(new StatelessHibernateCallback() { + @Override public Object doInStatelessSession(StatelessSession session) { String query = @@ -201,28 +205,33 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements operationLog.info(String.format("%s %s(s) reverted", updatedRows, tableName)); } + @Override public List<TechId> findTrashedSampleIds(final List<TechId> deletionIds) { return findTrashedEntityIds(deletionIds, EntityKind.SAMPLE); } + @Override public List<TechId> findTrashedNonComponentSampleIds(final List<TechId> deletionIds) { return findTrashedEntityIds(deletionIds, EntityKind.SAMPLE, Restrictions.isNull(CONTAINER_ID)); } + @Override public List<TechId> findTrashedComponentSampleIds(final List<TechId> deletionIds) { return findTrashedEntityIds(deletionIds, EntityKind.SAMPLE, Restrictions.isNotNull(CONTAINER_ID)); } + @Override public List<TechId> findTrashedExperimentIds(final List<TechId> deletionIds) { return findTrashedEntityIds(deletionIds, EntityKind.EXPERIMENT); } + @Override public List<String> findTrashedDataSetCodes(final List<TechId> deletionIds) { if (deletionIds.isEmpty()) @@ -233,6 +242,7 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements final List<String> results = DAOUtils.listByCollection(getHibernateTemplate(), new IDetachedCriteriaFactory() { + @Override public DetachedCriteria createCriteria() { final DetachedCriteria criteria = @@ -259,6 +269,7 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements final List<Long> results = DAOUtils.listByCollection(getHibernateTemplate(), new IDetachedCriteriaFactory() { + @Override public DetachedCriteria createCriteria() { final DetachedCriteria criteria = @@ -277,6 +288,7 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements return transformNumbers2TechIdList(results); } + @Override public int trash(final EntityKind entityKind, final List<TechId> entityIds, final DeletionPE deletion) throws DataAccessException { @@ -292,6 +304,7 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements // HibernateCallback // + @Override public final Object doInHibernate(final Session session) throws HibernateException, SQLException { @@ -346,6 +359,7 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements // // HibernateCallback // + @Override public final Object doInHibernate(final Session session) throws HibernateException, SQLException { @@ -385,6 +399,7 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements // // HibernateCallback // + @Override public final Object doInHibernate(final Session session) throws HibernateException, SQLException { @@ -411,6 +426,7 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements return updatedRows; } + @Override public List<DeletionPE> findAllById(List<Long> ids) { if (ids.isEmpty()) @@ -449,11 +465,13 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements entityKind.getEntityClass(), ids); } + @Override public List<TechId> findTrashedDataSetIds(List<TechId> deletionIds) { return findTrashedEntityIds(deletionIds, EntityKind.DATA_SET); } + @Override public List<? extends IDeletablePE> listDeletedEntities(EntityKind entityKind, List<TechId> entityIds) { @@ -467,6 +485,7 @@ final class DeletionDAO extends AbstractGenericEntityDAO<DeletionPE> implements ids); } + @Override public List<TechId> listDeletedEntitiesForType(EntityKind entityKind, TechId entityTypeId) { String typeId = null; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityOperationsLogDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityOperationsLogDAO.java index 9f10d02f8a2..0afe33300c7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityOperationsLogDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityOperationsLogDAO.java @@ -24,6 +24,7 @@ public class EntityOperationsLogDAO extends AbstractGenericEntityDAO<EntityOpera super(sessionFactory, databaseInstance, EntityOperationsLogEntryPE.class); } + @Override public void addLogEntry(Long registrationId) { EntityOperationsLogEntryPE logEntry = new EntityOperationsLogEntryPE(); @@ -37,6 +38,7 @@ public class EntityOperationsLogDAO extends AbstractGenericEntityDAO<EntityOpera registrationId)); } + @Override public EntityOperationsLogEntryPE tryFindLogEntry(Long registrationId) { assert registrationId != null : "Unspecified registration id."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityPropertyHistoryDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityPropertyHistoryDAO.java index ff0c044516b..093ded3c8f5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityPropertyHistoryDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityPropertyHistoryDAO.java @@ -46,6 +46,7 @@ class EntityPropertyHistoryDAO extends AbstractDAO implements IEntityPropertyHis private static final Logger operationLog = LogFactory.getLogger(LogCategory.OPERATION, EntityPropertyHistoryDAO.class); + @Override public List<AbstractEntityPropertyHistoryPE> getPropertyHistory(EntityKind entityKind, final TechId id) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityPropertyTypeDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityPropertyTypeDAO.java index 80dc7ec64d8..9be324f6392 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityPropertyTypeDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityPropertyTypeDAO.java @@ -87,6 +87,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty // IEntityPropertyTypeDAO // + @Override public final List<EntityTypePropertyTypePE> listEntityPropertyTypes( final EntityTypePE entityType) throws DataAccessException { @@ -106,6 +107,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty return assignments; } + @Override public EntityTypePropertyTypePE tryFindAssignment(EntityTypePE entityType, PropertyTypePE propertyType) { @@ -120,6 +122,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty return etpt; } + @Override public final void createEntityPropertyTypeAssignment( final EntityTypePropertyTypePE entityPropertyTypeAssignement) throws DataAccessException @@ -139,6 +142,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty } } + @Override public List<Long> listEntityIds(final EntityTypePE entityType) throws DataAccessException { assert entityType != null : "Unspecified entity type."; @@ -156,6 +160,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty return list; } + @Override public void scheduleDynamicPropertiesEvaluation(final EntityTypePropertyTypePE assignment) throws DataAccessException { @@ -187,6 +192,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty return list; } + @Override public List<Long> listIdsOfEntitiesWithoutPropertyValue( final EntityTypePropertyTypePE assignment) throws DataAccessException { @@ -211,6 +217,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty return list; } + @Override public void createProperties(final EntityPropertyPE property, final List<Long> entityIds) { assert property != null : "Given property data can not be null."; @@ -251,6 +258,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty // inserts are performed using stateless session for better memory management executeStatelessAction(new StatelessHibernateCallback() { + @Override public Object doInStatelessSession(StatelessSession session) { final SQLQuery sqlQuery = session.createSQLQuery(sql); @@ -302,6 +310,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty return "MEMORY (in MB): free:" + freeMemory + " total:" + totalMemory + " max:" + maxMemory; } + @Override public void fillTermUsageStatistics(List<VocabularyTermWithStats> termsWithStats, VocabularyPE vocabulary) { @@ -337,6 +346,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty } } + @Override public List<EntityPropertyPE> listPropertiesByVocabularyTerm(String vocabularyTermCode) { // we have to fetch props.entity, because hibernate search has some problems with reindexing @@ -356,6 +366,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty return properties; } + @Override public void updateProperties(List<EntityPropertyPE> properties) { final HibernateTemplate template = getHibernateTemplate(); @@ -371,6 +382,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty } } + @Override public void increaseOrdinals(EntityTypePE entityType, Long fromOrdinal, int increment) { assert entityType != null : "Unspecified entity type."; @@ -395,6 +407,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty } } + @Override public Long getMaxOrdinal(EntityTypePE entityType) { assert entityType != null : "Unspecified entity type."; @@ -410,6 +423,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty return maxOrdinal == null ? 0L : maxOrdinal; } + @Override public final void validateAndSaveUpdatedEntity(EntityTypePropertyTypePE entity) { assert entity != null : "entity is null"; @@ -418,6 +432,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty getHibernateTemplate().flush(); } + @Override public int countAssignmentValues(String entityTypeCode, String propertyTypeCode) { assert entityTypeCode != null : "Unspecified entity type."; @@ -432,6 +447,7 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty toArray(propertyTypeCode, entityTypeCode)).get(0))).intValue(); } + @Override public void delete(EntityTypePropertyTypePE assignment) { HibernateTemplate template = getHibernateTemplate(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityTypeDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityTypeDAO.java index 4bdf458c041..57c113fc3aa 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityTypeDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityTypeDAO.java @@ -21,6 +21,7 @@ import java.util.List; import org.apache.log4j.Logger; import org.hibernate.FetchMode; import org.hibernate.SessionFactory; +import org.hibernate.criterion.CriteriaSpecification; import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Restrictions; import org.springframework.dao.DataAccessException; @@ -57,23 +58,26 @@ final class EntityTypeDAO extends AbstractTypeDAO<EntityTypePE> implements IEnti // IEntityTypeDAO // + @Override public final EntityTypePE tryToFindEntityTypeByCode(final String code) throws DataAccessException { return super.tryFindTypeByCode(code); } + @Override public final <T extends EntityTypePE> List<T> listEntityTypes() throws DataAccessException { final DetachedCriteria criteria = DetachedCriteria.forClass(getEntityClass()); criteria.add(Restrictions.eq("databaseInstance", getDatabaseInstance())); final String entityKindName = entityKind.getLabel(); criteria.setFetchMode(entityKindName + "TypePropertyTypesInternal", FetchMode.JOIN); - criteria.setResultTransformer(DetachedCriteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); final List<T> list = cast(getHibernateTemplate().findByCriteria(criteria)); return list; } + @Override public final <T extends EntityTypePE> void createOrUpdateEntityType(T entityType) throws DataAccessException { @@ -90,6 +94,7 @@ final class EntityTypeDAO extends AbstractTypeDAO<EntityTypePE> implements IEnti } } + @Override public final <T extends EntityTypePE> void deleteEntityType(final T entityType) { assert entityType != null : "Entity Type unspecified"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EventDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EventDAO.java index 1171bd1d6ee..dba2b75c004 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EventDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EventDAO.java @@ -60,6 +60,7 @@ public class EventDAO extends AbstractGenericEntityDAO<EventPE> implements IEven super(sessionFactory, databaseInstance, ENTITY_CLASS); } + @Override public EventPE tryFind(String identifier, EntityType entityType, EventType eventType) { assert identifier != null : "Unspecified identifier."; @@ -79,6 +80,7 @@ public class EventDAO extends AbstractGenericEntityDAO<EventPE> implements IEven return result; } + @Override public List<DeletedDataSet> listDeletedDataSets(Long lastSeenDeletionEventIdOrNull, Date maxDeletionDataOrNull) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ExperimentDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ExperimentDAO.java index 71df6707c35..79c52606046 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ExperimentDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ExperimentDAO.java @@ -25,6 +25,7 @@ import java.util.Set; import org.apache.log4j.Logger; import org.hibernate.Criteria; import org.hibernate.FetchMode; +import org.hibernate.criterion.CriteriaSpecification; import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Restrictions; import org.springframework.dao.DataAccessException; @@ -66,6 +67,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi super(persistencyResources, databaseInstance, ExperimentPE.class); } + @Override public List<ExperimentPE> listExperimentsWithProperties(final ProjectPE project, boolean onlyHavingSamples, boolean onlyHavingDataSets) throws DataAccessException { @@ -77,6 +79,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi onlyHavingDataSets); } + @Override public List<ExperimentPE> listExperimentsWithProperties(final SpacePE space) throws DataAccessException { @@ -87,6 +90,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi return listExperimentsWithProperties(null, null, space); } + @Override public List<ExperimentPE> listExperimentsWithProperties( final ExperimentTypePE experimentTypeOrNull, final ProjectPE projectOrNull, final SpacePE spaceOrNull) throws DataAccessException @@ -95,6 +99,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi false, false); } + @Override public List<ExperimentPE> listExperimentsWithProperties( final ExperimentTypePE experimentTypeOrNull, final ProjectPE projectOrNull, final SpacePE spaceOrNull, final boolean onlyHavingSamples, @@ -124,7 +129,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi criteria.add(Restrictions.isNotEmpty("experimentDataSets")); } - criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); final List<ExperimentPE> list = cast(getHibernateTemplate().findByCriteria(criteria)); if (operationLog.isDebugEnabled()) { @@ -135,6 +140,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi return list; } + @Override public List<ExperimentPE> listExperimentsWithProperties(Collection<Long> experimentIDs) throws DataAccessException { @@ -145,11 +151,12 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi final List<ExperimentPE> list = DAOUtils.listByCollection(getHibernateTemplate(), new IDetachedCriteriaFactory() { + @Override public DetachedCriteria createCriteria() { DetachedCriteria criteria = DetachedCriteria.forClass(getEntityClass()); criteria.setFetchMode("experimentProperties", FetchMode.JOIN); - criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); return criteria; } }, "id", experimentIDs); @@ -161,6 +168,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi return list; } + @Override public List<ExperimentPE> listExperiments() throws DataAccessException { final DetachedCriteria criteria = createCriteriaForUndeleted(); @@ -180,6 +188,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi return criteria; } + @Override public ExperimentPE tryFindByCodeAndProject(final ProjectPE project, final String experimentCode) { assert experimentCode != null : "Unspecified experiment code."; @@ -199,6 +208,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi return experiment; } + @Override public List<ExperimentPE> listExperimentsByProjectAndProperty(String propertyCode, String propertyValue, ProjectPE project) throws DataAccessException { @@ -255,6 +265,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi return samples; } + @Override public ExperimentPE tryGetByPermID(String permId) { final Criteria criteria = getSession().createCriteria(getEntityClass()); @@ -269,11 +280,13 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi return experimentOrNull; } + @Override public List<ExperimentPE> listByPermID(Set<String> permIds) { return listByIDsOfName("permId", permIds); } + @Override public List<ExperimentPE> listByIDs(Collection<Long> ids) { return listByIDsOfName("id", ids); @@ -294,6 +307,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi return list; } + @Override public void createOrUpdateExperiment(ExperimentPE experiment, PersonPE modifier) { HibernateTemplate template = getHibernateTemplate(); @@ -303,6 +317,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi scheduleDynamicPropertiesEvaluation(Collections.singletonList(experiment)); } + @Override public void createOrUpdateExperiments(List<ExperimentPE> experiments, PersonPE modifier) { assert experiments != null && experiments.size() > 0 : "Unspecified or empty experiments."; @@ -334,6 +349,7 @@ public class ExperimentDAO extends AbstractGenericEntityWithPropertiesDAO<Experi } } + @Override public void delete(final List<TechId> experimentIds, final PersonPE registrator, final String reason) throws DataAccessException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/FileFormatTypeDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/FileFormatTypeDAO.java index e2d60cc1d32..f3e6be9b92f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/FileFormatTypeDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/FileFormatTypeDAO.java @@ -37,16 +37,19 @@ public class FileFormatTypeDAO extends AbstractTypeDAO<FileFormatTypePE> impleme super(sessionFactory, databaseInstance, FileFormatTypePE.class); } + @Override public FileFormatTypePE tryToFindFileFormatTypeByCode(String code) { return tryFindTypeByCode(code); } + @Override public List<FileFormatTypePE> listFileFormatTypes() { return listTypes(); } + @Override public void createOrUpdate(FileFormatTypePE fileFormatType) { assert fileFormatType != null : "File Format Type is null"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GridCustomColumnDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GridCustomColumnDAO.java index a233b779523..82b5c8a217f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GridCustomColumnDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GridCustomColumnDAO.java @@ -47,6 +47,7 @@ public class GridCustomColumnDAO extends AbstractGenericEntityDAO<GridCustomColu super(sessionFactory, databaseInstance, GridCustomColumnPE.class); } + @Override public void createColumn(GridCustomColumnPE column) { assert column != null : "Unspecified column"; @@ -56,6 +57,7 @@ public class GridCustomColumnDAO extends AbstractGenericEntityDAO<GridCustomColu persist(column); } + @Override public List<GridCustomColumnPE> listColumns(String gridId) { assert gridId != null : "Unspecified grid ID."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GridCustomFilterDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GridCustomFilterDAO.java index f62c8f28588..db03759af40 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GridCustomFilterDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GridCustomFilterDAO.java @@ -47,6 +47,7 @@ public class GridCustomFilterDAO extends AbstractGenericEntityDAO<GridCustomFilt super(sessionFactory, databaseInstance, GridCustomFilterPE.class); } + @Override public void createFilter(GridCustomFilterPE filter) { assert filter != null : "Unspecified filter"; @@ -56,6 +57,7 @@ public class GridCustomFilterDAO extends AbstractGenericEntityDAO<GridCustomFilt persist(filter); } + @Override public List<GridCustomFilterPE> listFilters(String gridId) { assert gridId != null : "Unspecified grid ID."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAO.java index 33de4fadb6a..97883b2acd0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAO.java @@ -44,6 +44,7 @@ import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.search.FullTextQuery; import org.hibernate.search.FullTextSession; +import org.hibernate.search.ProjectionConstants; import org.hibernate.search.Search; import org.hibernate.search.SearchFactory; import org.hibernate.search.engine.DocumentBuilder; @@ -104,6 +105,7 @@ final class HibernateSearchDAO extends HibernateDaoSupport implements IHibernate // IHibernateSearchDAO // + @Override public int getResultSetSizeLimit() { return hibernateSearchContext.getMaxResults(); @@ -111,6 +113,7 @@ final class HibernateSearchDAO extends HibernateDaoSupport implements IHibernate // simple search for MatchingEntities + @Override public List<MatchingEntity> searchEntitiesByTerm(final SearchableEntity searchableEntity, final String searchTerm, final HibernateSearchDataProvider dataProvider, final boolean useWildcardSearchMode, final int alreadyFoundEntities, final int maxSize) @@ -123,6 +126,7 @@ final class HibernateSearchDAO extends HibernateDaoSupport implements IHibernate final List<MatchingEntity> list = AbstractDAO.cast((List<?>) getHibernateTemplate().execute(new HibernateCallback() { + @Override public final List<MatchingEntity> doInHibernate(final Session session) throws HibernateException, SQLException { @@ -192,7 +196,7 @@ final class HibernateSearchDAO extends HibernateDaoSupport implements IHibernate searchableEntity.getMatchingEntityClass()); // takes data only from Lucene index without hitting DB - hibernateQuery.setProjection(FullTextQuery.DOCUMENT_ID, FullTextQuery.DOCUMENT); + hibernateQuery.setProjection(ProjectionConstants.DOCUMENT_ID, ProjectionConstants.DOCUMENT); hibernateQuery.setReadOnly(true); hibernateQuery.setFirstResult(0); hibernateQuery.setMaxResults(maxResults); @@ -220,12 +224,14 @@ final class HibernateSearchDAO extends HibernateDaoSupport implements IHibernate // detailed search + @Override public List<Long> searchForEntityIds(final DetailedSearchCriteria criteria, final EntityKind entityKind, final List<DetailedSearchAssociationCriteria> associations) { final List<Long> list = AbstractDAO.cast((List<?>) getHibernateTemplate().execute(new HibernateCallback() { + @Override public final Object doInHibernate(final Session session) throws HibernateException, SQLException { @@ -256,7 +262,7 @@ final class HibernateSearchDAO extends HibernateDaoSupport implements IHibernate final FullTextQuery hibernateQuery = fullTextSession.createFullTextQuery(query, entityKind.getEntityClass()); - hibernateQuery.setProjection(FullTextQuery.ID); + hibernateQuery.setProjection(ProjectionConstants.ID); hibernateQuery.setReadOnly(true); hibernateQuery.setResultTransformer(new PassThroughOneObjectTupleResultTransformer()); @@ -304,12 +310,14 @@ final class HibernateSearchDAO extends HibernateDaoSupport implements IHibernate this.dataProvider = dataProvider; } + @Override @SuppressWarnings("rawtypes") public List transformList(List collection) { throw new IllegalStateException("This method should not be called"); } + @Override public Object transformTuple(Object[] tuple, String[] aliases) { final int documentId = (Integer) tuple[0]; @@ -464,6 +472,7 @@ final class HibernateSearchDAO extends HibernateDaoSupport implements IHibernate // results. return new Formatter() { + @Override public String highlightTerm(String text, TokenGroup tokenGroup) { return text; // no highlight at all diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/IndexCreationUtil.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/IndexCreationUtil.java index aca45dff4fe..5b98f57f727 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/IndexCreationUtil.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/IndexCreationUtil.java @@ -102,14 +102,17 @@ public final class IndexCreationUtil return new IFullTextIndexUpdater() { + @Override public void clear() { } + @Override public void start() { } + @Override public void scheduleUpdate(IndexUpdateOperation entities) { } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/LocatorTypeDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/LocatorTypeDAO.java index 30b9d69af94..898802a1d49 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/LocatorTypeDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/LocatorTypeDAO.java @@ -34,6 +34,7 @@ public class LocatorTypeDAO extends AbstractTypeDAO<LocatorTypePE> implements IL super(sessionFactory, databaseInstance, LocatorTypePE.class); } + @Override public LocatorTypePE tryToFindLocatorTypeByCode(String code) { return tryFindTypeByCode(code, false); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/LongArrayMapper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/LongArrayMapper.java index cd2b9f6b818..03e031ba6ec 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/LongArrayMapper.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/LongArrayMapper.java @@ -30,11 +30,13 @@ import net.lemnik.eodsql.TypeMapper; */ public class LongArrayMapper implements TypeMapper<long[]> { + @Override public long[] get(ResultSet results, int column) throws SQLException { return (long[]) results.getArray(column).getArray(); } + @Override public void set(PreparedStatement statement, int column, long[] obj) throws SQLException { if (obj != null) @@ -46,6 +48,7 @@ public class LongArrayMapper implements TypeMapper<long[]> } } + @Override public void set(ResultSet results, int column, long[] obj) throws SQLException { results.updateArray(column, new SimpleSQLLongArray(obj)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/LongSetMapper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/LongSetMapper.java index e9890c98487..79298a8323b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/LongSetMapper.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/LongSetMapper.java @@ -34,11 +34,13 @@ import net.lemnik.eodsql.TypeMapper; public class LongSetMapper implements TypeMapper<Set<Long>> { + @Override public Set<Long> get(ResultSet results, int column) throws SQLException { return new LongOpenHashSet((long[]) results.getArray(column).getArray()); } + @Override public void set(PreparedStatement statement, int column, Set<Long> obj) throws SQLException { if (obj != null) @@ -50,6 +52,7 @@ public class LongSetMapper implements TypeMapper<Set<Long>> } } + @Override public void set(ResultSet results, int column, Set<Long> obj) throws SQLException { results.updateArray(column, new SimpleSQLLongArray(obj)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/MaterialDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/MaterialDAO.java index 822204cb3bd..1d7fc41c446 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/MaterialDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/MaterialDAO.java @@ -30,6 +30,7 @@ import org.hibernate.FetchMode; import org.hibernate.SQLQuery; import org.hibernate.Session; import org.hibernate.StatelessSession; +import org.hibernate.criterion.CriteriaSpecification; import org.hibernate.criterion.Restrictions; import org.hibernate.exception.ConstraintViolationException; import org.springframework.dao.DataAccessException; @@ -82,6 +83,7 @@ public class MaterialDAO extends AbstractGenericEntityWithPropertiesDAO<Material super(persistencyResources, databaseInstance, ENTITY_CLASS); } + @Override public List<MaterialPE> listMaterialsWithProperties(final MaterialTypePE materialType) throws DataAccessException { @@ -98,7 +100,7 @@ public class MaterialDAO extends AbstractGenericEntityWithPropertiesDAO<Material operationLog.info(String.format("Found %d materials, disable properties loading.", count)); } - criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); final List<MaterialPE> list = cast(criteria.list()); if (operationLog.isDebugEnabled()) { @@ -109,6 +111,7 @@ public class MaterialDAO extends AbstractGenericEntityWithPropertiesDAO<Material return list; } + @Override public void createOrUpdateMaterials(List<MaterialPE> materials) { assert materials != null && materials.size() > 0 : "Unspecified or empty materials."; @@ -166,11 +169,13 @@ public class MaterialDAO extends AbstractGenericEntityWithPropertiesDAO<Material return MaterialConfigurationProvider.getInstance(); } + @Override public MaterialPE tryFindMaterial(MaterialIdentifier identifier) { return tryFindMaterial(getSession(), identifier); } + @Override public MaterialPE tryFindMaterial(Session session, MaterialIdentifier identifier) { assert identifier != null : "identifier not given"; @@ -193,6 +198,7 @@ public class MaterialDAO extends AbstractGenericEntityWithPropertiesDAO<Material return material; } + @Override public List<MaterialPE> listMaterialsById(final List<Long> ids) { if (ids == null || ids.isEmpty()) @@ -209,6 +215,7 @@ public class MaterialDAO extends AbstractGenericEntityWithPropertiesDAO<Material return list; } + @Override public void delete(final List<TechId> materialIds, final PersonPE registrator, final String reason) throws DataAccessException { @@ -229,6 +236,7 @@ public class MaterialDAO extends AbstractGenericEntityWithPropertiesDAO<Material executeStatelessAction(new StatelessHibernateCallback() { + @Override public Object doInStatelessSession(StatelessSession session) { final SQLQuery sqlQueryCodeAndType = session.createSQLQuery(sqlCodeAndType); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PermIdDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PermIdDAO.java index 25a1e8599a9..049654a49d3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PermIdDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PermIdDAO.java @@ -51,6 +51,7 @@ public class PermIdDAO extends AbstractDAO implements IPermIdDAO super(sessionFactory, databaseInstance); } + @Override public String createPermId() { long id = getNextSequenceId(SequenceNames.PERM_ID_SEQUENCE); @@ -58,6 +59,7 @@ public class PermIdDAO extends AbstractDAO implements IPermIdDAO + Long.toString(id); } + @Override public IEntityInformationHolderDTO tryToFindByPermId(String permId, EntityKind entityKind) { assert permId != null : "Unspecified permId"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PersonDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PersonDAO.java index 05c265c3ffa..6830832dfe5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PersonDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PersonDAO.java @@ -64,6 +64,7 @@ public final class PersonDAO extends AbstractGenericEntityDAO<PersonPE> implemen // IPersonDAO // + @Override public final void createPerson(final PersonPE person) throws DataAccessException { assert person != null : "Given person can not be null."; @@ -83,6 +84,7 @@ public final class PersonDAO extends AbstractGenericEntityDAO<PersonPE> implemen } } + @Override public final void updatePerson(final PersonPE person) throws DataAccessException { assert person != null : "Given person can not be null."; @@ -97,6 +99,7 @@ public final class PersonDAO extends AbstractGenericEntityDAO<PersonPE> implemen } } + @Override public final PersonPE getPerson(final long id) throws DataAccessException { final PersonPE person = (PersonPE) getHibernateTemplate().load(ENTITY_CLASS, id); @@ -107,6 +110,7 @@ public final class PersonDAO extends AbstractGenericEntityDAO<PersonPE> implemen return person; } + @Override public final PersonPE tryFindPersonByUserId(final String userId) throws DataAccessException { assert userId != null : "Unspecified user id"; @@ -156,6 +160,7 @@ public final class PersonDAO extends AbstractGenericEntityDAO<PersonPE> implemen } } + @Override public final PersonPE tryFindPersonByEmail(final String emailAddress) throws DataAccessException { @@ -186,6 +191,7 @@ public final class PersonDAO extends AbstractGenericEntityDAO<PersonPE> implemen return person; } + @Override public final List<PersonPE> listPersons() throws DataAccessException { final List<PersonPE> list = @@ -200,6 +206,7 @@ public final class PersonDAO extends AbstractGenericEntityDAO<PersonPE> implemen return list; } + @Override public final List<PersonPE> listByCodes(Collection<String> userIds) throws DataAccessException { if (userIds.size() == 0) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PostRegistrationDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PostRegistrationDAO.java index ee6ccd0a1ef..37b86253440 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PostRegistrationDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PostRegistrationDAO.java @@ -28,6 +28,7 @@ public class PostRegistrationDAO extends AbstractGenericEntityDAO<PostRegistrati super(sessionFactory, databaseInstance, PostRegistrationPE.class); } + @Override public void addDataSet(DataPE dataset) { PostRegistrationPE element = new PostRegistrationPE(); @@ -38,6 +39,7 @@ public class PostRegistrationDAO extends AbstractGenericEntityDAO<PostRegistrati template.flush(); } + @Override public void removeDataSet(DataPE dataSet) { PostRegistrationPE p = tryFindByDataSet(dataSet); @@ -65,6 +67,7 @@ public class PostRegistrationDAO extends AbstractGenericEntityDAO<PostRegistrati return pr; } + @Override public Collection<Long> listDataSetsForPostRegistration() { final List<PostRegistrationPE> list = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ProjectDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ProjectDAO.java index 5e8856b26e7..fa4789c0dde 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ProjectDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ProjectDAO.java @@ -51,6 +51,7 @@ public class ProjectDAO extends AbstractGenericEntityDAO<ProjectPE> implements I super(sessionFactory, databaseInstance, ProjectPE.class); } + @Override public List<ProjectPE> listProjects() { final List<ProjectPE> list = cast(getHibernateTemplate().loadAll(ProjectPE.class)); @@ -62,6 +63,7 @@ public class ProjectDAO extends AbstractGenericEntityDAO<ProjectPE> implements I return list; } + @Override public List<ProjectPE> listProjects(final SpacePE space) { assert space != null : "Unspecified space."; @@ -77,6 +79,7 @@ public class ProjectDAO extends AbstractGenericEntityDAO<ProjectPE> implements I return list; } + @Override public ProjectPE tryFindProject(final String databaseInstanceCode, final String spaceCode, final String projectCode) { @@ -98,6 +101,7 @@ public class ProjectDAO extends AbstractGenericEntityDAO<ProjectPE> implements I return (ProjectPE) criteria.uniqueResult(); } + @Override public void createProject(ProjectPE project) { assert project != null : "Missing project."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PropertyTypeDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PropertyTypeDAO.java index fff7aa26ebc..920a48fb2f6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PropertyTypeDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/PropertyTypeDAO.java @@ -22,6 +22,7 @@ import org.apache.log4j.Logger; import org.hibernate.Criteria; import org.hibernate.FetchMode; import org.hibernate.SessionFactory; +import org.hibernate.criterion.CriteriaSpecification; import org.hibernate.criterion.Restrictions; import org.springframework.dao.DataAccessException; import org.springframework.dao.DataIntegrityViolationException; @@ -63,6 +64,7 @@ final class PropertyTypeDAO extends AbstractGenericEntityDAO<PropertyTypePE> imp // IPropertyTypeDAO // + @Override public final PropertyTypePE tryFindPropertyTypeByCode(final String code) throws DataAccessException { @@ -85,11 +87,12 @@ final class PropertyTypeDAO extends AbstractGenericEntityDAO<PropertyTypePE> imp return entity; } + @Override public List<PropertyTypePE> listAllPropertyTypes() { final Criteria criteria = getSession().createCriteria(PropertyTypePE.class); criteria.add(Restrictions.eq("databaseInstance", getDatabaseInstance())); - criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); final List<PropertyTypePE> list = cast(criteria.list()); if (operationLog.isDebugEnabled()) { @@ -99,6 +102,7 @@ final class PropertyTypeDAO extends AbstractGenericEntityDAO<PropertyTypePE> imp return list; } + @Override public List<PropertyTypePE> listAllPropertyTypesWithRelations() { final Criteria criteria = getSession().createCriteria(PropertyTypePE.class); @@ -107,7 +111,7 @@ final class PropertyTypeDAO extends AbstractGenericEntityDAO<PropertyTypePE> imp criteria.setFetchMode("sampleTypePropertyTypesInternal", FetchMode.JOIN); criteria.setFetchMode("experimentTypePropertyTypesInternal", FetchMode.JOIN); criteria.setFetchMode("dataSetTypePropertyTypesInternal", FetchMode.JOIN); - criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); final List<PropertyTypePE> list = cast(criteria.list()); if (operationLog.isDebugEnabled()) { @@ -117,6 +121,7 @@ final class PropertyTypeDAO extends AbstractGenericEntityDAO<PropertyTypePE> imp return list; } + @Override public final List<PropertyTypePE> listPropertyTypes() throws DataAccessException { final List<PropertyTypePE> list = @@ -132,6 +137,7 @@ final class PropertyTypeDAO extends AbstractGenericEntityDAO<PropertyTypePE> imp return list; } + @Override public final List<DataTypePE> listDataTypes() throws DataAccessException { final List<DataTypePE> list = @@ -145,6 +151,7 @@ final class PropertyTypeDAO extends AbstractGenericEntityDAO<PropertyTypePE> imp return list; } + @Override public final DataTypePE getDataTypeByCode(final DataTypeCode code) throws DataAccessException { assert code != null : "Unspecified entity data type."; @@ -162,6 +169,7 @@ final class PropertyTypeDAO extends AbstractGenericEntityDAO<PropertyTypePE> imp return entity; } + @Override public final void createPropertyType(final PropertyTypePE propertyType) throws DataAccessException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/QueryDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/QueryDAO.java index c6f78902322..e0f6101ce51 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/QueryDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/QueryDAO.java @@ -47,6 +47,7 @@ public class QueryDAO extends AbstractGenericEntityDAO<QueryPE> implements IQuer super(sessionFactory, databaseInstance, QueryPE.class); } + @Override public List<QueryPE> listQueries(QueryType queryType) { final DetachedCriteria criteria = DetachedCriteria.forClass(getEntityClass()); @@ -64,6 +65,7 @@ public class QueryDAO extends AbstractGenericEntityDAO<QueryPE> implements IQuer return list; } + @Override public void createQuery(QueryPE query) throws DataAccessException { assert query != null : "Unspecified query"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RelationshipTypeDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RelationshipTypeDAO.java index 3d7d9455baf..f8275060014 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RelationshipTypeDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RelationshipTypeDAO.java @@ -44,6 +44,7 @@ public class RelationshipTypeDAO extends AbstractGenericEntityDAO<RelationshipTy super(sessionFactory, databaseInstance, RelationshipTypePE.class); } + @Override public RelationshipTypePE tryFindRelationshipTypeByCode(String code) { assert code != null : "Unspecified relationship type code"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RoleAssignmentDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RoleAssignmentDAO.java index eb3047527ed..03097507f1f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RoleAssignmentDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RoleAssignmentDAO.java @@ -71,6 +71,7 @@ public final class RoleAssignmentDAO extends AbstractGenericEntityDAO<RoleAssign // IRoleAssignmentDAO // + @Override public final List<RoleAssignmentPE> listRoleAssignments() { // returns roles connected directly or indirectly (through space) to current db instance @@ -88,6 +89,7 @@ public final class RoleAssignmentDAO extends AbstractGenericEntityDAO<RoleAssign return list; } + @Override public final List<RoleAssignmentPE> listRoleAssignmentsByPerson(final PersonPE person) { assert person != null : "Unspecified person."; @@ -103,6 +105,7 @@ public final class RoleAssignmentDAO extends AbstractGenericEntityDAO<RoleAssign return list; } + @Override public final void createRoleAssignment(final RoleAssignmentPE roleAssignment) { assert roleAssignment != null : "Role assignment unspecified"; @@ -117,6 +120,7 @@ public final class RoleAssignmentDAO extends AbstractGenericEntityDAO<RoleAssign } } + @Override public final void deleteRoleAssignment(final RoleAssignmentPE roleAssignment) { assert roleAssignment != null : "Role assignment unspecified"; @@ -152,6 +156,7 @@ public final class RoleAssignmentDAO extends AbstractGenericEntityDAO<RoleAssign } } + @Override public final RoleAssignmentPE tryFindSpaceRoleAssignment(final RoleCode role, final String space, final Grantee grantee) { @@ -174,6 +179,7 @@ public final class RoleAssignmentDAO extends AbstractGenericEntityDAO<RoleAssign } + @Override public final RoleAssignmentPE tryFindInstanceRoleAssignment(final RoleCode role, final Grantee grantee) { @@ -197,6 +203,7 @@ public final class RoleAssignmentDAO extends AbstractGenericEntityDAO<RoleAssign } + @Override public List<RoleAssignmentPE> listRoleAssignmentsByAuthorizationGroup( AuthorizationGroupPE authGroup) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleDAO.java index dfa3aa0794e..e0e9f50c48a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleDAO.java @@ -94,6 +94,7 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> // ISampleDAO // + @Override public final void createOrUpdateSample(final SamplePE sample, final PersonPE modifier) throws DataAccessException { @@ -110,11 +111,13 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> new ArrayList<DataPE>(sample.getDatasets())); } + @Override public final List<SamplePE> listSamplesByGeneratedFrom(final SamplePE sample) { return sample.getGenerated(); } + @Override public final List<SamplePE> listSamplesBySpaceAndProperty(final String propertyCode, final String propertyValue, final SpacePE space) throws DataAccessException { @@ -169,6 +172,7 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> return samples; } + @Override public SamplePE tryToFindByPermID(String permID) throws DataAccessException { assert permID != null : "Unspecified permanent ID."; @@ -184,6 +188,7 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> return sample; } + @Override public final SamplePE tryFindByCodeAndDatabaseInstance(final String sampleCode, final DatabaseInstancePE databaseInstance) { @@ -208,6 +213,7 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> return sample; } + @Override public final List<SamplePE> listByCodesAndDatabaseInstance(final List<String> sampleCodes, final String containerCodeOrNull, final DatabaseInstancePE databaseInstance) { @@ -224,6 +230,7 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> return result; } + @Override public final SamplePE tryFindByCodeAndSpace(final String sampleCode, final SpacePE space) { assert sampleCode != null : "Unspecified sample code."; @@ -246,6 +253,7 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> return sample; } + @Override public final List<SamplePE> listByCodesAndSpace(final List<String> sampleCodes, final String containerCodeOrNull, final SpacePE space) { @@ -327,6 +335,7 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> } } + @Override public final void createOrUpdateSamples(final List<SamplePE> samples, final PersonPE modifier) throws DataAccessException { @@ -351,6 +360,7 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> hibernateTemplate.clear(); } + @Override public final void updateSample(final SamplePE sample, final PersonPE modifier) throws DataAccessException { @@ -369,11 +379,13 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> } } + @Override public List<SamplePE> listByPermID(Set<String> values) { return listByIDsOfName("permId", values); } + @Override public List<SamplePE> listByIDs(Collection<Long> ids) { return listByIDsOfName("id", ids); @@ -394,6 +406,7 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> return list; } + @Override public void delete(final List<TechId> sampleIds, final PersonPE registrator, final String reason) throws DataAccessException { @@ -418,6 +431,7 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> sqlDeleteAttachmentContents, sqlDeleteAttachments, sqlDeleteSamples, sqlInsertEvent); } + @Override public Set<TechId> listSampleIdsByChildrenIds(final Collection<TechId> children, final TechId relationship) { @@ -429,6 +443,7 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> (List<? extends Number>) getHibernateTemplate().execute(new HibernateCallback() { + @Override public final Object doInHibernate(final Session session) { final List<Long> longIds = TechId.asLongs(children); @@ -445,11 +460,13 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> return result; } + @Override public Set<TechId> listSampleIdsByParentIds(Collection<TechId> parentIds) { return listChildrenIds(parentIds, TableNames.SAMPLE_RELATIONSHIPS_VIEW); } + @Override public Set<TechId> listChildrenForTrashedSamples(Collection<TechId> parentIds) { return listChildrenIds(parentIds, TableNames.SAMPLE_RELATIONSHIPS_ALL_TABLE); @@ -465,6 +482,7 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> (List<? extends Number>) getHibernateTemplate().execute(new HibernateCallback() { + @Override public final Object doInHibernate(final Session session) { final List<Long> longIds = TechId.asLongs(parents); @@ -481,12 +499,14 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> return result; } + @Override public List<TechId> listSampleIdsByContainerIds(final Collection<TechId> containers) { final List<Long> longIds = TechId.asLongs(containers); final List<Long> results = DAOUtils.listByCollection(getHibernateTemplate(), new IDetachedCriteriaFactory() { + @Override public DetachedCriteria createCriteria() { final DetachedCriteria criteria = @@ -503,12 +523,14 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE> return transformNumbers2TechIdList(results); } + @Override public List<TechId> listSampleIdsByExperimentIds(final Collection<TechId> experiments) { final List<Long> longIds = TechId.asLongs(experiments); final List<Long> results = DAOUtils.listByCollection(getHibernateTemplate(), new IDetachedCriteriaFactory() { + @Override public DetachedCriteria createCriteria() { final DetachedCriteria criteria = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleTypeDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleTypeDAO.java index 798326f783b..5838a02afa6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleTypeDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleTypeDAO.java @@ -21,6 +21,7 @@ import java.util.List; import org.apache.log4j.Logger; import org.hibernate.FetchMode; import org.hibernate.SessionFactory; +import org.hibernate.criterion.CriteriaSpecification; import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Restrictions; import org.springframework.dao.DataAccessException; @@ -54,12 +55,13 @@ final class SampleTypeDAO extends AbstractTypeDAO<SampleTypePE> implements ISamp // ISampleTypeDAO // + @Override public final List<SampleTypePE> listSampleTypes() throws DataAccessException { final DetachedCriteria criteria = DetachedCriteria.forClass(getEntityClass()); criteria.add(Restrictions.eq("databaseInstance", getDatabaseInstance())); criteria.setFetchMode("sampleTypePropertyTypesInternal", FetchMode.JOIN); - criteria.setResultTransformer(DetachedCriteria.DISTINCT_ROOT_ENTITY); + criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); final List<SampleTypePE> list = cast(getHibernateTemplate().findByCriteria(criteria)); if (operationLog.isDebugEnabled()) { @@ -69,6 +71,7 @@ final class SampleTypeDAO extends AbstractTypeDAO<SampleTypePE> implements ISamp return list; } + @Override public final SampleTypePE tryFindSampleTypeByExample(final SampleTypePE sampleType) throws DataAccessException { @@ -84,6 +87,7 @@ final class SampleTypeDAO extends AbstractTypeDAO<SampleTypePE> implements ISamp return result; } + @Override public final SampleTypePE tryFindSampleTypeByCode(final String code) throws DataAccessException { return tryFindTypeByCode(code); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ScriptDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ScriptDAO.java index c9344be8b7b..78aad5978e4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ScriptDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ScriptDAO.java @@ -56,6 +56,7 @@ final class ScriptDAO extends AbstractGenericEntityDAO<ScriptPE> implements IScr super(sessionFactory, databaseInstance, ScriptPE.class); } + @Override public void createOrUpdate(ScriptPE script) { assert script != null : "Missing script."; @@ -69,6 +70,7 @@ final class ScriptDAO extends AbstractGenericEntityDAO<ScriptPE> implements IScr } } + @Override public ScriptPE tryFindByName(String scriptName) { assert scriptName != null : "Unspecified script."; @@ -79,6 +81,7 @@ final class ScriptDAO extends AbstractGenericEntityDAO<ScriptPE> implements IScr return (ScriptPE) criteria.uniqueResult(); } + @Override public List<ScriptPE> listEntities(ScriptType scriptTypeOrNull, EntityKind entityKindOrNull) throws DataAccessException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SerializableObjectMapper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SerializableObjectMapper.java index d12ea3bdbb7..bd8833e6f7d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SerializableObjectMapper.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SerializableObjectMapper.java @@ -34,16 +34,19 @@ import org.apache.commons.lang.SerializationUtils; public class SerializableObjectMapper implements TypeMapper<Serializable> { + @Override public Serializable get(ResultSet results, int column) throws SQLException { return (Serializable) SerializationUtils.deserialize(results.getBytes(column)); } + @Override public void set(ResultSet results, int column, Serializable obj) throws SQLException { results.updateBytes(column, SerializationUtils.serialize(obj)); } + @Override public void set(PreparedStatement statement, int column, Serializable obj) throws SQLException { if (obj != null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SimpleSQLLongArray.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SimpleSQLLongArray.java index 7f4488c7172..f9bb0fb5173 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SimpleSQLLongArray.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SimpleSQLLongArray.java @@ -59,6 +59,7 @@ class SimpleSQLLongArray extends AbstractSQLArray * * @return the object array */ + @Override public Object getArray() { return value; @@ -69,6 +70,7 @@ class SimpleSQLLongArray extends AbstractSQLArray * * @return BIGINT */ + @Override public int getBaseType() { return Types.BIGINT; @@ -79,6 +81,7 @@ class SimpleSQLLongArray extends AbstractSQLArray * * @return "int8" */ + @Override public String getBaseTypeName() { return "int8"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SimpleSQLStringArray.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SimpleSQLStringArray.java index 1734fb13f8f..26566348dd7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SimpleSQLStringArray.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SimpleSQLStringArray.java @@ -39,6 +39,7 @@ class SimpleSQLStringArray extends AbstractSQLArray * * @return the object array */ + @Override public Object getArray() { return value; @@ -49,6 +50,7 @@ class SimpleSQLStringArray extends AbstractSQLArray * * @return VARCHAR */ + @Override public int getBaseType() { return Types.VARCHAR; @@ -59,6 +61,7 @@ class SimpleSQLStringArray extends AbstractSQLArray * * @return "varchar" */ + @Override public String getBaseTypeName() { return "varchar"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SpaceDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SpaceDAO.java index 7a785a98d1f..f1ebfeae9b7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SpaceDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SpaceDAO.java @@ -59,6 +59,7 @@ final class SpaceDAO extends AbstractGenericEntityDAO<SpacePE> implements ISpace // ISpaceDAO // + @Override public final SpacePE tryFindSpaceByCodeAndDatabaseInstance(final String spaceCode, final DatabaseInstancePE databaseInstance) throws DataAccessException { @@ -79,6 +80,7 @@ final class SpaceDAO extends AbstractGenericEntityDAO<SpacePE> implements ISpace return entity; } + @Override public final List<SpacePE> listSpaces() throws DataAccessException { final DetachedCriteria criteria = DetachedCriteria.forClass(getEntityClass()); @@ -92,6 +94,7 @@ final class SpaceDAO extends AbstractGenericEntityDAO<SpacePE> implements ISpace return list; } + @Override public final List<SpacePE> listSpaces(final DatabaseInstancePE databaseInstance) throws DataAccessException { @@ -109,6 +112,7 @@ final class SpaceDAO extends AbstractGenericEntityDAO<SpacePE> implements ISpace return list; } + @Override public final void createSpace(final SpacePE space) throws DataAccessException { assert space != null : "Unspecified space"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/StringArrayMapper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/StringArrayMapper.java index f63528433b6..c6e397f15b8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/StringArrayMapper.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/StringArrayMapper.java @@ -30,11 +30,13 @@ import net.lemnik.eodsql.TypeMapper; */ public class StringArrayMapper implements TypeMapper<String[]> { + @Override public String[] get(ResultSet results, int column) throws SQLException { return (String[]) results.getArray(column).getArray(); } + @Override public void set(PreparedStatement statement, int column, String[] obj) throws SQLException { if (obj != null) @@ -46,6 +48,7 @@ public class StringArrayMapper implements TypeMapper<String[]> } } + @Override public void set(ResultSet results, int column, String[] obj) throws SQLException { results.updateArray(column, new SimpleSQLStringArray(obj)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/VocabularyDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/VocabularyDAO.java index c5dc01acc4f..6dba62b73f9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/VocabularyDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/VocabularyDAO.java @@ -61,6 +61,7 @@ final class VocabularyDAO extends AbstractGenericEntityDAO<VocabularyPE> impleme // IVocabularyDAO // + @Override public final void createOrUpdateVocabulary(final VocabularyPE vocabularyPE) { assert vocabularyPE != null : "Given vocabulary can not be null."; @@ -76,6 +77,7 @@ final class VocabularyDAO extends AbstractGenericEntityDAO<VocabularyPE> impleme } + @Override public final VocabularyPE tryFindVocabularyByCode(final String vocabularyCode) { assert vocabularyCode != null : "Unspecified vocabulary code."; @@ -97,6 +99,7 @@ final class VocabularyDAO extends AbstractGenericEntityDAO<VocabularyPE> impleme return entity; } + @Override public final List<VocabularyPE> listVocabularies(boolean excludeInternal) { String excludeInternalQuery = " and v.internalNamespace = false"; @@ -113,6 +116,7 @@ final class VocabularyDAO extends AbstractGenericEntityDAO<VocabularyPE> impleme } // this one could be moved to VocabularyTermDAO if we create it + @Override public VocabularyTermPE tryFindVocabularyTermByCode(VocabularyPE vocabulary, String code) { assert vocabulary != null : "Unspecified vocabulary."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/VocabularyTermDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/VocabularyTermDAO.java index d0143779a22..a0b3f23e70e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/VocabularyTermDAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/VocabularyTermDAO.java @@ -51,6 +51,7 @@ final class VocabularyTermDAO extends AbstractGenericEntityDAO<VocabularyTermPE> super(sessionFactory, databaseInstance, VocabularyTermPE.class); } + @Override public void increaseVocabularyTermOrdinals(VocabularyPE vocabulary, Long fromOrdinal, int increment) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/DefaultFullTextIndexer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/DefaultFullTextIndexer.java index 7041e89d623..910c8e1d887 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/DefaultFullTextIndexer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/DefaultFullTextIndexer.java @@ -69,6 +69,7 @@ final class DefaultFullTextIndexer implements IFullTextIndexer // IFullTextIndexer // + @Override public final <T> void doFullTextIndex(final Session hibernateSession, final Class<T> clazz) throws DataAccessException { @@ -118,6 +119,7 @@ final class DefaultFullTextIndexer implements IFullTextIndexer } } + @Override public <T> void doFullTextIndexUpdate(final Session hibernateSession, final Class<T> clazz, final List<Long> ids) throws DataAccessException { @@ -158,6 +160,7 @@ final class DefaultFullTextIndexer implements IFullTextIndexer } } + @Override public <T> void removeFromIndex(final Session hibernateSession, final Class<T> clazz, final List<Long> ids) throws DataAccessException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/FullTextIndexUpdater.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/FullTextIndexUpdater.java index 28229d9e03d..30e1c4a4232 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/FullTextIndexUpdater.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/FullTextIndexUpdater.java @@ -104,6 +104,7 @@ public final class FullTextIndexUpdater extends HibernateDaoSupport implements return new File(indexBase, FULL_TEXT_INDEX_UPDATER_QUEUE_FILENAME); } + @Override public void start() { if (operationLog.isInfoEnabled()) @@ -116,6 +117,7 @@ public final class FullTextIndexUpdater extends HibernateDaoSupport implements thread.start(); } + @Override public void clear() { updaterQueue.clear(); @@ -125,6 +127,7 @@ public final class FullTextIndexUpdater extends HibernateDaoSupport implements } } + @Override public void scheduleUpdate(IndexUpdateOperation operation) { if (operationLog.isDebugEnabled()) @@ -141,6 +144,7 @@ public final class FullTextIndexUpdater extends HibernateDaoSupport implements */ private class FullTextIndexUpdaterRunnable implements Runnable { + @Override public final void run() { final IndexMode indexMode = context.getIndexMode(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/FullTextIndexerRunnable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/FullTextIndexerRunnable.java index e5261f097f7..17aef4add7c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/FullTextIndexerRunnable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/FullTextIndexerRunnable.java @@ -80,6 +80,7 @@ public final class FullTextIndexerRunnable extends HibernateDaoSupport implement // Runnable // + @Override public final void run() { final IndexMode indexMode = context.getIndexMode(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/HibernateSearchContext.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/HibernateSearchContext.java index 03fe29a1766..bee53696a93 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/HibernateSearchContext.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/HibernateSearchContext.java @@ -117,6 +117,7 @@ public final class HibernateSearchContext implements InitializingBean // InitializingBean // + @Override public final void afterPropertiesSet() throws Exception { if (getIndexMode() == IndexMode.INDEX_FROM_SCRATCH) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/PackageBasedIndexedEntityFinder.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/PackageBasedIndexedEntityFinder.java index db3e1f56cf0..51a9a281554 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/PackageBasedIndexedEntityFinder.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/PackageBasedIndexedEntityFinder.java @@ -53,6 +53,7 @@ public final class PackageBasedIndexedEntityFinder implements IIndexedEntityFind // IClassFilter // + @Override public final boolean accept(final Class<?> clazz) { if (clazz.isAnnotationPresent(Indexed.class)) @@ -78,6 +79,7 @@ public final class PackageBasedIndexedEntityFinder implements IIndexedEntityFind // IIndexedEntityFinder // + @Override public final Set<Class<?>> getIndexedEntities() { return indexedEntities; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom022To023.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom022To023.java index f1341919896..26eb0eb15dc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom022To023.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom022To023.java @@ -42,6 +42,7 @@ public final class MigrationStepFrom022To023 implements IMigrationStep // IMigrationStep // + @Override public final void performPostMigration(final SimpleJdbcTemplate simpleJdbcTemplate, DataSource dataSource) throws DataAccessException { @@ -59,6 +60,7 @@ public final class MigrationStepFrom022To023 implements IMigrationStep } } + @Override public final void performPreMigration(final SimpleJdbcTemplate simpleJdbcTemplate, DataSource dataSource) throws DataAccessException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom023To024.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom023To024.java index ee59d53ad29..65346e0d6a3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom023To024.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom023To024.java @@ -60,6 +60,7 @@ public final class MigrationStepFrom023To024 extends MigrationStepAdapter // ParameterizedRowMapper // + @Override public final DatabaseInstance mapRow(final ResultSet rs, final int rowNum) throws SQLException { @@ -75,6 +76,7 @@ public final class MigrationStepFrom023To024 extends MigrationStepAdapter // // ParameterizedRowMapper // + @Override public final ExternalData mapRow(final ResultSet rs, final int rowNum) throws SQLException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom025To026.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom025To026.java index 074f0b3189e..aedf69c503a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom025To026.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom025To026.java @@ -59,6 +59,7 @@ public final class MigrationStepFrom025To026 extends MigrationStepAdapter private final static ParameterizedRowMapper<ExternalData> EXTERNAL_DATA_ROW_MAPPER = new ParameterizedRowMapper<ExternalData>() { + @Override public final ExternalData mapRow(final ResultSet rs, final int rowNum) throws SQLException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom036To037.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom036To037.java index b3daa696e06..42bd5b7e40b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom036To037.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom036To037.java @@ -62,6 +62,7 @@ public final class MigrationStepFrom036To037 extends MigrationStepAdapter private final static ParameterizedRowMapper<EntityProperty> ENTITY_PROPERTY_ROW_MAPPER = new ParameterizedRowMapper<EntityProperty>() { + @Override public final EntityProperty mapRow(final ResultSet rs, final int rowNum) throws SQLException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom046To047.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom046To047.java index 29a898e015a..330536678e6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom046To047.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/migration/MigrationStepFrom046To047.java @@ -59,6 +59,7 @@ public final class MigrationStepFrom046To047 extends MigrationStepAdapter private final static ParameterizedRowMapper<PersonWithDisplaySettings> PERSON_WITH_DISPLAY_SETTINGS_ROW_MAPPER = new ParameterizedRowMapper<PersonWithDisplaySettings>() { + @Override public final PersonWithDisplaySettings mapRow(final ResultSet rs, final int rowNum) throws SQLException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/IDataSetTypeImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/IDataSetTypeImmutable.java index bb15b3d12b3..ecd18ceedba 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/IDataSetTypeImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/IDataSetTypeImmutable.java @@ -32,6 +32,7 @@ public interface IDataSetTypeImmutable extends IEntityType /** * Get the description for this data set type. */ + @Override public String getDescription(); /** diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/IScriptImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/IScriptImmutable.java index e4fe2de4212..3ba01bc382f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/IScriptImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/IScriptImmutable.java @@ -25,6 +25,7 @@ public interface IScriptImmutable extends IEntityType /** * Get the description for this script. */ + @Override public String getDescription(); /** diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/DataSetType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/DataSetType.java index cd72677e19a..072e0903dbc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/DataSetType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/DataSetType.java @@ -28,26 +28,31 @@ public class DataSetType extends DataSetTypeImmutable implements IDataSetType super(code); } + @Override public void setDescription(String description) { getDataSetType().setDescription(description); } + @Override public void setContainerType(boolean isContainerType) { getDataSetType().setContainerType(isContainerType); } + @Override public void setMainDataSetPattern(String mainDataSetPattern) { getDataSetType().setMainDataSetPattern(mainDataSetPattern); } + @Override public void setMainDataSetPath(String mainDataSetPath) { getDataSetType().setMainDataSetPath(mainDataSetPath); } + @Override public void setDeletionDisallowed(boolean deletionDisallowed) { getDataSetType().setDeletionDisallow(deletionDisallowed); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/DataSetTypeImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/DataSetTypeImmutable.java index 55ff93d585a..e145d6fc202 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/DataSetTypeImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/DataSetTypeImmutable.java @@ -43,36 +43,43 @@ public class DataSetTypeImmutable implements IDataSetTypeImmutable return dataSetType; } + @Override public String getCode() { return getDataSetType().getCode(); } + @Override public String getDescription() { return getDataSetType().getDescription(); } + @Override public boolean isContainerType() { return getDataSetType().isContainerType(); } + @Override public boolean isDeletionDisallowed() { return getDataSetType().isDeletionDisallow(); } + @Override public EntityKind getEntityKind() { return EntityKind.DATA_SET; } + @Override public String getMainDataSetPattern() { return getDataSetType().getMainDataSetPattern(); } + @Override public String getMainDataSetPath() { return getDataSetType().getMainDataSetPath(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExperimentType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExperimentType.java index 51175a597a1..7345dd034ea 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExperimentType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExperimentType.java @@ -28,6 +28,7 @@ public class ExperimentType extends ExperimentTypeImmutable implements IExperime super(code); } + @Override public void setDescription(String description) { getExperimentType().setDescription(description); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExperimentTypeImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExperimentTypeImmutable.java index acbc4320321..30034e77aed 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExperimentTypeImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ExperimentTypeImmutable.java @@ -43,16 +43,19 @@ public class ExperimentTypeImmutable implements IExperimentTypeImmutable return expType; } + @Override public String getCode() { return getExperimentType().getCode(); } + @Override public String getDescription() { return getExperimentType().getDescription(); } + @Override public EntityKind getEntityKind() { return EntityKind.EXPERIMENT; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/FileFormatType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/FileFormatType.java index 84d4a91d593..176515eaa78 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/FileFormatType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/FileFormatType.java @@ -28,6 +28,7 @@ public class FileFormatType extends FileFormatTypeImmutable implements IFileForm super(code); } + @Override public void setDescription(String description) { getFileFormatType().setDescription(description); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/FileFormatTypeImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/FileFormatTypeImmutable.java index 63e80a2f342..af7a5a01334 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/FileFormatTypeImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/FileFormatTypeImmutable.java @@ -42,11 +42,13 @@ public class FileFormatTypeImmutable implements IFileFormatTypeImmutable return expType; } + @Override public String getCode() { return getFileFormatType().getCode(); } + @Override public String getDescription() { return getFileFormatType().getDescription(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationScriptRunner.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationScriptRunner.java index 481492c7d6e..d936e9d7651 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationScriptRunner.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationScriptRunner.java @@ -50,6 +50,7 @@ public class MasterDataRegistrationScriptRunner implements IMasterDataScriptRegi executeScript(scriptString); } + @Override public void executeScript(String jythonScript) throws MasterDataRegistrationException { MasterDataRegistrationService service = new MasterDataRegistrationService(commonServer); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationService.java index d2ee7814de1..573a6506428 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationService.java @@ -38,6 +38,7 @@ public class MasterDataRegistrationService implements IMasterDataRegistrationSer this.commonServer = commonServer; } + @Override public IMasterDataRegistrationTransaction transaction() { MasterDataRegistrationTransaction transaction = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationTransaction.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationTransaction.java index 2888b160831..3345d7c5cc8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationTransaction.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MasterDataRegistrationTransaction.java @@ -87,6 +87,7 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return transactionErrors.hasErrors(); } + @Override public IExperimentType createNewExperimentType(String code) { ExperimentType experimentType = new ExperimentType(code); @@ -94,11 +95,13 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return experimentType; } + @Override public IExperimentTypeImmutable getExperimentType(String code) { return findTypeForCode(commonServer.listExperimentTypes(), code); } + @Override public IExperimentType getOrCreateNewExperimentType(String code) { final IExperimentTypeImmutable experimentType = getExperimentType(code); @@ -109,11 +112,13 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return createNewExperimentType(code); } + @Override public List<IExperimentTypeImmutable> listExperimentTypes() { return commonServer.listExperimentTypes(); } + @Override public ISampleType createNewSampleType(String code) { SampleType sampleType = new SampleType(code); @@ -121,11 +126,13 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return sampleType; } + @Override public ISampleTypeImmutable getSampleType(String code) { return findTypeForCode(commonServer.listSampleTypes(), code); } + @Override public ISampleType getOrCreateNewSampleType(String code) { ISampleTypeImmutable sampleType = getSampleType(code); @@ -136,11 +143,13 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return createNewSampleType(code); } + @Override public List<ISampleTypeImmutable> listSampleTypes() { return commonServer.listSampleTypes(); } + @Override public IDataSetType createNewDataSetType(String code) { DataSetType dataSetType = new DataSetType(code); @@ -148,11 +157,13 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return dataSetType; } + @Override public IDataSetTypeImmutable getDataSetType(String code) { return findTypeForCode(commonServer.listDataSetTypes(), code); } + @Override public IDataSetType getOrCreateNewDataSetType(String code) { IDataSetTypeImmutable dataSetType = getDataSetType(code); @@ -163,11 +174,13 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return createNewDataSetType(code); } + @Override public List<IDataSetTypeImmutable> listDataSetTypes() { return commonServer.listDataSetTypes(); } + @Override public IMaterialType createNewMaterialType(String code) { MaterialType materialType = new MaterialType(code); @@ -175,11 +188,13 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return materialType; } + @Override public IMaterialTypeImmutable getMaterialType(String code) { return findTypeForCode(commonServer.listMaterialTypes(), code); } + @Override public IMaterialType getOrCreateNewMaterialType(String code) { IMaterialTypeImmutable materialType = getMaterialType(code); @@ -190,11 +205,13 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return createNewMaterialType(code); } + @Override public List<IMaterialTypeImmutable> listMaterialTypes() { return commonServer.listMaterialTypes(); } + @Override public IFileFormatType createNewFileFormatType(String code) { FileFormatType fileFormatType = new FileFormatType(code); @@ -202,11 +219,13 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return fileFormatType; } + @Override public IFileFormatTypeImmutable getFileFormatType(String code) { return findTypeForCode(commonServer.listFileFormatTypes(), code); } + @Override public IFileFormatType getOrCreateNewFileFormatType(String code) { IFileFormatTypeImmutable fileFormatType = getFileFormatType(code); @@ -217,6 +236,7 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return createNewFileFormatType(code); } + @Override public List<IFileFormatTypeImmutable> listFileFormatTypes() { return commonServer.listFileFormatTypes(); @@ -227,6 +247,7 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return commonServer.listScripts(); } + @Override public IPropertyType createNewPropertyType(String code, DataType dataType) { PropertyType propertyType = new PropertyType(code, dataType); @@ -234,6 +255,7 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return propertyType; } + @Override public IPropertyTypeImmutable getPropertyType(String code) { List<IPropertyTypeImmutable> propertyTypes = commonServer.listPropertyTypes(); @@ -248,6 +270,7 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return null; } + @Override public IPropertyType getOrCreateNewPropertyType(String code, DataType dataType) { IPropertyTypeImmutable propertyType = getPropertyType(code); @@ -258,11 +281,13 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return createNewPropertyType(code, dataType); } + @Override public List<IPropertyTypeImmutable> listPropertyTypes() { return commonServer.listPropertyTypes(); } + @Override public IPropertyAssignment assignPropertyType(IEntityType entityType, IPropertyTypeImmutable propertyType) { @@ -332,16 +357,19 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio } + @Override public List<IPropertyAssignmentImmutable> listPropertyAssignments() { return commonServer.listPropertyAssignments(); } + @Override public IVocabularyTerm createNewVocabularyTerm(String code) { return new VocabularyTerm(code); } + @Override public IVocabulary createNewVocabulary(String code) { Vocabulary vocabulary = new Vocabulary(code); @@ -349,11 +377,13 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return vocabulary; } + @Override public IVocabularyImmutable getVocabulary(String code) { return findVocabularyForCode(commonServer.listVocabularies(), code); } + @Override public IVocabulary getOrCreateNewVocabulary(String code) { IVocabularyImmutable vocabulary = getVocabulary(code); @@ -364,6 +394,7 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio return createNewVocabulary(code); } + @Override public List<IVocabularyImmutable> listVocabularies() { return commonServer.listVocabularies(); @@ -500,6 +531,7 @@ public class MasterDataRegistrationTransaction implements IMasterDataRegistratio { interfaze }, new InvocationHandler() { + @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MaterialType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MaterialType.java index a747bc50997..4b15a949fa3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MaterialType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MaterialType.java @@ -28,6 +28,7 @@ public class MaterialType extends MaterialTypeImmutable implements IMaterialType super(code); } + @Override public void setDescription(String description) { getMaterialType().setDescription(description); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MaterialTypeImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MaterialTypeImmutable.java index cd9c668d9a7..c006e1e5ec9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MaterialTypeImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/MaterialTypeImmutable.java @@ -44,16 +44,19 @@ public class MaterialTypeImmutable implements IMaterialTypeImmutable return materialType; } + @Override public String getCode() { return getMaterialType().getCode(); } + @Override public String getDescription() { return getMaterialType().getDescription(); } + @Override public EntityKind getEntityKind() { return EntityKind.MATERIAL; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyAssignment.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyAssignment.java index 199fcf30871..919e5d0a617 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyAssignment.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyAssignment.java @@ -41,11 +41,13 @@ public class PropertyAssignment implements IPropertyAssignment return assignment; } + @Override public boolean isMandatory() { return assignment.isMandatory(); } + @Override public void setMandatory(boolean mandatory) { assignment.setMandatory(mandatory); @@ -56,41 +58,49 @@ public class PropertyAssignment implements IPropertyAssignment return assignment.getDefaultValue(); } + @Override public void setDefaultValue(String defaultValue) { assignment.setDefaultValue(defaultValue); } + @Override public String getSection() { return assignment.getSection(); } + @Override public void setSection(String section) { assignment.setSection(section); } + @Override public Long getPositionInForms() { return assignment.getOrdinal(); } + @Override public void setPositionInForms(Long ordinal) { assignment.setOrdinal(ordinal); } + @Override public String getEntityTypeCode() { return assignment.getEntityTypeCode(); } + @Override public String getPropertyTypeCode() { return assignment.getPropertyTypeCode(); } + @Override public ch.systemsx.cisd.openbis.generic.server.jython.api.v1.EntityKind getEntityKind() { String name = assignment.getEntityKind().name(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyAssignmentImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyAssignmentImmutable.java index 470ede39280..8eeef5a35af 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyAssignmentImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyAssignmentImmutable.java @@ -33,31 +33,37 @@ public class PropertyAssignmentImmutable implements IPropertyAssignmentImmutable this.entityTypePropType = entityTypePropType; } + @Override public boolean isMandatory() { return entityTypePropType.isMandatory(); } + @Override public String getSection() { return entityTypePropType.getSection(); } + @Override public Long getPositionInForms() { return entityTypePropType.getOrdinal(); } + @Override public String getEntityTypeCode() { return entityTypePropType.getEntityType().getCode(); } + @Override public String getPropertyTypeCode() { return entityTypePropType.getPropertyType().getCode(); } + @Override public EntityKind getEntityKind() { return EntityKind.valueOf(entityTypePropType.getEntityKind().name()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyType.java index 9b5ca161321..b03e86760f7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyType.java @@ -34,6 +34,7 @@ public class PropertyType extends PropertyTypeImmutable implements IPropertyType setDescription(StringUtils.EMPTY_STRING); } + @Override public void setDescription(String description) { if (description != null) @@ -42,37 +43,44 @@ public class PropertyType extends PropertyTypeImmutable implements IPropertyType } } + @Override public void setLabel(String label) { getPropertyType().setLabel(label); } + @Override public void setMaterialType(IMaterialTypeImmutable materialType) { MaterialType wrappedMaterialType = ((MaterialTypeImmutable) materialType).getMaterialType(); getPropertyType().setMaterialType(wrappedMaterialType); } + @Override public void setXmlSchema(String schema) { getPropertyType().setSchema(schema); } + @Override public void setTransformation(String xsltTransformation) { getPropertyType().setTransformation(xsltTransformation); } + @Override public void setManagedInternally(boolean isManagedInternally) { getPropertyType().setManagedInternally(isManagedInternally); } + @Override public void setInternalNamespace(boolean isInternalNamespace) { getPropertyType().setInternalNamespace(isInternalNamespace); } + @Override public void setVocabulary(IVocabularyImmutable vocabulary) { VocabularyImmutable internalVocabulary = (VocabularyImmutable) vocabulary; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyTypeImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyTypeImmutable.java index c8715b5989a..448b062b6f5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyTypeImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/PropertyTypeImmutable.java @@ -52,27 +52,32 @@ public class PropertyTypeImmutable implements IPropertyTypeImmutable return propertyType; } + @Override public String getCode() { return getPropertyType().getCode(); } + @Override public String getDescription() { return getPropertyType().getDescription(); } + @Override public String getLabel() { return getPropertyType().getLabel(); } + @Override public DataType getDataType() { final String typeName = getPropertyType().getDataType().getCode().name(); return DataType.valueOf(typeName); } + @Override public IMaterialTypeImmutable getMaterialType() { MaterialType materialType = getPropertyType().getMaterialType(); @@ -83,26 +88,31 @@ public class PropertyTypeImmutable implements IPropertyTypeImmutable return null; } + @Override public String getXmlSchema() { return getPropertyType().getSchema(); } + @Override public String getTransformation() { return getPropertyType().getTransformation(); } + @Override public boolean isManagedInternally() { return getPropertyType().isManagedInternally(); } + @Override public boolean isInternalNamespace() { return getPropertyType().isInternalNamespace(); } + @Override public IVocabularyImmutable getVocabulary() { final Vocabulary vocabulary = getPropertyType().getVocabulary(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/SampleType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/SampleType.java index 13448524c6f..82719efedab 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/SampleType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/SampleType.java @@ -30,36 +30,43 @@ public class SampleType extends SampleTypeImmutable implements ISampleType setListable(true); } + @Override public void setDescription(String description) { getSampleType().setDescription(description); } + @Override public void setShowContainer(boolean showContainer) { getSampleType().setShowContainer(showContainer); } + @Override public void setShowParents(boolean showParents) { getSampleType().setShowParents(showParents); } + @Override public void setListable(boolean isListable) { getSampleType().setListable(isListable); } + @Override public void setSubcodeUnique(boolean isSubcodeUnique) { getSampleType().setSubcodeUnique(isSubcodeUnique); } + @Override public void setAutoGeneratedCode(boolean isAutoGeneratedCode) { getSampleType().setAutoGeneratedCode(isAutoGeneratedCode); } + @Override public void setGeneratedCodePrefix(String generatedCodePrefix) { getSampleType().setGeneratedCodePrefix(generatedCodePrefix); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/SampleTypeImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/SampleTypeImmutable.java index 08f3f5833ba..6d94e3c7caf 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/SampleTypeImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/SampleTypeImmutable.java @@ -42,46 +42,55 @@ public class SampleTypeImmutable implements ISampleTypeImmutable return sampleType; } + @Override public String getCode() { return getSampleType().getCode(); } + @Override public String getDescription() { return getSampleType().getDescription(); } + @Override public boolean isListable() { return getSampleType().isListable(); } + @Override public boolean isShowContainer() { return getSampleType().isShowContainer(); } + @Override public boolean isShowParents() { return getSampleType().isShowParents(); } + @Override public boolean isSubcodeUnique() { return getSampleType().isSubcodeUnique(); } + @Override public boolean isAutoGeneratedCode() { return getSampleType().isAutoGeneratedCode(); } + @Override public String getGeneratedCodePrefix() { return getSampleType().getGeneratedCodePrefix(); } + @Override public EntityKind getEntityKind() { return EntityKind.SAMPLE; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ScriptImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ScriptImmutable.java index 38673aaae4e..205db988eb7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ScriptImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/ScriptImmutable.java @@ -34,21 +34,25 @@ public class ScriptImmutable implements IScriptImmutable this.script = script; } + @Override public EntityKind getEntityKind() { return EntityKind.valueOf(script.getEntityKind().name()); } + @Override public String getDescription() { return script.getDescription(); } + @Override public String getName() { return script.getName(); } + @Override public String getScript() { return script.getScript(); @@ -86,6 +90,7 @@ public class ScriptImmutable implements IScriptImmutable } } + @Override public String getCode() { return script.getId().toString(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/Vocabulary.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/Vocabulary.java index 1c6c1b49dc9..30a10a0bba4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/Vocabulary.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/Vocabulary.java @@ -30,31 +30,37 @@ public class Vocabulary extends VocabularyImmutable implements IVocabulary super(code); } + @Override public void setDescription(String description) { getVocabulary().setDescription(description); } + @Override public void setManagedInternally(boolean isManagedInternally) { getVocabulary().setManagedInternally(isManagedInternally); } + @Override public void setInternalNamespace(boolean isInternalNamespace) { getVocabulary().setInternalNamespace(isInternalNamespace); } + @Override public void setChosenFromList(boolean isChosenFromList) { getVocabulary().setChosenFromList(isChosenFromList); } + @Override public void setUrlTemplate(String urlTemplate) { getVocabulary().setURLTemplate(urlTemplate); } + @Override public void addTerm(IVocabularyTerm term) { VocabularyTerm internalTerm = (VocabularyTerm) term; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/VocabularyImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/VocabularyImmutable.java index 4b387d8be94..26765ca017f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/VocabularyImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/VocabularyImmutable.java @@ -47,36 +47,43 @@ public class VocabularyImmutable implements IVocabularyImmutable return vocabulary; } + @Override public String getCode() { return getVocabulary().getCode(); } + @Override public String getDescription() { return getVocabulary().getDescription(); } + @Override public boolean isManagedInternally() { return getVocabulary().isManagedInternally(); } + @Override public boolean isInternalNamespace() { return getVocabulary().isInternalNamespace(); } + @Override public boolean isChosenFromList() { return getVocabulary().isChosenFromList(); } + @Override public String getUrlTemplate() { return getVocabulary().getURLTemplate(); } + @Override public List<IVocabularyTermImmutable> getTerms() { List<IVocabularyTermImmutable> terms = new ArrayList<IVocabularyTermImmutable>(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/VocabularyTerm.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/VocabularyTerm.java index a198c47d11a..060c2567418 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/VocabularyTerm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/VocabularyTerm.java @@ -30,11 +30,13 @@ public class VocabularyTerm extends VocabularyTermImmutable implements IVocabula getVocabularyTerm().setCode(code); } + @Override public void setDescription(String description) { getVocabularyTerm().setDescription(description); } + @Override public void setLabel(String label) { getVocabularyTerm().setLabel(label); @@ -48,6 +50,7 @@ public class VocabularyTerm extends VocabularyTermImmutable implements IVocabula getVocabularyTerm().setUrl(url); } + @Override public void setOrdinal(Long ordinal) { getVocabularyTerm().setOrdinal(ordinal); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/VocabularyTermImmutable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/VocabularyTermImmutable.java index f9d78932438..1fff156a60a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/VocabularyTermImmutable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/jython/api/v1/impl/VocabularyTermImmutable.java @@ -37,26 +37,31 @@ public class VocabularyTermImmutable implements IVocabularyTermImmutable return vocabularyTerm; } + @Override public String getCode() { return getVocabularyTerm().getCode(); } + @Override public String getDescription() { return getVocabularyTerm().getDescription(); } + @Override public String getLabel() { return getVocabularyTerm().getLabel(); } + @Override public String getUrl() { return getVocabularyTerm().getUrl(); } + @Override public Long getOrdinal() { return getVocabularyTerm().getOrdinal(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/plugin/AbstractPluginRegistry.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/plugin/AbstractPluginRegistry.java index 341b0b4255e..84fdd3cf188 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/plugin/AbstractPluginRegistry.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/plugin/AbstractPluginRegistry.java @@ -130,6 +130,7 @@ abstract class AbstractPluginRegistry<P extends IServerPlugin> implements BeanFa // BeanFactoryAware // + @Override @SuppressWarnings("unchecked") public final void setBeanFactory(final BeanFactory beanFactory) throws BeansException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/DataSetRegistrationSummaryTask.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/DataSetRegistrationSummaryTask.java index 45d9461f95f..05b2b098e07 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/DataSetRegistrationSummaryTask.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/DataSetRegistrationSummaryTask.java @@ -23,7 +23,6 @@ import java.util.Calendar; import java.util.Collections; import java.util.Comparator; import java.util.Date; -import java.util.GregorianCalendar; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -147,6 +146,7 @@ public class DataSetRegistrationSummaryTask implements IMaintenanceTask this.mailClient = mailClient; } + @Override public void setUp(String pluginName, Properties properties) { daysOfWeek = extractDays(properties, DAYS_OF_WEEK_KEY, ""); @@ -217,6 +217,7 @@ public class DataSetRegistrationSummaryTask implements IMaintenanceTask return list; } + @Override public void execute() { if (isDay() == false) @@ -283,6 +284,7 @@ public class DataSetRegistrationSummaryTask implements IMaintenanceTask } Collections.sort(newDataSets, new Comparator<ExternalData>() { + @Override public int compare(ExternalData d1, ExternalData d2) { return d1.getCode().compareTo(d2.getCode()); @@ -406,6 +408,7 @@ public class DataSetRegistrationSummaryTask implements IMaintenanceTask List<DataSetType> dataSetTypes = server.listDataSetTypes(sessionToken); Collections.sort(dataSetTypes, new Comparator<DataSetType>() { + @Override public int compare(DataSetType t1, DataSetType t2) { return t1.getCode().compareTo(t2.getCode()); @@ -416,7 +419,7 @@ public class DataSetRegistrationSummaryTask implements IMaintenanceTask private boolean isDay() { - Calendar calendar = GregorianCalendar.getInstance(); + Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(timeProvider.getTimeInMilliseconds()); return isDay(calendar); } @@ -427,7 +430,7 @@ public class DataSetRegistrationSummaryTask implements IMaintenanceTask private long getStart() { long time = timeProvider.getTimeInMilliseconds(); - Calendar calendar = GregorianCalendar.getInstance(); + Calendar calendar = Calendar.getInstance(); do { time -= DateUtils.MILLIS_PER_DAY; @@ -441,7 +444,7 @@ public class DataSetRegistrationSummaryTask implements IMaintenanceTask */ private long getEnd() { - Calendar calendar = GregorianCalendar.getInstance(); + Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(timeProvider.getTimeInMilliseconds()); return calendar.getTimeInMillis(); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/DemoMaintenanceTask.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/DemoMaintenanceTask.java index 5d3b8eff8c2..88436451f0d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/DemoMaintenanceTask.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/DemoMaintenanceTask.java @@ -41,6 +41,7 @@ public class DemoMaintenanceTask implements IMaintenanceTask private static final Logger operationLog = LogFactory.getLogger(LogCategory.OPERATION, DemoMaintenanceTask.class); + @Override public void execute() { IProjectDAO projectDAO = CommonServiceProvider.getDAOFactory().getProjectDAO(); @@ -60,6 +61,7 @@ public class DemoMaintenanceTask implements IMaintenanceTask operationLog.info("task executed"); } + @Override public void setUp(String pluginName, Properties properties) { operationLog.info("Plugin " + pluginName + " initialized with properties:\n" + properties); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/DynamicPropertyEvaluationMaintenanceTask.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/DynamicPropertyEvaluationMaintenanceTask.java index 3ec0611edfa..8303cf81cdb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/DynamicPropertyEvaluationMaintenanceTask.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/DynamicPropertyEvaluationMaintenanceTask.java @@ -55,6 +55,7 @@ public class DynamicPropertyEvaluationMaintenanceTask implements IMaintenanceTas entityClasses.add(SamplePE.class); } + @Override public void execute() { operationLog.info("execution started"); @@ -73,6 +74,7 @@ public class DynamicPropertyEvaluationMaintenanceTask implements IMaintenanceTas operationLog.info("task executed"); } + @Override public void setUp(String pluginName, Properties properties) { operationLog.info("Task " + pluginName + " initialized."); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/MaterialExternalDBSyncTask.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/MaterialExternalDBSyncTask.java index 6a307b7bc7e..1035149ac9d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/MaterialExternalDBSyncTask.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/MaterialExternalDBSyncTask.java @@ -313,6 +313,7 @@ public class MaterialExternalDBSyncTask implements IMaintenanceTask { return new BatchPreparedStatementSetter() { + @Override public void setValues(PreparedStatement ps, int index) throws SQLException { Material material = materials.get(index); @@ -346,6 +347,7 @@ public class MaterialExternalDBSyncTask implements IMaintenanceTask } } + @Override public int getBatchSize() { return materials.size(); @@ -402,6 +404,7 @@ public class MaterialExternalDBSyncTask implements IMaintenanceTask this.timeProvider = timeProvider; } + @Override public void setUp(String pluginName, Properties properties) { dbConfigurationContext = new SimpleDatabaseConfigurationContext(properties); @@ -435,6 +438,7 @@ public class MaterialExternalDBSyncTask implements IMaintenanceTask checkTimestampReadingWriting(); } + @Override public void execute() { SessionContextDTO contextOrNull = server.tryToAuthenticateAsSystem(); @@ -501,6 +505,7 @@ public class MaterialExternalDBSyncTask implements IMaintenanceTask JdbcUtils.extractDatabaseMetaData(dbConfigurationContext.getDataSource(), new DatabaseMetaDataCallback() { + @Override public Object processMetaData(DatabaseMetaData metaData) throws SQLException, MetaDataAccessException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/RemoveUnusedUnofficialTermsMaintenanceTask.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/RemoveUnusedUnofficialTermsMaintenanceTask.java index 279ae9d5fa4..458dcae9be1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/RemoveUnusedUnofficialTermsMaintenanceTask.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/task/RemoveUnusedUnofficialTermsMaintenanceTask.java @@ -54,6 +54,7 @@ public class RemoveUnusedUnofficialTermsMaintenanceTask implements IMaintenanceT private final double day = 86400000.0; + @Override public void setUp(String pluginName, Properties properties) { double olderThanDouble = @@ -64,6 +65,7 @@ public class RemoveUnusedUnofficialTermsMaintenanceTask implements IMaintenanceT + olderThan + " milliseconds) will be removed."); } + @Override public void execute() { ICommonServerForInternalUse server = CommonServiceProvider.getCommonServer(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/GroupIdentifierHelper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/GroupIdentifierHelper.java index 69bf830c832..0ff914a9519 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/GroupIdentifierHelper.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/GroupIdentifierHelper.java @@ -151,17 +151,20 @@ public final class GroupIdentifierHelper return new IDatabaseInstanceFinder() { + @Override public DatabaseInstancePE getHomeDatabaseInstance() { return daoFactory.getHomeDatabaseInstance(); } + @Override public DatabaseInstancePE tryFindDatabaseInstanceByCode( final String databaseInstanceCode) { return databaseInstancesByCode.tryGet(databaseInstanceCode); } + @Override public DatabaseInstancePE tryFindDatabaseInstanceByUUID( final String databaseInstanceUUID) { @@ -179,11 +182,13 @@ public final class GroupIdentifierHelper { return new IDatabaseInstanceFinder() { + @Override public DatabaseInstancePE getHomeDatabaseInstance() { return daoFactory.getHomeDatabaseInstance(); } + @Override public DatabaseInstancePE tryFindDatabaseInstanceByCode( final String databaseInstanceCode) { @@ -191,6 +196,7 @@ public final class GroupIdentifierHelper databaseInstanceCode); } + @Override public DatabaseInstancePE tryFindDatabaseInstanceByUUID( final String databaseInstanceUUID) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/KeyExtractorFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/KeyExtractorFactory.java index a85afcc37f8..b1fa6940427 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/KeyExtractorFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/KeyExtractorFactory.java @@ -180,6 +180,7 @@ public final class KeyExtractorFactory // IKeyExtractor // + @Override public final Long getKey(final IIdHolder id) { return id.getId(); @@ -193,6 +194,7 @@ public final class KeyExtractorFactory // IKeyExtractor // + @Override public final String getKey(final ICodeHolder id) { return id.getCode(); @@ -207,6 +209,7 @@ public final class KeyExtractorFactory // IKeyExtractor // + @Override public final String getKey(final PersonPE e) { return e.getUserId(); @@ -221,6 +224,7 @@ public final class KeyExtractorFactory // IKeyExtractor // + @Override public final String getKey(final AuthorizationGroupPE e) { return e.getCode(); @@ -235,6 +239,7 @@ public final class KeyExtractorFactory // IKeyExtractor // + @Override public final String getKey(final DatabaseInstancePE e) { return e.getUuid(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/LifeCycleListener.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/LifeCycleListener.java index 95ae890e8f8..749f47e28a6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/LifeCycleListener.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/LifeCycleListener.java @@ -27,6 +27,7 @@ import org.eclipse.jetty.util.component.LifeCycle; public class LifeCycleListener implements LifeCycle.Listener { + @Override public void lifeCycleFailure(LifeCycle lifeCycle, Throwable throwable) { System.err.println("ERROR: Failed component " + lifeCycle + ": " + throwable); @@ -40,20 +41,24 @@ public class LifeCycleListener implements LifeCycle.Listener } } + @Override public void lifeCycleStarted(LifeCycle lifeCycle) { System.out.println("SERVER STARTED: " + lifeCycle); } + @Override public void lifeCycleStarting(LifeCycle lifeCycle) { System.out.println("STARTING SERVER: " + lifeCycle); } + @Override public void lifeCycleStopped(LifeCycle lifeCycle) { } + @Override public void lifeCycleStopping(LifeCycle lifeCycle) { } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerLogger.java index 4a12bed3e0a..9467d1a4e9e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerLogger.java @@ -204,6 +204,7 @@ public abstract class AbstractServerLogger implements IServer // ISessionProvider // + @Override public final IAuthSession getAuthSession(final String sessionToken) throws UserFailureException { return null; @@ -213,74 +214,87 @@ public abstract class AbstractServerLogger implements IServer // IServer // + @Override public final int getVersion() { return IServer.VERSION; } + @Override public final SessionContextDTO tryToAuthenticate(final String user, final String password) { // No logging because already done by the session manager return null; } + @Override public SessionContextDTO tryToAuthenticateAnonymously() { return null; } + @Override public SessionContextDTO tryGetSession(String sessionToken) { logAccess(sessionToken, "tryGetCurrentSession"); return null; } + @Override public final void logout(final String sessionToken) throws UserFailureException { // No logging because already done by the session manager } + @Override public boolean isArchivingConfigured(String sessionToken) { // Do not log that return false; } + @Override public void saveDisplaySettings(String sessionToken, DisplaySettings displaySettings, int maxEntityVisits) { logTracking(sessionToken, "save_display_settings", ""); } + @Override public DisplaySettings getDefaultDisplaySettings(String sessionToken) { logTracking(sessionToken, "get_default_display_settings", ""); return null; } + @Override public void changeUserHomeSpace(String sessionToken, TechId spaceIdOrNull) { String spaceId = spaceIdOrNull == null ? "null" : spaceIdOrNull.toString(); logTracking(sessionToken, "change_user_home_space", "SPACE_ID (%s)", spaceId); } + @Override public List<GridCustomColumn> listGridCustomColumns(String sessionToken, String gridId) { logAccess(sessionToken, "listGridCustomColumns", "GRID_ID(%s)", gridId); return null; } + @Override public void setBaseIndexURL(String sessionToken, String baseURL) { logAccess(sessionToken, "set_base_url", "BASE_URL(%s)", baseURL); } + @Override public String getBaseIndexURL(String sessionToken) { logAccess(sessionToken, "get_base_url", ""); return null; } + @Override public void setSessionUser(String sessionToken, String userID) { logMessage(authLog, Level.INFO, sessionToken, "set_session_user", "USER(%s)", new Object[] diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java index fc09df9995a..f9fb2ce1aeb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java @@ -1383,6 +1383,7 @@ public interface ICommonServer extends IServer /** * Lists columns available for selected grid. */ + @Override @Transactional @RolesAllowed(RoleWithHierarchy.SPACE_OBSERVER) @ReturnValueFilter(validatorClass = ExpressionValidator.class) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/LogMessagePrefixGenerator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/LogMessagePrefixGenerator.java index c2d29bb76fd..68264226c46 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/LogMessagePrefixGenerator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/LogMessagePrefixGenerator.java @@ -25,6 +25,7 @@ public final class LogMessagePrefixGenerator implements ILogMessagePrefixGenerat { static final String UNDEFINED = "<UNDEFINED>"; + @Override public String createPrefix(Session sessionOrNull) { if (sessionOrNull == null) @@ -46,6 +47,7 @@ public final class LogMessagePrefixGenerator implements ILogMessagePrefixGenerat return createPrefix(userName, groupCode, remoteHost); } + @Override public String createPrefix(String user, String remoteHost) { return createPrefix(user, null, remoteHost); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/OpenBisServiceFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/OpenBisServiceFactory.java index c9411843d8f..f63e3314eff 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/OpenBisServiceFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/OpenBisServiceFactory.java @@ -84,6 +84,7 @@ public class OpenBisServiceFactory { return new IServicePinger<IETLLIMSService>() { + @Override public void ping(IETLLIMSService service) { service.getVersion(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/Translator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/Translator.java index 92fff2e5b39..02328dc34bb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/Translator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/Translator.java @@ -287,6 +287,7 @@ public class Translator Collections.sort(sortedTerms, new Comparator<ch.systemsx.cisd.openbis.generic.shared.basic.dto.VocabularyTerm>() { + @Override public int compare( ch.systemsx.cisd.openbis.generic.shared.basic.dto.VocabularyTerm o1, ch.systemsx.cisd.openbis.generic.shared.basic.dto.VocabularyTerm o2) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractDatabaseInstancePredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractDatabaseInstancePredicate.java index 08df288f08a..6a0a39247fb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractDatabaseInstancePredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractDatabaseInstancePredicate.java @@ -45,6 +45,7 @@ abstract class AbstractDatabaseInstancePredicate<T> extends AbstractPredicate<T> // AbstractPredicate // + @Override public void init(IAuthorizationDataProvider provider) { assert initialized == false : "Already initialized"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractExpressionPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractExpressionPredicate.java index 2c4d27cdd05..eabb86f8f3a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractExpressionPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractExpressionPredicate.java @@ -125,6 +125,7 @@ abstract public class AbstractExpressionPredicate<T> extends AbstractPredicate<T return description; } + @Override public void init(IAuthorizationDataProvider provider) { this.authorizationDataProvider = provider; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractPredicate.java index 5f9ccc9e602..3fbc03d775f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractPredicate.java @@ -60,6 +60,7 @@ abstract class AbstractPredicate<T> implements IPredicate<T> // IPredicate // + @Override public final Status evaluate(final PersonPE person, final List<RoleWithIdentifier> allowedRoles, final T valueOrNull) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ArrayPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ArrayPredicate.java index 8a93f2fcdb9..2167dad04e5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ArrayPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ArrayPredicate.java @@ -48,6 +48,7 @@ public final class ArrayPredicate<T> extends AbstractPredicate<T[]> // AbstractPredicate // + @Override public final void init(IAuthorizationDataProvider provider) { predicate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AtomicOperationsPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AtomicOperationsPredicate.java index 5334a284b8c..190341ae9a0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AtomicOperationsPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AtomicOperationsPredicate.java @@ -62,6 +62,7 @@ public class AtomicOperationsPredicate extends AbstractPredicate<AtomicEntityOpe experimentOwnerIdentifierPredicate = new ExistingSpaceIdentifierPredicate(); } + @Override public void init(IAuthorizationDataProvider provider) { newExperimentPredicate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/CollectionPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/CollectionPredicate.java index bc0dd639a4a..0aadeb4766d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/CollectionPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/CollectionPredicate.java @@ -49,6 +49,7 @@ public final class CollectionPredicate<T> extends AbstractPredicate<Collection<T // AbstractPredicate // + @Override public final void init(IAuthorizationDataProvider provider) { predicate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DataSetUpdatesPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DataSetUpdatesPredicate.java index cbdb99dff92..c4eb44c2546 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DataSetUpdatesPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DataSetUpdatesPredicate.java @@ -45,6 +45,7 @@ public class DataSetUpdatesPredicate extends AbstractPredicate<DataSetUpdatesDTO this.samplePredicate = new SampleOwnerIdentifierPredicate(); } + @Override public final void init(IAuthorizationDataProvider provider) { dataSetTechIdPredicate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DelegatedNullableAbstractPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DelegatedNullableAbstractPredicate.java index 6b8f7e0a87c..c652fb20158 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DelegatedNullableAbstractPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DelegatedNullableAbstractPredicate.java @@ -42,6 +42,7 @@ abstract class DelegatedNullableAbstractPredicate<T> extends AbstractPredicate<T // AbstractPredicate // + @Override public final void init(IAuthorizationDataProvider provider) { delegate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DelegatedPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DelegatedPredicate.java index f0071a342fd..456841a69d7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DelegatedPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DelegatedPredicate.java @@ -55,6 +55,7 @@ public abstract class DelegatedPredicate<P, T> extends AbstractPredicate<T> // AbstractPredicate // + @Override public final void init(IAuthorizationDataProvider provider) { this.authorizationDataProvider = provider; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ExperimentUpdatesPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ExperimentUpdatesPredicate.java index 69d0cba157d..69219e167ca 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ExperimentUpdatesPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ExperimentUpdatesPredicate.java @@ -44,6 +44,7 @@ public class ExperimentUpdatesPredicate extends AbstractPredicate<ExperimentUpda this.spacePredicate = new SpaceIdentifierPredicate(); } + @Override public final void init(IAuthorizationDataProvider provider) { experimentTechIdPredicate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSamplesByPropertyPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSamplesByPropertyPredicate.java index bd3dd421b5f..48ae133b42e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSamplesByPropertyPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSamplesByPropertyPredicate.java @@ -41,6 +41,7 @@ public class ListSamplesByPropertyPredicate extends this.spacePredicate = new SpaceIdentifierPredicate(); } + @Override public final void init(IAuthorizationDataProvider provider) { spacePredicate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewDataSetsWithTypePredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewDataSetsWithTypePredicate.java index c58a1c1d48f..c3979269ad5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewDataSetsWithTypePredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewDataSetsWithTypePredicate.java @@ -62,6 +62,7 @@ public class NewDataSetsWithTypePredicate extends AbstractPredicate<NewDataSetsW } + @Override public void init(IAuthorizationDataProvider provider) { dataSetCodeCollectionPredicate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewExperimentsWithTypePredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewExperimentsWithTypePredicate.java index 1ea59fee774..19e874d7135 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewExperimentsWithTypePredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewExperimentsWithTypePredicate.java @@ -39,6 +39,7 @@ public final class NewExperimentsWithTypePredicate extends private final IPredicate<SpaceIdentifier> delegate; + @Override public final void init(IAuthorizationDataProvider provider) { delegate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplesWithTypePredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplesWithTypePredicate.java index ae2afd3a676..dfa1ba23277 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplesWithTypePredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplesWithTypePredicate.java @@ -37,6 +37,7 @@ public final class NewSamplesWithTypePredicate extends AbstractPredicate<NewSamp private final IPredicate<SampleOwnerIdentifier> delegate; + @Override public final void init(IAuthorizationDataProvider provider) { delegate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ProjectUpdatesPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ProjectUpdatesPredicate.java index 308d3f67a7c..0f8241f5aae 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ProjectUpdatesPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ProjectUpdatesPredicate.java @@ -46,6 +46,7 @@ public class ProjectUpdatesPredicate extends AbstractPredicate<ProjectUpdatesDTO this.projectTechIdPredicate = new ProjectTechIdPredicate(); } + @Override public final void init(IAuthorizationDataProvider provider) { spacePredicate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/RevertDeletionPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/RevertDeletionPredicate.java index 52f015aa3de..77a2efc2d63 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/RevertDeletionPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/RevertDeletionPredicate.java @@ -46,6 +46,7 @@ public class RevertDeletionPredicate extends AbstractPredicate<List<TechId>> this.deletionTechIdCollectionPredicate = new DeletionTechIdCollectionPredicate(); } + @Override public void init(@SuppressWarnings("hiding") IAuthorizationDataProvider provider) { this.provider = provider; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierCollectionPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierCollectionPredicate.java index 45fc86cedb5..4dd977a6dee 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierCollectionPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierCollectionPredicate.java @@ -53,6 +53,7 @@ public final class SampleOwnerIdentifierCollectionPredicate extends // AbstractPredicate // + @Override public final void init(IAuthorizationDataProvider provider) { spacePredicate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierPredicate.java index 79929218389..1d2f1e3d585 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierPredicate.java @@ -55,6 +55,7 @@ public class SampleOwnerIdentifierPredicate extends AbstractPredicate<SampleOwne // AbstractPredicate // + @Override public final void init(IAuthorizationDataProvider provider) { spacePredicate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleUpdatesPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleUpdatesPredicate.java index 988ec42c183..efeb7d4a145 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleUpdatesPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleUpdatesPredicate.java @@ -46,6 +46,7 @@ public class SampleUpdatesPredicate extends AbstractPredicate<SampleUpdatesDTO> this.samplePredicate = new SampleOwnerIdentifierPredicate(); } + @Override public final void init(IAuthorizationDataProvider provider) { sampleTechIdPredicate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/UpdatedExperimentsWithTypePredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/UpdatedExperimentsWithTypePredicate.java index ef313e2b1cf..ecf21b5adb3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/UpdatedExperimentsWithTypePredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/UpdatedExperimentsWithTypePredicate.java @@ -39,6 +39,7 @@ public final class UpdatedExperimentsWithTypePredicate extends private final IPredicate<SpaceIdentifier> delegate; + @Override public final void init(IAuthorizationDataProvider provider) { delegate.init(provider); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/AbstractIdentifierValidator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/AbstractIdentifierValidator.java index 3f01ce7a810..bc7233ba9a5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/AbstractIdentifierValidator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/AbstractIdentifierValidator.java @@ -35,6 +35,7 @@ abstract class AbstractIdentifierValidator extends AbstractValidator<IIdentifier final String spaceCodeOrNull = extractSpaceCodeOrNull(value.getIdentifier()); return spaceValidator.isValid(person, new ICodeHolder() { + @Override public String getCode() { return spaceCodeOrNull; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/AbstractValidator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/AbstractValidator.java index 795900e865d..70e8f5ec7dd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/AbstractValidator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/AbstractValidator.java @@ -42,6 +42,7 @@ public abstract class AbstractValidator<T> implements IValidator<T> // IValidator // + @Override public final boolean isValid(final PersonPE person, final T value) { assert person != null : "Unspecified person"; @@ -49,6 +50,7 @@ public abstract class AbstractValidator<T> implements IValidator<T> return doValidation(person, value); } + @Override public void init( @SuppressWarnings("hiding") IAuthorizationDataProvider authorizationDataProvider) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/DataSetByExperimentIdentifierValidator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/DataSetByExperimentIdentifierValidator.java index 1d78536c5d0..854676b8afd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/DataSetByExperimentIdentifierValidator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/DataSetByExperimentIdentifierValidator.java @@ -34,6 +34,7 @@ public class DataSetByExperimentIdentifierValidator extends AbstractValidator<Da { return validator.isValid(person, new IIdentifierHolder() { + @Override public String getIdentifier() { return value.getExperimentIdentifier(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/BasicEntityInformationHolder.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/BasicEntityInformationHolder.java index 75bbe46dd78..7cde4ef900a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/BasicEntityInformationHolder.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/BasicEntityInformationHolder.java @@ -60,26 +60,31 @@ public class BasicEntityInformationHolder implements IEntityInformationHolderWit this.permId = permId; } + @Override public EntityKind getEntityKind() { return entityKind; } + @Override public BasicEntityType getEntityType() { return entityType; } + @Override public String getCode() { return code; } + @Override public Long getId() { return id; } + @Override public String getPermId() { return permId; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/EntityVisitComparatorByTimeStamp.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/EntityVisitComparatorByTimeStamp.java index eecf0089fcc..dc60c0a532f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/EntityVisitComparatorByTimeStamp.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/EntityVisitComparatorByTimeStamp.java @@ -11,6 +11,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityVisit; */ public class EntityVisitComparatorByTimeStamp implements Comparator<EntityVisit> { + @Override public int compare(EntityVisit o1, EntityVisit o2) { long t1 = o1.getTimeStamp(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/PrimitiveValue.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/PrimitiveValue.java index dbd07be81e4..75978177271 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/PrimitiveValue.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/PrimitiveValue.java @@ -87,6 +87,7 @@ public class PrimitiveValue implements IsSerializable, Serializable, Comparable< } } + @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public int compareTo(PrimitiveValue o) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AbstractEntityProperty.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AbstractEntityProperty.java index 80882990156..df9eb401234 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AbstractEntityProperty.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AbstractEntityProperty.java @@ -36,16 +36,19 @@ public abstract class AbstractEntityProperty implements IEntityProperty private boolean scriptable; + @Override public PropertyType getPropertyType() { return propertyType; } + @Override public void setPropertyType(PropertyType propertyType) { this.propertyType = propertyType; } + @Override public String tryGetAsString() { if (propertyType == null) @@ -71,48 +74,58 @@ public abstract class AbstractEntityProperty implements IEntityProperty } } + @Override public String tryGetOriginalValue() { return tryGetAsString(); } + @Override public String getValue() { return null; } + @Override public void setValue(String value) { } + @Override public Material getMaterial() { return null; } + @Override public void setMaterial(Material material) { } + @Override public VocabularyTerm getVocabularyTerm() { return null; } + @Override public void setVocabularyTerm(VocabularyTerm vocabularyTerm) { } + @Override public void setOrdinal(Long ordinal) { this.ordinal = ordinal; } + @Override public Long getOrdinal() { return ordinal; } + @Override public boolean isManaged() { return false; @@ -123,6 +136,7 @@ public abstract class AbstractEntityProperty implements IEntityProperty this.scriptable = scriptable; } + @Override public boolean isScriptable() { return scriptable; @@ -142,6 +156,7 @@ public abstract class AbstractEntityProperty implements IEntityProperty // Comparable // + @Override public int compareTo(IEntityProperty o) { Long thisOrdinal = this.getOrdinal(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AbstractExpression.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AbstractExpression.java index 44614aa782d..25a45d0d855 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AbstractExpression.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AbstractExpression.java @@ -49,6 +49,7 @@ public abstract class AbstractExpression extends AbstractRegistrationHolder impl { } + @Override public String getName() { return name; @@ -59,6 +60,7 @@ public abstract class AbstractExpression extends AbstractRegistrationHolder impl this.name = name; } + @Override public String getExpression() { return expression; @@ -69,6 +71,7 @@ public abstract class AbstractExpression extends AbstractRegistrationHolder impl this.expression = expression; } + @Override public boolean isPublic() { return isPublic; @@ -89,6 +92,7 @@ public abstract class AbstractExpression extends AbstractRegistrationHolder impl this.modificationDate = modificationDate; } + @Override public String getDescription() { return description; @@ -104,6 +108,7 @@ public abstract class AbstractExpression extends AbstractRegistrationHolder impl this.id = id; } + @Override public Long getId() { return id; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Attachment.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Attachment.java index 57fdcf30826..4166f2f581b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Attachment.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Attachment.java @@ -41,6 +41,7 @@ public class Attachment extends AbstractRegistrationHolder implements Comparable { } + @Override public int compareTo(final Attachment o) { final int byFile = getFileName().compareTo(o.getFileName()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AttachmentVersions.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AttachmentVersions.java index ed3b5dfc79d..c46ce00ddab 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AttachmentVersions.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AttachmentVersions.java @@ -43,6 +43,7 @@ public class AttachmentVersions implements Comparable<AttachmentVersions>, Seria this.current = versions.get(versions.size() - 1); } + @Override public int compareTo(final AttachmentVersions o) { return getCurrent().getFileName().compareTo(o.getCurrent().getFileName()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AuthorizationGroup.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AuthorizationGroup.java index 24b42d3e033..ebd880b4efe 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AuthorizationGroup.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/AuthorizationGroup.java @@ -70,6 +70,7 @@ public class AuthorizationGroup extends AbstractRegistrationHolder implements this.databaseInstance = databaseInstance; } + @Override public Long getId() { return id; @@ -81,6 +82,7 @@ public class AuthorizationGroup extends AbstractRegistrationHolder implements return code; } + @Override public int compareTo(final AuthorizationGroup o) { if (o == null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/CodeWithRegistrationAndModificationDate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/CodeWithRegistrationAndModificationDate.java index 3613d3bf4b2..6b2f25944ea 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/CodeWithRegistrationAndModificationDate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/CodeWithRegistrationAndModificationDate.java @@ -42,6 +42,7 @@ public class CodeWithRegistrationAndModificationDate<T extends CodeWithRegistrat this.modificationDate = modificationDate; } + @Override public final Person getModifier() { return modifier; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/CorePlugin.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/CorePlugin.java index 16e93a612ee..08fd4fc298e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/CorePlugin.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/CorePlugin.java @@ -43,6 +43,7 @@ public class CorePlugin implements Comparable<CorePlugin> return version; } + @Override public int compareTo(CorePlugin other) { int result = name.compareTo(other.name); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSet.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSet.java index e80fe87806e..dc6435dcce5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSet.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSet.java @@ -144,11 +144,13 @@ public class DataSet extends ExternalData implements IDatasetLocation } // IDatasetLocation + @Override public String getDataSetLocation() { return getLocation(); } + @Override public String getDataSetCode() { return getCode(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetAttributeSearchFieldKind.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetAttributeSearchFieldKind.java index bd717eb6e64..c354c31e4da 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetAttributeSearchFieldKind.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DataSetAttributeSearchFieldKind.java @@ -54,11 +54,13 @@ public enum DataSetAttributeSearchFieldKind implements Serializable, IAttributeS this.description = description; } + @Override public String getDescription() { return description; } + @Override public String getCode() { return name(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DatasetLocation.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DatasetLocation.java index dc3e6af44ae..6b311ec3709 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DatasetLocation.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DatasetLocation.java @@ -33,6 +33,7 @@ public class DatasetLocation implements IDatasetLocation, Serializable, ICodeHol private String dataSetLocation; + @Override public String getDataSetLocation() { return dataSetLocation; @@ -43,6 +44,7 @@ public class DatasetLocation implements IDatasetLocation, Serializable, ICodeHol this.dataSetLocation = dataSetLocation; } + @Override public String getDataSetCode() { return datasetCode; @@ -59,6 +61,7 @@ public class DatasetLocation implements IDatasetLocation, Serializable, ICodeHol return "Dataset[" + datasetCode + "], location[" + dataSetLocation + "]"; } + @Override public String getCode() { return getDataSetCode(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DatastoreServiceDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DatastoreServiceDescription.java index c7f285a2f9d..f6dbf33f77c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DatastoreServiceDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DatastoreServiceDescription.java @@ -88,6 +88,7 @@ public class DatastoreServiceDescription implements IReportInformationProvider, } /** the unique key of the plugin */ + @Override public String getKey() { return key; @@ -115,6 +116,7 @@ public class DatastoreServiceDescription implements IReportInformationProvider, return datastoreCode; } + @Override public String getDownloadURL() { return downloadURL; @@ -170,6 +172,7 @@ public class DatastoreServiceDescription implements IReportInformationProvider, // Comparable // + @Override public int compareTo(DatastoreServiceDescription o) { return this.getLabel().compareTo(o.getLabel()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DateTableCell.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DateTableCell.java index b3ce0526263..57ec6454be6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DateTableCell.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DateTableCell.java @@ -44,6 +44,7 @@ public class DateTableCell implements ISerializableComparable return new Date(dateTime); } + @Override public int compareTo(ISerializableComparable o) { if (o instanceof DateTableCell) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DeletedDataSet.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DeletedDataSet.java index 5a8ef6ed772..141a65c1e8a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DeletedDataSet.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DeletedDataSet.java @@ -53,6 +53,7 @@ public class DeletedDataSet implements Serializable, ICodeHolder return identifier; } + @Override public String getCode() { return getIdentifier(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DeletedDataSetLocation.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DeletedDataSetLocation.java index aee627488fa..8d2db5a6070 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DeletedDataSetLocation.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DeletedDataSetLocation.java @@ -52,6 +52,7 @@ public class DeletedDataSetLocation implements IDeletedDataSetLocation, Serializ { } + @Override public String getDatastoreCode() { return datastoreCode; @@ -62,6 +63,7 @@ public class DeletedDataSetLocation implements IDeletedDataSetLocation, Serializ this.datastoreCode = datastoreCode; } + @Override public String getShareId() { return shareId; @@ -72,6 +74,7 @@ public class DeletedDataSetLocation implements IDeletedDataSetLocation, Serializ this.shareId = shareId; } + @Override public String getLocation() { return location; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DeletedEntity.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DeletedEntity.java index c999fb391dc..bd0a9c05293 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DeletedEntity.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DeletedEntity.java @@ -56,31 +56,37 @@ public class DeletedEntity implements IEntityInformationHolderWithIdentifier this.entityKind = entityKind; } + @Override public String getIdentifier() { return identifier; } + @Override public BasicEntityType getEntityType() { return entityType; } + @Override public EntityKind getEntityKind() { return entityKind; } + @Override public Long getId() { return id; } + @Override public String getCode() { return code; } + @Override public String getPermId() { return permId; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Deletion.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Deletion.java index df06a27b8f6..599b972fd1d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Deletion.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Deletion.java @@ -49,6 +49,7 @@ public final class Deletion extends AbstractRegistrationHolder implements IIdHol this.reasonOrNull = reasonOrNull; } + @Override public Long getId() { return id; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DoubleTableCell.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DoubleTableCell.java index a9ef132b623..44c2b7d2f99 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DoubleTableCell.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DoubleTableCell.java @@ -37,6 +37,7 @@ public class DoubleTableCell implements ISerializableComparable return number; } + @Override public int compareTo(ISerializableComparable o) { if (o instanceof DoubleTableCell) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DssLinkTableCell.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DssLinkTableCell.java index e9db6914b1d..0bf754c485d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DssLinkTableCell.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/DssLinkTableCell.java @@ -54,6 +54,7 @@ public class DssLinkTableCell implements ISerializableComparable return linkModel; } + @Override public int compareTo(ISerializableComparable o) { return toString().compareTo(String.valueOf(o)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityReference.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityReference.java index 2c17a58070a..24896499ae1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityReference.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityReference.java @@ -56,21 +56,25 @@ public class EntityReference implements Serializable, IEntityInformationHolderWi this.permIdOrNull = permIdOrNull; } + @Override public EntityKind getEntityKind() { return kind; } + @Override public BasicEntityType getEntityType() { return new BasicEntityType(typeCode); } + @Override public Long getId() { return id; } + @Override public String getCode() { return code; @@ -82,6 +86,7 @@ public class EntityReference implements Serializable, IEntityInformationHolderWi return kind + " " + code + " (" + typeCode + ")"; } + @Override public String getPermId() { return permIdOrNull; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityTableCell.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityTableCell.java index b5edd6d6f49..a930ed7c259 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityTableCell.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityTableCell.java @@ -59,6 +59,7 @@ public class EntityTableCell implements ISerializableComparable this.identifierOrNull = identifierOrNull; } + @Override public int compareTo(ISerializableComparable o) { return this.toString().compareTo(o.toString()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityType.java index 66defa36080..c12df20ed3d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityType.java @@ -60,6 +60,7 @@ abstract public class EntityType extends BasicEntityType Collections.sort(etpts, new Comparator<EntityTypePropertyType<?>>() { + @Override public int compare(EntityTypePropertyType<?> o1, EntityTypePropertyType<?> o2) { return o1.getOrdinal().compareTo(o2.getOrdinal()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityTypePropertyType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityTypePropertyType.java index 69fb60c54d2..33c2a1c34db 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityTypePropertyType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/EntityTypePropertyType.java @@ -219,6 +219,7 @@ public abstract class EntityTypePropertyType<T extends EntityType> implements Se // Comparable // + @Override public final int compareTo(final EntityTypePropertyType<T> o) { assert o != null : "Unspecified entity type property type."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Experiment.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Experiment.java index a36ab3c3fe5..f14b1a56dcc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Experiment.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Experiment.java @@ -65,6 +65,7 @@ public class Experiment extends CodeWithRegistrationAndModificationDate<Experime this.permlink = permlink; } + @Override public AttachmentHolderKind getAttachmentHolderKind() { return AttachmentHolderKind.EXPERIMENT; @@ -95,6 +96,7 @@ public class Experiment extends CodeWithRegistrationAndModificationDate<Experime this.identifier = experimentIdentifier; } + @Override public List<IEntityProperty> getProperties() { return properties; @@ -105,6 +107,7 @@ public class Experiment extends CodeWithRegistrationAndModificationDate<Experime this.properties = properties; } + @Override public Deletion getDeletion() { return deletion; @@ -139,6 +142,7 @@ public class Experiment extends CodeWithRegistrationAndModificationDate<Experime // IIdentifierHolder // + @Override public final String getIdentifier() { return identifier; @@ -167,6 +171,7 @@ public class Experiment extends CodeWithRegistrationAndModificationDate<Experime return getIdentifier().compareTo(o.getIdentifier()); } + @Override public Long getId() { return id; @@ -177,11 +182,13 @@ public class Experiment extends CodeWithRegistrationAndModificationDate<Experime this.id = id; } + @Override public EntityType getEntityType() { return getExperimentType(); } + @Override public EntityKind getEntityKind() { return EntityKind.EXPERIMENT; @@ -192,6 +199,7 @@ public class Experiment extends CodeWithRegistrationAndModificationDate<Experime this.permId = permId; } + @Override public String getPermId() { return permId; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ExperimentAttributeSearchFieldKind.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ExperimentAttributeSearchFieldKind.java index 25be2c220d1..ad6003449b7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ExperimentAttributeSearchFieldKind.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ExperimentAttributeSearchFieldKind.java @@ -56,11 +56,13 @@ public enum ExperimentAttributeSearchFieldKind implements Serializable, IAttribu this.description = description; } + @Override public String getDescription() { return description; } + @Override public String getCode() { return name(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ExternalData.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ExternalData.java index 4d926c1cb67..f09985c4a3e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ExternalData.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ExternalData.java @@ -254,6 +254,7 @@ public abstract class ExternalData extends CodeWithRegistrationAndModificationDa this.size = size; } + @Override public final Deletion getDeletion() { return deletion; @@ -279,6 +280,7 @@ public abstract class ExternalData extends CodeWithRegistrationAndModificationDa this.dataSetProperties = dataSetProperties; } + @Override public List<IEntityProperty> getProperties() { return dataSetProperties; @@ -294,21 +296,25 @@ public abstract class ExternalData extends CodeWithRegistrationAndModificationDa this.dataStore = dataStore; } + @Override public EntityKind getEntityKind() { return EntityKind.DATA_SET; } + @Override public EntityType getEntityType() { return dataSetType; } + @Override public String getIdentifier() { return getCode(); } + @Override public Long getId() { return id; @@ -319,6 +325,7 @@ public abstract class ExternalData extends CodeWithRegistrationAndModificationDa this.id = id; } + @Override public String getPermId() { return getCode(); @@ -366,6 +373,7 @@ public abstract class ExternalData extends CodeWithRegistrationAndModificationDa private static final class DataSetComponentsComparator implements Comparator<ExternalData> { + @Override public int compare(ExternalData o1, ExternalData o2) { Integer order1 = o1.getOrderInContainer(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/GeneratedImageTableCell.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/GeneratedImageTableCell.java index 477a0d39bbe..eaf58a94be5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/GeneratedImageTableCell.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/GeneratedImageTableCell.java @@ -94,6 +94,7 @@ public class GeneratedImageTableCell implements ISerializableComparable parameters.put(name, value); } + @Override public int compareTo(ISerializableComparable o) { return toString().compareTo(String.valueOf(o)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Identifier.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Identifier.java index 1c44daf0727..c8173bdb6ca 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Identifier.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Identifier.java @@ -66,6 +66,7 @@ public class Identifier<T extends Identifier<T>> implements Serializable, Compar // IIdentifierHolder // + @Override public final String getIdentifier() { return identifier; @@ -75,6 +76,7 @@ public class Identifier<T extends Identifier<T>> implements Serializable, Compar // Comparable // + @Override public final int compareTo(final T o) { return IDENTIFIER_HOLDER_COMPARATOR.compare(this, o); @@ -118,6 +120,7 @@ public class Identifier<T extends Identifier<T>> implements Serializable, Compar // Comparable // + @Override public int compare(final IIdentifierHolder o1, final IIdentifierHolder o2) { assert o1 != null : "Unspecified code provider."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ImageTableCell.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ImageTableCell.java index 24f9a67ebb8..609aede0eb0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ImageTableCell.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ImageTableCell.java @@ -93,6 +93,7 @@ public class ImageTableCell implements ISerializableComparable return maxThumbnailHeight; } + @Override public int compareTo(ISerializableComparable o) { return toString().compareTo(String.valueOf(o)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/IntegerTableCell.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/IntegerTableCell.java index b679761cfde..7df4fb8a322 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/IntegerTableCell.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/IntegerTableCell.java @@ -37,6 +37,7 @@ public class IntegerTableCell implements ISerializableComparable return number; } + @Override public int compareTo(ISerializableComparable o) { if (o instanceof IntegerTableCell) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedComboBoxInputWidgetDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedComboBoxInputWidgetDescription.java index 7f9cb708ef2..5410b3c610d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedComboBoxInputWidgetDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedComboBoxInputWidgetDescription.java @@ -30,6 +30,7 @@ public class ManagedComboBoxInputWidgetDescription extends ManagedInputWidgetDes private List<String> options = new ArrayList<String>(); + @Override public ManagedInputFieldType getManagedInputFieldType() { return ManagedInputFieldType.COMBO_BOX; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedEntityProperty.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedEntityProperty.java index 93889b4171a..d60220c3da1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedEntityProperty.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedEntityProperty.java @@ -46,26 +46,31 @@ public class ManagedEntityProperty implements IEntityProperty, IManagedProperty // IManagedProperty // + @Override public boolean isOwnTab() { return ownTab; } + @Override public void setOwnTab(boolean ownTab) { this.ownTab = ownTab; } + @Override public IManagedUiDescription getUiDescription() { return uiDescription; } + @Override public String getPropertyTypeCode() { return entityProperty.getPropertyType().getCode(); } + @Override public boolean isSpecialValue() { return ManagedProperty.isSpecialValue(getValue()); @@ -75,11 +80,13 @@ public class ManagedEntityProperty implements IEntityProperty, IManagedProperty // IEntityProperty not delegated methods // + @Override public boolean isManaged() { return true; } + @Override public boolean isScriptable() { return true; @@ -89,66 +96,79 @@ public class ManagedEntityProperty implements IEntityProperty, IManagedProperty // IEntityProperty delegated methods // + @Override public String tryGetAsString() { return entityProperty.tryGetAsString(); } + @Override public String tryGetOriginalValue() { return entityProperty.tryGetOriginalValue(); } + @Override public Material getMaterial() { return entityProperty.getMaterial(); } + @Override public void setMaterial(Material material) { entityProperty.setMaterial(material); } + @Override public VocabularyTerm getVocabularyTerm() { return entityProperty.getVocabularyTerm(); } + @Override public void setVocabularyTerm(VocabularyTerm vocabularyTerm) { entityProperty.setVocabularyTerm(vocabularyTerm); } + @Override public String getValue() { return entityProperty.getValue(); } + @Override public void setValue(String value) { entityProperty.setValue(value); } + @Override public PropertyType getPropertyType() { return entityProperty.getPropertyType(); } + @Override public void setPropertyType(PropertyType propertyType) { entityProperty.setPropertyType(propertyType); } + @Override public void setOrdinal(Long ordinal) { entityProperty.setOrdinal(ordinal); } + @Override public Long getOrdinal() { return entityProperty.getOrdinal(); } + @Override public int compareTo(IEntityProperty o) { return entityProperty.compareTo(o); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedHtmlWidgetDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedHtmlWidgetDescription.java index 65d28b0c1d6..fb74439e51a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedHtmlWidgetDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedHtmlWidgetDescription.java @@ -55,6 +55,7 @@ public class ManagedHtmlWidgetDescription implements IManagedOutputWidgetDescrip // // IManagedWidgetDescription // + @Override public ManagedOutputWidgetType getManagedOutputWidgetType() { return ManagedOutputWidgetType.HTML; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedInputWidgetDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedInputWidgetDescription.java index fd41c87e3a2..bb4e5c96fef 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedInputWidgetDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedInputWidgetDescription.java @@ -37,6 +37,7 @@ public abstract class ManagedInputWidgetDescription implements IManagedInputWidg // IManagedInputWidgetDescription // + @Override public String getLabel() { return label; @@ -47,33 +48,39 @@ public abstract class ManagedInputWidgetDescription implements IManagedInputWidg this.label = label; } + @Override public String getValue() { return value; } + @Override public IManagedInputWidgetDescription setValue(String value) { this.value = value; return this; } + @Override public String getDescription() { return description; } + @Override public IManagedInputWidgetDescription setDescription(String description) { this.description = description; return this; } + @Override public boolean isMandatory() { return mandatory; } + @Override public IManagedInputWidgetDescription setMandatory(boolean mandatory) { this.mandatory = mandatory; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedMultilineTextInputWidgetDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedMultilineTextInputWidgetDescription.java index 8f0998c0dde..7eec5551c2e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedMultilineTextInputWidgetDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedMultilineTextInputWidgetDescription.java @@ -26,6 +26,7 @@ public class ManagedMultilineTextInputWidgetDescription extends ManagedInputWidg private static final long serialVersionUID = 1L; + @Override public ManagedInputFieldType getManagedInputFieldType() { return ManagedInputFieldType.MULTILINE_TEXT; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedProperty.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedProperty.java index 5d1507d5089..2da6079de2e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedProperty.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedProperty.java @@ -51,21 +51,25 @@ public class ManagedProperty implements IManagedProperty // IManagedEntityProperty // + @Override public boolean isOwnTab() { return ownTab; } + @Override public void setOwnTab(boolean ownTab) { this.ownTab = ownTab; } + @Override public IManagedUiDescription getUiDescription() { return uiDescription; } + @Override public String getPropertyTypeCode() { return propertyTypeCode; @@ -76,16 +80,19 @@ public class ManagedProperty implements IManagedProperty this.propertyTypeCode = propertyTypeCode; } + @Override public String getValue() { return value; } + @Override public boolean isSpecialValue() { return isSpecialValue(value); } + @Override public void setValue(String value) { this.value = value; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedTableWidgetDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedTableWidgetDescription.java index 6f3f09e51b0..e56d523edfd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedTableWidgetDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedTableWidgetDescription.java @@ -48,6 +48,7 @@ public class ManagedTableWidgetDescription implements IManagedOutputWidgetDescri // IManagedWidgetDescription // + @Override public ManagedOutputWidgetType getManagedOutputWidgetType() { return ManagedOutputWidgetType.TABLE; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedTextInputWidgetDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedTextInputWidgetDescription.java index 04d1a2b844b..95fa257a027 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedTextInputWidgetDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedTextInputWidgetDescription.java @@ -26,6 +26,7 @@ public class ManagedTextInputWidgetDescription extends ManagedInputWidgetDescrip private static final long serialVersionUID = 1L; + @Override public ManagedInputFieldType getManagedInputFieldType() { return ManagedInputFieldType.TEXT; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiActionDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiActionDescription.java index a77668bc3d6..c1a4582f2ff 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiActionDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiActionDescription.java @@ -53,22 +53,26 @@ public class ManagedUiActionDescription implements IManagedUiAction, Serializabl this.name = name; } + @Override public String getName() { return name; } + @Override public String getDescription() { return description; } + @Override public IManagedUiAction setDescription(String aDescription) { this.description = aDescription; return this; } + @Override public List<IManagedInputWidgetDescription> getInputWidgetDescriptions() { return inputWidgets; @@ -79,6 +83,7 @@ public class ManagedUiActionDescription implements IManagedUiAction, Serializabl this.inputWidgets = widgetDescriptions; } + @Override public void addInputWidgets(IManagedInputWidgetDescription... widgetDescriptions) { for (IManagedInputWidgetDescription widget : widgetDescriptions) @@ -87,6 +92,7 @@ public class ManagedUiActionDescription implements IManagedUiAction, Serializabl } } + @Override public String getInputValue(String inputLabel) { for (IManagedInputWidgetDescription inputDescription : getInputWidgetDescriptions()) @@ -99,6 +105,7 @@ public class ManagedUiActionDescription implements IManagedUiAction, Serializabl return null; } + @Override public IPerson getPerson() { return person; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiActionDescriptionFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiActionDescriptionFactory.java index d755c94758e..9db5d04fb3d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiActionDescriptionFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiActionDescriptionFactory.java @@ -35,6 +35,7 @@ public class ManagedUiActionDescriptionFactory implements IManagedInputWidgetDes { } + @Override public IManagedInputWidgetDescription createTextInputField(String label) { ManagedTextInputWidgetDescription inputField = new ManagedTextInputWidgetDescription(); @@ -42,6 +43,7 @@ public class ManagedUiActionDescriptionFactory implements IManagedInputWidgetDes return inputField; } + @Override public IManagedInputWidgetDescription createMultilineTextInputField(String label) { ManagedMultilineTextInputWidgetDescription inputField = @@ -50,6 +52,7 @@ public class ManagedUiActionDescriptionFactory implements IManagedInputWidgetDes return inputField; } + @Override public IManagedInputWidgetDescription createComboBoxInputField(String label, String[] values) { ManagedComboBoxInputWidgetDescription inputField = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiDescription.java index c9faabbe0f3..4cd5888baad 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiDescription.java @@ -42,6 +42,7 @@ public class ManagedUiDescription implements IManagedUiDescription, Serializable { } + @Override public IManagedOutputWidgetDescription getOutputWidgetDescription() { return outputWidget; @@ -52,6 +53,7 @@ public class ManagedUiDescription implements IManagedUiDescription, Serializable this.outputWidget = outputWidget; } + @Override public IManagedUiAction addAction(String id) { IManagedUiAction action = new ManagedUiActionDescription(id); @@ -59,6 +61,7 @@ public class ManagedUiDescription implements IManagedUiDescription, Serializable return action; } + @Override public ManagedUiTableActionDescription addTableAction(String id) { ManagedUiTableActionDescription action = new ManagedUiTableActionDescription(id); @@ -66,11 +69,13 @@ public class ManagedUiDescription implements IManagedUiDescription, Serializable return action; } + @Override public List<IManagedUiAction> getActions() { return actions; } + @Override public void useTableOutput(ITableModel tableModel) { ManagedTableWidgetDescription tableWidget = new ManagedTableWidgetDescription(); @@ -84,6 +89,7 @@ public class ManagedUiDescription implements IManagedUiDescription, Serializable setOutputWidgetDescription(tableWidget); } + @Override public void useHtmlOutput(String htmlText) { setOutputWidgetDescription(new ManagedHtmlWidgetDescription(htmlText)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiTableActionDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiTableActionDescription.java index ddcb040c687..7581366c903 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiTableActionDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ManagedUiTableActionDescription.java @@ -57,29 +57,34 @@ public class ManagedUiTableActionDescription extends ManagedUiActionDescription super(name); } + @Override public ManagedTableActionRowSelectionType getSelectionType() { return selectionType; } + @Override public IManagedUiTableAction setRowSelectionNotRequired() { selectionType = ManagedTableActionRowSelectionType.NOT_REQUIRED; return this; } + @Override public IManagedUiTableAction setRowSelectionRequired() { selectionType = ManagedTableActionRowSelectionType.REQUIRED; return this; } + @Override public IManagedUiTableAction setRowSelectionRequiredSingle() { selectionType = ManagedTableActionRowSelectionType.REQUIRED_SINGLE; return this; } + @Override public List<Integer> getSelectedRows() { return selectedRows; @@ -90,12 +95,14 @@ public class ManagedUiTableActionDescription extends ManagedUiActionDescription this.selectedRows = selectedRows; } + @Override public IManagedUiTableAction addBinding(String inputLabel, String columnTitle) { bindings.put(inputLabel, columnTitle); return this; } + @Override public Map<String, String> getBindings() { return bindings; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/MatchingEntity.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/MatchingEntity.java index 1f1b8425fb4..2b44c60693a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/MatchingEntity.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/MatchingEntity.java @@ -52,6 +52,7 @@ public final class MatchingEntity implements Serializable, IEntityInformationHol private String textFragment; + @Override public final EntityKind getEntityKind() { return entityKind; @@ -62,6 +63,7 @@ public final class MatchingEntity implements Serializable, IEntityInformationHol this.entityKind = entityKind; } + @Override public final Person getRegistrator() { return registrator; @@ -72,6 +74,7 @@ public final class MatchingEntity implements Serializable, IEntityInformationHol this.registrator = registrator; } + @Override public final BasicEntityType getEntityType() { return entityType; @@ -122,6 +125,7 @@ public final class MatchingEntity implements Serializable, IEntityInformationHol this.identifier = identifier; } + @Override public Long getId() { return id; @@ -132,6 +136,7 @@ public final class MatchingEntity implements Serializable, IEntityInformationHol this.id = id; } + @Override public String getCode() { return code; @@ -142,6 +147,7 @@ public final class MatchingEntity implements Serializable, IEntityInformationHol this.code = code; } + @Override public String getPermId() { return permId; @@ -159,26 +165,31 @@ public final class MatchingEntity implements Serializable, IEntityInformationHol { private static final long serialVersionUID = ServiceVersionHolder.VERSION; + @Override public Long getId() { return entity.getId(); } + @Override public String getCode() { return entity.getCode(); } + @Override public BasicEntityType getEntityType() { return entity.getEntityType(); } + @Override public EntityKind getEntityKind() { return entity.getEntityKind(); } + @Override public String getPermId() { return entity.getPermId(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Material.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Material.java index c3771075733..57dc91f324d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Material.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Material.java @@ -51,6 +51,7 @@ public class Material extends CodeWithRegistration<Material> implements this.materialType = experimentType; } + @Override public List<IEntityProperty> getProperties() { return properties; @@ -71,6 +72,7 @@ public class Material extends CodeWithRegistration<Material> implements this.databaseInstance = databaseInstance; } + @Override public Long getId() { return id; @@ -91,11 +93,13 @@ public class Material extends CodeWithRegistration<Material> implements this.modificationDate = modificationDate; } + @Override public EntityType getEntityType() { return getMaterialType(); } + @Override public EntityKind getEntityKind() { return EntityKind.MATERIAL; @@ -105,6 +109,7 @@ public class Material extends CodeWithRegistration<Material> implements // IIdentifierHolder // + @Override public String getIdentifier() { return new MaterialIdentifier(getCode(), getMaterialType().getCode()).print(); @@ -139,6 +144,7 @@ public class Material extends CodeWithRegistration<Material> implements return getIdentifier().compareTo(o.getIdentifier()); } + @Override public String getPermId() { return getIdentifier(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/MaterialAttributeSearchFieldKind.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/MaterialAttributeSearchFieldKind.java index 9770cbca83d..b7d3e16085b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/MaterialAttributeSearchFieldKind.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/MaterialAttributeSearchFieldKind.java @@ -52,11 +52,13 @@ public enum MaterialAttributeSearchFieldKind implements Serializable, IAttribute this.description = description; } + @Override public String getDescription() { return description; } + @Override public String getCode() { return name(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewBasicExperiment.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewBasicExperiment.java index a9d42a2f0b6..556c2e47ffd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewBasicExperiment.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewBasicExperiment.java @@ -36,11 +36,13 @@ public class NewBasicExperiment extends Identifier<NewBasicExperiment> implement setIdentifier(identifier); } + @Override public final IEntityProperty[] getProperties() { return properties; } + @Override public final void setProperties(final IEntityProperty[] properties) { this.properties = properties; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewDataSet.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewDataSet.java index 3a45e1c1158..8ffcab14912 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewDataSet.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewDataSet.java @@ -120,11 +120,13 @@ public class NewDataSet extends Code<NewDataSet> implements Comparable<NewDataSe this.fileFormatOrNull = fileFormatOrNull; } + @Override public final IEntityProperty[] getProperties() { return properties; } + @Override public final void setProperties(final IEntityProperty[] properties) { this.properties = properties; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewExperiment.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewExperiment.java index 0050f95a97c..ac4db541a9b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewExperiment.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewExperiment.java @@ -63,11 +63,13 @@ public final class NewExperiment extends Identifier<NewExperiment> implements IP this.experimentTypeCode = experimentTypeCode; } + @Override public final IEntityProperty[] getProperties() { return properties; } + @Override public final void setProperties(final IEntityProperty[] properties) { this.properties = properties; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewMaterial.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewMaterial.java index caebaa50192..5cd6dd5331c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewMaterial.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewMaterial.java @@ -36,11 +36,13 @@ public final class NewMaterial extends Code<NewMaterial> implements IPropertiesB setCode(code); } + @Override public final IEntityProperty[] getProperties() { return properties; } + @Override public final void setProperties(final IEntityProperty[] properties) { this.properties = properties; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewSample.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewSample.java index cf8c47c9490..d89cac7990f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewSample.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/NewSample.java @@ -253,11 +253,13 @@ public class NewSample extends Identifier<NewSample> implements Comparable<NewSa } } + @Override public final IEntityProperty[] getProperties() { return properties; } + @Override public final void setProperties(final IEntityProperty[] properties) { this.properties = properties; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ParameterValue.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ParameterValue.java index 7287bf78629..877687e6c4d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ParameterValue.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/ParameterValue.java @@ -98,6 +98,7 @@ public class ParameterValue implements Comparable<ParameterValue>, Serializable // Comparable // + @Override public int compareTo(ParameterValue o) { return toString().compareTo(o.toString()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PersonAdapter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PersonAdapter.java index c44ffe39dd9..f11e469ed6e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PersonAdapter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PersonAdapter.java @@ -35,11 +35,13 @@ public class PersonAdapter implements IPerson this.userName = userName; } + @Override public String getUserId() { return userId; } + @Override public String getUserName() { return userName; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PersonTableCell.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PersonTableCell.java index 3f23ee35518..b86b388a1fe 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PersonTableCell.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PersonTableCell.java @@ -35,6 +35,7 @@ public class PersonTableCell implements ISerializableComparable return person; } + @Override public int compareTo(ISerializableComparable o) { // TODO 2010-10-25, felmer: Auto-generated method stub diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Project.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Project.java index f4ffc58c6ed..2d5ac7fc385 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Project.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Project.java @@ -42,6 +42,7 @@ public class Project extends CodeWithRegistration<Project> implements IAttachmen private Long id; + @Override public Long getId() { return id; @@ -59,6 +60,7 @@ public class Project extends CodeWithRegistration<Project> implements IAttachmen private Date modificationDate; + @Override public AttachmentHolderKind getAttachmentHolderKind() { return AttachmentHolderKind.PROJECT; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PropertyType.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PropertyType.java index e22d3d642c4..9fb0c400b9a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PropertyType.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/PropertyType.java @@ -66,6 +66,7 @@ public class PropertyType extends Code<PropertyType> implements IPropertyTypeUpd private String transformation; + @Override public Long getId() { return id; @@ -86,6 +87,7 @@ public class PropertyType extends Code<PropertyType> implements IPropertyTypeUpd this.simpleCode = simpleCode; } + @Override public String getLabel() { return label; @@ -126,6 +128,7 @@ public class PropertyType extends Code<PropertyType> implements IPropertyTypeUpd this.vocabulary = vocabulary; } + @Override public String getDescription() { return description; @@ -200,6 +203,7 @@ public class PropertyType extends Code<PropertyType> implements IPropertyTypeUpd this.materialType = materialType; } + @Override public String getSchema() { return schema; @@ -210,6 +214,7 @@ public class PropertyType extends Code<PropertyType> implements IPropertyTypeUpd this.schema = schema; } + @Override public String getTransformation() { return transformation; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Sample.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Sample.java index 164019656d2..e02c7e025c9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Sample.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Sample.java @@ -105,6 +105,7 @@ public final class Sample extends CodeWithRegistrationAndModificationDate<Sample this.searchlink = searchlink; } + @Override public AttachmentHolderKind getAttachmentHolderKind() { return AttachmentHolderKind.SAMPLE; @@ -203,6 +204,7 @@ public final class Sample extends CodeWithRegistrationAndModificationDate<Sample parents.add(generatedFrom); } + @Override public List<IEntityProperty> getProperties() { return properties; @@ -233,6 +235,7 @@ public final class Sample extends CodeWithRegistrationAndModificationDate<Sample // IIdentifierHolder // + @Override public String getIdentifier() { return identifier; @@ -242,6 +245,7 @@ public final class Sample extends CodeWithRegistrationAndModificationDate<Sample // IDeletionProvider // + @Override public final Deletion getDeletion() { return deletion; @@ -257,6 +261,7 @@ public final class Sample extends CodeWithRegistrationAndModificationDate<Sample return getIdentifier().compareTo(o.getIdentifier()); } + @Override public Long getId() { return id; @@ -267,11 +272,13 @@ public final class Sample extends CodeWithRegistrationAndModificationDate<Sample this.id = id; } + @Override public EntityType getEntityType() { return getSampleType(); } + @Override public EntityKind getEntityKind() { return EntityKind.SAMPLE; @@ -292,6 +299,7 @@ public final class Sample extends CodeWithRegistrationAndModificationDate<Sample this.permId = permId; } + @Override public String getPermId() { return permId; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/SampleAttributeSearchFieldKind.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/SampleAttributeSearchFieldKind.java index df4f43df767..c087b28fd0d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/SampleAttributeSearchFieldKind.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/SampleAttributeSearchFieldKind.java @@ -54,11 +54,13 @@ public enum SampleAttributeSearchFieldKind implements Serializable, IAttributeSe this.description = description; } + @Override public String getDescription() { return description; } + @Override public String getCode() { return name(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Script.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Script.java index 878756e3a5e..25162845da8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Script.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Script.java @@ -56,6 +56,7 @@ public class Script extends AbstractRegistrationHolder implements Comparable<Scr this.entityKind = entityKind; } + @Override public String getScript() { return script; @@ -66,6 +67,7 @@ public class Script extends AbstractRegistrationHolder implements Comparable<Scr this.script = script; } + @Override public String getName() { return name; @@ -76,6 +78,7 @@ public class Script extends AbstractRegistrationHolder implements Comparable<Scr this.name = name; } + @Override public String getDescription() { return description; @@ -96,6 +99,7 @@ public class Script extends AbstractRegistrationHolder implements Comparable<Scr this.databaseInstance = databaseInstance; } + @Override public Long getId() { return id; @@ -117,6 +121,7 @@ public class Script extends AbstractRegistrationHolder implements Comparable<Scr return name; } + @Override public int compareTo(final Script o) { if (o == null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/SerializableComparableIDDecorator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/SerializableComparableIDDecorator.java index 03b01767b05..2620f59df3d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/SerializableComparableIDDecorator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/SerializableComparableIDDecorator.java @@ -42,6 +42,7 @@ public class SerializableComparableIDDecorator implements ISerializableComparabl return id; } + @Override public int compareTo(ISerializableComparable o) { if (o instanceof SerializableComparableIDDecorator) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Space.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Space.java index 8fdecf5d46d..593ea28b16a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Space.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/Space.java @@ -35,6 +35,7 @@ public final class Space extends CodeWithRegistration<Space> implements IIdHolde private String identifier; + @Override public final String getDescription() { return description; @@ -65,6 +66,7 @@ public final class Space extends CodeWithRegistration<Space> implements IIdHolde this.identifier = identifier; } + @Override public Long getId() { return id; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/StringTableCell.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/StringTableCell.java index bad535a65f7..814c38e38c3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/StringTableCell.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/StringTableCell.java @@ -45,6 +45,7 @@ public class StringTableCell implements ISerializableComparable this.string = string; } + @Override public int compareTo(ISerializableComparable o) { return string.compareTo(o.toString()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/TableModelRowWithObject.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/TableModelRowWithObject.java index 004dfa8c0fb..121bd5ff80d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/TableModelRowWithObject.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/TableModelRowWithObject.java @@ -75,6 +75,7 @@ public class TableModelRowWithObject<T extends Serializable> extends TableModelR return objectOrNull; } + @Override public Long getId() { return id; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/TypedTableGridColumnDefinition.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/TypedTableGridColumnDefinition.java index 43ee68057f7..9e1f1353b71 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/TypedTableGridColumnDefinition.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/TypedTableGridColumnDefinition.java @@ -37,16 +37,19 @@ public class TypedTableGridColumnDefinition<T extends Serializable> implements { } + @Override public String getHeader() { return title; } + @Override public String getIdentifier() { return header.getId(); } + @Override public DataTypeCode tryToGetDataType() { return header.getDataType(); @@ -57,11 +60,13 @@ public class TypedTableGridColumnDefinition<T extends Serializable> implements return header.getIndex(); } + @Override public String tryToGetProperty(String key) { return header.tryToGetProperty(key); } + @Override public String getValue(GridRowModel<TableModelRowWithObject<T>> rowModel) { Comparable<?> cell = tryGetComparableValue(rowModel); @@ -89,6 +94,7 @@ public class TypedTableGridColumnDefinition<T extends Serializable> implements return cell.toString(); } + @Override public Comparable<?> tryGetComparableValue(GridRowModel<TableModelRowWithObject<T>> rowModel) { List<ISerializableComparable> values = rowModel.getOriginalObject().getValues(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/VocabularyTermTableCell.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/VocabularyTermTableCell.java index d5f5c680b2b..fdc0efc7dd1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/VocabularyTermTableCell.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/dto/VocabularyTermTableCell.java @@ -37,6 +37,7 @@ public class VocabularyTermTableCell implements ISerializableComparable vocabularyTerm = term; } + @Override public int compareTo(ISerializableComparable o) { return getVocabularyTerm().toString().compareTo(o.toString()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/coreplugin/CorePluginScanner.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/coreplugin/CorePluginScanner.java index 826ed0ae176..eae1d544f86 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/coreplugin/CorePluginScanner.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/coreplugin/CorePluginScanner.java @@ -91,6 +91,7 @@ public class CorePluginScanner implements ICorePluginResourceLoader } } + @Override public String tryLoadToString(CorePlugin plugin, String path) { File result = new File(getFolderForPlugin(plugin), path); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AbstractDeletedEntityPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AbstractDeletedEntityPE.java index 9ed2d698286..7f360718442 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AbstractDeletedEntityPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AbstractDeletedEntityPE.java @@ -55,6 +55,7 @@ abstract class AbstractDeletedEntityPE implements IDeletablePE, Serializable private String code; + @Override @Column(name = ColumnNames.CODE_COLUMN) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @@ -69,6 +70,7 @@ abstract class AbstractDeletedEntityPE implements IDeletablePE, Serializable this.code = code; } + @Override @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = ColumnNames.DELETION_COLUMN) public DeletionPE getDeletion() diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AbstractIdAndCodeHolder.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AbstractIdAndCodeHolder.java index e85f1e8a505..e0acb21a54c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AbstractIdAndCodeHolder.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AbstractIdAndCodeHolder.java @@ -101,6 +101,7 @@ public abstract class AbstractIdAndCodeHolder<T extends IIdAndCodeHolder> implem /** * If <code>null</code> values are present for <code>code</code>, then they come first. */ + @Override public final int compareTo(final T o) { return compare(this, o); @@ -119,6 +120,7 @@ public abstract class AbstractIdAndCodeHolder<T extends IIdAndCodeHolder> implem // Comparator // + @Override public final int compare(final IIdAndCodeHolder o1, final IIdAndCodeHolder o2) { final String thatCode = o2.getCode(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AbstractTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AbstractTypePE.java index e97a17aa886..0ce1747acfc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AbstractTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AbstractTypePE.java @@ -73,6 +73,7 @@ public abstract class AbstractTypePE extends AbstractIdAndCodeHolder<AbstractTyp // AbstractIdAndCodeHolder // + @Override @Column(name = ColumnNames.CODE_COLUMN) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AttachmentContentPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AttachmentContentPE.java index ad6ab5deca3..1f2674af0e7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AttachmentContentPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AttachmentContentPE.java @@ -47,6 +47,7 @@ public class AttachmentContentPE implements IIdHolder, Serializable transient private Long id; + @Override @SequenceGenerator(name = SequenceNames.ATTACHMENT_CONTENT_SEQUENCE, sequenceName = SequenceNames.ATTACHMENT_CONTENT_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.ATTACHMENT_CONTENT_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AttachmentPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AttachmentPE.java index 2e960305b96..2acbcea5c09 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AttachmentPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AttachmentPE.java @@ -121,6 +121,7 @@ public class AttachmentPE extends HibernateAbstractRegistrationHolder implements */ private static final String SEARCHABLE_ATTACHMENT_MARKER = "[searchable]"; + @Override public void set(String name, Object/* AttachmentPE */value, Document/* Lucene document */document, LuceneOptions luceneOptions) { @@ -242,6 +243,7 @@ public class AttachmentPE extends HibernateAbstractRegistrationHolder implements this.version = version; } + @Override @SequenceGenerator(name = SequenceNames.ATTACHMENT_SEQUENCE, sequenceName = SequenceNames.ATTACHMENT_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.ATTACHMENT_SEQUENCE) @@ -357,6 +359,7 @@ public class AttachmentPE extends HibernateAbstractRegistrationHolder implements // Comparable // + @Override public final int compareTo(final AttachmentPE o) { final int byFile = getFileName().compareTo(o.getFileName()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AuthorizationGroupPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AuthorizationGroupPE.java index d26ecedf4f8..941de66451c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AuthorizationGroupPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/AuthorizationGroupPE.java @@ -84,6 +84,7 @@ public class AuthorizationGroupPE extends HibernateAbstractRegistrationHolder im { } + @Override @SequenceGenerator(name = SequenceNames.AUTHORIZATION_GROUP_ID_SEQUENCE, sequenceName = SequenceNames.AUTHORIZATION_GROUP_ID_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.AUTHORIZATION_GROUP_ID_SEQUENCE) @@ -110,6 +111,7 @@ public class AuthorizationGroupPE extends HibernateAbstractRegistrationHolder im this.databaseInstance = databaseInstance; } + @Override @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @Pattern(regexp = AbstractIdAndCodeHolder.CODE_PATTERN, flags = Pattern.Flag.CASE_INSENSITIVE, message = ValidationMessages.CODE_PATTERN_MESSAGE) @@ -265,6 +267,7 @@ public class AuthorizationGroupPE extends HibernateAbstractRegistrationHolder im return builder.toString(); } + @Override public int compareTo(AuthorizationGroupPE o) { return AbstractIdAndCodeHolder.compare(this, o); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Code.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Code.java index cb91312b068..b8a5e0b49ed 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Code.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Code.java @@ -100,6 +100,7 @@ public abstract class Code<T extends Code<T>> implements Serializable, Comparabl /** * If <code>null</code> values are present for <code>code</code>, then they come first. */ + @Override public int compareTo(final T o) { final String thatCode = o.code; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/CorePluginPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/CorePluginPE.java index 0f4905d14b8..ad064d88b36 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/CorePluginPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/CorePluginPE.java @@ -112,6 +112,7 @@ public final class CorePluginPE implements Comparable<CorePluginPE> this.masterDataRegistrationScript = masterDataRegistrationScript; } + @Override public int compareTo(CorePluginPE other) { if (version != other.version) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataPE.java index 1eac602c1ca..44834e88403 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataPE.java @@ -267,6 +267,7 @@ public class DataPE extends AbstractIdAndCodeHolder<DataPE> implements this.dataStore = dataStorePE; } + @Override @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = ColumnNames.PERSON_REGISTERER_COLUMN, updatable = false) @IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_REGISTRATOR) @@ -575,6 +576,7 @@ public class DataPE extends AbstractIdAndCodeHolder<DataPE> implements // AbstractIdAndCodeHolder // + @Override @Id @SequenceGenerator(name = SequenceNames.DATA_SEQUENCE, sequenceName = SequenceNames.DATA_SEQUENCE, allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.DATA_SEQUENCE) @@ -584,6 +586,7 @@ public class DataPE extends AbstractIdAndCodeHolder<DataPE> implements return id; } + @Override @Column(unique = true) @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @@ -665,6 +668,7 @@ public class DataPE extends AbstractIdAndCodeHolder<DataPE> implements this.properties = properties; } + @Override public void setProperties(final Set<? extends EntityPropertyPE> properties) { getDataSetProperties().clear(); @@ -680,18 +684,21 @@ public class DataPE extends AbstractIdAndCodeHolder<DataPE> implements } } + @Override public void addProperty(final EntityPropertyPE property) { property.setEntity(this); getDataSetProperties().add((DataSetPropertyPE) property); } + @Override public void removeProperty(final EntityPropertyPE property) { getDataSetProperties().remove(property); property.setEntity(null); } + @Override @Transient public Set<DataSetPropertyPE> getProperties() { @@ -701,24 +708,28 @@ public class DataPE extends AbstractIdAndCodeHolder<DataPE> implements /** * Returns <code>true</code>, if and only if the properties have been initialized. */ + @Override @Transient public boolean isPropertiesInitialized() { return HibernateUtils.isInitialized(getDataSetProperties()); } + @Override @Transient public EntityKind getEntityKind() { return EntityKind.DATA_SET; } + @Override @Transient public EntityTypePE getEntityType() { return getDataSetType(); } + @Override @Transient @Field(index = Index.NO, store = Store.YES, name = SearchFieldConstants.IDENTIFIER) public String getIdentifier() @@ -726,6 +737,7 @@ public class DataPE extends AbstractIdAndCodeHolder<DataPE> implements return getCode(); } + @Override @Transient @Field(index = Index.NO, store = Store.YES, name = SearchFieldConstants.PERM_ID) public String getPermId() @@ -782,6 +794,7 @@ public class DataPE extends AbstractIdAndCodeHolder<DataPE> implements return getExperiment().getProject().getSpace(); } + @Override @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = ColumnNames.DELETION_COLUMN) public DeletionPE getDeletion() diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetBatchUpdatesDTO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetBatchUpdatesDTO.java index 02510070f63..5451eeacaf4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetBatchUpdatesDTO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetBatchUpdatesDTO.java @@ -52,6 +52,7 @@ public class DataSetBatchUpdatesDTO extends DataSetUpdatesDTO implements ICodeHo this.details = details; } + @Override public String getCode() { return getDatasetCode(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetPropertyPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetPropertyPE.java index dcdd468e649..b7af5aa6a46 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetPropertyPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetPropertyPE.java @@ -53,6 +53,7 @@ public class DataSetPropertyPE extends EntityPropertyPE // EntityPropertyPE // + @Override @NotNull(message = ValidationMessages.DATA_SET_TYPE_NOT_NULL_MESSAGE) @ManyToOne(fetch = FetchType.EAGER, targetEntity = DataSetTypePropertyTypePE.class) @JoinColumn(name = ColumnNames.DATA_SET_TYPE_PROPERTY_TYPE_COLUMN) @@ -61,6 +62,7 @@ public class DataSetPropertyPE extends EntityPropertyPE return entityTypePropertyType; } + @Override @SequenceGenerator(name = SequenceNames.DATA_SET_PROPERTY_SEQUENCE, sequenceName = SequenceNames.DATA_SET_PROPERTY_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.DATA_SET_PROPERTY_SEQUENCE) @@ -69,6 +71,7 @@ public class DataSetPropertyPE extends EntityPropertyPE return id; } + @Override @NotNull(message = ValidationMessages.DATA_NOT_NULL_MESSAGE) @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = ColumnNames.DATA_SET_COLUMN) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetTypePE.java index f9e2b0d1805..39d38a829f8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetTypePE.java @@ -63,6 +63,7 @@ public class DataSetTypePE extends EntityTypePE private boolean deletionDisallow; + @Override @SequenceGenerator(name = SequenceNames.DATA_SET_TYPE_SEQUENCE, sequenceName = SequenceNames.DATA_SET_TYPE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.DATA_SET_TYPE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetTypePropertyTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetTypePropertyTypePE.java index 78715a0c8fa..11c8ec100ae 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetTypePropertyTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetTypePropertyTypePE.java @@ -63,12 +63,14 @@ public class DataSetTypePropertyTypePE extends EntityTypePropertyTypePE // EntityTypePropertyTypePE // + @Override @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "entityTypePropertyType", targetEntity = DataSetPropertyPE.class) public Set<EntityPropertyPE> getPropertyValues() { return propertyValues; } + @Override @Transient public EntityTypePE getEntityType() { @@ -84,6 +86,7 @@ public class DataSetTypePropertyTypePE extends EntityTypePropertyTypePE ((DataSetTypePE) entityType).addDataSetTypePropertyType(this); } + @Override @SequenceGenerator(name = SequenceNames.DATA_SET_TYPE_PROPERTY_TYPE_SEQUENCE, sequenceName = SequenceNames.DATA_SET_TYPE_PROPERTY_TYPE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.DATA_SET_TYPE_PROPERTY_TYPE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataStorePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataStorePE.java index b996d3436af..302decd640e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataStorePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataStorePE.java @@ -181,6 +181,7 @@ public final class DataStorePE extends AbstractIdAndCodeHolder<DataStorePE> // AbstractIdAndCodeHolder // + @Override @Column(name = ColumnNames.CODE_COLUMN) @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @@ -190,6 +191,7 @@ public final class DataStorePE extends AbstractIdAndCodeHolder<DataStorePE> return code; } + @Override @Id @SequenceGenerator(name = SequenceNames.DATA_STORE_SEQUENCE, sequenceName = SequenceNames.DATA_STORE_SEQUENCE, allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.DATA_STORE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataTypePE.java index cc1b6315f44..b5af4a77949 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataTypePE.java @@ -62,6 +62,7 @@ public final class DataTypePE implements IIdHolder, Serializable, Comparable<Dat private String description; + @Override @SequenceGenerator(name = SequenceNames.DATA_TYPE_SEQUENCE, sequenceName = SequenceNames.DATA_TYPE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.DATA_TYPE_SEQUENCE) @@ -143,6 +144,7 @@ public final class DataTypePE implements IIdHolder, Serializable, Comparable<Dat // Comparable // + @Override public final int compareTo(final DataTypePE o) { return getCode().name().compareTo(o.getCode().name()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DatabaseInstancePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DatabaseInstancePE.java index 183b08345a4..588f07f87bd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DatabaseInstancePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DatabaseInstancePE.java @@ -147,6 +147,7 @@ public final class DatabaseInstancePE extends AbstractIdAndCodeHolder<DatabaseIn // AbstractIdAndCodeHolder // + @Override @Id @SequenceGenerator(name = SequenceNames.DATABASE_INSTANCE_SEQUENCE, sequenceName = SequenceNames.DATABASE_INSTANCE_SEQUENCE, allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.DATABASE_INSTANCE_SEQUENCE) @@ -155,6 +156,7 @@ public final class DatabaseInstancePE extends AbstractIdAndCodeHolder<DatabaseIn return id; } + @Override @Column(unique = true) @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DatasetDescription.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DatasetDescription.java index a30b6227a2c..6fdf124082b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DatasetDescription.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DatasetDescription.java @@ -98,6 +98,7 @@ public class DatasetDescription implements Serializable, IDatasetLocation this.dataSetSize = dataSetSize; } + @Override public String getDataSetLocation() { return dataSetLocation; @@ -113,6 +114,7 @@ public class DatasetDescription implements Serializable, IDatasetLocation return instanceCode; } + @Override public String getDataSetCode() { return datasetCode; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedDataPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedDataPE.java index 3fabba68509..fa96926a9cf 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedDataPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedDataPE.java @@ -64,6 +64,7 @@ public class DeletedDataPE extends AbstractDeletedEntityPE private DataSetTypePE dataSetType; + @Override @Id @SequenceGenerator(name = SequenceNames.DATA_SEQUENCE, sequenceName = SequenceNames.DATA_SEQUENCE, allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.DATA_SEQUENCE) @@ -78,6 +79,7 @@ public class DeletedDataPE extends AbstractDeletedEntityPE this.id = id; } + @Override @Transient public String getPermId() { @@ -184,6 +186,7 @@ public class DeletedDataPE extends AbstractDeletedEntityPE this.dataStore = dataStorePE; } + @Override @Transient public String getIdentifier() { @@ -204,12 +207,14 @@ public class DeletedDataPE extends AbstractDeletedEntityPE this.dataSetType = dataSetType; } + @Override @Transient public EntityTypePE getEntityType() { return getDataSetType(); } + @Override @Transient public EntityKind getEntityKind() { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedExperimentPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedExperimentPE.java index a6ac163bc02..f60aed0ff75 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedExperimentPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedExperimentPE.java @@ -65,6 +65,7 @@ public class DeletedExperimentPE extends AbstractDeletedEntityPE private ExperimentTypePE experimentType; + @Override @Id @SequenceGenerator(name = SequenceNames.EXPERIMENT_SEQUENCE, sequenceName = SequenceNames.EXPERIMENT_SEQUENCE, allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.EXPERIMENT_SEQUENCE) @@ -79,6 +80,7 @@ public class DeletedExperimentPE extends AbstractDeletedEntityPE this.id = id; } + @Override @Transient public String getPermId() { @@ -99,12 +101,14 @@ public class DeletedExperimentPE extends AbstractDeletedEntityPE this.permIdInternal = permIdInternal; } + @Override @Transient public final EntityTypePE getEntityType() { return getExperimentType(); } + @Override @Transient public final EntityKind getEntityKind() { @@ -145,6 +149,7 @@ public class DeletedExperimentPE extends AbstractDeletedEntityPE return getProjectInternal(); } + @Override @Transient public String getIdentifier() { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedSamplePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedSamplePE.java index f27afd61d0f..d6eaed97669 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedSamplePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletedSamplePE.java @@ -81,6 +81,7 @@ public class DeletedSamplePE extends AbstractDeletedEntityPE private Set<DeletedSampleRelationshipPE> parentRelationships; + @Override @Id @SequenceGenerator(name = SequenceNames.SAMPLE_SEQUENCE, sequenceName = SequenceNames.SAMPLE_SEQUENCE, allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.SAMPLE_SEQUENCE) @@ -117,6 +118,7 @@ public class DeletedSamplePE extends AbstractDeletedEntityPE this.containerId = containerId; } + @Override @Transient public String getPermId() { @@ -174,18 +176,21 @@ public class DeletedSamplePE extends AbstractDeletedEntityPE this.space = space; } + @Override @Transient public EntityTypePE getEntityType() { return getSampleType(); } + @Override @Transient public EntityKind getEntityKind() { return EntityKind.SAMPLE; } + @Override @Transient public String getIdentifier() { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletionPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletionPE.java index 4376af826f8..a5aedeaf024 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletionPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DeletionPE.java @@ -56,6 +56,7 @@ public class DeletionPE extends HibernateAbstractRegistrationHolder implements I this.id = id; } + @Override @Id @SequenceGenerator(name = SequenceNames.DELETION_SEQUENCE, sequenceName = SequenceNames.DELETION_SEQUENCE, allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.DELETION_SEQUENCE) @@ -111,6 +112,7 @@ public class DeletionPE extends HibernateAbstractRegistrationHolder implements I // Comparable - registration date based // + @Override public final int compareTo(final DeletionPE o) { return this.getRegistrationDate().compareTo(o.getRegistrationDate()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EntityOperationsLogEntryPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EntityOperationsLogEntryPE.java index 1cf09e37672..bc34aa9d817 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EntityOperationsLogEntryPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EntityOperationsLogEntryPE.java @@ -33,6 +33,7 @@ public class EntityOperationsLogEntryPE implements IIdHolder, Serializable private Long registrationId; + @Override @SequenceGenerator(name = SequenceNames.ENTITY_OPERATIONS_LOG_SEQUENCE, sequenceName = SequenceNames.ENTITY_OPERATIONS_LOG_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.ENTITY_OPERATIONS_LOG_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EntityPropertyPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EntityPropertyPE.java index 7d207c69471..538a5be5771 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EntityPropertyPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EntityPropertyPE.java @@ -103,6 +103,7 @@ public abstract class EntityPropertyPE extends HibernateAbstractRegistrationHold public static class EntityPropertySearchBridge implements FieldBridge { + @Override public void set(String name, Object/* EntityPropertyPE */value, Document/* Lucene document */document, LuceneOptions luceneOptions) { @@ -179,6 +180,7 @@ public abstract class EntityPropertyPE extends HibernateAbstractRegistrationHold // IUntypedValueSetter // + @Override public final void setUntypedValue(final String valueOrNull, final VocabularyTermPE vocabularyTermOrNull, MaterialPE materialOrNull) { @@ -254,6 +256,7 @@ public abstract class EntityPropertyPE extends HibernateAbstractRegistrationHold // IEntityProperty // + @Override public final String tryGetUntypedValue() { if (getVocabularyTerm() != null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EntityTypePropertyTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EntityTypePropertyTypePE.java index 23a1cb9b758..14324fa6a7d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EntityTypePropertyTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EntityTypePropertyTypePE.java @@ -265,6 +265,7 @@ public abstract class EntityTypePropertyTypePE extends HibernateAbstractRegistra // Comparable // + @Override public int compareTo(EntityTypePropertyTypePE o) { return this.getOrdinal().compareTo(o.getOrdinal()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EventPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EventPE.java index dbe94b51f74..d565af74af9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EventPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EventPE.java @@ -83,6 +83,7 @@ public class EventPE extends HibernateAbstractRegistrationHolder implements IIdH this.id = id; } + @Override @Id @SequenceGenerator(name = SequenceNames.EVENT_SEQUENCE, sequenceName = SequenceNames.EVENT_SEQUENCE, allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.EVENT_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentPE.java index c28ee9f9fb8..2bcf43c5d6f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentPE.java @@ -156,6 +156,7 @@ public class ExperimentPE extends AttachmentHolderPE implements this.registrationDate = registrationDate; } + @Override @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = ColumnNames.PERSON_REGISTERER_COLUMN, updatable = false) @IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_REGISTRATOR) @@ -182,6 +183,7 @@ public class ExperimentPE extends AttachmentHolderPE implements this.modifier = modifier; } + @Override @Id @SequenceGenerator(name = SequenceNames.EXPERIMENT_SEQUENCE, sequenceName = SequenceNames.EXPERIMENT_SEQUENCE, allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.EXPERIMENT_SEQUENCE) @@ -196,6 +198,7 @@ public class ExperimentPE extends AttachmentHolderPE implements this.id = id; } + @Override @Column(name = ColumnNames.CODE_COLUMN) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @@ -252,6 +255,7 @@ public class ExperimentPE extends AttachmentHolderPE implements this.experimentType = experimentType; } + @Override @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = ColumnNames.DELETION_COLUMN) public DeletionPE getDeletion() @@ -280,6 +284,7 @@ public class ExperimentPE extends AttachmentHolderPE implements this.properties = properties; } + @Override @Transient public Set<ExperimentPropertyPE> getProperties() { @@ -289,12 +294,14 @@ public class ExperimentPE extends AttachmentHolderPE implements /** * Returns <code>true</code>, if and only if the properties have been initialized. */ + @Override @Transient public boolean isPropertiesInitialized() { return HibernateUtils.isInitialized(getExperimentProperties()); } + @Override public void setProperties(final Set<? extends EntityPropertyPE> properties) { getExperimentProperties().clear(); @@ -310,12 +317,14 @@ public class ExperimentPE extends AttachmentHolderPE implements } } + @Override public void addProperty(final EntityPropertyPE property) { property.setEntity(this); getExperimentProperties().add((ExperimentPropertyPE) property); } + @Override public void removeProperty(final EntityPropertyPE property) { getExperimentProperties().remove(property); @@ -422,6 +431,7 @@ public class ExperimentPE extends AttachmentHolderPE implements // Comparable // + @Override public int compareTo(final ExperimentPE o) { return AbstractIdAndCodeHolder.compare(this, o); @@ -477,6 +487,7 @@ public class ExperimentPE extends AttachmentHolderPE implements // IMatchingEntity // + @Override @Transient @Field(index = Index.NO, store = Store.YES, name = SearchFieldConstants.IDENTIFIER) public final String getIdentifier() @@ -488,12 +499,14 @@ public class ExperimentPE extends AttachmentHolderPE implements return experimentIdentifier.toString(); } + @Override @Transient public final EntityTypePE getEntityType() { return getExperimentType(); } + @Override @Transient public final EntityKind getEntityKind() { @@ -521,6 +534,7 @@ public class ExperimentPE extends AttachmentHolderPE implements return AttachmentHolderKind.EXPERIMENT; } + @Override @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @Pattern(regexp = AbstractIdAndCodeHolder.CODE_PATTERN, flags = Pattern.Flag.CASE_INSENSITIVE, message = ValidationMessages.CODE_PATTERN_MESSAGE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentPropertyPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentPropertyPE.java index 66f6a6acf06..b2d47b9cdd3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentPropertyPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentPropertyPE.java @@ -53,6 +53,7 @@ public class ExperimentPropertyPE extends EntityPropertyPE // EntityPropertyPE // + @Override @NotNull(message = ValidationMessages.EXPERIMENT_TYPE_NOT_NULL_MESSAGE) @ManyToOne(fetch = FetchType.EAGER, targetEntity = ExperimentTypePropertyTypePE.class) @JoinColumn(name = ColumnNames.EXPERIMENT_TYPE_PROPERTY_TYPE_COLUMN) @@ -61,6 +62,7 @@ public class ExperimentPropertyPE extends EntityPropertyPE return entityTypePropertyType; } + @Override @SequenceGenerator(name = SequenceNames.EXPERIMENT_PROPERTY_SEQUENCE, sequenceName = SequenceNames.EXPERIMENT_PROPERTY_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.EXPERIMENT_PROPERTY_SEQUENCE) @@ -72,6 +74,7 @@ public class ExperimentPropertyPE extends EntityPropertyPE /** * Returns the experiment that this property belongs to. */ + @Override @NotNull(message = ValidationMessages.EXPERIMENT_NOT_NULL_MESSAGE) @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = ColumnNames.EXPERIMENT_COLUMN) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentTypePE.java index 7ebe91a2b67..878eb4205c5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentTypePE.java @@ -53,6 +53,7 @@ public final class ExperimentTypePE extends EntityTypePE private Set<ExperimentTypePropertyTypePE> exerimentTypePropertyTypes = new HashSet<ExperimentTypePropertyTypePE>(); + @Override @SequenceGenerator(name = SequenceNames.EXPERIMENT_TYPE_SEQUENCE, sequenceName = SequenceNames.EXPERIMENT_TYPE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.EXPERIMENT_TYPE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentTypePropertyTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentTypePropertyTypePE.java index 1ee3e6c0ce1..8a4b41637ba 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentTypePropertyTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ExperimentTypePropertyTypePE.java @@ -64,12 +64,14 @@ public class ExperimentTypePropertyTypePE extends EntityTypePropertyTypePE // EntityTypePropertyTypePE // + @Override @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "entityTypePropertyType", targetEntity = ExperimentPropertyPE.class) public Set<EntityPropertyPE> getPropertyValues() { return propertyValues; } + @Override @Transient public EntityTypePE getEntityType() { @@ -84,6 +86,7 @@ public class ExperimentTypePropertyTypePE extends EntityTypePropertyTypePE ((ExperimentTypePE) entityType).addExperimentTypePropertyType(this); } + @Override @SequenceGenerator(name = SequenceNames.EXPERIMENT_TYPE_PROPERTY_TYPE_SEQUENCE, sequenceName = SequenceNames.EXPERIMENT_TYPE_PROPERTY_TYPE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.EXPERIMENT_TYPE_PROPERTY_TYPE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/FileFormatTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/FileFormatTypePE.java index d4b9d8f611a..9e0298779a2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/FileFormatTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/FileFormatTypePE.java @@ -46,6 +46,7 @@ public final class FileFormatTypePE extends AbstractTypePE private DatabaseInstancePE databaseInstance; + @Override @SequenceGenerator(name = SequenceNames.FILE_FORMAT_TYPE_SEQUENCE, sequenceName = SequenceNames.FILE_FORMAT_TYPE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.FILE_FORMAT_TYPE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/GridCustomColumnPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/GridCustomColumnPE.java index d2a7d76fa28..54adcf9b66a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/GridCustomColumnPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/GridCustomColumnPE.java @@ -47,6 +47,7 @@ public class GridCustomColumnPE extends AbstractGridExpressionPE<GridCustomColum private String label; + @Override @SequenceGenerator(name = SequenceNames.GRID_CUSTOM_COLUMNS_SEQUENCE, sequenceName = SequenceNames.GRID_CUSTOM_COLUMNS_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.GRID_CUSTOM_COLUMNS_SEQUENCE) @@ -115,6 +116,7 @@ public class GridCustomColumnPE extends AbstractGridExpressionPE<GridCustomColum return getLabel(); } + @Override public int compareTo(GridCustomColumnPE that) { return getCode().compareTo(that.getCode()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/GridCustomFilterPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/GridCustomFilterPE.java index 419489bd51c..2ddb81b8830 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/GridCustomFilterPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/GridCustomFilterPE.java @@ -44,6 +44,7 @@ public class GridCustomFilterPE extends AbstractGridExpressionPE<GridCustomFilte private String name; + @Override @SequenceGenerator(name = SequenceNames.FILTER_SEQUENCE, sequenceName = SequenceNames.FILTER_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.FILTER_SEQUENCE) @@ -100,6 +101,7 @@ public class GridCustomFilterPE extends AbstractGridExpressionPE<GridCustomFilte return getName(); } + @Override public int compareTo(GridCustomFilterPE that) { final String thatName = that.getName(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Id.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Id.java index bfc5af0ca32..4320f65cbf9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Id.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Id.java @@ -51,6 +51,7 @@ public class Id implements Serializable, IIdHolder // IIdHolder // + @Override public Long getId() { return id; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/LocatorTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/LocatorTypePE.java index 221f77573c1..8d6a0086c01 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/LocatorTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/LocatorTypePE.java @@ -40,6 +40,7 @@ public final class LocatorTypePE extends AbstractTypePE { private static final long serialVersionUID = IServer.VERSION; + @Override @SequenceGenerator(name = SequenceNames.LOCATOR_TYPE_SEQUENCE, sequenceName = SequenceNames.LOCATOR_TYPE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.LOCATOR_TYPE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialPE.java index 3a023b73016..772d607f0f6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialPE.java @@ -139,6 +139,7 @@ public class MaterialPE implements IIdAndCodeHolder, Comparable<MaterialPE>, this.registrationDate = registrationDate; } + @Override @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = ColumnNames.PERSON_REGISTERER_COLUMN, updatable = false) @IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_REGISTRATOR) @@ -152,6 +153,7 @@ public class MaterialPE implements IIdAndCodeHolder, Comparable<MaterialPE>, this.registrator = registrator; } + @Override @Id @SequenceGenerator(name = SequenceNames.MATERIAL_SEQUENCE, sequenceName = SequenceNames.MATERIAL_SEQUENCE, allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.MATERIAL_SEQUENCE) @@ -180,6 +182,7 @@ public class MaterialPE implements IIdAndCodeHolder, Comparable<MaterialPE>, this.materialType = materialType; } + @Override @Column(name = ColumnNames.CODE_COLUMN) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @@ -228,6 +231,7 @@ public class MaterialPE implements IIdAndCodeHolder, Comparable<MaterialPE>, // IEntityPropertiesHolder // + @Override @Transient public Set<MaterialPropertyPE> getProperties() { @@ -238,12 +242,14 @@ public class MaterialPE implements IIdAndCodeHolder, Comparable<MaterialPE>, /** * Returns <code>true</code>, if and only if the properties have been initialized. */ + @Override @Transient public boolean isPropertiesInitialized() { return HibernateUtils.isInitialized(getMaterialProperties()); } + @Override public void setProperties(final Set<? extends EntityPropertyPE> properties) { getMaterialProperties().clear(); @@ -259,12 +265,14 @@ public class MaterialPE implements IIdAndCodeHolder, Comparable<MaterialPE>, } } + @Override public void addProperty(final EntityPropertyPE property) { property.setEntity(this); getMaterialProperties().add((MaterialPropertyPE) property); } + @Override public void removeProperty(final EntityPropertyPE property) { getMaterialProperties().remove(property); @@ -333,6 +341,7 @@ public class MaterialPE implements IIdAndCodeHolder, Comparable<MaterialPE>, // Comparable // + @Override public final int compareTo(final MaterialPE o) { return AbstractIdAndCodeHolder.compare(this, o); @@ -349,18 +358,21 @@ public class MaterialPE implements IIdAndCodeHolder, Comparable<MaterialPE>, return getCode(); } + @Override @Transient public final EntityTypePE getEntityType() { return getMaterialType(); } + @Override @Transient public final EntityKind getEntityKind() { return EntityKind.MATERIAL; } + @Override @Transient public String getPermId() { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialPropertyPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialPropertyPE.java index ad04b7cb510..7a3d932098a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialPropertyPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialPropertyPE.java @@ -53,6 +53,7 @@ public class MaterialPropertyPE extends EntityPropertyPE // EntityPropertyPE // + @Override @NotNull(message = ValidationMessages.MATERIAL_TYPE_NOT_NULL_MESSAGE) @ManyToOne(fetch = FetchType.EAGER, targetEntity = MaterialTypePropertyTypePE.class) @JoinColumn(name = ColumnNames.MATERIAL_TYPE_PROPERTY_TYPE_COLUMN) @@ -61,6 +62,7 @@ public class MaterialPropertyPE extends EntityPropertyPE return entityTypePropertyType; } + @Override @SequenceGenerator(name = SequenceNames.MATERIAL_PROPERTY_SEQUENCE, sequenceName = SequenceNames.MATERIAL_PROPERTY_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.MATERIAL_PROPERTY_SEQUENCE) @@ -72,6 +74,7 @@ public class MaterialPropertyPE extends EntityPropertyPE /** * Returns the material that this property belongs to. */ + @Override @NotNull(message = ValidationMessages.MATERIAL_NOT_NULL_MESSAGE) @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = ColumnNames.MATERIAL_COLUMN) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialTypePE.java index 6b58cea9935..b44e9be16ff 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialTypePE.java @@ -57,6 +57,7 @@ public final class MaterialTypePE extends EntityTypePE // EntityTypePE // + @Override @SequenceGenerator(name = SequenceNames.MATERIAL_TYPE_SEQUENCE, sequenceName = SequenceNames.MATERIAL_TYPE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.MATERIAL_TYPE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialTypePropertyTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialTypePropertyTypePE.java index 8abcf5d309a..d5396161714 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialTypePropertyTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/MaterialTypePropertyTypePE.java @@ -68,18 +68,21 @@ public class MaterialTypePropertyTypePE extends EntityTypePropertyTypePE // EntityTypePropertyTypePE // + @Override @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "entityTypePropertyType", targetEntity = MaterialPropertyPE.class) public Set<EntityPropertyPE> getPropertyValues() { return propertyValues; } + @Override @Transient public EntityTypePE getEntityType() { return getEntityTypeInternal(); } + @Override @SequenceGenerator(name = SequenceNames.MATERIAL_TYPE_PROPERTY_TYPE_SEQUENCE, sequenceName = SequenceNames.MATERIAL_TYPE_PROPERTY_TYPE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.MATERIAL_TYPE_PROPERTY_TYPE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PersonPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PersonPE.java index c3c5dc7ff8d..a1ed406ba2a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PersonPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PersonPE.java @@ -305,6 +305,7 @@ public final class PersonPE extends HibernateAbstractRegistrationHolder implemen // IIdHolder // + @Override @SequenceGenerator(name = SequenceNames.PERSON_SEQUENCE, sequenceName = SequenceNames.PERSON_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.PERSON_SEQUENCE) @@ -370,6 +371,7 @@ public final class PersonPE extends HibernateAbstractRegistrationHolder implemen /** * If <code>null</code> values are present for <code>code</code>, then they come first. */ + @Override public final int compareTo(final PersonPE o) { final String thatUserID = o.userId; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PostRegistrationPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PostRegistrationPE.java index 2f76bc9d864..c82d7565e13 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PostRegistrationPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PostRegistrationPE.java @@ -29,6 +29,7 @@ public class PostRegistrationPE implements IIdHolder, Serializable private Long id; + @Override @SequenceGenerator(name = SequenceNames.POST_REGISTRATION_DATASET_QUEUE_SEQUENCE, sequenceName = SequenceNames.POST_REGISTRATION_DATASET_QUEUE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.POST_REGISTRATION_DATASET_QUEUE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ProjectPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ProjectPE.java index b83c7901580..0a5a6c5c761 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ProjectPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ProjectPE.java @@ -286,6 +286,7 @@ public final class ProjectPE extends AttachmentHolderPE implements Comparable<Pr /** * If <code>null</code> values are present for <code>code</code>, then they come first. */ + @Override public final int compareTo(final ProjectPE o) { return AbstractIdAndCodeHolder.compare(this, o); @@ -295,6 +296,7 @@ public final class ProjectPE extends AttachmentHolderPE implements Comparable<Pr // IIdHolder // + @Override @SequenceGenerator(name = SequenceNames.PROJECT_SEQUENCE, sequenceName = SequenceNames.PROJECT_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.PROJECT_SEQUENCE) @@ -303,6 +305,7 @@ public final class ProjectPE extends AttachmentHolderPE implements Comparable<Pr return id; } + @Override @Column(unique = true) @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @@ -320,6 +323,7 @@ public final class ProjectPE extends AttachmentHolderPE implements Comparable<Pr return AttachmentHolderKind.PROJECT; } + @Override @Transient public String getPermId() { @@ -337,6 +341,7 @@ public final class ProjectPE extends AttachmentHolderPE implements Comparable<Pr return attachments; } + @Override @Transient public final String getIdentifier() { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PropertyTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PropertyTypePE.java index 012407838e5..393d5dfc7d8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PropertyTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PropertyTypePE.java @@ -178,6 +178,7 @@ public final class PropertyTypePE extends HibernateAbstractRegistrationHolder im setSimpleCode(CodeConverter.tryToDatabase(fullCode)); } + @Override @Transient public String getCode() { @@ -272,6 +273,7 @@ public final class PropertyTypePE extends HibernateAbstractRegistrationHolder im this.internalNamespace = internalNamespace; } + @Override @SequenceGenerator(name = SequenceNames.PROPERTY_TYPES_SEQUENCE, sequenceName = SequenceNames.PROPERTY_TYPES_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.PROPERTY_TYPES_SEQUENCE) @@ -292,6 +294,7 @@ public final class PropertyTypePE extends HibernateAbstractRegistrationHolder im /** * If <code>null</code> values are present for <code>code</code>, then they come first. */ + @Override public final int compareTo(final PropertyTypePE o) { return AbstractIdAndCodeHolder.compare(this, o); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/QueryPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/QueryPE.java index f675e599c26..f24294c0ff0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/QueryPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/QueryPE.java @@ -53,6 +53,7 @@ public class QueryPE extends AbstractExpressionPE<QueryPE> private String entityTypeCodePattern; // can be a regexp + @Override @SequenceGenerator(name = SequenceNames.QUERY_SEQUENCE, sequenceName = SequenceNames.QUERY_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.QUERY_SEQUENCE) @@ -145,6 +146,7 @@ public class QueryPE extends AbstractExpressionPE<QueryPE> return getName(); } + @Override public int compareTo(QueryPE that) { final String thatName = that.getName(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/RelationshipTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/RelationshipTypePE.java index 2a1a2b798ad..1182b9dd69b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/RelationshipTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/RelationshipTypePE.java @@ -96,6 +96,7 @@ public class RelationshipTypePE extends HibernateAbstractRegistrationHolder impl setSimpleCode(CodeConverter.tryToDatabase(fullCode)); } + @Override @Transient public String getCode() { @@ -153,6 +154,7 @@ public class RelationshipTypePE extends HibernateAbstractRegistrationHolder impl this.managedInternally = managedInternally; } + @Override @SequenceGenerator(name = SequenceNames.RELATIONSHIP_TYPE_SEQUENCE, sequenceName = SequenceNames.RELATIONSHIP_TYPE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.RELATIONSHIP_TYPE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/RoleAssignmentPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/RoleAssignmentPE.java index 733264b1307..373dc056e70 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/RoleAssignmentPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/RoleAssignmentPE.java @@ -162,6 +162,7 @@ public final class RoleAssignmentPE extends HibernateAbstractRegistrationHolder // IIdHolder // + @Override @SequenceGenerator(name = SequenceNames.ROLE_ASSIGNMENT_SEQUENCE, sequenceName = SequenceNames.ROLE_ASSIGNMENT_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.ROLE_ASSIGNMENT_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePE.java index c0a454e37c4..794c82778e4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePE.java @@ -288,6 +288,7 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co // -------------------- + @Override @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = ColumnNames.DELETION_COLUMN) public DeletionPE getDeletion() @@ -502,6 +503,7 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co // IIdAndCodeHolder // + @Override @SequenceGenerator(name = SequenceNames.SAMPLE_SEQUENCE, sequenceName = SequenceNames.SAMPLE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.SAMPLE_SEQUENCE) @@ -511,6 +513,7 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co return id; } + @Override @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @Pattern(regexp = AbstractIdAndCodeHolder.CODE_PATTERN, flags = Pattern.Flag.CASE_INSENSITIVE, message = ValidationMessages.CODE_PATTERN_MESSAGE) @@ -547,6 +550,7 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co // IRegistratorHolder // + @Override @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = ColumnNames.PERSON_REGISTERER_COLUMN, updatable = false) @IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_REGISTRATOR) @@ -622,6 +626,7 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co // Compare // + @Override public final int compareTo(final SamplePE o) { return getSampleIdentifier().compareTo(o.getSampleIdentifier()); @@ -631,6 +636,7 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co // IEntityPropertiesHolder // + @Override @Transient public Set<SamplePropertyPE> getProperties() { @@ -640,12 +646,14 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co /** * Returns <code>true</code>, if and only if the properties have been initialized. */ + @Override @Transient public boolean isPropertiesInitialized() { return HibernateUtils.isInitialized(getSampleProperties()); } + @Override public void setProperties(final Set<? extends EntityPropertyPE> properties) { getSampleProperties().clear(); @@ -661,12 +669,14 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co } } + @Override public void addProperty(final EntityPropertyPE property) { property.setEntity(this); getSampleProperties().add((SamplePropertyPE) property); } + @Override public void removeProperty(final EntityPropertyPE property) { getSampleProperties().remove(property); @@ -691,6 +701,7 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co // IMatchingEntity // + @Override @Transient @Field(index = Index.NO, store = Store.YES, name = SearchFieldConstants.IDENTIFIER) public final String getIdentifier() @@ -698,12 +709,14 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co return getSampleIdentifier().toString(); } + @Override @Transient public final EntityTypePE getEntityType() { return getSampleType(); } + @Override @Transient public final EntityKind getEntityKind() { @@ -726,6 +739,7 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co return attachments; } + @Override @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @Pattern(regexp = AbstractIdAndCodeHolder.CODE_PATTERN, flags = Pattern.Flag.CASE_INSENSITIVE, message = ValidationMessages.CODE_PATTERN_MESSAGE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePropertyPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePropertyPE.java index 6e992c30cc9..31ba368dcbb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePropertyPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePropertyPE.java @@ -54,6 +54,7 @@ public class SamplePropertyPE extends EntityPropertyPE // EntityPropertyPE // + @Override @NotNull(message = ValidationMessages.SAMPLE_TYPE_NOT_NULL_MESSAGE) @ManyToOne(fetch = FetchType.EAGER, targetEntity = SampleTypePropertyTypePE.class) @JoinColumn(name = ColumnNames.SAMPLE_TYPE_PROPERTY_TYPE_COLUMN) @@ -62,6 +63,7 @@ public class SamplePropertyPE extends EntityPropertyPE return entityTypePropertyType; } + @Override @SequenceGenerator(name = SequenceNames.SAMPLE_PROPERTY_SEQUENCE, sequenceName = SequenceNames.SAMPLE_PROPERTY_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.SAMPLE_PROPERTY_SEQUENCE) @@ -73,6 +75,7 @@ public class SamplePropertyPE extends EntityPropertyPE /** * Returns the sample that this property belongs to. */ + @Override @NotNull(message = ValidationMessages.SAMPLE_NOT_NULL_MESSAGE) @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = ColumnNames.SAMPLE_COLUMN) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SampleTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SampleTypePE.java index 108bfabc40e..667c1b694af 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SampleTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SampleTypePE.java @@ -189,6 +189,7 @@ public final class SampleTypePE extends EntityTypePE // EntityTypePE // + @Override @SequenceGenerator(name = SequenceNames.SAMPLE_TYPE_SEQUENCE, sequenceName = SequenceNames.SAMPLE_TYPE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.SAMPLE_TYPE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SampleTypePropertyTypePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SampleTypePropertyTypePE.java index 19ebc8a3524..40878e679f1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SampleTypePropertyTypePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SampleTypePropertyTypePE.java @@ -63,12 +63,14 @@ public class SampleTypePropertyTypePE extends EntityTypePropertyTypePE // EntityTypePropertyTypePE // + @Override @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "entityTypePropertyType", targetEntity = SamplePropertyPE.class) public Set<EntityPropertyPE> getPropertyValues() { return propertyValues; } + @Override @Transient public EntityTypePE getEntityType() { @@ -84,6 +86,7 @@ public class SampleTypePropertyTypePE extends EntityTypePropertyTypePE ((SampleTypePE) entityType).addSampleTypePropertyType(this); } + @Override @SequenceGenerator(name = SequenceNames.SAMPLE_TYPE_PROPERTY_TYPE_SEQUENCE, sequenceName = SequenceNames.SAMPLE_TYPE_PROPERTY_TYPE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.SAMPLE_TYPE_PROPERTY_TYPE_SEQUENCE) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ScriptPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ScriptPE.java index 485ceaede16..70061b7c287 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ScriptPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ScriptPE.java @@ -121,6 +121,7 @@ public class ScriptPE extends HibernateAbstractRegistrationHolder implements IId this.id = id; } + @Override @SequenceGenerator(name = SequenceNames.SCRIPT_SEQUENCE, sequenceName = SequenceNames.SCRIPT_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.SCRIPT_SEQUENCE) @@ -188,6 +189,7 @@ public class ScriptPE extends HibernateAbstractRegistrationHolder implements IId return getName(); } + @Override public int compareTo(ScriptPE that) { final String thatName = that.getName(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Session.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Session.java index cd95d31628a..c35b9b11699 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Session.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Session.java @@ -69,6 +69,7 @@ public final class Session extends BasicSession implements IAuthSession /** * Returns the {@link PersonPE} associated to this session or <code>null</code>. */ + @Override public final PersonPE tryGetPerson() { return personOrNull; @@ -85,6 +86,7 @@ public final class Session extends BasicSession implements IAuthSession } /** Returns home group code or <code>null</code>. */ + @Override public final String tryGetHomeGroupCode() { final SpacePE homeGroup = tryGetHomeGroup(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SimpleDataSetInformationDTO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SimpleDataSetInformationDTO.java index 5da76b66351..f9538fa8a63 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SimpleDataSetInformationDTO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SimpleDataSetInformationDTO.java @@ -74,6 +74,7 @@ public class SimpleDataSetInformationDTO implements Serializable, IDatasetLocati this.dataSetType = dataSetType; } + @Override public String getDataSetCode() { return dataSetCode; @@ -104,6 +105,7 @@ public class SimpleDataSetInformationDTO implements Serializable, IDatasetLocati this.dataSetSize = dataSetSize; } + @Override public String getDataSetLocation() { return dataSetLocation; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SimpleSession.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SimpleSession.java index 0d6b25f0acc..491844469a3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SimpleSession.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SimpleSession.java @@ -65,16 +65,19 @@ public class SimpleSession implements IAuthSession this.userName = userName; } + @Override public final String getUserName() { return userName; } + @Override public String tryGetHomeGroupCode() { return getHomeGroupCode(); } + @Override public PersonPE tryGetPerson() { return getPerson(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SpacePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SpacePE.java index ada297cee4b..5ebc235b489 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SpacePE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SpacePE.java @@ -127,6 +127,7 @@ public final class SpacePE extends HibernateAbstractRegistrationHolder implement // IIdAndCodeHolder // + @Override @SequenceGenerator(name = SequenceNames.SPACE_SEQUENCE, sequenceName = SequenceNames.SPACE_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.SPACE_SEQUENCE) @@ -136,6 +137,7 @@ public final class SpacePE extends HibernateAbstractRegistrationHolder implement return id; } + @Override @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @Pattern(regexp = AbstractIdAndCodeHolder.CODE_PATTERN, flags = Pattern.Flag.CASE_INSENSITIVE, message = ValidationMessages.CODE_PATTERN_MESSAGE) @@ -195,6 +197,7 @@ public final class SpacePE extends HibernateAbstractRegistrationHolder implement /** * If <code>null</code> values are present for <code>code</code>, then they come first. */ + @Override public final int compareTo(final SpacePE o) { return AbstractIdAndCodeHolder.compare(this, o); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyPE.java index 5d4e2436d4a..78d4a0d612d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyPE.java @@ -223,6 +223,7 @@ public class VocabularyPE extends HibernateAbstractRegistrationHolder implements getVocabularyTerms().remove(child); } + @Override @SequenceGenerator(name = SequenceNames.CONTROLLED_VOCABULARY_SEQUENCE, sequenceName = SequenceNames.CONTROLLED_VOCABULARY_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.CONTROLLED_VOCABULARY_SEQUENCE) @@ -266,6 +267,7 @@ public class VocabularyPE extends HibernateAbstractRegistrationHolder implements setSimpleCode(CodeConverter.tryToDatabase(fullCode)); } + @Override @Transient public String getCode() { @@ -339,6 +341,7 @@ public class VocabularyPE extends HibernateAbstractRegistrationHolder implements // Comparable // + @Override public final int compareTo(final VocabularyPE o) { return AbstractIdAndCodeHolder.compare(this, o); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyTermPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyTermPE.java index bca0629378e..196862bc253 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyTermPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyTermPE.java @@ -81,6 +81,7 @@ public class VocabularyTermPE extends HibernateAbstractRegistrationHolder implem { } + @Override @NotNull(message = ValidationMessages.CODE_NOT_NULL_MESSAGE) @Length(min = 1, max = Code.CODE_LENGTH_MAX, message = ValidationMessages.CODE_LENGTH_MESSAGE) @Pattern(regexp = AbstractIdAndCodeHolder.TERM_CODE_PATTERN, flags = Pattern.Flag.CASE_INSENSITIVE, message = ValidationMessages.TERM_CODE_PATTERN_MESSAGE) @@ -146,6 +147,7 @@ public class VocabularyTermPE extends HibernateAbstractRegistrationHolder implem this.id = id; } + @Override @SequenceGenerator(name = SequenceNames.CONTROLLED_VOCABULARY_TERM_SEQUENCE, sequenceName = SequenceNames.CONTROLLED_VOCABULARY_TERM_SEQUENCE, allocationSize = 1) @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.CONTROLLED_VOCABULARY_TERM_SEQUENCE) @@ -235,6 +237,7 @@ public class VocabularyTermPE extends HibernateAbstractRegistrationHolder implem // Comparable // + @Override public final int compareTo(final VocabularyTermPE o) { return this.getOrdinal().compareTo(o.getOrdinal()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyTermWithStats.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyTermWithStats.java index ec932b6d307..e45c6dbf986 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyTermWithStats.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyTermWithStats.java @@ -69,6 +69,7 @@ public class VocabularyTermWithStats implements Serializable, Comparable<Vocabul // Comparable // + @Override public int compareTo(VocabularyTermWithStats o) { return this.getTerm().compareTo(o.getTerm()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/InternalNamespaceValidator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/InternalNamespaceValidator.java index 664cc9982bd..dc12e0c2cd7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/InternalNamespaceValidator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/InternalNamespaceValidator.java @@ -40,11 +40,13 @@ public final class InternalNamespaceValidator implements // Validator // + @Override public final void initialize(final InternalNamespace annotation) { this.internalNamespace = annotation.value(); } + @Override public final boolean isValid(final Boolean value, ConstraintValidatorContext constraintContext) { return value == internalNamespace; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/LocationValidator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/LocationValidator.java index 27c69d9610b..255ab910d39 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/LocationValidator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/LocationValidator.java @@ -41,11 +41,13 @@ public final class LocationValidator implements ConstraintValidator<Location, St // Validator // + @Override public final void initialize(final Location location) { relative = location.relative(); } + @Override public final boolean isValid(final String location, ConstraintValidatorContext constraintContext) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/SampleOwnerIdentifier.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/SampleOwnerIdentifier.java index 95b353bb690..7f8d912ed48 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/SampleOwnerIdentifier.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/SampleOwnerIdentifier.java @@ -148,6 +148,7 @@ public class SampleOwnerIdentifier extends AbstractHashable implements Serializa // Comparable // + @Override public int compareTo(final SampleOwnerIdentifier other) { if (isSpaceLevel()) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/SpaceIdentifier.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/SpaceIdentifier.java index 73110c84d26..942e58e59fd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/SpaceIdentifier.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/SpaceIdentifier.java @@ -134,6 +134,7 @@ public class SpaceIdentifier extends DatabaseInstanceIdentifier implements // Comparable // + @Override public final int compareTo(final SpaceIdentifier other) { final int dbCompare = super.compareTo(other); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/SimpleTableModelBuilderAdaptor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/SimpleTableModelBuilderAdaptor.java index 91ba4deb46b..2e70fd56fa5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/SimpleTableModelBuilderAdaptor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/SimpleTableModelBuilderAdaptor.java @@ -63,57 +63,68 @@ public class SimpleTableModelBuilderAdaptor implements ISimpleTableModelBuilderA // // NOTE: TableModel is exposed to keep dependencies simple + @Override public TableModel getTableModel() { return builder.getTableModel(); } + @Override public void addHeader(String title) { builder.addHeader(title); } + @Override public void addHeader(String title, String code) { builder.addHeader(title, code); } + @Override public void addHeader(String title, int defaultColumnWidth) { builder.addHeader(title, defaultColumnWidth); } + @Override public IRowBuilderAdaptor addRow() { final IRowBuilder row = builder.addRow(); return new IRowBuilderAdaptor() { + @Override public void setCell(String headerTitle, String value) { row.setCell(headerTitle, value); } + @Override public void setCell(String headerTitle, long value) { row.setCell(headerTitle, value); } + @Override public void setCell(String headerTitle, double value) { row.setCell(headerTitle, value); } + @Override public void setCell(String headerTitle, Date value) { row.setCell(headerTitle, value); } + @Override public void setCell(String headerTitle, IEntityLinkElement value) { row.setCell(headerTitle, asTableCell(value, null)); } + @Override public void setCell(String headerTitle, IEntityLinkElement value, String linkText) { row.setCell(headerTitle, asTableCell(value, linkText)); @@ -135,11 +146,13 @@ public class SimpleTableModelBuilderAdaptor implements ISimpleTableModelBuilderA }; } + @Override public void addFullHeader(String... titles) { builder.addFullHeader(titles); } + @Override public void addFullRow(String... values) { builder.addFullRow(values); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/Element.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/Element.java index b7c50c2d5a2..3f45d13ff4e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/Element.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/Element.java @@ -49,11 +49,13 @@ public class Element implements IElement this.name = name; } + @Override public String getName() { return name; } + @Override public String getAttribute(String key) { String value = attributes.get(key); @@ -65,6 +67,7 @@ public class Element implements IElement return value; } + @Override public String getAttribute(String key, String defaultValue) { String value = attributes.get(key); @@ -75,22 +78,26 @@ public class Element implements IElement return value; } + @Override public String getData() { return data; } + @Override public List<IElement> getChildren() { return Collections.unmodifiableList(children); } + @Override public Map<String, String> getAttributes() { return Collections.unmodifiableMap(attributes); } + @Override public IElement setAttributes(Map<String, String> newAttributes) { assert newAttributes != null : "Setting null attributes is not allowed."; @@ -104,6 +111,7 @@ public class Element implements IElement } + @Override public IElement setChildren(List<IElement> newChildren) { assert newChildren != null : "Setting null children is not allowed."; @@ -112,12 +120,14 @@ public class Element implements IElement return this; } + @Override public IElement setData(String data) { this.data = data; return this; } + @Override public IElement addChildren(IElement... newChildren) { for (IElement child : newChildren) @@ -127,6 +137,7 @@ public class Element implements IElement return this; } + @Override public IElement addAttribute(String key, String value) { validateAttribute(key, value); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/ElementFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/ElementFactory.java index 4d336f5c881..120103d700e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/ElementFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/ElementFactory.java @@ -31,6 +31,7 @@ import ch.systemsx.cisd.openbis.generic.shared.managed_property.api.IEntityLinkE public class ElementFactory implements IElementFactory { + @Override public IElement createElement(String name) { if (EntityLinkElementKind.tryGetForElementName(name) != null) @@ -41,27 +42,32 @@ public class ElementFactory implements IElementFactory return new Element(name); } + @Override public IEntityLinkElement createSampleLink(String permId) { return new EntityLinkElement(EntityLinkElementKind.SAMPLE, permId); } + @Override public IEntityLinkElement createExperimentLink(String permId) { return new EntityLinkElement(EntityLinkElementKind.EXPERIMENT, permId); } + @Override public IEntityLinkElement createDataSetLink(String permId) { return new EntityLinkElement(EntityLinkElementKind.DATA_SET, permId); } + @Override public IEntityLinkElement createMaterialLink(String code, String typeCode) { String materialPermId = MaterialIdentifier.print(code, typeCode); return new EntityLinkElement(EntityLinkElementKind.MATERIAL, materialPermId); } + @Override public boolean isEntityLink(IElement element) { return element instanceof IEntityLinkElement; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/EntityLinkElement.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/EntityLinkElement.java index 391f0e5d60d..7604743e52f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/EntityLinkElement.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/EntityLinkElement.java @@ -37,11 +37,13 @@ public class EntityLinkElement extends Element implements IEntityLinkElement super.addAttribute(PERMID_ATTR_NAME, permId); } + @Override public String getPermId() { return getAttribute(PERMID_ATTR_NAME); } + @Override public EntityLinkElementKind getEntityLinkKind() { return kind; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/XmlStructuredPropertyConverter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/XmlStructuredPropertyConverter.java index 38df64987e4..517b20edc4d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/XmlStructuredPropertyConverter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/managed_property/structured/XmlStructuredPropertyConverter.java @@ -60,6 +60,7 @@ public class XmlStructuredPropertyConverter implements IStructuredPropertyConver this.factory = factory; } + @Override public List<IElement> convertToElements(IManagedProperty property) { return convertStringToElements(property.getValue()); @@ -77,6 +78,7 @@ public class XmlStructuredPropertyConverter implements IStructuredPropertyConver return root.getChildren(); } + @Override public String convertToString(List<IElement> elements) { IElement root = createRootElement(elements); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/NewSampleParserObjectFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/NewSampleParserObjectFactory.java index 5f957809ff5..eb34e278f87 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/NewSampleParserObjectFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/NewSampleParserObjectFactory.java @@ -29,6 +29,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataTypeCode; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityProperty; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IEntityProperty; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Identifier; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewSample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.PropertyType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType; @@ -101,13 +102,13 @@ class NewSampleParserObjectFactory extends AbstractParserObjectFactory<NewSample final NewSample newSample = super.createObject(lineTokens); if (identifierExpectedInFile && newSample.getIdentifier() == null) { - throw new ParserException("Mandatory column '" + NewSample.IDENTIFIER_COLUMN + throw new ParserException("Mandatory column '" + Identifier.IDENTIFIER_COLUMN + "' is missing."); } if (identifierExpectedInFile == false && newSample.getIdentifier() != null) { throw new ParserException("Requested automatical generation of codes. Column '" - + NewSample.IDENTIFIER_COLUMN + "' should be removed from the file."); + + Identifier.IDENTIFIER_COLUMN + "' should be removed from the file."); } if (allowExperiments == false && newSample.getExperimentIdentifier() != null) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/SampleUploadSectionsParser.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/SampleUploadSectionsParser.java index cc1c99a61e0..686366e6336 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/SampleUploadSectionsParser.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/SampleUploadSectionsParser.java @@ -133,6 +133,7 @@ public class SampleUploadSectionsParser final BisTabFileLoader<NewSample> tabFileLoader = new BisTabFileLoader<NewSample>(new IParserObjectFactoryFactory<NewSample>() { + @Override public final IParserObjectFactory<NewSample> createFactory( final IPropertyMapper propertyMapper) throws ParserException { @@ -161,6 +162,7 @@ public class SampleUploadSectionsParser final BisExcelFileLoader<NewSample> tabFileLoader = new BisExcelFileLoader<NewSample>(new IParserObjectFactoryFactory<NewSample>() { + @Override public final IParserObjectFactory<NewSample> createFactory( final IPropertyMapper propertyMapper) throws ParserException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/UpdatedSampleParserObjectFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/UpdatedSampleParserObjectFactory.java index d276a5a1c74..553e1857646 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/UpdatedSampleParserObjectFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/parser/UpdatedSampleParserObjectFactory.java @@ -52,17 +52,17 @@ final class UpdatedSampleParserObjectFactory extends NewSampleParserObjectFactor */ private SampleBatchUpdateDetails createBasicBatchUpdateDetails() { - boolean updateExperiment = isColumnAvailable(UpdatedSample.EXPERIMENT); - boolean updateParent = isColumnAvailable(UpdatedSample.PARENT); - boolean updateParents = isColumnAvailable(UpdatedSample.PARENTS); + boolean updateExperiment = isColumnAvailable(NewSample.EXPERIMENT); + boolean updateParent = isColumnAvailable(NewSample.PARENT); + boolean updateParents = isColumnAvailable(NewSample.PARENTS); if (updateParent == true && updateParents == true) { - throw new ParserException("Both '" + UpdatedSample.PARENT + "' and '" - + UpdatedSample.PARENTS + throw new ParserException("Both '" + NewSample.PARENT + "' and '" + + NewSample.PARENTS + "' columns were specified. One of them should be removed from the file."); } updateParents |= updateParent; - boolean updateContainer = isColumnAvailable(UpdatedSample.CONTAINER); + boolean updateContainer = isColumnAvailable(NewSample.CONTAINER); return new SampleBatchUpdateDetails(updateExperiment, updateParents, updateContainer, getUnmatchedProperties()); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/CacheManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/CacheManager.java index 9d52d286136..8c9f00f26fc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/CacheManager.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/CacheManager.java @@ -165,6 +165,7 @@ public class CacheManager implements ICacheManager { File[] keyFiles = cacheFolder.listFiles(new FilenameFilter() { + @Override public boolean accept(File dir, String name) { return name.endsWith(KEY_FILE_TYPE); @@ -232,6 +233,7 @@ public class CacheManager implements ICacheManager return value == null ? defaultValue : value; } + @Override public Object tryToGetData(Key key) { synchronized (keyToFileNameMap) @@ -265,6 +267,7 @@ public class CacheManager implements ICacheManager } } + @Override public void storeData(Key key, Object object) { synchronized (keyToFileNameMap) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/SimplePropertyValidator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/SimplePropertyValidator.java index 2e28a52bf4f..1902fb5cde8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/SimplePropertyValidator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/SimplePropertyValidator.java @@ -153,6 +153,7 @@ public class SimplePropertyValidator // IDataTypeValidator // + @Override public final String validate(final String value) throws UserFailureException { assert value != null : "Unspecified value."; @@ -173,6 +174,7 @@ public class SimplePropertyValidator // IDataTypeValidator // + @Override public final String validate(final String value) throws UserFailureException { assert value != null : "Unspecified value."; @@ -187,6 +189,7 @@ public class SimplePropertyValidator // IDataTypeValidator // + @Override public final String validate(final String value) throws UserFailureException { assert value != null : "Unspecified value."; @@ -212,6 +215,7 @@ public class SimplePropertyValidator // IDataTypeValidator // + @Override public final String validate(final String value) throws UserFailureException { assert value != null : "Unspecified value."; @@ -234,6 +238,7 @@ public class SimplePropertyValidator // IDataTypeValidator // + @Override public final String validate(final String value) throws UserFailureException { assert value != null : "Unspecified value."; @@ -256,6 +261,7 @@ public class SimplePropertyValidator // IDataTypeValidator // + @Override public final String validate(final String value) throws UserFailureException { assert value != null : "Unspecified value."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/SimpleTableModelBuilder.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/SimpleTableModelBuilder.java index 05dbb3ffaeb..47c657ad6ea 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/SimpleTableModelBuilder.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/SimpleTableModelBuilder.java @@ -157,26 +157,31 @@ public class SimpleTableModelBuilder rows.add(new TableModelRow(values)); return new IRowBuilder() { + @Override public void setCell(String headerTitle, String value) { setCell(headerTitle, asText(value)); } + @Override public void setCell(String headerTitle, long value) { setCell(headerTitle, asInteger(value)); } + @Override public void setCell(String headerTitle, double value) { setCell(headerTitle, asDouble(value)); } + @Override public void setCell(String headerTitle, Date value) { setCell(headerTitle, asDate(value)); } + @Override public void setCell(String headerTitle, ISerializableComparable value) { Integer index = titleToIndexMap.get(headerTitle); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/TypedTableModelBuilder.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/TypedTableModelBuilder.java index d9272ee5bfc..cd421f6b23e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/TypedTableModelBuilder.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/TypedTableModelBuilder.java @@ -74,30 +74,35 @@ public class TypedTableModelBuilder<T extends Serializable> this.column = column; } + @Override public IColumnMetaData withTitle(String title) { column.getHeader().setTitle(title); return this; } + @Override public IColumnMetaData withDefaultWidth(int width) { column.getHeader().setDefaultColumnWidth(width); return this; } + @Override public IColumnMetaData withDataType(DataTypeCode dataType) { column.getHeader().setDataType(dataType); return this; } + @Override public IColumnMetaData hideByDefault() { column.getHeader().setHidden(true); return this; } + @Override public IColumnMetaData editable() { column.getHeader().setEditable(true); @@ -128,11 +133,13 @@ public class TypedTableModelBuilder<T extends Serializable> this.groupKey = groupKey; } + @Override public List<Column> getColumns() { return new ArrayList<TypedTableModelBuilder.Column>(cols); } + @Override public IColumn column(String id) { Column column = getOrCreateColumn(id); @@ -140,17 +147,20 @@ public class TypedTableModelBuilder<T extends Serializable> return column; } + @Override public IColumnGroup uneditablePropertyColumns() { uneditablePropertyColumns = true; return this; } + @Override public void addColumnsForAssignedProperties(EntityType entityType) { addColumnsForAssignedProperties(groupKey, entityType); } + @Override public void addColumnsForAssignedProperties(String idPrefix, EntityType entityType) { List<? extends EntityTypePropertyType<?>> propertyTypes = @@ -167,11 +177,13 @@ public class TypedTableModelBuilder<T extends Serializable> } } + @Override public void addColumnsForPropertyTypes(List<PropertyType> propertyTypes) { addColumnsForPropertyTypes(groupKey, propertyTypes); } + @Override public void addColumnsForPropertyTypes(String idPrefix, List<PropertyType> propertyTypes) { for (PropertyType propertyType : propertyTypes) @@ -189,11 +201,13 @@ public class TypedTableModelBuilder<T extends Serializable> return column; } + @Override public void addProperties(Collection<IEntityProperty> properties) { addProperties(groupKey, properties); } + @Override public void addProperties(String idPrefix, Collection<IEntityProperty> properties) { for (IEntityProperty property : properties) @@ -278,47 +292,55 @@ public class TypedTableModelBuilder<T extends Serializable> return index < values.size() ? values.get(index) : EMPTY_CELL; } + @Override public List<Column> getColumns() { return new ArrayList<TypedTableModelBuilder.Column>(Arrays.asList(this)); } + @Override public IColumn withTitle(String title) { header.setTitle(title); return this; } + @Override public IColumn withDefaultWidth(int width) { header.setDefaultColumnWidth(width); return this; } + @Override public IColumn withDataType(DataTypeCode dataType) { header.setDataType(dataType); return this; } + @Override public IColumn withEntityKind(EntityKind entityKind) { header.setEntityKind(entityKind); return this; } + @Override public IColumn editable() { header.setEditable(true); return this; } + @Override public IColumn property(String key, String value) { header.setProperty(key, value); return this; } + @Override public void addValue(ISerializableComparable valueOrNull) { int index = indexProvider.getIndex(); @@ -334,6 +356,7 @@ public class TypedTableModelBuilder<T extends Serializable> values.add(index, valueOrNull); } + @Override public void addString(String valueOrNull) { setDataType(DataTypeCode.VARCHAR); @@ -342,6 +365,7 @@ public class TypedTableModelBuilder<T extends Serializable> addValue(value); } + @Override public void addInteger(Long valueOrNull) { setDataType(DataTypeCode.INTEGER); @@ -350,6 +374,7 @@ public class TypedTableModelBuilder<T extends Serializable> addValue(value); } + @Override public void addDouble(Double valueOrNull) { setDataType(DataTypeCode.REAL); @@ -358,6 +383,7 @@ public class TypedTableModelBuilder<T extends Serializable> addValue(value); } + @Override public void addDate(Date valueOrNull) { setDataType(DataTypeCode.TIMESTAMP); @@ -366,6 +392,7 @@ public class TypedTableModelBuilder<T extends Serializable> addValue(value); } + @Override public void addEntityLink(IEntityInformationHolderWithIdentifier entity, String linkText) { assert entity != null; @@ -379,6 +406,7 @@ public class TypedTableModelBuilder<T extends Serializable> addValue(cell); } + @Override public void addEntityLink( Collection<? extends IEntityInformationHolderWithIdentifier> entities) { @@ -424,11 +452,13 @@ public class TypedTableModelBuilder<T extends Serializable> header.setDataType(DataTypeUtils.getCompatibleDataType(header.getDataType(), dataType)); } + @Override public void addPerson(Person personOrNull) { addString(SimplePersonRenderer.createPersonName(personOrNull).toString()); } + @Override public void setVocabulary(Vocabulary vocabularyOrNull) { header.setVocabulary(vocabularyOrNull); @@ -454,6 +484,7 @@ public class TypedTableModelBuilder<T extends Serializable> List<Column> itemColumns = item.getColumns(); Collections.sort(itemColumns, new Comparator<Column>() { + @Override public int compare(Column c1, Column c2) { String t1 = StringUtils.trimToEmpty(c1.getHeader().getTitle()); @@ -550,6 +581,7 @@ public class TypedTableModelBuilder<T extends Serializable> { column = new Column(id, new IIndexProvider() { + @Override public int getIndex() { return rowObjects.size() - 1; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/AbstractSampleServerPlugin.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/AbstractSampleServerPlugin.java index 9645014538a..9326f2d7eb9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/AbstractSampleServerPlugin.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/AbstractSampleServerPlugin.java @@ -45,6 +45,7 @@ public abstract class AbstractSampleServerPlugin implements ISampleServerPlugin, @Resource(name = ResourceNames.GENERIC_SAMPLE_TYPE_SLAVE_SERVER_PLUGIN) private ISampleTypeSlaveServerPlugin genericSampleTypeSlaveServerPlugin; + @Override public void afterPropertiesSet() throws Exception { sampleServerPluginRegistry.registerPlugin(this); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/ClientPluginFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/ClientPluginFactory.java index 531124afe84..9eb03872e21 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/ClientPluginFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/ClientPluginFactory.java @@ -80,6 +80,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<DemoV // IClientPluginFactory // + @Override public final Set<String> getEntityTypeCodes(final EntityKind entityKind) { if (entityKind == EntityKind.SAMPLE) @@ -89,6 +90,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<DemoV return Collections.emptySet(); } + @Override @SuppressWarnings("unchecked") public <T extends BasicEntityType, I extends IIdAndCodeHolder> IClientPlugin<T, I> createClientPlugin( final EntityKind entityKind) @@ -115,6 +117,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<DemoV // IViewClientPlugin // + @Override public final AbstractTabItemFactory createEntityViewer( final IEntityInformationHolderWithPermId entity) { @@ -156,6 +159,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<DemoV }; } + @Override public final DatabaseModificationAwareWidget createRegistrationForEntityType( final SampleType sampleType, final ActionContext context) { @@ -165,16 +169,19 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<DemoV return new DatabaseModificationAwareWidget(form, form); } + @Override public final Widget createBatchRegistrationForEntityType(final SampleType sampleType) { return new DummyComponent(); } + @Override public final Widget createBatchUpdateForEntityType(final SampleType sampleType) { return new DummyComponent(); } + @Override public AbstractTabItemFactory createEntityEditor(final IIdAndCodeHolder identifiable) { return new AbstractTabItemFactory() diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/DemoViewContext.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/DemoViewContext.java index f49923ce3ac..48a89062c80 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/DemoViewContext.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/DemoViewContext.java @@ -22,6 +22,7 @@ public final class DemoViewContext extends AbstractPluginViewContext<IDemoClient super(commonViewContext); } + @Override public String getTechnology() { return TECHNOLOGY_NAME; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/module/DemoModule.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/module/DemoModule.java index dade425e203..869a9738d0f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/module/DemoModule.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/module/DemoModule.java @@ -51,6 +51,7 @@ public class DemoModule implements IModule return viewContext; } + @Override public List<? extends MenuItem> getMenuItems() { return Collections.singletonList(new TopMenuItemDemoModuleMenu(getViewContext())); @@ -58,16 +59,19 @@ public class DemoModule implements IModule // return new CustomizedWidgetDemoModuleMenu(getViewContext()); } + @Override public String getName() { return viewContext.getMessage(Dict.MODULE_MENU_TITLE); } + @Override public void initialize(AsyncCallback<Void> callback) { callback.onSuccess(null); } + @Override public Collection<? extends DisposableTabContent> getSections( IEntityInformationHolderWithIdentifier entity) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/module/StatisticsWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/module/StatisticsWidget.java index 9409ff21358..53c98f70956 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/module/StatisticsWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/module/StatisticsWidget.java @@ -90,12 +90,14 @@ public class StatisticsWidget extends ContentPanel implements IDatabaseModificat } } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] { DatabaseModificationKind.createOrDelete(ObjectKind.EXPERIMENT) }; } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { refresh(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/module/TopMenuItemDemoModuleMenu.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/module/TopMenuItemDemoModuleMenu.java index 14444b59e1a..a7fc11851ca 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/module/TopMenuItemDemoModuleMenu.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/client/application/module/TopMenuItemDemoModuleMenu.java @@ -85,11 +85,13 @@ public class TopMenuItemDemoModuleMenu extends MenuItem { STATISTICS; + @Override public String getMenuId() { return ID + "_" + this.name(); } + @Override public String getMenuText(IMessageProvider messageProvider) { return messageProvider.getMessage(this.name()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/server/DemoClientService.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/server/DemoClientService.java index e3fab85f71e..8fb37705039 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/server/DemoClientService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/client/web/server/DemoClientService.java @@ -74,6 +74,7 @@ public final class DemoClientService extends AbstractClientService implements ID // IDemoClientService // + @Override public final SampleParentWithDerived getSampleGenerationInfo(final TechId sampleId, String baseIndexURL) { @@ -83,6 +84,7 @@ public final class DemoClientService extends AbstractClientService implements ID return sampleGenerationDTO; } + @Override public final void registerSample(final String sessionKey, final NewSample sample) { @@ -97,6 +99,7 @@ public final class DemoClientService extends AbstractClientService implements ID }.process(sessionKey, getHttpSession(), sample.getAttachments()); } + @Override public int getNumberOfExperiments() throws UserFailureException { final String sessionToken = getSessionToken(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoBusinessObjectFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoBusinessObjectFactory.java index 84ec0ee812f..a660428e3ee 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoBusinessObjectFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoBusinessObjectFactory.java @@ -37,6 +37,7 @@ public final class DemoBusinessObjectFactory extends AbstractPluginBusinessObjec // IGenericBusinessObjectFactory // + @Override public final ISampleBO createSampleBO(final Session session) { return getCommonBusinessObjectFactory().createSampleBO(session); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoSampleServerPlugin.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoSampleServerPlugin.java index 8ab222213c3..89cc5663d3d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoSampleServerPlugin.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoSampleServerPlugin.java @@ -50,6 +50,7 @@ public final class DemoSampleServerPlugin extends AbstractSampleServerPlugin // ISampleServerPlugin // + @Override public final Set<String> getEntityTypeCodes(final EntityKind entityKind) { if (entityKind == EntityKind.SAMPLE) @@ -59,6 +60,7 @@ public final class DemoSampleServerPlugin extends AbstractSampleServerPlugin return Collections.emptySet(); } + @Override public final ISampleTypeSlaveServerPlugin getSlaveServer() { return getGenericSampleTypeSlaveServerPlugin(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoServer.java index c0689bb4b08..bf0d87442ba 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoServer.java @@ -78,6 +78,7 @@ public final class DemoServer extends AbstractServer<IDemoServer> implements IDe /** * Creates a logger used to log invocations of objects of this class. */ + @Override public final IDemoServer createLogger(IInvocationLoggerContext context) { return new DemoServerLogger(getSessionManager(), context); @@ -97,6 +98,7 @@ public final class DemoServer extends AbstractServer<IDemoServer> implements IDe return getSampleInfo(session, sample); } + @Override public final SampleParentWithDerived getSampleInfo(final String sessionToken, final TechId sampleId) { @@ -115,12 +117,14 @@ public final class DemoServer extends AbstractServer<IDemoServer> implements IDe return SampleTranslator.translate(sampleInfo, session.getBaseIndexURL()); } + @Override public final void registerSample(final String sessionToken, final NewSample newSample, final Collection<NewAttachment> attachments) { throw new NotImplementedException(); } + @Override public int getNumberOfExperiments(String sessionToken) { return getDAOFactory().getExperimentDAO().listExperiments().size(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoServerLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoServerLogger.java index b9d7ca65ea4..5a37da848b1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoServerLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/demo/server/DemoServerLogger.java @@ -53,12 +53,14 @@ final class DemoServerLogger extends AbstractServerLogger implements IDemoServer return null; } + @Override public final SampleParentWithDerived getSampleInfo(final String sessionToken, final TechId sampleId) { logAccess(sessionToken, "get_sample_info", "ID(%s)", sampleId); return null; } + @Override public void registerSample(final String sessionToken, final NewSample newSample, final Collection<NewAttachment> attachments) { @@ -66,6 +68,7 @@ final class DemoServerLogger extends AbstractServerLogger implements IDemoServer newSample.getSampleType(), newSample.getIdentifier(), attachments.size()); } + @Override public int getNumberOfExperiments(String sessionToken) { logTracking(sessionToken, "get_number_of_experiments", ""); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/AbstractGenericEntityRegistrationForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/AbstractGenericEntityRegistrationForm.java index bcb305e2468..3c44f5bdacd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/AbstractGenericEntityRegistrationForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/AbstractGenericEntityRegistrationForm.java @@ -146,11 +146,13 @@ public abstract class AbstractGenericEntityRegistrationForm<T extends EntityType // --------------------------------------------------------------------------------------------- // IDatabaseModificationObserver // --------------------------------------------------------------------------------------------- + @Override public final void update(Set<DatabaseModificationKind> observedModifications) { createDatabaseModificationObserver().update(observedModifications); } + @Override public final DatabaseModificationKind[] getRelevantModifications() { return createDatabaseModificationObserver().getRelevantModifications(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/ClientPluginFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/ClientPluginFactory.java index 05f548c8679..cf4259c486d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/ClientPluginFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/ClientPluginFactory.java @@ -95,6 +95,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Gener // IClientPluginFactory // + @Override @SuppressWarnings("unchecked") public final <T extends BasicEntityType, I extends IIdAndCodeHolder> IClientPlugin<T, I> createClientPlugin( EntityKind entityKind) @@ -140,6 +141,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Gener + "' not implemented yet."); } + @Override public final Set<String> getEntityTypeCodes(EntityKind entityKind) { throw new UnsupportedOperationException( @@ -170,6 +172,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Gener // IViewClientPlugin // + @Override public AbstractTabItemFactory createEntityViewer( final IEntityInformationHolderWithPermId entity) { @@ -210,6 +213,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Gener }; } + @Override public final DatabaseModificationAwareWidget createRegistrationForEntityType( final SampleType sampleType, final ActionContext context) { @@ -218,16 +222,19 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Gener return new DatabaseModificationAwareWidget(form, form); } + @Override public final Widget createBatchRegistrationForEntityType(final SampleType sampleType) { return new GenericSampleBatchRegistrationForm(getViewContext(), sampleType); } + @Override public final Widget createBatchUpdateForEntityType(final SampleType sampleType) { return new GenericSampleBatchUpdateForm(getViewContext(), sampleType); } + @Override public AbstractTabItemFactory createEntityEditor(final IIdAndCodeHolder identifiable) { return new AbstractTabItemFactory() @@ -244,7 +251,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Gener @Override public String getId() { - return GenericSampleEditForm.createId(identifiable, EntityKind.SAMPLE); + return AbstractGenericEntityRegistrationForm.createId(identifiable, EntityKind.SAMPLE); } @Override @@ -345,7 +352,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Gener @Override public String getId() { - return GenericMaterialEditForm.createId(identifiable, EntityKind.MATERIAL); + return AbstractGenericEntityRegistrationForm.createId(identifiable, EntityKind.MATERIAL); } @Override @@ -458,7 +465,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Gener @Override public String getId() { - return GenericExperimentEditForm.createId(identifiable, + return AbstractGenericEntityRegistrationForm.createId(identifiable, EntityKind.EXPERIMENT); } @@ -546,7 +553,7 @@ public final class ClientPluginFactory extends AbstractClientPluginFactory<Gener @Override public String getId() { - return GenericDataSetEditForm.createId(identifiable, EntityKind.DATA_SET); + return AbstractGenericEntityRegistrationForm.createId(identifiable, EntityKind.DATA_SET); } @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/GeneralImportForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/GeneralImportForm.java index 626ac4f2873..a8a97c29b4d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/GeneralImportForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/GeneralImportForm.java @@ -103,6 +103,7 @@ public class GeneralImportForm extends AbstractRegistrationForm checkBox.setValue(true); checkBox.addListener(Events.Change, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { if (checkBox.getValue()) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/GenericViewContext.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/GenericViewContext.java index c9ee5584605..7022a06999a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/GenericViewContext.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/GenericViewContext.java @@ -22,6 +22,7 @@ public final class GenericViewContext extends AbstractPluginViewContext<IGeneric super(commonViewContext); } + @Override public String getTechnology() { return TECHNOLOGY_NAME; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/AbstractDataSetsSection.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/AbstractDataSetsSection.java index 09101b36395..317887b8158 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/AbstractDataSetsSection.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/AbstractDataSetsSection.java @@ -51,6 +51,7 @@ public abstract class AbstractDataSetsSection extends DisposableTabContent this.reportSelectionWidget = new ReportingPluginSelectionWidget(viewContext, ownerIdOrNull); this.reportGeneratedAction = new IOnReportComponentGeneratedAction() { + @Override public void execute(IDisposableComponent gridComponent) { replaceContent(gridComponent); @@ -71,6 +72,7 @@ public abstract class AbstractDataSetsSection extends DisposableTabContent new IAddProcessingPluginsMenuAction() { + @Override public void addProcessingPlugins(DataSetProcessingMenu menu) { getHeader().addTool(new SeparatorToolItem()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/DataViewSection.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/DataViewSection.java index 245e2347235..440cc4c70a1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/DataViewSection.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/DataViewSection.java @@ -172,6 +172,7 @@ public class DataViewSection extends TabContent IOnReportComponentGeneratedAction action = new IOnReportComponentGeneratedAction() { + @Override public void execute(IDisposableComponent reportComponent) { disposeCurrentReport(); @@ -276,6 +277,7 @@ public class DataViewSection extends TabContent { return new IDataRefreshCallback() { + @Override public void postRefresh(boolean wasSuccessful) { // - select first service that has 'default-' prefix in key @@ -329,6 +331,7 @@ public class DataViewSection extends TabContent callback); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[0]; // don't update diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetBatchUpdateForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetBatchUpdateForm.java index 16b4e9c4478..77a9510c9fa 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetBatchUpdateForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetBatchUpdateForm.java @@ -191,6 +191,7 @@ public final class GenericDataSetBatchUpdateForm extends AbstractRegistrationFor result.sinkEvents(Event.ONCLICK); result.addListener(Events.OnClick, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { WindowUtils.openWindow(UrlParamsHelper.createTemplateURL(EntityKind.DATA_SET, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetEditForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetEditForm.java index fbe644d34c9..96be00796f0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetEditForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetEditForm.java @@ -234,6 +234,7 @@ public final class GenericDataSetEditForm extends CheckBoxField result = new CheckBoxField("Connected with Sample", false); result.addListener(Events.Change, new Listener<FieldEvent>() { + @Override public void handleEvent(FieldEvent be) { updateFieldsVisibility(); @@ -408,17 +409,20 @@ public final class GenericDataSetEditForm extends this.dataSet = dataSet; } + @Override public void createEntitySpecificFormFields() { this.fileFormatTypeSelectionWidget = createFileFormatTypeField(); } + @Override public void updateOriginalValues(DataSetUpdateResult result) { fileFormatTypeSelectionWidget.updateOriginalValue(fileFormatTypeSelectionWidget .getValue()); } + @Override public void fillUpdates(DataSetUpdates result) { result.setFileFormatTypeCode(extractFileFormatTypeCode()); @@ -429,6 +433,7 @@ public final class GenericDataSetEditForm extends return fileFormatTypeSelectionWidget.tryGetSelectedFileFormatType().getCode(); } + @Override public List<DatabaseModificationAwareField<?>> getEntitySpecificFormFields() { ArrayList<DatabaseModificationAwareField<?>> fields = @@ -437,12 +442,14 @@ public final class GenericDataSetEditForm extends return fields; } + @Override public void initializeFormFields() { fileFormatTypeSelectionWidget.setValue(new FileFormatTypeModel(dataSet .getFileFormatType())); } + @Override public void loadDataInBackground() { // nothing to do @@ -459,6 +466,7 @@ public final class GenericDataSetEditForm extends { } + @Override public void createEntitySpecificFormFields() { this.containedArea = createContainsArea(); @@ -469,12 +477,14 @@ public final class GenericDataSetEditForm extends return new DataSetsContainedArea(viewContext, simpleId); } + @Override public void updateOriginalValues(DataSetUpdateResult result) { final List<String> containedCodes = result.getContainedDataSetCodes(); containedArea.setDataSetCodes(containedCodes); } + @Override public void fillUpdates(DataSetUpdates result) { result.setModifiedContainedDatasetCodesOrNull(extractContainedDatasetCodes()); @@ -485,6 +495,7 @@ public final class GenericDataSetEditForm extends return containedArea.tryGetModifiedDataSetCodes(); } + @Override public List<DatabaseModificationAwareField<?>> getEntitySpecificFormFields() { ArrayList<DatabaseModificationAwareField<?>> fields = @@ -493,12 +504,14 @@ public final class GenericDataSetEditForm extends return fields; } + @Override public void initializeFormFields() { // data set fields are initialized when they are created containedArea.setValue(viewContext.getMessage(Dict.LOAD_IN_PROGRESS)); } + @Override public void loadDataInBackground() { // not best performance but the same solution that is done for experiments diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetViewer.java index 194f803f992..5d5bdc12d45 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetViewer.java @@ -153,6 +153,7 @@ abstract public class GenericDataSetViewer extends AbstractViewerWithVerticalSpl Button exportButton = new Button(viewContext.getMessage(Dict.BUTTON_UPLOAD_DATASETS)); exportButton.addListener(Events.Select, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { TableModelRowWithObject<ExternalData> row = @@ -164,6 +165,7 @@ abstract public class GenericDataSetViewer extends AbstractViewerWithVerticalSpl IDelegatedActionWithResult<SelectedAndDisplayedItems> action = new IDelegatedActionWithResult<SelectedAndDisplayedItems>() { + @Override public SelectedAndDisplayedItems execute() { return new SelectedAndDisplayedItems(dataSets, null, 1); @@ -179,6 +181,7 @@ abstract public class GenericDataSetViewer extends AbstractViewerWithVerticalSpl } addToolBarButton(createDeleteButton(new IDelegatedAction() { + @Override public void execute() { final AsyncCallback<Void> callback = @@ -194,6 +197,7 @@ abstract public class GenericDataSetViewer extends AbstractViewerWithVerticalSpl })); addToolBarButton(createRevertDeletionButton(new IDelegatedAction() { + @Override public void execute() { new RevertDeletionConfirmationDialog(getViewContext().getCommonViewContext(), @@ -346,6 +350,7 @@ abstract public class GenericDataSetViewer extends AbstractViewerWithVerticalSpl processButtonHolder.setupData(result); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] @@ -361,6 +366,7 @@ abstract public class GenericDataSetViewer extends AbstractViewerWithVerticalSpl DatabaseModificationKind.edit(ObjectKind.SAMPLE), }; } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { reloadAllData(); // reloads everything @@ -464,11 +470,13 @@ abstract public class GenericDataSetViewer extends AbstractViewerWithVerticalSpl { return new IActionMenuItem() { + @Override public String getMenuId() { return service.getKey(); } + @Override public String getMenuText(IMessageProvider messageProvider) { return service.getLabel(); @@ -482,6 +490,7 @@ abstract public class GenericDataSetViewer extends AbstractViewerWithVerticalSpl { return new IDelegatedAction() { + @Override public void execute() { viewContext.getCommonService().processDatasets(service, criteria, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/AbstractExperimentBatchRegistrationForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/AbstractExperimentBatchRegistrationForm.java index 8f8240fa949..5bf2249f9af 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/AbstractExperimentBatchRegistrationForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/AbstractExperimentBatchRegistrationForm.java @@ -133,6 +133,7 @@ public abstract class AbstractExperimentBatchRegistrationForm extends AbstractRe result.sinkEvents(Event.ONCLICK); result.addListener(Events.OnClick, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { WindowUtils.openWindow(UrlParamsHelper.createTemplateURL(EntityKind.EXPERIMENT, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/AbstractGenericExperimentRegisterEditForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/AbstractGenericExperimentRegisterEditForm.java index 230729a1537..f3c90db2c9d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/AbstractGenericExperimentRegisterEditForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/AbstractGenericExperimentRegisterEditForm.java @@ -186,6 +186,7 @@ abstract public class AbstractGenericExperimentRegisterEditForm extends result.add(importFromFile); result.addListener(Events.Change, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { updateSamples(); @@ -233,6 +234,7 @@ abstract public class AbstractGenericExperimentRegisterEditForm extends result.sinkEvents(Event.ONCLICK); result.addListener(Events.OnClick, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { if (typeSelection.tryGetSelectedSampleType() != null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentDataSetBrowser.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentDataSetBrowser.java index 4cdebe07778..0b6dc86edec 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentDataSetBrowser.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentDataSetBrowser.java @@ -74,6 +74,7 @@ public class ExperimentDataSetBrowser extends AbstractExternalDataGrid // refresh data when connection type provider value changes connectionTypeProvider.setOnChangeAction(new IDelegatedAction() { + @Override public void execute() { refresh(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentPropertiesPanel.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentPropertiesPanel.java index 3405e87feec..699739a40fb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentPropertiesPanel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentPropertiesPanel.java @@ -152,6 +152,7 @@ public class ExperimentPropertiesPanel extends ContentPanel private class PropertyGridDatabaseModificationObserver extends AbstractDatabaseModificationObserverWithCallback { + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] @@ -165,6 +166,7 @@ public class ExperimentPropertiesPanel extends ContentPanel DatabaseModificationKind.edit(ObjectKind.VOCABULARY_TERM) }; } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { reloadData(new ExperimentInfoCallback(viewContext, ExperimentPropertiesPanel.this)); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentSamplesSection.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentSamplesSection.java index 74fc1877340..ac3b2f3766a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentSamplesSection.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/ExperimentSamplesSection.java @@ -29,8 +29,8 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.sample. import ch.systemsx.cisd.openbis.generic.shared.basic.IIdAndCodeHolder; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.BasicEntityType; +import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.AbstractEntityDataSetsSection; import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.sample.EntityConnectionTypeProvider; -import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.sample.SampleDataSetsSection; /** * {@link TabContent} containing experiment samples. @@ -63,7 +63,7 @@ public class ExperimentSamplesSection extends DisposableTabContent { CheckBox result = new CheckBox(); result.setId(getId() - + SampleDataSetsSection.SHOW_ONLY_DIRECTLY_CONNECTED_CHECKBOX_ID_POSTFIX); + + AbstractEntityDataSetsSection.SHOW_ONLY_DIRECTLY_CONNECTED_CHECKBOX_ID_POSTFIX); result.setBoxLabel(viewContext.getMessage(Dict.SHOW_ONLY_DIRECTLY_CONNECTED)); result.setValue(true); return result; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentViewer.java index 6a5b8e09670..7c627aefcbc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentViewer.java @@ -130,6 +130,7 @@ public class GenericExperimentViewer extends AbstractViewerWithVerticalSplit<Exp } addToolBarButton(createDeleteButton(new IDelegatedAction() { + @Override public void execute() { final AsyncCallback<Void> callback = @@ -141,6 +142,7 @@ public class GenericExperimentViewer extends AbstractViewerWithVerticalSplit<Exp })); addToolBarButton(createRevertDeletionButton(new IDelegatedAction() { + @Override public void execute() { new RevertDeletionConfirmationDialog(viewContext.getCommonViewContext(), @@ -191,6 +193,7 @@ public class GenericExperimentViewer extends AbstractViewerWithVerticalSplit<Exp GWTUtils.executeDelayed(new IDelegatedAction() { + @Override public void execute() { remove(loadingLabel); @@ -241,16 +244,19 @@ public class GenericExperimentViewer extends AbstractViewerWithVerticalSplit<Exp { return new IAttachmentHolder() { + @Override public AttachmentHolderKind getAttachmentHolderKind() { return AttachmentHolderKind.EXPERIMENT; } + @Override public Long getId() { return identifiable.getId(); } + @Override public String getCode() { return identifiable.getCode(); @@ -343,11 +349,13 @@ public class GenericExperimentViewer extends AbstractViewerWithVerticalSplit<Exp } + @Override public DatabaseModificationKind[] getRelevantModifications() { return createModificationObserver().getRelevantModifications(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { createModificationObserver().update(observedModifications); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/material/AbstractMaterialBatchRegistrationForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/material/AbstractMaterialBatchRegistrationForm.java index 0f9ee7d898b..89b5b7d7dac 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/material/AbstractMaterialBatchRegistrationForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/material/AbstractMaterialBatchRegistrationForm.java @@ -145,6 +145,7 @@ abstract class AbstractMaterialBatchRegistrationForm extends AbstractRegistratio result.sinkEvents(Event.ONCLICK); result.addListener(Events.OnClick, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { WindowUtils.openWindow(UrlParamsHelper.createTemplateURL(EntityKind.MATERIAL, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/material/GenericMaterialViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/material/GenericMaterialViewer.java index a45fa3f7853..25ea7df3b27 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/material/GenericMaterialViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/material/GenericMaterialViewer.java @@ -236,11 +236,13 @@ abstract public class GenericMaterialViewer extends AbstractViewerWithVerticalSp } + @Override public DatabaseModificationKind[] getRelevantModifications() { return createDatabaseModificationObserver().getRelevantModifications(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { createDatabaseModificationObserver().update(observedModifications); @@ -256,6 +258,7 @@ abstract public class GenericMaterialViewer extends AbstractViewerWithVerticalSp AbstractDatabaseModificationObserverWithCallback { + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] @@ -268,6 +271,7 @@ abstract public class GenericMaterialViewer extends AbstractViewerWithVerticalSp DatabaseModificationKind.edit(ObjectKind.VOCABULARY_TERM) }; } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { reloadMaterialData(new ReloadPropertyGridCallback(viewContext, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/AbstractGenericSampleRegisterEditForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/AbstractGenericSampleRegisterEditForm.java index 4f6c0674667..2f980442348 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/AbstractGenericSampleRegisterEditForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/AbstractGenericSampleRegisterEditForm.java @@ -218,6 +218,7 @@ abstract public class AbstractGenericSampleRegisterEditForm extends { callback.addOnFailureAction(new IDelegatedAction() { + @Override public void execute() { sampleIdentifierForUploadOrNull = null; @@ -225,6 +226,7 @@ abstract public class AbstractGenericSampleRegisterEditForm extends }); callback.addOnSuccessAction(new IOnSuccessAction<R>() { + @Override public void execute(R result) { if (StringUtils.isBlank(sampleIdentifierForUploadOrNull) == false) @@ -306,6 +308,7 @@ abstract public class AbstractGenericSampleRegisterEditForm extends parentChooserButton .addChosenEntityListener(new IChosenEntitiesListener<TableModelRowWithObject<Sample>>() { + @Override public void entitiesChosen(List<TableModelRowWithObject<Sample>> entities) { for (TableModelRowWithObject<Sample> row : entities) @@ -325,6 +328,7 @@ abstract public class AbstractGenericSampleRegisterEditForm extends experimentField.getChooserField().addChosenEntityListener( new IChosenEntitiesListener<TableModelRowWithObject<Experiment>>() { + @Override public void entitiesChosen( List<TableModelRowWithObject<Experiment>> entities) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/EntityConnectionTypeProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/EntityConnectionTypeProvider.java index edec23015c4..123c3509e41 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/EntityConnectionTypeProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/EntityConnectionTypeProvider.java @@ -47,6 +47,7 @@ public class EntityConnectionTypeProvider implements IDirectlyConnectedControlle { showOnlyDirectlyConnectedCheckBox.addListener(Events.Change, new Listener<FieldEvent>() { + @Override public void handleEvent(FieldEvent be) { if (onChangeAction != null) @@ -57,11 +58,13 @@ public class EntityConnectionTypeProvider implements IDirectlyConnectedControlle }); } + @Override public void setOnChangeAction(IDelegatedAction onChangeAction) { this.onChangeAction = onChangeAction; } + @Override public boolean isOnlyDirectlyConnected() { return showOnlyDirectlyConnectedCheckBox.getValue(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleBatchRegistrationForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleBatchRegistrationForm.java index add7cf70589..2714cfaa6b0 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleBatchRegistrationForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleBatchRegistrationForm.java @@ -80,6 +80,7 @@ public final class GenericSampleBatchRegistrationForm extends AbstractSampleBatc generateCodesCheckbox); generateCodesCheckbox.addListener(Events.Change, new Listener<FieldEvent>() { + @Override public void handleEvent(FieldEvent be) { boolean selected = (Boolean) be.getValue(); @@ -127,6 +128,7 @@ public final class GenericSampleBatchRegistrationForm extends AbstractSampleBatc result.sinkEvents(Event.ONCLICK); result.addListener(Events.OnClick, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { WindowUtils.openWindow(UrlParamsHelper.createTemplateURL(EntityKind.SAMPLE, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleBatchUpdateForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleBatchUpdateForm.java index 2f87fb03f64..7d2aa8e69ac 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleBatchUpdateForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleBatchUpdateForm.java @@ -208,6 +208,7 @@ public final class GenericSampleBatchUpdateForm extends AbstractRegistrationForm result.sinkEvents(Event.ONCLICK); result.addListener(Events.OnClick, new Listener<BaseEvent>() { + @Override public void handleEvent(BaseEvent be) { WindowUtils.openWindow(UrlParamsHelper.createTemplateURL(EntityKind.SAMPLE, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleViewer.java index 4ca9c758625..f4f032dc8d4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleViewer.java @@ -159,6 +159,7 @@ abstract public class GenericSampleViewer extends AbstractViewerWithVerticalSpli } addToolBarButton(createDeleteButton(new IDelegatedAction() { + @Override @SuppressWarnings( { "unchecked", "rawtypes" }) public void execute() @@ -173,6 +174,7 @@ abstract public class GenericSampleViewer extends AbstractViewerWithVerticalSpli })); addToolBarButton(createRevertDeletionButton(new IDelegatedAction() { + @Override public void execute() { new RevertDeletionConfirmationDialog(getViewContext().getCommonViewContext(), @@ -392,11 +394,13 @@ abstract public class GenericSampleViewer extends AbstractViewerWithVerticalSpli } + @Override public DatabaseModificationKind[] getRelevantModifications() { return createDatabaseModificationObserver().getRelevantModifications(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { createDatabaseModificationObserver().update(observedModifications); @@ -434,6 +438,7 @@ abstract public class GenericSampleViewer extends AbstractViewerWithVerticalSpli AbstractDatabaseModificationObserverWithCallback { + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[] @@ -448,6 +453,7 @@ abstract public class GenericSampleViewer extends AbstractViewerWithVerticalSpli DatabaseModificationKind.edit(ObjectKind.VOCABULARY_TERM) }; } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { reloadSampleGenerationData(new ReloadPropertyGridCallback(getViewContext(), diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/SampleDataSetBrowser.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/SampleDataSetBrowser.java index a7ebf92328c..d57be173213 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/SampleDataSetBrowser.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/SampleDataSetBrowser.java @@ -75,6 +75,7 @@ class SampleDataSetBrowser extends AbstractExternalDataGrid // refresh data when connection type provider value changes connectionTypeProvider.setOnChangeAction(new IDelegatedAction() { + @Override public void execute() { refresh(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/DataSetLoader.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/DataSetLoader.java index 1116fede7f7..a6d6a99c0bc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/DataSetLoader.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/DataSetLoader.java @@ -52,6 +52,7 @@ public class DataSetLoader tabFileLoader = new BisTabFileLoader<NewDataSet>(new IParserObjectFactoryFactory<NewDataSet>() { + @Override public final IParserObjectFactory<NewDataSet> createFactory( final IPropertyMapper propertyMapper) throws ParserException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/ExperimentLoader.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/ExperimentLoader.java index dbe70e409a6..fee7ef191d7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/ExperimentLoader.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/ExperimentLoader.java @@ -54,6 +54,7 @@ public class ExperimentLoader new BisTabFileLoader<NewBasicExperiment>( new IParserObjectFactoryFactory<NewBasicExperiment>() { + @Override public final IParserObjectFactory<NewBasicExperiment> createFactory( final IPropertyMapper propertyMapper) throws ParserException diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/GenericClientService.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/GenericClientService.java index ce867a8b5f0..7d030ca61b7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/GenericClientService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/GenericClientService.java @@ -44,6 +44,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.BatchOperationKind; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.BatchRegistrationResult; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetUpdateResult; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExperimentType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExperimentUpdateResult; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExperimentUpdates; @@ -120,6 +121,7 @@ public class GenericClientService extends AbstractClientService implements IGene // IGenericClientService // + @Override public final SampleParentWithDerived getSampleGenerationInfo(final TechId sampleId) { try @@ -135,11 +137,13 @@ public class GenericClientService extends AbstractClientService implements IGene } } + @Override public final Sample getSampleInfo(final TechId sampleId) { return getSampleGenerationInfo(sampleId).getParent(); } + @Override public final void registerSample(final String sessionKey, final NewSample newSample) { final String sessionToken = getSessionToken(); @@ -153,6 +157,7 @@ public class GenericClientService extends AbstractClientService implements IGene }.process(sessionKey, getHttpSession(), newSample.getAttachments()); } + @Override public final List<BatchRegistrationResult> registerSamples(final SampleType sampleType, final String sessionKey, final String defaultGroupIdentifier, boolean updateExisting) { @@ -172,6 +177,7 @@ public class GenericClientService extends AbstractClientService implements IGene } } + @Override public final List<BatchRegistrationResult> registerOrUpdateSamplesAndMaterials( final String sessionKey, final String defaultGroupIdentifier, boolean updateExisting, boolean async, String userEmail) throws UserFailureException @@ -180,7 +186,7 @@ public class GenericClientService extends AbstractClientService implements IGene updateExisting ? BatchOperationKind.UPDATE : BatchOperationKind.REGISTRATION; final SampleType sampleType = new SampleType(); - sampleType.setCode(SampleType.DEFINED_IN_FILE); + sampleType.setCode(EntityType.DEFINED_IN_FILE); HttpSession session = getHttpSession(); UploadedFilesBean uploadedFiles = null; @@ -192,7 +198,7 @@ public class GenericClientService extends AbstractClientService implements IGene defaultGroupIdentifier != null, true, "SAMPLES", operationKind); final MaterialType materialType = new MaterialType(); - materialType.setCode(SampleType.DEFINED_IN_FILE); + materialType.setCode(EntityType.DEFINED_IN_FILE); BatchMaterialsOperation materialsInfo = parseMaterials(session, uploadedFiles, materialType, "MATERIALS", updateExisting); @@ -228,6 +234,7 @@ public class GenericClientService extends AbstractClientService implements IGene } } + @Override public final List<BatchRegistrationResult> updateSamples(final SampleType sampleType, final String sessionKey, final String defaultGroupIdentifier) { @@ -246,6 +253,7 @@ public class GenericClientService extends AbstractClientService implements IGene } + @Override public final ExternalData getDataSetInfo(final TechId datasetId) { try @@ -260,6 +268,7 @@ public class GenericClientService extends AbstractClientService implements IGene } } + @Override public void registerExperiment(final String attachmentsSessionKey, final String samplesSessionKey, final NewExperiment experiment) { @@ -344,6 +353,7 @@ public class GenericClientService extends AbstractClientService implements IGene { return new SampleCodeGenerator() { + @Override public List<String> generateCodes(int size) { return genericServer.generateCodes(getSessionToken(), codePrefix, size); @@ -355,6 +365,7 @@ public class GenericClientService extends AbstractClientService implements IGene } } + @Override public final List<BatchRegistrationResult> registerMaterials(final MaterialType materialType, boolean updateExisting, final String sessionKey) { @@ -366,6 +377,7 @@ public class GenericClientService extends AbstractClientService implements IGene return results.getResultList(); } + @Override public final List<BatchRegistrationResult> registerExperiments( final ExperimentType experimentType, final String sessionKey) { @@ -378,6 +390,7 @@ public class GenericClientService extends AbstractClientService implements IGene return loader.getResults(); } + @Override public List<BatchRegistrationResult> updateMaterials(MaterialType materialType, String sessionKey, boolean ignoreUnregisteredMaterials) { @@ -465,6 +478,7 @@ public class GenericClientService extends AbstractClientService implements IGene } } + @Override public SampleUpdateResult updateSample(final SampleUpdates updates) { final String sessionToken = getSessionToken(); @@ -503,6 +517,7 @@ public class GenericClientService extends AbstractClientService implements IGene return result; } + @Override public Date updateMaterial(TechId materialId, List<IEntityProperty> properties, Date version) { try @@ -515,6 +530,7 @@ public class GenericClientService extends AbstractClientService implements IGene } } + @Override public ExperimentUpdateResult updateExperiment(final ExperimentUpdates updates) { final String sessionToken = getSessionToken(); @@ -568,6 +584,7 @@ public class GenericClientService extends AbstractClientService implements IGene return updatesDTO; } + @Override public DataSetUpdateResult updateDataSet(final DataSetUpdates updates) { final String sessionToken = getSessionToken(); @@ -595,6 +612,7 @@ public class GenericClientService extends AbstractClientService implements IGene return updatesDTO; } + @Override public List<BatchRegistrationResult> updateDataSets(DataSetType dataSetType, String sessionKey) { @@ -620,6 +638,7 @@ public class GenericClientService extends AbstractClientService implements IGene } } + @Override public List<BatchRegistrationResult> updateExperiments(ExperimentType experimentType, String sessionKey) throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/MaterialLoader.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/MaterialLoader.java index d47ec2f8875..d19d7200147 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/MaterialLoader.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/MaterialLoader.java @@ -32,6 +32,7 @@ public class MaterialLoader tabFileLoader = new BisTabFileLoader<NewMaterial>(new IParserObjectFactoryFactory<NewMaterial>() { + @Override public final IParserObjectFactory<NewMaterial> createFactory( final IPropertyMapper propertyMapper) throws ParserException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/UpdatedExperimentLoader.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/UpdatedExperimentLoader.java index f53843b8c56..2dba6da3c29 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/UpdatedExperimentLoader.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/UpdatedExperimentLoader.java @@ -53,6 +53,7 @@ public class UpdatedExperimentLoader new BisTabFileLoader<UpdatedBasicExperiment>( new IParserObjectFactoryFactory<UpdatedBasicExperiment>() { + @Override public final IParserObjectFactory<UpdatedBasicExperiment> createFactory( final IPropertyMapper propertyMapper) throws ParserException diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/parser/MaterialUploadSectionsParser.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/parser/MaterialUploadSectionsParser.java index 98b68c4a195..60d11dfe92f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/parser/MaterialUploadSectionsParser.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/parser/MaterialUploadSectionsParser.java @@ -142,6 +142,7 @@ public class MaterialUploadSectionsParser new BisExcelFileLoader<NewMaterial>( new IParserObjectFactoryFactory<NewMaterial>() { + @Override public final IParserObjectFactory<NewMaterial> createFactory( final IPropertyMapper propertyMapper) throws ParserException @@ -192,6 +193,7 @@ public class MaterialUploadSectionsParser new BisTabFileLoader<NewMaterial>( new IParserObjectFactoryFactory<NewMaterial>() { + @Override public final IParserObjectFactory<NewMaterial> createFactory( final IPropertyMapper propertyMapper) throws ParserException diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/parser/UpdatedDataSetParserObjectFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/parser/UpdatedDataSetParserObjectFactory.java index 3d3782af0ab..85c024e16f8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/parser/UpdatedDataSetParserObjectFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/parser/UpdatedDataSetParserObjectFactory.java @@ -95,11 +95,11 @@ public final class UpdatedDataSetParserObjectFactory extends private DataSetBatchUpdateDetails createBasicBatchUpdateDetails() { DataSetBatchUpdateDetails details = new DataSetBatchUpdateDetails(); - details.setExperimentUpdateRequested(isColumnAvailable(UpdatedDataSet.EXPERIMENT)); - details.setSampleUpdateRequested(isColumnAvailable(UpdatedDataSet.SAMPLE)); - details.setParentsUpdateRequested(isColumnAvailable(UpdatedDataSet.PARENTS)); - details.setContainerUpdateRequested(isColumnAvailable(UpdatedDataSet.CONTAINER)); - details.setFileFormatUpdateRequested(isColumnAvailable(UpdatedDataSet.FILE_FORMAT)); + details.setExperimentUpdateRequested(isColumnAvailable(NewDataSet.EXPERIMENT)); + details.setSampleUpdateRequested(isColumnAvailable(NewDataSet.SAMPLE)); + details.setParentsUpdateRequested(isColumnAvailable(NewDataSet.PARENTS)); + details.setContainerUpdateRequested(isColumnAvailable(NewDataSet.CONTAINER)); + details.setFileFormatUpdateRequested(isColumnAvailable(NewDataSet.FILE_FORMAT)); return details; } @@ -141,7 +141,7 @@ public final class UpdatedDataSetParserObjectFactory extends { if (isDeletionMark(newDataSet.getExperimentIdentifier())) { - throw new ParserException(UpdatedDataSet.EXPERIMENT + throw new ParserException(NewDataSet.EXPERIMENT + " column is required and cannot be marked for deletetion."); } else if (isEmpty(newDataSet.getExperimentIdentifier())) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/AbstractGenericServerPlugin.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/AbstractGenericServerPlugin.java index 22869429bd6..c0613108bdd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/AbstractGenericServerPlugin.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/AbstractGenericServerPlugin.java @@ -28,6 +28,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind; */ abstract class AbstractGenericServerPlugin implements IServerPlugin { + @Override public final Set<String> getEntityTypeCodes(final EntityKind entityKind) { throw new UnsupportedOperationException("No entity type code is associated to " diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/ExperimentBatchRegistration.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/ExperimentBatchRegistration.java index 3421e67b67e..4ff84f01fb4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/ExperimentBatchRegistration.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/ExperimentBatchRegistration.java @@ -28,22 +28,26 @@ public class ExperimentBatchRegistration implements IBatchOperation<NewBasicExpe this.experimentType = experimentType; } + @Override public void execute(List<NewBasicExperiment> entities) { experimentTable.add(entities, experimentType); experimentTable.save(); } + @Override public List<NewBasicExperiment> getAllEntities() { return newExperiments; } + @Override public String getEntityName() { return "experiment"; } + @Override public String getOperationName() { return "register"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/ExperimentBatchUpdate.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/ExperimentBatchUpdate.java index a47eee3b870..ac9453ec0ed 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/ExperimentBatchUpdate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/ExperimentBatchUpdate.java @@ -25,22 +25,26 @@ public class ExperimentBatchUpdate implements IBatchOperation<ExperimentBatchUpd this.entities = newExperiments; } + @Override public void execute(List<ExperimentBatchUpdatesDTO> entitiesToUpdate) { experimentTable.prepareForUpdate(entitiesToUpdate); experimentTable.save(); } + @Override public List<ExperimentBatchUpdatesDTO> getAllEntities() { return entities; } + @Override public String getEntityName() { return "experiment"; } + @Override public String getOperationName() { return "register"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericBusinessObjectFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericBusinessObjectFactory.java index 1a348ecb361..5348e3b08bc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericBusinessObjectFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericBusinessObjectFactory.java @@ -50,61 +50,73 @@ public final class GenericBusinessObjectFactory extends AbstractPluginBusinessOb // IGenericBusinessObjectFactory // + @Override public final ISampleBO createSampleBO(final Session session) { return getCommonBusinessObjectFactory().createSampleBO(session); } + @Override public IExperimentBO createExperimentBO(final Session session) { return getCommonBusinessObjectFactory().createExperimentBO(session); } + @Override public IExperimentTable createExperimentTable(final Session session) { return getCommonBusinessObjectFactory().createExperimentTable(session); } + @Override public IMaterialBO createMaterialBO(final Session session) { return getCommonBusinessObjectFactory().createMaterialBO(session); } + @Override public final ISampleTable createSampleTable(final Session session) { return getCommonBusinessObjectFactory().createSampleTable(session); } + @Override public IMaterialTable createMaterialTable(Session session) { return getCommonBusinessObjectFactory().createMaterialTable(session); } + @Override public IDataBO createDataBO(Session session) { return getCommonBusinessObjectFactory().createDataBO(session); } + @Override public IDataSetTable createDataSetTable(Session session) { return getCommonBusinessObjectFactory().createDataSetTable(session); } + @Override public IProjectBO createProjectBO(Session session) { return getCommonBusinessObjectFactory().createProjectBO(session); } + @Override public ITrashBO createTrashBO(Session session) { return getCommonBusinessObjectFactory().createTrashBO(session); } + @Override public ISampleLister createSampleLister(Session session) { return SampleLister.create(getDaoFactory(), session.getBaseIndexURL()); } + @Override public IMaterialLister createMaterialLister(Session session) { return MaterialLister.create(getDaoFactory(), session.getBaseIndexURL()); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericDataSetServerPlugin.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericDataSetServerPlugin.java index f1d1ce15cbe..e80f3025366 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericDataSetServerPlugin.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericDataSetServerPlugin.java @@ -35,6 +35,7 @@ public class GenericDataSetServerPlugin extends AbstractGenericServerPlugin impl @Resource(name = ch.systemsx.cisd.openbis.generic.shared.ResourceNames.GENERIC_DATA_SET_TYPE_SLAVE_SERVER_PLUGIN) private GenericDataSetTypeSlaveServerPlugin genericDataSetTypeSlaveServerPlugin; + @Override public IDataSetTypeSlaveServerPlugin getSlaveServer() { return genericDataSetTypeSlaveServerPlugin; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericDataSetTypeSlaveServerPlugin.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericDataSetTypeSlaveServerPlugin.java index c4d32cc6766..f5c2e0e2826 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericDataSetTypeSlaveServerPlugin.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericDataSetTypeSlaveServerPlugin.java @@ -46,6 +46,7 @@ public class GenericDataSetTypeSlaveServerPlugin implements IDataSetTypeSlaveSer { } + @Override public void permanentlyDeleteDataSets(Session session, List<DataPE> dataSets, String reason, boolean forceNotExistingLocations, boolean forceDisallowedTypes) { @@ -54,6 +55,7 @@ public class GenericDataSetTypeSlaveServerPlugin implements IDataSetTypeSlaveSer dataSetTable.deleteLoadedDataSets(reason, forceNotExistingLocations, forceDisallowedTypes); } + @Override public void updateDataSets(Session session, List<DataSetBatchUpdatesDTO> dataSets) { assert session != null : "Unspecified session."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericSampleServerPlugin.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericSampleServerPlugin.java index b92088bef86..76ba90d5356 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericSampleServerPlugin.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericSampleServerPlugin.java @@ -42,6 +42,7 @@ public final class GenericSampleServerPlugin extends AbstractGenericServerPlugin // ISampleServerPlugin // + @Override public final ISampleTypeSlaveServerPlugin getSlaveServer() { return genericSampleTypeSlaveServerPlugin; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericSampleTypeSlaveServerPlugin.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericSampleTypeSlaveServerPlugin.java index 60dc6f2cf84..22ca374dbbb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericSampleTypeSlaveServerPlugin.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericSampleTypeSlaveServerPlugin.java @@ -61,6 +61,7 @@ public final class GenericSampleTypeSlaveServerPlugin implements ISampleTypeSlav // ISlaveServerPlugin // + @Override public final SampleParentWithDerivedDTO getSampleInfo(final Session session, final SamplePE sample) throws UserFailureException { @@ -74,6 +75,7 @@ public final class GenericSampleTypeSlaveServerPlugin implements ISampleTypeSlav return new SampleParentWithDerivedDTO(sample, generated); } + @Override public final void registerSamples(final Session session, final List<NewSample> newSamples, PersonPE registratorOrNUll) throws UserFailureException { @@ -84,6 +86,7 @@ public final class GenericSampleTypeSlaveServerPlugin implements ISampleTypeSlav .createSampleTable(session), newSamples, registratorOrNUll)); } + @Override public void updateSamples(Session session, List<SampleBatchUpdatesDTO> updateSamples) { assert session != null : "Unspecified session."; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServer.java index 26a79c7c36b..ff214aaccc7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServer.java @@ -58,6 +58,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExperimentUpdateResult; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IEntityProperty; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ListOrSearchSampleCriteria; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ListSampleCriteria; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewAttachment; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewBasicExperiment; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewDataSet; @@ -144,6 +145,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen /** * Creates a logger used to log invocations of objects of this class. */ + @Override public IGenericServer createLogger(IInvocationLoggerContext context) { return new GenericServerLogger(getSessionManager(), context); @@ -169,12 +171,14 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen .getSampleInfo(session, sample), session.getBaseIndexURL()); } + @Override public final SampleParentWithDerived getSampleInfo(final String sessionToken, final TechId sampleId) { return commonServer.getSampleInfo(sessionToken, sampleId); } + @Override public final void registerSample(final String sessionToken, final NewSample newSample, final Collection<NewAttachment> attachments) { @@ -224,11 +228,13 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen ExperimentTranslator.LoadableFields.ATTACHMENTS); } + @Override public ExternalData getDataSetInfo(final String sessionToken, final TechId datasetId) { return commonServer.getDataSetInfo(sessionToken, datasetId); } + @Override public AttachmentWithContent getExperimentFileAttachment(final String sessionToken, final TechId experimentId, final String filename, final Integer versionOrNull) throws UserFailureException @@ -240,6 +246,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen filename, versionOrNull)); } + @Override public final void registerOrUpdateSamples(final String sessionToken, final List<NewSamplesWithTypes> newSamplesWithType) throws UserFailureException { @@ -287,6 +294,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen this.session = session; } + @Override public void execute(List<NewSample> newSamples) { fillHomeSpace(newSamples, session.tryGetHomeGroupCode()); @@ -328,21 +336,24 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen for (Sample s : existingContainers) { existingSamples.addAll(sampleLister.list(new ListOrSearchSampleCriteria( - ListOrSearchSampleCriteria.createForContainer(new TechId(s.getId()))))); + ListSampleCriteria.createForContainer(new TechId(s.getId()))))); } return existingSamples; } + @Override public List<NewSample> getAllEntities() { return entities; } + @Override public String getEntityName() { return "sample"; } + @Override public String getOperationName() { return "update/register preprocessing"; @@ -350,6 +361,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen } + @Override public final void registerSamples(final String sessionToken, final List<NewSamplesWithTypes> newSamplesWithType) throws UserFailureException { @@ -361,6 +373,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen } } + @Override public void updateSamples(String sessionToken, List<NewSamplesWithTypes> newSamplesWithType) throws UserFailureException { @@ -372,6 +385,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen } } + @Override public void updateDataSets(String sessionToken, NewDataSetsWithTypes dataSets) throws UserFailureException { @@ -510,6 +524,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen } } + @Override public void registerExperiment(String sessionToken, NewExperiment newExperiment, final Collection<NewAttachment> attachments) { @@ -567,6 +582,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen } } + @Override public void registerMaterials(String sessionToken, final List<NewMaterialsWithTypes> newMaterials) { @@ -586,6 +602,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen materials.getNewEntities()); } + @Override public int updateMaterials(String sessionToken, final List<NewMaterialsWithTypes> newMaterials, final boolean ignoreUnregisteredMaterials) throws UserFailureException { @@ -602,6 +619,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen return count; } + @Override public AttachmentWithContent getProjectFileAttachment(String sessionToken, TechId projectId, String fileName, Integer versionOrNull) { @@ -612,6 +630,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen versionOrNull)); } + @Override public AttachmentWithContent getSampleFileAttachment(String sessionToken, TechId sampleId, String fileName, Integer versionOrNull) { @@ -622,6 +641,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen versionOrNull)); } + @Override public List<String> generateCodes(String sessionToken, String prefix, int number) { checkSession(sessionToken); @@ -633,6 +653,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen return result; } + @Override public ExperimentUpdateResult updateExperiment(String sessionToken, ExperimentUpdatesDTO updates) { final Session session = getSession(sessionToken); @@ -650,22 +671,26 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen return result; } + @Override public Date updateMaterial(String sessionToken, TechId materialId, List<IEntityProperty> properties, Date version) { return commonServer.updateMaterial(sessionToken, materialId, properties, version); } + @Override public SampleUpdateResult updateSample(String sessionToken, SampleUpdatesDTO updates) { return commonServer.updateSample(sessionToken, updates); } + @Override public DataSetUpdateResult updateDataSet(String sessionToken, DataSetUpdatesDTO updates) { return commonServer.updateDataSet(sessionToken, updates); } + @Override public void registerOrUpdateMaterials(String sessionToken, List<NewMaterialsWithTypes> materials) { assert sessionToken != null : "Unspecified session token."; @@ -685,6 +710,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen } } + @Override public void registerExperiments(String sessionToken, NewExperimentsWithType experiments) throws UserFailureException { @@ -720,6 +746,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen * @param experiments Should be a NewExperimentsWithType where the newExperiments contains a * collection of {@link UpdatedBasicExperiment} objects. */ + @Override public void updateExperiments(String sessionToken, UpdatedExperimentsWithType experiments) throws UserFailureException { @@ -807,6 +834,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen return materialHelper; } + @Override public void registerOrUpdateSamplesAndMaterials(final String sessionToken, final List<NewSamplesWithTypes> newSamplesWithType, final List<NewMaterialsWithTypes> newMaterialsWithType) throws UserFailureException @@ -818,6 +846,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen registerOrUpdateSamples(sessionToken, newSamplesWithType); } + @Override public void registerOrUpdateSamplesAndMaterialsAsync(final String sessionToken, final List<NewSamplesWithTypes> newSamplesWithType, final List<NewMaterialsWithTypes> newMaterialsWithType, String userEmail) @@ -825,11 +854,13 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen { executeASync(userEmail, new IASyncAction() { + @Override public String getName() { return "General Batch Import"; } + @Override public boolean doAction(Writer messageWriter) { try diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServerLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServerLogger.java index ec482fe2f64..3328bb641c7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServerLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServerLogger.java @@ -77,6 +77,7 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric return null; } + @Override public final SampleParentWithDerived getSampleInfo(final String sessionToken, final TechId sampleId) { @@ -84,6 +85,7 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric return null; } + @Override public void registerSample(final String sessionToken, final NewSample newSample, final Collection<NewAttachment> attachments) { @@ -91,12 +93,14 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric newSample.getSampleType(), newSample.getIdentifier(), attachments.size()); } + @Override public ExternalData getDataSetInfo(final String sessionToken, final TechId datasetId) { logAccess(sessionToken, "get_data_set_info", "ID(%s)", datasetId); return null; } + @Override public void registerExperiment(String sessionToken, NewExperiment experiment, final Collection<NewAttachment> attachments) { @@ -105,11 +109,13 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric experiment.getExperimentTypeCode(), experiment.getIdentifier(), attachments.size()); } + @Override public void registerMaterials(String sessionToken, List<NewMaterialsWithTypes> newMaterials) { logTracking(sessionToken, "register_materials", getMaterials(newMaterials)); } + @Override public int updateMaterials(String sessionToken, List<NewMaterialsWithTypes> newMaterials, boolean ignoreUnregisteredMaterials) throws UserFailureException { @@ -117,6 +123,7 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric return 0; } + @Override public AttachmentWithContent getExperimentFileAttachment(final String sessionToken, final TechId experimentId, final String filename, final Integer versionOrNull) throws UserFailureException @@ -126,6 +133,7 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric return null; } + @Override public AttachmentWithContent getProjectFileAttachment(String sessionToken, TechId projectId, String fileName, Integer versionOrNull) { @@ -134,6 +142,7 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric return null; } + @Override public AttachmentWithContent getSampleFileAttachment(String sessionToken, TechId sampleId, String fileName, Integer versionOrNull) { @@ -142,12 +151,14 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric return null; } + @Override public List<String> generateCodes(String sessionToken, String prefix, int number) { logAccess(sessionToken, "generate_codes", "PREFIX(%s) NUMBER(%s)", prefix, number); return null; } + @Override public ExperimentUpdateResult updateExperiment(String sessionToken, ExperimentUpdatesDTO updates) { logTracking(sessionToken, "edit_experiment", @@ -157,6 +168,7 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric return null; } + @Override public Date updateMaterial(String sessionToken, TechId materialId, List<IEntityProperty> properties, Date version) { @@ -164,6 +176,7 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric return null; } + @Override public SampleUpdateResult updateSample(String sessionToken, SampleUpdatesDTO updates) { logTracking(sessionToken, "edit_sample", @@ -173,6 +186,7 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric return null; } + @Override public DataSetUpdateResult updateDataSet(String sessionToken, DataSetUpdatesDTO updates) { logTracking(sessionToken, "edit_data_set", "DATA_SET(%s) SAMPLE(%s) MODIFIED_PARENTS(%s)", @@ -181,18 +195,21 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric return null; } + @Override public void registerSamples(String sessionToken, List<NewSamplesWithTypes> newSamplesWithType) throws UserFailureException { logTracking(sessionToken, "register_samples", getSamples(newSamplesWithType)); } + @Override public void updateSamples(String sessionToken, List<NewSamplesWithTypes> updatedSamplesWithType) throws UserFailureException { logTracking(sessionToken, "update_samples", getSamples(updatedSamplesWithType)); } + @Override public void registerOrUpdateMaterials(String sessionToken, List<NewMaterialsWithTypes> materials) { for (NewMaterialsWithTypes materialsWithType : materials) @@ -203,12 +220,14 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric } } + @Override public void registerOrUpdateSamples(String sessionToken, List<NewSamplesWithTypes> newSamplesWithType) throws UserFailureException { logTracking(sessionToken, "register_or_update_samples", getSamples(newSamplesWithType)); } + @Override public void updateDataSets(String sessionToken, NewDataSetsWithTypes dataSets) throws UserFailureException { @@ -216,6 +235,7 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric (dataSets.getDataSetType().getCode() + ":" + dataSets.getNewDataSets().size())); } + @Override public void registerExperiments(String sessionToken, NewExperimentsWithType experiments) throws UserFailureException { @@ -223,6 +243,7 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric experiments.getExperimentTypeCode(), experiments.getNewExperiments().size()); } + @Override public void updateExperiments(String sessionToken, UpdatedExperimentsWithType experiments) throws UserFailureException { @@ -230,6 +251,7 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric .getExperimentType().getCode(), experiments.getUpdatedExperiments().size()); } + @Override public void registerOrUpdateSamplesAndMaterials(final String sessionToken, final List<NewSamplesWithTypes> newSamplesWithType, final List<NewMaterialsWithTypes> newMaterialsWithType) throws UserFailureException @@ -240,6 +262,7 @@ final class GenericServerLogger extends AbstractServerLogger implements IGeneric getMaterials(newMaterialsWithType)); } + @Override public void registerOrUpdateSamplesAndMaterialsAsync(final String sessionToken, final List<NewSamplesWithTypes> newSamplesWithType, final List<NewMaterialsWithTypes> newMaterialsWithType, String userEmail) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/api/v1/QueryApiFacade.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/api/v1/QueryApiFacade.java index f6c88aaa7f5..74040be3a3e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/api/v1/QueryApiFacade.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/api/v1/QueryApiFacade.java @@ -53,36 +53,43 @@ class QueryApiFacade implements IQueryApiFacade } + @Override public String getSessionToken() { return sessionToken; } + @Override public void logout() { service.logout(sessionToken); } + @Override public IGeneralInformationService getGeneralInformationService() { return generalInformationService; } + @Override public List<QueryDescription> listQueries() { return service.listQueries(sessionToken); } + @Override public QueryTableModel executeQuery(long queryID, Map<String, String> parameterBindings) { return service.executeQuery(sessionToken, queryID, parameterBindings); } + @Override public List<ReportDescription> listTableReportDescriptions() { return service.listTableReportDescriptions(sessionToken); } + @Override public QueryTableModel createReportFromDataSets(ReportDescription reportDescription, List<String> dataSetCodes) { @@ -90,12 +97,14 @@ class QueryApiFacade implements IQueryApiFacade reportDescription.getKey(), dataSetCodes); } + @Override public List<AggregationServiceDescription> listAggregationServices() { checkMinimalServerVersion(1, 3); return service.listAggregationServices(sessionToken); } + @Override public QueryTableModel createReportFromAggregationService(AggregationServiceDescription serviceDescription, Map<String, Object> parameters) { checkMinimalServerVersion(1, 3); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/ClientPluginFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/ClientPluginFactory.java index 034e41ff0f0..4616033b6b2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/ClientPluginFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/ClientPluginFactory.java @@ -46,6 +46,7 @@ public class ClientPluginFactory extends AbstractClientPluginFactory<QueryViewCo return new QueryViewContext(originalViewContext); } + @Override public <T extends BasicEntityType, I extends IIdAndCodeHolder> IClientPlugin<T, I> createClientPlugin( EntityKind entityKind) { @@ -53,6 +54,7 @@ public class ClientPluginFactory extends AbstractClientPluginFactory<QueryViewCo + "' not implemented yet."); } + @Override public Set<String> getEntityTypeCodes(EntityKind entityKind) { return Collections.emptySet(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/DisplayTypeIDGenerator.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/DisplayTypeIDGenerator.java index e4fb5d070bb..51db6b5c0e5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/DisplayTypeIDGenerator.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/DisplayTypeIDGenerator.java @@ -36,11 +36,13 @@ public enum DisplayTypeIDGenerator implements IDisplayTypeIDGenerator this.genericNameOrPrefix = genericNameOrPrefix; } + @Override public String createID() { return genericNameOrPrefix; } + @Override public String createID(String suffix) { return genericNameOrPrefix + suffix; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/QueryModule.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/QueryModule.java index e827868ecf8..92e010cfed9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/QueryModule.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/QueryModule.java @@ -52,18 +52,21 @@ public class QueryModule implements IModule this.viewContext = viewContext; } + @Override public String getName() { return viewContext .getMessage(ch.systemsx.cisd.openbis.plugin.query.client.web.client.application.Dict.QUERY_MODULE_MENU_TITLE); } + @Override public void initialize(AsyncCallback<Void> callback) { viewContext.getService().initDatabases( new DatabasesInitializationCallback(viewContext, callback)); } + @Override public List<? extends MenuItem> getMenuItems() { if (databases == 0) @@ -102,6 +105,7 @@ public class QueryModule implements IModule } + @Override public Collection<? extends DisposableTabContent> getSections( IEntityInformationHolderWithIdentifier entity) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/QuerySectionPanel.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/QuerySectionPanel.java index 302ceb74157..de129d4e26e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/QuerySectionPanel.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/QuerySectionPanel.java @@ -74,20 +74,24 @@ final class QuerySectionPanel extends DisposableTabContent QueryViewer.create(queryModuleContext, toolbar); return new IDisposableComponent() { + @Override public void dispose() { } + @Override public Component getComponent() { return viewer.get(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return viewer.getRelevantModifications(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { viewer.update(observedModifications); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/QueryViewContext.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/QueryViewContext.java index 098df87a2d7..7938372c10d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/QueryViewContext.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/QueryViewContext.java @@ -38,6 +38,7 @@ public class QueryViewContext extends AbstractPluginViewContext<IQueryClientServ super(commonViewContext); } + @Override public String getTechnology() { return TECHNOLOGY_NAME; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/locator/QueryLocatorResolver.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/locator/QueryLocatorResolver.java index 517e0582b6e..1638eef7ef1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/locator/QueryLocatorResolver.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/locator/QueryLocatorResolver.java @@ -42,6 +42,7 @@ public class QueryLocatorResolver extends AbstractViewLocatorResolver this.viewContext = viewContext; } + @Override public void resolve(final ViewLocator locator) throws UserFailureException { // opens a predefined query results viewer with optional: diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryBrowserGrid.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryBrowserGrid.java index 4c675552d62..1ac4139fdca 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryBrowserGrid.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryBrowserGrid.java @@ -70,7 +70,7 @@ public class QueryBrowserGrid extends TypedTableGrid<QueryExpression> List<TableModelRowWithObject<QueryExpression>> data, AbstractAsyncCallback<Void> callback) { - super(viewContext, data, viewContext.getMessage(Dict.DELETE_CONFIRMATION_TITLE)); + super(viewContext, data, viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.DELETE_CONFIRMATION_TITLE)); this.callback = callback; this.viewContext = viewContext; } @@ -136,9 +136,10 @@ public class QueryBrowserGrid extends TypedTableGrid<QueryExpression> addButton(addButton); final Button editButton = createSelectedItemButton( - viewContext.getMessage(Dict.BUTTON_EDIT), + viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.BUTTON_EDIT), new ISelectedEntityInvoker<BaseEntityModel<TableModelRowWithObject<QueryExpression>>>() { + @Override public void invoke( BaseEntityModel<TableModelRowWithObject<QueryExpression>> selectedItem, boolean keyPressed) @@ -152,7 +153,7 @@ public class QueryBrowserGrid extends TypedTableGrid<QueryExpression> }); addButton(editButton); Button deleteButton = - createSelectedItemsButton(viewContext.getMessage(Dict.BUTTON_DELETE), + createSelectedItemsButton(viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.BUTTON_DELETE), new AbstractCreateDialogListener() { @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryDatabaseSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryDatabaseSelectionWidget.java index 2131c3a8e08..3b50a359cf4 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryDatabaseSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryDatabaseSelectionWidget.java @@ -79,6 +79,7 @@ public final class QueryDatabaseSelectionWidget extends callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.QUERY); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryEditor.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryEditor.java index 5738836a6a6..e13a47bb675 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryEditor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryEditor.java @@ -86,7 +86,7 @@ public class QueryEditor extends Dialog private static Button createCancelButton(IViewContext<?> viewContext, final Window window) { - return new Button(viewContext.getMessage(Dict.BUTTON_CANCEL), + return new Button(viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.BUTTON_CANCEL), new SelectionListener<ButtonEvent>() { @Override @@ -128,6 +128,7 @@ public class QueryEditor extends Dialog parameterFields = new ArrayList<IParameterField>(); final IParameterValuesLoader parameterValuesloader = new IParameterValuesLoader() { + @Override public void loadData(String queryExpression, AbstractAsyncCallback<List<ParameterValue>> listParameterValuesCallback) { @@ -145,7 +146,7 @@ public class QueryEditor extends Dialog } add(form, new BorderLayoutData(LayoutRegion.CENTER)); - addButton(new Button(viewContext.getMessage(Dict.BUTTON_SUBMIT), + addButton(new Button(viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.BUTTON_SUBMIT), new SelectionListener<ButtonEvent>() { @Override @@ -215,14 +216,14 @@ public class QueryEditor extends Dialog setButtons(""); nameField = - AbstractRegistrationDialog.createTextField(viewContext.getMessage(Dict.NAME), true); + AbstractRegistrationDialog.createTextField(viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.NAME), true); nameField.setMaxLength(200); descriptionField = AbstractRegistrationDialog.createTextField( - viewContext.getMessage(Dict.DESCRIPTION), false); + viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.DESCRIPTION), false); descriptionField.setMaxLength(GenericConstants.DESCRIPTION_2000); statementField = createStatementField(); - isPublicField = new CheckBoxField(viewContext.getMessage(Dict.IS_PUBLIC), false); + isPublicField = new CheckBoxField(viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.IS_PUBLIC), false); queryDatabaseSelectionWidget = new QueryDatabaseSelectionWidget(viewContext, (queryOrNull != null) ? queryOrNull.getQueryDatabase() : null); @@ -230,6 +231,7 @@ public class QueryEditor extends Dialog queryTypeField.addListener(Events.SelectionChange, new Listener<SelectionChangedEvent<SimpleComboValue<QueryType>>>() { + @Override public void handleEvent( SelectionChangedEvent<SimpleComboValue<QueryType>> be) { @@ -404,7 +406,7 @@ public class QueryEditor extends Dialog private Button createSaveButton(final FormPanel form, final IDelegatedAction refreshAction) { final Button button = - new Button(viewContext.getMessage(Dict.BUTTON_SAVE), + new Button(viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.BUTTON_SAVE), new SelectionListener<ButtonEvent>() { @Override @@ -447,6 +449,7 @@ public class QueryEditor extends Dialog new BindingsDialog(viewContext, parameters, queryDatabase, new QueryExecutor() { + @Override public void execute( QueryParameterBindings parameterBindings) { @@ -526,11 +529,13 @@ public class QueryEditor extends Dialog { return new IReportInformationProvider() { + @Override public String getDownloadURL() { return null; } + @Override public String getKey() { return Integer.toString(sqlQuery.hashCode()); @@ -542,6 +547,7 @@ public class QueryEditor extends Dialog { return new IOnReportComponentGeneratedAction() { + @Override public void execute(final IDisposableComponent reportComponent) { removeAll(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryModuleDatabaseMenuItem.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryModuleDatabaseMenuItem.java index 66e51020725..455d915f652 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryModuleDatabaseMenuItem.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryModuleDatabaseMenuItem.java @@ -59,6 +59,7 @@ public class QueryModuleDatabaseMenuItem extends MenuItem { RUN_CANNED_QUERY("Run Predefined Query") { + @Override public DatabaseModificationAwareComponent createComponent( IViewContext<IQueryClientServiceAsync> viewContext) { @@ -74,6 +75,7 @@ public class QueryModuleDatabaseMenuItem extends MenuItem }, RUN_CUSTOM_QUERY("Run Custom SQL Query") { + @Override public DatabaseModificationAwareComponent createComponent( IViewContext<IQueryClientServiceAsync> viewContext) { @@ -82,6 +84,7 @@ public class QueryModuleDatabaseMenuItem extends MenuItem }, QUERY_BROWSER("Browsing and Edition of SQL Queries") { + @Override public DatabaseModificationAwareComponent createComponent( IViewContext<IQueryClientServiceAsync> viewContext) { @@ -96,16 +99,19 @@ public class QueryModuleDatabaseMenuItem extends MenuItem this.helpPageTitle = helpPageTitle; } + @Override public String getHelpPageTitle() { return helpPageTitle; } + @Override public String getName() { return name(); } + @Override public String tryGetLink() { return null; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QuerySelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QuerySelectionWidget.java index 228e9d400a7..9c16ed98b9d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QuerySelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QuerySelectionWidget.java @@ -85,6 +85,7 @@ public final class QuerySelectionWidget extends DropDownList<QueryModel, QueryEx callback.ignore(); } + @Override public DatabaseModificationKind[] getRelevantModifications() { return DatabaseModificationKind.any(ObjectKind.QUERY); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryViewer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryViewer.java index 68dbc3933d2..2dd8c5fd01c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryViewer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/QueryViewer.java @@ -73,6 +73,7 @@ public class QueryViewer extends ContentPanel implements IDatabaseModificationOb setTopComponent(toolBar); toolBar.setRefreshViewerAction(new IDelegatedAction() { + @Override public void execute() { refresh(); @@ -113,11 +114,13 @@ public class QueryViewer extends ContentPanel implements IDatabaseModificationOb } } + @Override public DatabaseModificationKind[] getRelevantModifications() { return queryProvider.getRelevantModifications(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { queryProvider.update(observedModifications); @@ -129,11 +132,13 @@ public class QueryViewer extends ContentPanel implements IDatabaseModificationOb return new IReportInformationProvider() { + @Override public String getDownloadURL() { return null; } + @Override public String getKey() { if (queryIdOrNull != null) @@ -154,6 +159,7 @@ public class QueryViewer extends ContentPanel implements IDatabaseModificationOb { return new IOnReportComponentGeneratedAction() { + @Override public void execute(final IDisposableComponent reportComponent) { if (currentGridOrNull != null) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/RunCannedQueryToolbar.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/RunCannedQueryToolbar.java index cb303c56b75..22ed4961558 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/RunCannedQueryToolbar.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/RunCannedQueryToolbar.java @@ -105,7 +105,7 @@ public class RunCannedQueryToolbar extends AbstractQueryProviderToolbar entityTypeOrNull); parameterContainer = new ButtonGroup(MAX_PARAMETER_COLUMNS); parameterFields = new HashSet<IParameterField>(); - resetButton = new Button(viewContext.getMessage(Dict.BUTTON_RESET)); + resetButton = new Button(viewContext.getMessage(ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict.BUTTON_RESET)); add(new LabelToolItem(viewContext.getMessage(Dict.QUERY) + ": ")); add(querySelectionWidget); add(parameterContainer); @@ -124,6 +124,7 @@ public class RunCannedQueryToolbar extends AbstractQueryProviderToolbar }); querySelectionWidget.addPostRefreshCallback(new IDataRefreshCallback() { + @Override public void postRefresh(boolean wasSuccessful) { updateParameterFields(); @@ -173,6 +174,7 @@ public class RunCannedQueryToolbar extends AbstractQueryProviderToolbar parameterContainer.hide(); final IDelegatedAction updateExecuteButtonAction = new IDelegatedAction() { + @Override public void execute() { updateExecuteButtonEnabledState(); @@ -180,6 +182,7 @@ public class RunCannedQueryToolbar extends AbstractQueryProviderToolbar }; final IParameterValuesLoader parameterValuesloader = new IParameterValuesLoader() { + @Override public void loadData(String queryExpression, AbstractAsyncCallback<List<ParameterValue>> listParameterValuesCallback) { @@ -260,24 +263,28 @@ public class RunCannedQueryToolbar extends AbstractQueryProviderToolbar // ICustomQueryProvider // + @Override public Long tryGetQueryId() { QueryExpression selectedQueryOrNull = querySelectionWidget.tryGetSelected(); return selectedQueryOrNull == null ? null : selectedQueryOrNull.getId(); } + @Override public String tryGetSQLQuery() { QueryExpression selectedQueryOrNull = querySelectionWidget.tryGetSelected(); return selectedQueryOrNull == null ? null : selectedQueryOrNull.getExpression(); } + @Override public QueryDatabase tryGetQueryDatabase() { QueryExpression selectedQueryOrNull = querySelectionWidget.tryGetSelected(); return selectedQueryOrNull == null ? null : selectedQueryOrNull.getQueryDatabase(); } + @Override public QueryParameterBindings tryGetQueryParameterBindings() { QueryParameterBindings bindings = new QueryParameterBindings(); @@ -294,11 +301,13 @@ public class RunCannedQueryToolbar extends AbstractQueryProviderToolbar // IDatabaseModificationObserver + @Override public DatabaseModificationKind[] getRelevantModifications() { return querySelectionWidget.getRelevantModifications(); } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { querySelectionWidget.update(observedModifications); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/RunCustomQueryToolbar.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/RunCustomQueryToolbar.java index 85fb4f78daf..2b836724b10 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/RunCustomQueryToolbar.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/RunCustomQueryToolbar.java @@ -76,21 +76,25 @@ public class RunCustomQueryToolbar extends AbstractQueryProviderToolbar // ICustomQueryProvider // + @Override public Long tryGetQueryId() { return null; } + @Override public String tryGetSQLQuery() { return queryField.getValue(); } + @Override public QueryDatabase tryGetQueryDatabase() { return queryDatabaseSelectionWidget.tryGetSelected(); } + @Override public QueryParameterBindings tryGetQueryParameterBindings() { return null; @@ -98,11 +102,13 @@ public class RunCustomQueryToolbar extends AbstractQueryProviderToolbar // IDatabaseModificationObserver + @Override public DatabaseModificationKind[] getRelevantModifications() { return new DatabaseModificationKind[0]; } + @Override public void update(Set<DatabaseModificationKind> observedModifications) { // nothing to do diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/SQLQueryField.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/SQLQueryField.java index 53c61a72675..f0fb79c2896 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/SQLQueryField.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/client/application/module/SQLQueryField.java @@ -82,6 +82,7 @@ public class SQLQueryField extends MultilineVarcharField protected class SingleSQLQueryValidator implements Validator { + @Override public String validate(Field<?> field, final String fieldValue) { int indexOfSemicolon = fieldValue.trim().indexOf(';'); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/server/QueryClientService.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/server/QueryClientService.java index b5a68c3c25e..99504a39627 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/server/QueryClientService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/client/web/server/QueryClientService.java @@ -88,18 +88,21 @@ public class QueryClientService extends AbstractClientService implements IQueryC // IQueryClientService // + @Override public int initDatabases() { final String sessionToken = getSessionToken(); return queryServer.initDatabases(sessionToken); } + @Override public List<QueryDatabase> listQueryDatabases() { final String sessionToken = getSessionToken(); return queryServer.listQueryDatabases(sessionToken); } + @Override public TableModelReference createQueryResultsReport(QueryDatabase database, String sqlQuery, QueryParameterBindings bindingsOrNull) { @@ -109,6 +112,7 @@ public class QueryClientService extends AbstractClientService implements IQueryC return createTableModelReference(tableModel); } + @Override public List<ParameterValue> listParameterValues(QueryDatabase database, String sqlQuery) { final String sessionToken = getSessionToken(); @@ -126,6 +130,7 @@ public class QueryClientService extends AbstractClientService implements IQueryC return new ArrayList<ParameterValue>(valuesSet); } + @Override public TableModelReference createQueryResultsReport(TechId query, QueryParameterBindings bindingsOrNull) { @@ -153,12 +158,14 @@ public class QueryClientService extends AbstractClientService implements IQueryC tableModel.tryGetMessage()); } + @Override public List<QueryExpression> listQueries(QueryType queryType, BasicEntityType entityTypeOrNull) { final String sessionToken = getSessionToken(); return queryServer.listQueries(sessionToken, queryType, entityTypeOrNull); } + @Override public TypedTableResultSet<QueryExpression> listQueries( final IResultSetConfig<String, TableModelRowWithObject<QueryExpression>> resultSetConfig) { @@ -166,22 +173,26 @@ public class QueryClientService extends AbstractClientService implements IQueryC resultSetConfig); } + @Override public String prepareExportQueries( TableExportCriteria<TableModelRowWithObject<QueryExpression>> criteria) { return prepareExportEntities(criteria); } + @Override public void registerQuery(NewQuery query) { queryServer.registerQuery(getSessionToken(), query); } + @Override public void deleteQueries(List<TechId> filterIds) { queryServer.deleteQueries(getSessionToken(), filterIds); } + @Override public void updateQuery(IQueryUpdates queryUpdate) { queryServer.updateQuery(getSessionToken(), queryUpdate); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/DAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/DAO.java index a381470ab0a..253dd16672a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/DAO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/DAO.java @@ -88,6 +88,7 @@ class DAO extends SimpleJdbcDaoSupport implements IDAO afterPropertiesSet(); } + @Override public TableModel query(String sqlQuery, QueryParameterBindings bindingsOrNull) { if (sqlQuery.toLowerCase().trim().startsWith("select") == false) @@ -103,6 +104,7 @@ class DAO extends SimpleJdbcDaoSupport implements IDAO PreparedStatementCallback callback = new PreparedStatementCallback() { + @Override public Object doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryDatabaseDefinitionProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryDatabaseDefinitionProvider.java index 81717ef7b30..08f8e142d22 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryDatabaseDefinitionProvider.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryDatabaseDefinitionProvider.java @@ -77,6 +77,7 @@ public class QueryDatabaseDefinitionProvider implements IQueryDatabaseDefinition */ private Map<String, DatabaseDefinition> definitions; + @Override public void initDatabaseDefinitions() { if (definitions != null) @@ -153,12 +154,14 @@ public class QueryDatabaseDefinitionProvider implements IQueryDatabaseDefinition } } + @Override public DatabaseDefinition getDefinition(String dbKey) { checkInitialization(); return definitions.get(dbKey); } + @Override public Collection<DatabaseDefinition> getAllDefinitions() throws ch.systemsx.cisd.openbis.generic.client.web.client.exception.UserFailureException { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryServer.java index db219b7d4d9..314473982b5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryServer.java @@ -90,11 +90,13 @@ public class QueryServer extends AbstractServer<IQueryServer> implements IQueryS this.dbDefinitionProvider = dbDefinitionProvider; } + @Override public IQueryServer createLogger(IInvocationLoggerContext context) { return new QueryServerLogger(getSessionManager(), context); } + @Override public int initDatabases(String sessionToken) { checkSession(sessionToken); @@ -102,6 +104,7 @@ public class QueryServer extends AbstractServer<IQueryServer> implements IQueryS return dbDefinitionProvider.getAllDefinitions().size(); } + @Override public List<QueryDatabase> listQueryDatabases(String sessionToken) { checkSession(sessionToken); @@ -115,6 +118,7 @@ public class QueryServer extends AbstractServer<IQueryServer> implements IQueryS return results; } + @Override public List<QueryExpression> listQueries(String sessionToken, QueryType queryType, BasicEntityType entityTypeOrNull) { @@ -149,6 +153,7 @@ public class QueryServer extends AbstractServer<IQueryServer> implements IQueryS } } + @Override public void registerQuery(String sessionToken, NewQuery expression) { Session session = getSession(sessionToken); @@ -174,6 +179,7 @@ public class QueryServer extends AbstractServer<IQueryServer> implements IQueryS } } + @Override public void deleteQueries(String sessionToken, List<TechId> filterIds) { Session session = getSession(sessionToken); @@ -194,6 +200,7 @@ public class QueryServer extends AbstractServer<IQueryServer> implements IQueryS } } + @Override public void updateQuery(String sessionToken, IQueryUpdates updates) { Session session = getSession(sessionToken); @@ -221,6 +228,7 @@ public class QueryServer extends AbstractServer<IQueryServer> implements IQueryS } } + @Override public TableModel queryDatabase(String sessionToken, QueryDatabase database, String sqlQuery, QueryParameterBindings bindings, boolean onlyPerform) { @@ -243,6 +251,7 @@ public class QueryServer extends AbstractServer<IQueryServer> implements IQueryS } } + @Override public TableModel queryDatabase(String sessionToken, TechId queryId, QueryParameterBindings bindings) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryServerLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryServerLogger.java index 69f8820051d..9ef86452edc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryServerLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryServerLogger.java @@ -44,6 +44,7 @@ class QueryServerLogger extends AbstractServerLogger implements IQueryServer super(sessionManager, context); } + @Override public int initDatabases(String sessionToken) { logAccess(sessionToken, "init_databases"); @@ -62,12 +63,14 @@ class QueryServerLogger extends AbstractServerLogger implements IQueryServer return null; } + @Override public List<QueryDatabase> listQueryDatabases(String sessionToken) { logAccess(sessionToken, "list_query_databases"); return null; } + @Override public List<QueryExpression> listQueries(String sessionToken, QueryType queryType, BasicEntityType entityTypeOrNull) { @@ -76,22 +79,26 @@ class QueryServerLogger extends AbstractServerLogger implements IQueryServer return null; } + @Override public void registerQuery(String sessionToken, NewQuery expression) { logTracking(sessionToken, "register_query", "EXPRESSION(%s)", expression.getName()); } + @Override public void deleteQueries(String sessionToken, List<TechId> filterIds) { logTracking(sessionToken, "delete_queries", "QUERIES(%s)", filterIds.size()); } + @Override public void updateQuery(String sessionToken, IQueryUpdates updates) { logTracking(sessionToken, "update_query", "ID(%s) QUERY_NAME(%s)", updates.getId(), updates.getName()); } + @Override public TableModel queryDatabase(String sessionToken, QueryDatabase database, String sqlQuery, QueryParameterBindings bindings, boolean onlyPerform) { @@ -101,6 +108,7 @@ class QueryServerLogger extends AbstractServerLogger implements IQueryServer } + @Override public TableModel queryDatabase(String sessionToken, TechId queryId, QueryParameterBindings bindings) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/QueryApiLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/QueryApiLogger.java index 451bf5f0616..2fef4121cd9 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/QueryApiLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/QueryApiLogger.java @@ -40,17 +40,20 @@ class QueryApiLogger extends AbstractServerLogger implements IQueryApiServer super(sessionManager, context); } + @Override public String tryToAuthenticateAtQueryServer(String userID, String userPassword) { return null; } + @Override public List<QueryDescription> listQueries(String sessionToken) { logAccess(sessionToken, "list_queries"); return null; } + @Override public QueryTableModel executeQuery(String sessionToken, long queryID, Map<String, String> parameterBindings) { @@ -59,12 +62,14 @@ class QueryApiLogger extends AbstractServerLogger implements IQueryApiServer return null; } + @Override public List<ReportDescription> listTableReportDescriptions(String sessionToken) { logAccess(sessionToken, "list_table_report_descriptions"); return null; } + @Override public QueryTableModel createReportFromDataSets(String sessionToken, String dataStoreCode, String serviceKey, List<String> dataSetCodes) { @@ -73,22 +78,26 @@ class QueryApiLogger extends AbstractServerLogger implements IQueryApiServer return null; } + @Override public int getMajorVersion() { return 1; } + @Override public int getMinorVersion() { return 0; } + @Override public List<AggregationServiceDescription> listAggregationServices(String sessionToken) { logAccess(sessionToken, "list_aggregation_services"); return null; } + @Override public QueryTableModel createReportFromAggregationService(String sessionToken, String dataStoreCode, String serviceKey, Map<String, Object> parameters) { logAccess(sessionToken, "create_report_from_aggregation_service", diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/QueryApiServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/QueryApiServer.java index 973e5333c34..518fedae0f6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/QueryApiServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/api/v1/QueryApiServer.java @@ -87,11 +87,13 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I this.commonServer = commonServer; } + @Override public IQueryApiServer createLogger(IInvocationLoggerContext context) { return new QueryApiLogger(sessionManager, context); } + @Override public String tryToAuthenticateAtQueryServer(String userID, String userPassword) { SessionContextDTO session = tryToAuthenticate(userID, userPassword); @@ -102,6 +104,7 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I return session == null ? null : session.getSessionToken(); } + @Override public List<QueryDescription> listQueries(String sessionToken) { List<QueryDescription> result = new ArrayList<QueryDescription>(); @@ -128,6 +131,7 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I return result; } + @Override public QueryTableModel executeQuery(String sessionToken, long queryID, Map<String, String> parameterBindings) { @@ -139,6 +143,7 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I return translate(queryServer.queryDatabase(sessionToken, new TechId(queryID), bindings)); } + @Override public List<ReportDescription> listTableReportDescriptions(String sessionToken) { checkSession(sessionToken); @@ -174,6 +179,7 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I return services; } + @Override public QueryTableModel createReportFromDataSets(String sessionToken, String dataStoreCode, String serviceKey, List<String> dataSetCodes) { @@ -184,6 +190,7 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I dataSetCodes)); } + @Override public List<AggregationServiceDescription> listAggregationServices(String sessionToken) { checkSession(sessionToken); @@ -211,6 +218,7 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I return services; } + @Override public QueryTableModel createReportFromAggregationService(String sessionToken, String dataStoreCode, String serviceKey, Map<String, Object> parameters) { checkSession(sessionToken); @@ -220,11 +228,13 @@ public class QueryApiServer extends AbstractServer<IQueryApiServer> implements I return translate(commonServer.createReportFromAggregationService(sessionToken, description, parameters)); } + @Override public int getMajorVersion() { return 1; } + @Override public int getMinorVersion() { return 3; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/AuthorizationChecker.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/AuthorizationChecker.java index faafc2c03e9..31d02ec8de5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/AuthorizationChecker.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/AuthorizationChecker.java @@ -35,6 +35,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE; public class AuthorizationChecker implements IAuthorizationChecker { + @Override public boolean isAuthorized(PersonPE person, SpacePE dataSpaceOrNull, RoleWithHierarchy minimalRole) { final Set<RoleWithHierarchy> requiredRoles = minimalRole.getRoles(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/DataSetGroupLoader.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/DataSetGroupLoader.java index f5c9f253d64..44aa41a5b0b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/DataSetGroupLoader.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/DataSetGroupLoader.java @@ -40,6 +40,7 @@ class DataSetGroupLoader implements IGroupLoader this.dao = dao; } + @Override public Map<String, SpacePE> loadGroups(Set<String> keys) { Map<String, SpacePE> map = new HashMap<String, SpacePE>(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/ExperimentGroupLoader.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/ExperimentGroupLoader.java index 75aadfee631..b4ceabe4f9c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/ExperimentGroupLoader.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/ExperimentGroupLoader.java @@ -40,6 +40,7 @@ class ExperimentGroupLoader implements IGroupLoader this.dao = dao; } + @Override public Map<String, SpacePE> loadGroups(Set<String> keys) { Map<String, SpacePE> map = new HashMap<String, SpacePE>(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/GroupLoaderFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/GroupLoaderFactory.java index c8c935cf39a..3cdcaa64e79 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/GroupLoaderFactory.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/GroupLoaderFactory.java @@ -33,6 +33,7 @@ class GroupLoaderFactory implements IGroupLoaderFactory this.factory = factory; } + @Override public IGroupLoader create(EntityKind kind) { switch (kind) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/SampleGroupLoader.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/SampleGroupLoader.java index 25c73969475..95fa26334ae 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/SampleGroupLoader.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/SampleGroupLoader.java @@ -40,6 +40,7 @@ class SampleGroupLoader implements IGroupLoader this.dao = dao; } + @Override public Map<String, SpacePE> loadGroups(Set<String> keys) { Map<String, SpacePE> map = new HashMap<String, SpacePE>(); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/basic/dto/QueryDatabase.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/basic/dto/QueryDatabase.java index d450461e2d8..821b72e2072 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/basic/dto/QueryDatabase.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/basic/dto/QueryDatabase.java @@ -77,6 +77,7 @@ public class QueryDatabase implements Serializable, Comparable<QueryDatabase> return label + " [" + key + "]"; } + @Override public int compareTo(QueryDatabase o) { return key.compareTo(o.key); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/basic/dto/QueryExpression.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/basic/dto/QueryExpression.java index 164593f841c..346b09652e7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/basic/dto/QueryExpression.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/basic/dto/QueryExpression.java @@ -44,6 +44,7 @@ public class QueryExpression extends AbstractExpressionWithParameters implements setExpression(expression); } + @Override public QueryType getQueryType() { return queryType; @@ -59,6 +60,7 @@ public class QueryExpression extends AbstractExpressionWithParameters implements return queryDatabase == null ? null : queryDatabase.getLabel(); } + @Override public QueryDatabase getQueryDatabase() { return queryDatabase; @@ -69,6 +71,7 @@ public class QueryExpression extends AbstractExpressionWithParameters implements this.queryDatabase = queryDatabase; } + @Override public String getEntityTypeCode() { return entityTypeCode; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/FileFormatTypeGridTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/FileFormatTypeGridTest.java index 7fb5d915ac5..366ccd70ac0 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/FileFormatTypeGridTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/FileFormatTypeGridTest.java @@ -23,6 +23,8 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework. import ch.systemsx.cisd.openbis.generic.client.web.client.application.menu.TopMenu.ActionMenuKind; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data.FileFormatTypeGrid; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.entity_type.AddTypeDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractRegistrationDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractSaveDialog; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.TextToolItem; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.FileFormatTypeGridColumnIDs; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; @@ -66,6 +68,7 @@ public class FileFormatTypeGridTest extends AbstractGWTTestCase { return new AbstractDefaultTestCommand() { + @Override public void execute() { GWTTestUtil.selectTabItemWithId(MainTabPanel.ID, FileFormatTypeGrid.BROWSER_ID @@ -74,10 +77,10 @@ public class FileFormatTypeGridTest extends AbstractGWTTestCase (TextToolItem) GWTTestUtil .getWidgetWithID(FileFormatTypeGrid.ADD_NEW_TYPE_BUTTON_ID); toolItem.fireEvent(Events.Select, new ButtonEvent(toolItem)); - GWTTestUtil.getTextFieldWithID(AddTypeDialog.CODE_FIELD_ID).setValue("my-type"); + GWTTestUtil.getTextFieldWithID(AbstractRegistrationDialog.CODE_FIELD_ID).setValue("my-type"); GWTTestUtil.getTextFieldWithID(AddTypeDialog.DESCRIPTION_FIELD_ID).setValue( "hello"); - GWTTestUtil.clickButtonWithID(AddTypeDialog.SAVE_BUTTON_ID); + GWTTestUtil.clickButtonWithID(AbstractSaveDialog.SAVE_BUTTON_ID); } }; } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchCommand.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchCommand.java index f2bfee61dbd..6dbeba3f113 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchCommand.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchCommand.java @@ -59,6 +59,7 @@ final class SearchCommand extends AbstractDefaultTestCommand // AbstractDefaultTestCommand // + @Override public final void execute() { final TextField<String> textField = diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchTest.java index 21b09ff9884..53d71a1fcfa 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/SearchTest.java @@ -193,6 +193,7 @@ public class SearchTest extends AbstractGWTTestCase { return new AbstractDefaultTestCommand() { + @Override public void execute() { GWTTestUtil diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/VocabularyBrowserTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/VocabularyBrowserTest.java index 8eb12c3e8bf..5d5604bb742 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/VocabularyBrowserTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/VocabularyBrowserTest.java @@ -32,8 +32,8 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.CheckTab import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.RemoteConsole; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.CommonGridIDs; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary; -import ch.systemsx.cisd.openbis.generic.shared.basic.dto.VocabularyTermGridIDs; /** * A {@link AbstractGWTTestCase} extension to test <i>Vocabulary Browser</i>. @@ -79,7 +79,7 @@ public class VocabularyBrowserTest extends AbstractGWTTestCase private static void expectTermWithCode(CheckTableCommand termsTable, String code) { - termsTable.expectedColumn(VocabularyTermGridIDs.CODE, code); + termsTable.expectedColumn(CommonGridIDs.CODE, code); } public static class ShowVocabularyTerms extends AbstractDefaultTestCommand @@ -91,6 +91,7 @@ public class VocabularyBrowserTest extends AbstractGWTTestCase this.vocabularyCode = vocabularyCode; } + @Override @SuppressWarnings("unchecked") public void execute() { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/OpenViewCommand.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/OpenViewCommand.java index a7f107ecd65..e2f26b58333 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/OpenViewCommand.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/locator/OpenViewCommand.java @@ -38,6 +38,7 @@ public class OpenViewCommand extends AbstractDefaultTestCommand this.locator = new ViewLocator(urlParams); } + @Override public void execute() { ViewLocatorResolverRegistry registry = diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ActivateTab.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ActivateTab.java index 8038c72d31b..4db9726523a 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ActivateTab.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ActivateTab.java @@ -40,6 +40,7 @@ public class ActivateTab extends AbstractDefaultTestCommand // AbstractDefaultTestCommand // + @Override public void execute() { GWTTestUtil.selectTabItemWithId(tabPanelId, tabItemId); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/InvokeActionMenu.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/InvokeActionMenu.java index 0e1ce7b9544..95587392bd6 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/InvokeActionMenu.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/InvokeActionMenu.java @@ -41,6 +41,7 @@ public final class InvokeActionMenu extends AbstractDefaultTestCommand // AbstractDefaultTestCommand // + @Override public final void execute() { GWTTestUtil.selectActionMenu(action); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/Login.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/Login.java index 5c7306953cf..da25714edb6 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/Login.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/Login.java @@ -43,6 +43,7 @@ public class Login extends AbstractDefaultTestCommand // AbstractDefaultTestCommand // + @Override public final void execute() { TextField<String> textField = diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/Logout.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/Logout.java index 5621bfe4a52..5d014657949 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/Logout.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/Logout.java @@ -32,6 +32,7 @@ public class Logout extends AbstractDefaultTestCommand { } + @Override public void execute() { GWTTestUtil.selectActionMenu(ActionMenuKind.USER_MENU_LOGOUT); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/CreateAuthorizationGroup.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/CreateAuthorizationGroup.java index c342b341650..6bddf02789b 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/CreateAuthorizationGroup.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/CreateAuthorizationGroup.java @@ -17,8 +17,9 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.amc; import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.MainTabPanel; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AddAuthorizationGroupDialog; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AuthorizationGroupGrid; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractRegistrationDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractSaveDialog; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.CheckTableCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -48,8 +49,8 @@ public final class CreateAuthorizationGroup extends CheckTableCommand GWTTestUtil.selectTabItemWithId(MainTabPanel.ID, AuthorizationGroupGrid.BROWSER_ID + MainTabPanel.TAB_SUFFIX); GWTTestUtil.clickButtonWithID(AuthorizationGroupGrid.ADD_BUTTON_ID); - GWTTestUtil.getTextFieldWithID(AddAuthorizationGroupDialog.CODE_FIELD_ID).setValue( + GWTTestUtil.getTextFieldWithID(AbstractRegistrationDialog.CODE_FIELD_ID).setValue( authGroupCode); - GWTTestUtil.clickButtonWithID(AddAuthorizationGroupDialog.SAVE_BUTTON_ID); + GWTTestUtil.clickButtonWithID(AbstractSaveDialog.SAVE_BUTTON_ID); } } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/CreateGroup.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/CreateGroup.java index bc987a8cd14..f93c093e1f4 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/CreateGroup.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/CreateGroup.java @@ -18,6 +18,8 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.amc; import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.MainTabPanel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.SpaceGrid; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractRegistrationDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractSaveDialog; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.CheckTableCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -47,7 +49,7 @@ public final class CreateGroup extends CheckTableCommand GWTTestUtil.selectTabItemWithId(MainTabPanel.ID, SpaceGrid.BROWSER_ID + MainTabPanel.TAB_SUFFIX); GWTTestUtil.clickButtonWithID(SpaceGrid.ADD_BUTTON_ID); - GWTTestUtil.getTextFieldWithID(AddGroupDialog.CODE_FIELD_ID).setValue(groupCode); - GWTTestUtil.clickButtonWithID(AddGroupDialog.SAVE_BUTTON_ID); + GWTTestUtil.getTextFieldWithID(AbstractRegistrationDialog.CODE_FIELD_ID).setValue(groupCode); + GWTTestUtil.clickButtonWithID(AbstractSaveDialog.SAVE_BUTTON_ID); } } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/CreatePerson.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/CreatePerson.java index c4453f89b53..40c1af4b8a6 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/CreatePerson.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/CreatePerson.java @@ -19,6 +19,7 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.amc; import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.MainTabPanel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.PersonGrid; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractRegistrationDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractSaveDialog; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.CheckTableCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -48,8 +49,8 @@ public final class CreatePerson extends CheckTableCommand GWTTestUtil.selectTabItemWithId(MainTabPanel.ID, PersonGrid.createBrowserId() + MainTabPanel.TAB_SUFFIX); GWTTestUtil.clickButtonWithID(PersonGrid.createAddButtonId(null)); - GWTTestUtil.getTextFieldWithID(AddPersonDialog.CODE_FIELD_ID).setValue(personCode); - GWTTestUtil.clickButtonWithID(AbstractRegistrationDialog.SAVE_BUTTON_ID); + GWTTestUtil.getTextFieldWithID(AbstractRegistrationDialog.CODE_FIELD_ID).setValue(personCode); + GWTTestUtil.clickButtonWithID(AbstractSaveDialog.SAVE_BUTTON_ID); } } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/FillAddPersonForm.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/FillAddPersonForm.java index 8f886e39090..40303dcb9e2 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/FillAddPersonForm.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/FillAddPersonForm.java @@ -23,6 +23,7 @@ import ch.systemsx.cisd.common.shared.basic.utils.StringUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.PersonSelectionWidget; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractSaveDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.AuthorizationGroup; @@ -62,11 +63,12 @@ public class FillAddPersonForm extends AbstractDefaultTestCommand this.codes = codes; } + @Override public void execute() { if (singleUser) { - GWTTestUtil.selectValueInSelectionWidget(PersonSelectionWidget.ID + GWTTestUtil.selectValueInSelectionWidget(DropDownList.ID + PersonSelectionWidget.SUFFIX + AddPersonToAuthorizationGroupDialog.createId(authorizationGroup, AddPersonToAuthorizationGroupDialog.ID_SINGLE_PERSON_FIELD), diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/FillRoleAssignmentForm.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/FillRoleAssignmentForm.java index 923ba2d94c5..8cd649adbd9 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/FillRoleAssignmentForm.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/FillRoleAssignmentForm.java @@ -21,6 +21,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.Authori import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.SpaceSelectionWidget; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.PersonSelectionWidget; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractSaveDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -66,6 +67,7 @@ public class FillRoleAssignmentForm extends AbstractDefaultTestCommand this.roleNameOrNull = roleNameOrNull; } + @Override public void execute() { final RoleListBox listBox = @@ -73,7 +75,7 @@ public class FillRoleAssignmentForm extends AbstractDefaultTestCommand if (groupNameOrNull != null) { String groupSelectorId = - SpaceSelectionWidget.ID + SpaceSelectionWidget.SUFFIX + DropDownList.ID + SpaceSelectionWidget.SUFFIX + AddRoleAssignmentDialog.PREFIX; GWTTestUtil.selectValueInSelectionWidget(groupSelectorId, ModelDataPropertyNames.CODE, groupNameOrNull); @@ -85,12 +87,12 @@ public class FillRoleAssignmentForm extends AbstractDefaultTestCommand if (personRole == false) { GWTTestUtil.setRadioValue(AddRoleAssignmentDialog.AUTH_GROUP_RADIO, true); - GWTTestUtil.selectValueInSelectionWidget(AuthorizationGroupSelectionWidget.ID + GWTTestUtil.selectValueInSelectionWidget(DropDownList.ID + AuthorizationGroupSelectionWidget.SUFFIX + AddRoleAssignmentDialog.PREFIX, ModelDataPropertyNames.CODE, grantee); } else { - GWTTestUtil.selectValueInSelectionWidget(PersonSelectionWidget.ID + GWTTestUtil.selectValueInSelectionWidget(DropDownList.ID + PersonSelectionWidget.SUFFIX + AddRoleAssignmentDialog.PREFIX, ModelDataPropertyNames.CODE, grantee); } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/RemovePerson.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/RemovePerson.java index 810ab47eb9b..724ab61ec6a 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/RemovePerson.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/RemovePerson.java @@ -46,6 +46,7 @@ public class RemovePerson extends AbstractDefaultTestCommand this.person = personId; } + @Override @SuppressWarnings("unchecked") public void execute() { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/ShowAuthorizationGroup.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/ShowAuthorizationGroup.java index 8dcb4551ab8..de5ff57f520 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/ShowAuthorizationGroup.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/amc/ShowAuthorizationGroup.java @@ -42,6 +42,7 @@ public class ShowAuthorizationGroup extends AbstractDefaultTestCommand this.code = authGroupCode; } + @Override @SuppressWarnings("unchecked") public void execute() { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ShowDataSet.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ShowDataSet.java index 037fab852b6..4e2f4ced0b6 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ShowDataSet.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ShowDataSet.java @@ -42,6 +42,7 @@ public class ShowDataSet extends AbstractDefaultTestCommand this.code = code; } + @Override @SuppressWarnings("unchecked") public void execute() { @@ -51,6 +52,6 @@ public class ShowDataSet extends AbstractDefaultTestCommand (Grid<BaseEntityModel<ExternalData>>) widget; GridTestUtils.fireSelectRow(table, ExperimentBrowserGridColumnIDs.CODE, code); GWTTestUtil.clickButtonWithID(DataSetSearchHitGrid.BROWSER_ID - + DataSetSearchHitGrid.SHOW_DETAILS_BUTTON_ID_SUFFIX); + + AbstractExternalDataGrid.SHOW_DETAILS_BUTTON_ID_SUFFIX); } } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ShowDataSetEditor.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ShowDataSetEditor.java index 05d2ac00c3e..0c1686ec68e 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ShowDataSetEditor.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/data/ShowDataSetEditor.java @@ -16,6 +16,7 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AbstractViewer; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; @@ -45,10 +46,11 @@ public class ShowDataSetEditor extends AbstractDefaultTestCommand this.dataSetId = dataSetId; } + @Override public void execute() { GWTTestUtil.clickButtonWithID(GenericDataSetViewer.createId(dataSetId) - + GenericDataSetViewer.ID_EDIT_SUFFIX); + + AbstractViewer.ID_EDIT_SUFFIX); } } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ChooseTypeOfNewExperiment.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ChooseTypeOfNewExperiment.java index a4321e17635..ccc79fef8b3 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ChooseTypeOfNewExperiment.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ChooseTypeOfNewExperiment.java @@ -20,6 +20,7 @@ import com.extjs.gxt.ui.client.widget.form.ComboBox; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ExperimentTypeModel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -42,11 +43,12 @@ public final class ChooseTypeOfNewExperiment extends AbstractDefaultTestCommand // AbstractDefaultTestCommand // + @Override public final void execute() { final ComboBox<ExperimentTypeModel> experimentTypeSelector = (ExperimentTypeSelectionWidget) GWTTestUtil - .getWidgetWithID(ExperimentTypeSelectionWidget.ID + .getWidgetWithID(DropDownList.ID + ExperimentTypeSelectionWidget.SUFFIX + ExperimentRegistrationPanel.ID); GWTUtils.setSelectedItem(experimentTypeSelector, ModelDataPropertyNames.CODE, diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ListExperiments.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ListExperiments.java index c9016c4ae75..e13a66033fc 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ListExperiments.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ListExperiments.java @@ -22,6 +22,7 @@ import com.extjs.gxt.ui.client.widget.treegrid.TreeGrid; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ExperimentTypeModel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -48,6 +49,7 @@ public class ListExperiments extends AbstractDefaultTestCommand // AbstractDefaultTestCommand // + @Override @SuppressWarnings("unchecked") public void execute() { @@ -57,7 +59,7 @@ public class ListExperiments extends AbstractDefaultTestCommand final ComboBox<ExperimentTypeModel> experimentTypeSelector = (ExperimentTypeSelectionWidget) GWTTestUtil - .getWidgetWithID(ExperimentTypeSelectionWidget.ID + .getWidgetWithID(DropDownList.ID + ExperimentTypeSelectionWidget.SUFFIX + ExperimentBrowserToolbar.ID); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ShowExperiment.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ShowExperiment.java index 72ecc6fbe53..74f3bf37420 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ShowExperiment.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ShowExperiment.java @@ -41,6 +41,7 @@ public class ShowExperiment extends AbstractDefaultTestCommand this.code = code; } + @Override @SuppressWarnings("unchecked") public void execute() { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ShowExperimentEditor.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ShowExperimentEditor.java index a3a56847436..5c6552d0902 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ShowExperimentEditor.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ShowExperimentEditor.java @@ -16,6 +16,7 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.experiment; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AbstractViewer; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; @@ -38,10 +39,11 @@ public class ShowExperimentEditor extends AbstractDefaultTestCommand this.experimentId = experimentId; } + @Override public void execute() { GWTTestUtil.clickButtonWithID(GenericExperimentViewer.createId(experimentId) - + GenericExperimentViewer.ID_EDIT_SUFFIX); + + AbstractViewer.ID_EDIT_SUFFIX); } } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/ApplyFilterCommand.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/ApplyFilterCommand.java index eb021664aee..c2e1a5563ed 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/ApplyFilterCommand.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/ApplyFilterCommand.java @@ -19,6 +19,7 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.e import com.extjs.gxt.ui.client.widget.form.ComboBox; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -41,10 +42,11 @@ public class ApplyFilterCommand extends AbstractDefaultTestCommand this.filterName = filterName; } + @Override public void execute() { final ComboBox<FilterModel> filterSelectionWidget = - (FilterSelectionWidget) GWTTestUtil.getWidgetWithID(FilterSelectionWidget.ID + (FilterSelectionWidget) GWTTestUtil.getWidgetWithID(DropDownList.ID + FilterSelectionWidget.SUFFIX + gridId); GWTUtils.setSelectedItem(filterSelectionWidget, ModelDataPropertyNames.NAME, filterName); GWTTestUtil.clickTextToolItemWithID(FilterToolbar.createId(FilterToolbar.APPLY_ID, gridId)); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/CheckFiltersTableCommand.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/CheckFiltersTableCommand.java index 64db82c1ed9..0a3c3b1080e 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/CheckFiltersTableCommand.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/grid/expressions/filter/CheckFiltersTableCommand.java @@ -16,7 +16,8 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.expressions.filter; -import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.ColumnSettingsDialog; +import com.extjs.gxt.ui.client.widget.Dialog; + import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.CheckTableCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -40,6 +41,6 @@ public class CheckFiltersTableCommand extends CheckTableCommand public void execute() { super.execute(); - GWTTestUtil.clickButtonWithID(ColumnSettingsDialog.OK + gridDisplayId); + GWTTestUtil.clickButtonWithID(Dialog.OK + gridDisplayId); } } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/ListMaterials.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/ListMaterials.java index b95ddcd777e..5b746a6aab3 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/ListMaterials.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/material/ListMaterials.java @@ -20,6 +20,7 @@ import com.extjs.gxt.ui.client.widget.form.ComboBox; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.MaterialTypeModel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -42,12 +43,13 @@ public class ListMaterials extends AbstractDefaultTestCommand // AbstractDefaultTestCommand // + @Override public void execute() { final ComboBox<MaterialTypeModel> typeSelector = (MaterialTypeSelectionWidget) GWTTestUtil - .getWidgetWithID(MaterialTypeSelectionWidget.ID + .getWidgetWithID(DropDownList.ID + MaterialTypeSelectionWidget.SUFFIX + MaterialBrowserToolbar.ID); GWTUtils.setSelectedItem(typeSelector, ModelDataPropertyNames.CODE, materialTypeName); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/project/FillProjectRegistrationForm.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/project/FillProjectRegistrationForm.java index 6c082782d44..f21685a22f3 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/project/FillProjectRegistrationForm.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/project/FillProjectRegistrationForm.java @@ -19,6 +19,7 @@ package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.projec import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AbstractRegistrationForm; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.SpaceSelectionWidget; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -52,12 +53,13 @@ public final class FillProjectRegistrationForm extends AbstractDefaultTestComman // AbstractDefaultTestCommand // + @Override public final void execute() { GWTTestUtil.setTextField(ProjectRegistrationForm.createId() + "_code", code); GWTTestUtil.setTextField(ProjectRegistrationForm.createId() + "_description", description); final SpaceSelectionWidget groupSelector = - (SpaceSelectionWidget) GWTTestUtil.getWidgetWithID(SpaceSelectionWidget.ID + (SpaceSelectionWidget) GWTTestUtil.getWidgetWithID(DropDownList.ID + SpaceSelectionWidget.SUFFIX + AbstractProjectEditRegisterForm.createId(null)); GWTUtils.setSelectedItem(groupSelector, ModelDataPropertyNames.CODE, groupName); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/FillPropertyTypeAssignmentForm.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/FillPropertyTypeAssignmentForm.java index d46434e425a..acfff6b28ea 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/FillPropertyTypeAssignmentForm.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/FillPropertyTypeAssignmentForm.java @@ -28,6 +28,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.Samp import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data.DataSetTypeSelectionWidget; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.experiment.ExperimentTypeSelectionWidget; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.sample.SampleTypeSelectionWidget; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -63,6 +64,7 @@ public final class FillPropertyTypeAssignmentForm extends AbstractDefaultTestCom widgetId = PropertyTypeAssignmentForm.ID_PREFIX + entityKind; } + @Override public final void execute() { @@ -77,7 +79,7 @@ public final class FillPropertyTypeAssignmentForm extends AbstractDefaultTestCom { final PropertyTypeSelectionWidget propertyTypeSelector = (PropertyTypeSelectionWidget) GWTTestUtil - .getWidgetWithID(PropertyTypeSelectionWidget.ID + .getWidgetWithID(DropDownList.ID + PropertyTypeSelectionWidget.SUFFIX + widgetId + PropertyTypeAssignmentForm.PROPERTY_TYPE_ID_SUFFIX); GWTUtils.setSelectedItem(propertyTypeSelector, ModelDataPropertyNames.CODE, @@ -112,7 +114,7 @@ public final class FillPropertyTypeAssignmentForm extends AbstractDefaultTestCom { final ComboBox<ExperimentTypeModel> experimentTypeSelector = (ExperimentTypeSelectionWidget) GWTTestUtil - .getWidgetWithID(ExperimentTypeSelectionWidget.ID + .getWidgetWithID(DropDownList.ID + ExperimentTypeSelectionWidget.SUFFIX + PropertyTypeAssignmentForm.EXPERIMENT_TYPE_ID_SUFFIX); GWTUtils.setSelectedItem(experimentTypeSelector, ModelDataPropertyNames.CODE, @@ -123,7 +125,7 @@ public final class FillPropertyTypeAssignmentForm extends AbstractDefaultTestCom { final ComboBox<SampleTypeModel> sampleTypeSelector = (SampleTypeSelectionWidget) GWTTestUtil - .getWidgetWithID(SampleTypeSelectionWidget.ID + .getWidgetWithID(DropDownList.ID + SampleTypeSelectionWidget.SUFFIX + PropertyTypeAssignmentForm.SAMPLE_TYPE_ID_SUFFIX); GWTUtils.setSelectedItem(sampleTypeSelector, ModelDataPropertyNames.CODE, @@ -134,7 +136,7 @@ public final class FillPropertyTypeAssignmentForm extends AbstractDefaultTestCom { final ComboBox<DataSetTypeModel> sampleTypeSelector = (DataSetTypeSelectionWidget) GWTTestUtil - .getWidgetWithID(DataSetTypeSelectionWidget.ID + .getWidgetWithID(DropDownList.ID + DataSetTypeSelectionWidget.SUFFIX + PropertyTypeAssignmentForm.DATA_SET_TYPE_ID_SUFFIX); GWTUtils.setSelectedItem(sampleTypeSelector, ModelDataPropertyNames.CODE, diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/FillPropertyTypeRegistrationForm.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/FillPropertyTypeRegistrationForm.java index 0af22ed8c7b..28ee68805e0 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/FillPropertyTypeRegistrationForm.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/FillPropertyTypeRegistrationForm.java @@ -22,6 +22,7 @@ import com.google.gwt.user.client.ui.Widget; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.DataTypeModel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AbstractRegistrationForm; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -60,13 +61,14 @@ public final class FillPropertyTypeRegistrationForm extends AbstractDefaultTestC // AbstractDefaultTestCommand // + @Override public final void execute() { GWTTestUtil.setTextField(PropertyTypeRegistrationForm.ID + "_code", code); GWTTestUtil.setTextField(PropertyTypeRegistrationForm.ID + "_label", label); GWTTestUtil.setTextField(PropertyTypeRegistrationForm.ID + "_description", description); final Widget widgetWithID = - GWTTestUtil.getWidgetWithID(DataTypeSelectionWidget.ID + GWTTestUtil.getWidgetWithID(DropDownList.ID + DataTypeSelectionWidget.SUFFIX); assertTrue(widgetWithID instanceof DataTypeSelectionWidget); final ComboBox<DataTypeModel> dataTypeSelectionWidget = diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ChooseTypeOfNewSample.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ChooseTypeOfNewSample.java index 9a9179ca89b..071f88653c5 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ChooseTypeOfNewSample.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ChooseTypeOfNewSample.java @@ -20,6 +20,7 @@ import com.extjs.gxt.ui.client.widget.form.ComboBox; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.SampleTypeModel; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -42,11 +43,12 @@ public final class ChooseTypeOfNewSample extends AbstractDefaultTestCommand // AbstractDefaultTestCommand // + @Override public final void execute() { final ComboBox<SampleTypeModel> sampleTypeSelector = (SampleTypeSelectionWidget) GWTTestUtil - .getWidgetWithID(SampleTypeSelectionWidget.ID + .getWidgetWithID(DropDownList.ID + SampleTypeSelectionWidget.SUFFIX + SampleRegistrationPanel.ID); GWTUtils.setSelectedItem(sampleTypeSelector, ModelDataPropertyNames.CODE, sampleTypeNameOrNull); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ExportSamplesTestCommand.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ExportSamplesTestCommand.java index 8693d86f447..44d8443bd0e 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ExportSamplesTestCommand.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ExportSamplesTestCommand.java @@ -51,6 +51,7 @@ public class ExportSamplesTestCommand extends AbstractDefaultTestCommand this.receivedExportedFileContent = null; } + @Override public void execute() { @SuppressWarnings("unchecked") @@ -129,6 +130,7 @@ public class ExportSamplesTestCommand extends AbstractDefaultTestCommand this.expectedTotalLines = expectedTotalLines; } + @Override public void execute() { Assert.assertNotNull("unexpected null export content", receivedExportedFileContent); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ListSamples.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ListSamples.java index 1a2e265fd33..4142e0780ef 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ListSamples.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ListSamples.java @@ -21,6 +21,7 @@ import com.extjs.gxt.ui.client.widget.form.ComboBox; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.SampleTypeModel; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.SpaceSelectionWidget; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -46,15 +47,16 @@ public class ListSamples extends AbstractDefaultTestCommand // AbstractDefaultTestCommand // + @Override public void execute() { final SpaceSelectionWidget groupSelector = - (SpaceSelectionWidget) GWTTestUtil.getWidgetWithID(SpaceSelectionWidget.ID + (SpaceSelectionWidget) GWTTestUtil.getWidgetWithID(DropDownList.ID + SpaceSelectionWidget.SUFFIX + SampleBrowserToolbar.ID); final ComboBox<SampleTypeModel> sampleTypeSelector = (SampleTypeSelectionWidget) GWTTestUtil - .getWidgetWithID(SampleTypeSelectionWidget.ID + .getWidgetWithID(DropDownList.ID + SampleTypeSelectionWidget.SUFFIX + SampleBrowserToolbar.ID); // if 'all' type was initially selected group selection would trigger an unwanted callback diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ShowSample.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ShowSample.java index df6128a93f8..056405aff1b 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ShowSample.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/sample/ShowSample.java @@ -41,6 +41,7 @@ public final class ShowSample extends AbstractDefaultTestCommand this.code = code; } + @Override @SuppressWarnings("unchecked") public void execute() { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/FillSearchCriteria.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/FillSearchCriteria.java index b42c686754f..b87a74fc7d1 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/FillSearchCriteria.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/search/FillSearchCriteria.java @@ -24,6 +24,7 @@ import com.extjs.gxt.ui.client.widget.form.Radio; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data.Criterion; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data.MatchCriteriaRadio; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -90,6 +91,7 @@ public final class FillSearchCriteria extends AbstractDefaultTestCommand return this; } + @Override public final void execute() { assert criteriaDefined : "At least one search criterion should be specified"; @@ -113,7 +115,7 @@ public final class FillSearchCriteria extends AbstractDefaultTestCommand { final DetailedSearchFieldsSelectionWidget selector = (DetailedSearchFieldsSelectionWidget) GWTTestUtil - .getWidgetWithID(DetailedSearchFieldsSelectionWidget.ID + .getWidgetWithID(DropDownList.ID + DetailedSearchFieldsSelectionWidget.SUFFIX + DetailedSearchCriteriaWidget.FIRST_ID_SUFFIX + getSuffix(i)); GWTUtils.setSelectedItem(selector, ModelDataPropertyNames.CODE, criteria.get(i) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/FillVocabularyRegistrationForm.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/FillVocabularyRegistrationForm.java index 374ae6914f3..febe8733d55 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/FillVocabularyRegistrationForm.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/vocabulary/FillVocabularyRegistrationForm.java @@ -48,6 +48,7 @@ public final class FillVocabularyRegistrationForm extends AbstractDefaultTestCom // AbstractDefaultTestCommand // + @Override public final void execute() { GWTTestUtil.setTextField(VocabularyRegistrationForm.ID_PREFIX + "form" diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/AbstractDefaultTestCommand.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/AbstractDefaultTestCommand.java index f0e8c9e809a..83ce5dbb333 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/AbstractDefaultTestCommand.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/AbstractDefaultTestCommand.java @@ -36,11 +36,13 @@ public abstract class AbstractDefaultTestCommand extends Assert implements ITest { } + @Override public boolean isValidOnSucess(Object result) { return true; // if previous command succeeded this command should be executed } + @Override public boolean isValidOnFailure(AbstractAsyncCallback<?> callback, String failureMessage, Throwable throwable) { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/AbstractGWTTestCase.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/AbstractGWTTestCase.java index 1673a454fbb..492d46f0ea8 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/AbstractGWTTestCase.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/AbstractGWTTestCase.java @@ -151,10 +151,12 @@ public abstract class AbstractGWTTestCase extends GWTTestCase { viewContext.getService().logout(null, false, new AsyncCallback<Void>() { + @Override public void onSuccess(final Void result) { } + @Override public void onFailure(final Throwable caught) { System.out.println("LOGOUT FAILED: " + caught); @@ -195,6 +197,7 @@ public abstract class AbstractGWTTestCase extends GWTTestCase { return new AbstractDefaultTestCommand() { + @Override public void execute() { preprocessingAction.execute(); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/AbstractProperty.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/AbstractProperty.java index ef65fab0ecf..cff00732d79 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/AbstractProperty.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/AbstractProperty.java @@ -48,6 +48,7 @@ public abstract class AbstractProperty<C extends IPropertyChecker<?>> implements message = "Property '" + key + "':"; } + @Override public C by(final IValueAssertion<?> valueAssertion) { checker.property(key, valueAssertion); @@ -61,6 +62,7 @@ public abstract class AbstractProperty<C extends IPropertyChecker<?>> implements { return by(new IValueAssertion<Object>() { + @Override public void assertValue(final Object value) { Assert.assertEquals(message, expectedValue, String.valueOf(value)); @@ -75,6 +77,7 @@ public abstract class AbstractProperty<C extends IPropertyChecker<?>> implements { return by(new IValueAssertion<Object>() { + @Override public void assertValue(final Object value) { final String valueAsString = String.valueOf(value); @@ -94,6 +97,7 @@ public abstract class AbstractProperty<C extends IPropertyChecker<?>> implements { return by(new IValueAssertion<Object>() { + @Override public void assertValue(final Object value) { Assert.assertEquals(message, expectedValue, value); @@ -109,6 +113,7 @@ public abstract class AbstractProperty<C extends IPropertyChecker<?>> implements { return by(new IValueAssertion<ICodeHolder>() { + @Override public void assertValue(final ICodeHolder code) { Assert.assertEquals(message, expectedCode, code.getCode()); @@ -124,6 +129,7 @@ public abstract class AbstractProperty<C extends IPropertyChecker<?>> implements { return by(new IValueAssertion<IDeletionProvider>() { + @Override public void assertValue(final IDeletionProvider provider) { final Deletion deletion = provider.getDeletion(); @@ -140,6 +146,7 @@ public abstract class AbstractProperty<C extends IPropertyChecker<?>> implements { return by(new IValueAssertion<IDeletionProvider>() { + @Override public void assertValue(final IDeletionProvider provider) { final Deletion deletion = provider.getDeletion(); @@ -156,6 +163,7 @@ public abstract class AbstractProperty<C extends IPropertyChecker<?>> implements { return by(new IValueAssertion<IEntityProperty>() { + @Override public void assertValue(final IEntityProperty value) { Assert.assertEquals(message, expectedValue, value.tryGetAsString()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/ChangeTableColumnSettingsCommand.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/ChangeTableColumnSettingsCommand.java index d925aa7cb2f..30a4a54f221 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/ChangeTableColumnSettingsCommand.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/ChangeTableColumnSettingsCommand.java @@ -149,6 +149,7 @@ public class ChangeTableColumnSettingsCommand extends AbstractDefaultTestCommand /** * Executes the column changing events in the order they had been added. */ + @Override public void execute() { ColumnModel columnModel = GWTTestUtil.getGridWithID(tableID).getColumnModel(); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/CheckTableCommand.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/CheckTableCommand.java index 8a98e3a2dc0..0bb7b5547c3 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/CheckTableCommand.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/CheckTableCommand.java @@ -174,6 +174,7 @@ public class CheckTableCommand extends AbstractDefaultTestCommand return this; } + @Override public void execute() { Grid<ModelData> grid = checkColumnModelExpectations(); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/FailureExpectation.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/FailureExpectation.java index f7b60ab4e9a..a68fd2c11db 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/FailureExpectation.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/FailureExpectation.java @@ -31,6 +31,7 @@ public class FailureExpectation extends AbstractDefaultTestCommand private IMessageValidator messageValidator = new IMessageValidator() { + @Override public void assertValid(String message) { } @@ -55,6 +56,7 @@ public class FailureExpectation extends AbstractDefaultTestCommand { return with(new IMessageValidator() { + @Override public void assertValid(String message) { assertEquals(failureMessage, message); @@ -99,6 +101,7 @@ public class FailureExpectation extends AbstractDefaultTestCommand } } + @Override public void execute() { // nothing to do diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/GWTTestUtil.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/GWTTestUtil.java index 03d24e15df1..4d72ff0bc44 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/GWTTestUtil.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/GWTTestUtil.java @@ -418,6 +418,7 @@ public final class GWTTestUtil final List<String> ids = new ArrayList<String>(); traverseRootPanel(new IWidgetHandler<Widget>() { + @Override public boolean handle(final Widget widgetOrNull) { final String widgetID = tryToGetWidgetID(widgetOrNull); @@ -440,6 +441,7 @@ public final class GWTTestUtil this.handler = handler; } + @Override @SuppressWarnings("unchecked") public final boolean handle(final Widget widgetOrNull) { @@ -507,6 +509,7 @@ public final class GWTTestUtil // IWidgetHandler // + @Override public final boolean handle(final BrowserGridPagingToolBar pagingToolBar) { for (final Component item : pagingToolBar.getItems()) @@ -535,6 +538,7 @@ public final class GWTTestUtil // IWidgetHandler // + @Override public final boolean handle(final TextToolItem menuItem) { if (handler.handle(menuItem.getMenu())) @@ -560,6 +564,7 @@ public final class GWTTestUtil // IWidgetHandler // + @Override public final boolean handle(final MenuItem menuItem) { if (handler.handle(menuItem.getSubMenu())) @@ -585,6 +590,7 @@ public final class GWTTestUtil // IWidgetHandler // + @Override public final boolean handle(final Menu menu) { if (menu != null) @@ -615,6 +621,7 @@ public final class GWTTestUtil // IWidgetHandler // + @Override public final boolean handle(final ComplexPanel panel) { for (int i = 0, n = panel.getWidgetCount(); i < n; i++) @@ -641,6 +648,7 @@ public final class GWTTestUtil // IWidgetHandler // + @Override public final boolean handle(final Container<Component> container) { for (Component c : container.getItems()) @@ -696,6 +704,7 @@ public final class GWTTestUtil // IWidgetHandler // + @Override public boolean handle(final MultiField<Field<?>> widget) { for (Field<?> f : widget.getAll()) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/RemoteConsole.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/RemoteConsole.java index fe1fc963641..c11783c7595 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/RemoteConsole.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/RemoteConsole.java @@ -241,6 +241,7 @@ public class RemoteConsole // ICallbackListener // + @Override public final void finishOnSuccessOf(final AbstractAsyncCallback<Object> callback, final Object result) { @@ -270,6 +271,7 @@ public class RemoteConsole } } + @Override public final void onFailureOf(final IMessageProvider messageProvider, final AbstractAsyncCallback<Object> callback, final String failureMessage, final Throwable throwable) @@ -295,6 +297,7 @@ public class RemoteConsole + failureMessage + " [" + throwable.getClass() + ": " + msg + "]"); } + @Override public void registerCallback(final AbstractAsyncCallback<?> callback) { activeCallbacksCounter++; @@ -309,6 +312,7 @@ public class RemoteConsole + "' (active count: " + activeCallbacksCounter + ")"); } + @Override public void ignoreCallback(final AbstractAsyncCallback<?> callback) { activeCallbacksCounter--; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/WaitForAllActiveCallbacksFinish.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/WaitForAllActiveCallbacksFinish.java index 1883eb3a605..5547d1f1759 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/WaitForAllActiveCallbacksFinish.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/WaitForAllActiveCallbacksFinish.java @@ -29,6 +29,7 @@ public class WaitForAllActiveCallbacksFinish extends AbstractDefaultTestCommand super(); } + @Override public void execute() { } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/WidgetPicker.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/WidgetPicker.java index 5a7b22ad5a5..3b76f349213 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/WidgetPicker.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/WidgetPicker.java @@ -58,6 +58,7 @@ public class WidgetPicker implements IWidgetHandler<Widget> // IWidgetHandler // + @Override public final boolean handle(final Widget widgetOrNull) { final String widgetId = GWTTestUtil.tryToGetWidgetID(widgetOrNull); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/clientnonjs/ViewLocatorResolverRegistryTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/clientnonjs/ViewLocatorResolverRegistryTest.java index a6aa7ace107..a6113809824 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/clientnonjs/ViewLocatorResolverRegistryTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/clientnonjs/ViewLocatorResolverRegistryTest.java @@ -61,6 +61,7 @@ public class ViewLocatorResolverRegistryTest extends AssertJUnit super(handledAction); } + @Override public void resolve(ViewLocator locator) { wasCalled = true; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientServiceTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientServiceTest.java index 0eeb29cc471..98ad2c16cd8 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientServiceTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/CommonClientServiceTest.java @@ -447,6 +447,7 @@ public final class CommonClientServiceTest extends AbstractClientServiceTest private int counter = INIT_VALUE; + @Override public final String createKey() { return "" + counter++; @@ -512,6 +513,7 @@ public final class CommonClientServiceTest extends AbstractClientServiceTest will(returnValue(new CachedResultSetManager<String>( new TokenBasedResultSetKeyGenerator(), new ICustomColumnsProvider() { + @Override public List<GridCustomColumn> getGridCustomColumn( String sessionToken, String gridDisplayId) { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/calculator/RowCalculatorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/calculator/RowCalculatorTest.java index dfb2433f033..656cd98a2e0 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/calculator/RowCalculatorTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/calculator/RowCalculatorTest.java @@ -44,11 +44,13 @@ public class RowCalculatorTest extends AssertJUnit this.expectedColumnID = expectedColumnID; } + @Override public List<List<? extends Comparable<?>>> getRows() { return null; } + @Override public Comparable<?> getValue(String columnID, List<? extends Comparable<?>> rowValues) { assertEquals(expectedColumnID, columnID); @@ -56,16 +58,19 @@ public class RowCalculatorTest extends AssertJUnit return rowValues.get(0); } + @Override public Collection<String> getAllColumnIDs() { return null; } + @Override public List<String> getAllColumnTitles() { return null; } + @Override public String tryToGetProperty(String columnID, String key) { return null; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/CachedResultSetManagerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/CachedResultSetManagerTest.java index a78d1e33aa9..5260ac348bf 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/CachedResultSetManagerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/resultset/CachedResultSetManagerTest.java @@ -264,6 +264,7 @@ public final class CachedResultSetManagerTest extends AssertJUnit { private List<String> recordedColumnCodes = new ArrayList<String>(); + @Override public <T> List<PrimitiveValue> evalCustomColumn(List<T> data, GridCustomColumn customColumn, Set<IColumnDefinition<T>> availableColumns, boolean errorMessagesAreLong) @@ -301,6 +302,7 @@ public final class CachedResultSetManagerTest extends AssertJUnit this.timeToDeliver = timeToDeliver; } + @Override public List<DataHolder> getOriginalData(int maxSize) throws UserFailureException { recordedMaxSizes.add(maxSize); @@ -317,6 +319,7 @@ public final class CachedResultSetManagerTest extends AssertJUnit return data.subList(0, Math.min(data.size(), maxSize)); } + @Override public List<TableModelColumnHeader> getHeaders() { return Arrays.asList(); @@ -1115,31 +1118,37 @@ public final class CachedResultSetManagerTest extends AssertJUnit { return new IColumnDefinition<DataHolder>() { + @Override public String getValue(GridRowModel<DataHolder> rowModel) { return rowModel.getOriginalObject().getData().split(separator)[tokenIndex]; } + @Override public String getIdentifier() { return identifier; } + @Override public Comparable<?> tryGetComparableValue(GridRowModel<DataHolder> rowModel) { return getValue(rowModel); } + @Override public String getHeader() { return null; // unused } + @Override public DataTypeCode tryToGetDataType() { return null; } + @Override public String tryToGetProperty(String key) { return "a".equals(key) ? "42" : null; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/util/CustomColumnUtilsTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/util/CustomColumnUtilsTest.java index fcd4130092f..91862ed4e9c 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/util/CustomColumnUtilsTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/util/CustomColumnUtilsTest.java @@ -48,11 +48,13 @@ public class CustomColumnUtilsTest extends AssertJUnit this.rows = Arrays.asList(rows); } + @Override public List<List<? extends Comparable<?>>> getRows() { return rows; } + @Override public Comparable<?> getValue(String columnID, List<? extends Comparable<?>> rowValues) { assertEquals(expectedColumnID, columnID); @@ -60,16 +62,19 @@ public class CustomColumnUtilsTest extends AssertJUnit return rowValues.get(0); } + @Override public Collection<String> getAllColumnIDs() { return null; } + @Override public List<String> getAllColumnTitles() { return null; } + @Override public String tryToGetProperty(String columnID, String key) { return null; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/util/FilterUtilsTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/util/FilterUtilsTest.java index 99b8af0b217..2b1fe000e4e 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/util/FilterUtilsTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/server/util/FilterUtilsTest.java @@ -46,11 +46,13 @@ public class FilterUtilsTest extends AssertJUnit this.rows = Arrays.asList(rows); } + @Override public List<List<? extends Comparable<?>>> getRows() { return rows; } + @Override public Comparable<?> getValue(String columnID, List<? extends Comparable<?>> rowValues) { assertEquals(expectedColumnID, columnID); @@ -58,16 +60,19 @@ public class FilterUtilsTest extends AssertJUnit return rowValues.get(0); } + @Override public Collection<String> getAllColumnIDs() { return null; } + @Override public List<String> getAllColumnTitles() { return null; } + @Override public String tryToGetProperty(String columnID, String key) { return null; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/AbstractServerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/AbstractServerTest.java index ad04b059e31..56158e116fa 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/AbstractServerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/AbstractServerTest.java @@ -79,6 +79,7 @@ public class AbstractServerTest extends AssertJUnit server = new AbstractServer<Object>(sessionManager, daoFactory, null) { + @Override public Object createLogger(IInvocationLoggerContext loggerContext) { return null; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceTest.java index 0936bd9ed75..13a60c0d589 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceTest.java @@ -263,10 +263,12 @@ public class ETLServiceTest extends AbstractServerTestCase allowing(dataStoreDAO).createOrUpdateDataStore( with(new BaseMatcher<DataStorePE>() { + @Override public void describeTo(Description description) { } + @Override public boolean matches(Object item) { if (item instanceof DataStorePE) @@ -317,10 +319,12 @@ public class ETLServiceTest extends AbstractServerTestCase allowing(dataStoreDAO).createOrUpdateDataStore( with(new BaseMatcher<DataStorePE>() { + @Override public void describeTo(Description description) { } + @Override public boolean matches(Object item) { if (item instanceof DataStorePE) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingServiceTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingServiceTest.java index 6e7ef02da22..900d0a61da0 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingServiceTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingServiceTest.java @@ -106,6 +106,7 @@ public class GeneralInformationChangingServiceTest extends AbstractServerTestCas List<IEntityProperty> props = updatesDTO.getProperties(); Collections.sort(props, new Comparator<IEntityProperty>() { + @Override public int compare(IEntityProperty o1, IEntityProperty o2) { return o1.getPropertyType().getCode().compareTo(o2.getPropertyType().getCode()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationServiceTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationServiceTest.java index 24340124d07..c2bd99c2868 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationServiceTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationServiceTest.java @@ -125,6 +125,7 @@ public class GeneralInformationServiceTest extends AbstractServerTestCase new ArrayList<Entry<String, Set<Role>>>(namedRoleSets.entrySet()); Collections.sort(entries, new Comparator<Entry<String, Set<Role>>>() { + @Override public int compare(Entry<String, Set<Role>> e1, Entry<String, Set<Role>> e2) { return e1.getKey().compareTo(e2.getKey()); @@ -156,6 +157,7 @@ public class GeneralInformationServiceTest extends AbstractServerTestCase List<Role> roles = new ArrayList<Role>(entry.getValue()); Collections.sort(roles, new Comparator<Role>() { + @Override public int compare(Role r1, Role r2) { return r1.toString().compareTo(r2.toString()); @@ -743,6 +745,7 @@ public class GeneralInformationServiceTest extends AbstractServerTestCase List<Project> projects = space.getProjects(); Collections.sort(projects, new Comparator<Project>() { + @Override public int compare(Project p1, Project p2) { return p1.toString().compareTo(p2.toString()); @@ -756,6 +759,7 @@ public class GeneralInformationServiceTest extends AbstractServerTestCase List<Role> list = new ArrayList<Role>(roles); Collections.sort(list, new Comparator<Role>() { + @Override public int compare(Role r1, Role r2) { return r1.toString().compareTo(r2.toString()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationTestUtil.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationTestUtil.java index ec8f0137fd8..42f8c22e126 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationTestUtil.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationTestUtil.java @@ -165,6 +165,7 @@ public final class AuthorizationTestUtil // InvocationHandler // + @Override public final Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable { @@ -244,17 +245,20 @@ public final class AuthorizationTestUtil { private static final long serialVersionUID = 1L; + @Override public PersonPE tryGetPerson() { return person; } + @Override public String tryGetHomeGroupCode() { SpacePE homeGroup = person.getHomeSpace(); return homeGroup == null ? null : homeGroup.getCode(); } + @Override public String getUserName() { return person.getFirstName() + " " + person.getLastName(); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/CollectionMatcher.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/CollectionMatcher.java index ec99082e47f..ef00a4852f0 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/CollectionMatcher.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/CollectionMatcher.java @@ -49,6 +49,7 @@ public final class CollectionMatcher<C extends Collection<?>> extends BaseMatche this.expected = expected; } + @Override public boolean matches(Object item) { if (expected == item) @@ -75,6 +76,7 @@ public final class CollectionMatcher<C extends Collection<?>> extends BaseMatche return true; } + @Override public void describeTo(Description description) { description.appendValue(expected); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataBOTest.java index fc414d777d8..db2a675f349 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataBOTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataBOTest.java @@ -115,11 +115,13 @@ public class DataBOTest extends AbstractBOTest private static final class DataMatcher extends BaseMatcher<ExternalDataPE> { + @Override public void describeTo(Description description) { description.appendText(DATA_SET_CODE); } + @Override public boolean matches(Object item) { if (item instanceof DataPE) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTableTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTableTest.java index a46d2925b3f..726b1e8c108 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTableTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/DataSetTableTest.java @@ -364,6 +364,7 @@ public final class DataSetTableTest extends AbstractBOTest with(new BaseMatcher<List<ExternalData>>() { + @Override public boolean matches(Object item) { List<ExternalData> list = (List<ExternalData>) item; @@ -375,6 +376,7 @@ public final class DataSetTableTest extends AbstractBOTest return d2PE.getCode().equals(data.getCode()); } + @Override public void describeTo(Description description) { description.appendText("Data set d2"); @@ -730,6 +732,7 @@ public final class DataSetTableTest extends AbstractBOTest return new BaseMatcher<List<DatasetDescription>>() { + @Override public boolean matches(Object item) { List<DatasetDescription> list = (List<DatasetDescription>) item; @@ -744,6 +747,7 @@ public final class DataSetTableTest extends AbstractBOTest return true; } + @Override public void describeTo(Description description) { description.appendText("["); @@ -762,6 +766,7 @@ public final class DataSetTableTest extends AbstractBOTest return new BaseMatcher<List<String>>() { + @Override public boolean matches(Object item) { List<String> match = (List<String>) item; @@ -773,6 +778,7 @@ public final class DataSetTableTest extends AbstractBOTest return true; } + @Override public void describeTo(Description description) { description.appendText(list.toString()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityPropertiesConverterTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityPropertiesConverterTest.java index 52f50088b62..44883a4f1a4 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityPropertiesConverterTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityPropertiesConverterTest.java @@ -382,6 +382,7 @@ public final class EntityPropertiesConverterTest extends AbstractBOTest List<SamplePropertyPE> props = new ArrayList<SamplePropertyPE>(properties); Collections.sort(props, new Comparator<SamplePropertyPE>() { + @Override public int compare(SamplePropertyPE o1, SamplePropertyPE o2) { return o1.getEntityTypePropertyType().getPropertyType().getCode() diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java index c4cce839a7e..c2f47d17c5f 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java @@ -190,10 +190,12 @@ public final class SampleBOTest extends AbstractBOTest BaseMatcher<SamplePE> matcher = new BaseMatcher<SamplePE>() { + @Override public void describeTo(final Description description) { } + @Override public boolean matches(final Object item) { if (item instanceof SamplePE == false) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/VocabularyBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/VocabularyBOTest.java index 79218895e56..94fb3b26f40 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/VocabularyBOTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/VocabularyBOTest.java @@ -684,6 +684,7 @@ public final class VocabularyBOTest extends AbstractBOTest List<VocabularyTermPE> sorted = new ArrayList<VocabularyTermPE>(terms); Collections.sort(sorted, new Comparator<VocabularyTermPE>() { + @Override public int compare(VocabularyTermPE o1, VocabularyTermPE o2) { return o1.getOrdinal().compareTo(o2.getOrdinal()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListerTest.java index c9b30f03303..d73c7473a49 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListerTest.java @@ -183,6 +183,7 @@ public class DatasetListerTest extends AbstractDAOTest Collections.sort(dataSets, new Comparator<ExternalData>() { + @Override public int compare(ExternalData o1, ExternalData o2) { return (int) (o1.getId() - o2.getId()); @@ -211,6 +212,7 @@ public class DatasetListerTest extends AbstractDAOTest List<ExternalData> dataSets = lister.listByTrackingCriteria(new TrackingDataSetCriteria(9)); Collections.sort(dataSets, new Comparator<ExternalData>() { + @Override public int compare(ExternalData o1, ExternalData o2) { return (int) (o1.getId() - o2.getId()); @@ -229,6 +231,7 @@ public class DatasetListerTest extends AbstractDAOTest lister.listByTrackingCriteria(new TrackingDataSetCriteria("CELL_PLATE", 6)); Collections.sort(dataSets, new Comparator<ExternalData>() { + @Override public int compare(ExternalData o1, ExternalData o2) { return (int) (o1.getId() - o2.getId()); @@ -295,6 +298,7 @@ public class DatasetListerTest extends AbstractDAOTest Collections.sort(list, new Comparator<ExternalData>() { + @Override public int compare(ExternalData o1, ExternalData o2) { return o1.getCode().compareTo(o2.getCode()); @@ -332,6 +336,7 @@ public class DatasetListerTest extends AbstractDAOTest Collections.sort(list, new Comparator<DataSetShareId>() { + @Override public int compare(DataSetShareId o1, DataSetShareId o2) { return o1.getDataSetCode().compareTo(o2.getDataSetCode()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DynamicPropertyEvaluatorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DynamicPropertyEvaluatorTest.java index c149d491d88..d9b1aa7f3a9 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DynamicPropertyEvaluatorTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/dynamic_property/DynamicPropertyEvaluatorTest.java @@ -70,6 +70,7 @@ public class DynamicPropertyEvaluatorTest extends AbstractBOTest final Session session = new Mockery().mock(Session.class); sessionProvider = new IHibernateSessionProvider() { + @Override public Session getSession() { return session; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/datasetlister/DataSetListerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/datasetlister/DataSetListerTest.java index e3cfca1c059..f9aafe6ff98 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/datasetlister/DataSetListerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/datasetlister/DataSetListerTest.java @@ -154,6 +154,7 @@ public class DataSetListerTest extends AbstractDAOTest { Collections.sort(dataSets, new Comparator<DataSet>() { + @Override public int compare(DataSet o1, DataSet o2) { return o1.getCode().compareTo(o2.getCode()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/materiallister/AbstractBatchIteratorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/materiallister/AbstractBatchIteratorTest.java index a1700968bc1..98c1df09346 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/materiallister/AbstractBatchIteratorTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/materiallister/AbstractBatchIteratorTest.java @@ -34,8 +34,6 @@ public class AbstractBatchIteratorTest extends AssertJUnit { private static class TestPartialIterator extends AbstractBatchIterator<Long> { - int callCounter = 0; - protected TestPartialIterator(final LongSet ids, int chunkSize) { super(ids, chunkSize); @@ -50,9 +48,9 @@ public class AbstractBatchIteratorTest extends AssertJUnit "Chunk of the wrong size requested, expected at most %d, was %d", chunkSize, ids.size())); } - callCounter++; return new Iterable<Long>() { + @Override public Iterator<Long> iterator() { return ids.iterator(); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/importer/DatabaseInstanceImporterTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/importer/DatabaseInstanceImporterTest.java index 0ff917e282e..130f44a09c9 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/importer/DatabaseInstanceImporterTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/importer/DatabaseInstanceImporterTest.java @@ -523,11 +523,13 @@ public class DatabaseInstanceImporterTest extends AbstractFileSystemTestCase this.expectedFile = expectedFile; } + @Override public void describeTo(Description description) { description.appendValue(expectedFile); } + @Override public boolean matches(Object item) { if (item instanceof File) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractDAOWithoutContextTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractDAOWithoutContextTest.java index 9309ee71400..9cbadc25e38 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractDAOWithoutContextTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractDAOWithoutContextTest.java @@ -425,6 +425,7 @@ public abstract class AbstractDAOWithoutContextTest extends List<IEntityProperty> properties = sample.getProperties(); Collections.sort(properties, new Comparator<IEntityProperty>() { + @Override public int compare(IEntityProperty p1, IEntityProperty p2) { return p1.getPropertyType().getCode().compareTo(p2.getPropertyType().getCode()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityTypeDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityTypeDAOTest.java index 3ba35f24da7..f85a688cb42 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityTypeDAOTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityTypeDAOTest.java @@ -79,6 +79,7 @@ public final class EntityTypeDAOTest extends AbstractDAOTest // Comparator // + @Override public final int compare(final EntityTypePE o1, final EntityTypePE o2) { return o1.getCode().compareTo(o2.getCode()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EventDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EventDAOTest.java index 83637cb2c91..7d3f924ba80 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EventDAOTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EventDAOTest.java @@ -185,6 +185,7 @@ public class EventDAOTest extends AbstractDAOTest List<DeletedDataSet> events = listDataDeletionEvents(null); Collections.sort(events, new Comparator<DeletedDataSet>() { + @Override public int compare(DeletedDataSet s1, DeletedDataSet s2) { return s1.getIdentifier().compareTo(s2.getIdentifier()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SqlDataMigrationTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SqlDataMigrationTest.java index e21be7107d5..efa34fbc2e5 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SqlDataMigrationTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SqlDataMigrationTest.java @@ -69,6 +69,7 @@ public final class SqlDataMigrationTest new File(getDataFolder(configurationContext) + SqlUnitTestRunner.MIGRATION_FOLDER); final File[] folders = migrationFolder.listFiles(new FileFilter() { + @Override public boolean accept(File pathname) { return pathname.isDirectory() && pathname.getName().startsWith(".") == false; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/task/DataSetRegistrationSummaryTaskTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/task/DataSetRegistrationSummaryTaskTest.java index 9c100fea978..a3a9877a2a3 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/task/DataSetRegistrationSummaryTaskTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/task/DataSetRegistrationSummaryTaskTest.java @@ -25,7 +25,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Date; -import java.util.GregorianCalendar; import java.util.List; import java.util.Properties; @@ -123,7 +122,7 @@ public class DataSetRegistrationSummaryTaskTest extends AssertJUnit context = new Mockery(); server = context.mock(ICommonServerForInternalUse.class); mailClient = context.mock(IMailClient.class); - Calendar instance = GregorianCalendar.getInstance(); + Calendar instance = Calendar.getInstance(); instance.set(2012, 0, 4, 10, 34, 10); // Wednesday, January 4th, 2012 nowDate = instance.getTimeInMillis(); timeProvider = new MockTimeProvider(nowDate, 1000); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/util/TestInitializer.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/util/TestInitializer.java index 39d9a344e7e..79631425a0a 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/util/TestInitializer.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/util/TestInitializer.java @@ -87,6 +87,7 @@ public class TestInitializer { FileUtils.copyDirectory(srcPath, targetPath, new FileFilter() { + @Override public boolean accept(File path) { return false == path.getName().equalsIgnoreCase(".svn"); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/RegressionTestCase.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/RegressionTestCase.java index 193860b34d8..6bf124c5cf3 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/RegressionTestCase.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/RegressionTestCase.java @@ -43,6 +43,7 @@ public class RegressionTestCase extends AssertJUnit { static final INormalizer INSTANCE = new DefaultNormalizer(); + @Override public String normalize(String notNormalizedText) { return JavaCodeNormalizer.normalizeJavaCode(notNormalizedText); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/basic/utils/GroupByMapTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/basic/utils/GroupByMapTest.java index cf021260254..47d51e7b841 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/basic/utils/GroupByMapTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/basic/utils/GroupByMapTest.java @@ -33,6 +33,7 @@ public class GroupByMapTest extends AssertJUnit { return new IGroupKeyExtractor<Integer, Integer>() { + @Override public Integer getKey(Integer e) { return e; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/coreplugin/CorePluginScannerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/coreplugin/CorePluginScannerTest.java index cf17e67bdc8..7711befa450 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/coreplugin/CorePluginScannerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/coreplugin/CorePluginScannerTest.java @@ -105,6 +105,7 @@ public class CorePluginScannerTest extends AbstractFileSystemTestCase File originalDir = new File(originalPath); FileUtils.copyDirectory(originalDir, workingDirectory, new FileFilter() { + @Override public boolean accept(File pathname) { return false == pathname.getName().equals(".svn"); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/parser/UpdatedSampleParserObjectFactoryTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/parser/UpdatedSampleParserObjectFactoryTest.java index ed7cf2bdfef..cf8ef8e11b4 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/parser/UpdatedSampleParserObjectFactoryTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/parser/UpdatedSampleParserObjectFactoryTest.java @@ -28,6 +28,8 @@ import org.testng.annotations.Test; import ch.systemsx.cisd.common.parser.DefaultPropertyMapper; import ch.systemsx.cisd.common.parser.IPropertyMapper; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IEntityProperty; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Identifier; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewSample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleBatchUpdateDetails; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.UpdatedSample; @@ -58,7 +60,7 @@ public final class UpdatedSampleParserObjectFactoryTest private final static IPropertyMapper createPropertyMapper() { final String[] properties = new String[] - { UpdatedSample.IDENTIFIER_COLUMN, UpdatedSample.CONTAINER, PROPERTY_1, PROPERTY_2 }; + { Identifier.IDENTIFIER_COLUMN, NewSample.CONTAINER, PROPERTY_1, PROPERTY_2 }; final DefaultPropertyMapper propertyMapper = new DefaultPropertyMapper(properties, null); return propertyMapper; } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/util/CacheManagerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/util/CacheManagerTest.java index 97b4c76fe82..f58fb553850 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/util/CacheManagerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/util/CacheManagerTest.java @@ -211,6 +211,7 @@ public class CacheManagerTest extends AbstractFileSystemTestCase Collections.sort(expectedFiles); List<String> files = new ArrayList<String>(Arrays.asList(cacheFolder.list(new FilenameFilter() { + @Override public boolean accept(File dir, String name) { return name.endsWith(CacheManager.KEY_FILE_TYPE) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/CheckDataSet.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/CheckDataSet.java index 0cb364c30ff..e41a350862f 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/CheckDataSet.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/CheckDataSet.java @@ -57,17 +57,20 @@ public class CheckDataSet extends AbstractDefaultTestCommand implements DataSetRelationshipBrowser.createGridId(datasetId, DataSetRelationshipRole.CHILD); } + @Override public Property property(final String name) { return new Property(name, this); } + @Override public CheckDataSet property(final String name, final IValueAssertion<?> valueAssertion) { propertyCheckingManager.addExcpectedProperty(name, valueAssertion); return this; } + @Override public void execute() { propertyCheckingManager.assertPropertiesOf(DataSetPropertiesPanel.PROPERTIES_ID_PREFIX diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/FillDataSetEditForm.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/FillDataSetEditForm.java index 4faf841edb4..42f945b3510 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/FillDataSetEditForm.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/FillDataSetEditForm.java @@ -27,6 +27,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.Abstract import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind; +import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.AbstractGenericEntityRegistrationForm; import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.PropertyField; /** @@ -54,7 +55,7 @@ public final class FillDataSetEditForm extends AbstractDefaultTestCommand private FillDataSetEditForm(final TechId dataSetId) { - this.formId = GenericDataSetEditForm.createId(dataSetId, EntityKind.DATA_SET); + this.formId = AbstractGenericEntityRegistrationForm.createId(dataSetId, EntityKind.DATA_SET); this.properties = new ArrayList<PropertyField>(); } @@ -65,9 +66,10 @@ public final class FillDataSetEditForm extends AbstractDefaultTestCommand return this; } + @Override public final void execute() { - String simpleId = formId.substring(GenericDataSetEditForm.ID_PREFIX.length()); + String simpleId = formId.substring(AbstractGenericEntityRegistrationForm.ID_PREFIX.length()); for (final PropertyField property : properties) { GWTTestUtil.setPropertyFieldValue(formId, property); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetEditorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetEditorTest.java index bc64d9780ef..2e478251130 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetEditorTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/GenericDataSetEditorTest.java @@ -131,6 +131,7 @@ public class GenericDataSetEditorTest extends AbstractGWTTestCase private class ShowUpdatedDataSet extends AbstractDefaultTestCommand { + @Override public void execute() { String tabItemId = diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/Property.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/Property.java index d44d1390d68..479475d1fcc 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/Property.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/dataset/Property.java @@ -38,6 +38,7 @@ public class Property extends AbstractProperty<CheckDataSet> { return by(new IValueAssertion<Person>() { + @Override public void assertValue(final Person value) { String actualName = value.getLastName() + ", " + value.getFirstName(); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/CheckExperiment.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/CheckExperiment.java index 5c759181dcb..8567abeacef 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/CheckExperiment.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/CheckExperiment.java @@ -47,17 +47,20 @@ public class CheckExperiment extends AbstractDefaultTestCommand implements propertyCheckingManager = new PropertyCheckingManager(); } + @Override public Property property(final String name) { return new Property(name, this); } + @Override public CheckExperiment property(final String name, final IValueAssertion<?> valueAssertion) { propertyCheckingManager.addExcpectedProperty(name, valueAssertion); return this; } + @Override public void execute() { propertyCheckingManager.assertPropertiesOf(ExperimentPropertiesPanel.PROPERTIES_ID_PREFIX diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/DownloadAttachment.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/DownloadAttachment.java index d9124d8b90b..1df7298730d 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/DownloadAttachment.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/DownloadAttachment.java @@ -46,6 +46,7 @@ public class DownloadAttachment extends AbstractDefaultTestCommand this.experimentId = experimentId; } + @Override @SuppressWarnings("unchecked") public void execute() { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/FillExperimentEditForm.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/FillExperimentEditForm.java index 40485f74b4a..caa6ea00bf4 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/FillExperimentEditForm.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/FillExperimentEditForm.java @@ -24,11 +24,13 @@ import com.extjs.gxt.ui.client.widget.form.TextArea; import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AbstractRegistrationForm; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.experiment.ProjectSelectionWidget; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind; +import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.AbstractGenericEntityRegistrationForm; import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.PropertyField; /** @@ -53,7 +55,7 @@ public final class FillExperimentEditForm extends AbstractDefaultTestCommand private FillExperimentEditForm(final TechId experimentId) { - this.formId = GenericExperimentEditForm.createId(experimentId, EntityKind.EXPERIMENT); + this.formId = AbstractGenericEntityRegistrationForm.createId(experimentId, EntityKind.EXPERIMENT); this.properties = new ArrayList<PropertyField>(); } @@ -70,9 +72,10 @@ public final class FillExperimentEditForm extends AbstractDefaultTestCommand return this; } + @Override public final void execute() { - String simpleId = formId.substring(GenericExperimentEditForm.ID_PREFIX.length()); + String simpleId = formId.substring(AbstractGenericEntityRegistrationForm.ID_PREFIX.length()); for (final PropertyField property : properties) { GWTTestUtil.setPropertyFieldValue(formId, property); @@ -80,7 +83,7 @@ public final class FillExperimentEditForm extends AbstractDefaultTestCommand if (newProjectOrNull != null) { final ProjectSelectionWidget projectSelector = - (ProjectSelectionWidget) GWTTestUtil.getWidgetWithID(ProjectSelectionWidget.ID + (ProjectSelectionWidget) GWTTestUtil.getWidgetWithID(DropDownList.ID + ProjectSelectionWidget.SUFFIX + simpleId); GWTUtils.setSelectedItem(projectSelector, ModelDataPropertyNames.PROJECT_IDENTIFIER, newProjectOrNull); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/FillExperimentRegistrationForm.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/FillExperimentRegistrationForm.java index 6794df874a1..a1ebcfc93d4 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/FillExperimentRegistrationForm.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/FillExperimentRegistrationForm.java @@ -25,6 +25,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericCon import ch.systemsx.cisd.openbis.generic.client.web.client.application.model.ModelDataPropertyNames; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.AbstractRegistrationForm; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.experiment.ProjectSelectionWidget; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -73,13 +74,14 @@ public final class FillExperimentRegistrationForm extends AbstractDefaultTestCom // AbstractDefaultTestCommand // + @Override public final void execute() { GWTTestUtil.setTextField(FORM_ID + AbstractGenericEntityRegistrationForm.ID_SUFFIX_CODE, code); final ProjectSelectionWidget projectSelector = - (ProjectSelectionWidget) GWTTestUtil.getWidgetWithID(ProjectSelectionWidget.ID + (ProjectSelectionWidget) GWTTestUtil.getWidgetWithID(DropDownList.ID + ProjectSelectionWidget.SUFFIX + FORM_SIMPLE_ID); GWTUtils.setSelectedItem(projectSelector, ModelDataPropertyNames.CODE, projectNameOrNull); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentAttachmentDownloadTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentAttachmentDownloadTest.java index 0d0b1878354..3e7144b95f3 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentAttachmentDownloadTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentAttachmentDownloadTest.java @@ -134,6 +134,7 @@ public class GenericExperimentAttachmentDownloadTest extends AbstractGWTTestCase this.openedUrlCallback = openedUrlCallback; } + @Override public void execute() { String openedUrl = openedUrlCallback.tryGetOpenedUrl(); @@ -169,11 +170,13 @@ public class GenericExperimentAttachmentDownloadTest extends AbstractGWTTestCase { requestBuilder.sendRequest(null, new RequestCallback() { + @Override public void onError(Request request, Throwable exception) { responseCallback.onFailure(exception); } + @Override public void onResponseReceived(Request request, Response response) { responseCallback.onSuccess(response.getText()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentRegistrationTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentRegistrationTest.java index 3db93008fe3..47c5779edd6 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentRegistrationTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentRegistrationTest.java @@ -29,6 +29,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.sample. import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractGWTTestCase; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind; +import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.AbstractGenericEntityRegistrationForm; import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.PropertyField; import ch.systemsx.cisd.openbis.systemtest.plugin.generic.ExperimentRegistrationTest; @@ -55,7 +56,7 @@ public class GenericExperimentRegistrationTest extends AbstractGWTTestCase if (FORM_ID == null) { FORM_ID = - GenericExperimentRegistrationForm + AbstractGenericEntityRegistrationForm .createId((TechId) null, EntityKind.EXPERIMENT); } return FORM_ID; diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentViewerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentViewerTest.java index ef0bb70b55c..c54f062bb2d 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentViewerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentViewerTest.java @@ -135,6 +135,7 @@ public class GenericExperimentViewerTest extends AbstractGWTTestCase remoteConsole.prepare(new Login("observer", "observer")); remoteConsole.prepare(new AbstractDefaultTestCommand() { + @Override public void execute() { IViewContext<ICommonClientServiceAsync> viewContext = @@ -185,6 +186,7 @@ public class GenericExperimentViewerTest extends AbstractGWTTestCase checkExperiment.property("Registrator").asPerson(DOE_JOHN); checkExperiment.property("Deletion").by(new IValueAssertion<Deletion>() { + @Override public void assertValue(final Deletion deletion) { assertEquals("Doe", deletion.getRegistrator().getLastName()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/Property.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/Property.java index 77857b86672..c7e07a040b9 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/Property.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/Property.java @@ -38,6 +38,7 @@ public class Property extends AbstractProperty<CheckExperiment> { return by(new IValueAssertion<Person>() { + @Override public void assertValue(final Person value) { String actualName = value.getLastName() + ", " + value.getFirstName(); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/CheckSample.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/CheckSample.java index 1f0213f4d5f..530e690778f 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/CheckSample.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/CheckSample.java @@ -46,11 +46,13 @@ public class CheckSample extends AbstractDefaultTestCommand implements propertyCheckingManager = new PropertyCheckingManager(); } + @Override public Property property(String name) { return new Property(name, this); } + @Override public CheckSample property(String name, IValueAssertion<?> valueAssertion) { propertyCheckingManager.addExcpectedProperty(name, valueAssertion); @@ -75,6 +77,7 @@ public class CheckSample extends AbstractDefaultTestCommand implements return new CheckTableCommand(gridId); } + @Override public void execute() { propertyCheckingManager.assertPropertiesOf(PROPERTIES_ID_PREFIX + sampleId); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/FillSampleRegistrationForm.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/FillSampleRegistrationForm.java index 443a2a39744..1fec3d102c6 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/FillSampleRegistrationForm.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/FillSampleRegistrationForm.java @@ -25,6 +25,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.Abstrac import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.SpaceSelectionWidget; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.field.ExperimentChooserField; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.field.SampleChooserField; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.DropDownList; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.AbstractDefaultTestCommand; import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestUtil; @@ -85,6 +86,7 @@ public final class FillSampleRegistrationForm extends AbstractDefaultTestCommand // AbstractDefaultTestCommand // + @Override public final void execute() { @@ -92,7 +94,7 @@ public final class FillSampleRegistrationForm extends AbstractDefaultTestCommand code); final SpaceSelectionWidget groupSelector = - (SpaceSelectionWidget) GWTTestUtil.getWidgetWithID(SpaceSelectionWidget.ID + (SpaceSelectionWidget) GWTTestUtil.getWidgetWithID(DropDownList.ID + SpaceSelectionWidget.SUFFIX + FORM_ID); GWTUtils.setSelectedItem(groupSelector, ModelDataPropertyNames.CODE, groupNameOrNull); @@ -107,14 +109,14 @@ public final class FillSampleRegistrationForm extends AbstractDefaultTestCommand { final SampleChooserField containerField = (SampleChooserField) GWTTestUtil.getWidgetWithID(FORM_ID - + GenericSampleRegistrationForm.ID_SUFFIX_CONTAINER); + + AbstractGenericSampleRegisterEditForm.ID_SUFFIX_CONTAINER); containerField.setValue(container); } if (StringUtils.isBlank(experimentIdentifier) == false) { final ExperimentChooserField expField = (ExperimentChooserField) GWTTestUtil.getWidgetWithID(FORM_ID - + GenericSampleRegistrationForm.ID_SUFFIX_EXPERIMENT); + + AbstractGenericSampleRegisterEditForm.ID_SUFFIX_EXPERIMENT); expField.setValue(experimentIdentifier); } for (final PropertyField property : properties) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleRegistrationTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleRegistrationTest.java index a948593fcbb..7475245ee0e 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleRegistrationTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleRegistrationTest.java @@ -30,6 +30,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.FailureE import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind; import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.IGenericClientService; +import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.AbstractGenericEntityRegistrationForm; import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.PropertyField; /** @@ -51,7 +52,7 @@ public class GenericSampleRegistrationTest extends AbstractGWTTestCase { if (FORM_ID == null) { - FORM_ID = GenericSampleRegistrationForm.createId((TechId) null, EntityKind.SAMPLE); + FORM_ID = AbstractGenericEntityRegistrationForm.createId((TechId) null, EntityKind.SAMPLE); } return FORM_ID; } diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleViewerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleViewerTest.java index cf9de5b366c..3d0b2cd1f8a 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleViewerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/GenericSampleViewerTest.java @@ -34,6 +34,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.GWTTestU import ch.systemsx.cisd.openbis.generic.client.web.client.testframework.IValueAssertion; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Deletion; +import ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application.AbstractEntityDataSetsSection; /** * A {@link AbstractGWTTestCase} extension to test {@link GenericSampleViewer}. @@ -130,6 +131,7 @@ public class GenericSampleViewerTest extends AbstractGWTTestCase checkSample.property("Sample Type").asCode("CELL_PLATE"); checkSample.property("Deletion").by(new IValueAssertion<Deletion>() { + @Override public void assertValue(final Deletion deletion) { assertEquals("Doe", deletion.getRegistrator().getLastName()); @@ -192,11 +194,12 @@ public class GenericSampleViewerTest extends AbstractGWTTestCase // show indirectly connected data sets remoteConsole.prepare(new AbstractDefaultTestCommand() { + @Override public void execute() { String showOnlyDirectlyConnectedCheckBoxId = GenericSampleViewer.createId(WILDCARD_ID) - + SampleDataSetsSection.SHOW_ONLY_DIRECTLY_CONNECTED_CHECKBOX_ID_POSTFIX; + + AbstractEntityDataSetsSection.SHOW_ONLY_DIRECTLY_CONNECTED_CHECKBOX_ID_POSTFIX; GWTTestUtil.clickCheckBoxWithID(showOnlyDirectlyConnectedCheckBoxId); } }); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/Property.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/Property.java index b0d7e408c27..268b2dc2b0e 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/Property.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/sample/Property.java @@ -40,6 +40,7 @@ public class Property extends AbstractProperty<CheckSample> { return by(new IValueAssertion<Person>() { + @Override public void assertValue(Person value) { String actualName = value.getLastName() + ", " + value.getFirstName(); @@ -52,6 +53,7 @@ public class Property extends AbstractProperty<CheckSample> { return by(new IValueAssertion<Sample[]>() { + @Override public void assertValue(Sample[] actualSamples) { for (int i = 0, n = Math.min(samples.length, actualSamples.length); i < n; i++) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/GenericClientServiceTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/GenericClientServiceTest.java index 6eb7b23f3e8..53d9b14ed5b 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/GenericClientServiceTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/GenericClientServiceTest.java @@ -231,6 +231,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest anyAttachmentCollection()); will(new CustomAction("check sample") { + @Override @SuppressWarnings("unchecked") public Object invoke(Invocation invocation) throws Throwable { @@ -296,6 +297,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest one(multipartFile).transferTo(with(any(File.class))); will(new CustomAction("copy content") { + @Override public Object invoke(Invocation invocation) throws Throwable { final File target = (File) invocation.getParameter(0); @@ -311,6 +313,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest will(new CustomAction("check sample") { + @Override @SuppressWarnings( { "unchecked" }) public Object invoke(Invocation invocation) throws Throwable @@ -383,6 +386,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest one(multipartFile).transferTo(with(any(File.class))); will(new CustomAction("copy content") { + @Override public Object invoke(Invocation invocation) throws Throwable { final File target = (File) invocation.getParameter(0); @@ -397,6 +401,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest will(new CustomAction("check sample") { + @Override @SuppressWarnings( { "unchecked" }) public Object invoke(Invocation invocation) throws Throwable @@ -459,6 +464,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest one(multipartFile).transferTo(with(any(File.class))); will(new CustomAction("copy content") { + @Override public Object invoke(Invocation invocation) throws Throwable { final File target = (File) invocation.getParameter(0); @@ -475,6 +481,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest will(new CustomAction("check sample") { + @Override @SuppressWarnings( { "unchecked", "deprecation" }) public Object invoke(Invocation invocation) throws Throwable @@ -546,6 +553,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest one(multipartFile).transferTo(with(any(File.class))); will(new CustomAction("copy content") { + @Override public Object invoke(Invocation invocation) throws Throwable { final File target = (File) invocation.getParameter(0); @@ -560,6 +568,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest will(new CustomAction("check sample") { + @Override @SuppressWarnings("unchecked") public Object invoke(Invocation invocation) throws Throwable { @@ -672,6 +681,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest one(multipartFile).transferTo(with(any(File.class))); will(new CustomAction("copy content") { + @Override public Object invoke(Invocation invocation) throws Throwable { final File target = (File) invocation.getParameter(0); @@ -710,6 +720,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest getTranslatedExperiment(), anyAttachmentCollection()); will(new CustomAction("check experiment") { + @Override @SuppressWarnings("unchecked") public Object invoke(Invocation invocation) throws Throwable { @@ -768,6 +779,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest one(multipartFile).transferTo(with(any(File.class))); will(new CustomAction("copy content") { + @Override public Object invoke(Invocation invocation) throws Throwable { final File target = (File) invocation.getParameter(0); @@ -783,6 +795,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest will(new CustomAction("check experiment") { + @Override public Object invoke(Invocation invocation) throws Throwable { final UpdatedExperimentsWithType experiments = @@ -845,6 +858,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest one(multipartFile).transferTo(with(any(File.class))); will(new CustomAction("copy content") { + @Override public Object invoke(Invocation invocation) throws Throwable { final File target = (File) invocation.getParameter(0); @@ -862,6 +876,7 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest with(new IsAnything<UpdatedExperimentsWithType>())); will(new CustomAction("check experiment") { + @Override public Object invoke(Invocation invocation) throws Throwable { final UpdatedExperimentsWithType experiments = @@ -986,11 +1001,13 @@ public final class GenericClientServiceTest extends AbstractClientServiceTest // BaseMatcher // + @Override public final void describeTo(final Description description) { description.appendValue(newSamples); } + @Override @SuppressWarnings("unchecked") public final boolean matches(final Object item) { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/parser/UpdatedDataSetParserObjectFactoryTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/parser/UpdatedDataSetParserObjectFactoryTest.java index cc4923d6fd0..c9fea975336 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/parser/UpdatedDataSetParserObjectFactoryTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/parser/UpdatedDataSetParserObjectFactoryTest.java @@ -25,6 +25,8 @@ import org.testng.annotations.Test; import ch.systemsx.cisd.common.parser.DefaultPropertyMapper; import ch.systemsx.cisd.common.parser.MandatoryPropertyMissingException; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Code; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewDataSet; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.UpdatedDataSet; /** @@ -45,7 +47,7 @@ public final class UpdatedDataSetParserObjectFactoryTest public void testLineWithCodeColumnSpecifiedButEmpty() { Tokens tokens = new Tokens(); - tokens.setToken(UpdatedDataSet.CODE, ""); + tokens.setToken(Code.CODE, ""); createObject(tokens); } @@ -53,7 +55,7 @@ public final class UpdatedDataSetParserObjectFactoryTest public void testLineWithCodeColumnSpecifiedAndNotEmpty() { Tokens tokens = new Tokens(); - tokens.setToken(UpdatedDataSet.CODE, "TEST-CODE"); + tokens.setToken(Code.CODE, "TEST-CODE"); UpdatedDataSet dataset = createObject(tokens); @@ -81,12 +83,12 @@ public final class UpdatedDataSetParserObjectFactoryTest public void testLineWithColumnsSpecifiedButEmpty() { Tokens tokens = new Tokens(); - tokens.setToken(UpdatedDataSet.CODE, "TEST-CODE"); - tokens.setToken(UpdatedDataSet.CONTAINER, ""); - tokens.setToken(UpdatedDataSet.EXPERIMENT, ""); - tokens.setToken(UpdatedDataSet.FILE_FORMAT, ""); - tokens.setToken(UpdatedDataSet.PARENTS, ""); - tokens.setToken(UpdatedDataSet.SAMPLE, ""); + tokens.setToken(Code.CODE, "TEST-CODE"); + tokens.setToken(NewDataSet.CONTAINER, ""); + tokens.setToken(NewDataSet.EXPERIMENT, ""); + tokens.setToken(NewDataSet.FILE_FORMAT, ""); + tokens.setToken(NewDataSet.PARENTS, ""); + tokens.setToken(NewDataSet.SAMPLE, ""); tokens.setToken("TEST-PROPERTY-1", ""); tokens.setToken("TEST-PROPERTY-2", ""); @@ -116,12 +118,12 @@ public final class UpdatedDataSetParserObjectFactoryTest public void testLineWithColumnsSpecifiedAndNotEmpty() { Tokens tokens = new Tokens(); - tokens.setToken(UpdatedDataSet.CODE, "TEST-CODE"); - tokens.setToken(UpdatedDataSet.CONTAINER, "TEST-CONTAINER"); - tokens.setToken(UpdatedDataSet.EXPERIMENT, "TEST-EXPERIMENT"); - tokens.setToken(UpdatedDataSet.FILE_FORMAT, "TEST-FORMAT"); - tokens.setToken(UpdatedDataSet.PARENTS, "TEST-PARENT-1,TEST-PARENT-2"); - tokens.setToken(UpdatedDataSet.SAMPLE, "TEST-SAMPLE"); + tokens.setToken(Code.CODE, "TEST-CODE"); + tokens.setToken(NewDataSet.CONTAINER, "TEST-CONTAINER"); + tokens.setToken(NewDataSet.EXPERIMENT, "TEST-EXPERIMENT"); + tokens.setToken(NewDataSet.FILE_FORMAT, "TEST-FORMAT"); + tokens.setToken(NewDataSet.PARENTS, "TEST-PARENT-1,TEST-PARENT-2"); + tokens.setToken(NewDataSet.SAMPLE, "TEST-SAMPLE"); tokens.setToken("TEST-PROPERTY-1", "TEST-VALUE-1"); tokens.setToken("TEST-PROPERTY-2", "TEST-VALUE-2"); @@ -155,12 +157,12 @@ public final class UpdatedDataSetParserObjectFactoryTest public void testLineWithColumnsSpecifiedAndMarkedForDeletetion() { Tokens tokens = new Tokens(); - tokens.setToken(UpdatedDataSet.CODE, "TEST-CODE"); - tokens.setToken(UpdatedDataSet.CONTAINER, "--DELETE--"); + tokens.setToken(Code.CODE, "TEST-CODE"); + tokens.setToken(NewDataSet.CONTAINER, "--DELETE--"); // experiment column cannot be marked for deletion - tokens.setToken(UpdatedDataSet.FILE_FORMAT, "__DELETE__"); - tokens.setToken(UpdatedDataSet.PARENTS, "--DELETE--"); - tokens.setToken(UpdatedDataSet.SAMPLE, "--DELETE--"); + tokens.setToken(NewDataSet.FILE_FORMAT, "__DELETE__"); + tokens.setToken(NewDataSet.PARENTS, "--DELETE--"); + tokens.setToken(NewDataSet.SAMPLE, "--DELETE--"); tokens.setToken("TEST-PROPERTY-1", "--DELETE--"); tokens.setToken("TEST-PROPERTY-2", "__DELETE__"); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServerTest.java index 1bacf4e7439..0eeb956de51 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServerTest.java @@ -642,6 +642,7 @@ public final class GenericServerTest extends AbstractServerTestCase will(returnValue(materialLister)); one(materialLister).list(with(new BaseMatcher<ListMaterialCriteria>() { + @Override public boolean matches(Object item) { assertTrue(item instanceof ListMaterialCriteria); @@ -651,6 +652,7 @@ public final class GenericServerTest extends AbstractServerTestCase return true; } + @Override public void describeTo(Description description) { description.appendText(materialTypePE.getCode()); @@ -820,6 +822,7 @@ public final class GenericServerTest extends AbstractServerTestCase with(new BaseMatcher<List<ExperimentBatchUpdatesDTO>>() { + @Override public boolean matches(Object item) { if (item instanceof List<?>) @@ -838,6 +841,7 @@ public final class GenericServerTest extends AbstractServerTestCase } } + @Override public void describeTo(Description description) { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/remoteapitest/api/v1/DateBasedSearchesThroughJsonApiTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/remoteapitest/api/v1/DateBasedSearchesThroughJsonApiTest.java index ee3a0e7a163..94718cc8f8c 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/remoteapitest/api/v1/DateBasedSearchesThroughJsonApiTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/remoteapitest/api/v1/DateBasedSearchesThroughJsonApiTest.java @@ -323,6 +323,7 @@ public class DateBasedSearchesThroughJsonApiTest extends RemoteApiTestCase { this.filters.add(new Filter<DataSetInfo>() { + @Override public boolean accepts(DataSetInfo t) { return t.getRegistrationDate().startsWith(aDate); @@ -341,6 +342,7 @@ public class DateBasedSearchesThroughJsonApiTest extends RemoteApiTestCase { this.filters.add(new Filter<DataSetInfo>() { + @Override public boolean accepts(DataSetInfo t) { return t.getModificationDate().startsWith(aDateString); @@ -441,6 +443,7 @@ public class DateBasedSearchesThroughJsonApiTest extends RemoteApiTestCase return this.param.getCode().equals(name); } + @Override public boolean foundIn(Collection<DataSet> items) { for (DataSet dataset : items) @@ -453,6 +456,7 @@ public class DateBasedSearchesThroughJsonApiTest extends RemoteApiTestCase return false; } + @Override public String getRealId() { return this.info.getCode(); @@ -508,6 +512,7 @@ public class DateBasedSearchesThroughJsonApiTest extends RemoteApiTestCase this.identifiers = Collections.unmodifiableList(Arrays.asList(ids)); } + @Override public final void describeTo(Description description) { description.appendText("A collection containing at least these elements:"); @@ -549,6 +554,7 @@ public class DateBasedSearchesThroughJsonApiTest extends RemoteApiTestCase this.identifiers = Collections.unmodifiableList(Arrays.asList(ids)); } + @Override public final void describeTo(Description description) { description.appendText("A collection that does not contain any of these elements:"); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/remoteapitest/api/v1/GeneralInformationServiceJsonApiTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/remoteapitest/api/v1/GeneralInformationServiceJsonApiTest.java index 4770187d25d..2e1bbdd337f 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/remoteapitest/api/v1/GeneralInformationServiceJsonApiTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/remoteapitest/api/v1/GeneralInformationServiceJsonApiTest.java @@ -104,6 +104,7 @@ public class GeneralInformationServiceJsonApiTest extends RemoteApiTestCase Collections.sort(spaces, new Comparator<SpaceWithProjectsAndRoleAssignments>() { + @Override public int compare(SpaceWithProjectsAndRoleAssignments s1, SpaceWithProjectsAndRoleAssignments s2) { @@ -356,6 +357,7 @@ public class GeneralInformationServiceJsonApiTest extends RemoteApiTestCase List<Project> projects = space.getProjects(); Collections.sort(projects, new Comparator<Project>() { + @Override public int compare(Project p1, Project p2) { return p1.getCode().compareTo(p2.getCode()); @@ -365,6 +367,7 @@ public class GeneralInformationServiceJsonApiTest extends RemoteApiTestCase List<Role> roles = new ArrayList<Role>(space.getRoles("test")); Collections.sort(roles, new Comparator<Role>() { + @Override public int compare(Role r1, Role r2) { return r1.toString().compareTo(r2.toString()); @@ -420,6 +423,7 @@ public class GeneralInformationServiceJsonApiTest extends RemoteApiTestCase Comparator<Experiment> experimentCompare = new Comparator<Experiment>() { + @Override public int compare(Experiment o1, Experiment o2) { return o1.getIdentifier().compareTo(o2.getIdentifier()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/BatchMaterialRegistrationAndUpdateTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/BatchMaterialRegistrationAndUpdateTest.java index f5b0cfcfb36..8ae108cbe8c 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/BatchMaterialRegistrationAndUpdateTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/BatchMaterialRegistrationAndUpdateTest.java @@ -235,6 +235,7 @@ public class BatchMaterialRegistrationAndUpdateTest extends SystemTestCase assertEquals(code, materialInfo.getCode()); Collections.sort(materialInfo.getProperties(), new Comparator<IEntityProperty>() { + @Override public int compare(IEntityProperty p1, IEntityProperty p2) { return p1.getPropertyType().getCode() diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/DataSetListingTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/DataSetListingTest.java index 133935b87a3..f64798b80ae 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/DataSetListingTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/DataSetListingTest.java @@ -68,6 +68,7 @@ public class DataSetListingTest extends SystemTestCase List<ExternalData> dataSets = asList(resultSet); Collections.sort(dataSets, new Comparator<ExternalData>() { + @Override public int compare(ExternalData e1, ExternalData e2) { return e1.getCode().compareTo(e2.getCode()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/DeletionTestCase.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/DeletionTestCase.java index f60b57389ac..79580204cd9 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/DeletionTestCase.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/DeletionTestCase.java @@ -247,6 +247,7 @@ public class DeletionTestCase extends SystemTestCase CollectionUtils.filter(registeredSamples, new Predicate<Sample>() { + @Override public boolean evaluate(Sample s) { return !s.getCode().equals("S1.4"); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/HistoryRowMapper.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/HistoryRowMapper.java index 6230f559b2d..cc54b5de785 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/HistoryRowMapper.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/HistoryRowMapper.java @@ -23,6 +23,7 @@ import org.springframework.jdbc.core.simple.ParameterizedRowMapper; final class HistoryRowMapper implements ParameterizedRowMapper<PropertyHistory> { + @Override public PropertyHistory mapRow(java.sql.ResultSet rs, int rowNum) throws SQLException { PropertyHistory propertyHistory = new PropertyHistory(); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/PropertiesHistoryTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/PropertiesHistoryTest.java index 26341806859..416f37da646 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/PropertiesHistoryTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/PropertiesHistoryTest.java @@ -359,6 +359,7 @@ public class PropertiesHistoryTest extends SystemTestCase new Comparator<TableModelRowWithObject<EntityPropertyHistory>>() { + @Override public int compare(TableModelRowWithObject<EntityPropertyHistory> o1, TableModelRowWithObject<EntityPropertyHistory> o2) { diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/SamplesListingTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/SamplesListingTest.java index f3898adaeab..1581144dacd 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/SamplesListingTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/SamplesListingTest.java @@ -71,6 +71,7 @@ public class SamplesListingTest extends SystemTestCase List<Sample> samples = asList(resultSet); Collections.sort(samples, new Comparator<Sample>() { + @Override public int compare(Sample s1, Sample s2) { return s1.getIdentifier().compareTo(s2.getIdentifier()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/SystemTestCase.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/SystemTestCase.java index 9ba51afdc03..e97f1a2d360 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/SystemTestCase.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/SystemTestCase.java @@ -282,6 +282,7 @@ public abstract class SystemTestCase extends AbstractTransactionalTestNGSpringCo new ArrayList<IEntityProperty>(propertiesHolder.getProperties()); Collections.sort(properties, new Comparator<IEntityProperty>() { + @Override public int compare(IEntityProperty p1, IEntityProperty p2) { return p1.getPropertyType().getCode().compareTo(p2.getPropertyType().getCode()); @@ -367,6 +368,7 @@ public abstract class SystemTestCase extends AbstractTransactionalTestNGSpringCo { Collections.sort(list, new Comparator<PropertyHistory>() { + @Override public int compare(PropertyHistory o1, PropertyHistory o2) { return o1.toString().compareTo(o2.toString()); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/api/v1/GeneralInformationServiceTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/api/v1/GeneralInformationServiceTest.java index 4df389f7659..1126c5fe7c0 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/api/v1/GeneralInformationServiceTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/api/v1/GeneralInformationServiceTest.java @@ -114,6 +114,7 @@ public class GeneralInformationServiceTest extends SystemTestCase List<Project> projects = generalInformationService.listProjects(sessionToken); Collections.sort(projects, new Comparator<Project>() { + @Override public int compare(Project p1, Project p2) { return p1.getIdentifier().compareTo(p2.getIdentifier()); @@ -708,6 +709,7 @@ public class GeneralInformationServiceTest extends SystemTestCase List<DataSetType> types = generalInformationService.listDataSetTypes(sessionToken); Collections.sort(types, new Comparator<DataSetType>() { + @Override public int compare(DataSetType t1, DataSetType t2) { return t1.getCode().compareTo(t2.getCode()); @@ -721,6 +723,7 @@ public class GeneralInformationServiceTest extends SystemTestCase List<PropertyType> propertyTypes = groups.get(0).getPropertyTypes(); Collections.sort(propertyTypes, new Comparator<PropertyType>() { + @Override public int compare(PropertyType t1, PropertyType t2) { return t1.getCode().compareTo(t2.getCode()); @@ -901,6 +904,7 @@ public class GeneralInformationServiceTest extends SystemTestCase assertCollection("[SRM_1, SRM_1A]", materials, new IToStringDelegate<Material>() { + @Override public String toString(Material t) { return t.getMaterialCode(); @@ -927,6 +931,7 @@ public class GeneralInformationServiceTest extends SystemTestCase assertCollection("[SRM_1, SRM_1A]", materials, new IToStringDelegate<Material>() { + @Override public String toString(Material t) { return t.getMaterialCode(); @@ -976,6 +981,7 @@ public class GeneralInformationServiceTest extends SystemTestCase assertCollection("[BACTERIUM-X, BACTERIUM-Y, BACTERIUM1, BACTERIUM2]", materials, new IToStringDelegate<Material>() { + @Override public String toString(Material t) { return t.getMaterialCode(); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/DynamicPropertiesEvaluationTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/DynamicPropertiesEvaluationTest.java index 1ea7cbd81f1..ad2e4f914ca 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/DynamicPropertiesEvaluationTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/DynamicPropertiesEvaluationTest.java @@ -105,6 +105,7 @@ public class DynamicPropertiesEvaluationTest extends GenericSystemTestCase final IDelegatedAction assertAction = new IDelegatedAction() { + @Override public void execute() { ListSampleCriteria listCriteria = new ListSampleCriteria(); @@ -151,6 +152,7 @@ public class DynamicPropertiesEvaluationTest extends GenericSystemTestCase final IDelegatedAction assertAction = new IDelegatedAction() { + @Override public void execute() { Sample loadedSample = getSpaceSample(NEW_SAMPLE_IDENTIFIER); @@ -203,6 +205,7 @@ public class DynamicPropertiesEvaluationTest extends GenericSystemTestCase final IDelegatedAction assertAction = new IDelegatedAction() { + @Override public void execute() { final Date dateAfter = new Date(); @@ -263,6 +266,7 @@ public class DynamicPropertiesEvaluationTest extends GenericSystemTestCase final IDelegatedAction assertAction = new IDelegatedAction() { + @Override public void execute() { sleep(SLEEP_TIME); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/ExperimentRegistrationTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/ExperimentRegistrationTest.java index 37314aedef6..efb27ae7e33 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/ExperimentRegistrationTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/ExperimentRegistrationTest.java @@ -162,6 +162,7 @@ public class ExperimentRegistrationTest extends GenericSystemTestCase new ArrayList<GridRowModel<Sample>>(samples.getResultSet().getList()); Collections.sort(list, new Comparator<GridRowModel<Sample>>() { + @Override public int compare(GridRowModel<Sample> o1, GridRowModel<Sample> o2) { return o1.getOriginalObject().getCode() @@ -335,6 +336,7 @@ public class ExperimentRegistrationTest extends GenericSystemTestCase new ArrayList<GridRowModel<Sample>>(samples.getResultSet().getList()); Collections.sort(list, new Comparator<GridRowModel<Sample>>() { + @Override public int compare(GridRowModel<Sample> o1, GridRowModel<Sample> o2) { return o1.getOriginalObject().getCode() diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/query/QueryEditingTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/query/QueryEditingTest.java index 5093995765a..5ad04516c1f 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/query/QueryEditingTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/query/QueryEditingTest.java @@ -171,6 +171,7 @@ public class QueryEditingTest extends QuerySystemTestCase assertEquals(2, queries.size()); Collections.sort(queries, new Comparator<QueryExpression>() { + @Override public int compare(QueryExpression o1, QueryExpression o2) { return o1.getName().compareTo(o2.getName()); -- GitLab