Merge branch 'develop' into remoting-4.0
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 24 Aug 2015 09:34:25 +0000 (11:34 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 24 Aug 2015 09:34:25 +0000 (11:34 +0200)
Conflicts:
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientOccurenceService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientTaxonService.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java

338 files changed:
.gitattributes
.gitignore
eu.etaxonomy.taxeditor.application/.classpath
eu.etaxonomy.taxeditor.application/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchWindowAdvisor.java
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/update/P2Util.java
eu.etaxonomy.taxeditor.application/src/main/resources/log4j.properties [deleted file]
eu.etaxonomy.taxeditor.bulkeditor/.classpath
eu.etaxonomy.taxeditor.bulkeditor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/AnnotatedLineEditor.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditor.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/GroupEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/NameEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/NameRelationshipEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/OccurrenceEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/ReferenceEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/TaxonEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/UserEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/UserCreator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java
eu.etaxonomy.taxeditor.cdmlib/.classpath
eu.etaxonomy.taxeditor.cdmlib/.gitignore
eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.cdmlib/build.properties
eu.etaxonomy.taxeditor.cdmlib/lib/apache-log4j-extras-1.2.17.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/aspectjrt-1.7.1-sources.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/aspectjweaver-1.7.1-sources.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-easymock-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-inject-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-mock-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-orm-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.3.jar [deleted file]
eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/pom.xml
eu.etaxonomy.taxeditor.cdmlib/resources/cdm.map.ser [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteController.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationState.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmChangeEvent.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmDataChangeService.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/ICdmChangeListener.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/ICdmDataChangeService.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/cache/CdmServiceCacher.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmEagerLoadingException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmRemotingException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CacheLoader.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmClientCacheException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmEntityCacheKey.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelCacher.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelFieldPropertyFromClass.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmRemoteCacheManager.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmTransientEntityCacher.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/EntityCacherDebugResult.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/ProxyUtils.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/server/CDMServerException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmPersistentRemoteSource.java [moved from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmPersistentRemoteSource.java with 89% similarity]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSource.java [moved from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSource.java with 96% similarity]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSourceBase.java [moved from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceBase.java with 77% similarity]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSourceException.java [moved from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceException.java with 82% similarity]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/ICdmRemoteSource.java [moved from eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/ICdmRemoteSource.java with 94% similarity]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CachedCommonServiceImpl.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmAuthenticatedHttpInvokerRequestExecutor.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceInterceptorException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceRequestExecutor.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/ICachedCommonService.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/TermServiceRequestExecutor.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmClientSessionException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySession.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionManager.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySession.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionEnabled.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionManager.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionManagerObserver.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/NullSession.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySession.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySessionManager.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/proxy/AbstractLazyInitializer.java
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/.svnignore [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/jetty-runner-9.2.3.v20140905.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/start-9.2.3.v20140905.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/httpInvokerServiceClients.xml
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/localApplicationContext.xml
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remotingApplicationContext.xml
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_persistence_security.xml [deleted file]
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_services_security.xml [deleted file]
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/log4j.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.cdmlib/src/test/resources/eu/etaxonomy/cdm/datasources/cdm.datasources.xml [deleted file]
eu.etaxonomy.taxeditor.editor/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.editor/plugin.xml
eu.etaxonomy.taxeditor.editor/pom.xml
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorUtil.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/MultiPageTaxonEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/AbstractIdentificationEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/KeyEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorInput.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyEditorLabels.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyListContentProvider.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyListEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/RemotingCreateChildPolytomousKeyNodeHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/handler/RemotingCreateSiblingPolytomousKeyNodeHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/CreateNodeOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/DeleteNodeOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/RemotingCreatePolytomousKeyNodeOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/TaxonNameEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeSynonymToAcceptedTaxonHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateHomotypicSynonymHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/CreateSynonymInHomotypicalGroupHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteTaxonBaseHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/SwapSynonymAndAcceptedHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptToSynonymOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeHomotypicalGroupBasionymOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToAcceptedTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToMisapplicationOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateSynonymInExistingHomotypicalGroupOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteMisapplicationOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteTaxonBaseOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/MoveSynonymToAnotherAcceptedTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/SwapSynonymAndAcceptedOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/graph/ConceptGraphView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/SpecimenImportView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientOccurenceService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientTaxonService.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateDerivateContextMenu.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/operation/DeleteDerivateOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/MoveDescriptionToOtherTaxonHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/DeleteDescriptionElementOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/DeleteSpecimenDescriptionOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/DeleteTaxonDescriptionOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/MoveDescriptionToOtherTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/resources/log4j.properties [deleted file]
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateSynonymInExisitingHomotypicalGroupOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteDescriptionElementOperationTest.java
eu.etaxonomy.taxeditor.editor/src/test/java/eu/etaxonomy/taxeditor/editor/name/operation/SwapSynonymAndAcceptedOperationTest.java
eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.navigation/plugin.xml
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewLabels.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewPart.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingDeletePolytomousKeyHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingEditPolytomousKeyNodesHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingUpdatePolytomousKeyAllNodesHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/DeleteOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/RemotingDeletePolytomousKeyOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/RemotingUpdatePolytomousKeyAllNodesOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/Root.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonLinkHelper.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigator.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorDataChangeBehavior.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorLabels.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TreeNodeDropAdapterAssistant.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/ChangeAcceptedTaxonToSynonymHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/DeleteHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/MoveFactualDataHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/MoveTaxonHandler.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/NavigatorHandlerUtils.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingChangeAcceptedTaxonToSynonymHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingDeleteTaxonNodeHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveFactualDataHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveTaxonNodeHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/ChangeAcceptedTaxonToSynonymOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/EditClassificationOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingChangeAcceptedTaxonToSynonymOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingDeleteTaxonNodeOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveFactualDataOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveTaxonOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/operation/CreateClassification.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/operation/CreatePolytomousKey.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/operation/CreateTaxonNode.java
eu.etaxonomy.taxeditor.navigation/src/test/resources/log4j.properties [deleted file]
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.store/plugin.xml
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/CdmDataSourceRepository.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/CdmEntitySessionInput.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermEditor.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateDefinedTermOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/CreateTermVocabularyOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/operation/DeleteTermBaseOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenInspectSessionsHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ReconnectHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowRemotingLoginWindowHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/SwitchUserHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/AbstractIOManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ExportManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ImportManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/AbcdImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CsvExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CsvNameExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/CsvPrintExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExcelNormalExplicitTaxaImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ExportToFileDestinationWizardPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/JaxbExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/SddExportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/SddImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/TcsImportWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewClassificationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPersistentPostOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostTaxonOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmHandler.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmMergeOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/ParseHandler.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmStorePropertyTester.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/DefaultFeatureTreePreferenecs.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/AbstractMatchingPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/NonViralNameMatchingPreference.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/ReferenceMatchingPreference.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/matching/TeamOrPersonMatchingPreference.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/AbstractMenuPreferences.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/CdmPreferencePage.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/AvailableDistributionPage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmAuthenticationException.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStoreConnector.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmUIDataChangeService.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/ContextManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/LoginManager.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/bar/AuthenticatedUserBar.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/util/ApplicationUtil.java [moved from eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationUtil.java with 84% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/util/OperationsUtil.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmViewPart.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateContentProvider.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateLabelProvider.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateSearchView.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/InspectSessionsDialog.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/SessionsViewPart.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewPart.java
eu.etaxonomy.taxeditor.store/src/main/resources/log4j.properties [deleted file]
eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/operations/AbstractTaxeditorOperationTestBase.java
eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/operations/RemotingTestUpdateOperation.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.store/src/test/resources/log4j.properties [deleted file]
eu.etaxonomy.taxeditor.test/.classpath
eu.etaxonomy.taxeditor.test/.project
eu.etaxonomy.taxeditor.test/.settings/org.eclipse.jdt.core.prefs
eu.etaxonomy.taxeditor.test/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.test/build.properties
eu.etaxonomy.taxeditor.test/lib/byte-buddy-0.5.1.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/dbunit-2.4.9.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/org.springframework.context-3.2.2.RELEASE.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/unitils-core-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/unitils-database-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/unitils-dbmaintainer-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/unitils-dbunit-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/lib/unitils-spring-3.4.2.jar [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/pom.xml
eu.etaxonomy.taxeditor.test/server.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/main/resources/log4j.xml [deleted file]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/application/menu/general/NewMenuTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/BaseRemotingTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CDMServer.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmPersistentRemoteSourceTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmRemoteSourceTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmServerTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/HttpInvokerServicesTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/RemotingSessionAwareTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/CdmServiceCacherTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemoteLazyLoadingTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemotePersistentCollectionTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/navigation/navigator/contextmenu/ClassificationTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonWizardTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/PolytomousKeyViewPartTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperationTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNameEditorTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operations/BaseOperationTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/IOServiceExportTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/IOServiceImportTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ServiceInterceptorTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionManagerTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/MockSessionOwner.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/MockConversationEnabled.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/CdmServerInfoTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialogTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElementTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/NameSelectionElementTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonNodeSelectionElementTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/TaxonSelectionElementTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/util/H2DbSupport.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/.cdmLibrary/writableResources/cdm.datasources.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/datasources.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/cdm/testRemotingApplicationContext.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/lazyloading/CdmEntityCacherTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/PolytomousKeyViewPartTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/RemotingCdmUpdateOperationTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/TaxonNameEditorTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.testDeleteClassificationWithDeleteChildren.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/service/IOServiceExportTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/service/IOServiceImportTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/eu/etaxonomy/taxeditor/session/CdmEntitySessionManagerTest.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/h2/cdmTest.h2.db [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/h2/cdmTest.trace.db [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/imports/ABCDImport.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/imports/NormalExplicitImport.xls [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/imports/SDD.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/imports/SpecimenExcelImport.xls [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/imports/TcsImport.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/log4j.xml [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/server.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/resources/unitils.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor/pom.xml
pom.xml

index e6bb9df13a99bf906f9bb0b0bf78c8ce9ee2a42f..567745fa5e74ebc9de6f4513e4930b6fb1d4e56a 100644 (file)
@@ -142,9 +142,7 @@ eu.etaxonomy.taxeditor.cdmlib/build.properties -text
 eu.etaxonomy.taxeditor.cdmlib/lib/activation-1.1.1.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/antlr-2.7.7.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/aopalliance-1.0.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/aspectjrt-1.7.1-sources.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/aspectjrt-1.7.1.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/aspectjweaver-1.7.1-sources.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/aspectjweaver-1.7.1.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/avro-1.6.3.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/batik-anim-1.7.jar -text
@@ -306,15 +304,11 @@ eu.etaxonomy.taxeditor.cdmlib/lib/spring-security-remoting-3.1.3.RELEASE.jar -te
 eu.etaxonomy.taxeditor.cdmlib/lib/stax-1.2.0.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/stax-api-1.0.1.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/swagger-annotations-1.3.5.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-easymock-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-inject-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-mock-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-orm-3.3.jar -text
-eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.3.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.4.2.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.4.2.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.4.2.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.4.2.jar -text
+eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.4.2.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/usertype.jodatime-2.0.1.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/usertype.spi-2.0.1.jar -text
 eu.etaxonomy.taxeditor.cdmlib/lib/validation-api-1.0.0.GA.jar -text
@@ -337,22 +331,57 @@ eu.etaxonomy.taxeditor.cdmlib/lib/yjp-controller-api-redist-9.0.8.jar -text
 eu.etaxonomy.taxeditor.cdmlib/pom.xml -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteController.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/RemotingMonitoredGenericApplicationContext.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/RemotingMonitoredListableBeanFactory.java -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/cache/CdmServiceCacher.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/lazyloading/CdmLazyLoader.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmPersistentRemoteSource.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSource.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceBase.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/CdmRemoteSourceException.java -text
-eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/remote/ICdmRemoteSource.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmEagerLoadingException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmRemotingException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CacheLoader.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmClientCacheException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmEntityCacheKey.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelCacher.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelFieldPropertyFromClass.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmRemoteCacheManager.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmTransientEntityCacher.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/EntityCacherDebugResult.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/ProxyUtils.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/server/CDMServerException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmPersistentRemoteSource.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSource.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSourceBase.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSourceException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/ICdmRemoteSource.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CachedCommonServiceImpl.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmAuthenticatedHttpInvokerRequestExecutor.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceInterceptorException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceRequestExecutor.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/ICachedCommonService.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/TermServiceRequestExecutor.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmClientSessionException.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySession.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionManager.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySession.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionEnabled.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionManager.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySessionManagerObserver.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySession.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySessionManager.java -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/proxy/AbstractLazyInitializer.java -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/cdmlib-ehcache.xml -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/.svnignore -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/cdmlib-remote-webapp.war -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/jetty-runner-9.2.3.v20140905.jar -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/start-9.2.3.v20140905.jar -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/config.properties -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/httpInvokerServiceClients.xml -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/localApplicationContext.xml -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remotingApplicationContext.xml -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_persistence_security.xml -text
 eu.etaxonomy.taxeditor.cdmlib/src/main/resources/eu/etaxonomy/cdm/remoting_services_security.xml -text
-eu.etaxonomy.taxeditor.cdmlib/src/test/resources/eu/etaxonomy/cdm/datasources/cdm.datasources.xml -text
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/log4j.properties -text
 eu.etaxonomy.taxeditor.editor/.classpath -text
 eu.etaxonomy.taxeditor.editor/.project -text
 eu.etaxonomy.taxeditor.editor/META-INF/MANIFEST.MF -text
@@ -374,6 +403,7 @@ eu.etaxonomy.taxeditor.editor/p2.inf -text
 eu.etaxonomy.taxeditor.editor/plugin.xml -text
 eu.etaxonomy.taxeditor.editor/pom.xml -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/CdmDataTransfer.java -text
+eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/CdmEntitySessionInput.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/ChooseFromMultipleTaxonNodesDialog.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorCdmViewer.java -text
 eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorStateManager.java -text
@@ -1262,9 +1292,14 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/Op
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/SelectFeatureTreeWizard.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/SelectFeatureTreeWizardPage.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenDistributionEditorWizardHandler.java -text
+<<<<<<< HEAD
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenInspectSessionsHandler.java -text
+=======
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenHandler.java -text
+>>>>>>> 02176688eaa23a31ff5b71c317cb5ee685483aa4
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/OpenPasswordWizzardHandler.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowLoginWindowHandler.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/handler/ShowRemotingLoginWindowHandler.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/identificationkey/AbstractIdentificaitonKeyWizard.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/AbstractIOManager.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ExportManager.java -text
@@ -1361,7 +1396,6 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/Abst
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostOperation.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/AbstractPostTaxonOperation.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/IPostOperationEnabled.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/MatchStrategyConfigurator.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/ParseHandler.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmPreferences.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmStorePropertyTester.java -text
@@ -1433,6 +1467,7 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/TermC
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/VocabularyComboElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/DefaultLanguageDialog.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/LoginDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/UriDialog.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteConfiguratorComposite.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/deleteConfigurator/DeleteConfiguratorDialog.java -text
@@ -1822,6 +1857,8 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/Cd
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewPart.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/reporting/ReportingViewPart.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/InspectSessionsDialog.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/SessionsViewPart.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/specimenSearch/SpecimenProviderSelectionComposite.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/specimenSearch/SpecimenProviderSelectionController.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/specimenSearch/SpecimenSearchComposite.java -text
@@ -1855,14 +1892,56 @@ eu.etaxonomy.taxeditor.test/.settings/org.eclipse.jdt.core.prefs -text
 eu.etaxonomy.taxeditor.test/META-INF/MANIFEST.MF -text
 eu.etaxonomy.taxeditor.test/build.properties -text
 eu.etaxonomy.taxeditor.test/ide/eclipse/EDITor[!!-~]Tests.launch -text
+eu.etaxonomy.taxeditor.test/lib/byte-buddy-0.5.1.jar -text
 eu.etaxonomy.taxeditor.test/pom.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/cdmlib-ehcache.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/datasources.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/cdm.datasources.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/model/PolytomousKeyTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/model/TaxonNameEditorTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/model/TaxonNavigatorTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/cdm/testRemotingApplicationContext.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/taxeditor/lazyloading/CdmEntityCacherTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/eu/etaxonomy/taxeditor/remoting/session/CdmEntitySessionManagerTest.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/h2/cdmTest.h2.db -text
+eu.etaxonomy.taxeditor.test/src/main/resources/h2/cdmTest.trace.db -text
+eu.etaxonomy.taxeditor.test/src/main/resources/log4j.properties -text
 eu.etaxonomy.taxeditor.test/src/main/resources/log4j.xml -text
+eu.etaxonomy.taxeditor.test/src/main/resources/unitils.properties -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/api/cache/CdmClientCachingTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/api/cache/CdmModelGetMethodCacherTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/model/PolytomousKeyTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/model/TaxonNameEditorTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/model/TaxonNavigatorTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/application/menu/general/NewMenuTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/BaseRemotingTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CDMServer.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmPersistentRemoteSourceTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmRemoteSourceTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmServerTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/CdmServerTestManager.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/httpinvoker/HttpInvokerServicesTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/AbstractLazyInitializerTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/CdmEntityCacherTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/CdmServiceCacherTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemoteLazyLoadingTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/lazyloading/RemotePersistentCollectionTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/navigation/navigator/contextmenu/ClassificationTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonWizardTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operations/OperationTestBase.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ITestService.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ServiceInterceptorTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/ServiceRebasingTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/TargetTestService.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/service/TestService.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionManagerTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/MockSessionOwner.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/AbstractEditorTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/ContextMenuHelper.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/SwtBotUtils.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/CdmServerInfoTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialogTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/AbstractSelectionElementTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/ui/selection/ClassificationSelectionElementTest.java -text
index 5c8b928b8e9810e6ba3615b0efdeead665c5c54d..ee184e8334b2e5f3709f6c32585fac6c41d1c255 100644 (file)
@@ -1,4 +1,5 @@
 /.project
+eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/*
 eu.etaxonomy.taxeditor.application/.settings
 eu.etaxonomy.taxeditor.application/target
 eu.etaxonomy.taxeditor.bulkeditor/.settings
@@ -8,6 +9,7 @@ eu.etaxonomy.taxeditor.cdmlib/.settings
 eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.jar
 eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.zip
 eu.etaxonomy.taxeditor.cdmlib/dist
+eu.etaxonomy.taxeditor.cdmlib/lib/cdm-server*
 eu.etaxonomy.taxeditor.cdmlib/lib/cdmlib*
 eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.servletbridge.extensionbundle-1.2.0.v20100503.jar
 eu.etaxonomy.taxeditor.cdmlib/lib/org.eclipse.equinox.transforms.hook-1.0.300.v20100719.jar
index 4c7e96f59500b4f98198fb4a11bdf511d1107b48..4c0364cadc7a33d0798a7c7813ef92548fe8cb81 100644 (file)
@@ -3,6 +3,6 @@
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
-       <classpathentry kind="src" path="src/main/resources"/>
+       <classpathentry kind="src" path="src/test/java"/>
        <classpathentry kind="output" path="target/classes"/>
 </classpath>
index 6a5c286864b932de03a3eebef50559186709fc25..aaacf83eb4238b7ab44359144cd6a229f55f32f4 100644 (file)
@@ -9,7 +9,8 @@ Bundle-Localization: OSGI-INF/l10n/plugin
 Export-Package: eu.etaxonomy.taxeditor
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.apache.log4j,
+Import-Package: eu.etaxonomy.cdm.database,
+ org.apache.log4j,
  org.eclipse.equinox.app,
  org.eclipse.equinox.p2.repository.metadata,
  org.osgi.framework,
index a4d2e6816dc5452ab1f36ae1b54eeadeb5d4852f..bb5b360a311cca20625d70ad041ed5e78a56ccd2 100644 (file)
@@ -12,6 +12,7 @@ import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.dialog.LoginDialog;
 import eu.etaxonomy.taxeditor.update.P2Util;
+import eu.etaxonomy.taxeditor.util.ApplicationUtil;
 
 /**
  * <p>ApplicationWorkbenchWindowAdvisor class.</p>
@@ -47,7 +48,7 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
                configurer.setShowCoolBar(true);
                configurer.setShowStatusLine(true);
                configurer.setShowPerspectiveBar(true);
-               configurer.setTitle("EDIT Taxonomic Editor " + ApplicationUtil.getVersion());
+               configurer.setTitle(ApplicationUtil.getTitle());
                configurer.setShowProgressIndicator(true);
 
                CdmDataSourceRepository.createDefaultH2DataSource();
index 9e1731c4cf7cdcc7c73745e5bcf39b1d8ef705b1..a286718ff9854c4a23dc879cd655b6fdecd62087 100644 (file)
@@ -7,7 +7,6 @@ import java.util.List;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.IJobChangeEvent;
@@ -16,27 +15,25 @@ import org.eclipse.core.runtime.jobs.JobChangeAdapter;
 import org.eclipse.equinox.internal.p2.ui.ProvUI;
 import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
 import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.equinox.p2.core.IProvisioningAgent;
 import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.operations.ProvisioningJob;
 import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
 import org.eclipse.equinox.p2.operations.Update;
 import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.PlatformUI;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 
-import eu.etaxonomy.taxeditor.ApplicationUtil;
 import eu.etaxonomy.taxeditor.TaxonomicEditorPlugin;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.util.ApplicationUtil;
 
 /**
  * This class is a utility class for updating the editor from a p2 update site,
@@ -146,7 +143,7 @@ public class P2Util {
      *
      */
     public static void checkForUpdates() {
-        // the main job which performs the update
+
         Job updateJob = new Job("Update Job") {
             @Override
             public IStatus run(IProgressMonitor monitor) {
@@ -162,6 +159,21 @@ public class P2Util {
      */
     private static IStatus doCheckForUpdates(IProgressMonitor monitor) {
 
+     // force refresh all the caches before
+        IMetadataRepositoryManager metaManager = ProvUI.getMetadataRepositoryManager(ProvisioningUI.getDefaultUI().getSession());
+        URI[] repos = metaManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
+        for(URI repo : repos) {
+            try {
+                metaManager.refreshRepository(repo, monitor);
+            } catch (ProvisionException pe) {
+                IStatus errorStatus = new Status(IStatus.ERROR, TaxonomicEditorPlugin.PLUGIN_ID,
+                        "Error occured while reloading cache.", pe);
+
+            } catch (OperationCanceledException oce) {
+                IStatus errorStatus = new Status(IStatus.ERROR, TaxonomicEditorPlugin.PLUGIN_ID,
+                        "Error occured while reloading cache.", oce);
+            }
+        }
         BundleContext bundleContext = TaxonomicEditorPlugin.getContext();
         ServiceReference reference = bundleContext.getServiceReference(IProvisioningAgent.SERVICE_NAME);
         if (reference == null) {
diff --git a/eu.etaxonomy.taxeditor.application/src/main/resources/log4j.properties b/eu.etaxonomy.taxeditor.application/src/main/resources/log4j.properties
deleted file mode 100644 (file)
index c7c943e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-### ************ APPENDER ***********************************###\r
-\r
-### direct log messages to stdout ###\r
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender\r
-log4j.appender.stdout.Target=System.out\r
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n\r
-\r
-### direct messages to file hibernate.log ###\r
-log4j.appender.file=org.apache.log4j.FileAppender\r
-log4j.appender.file.File=taxeditor.log\r
-log4j.appender.file.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n\r
-\r
-### ************* LOG LEVELS *********************************###\r
-\r
-### set log levels - for more verbose logging change 'info' to 'debug' ###\r
-### levels: error, warn, debug, info\r
-log4j.rootLogger=INFO, stdout\r
-\r
-### set directory-specific levels below\r
-\r
-### basic level for editor directory\r
-log4j.logger.eu.etaxonomy.taxeditor.editor = WARN, stdout \r
-\r
-log4j.logger.eu.etaxonomy.taxeditor.editor.handler = DEBUG, stdout\r
-\r
-### log level for conversation handler\r
-#log4j.logger.eu.etaxonomy.cdm.api.application = DEBUG, stdout\r
index 5ff90b230e62a2d2a915585ed2f290bdcb34c824..3bf936df7eae8e26609924a9acfdfa042f790cce 100644 (file)
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
-       <classpathentry including="**/*.java" kind="src" path="src/main/java"/>\r
-       <classpathentry including="**/*.java" kind="src" path="src/test/java"/>\r
-       <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
+       <classpathentry including="**/*.java" kind="src" path="src/test/java"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
index 60ba65373bc6ef60f733df4ef9d8e4a57d4517ad..43330c93b8f80a170e3ba508eeffc13ae88d8680 100644 (file)
@@ -21,7 +21,8 @@ Require-Bundle: org.eclipse.ui,
  eu.etaxonomy.taxeditor.cdmlib
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.core.runtime,
+Import-Package: eu.etaxonomy.taxeditor.editor,
+ org.eclipse.core.runtime,
  org.eclipse.equinox.app,
  org.eclipse.jface.text,
  org.eclipse.jface.text.presentation,
index 08876fef01d643cd5a2869b83dd2472903ec86aa..e1208b01c5083936c05f265642af25d8bcf989df 100644 (file)
@@ -1,12 +1,12 @@
 // $Id$
 /**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
+ * Copyright (C) 2007 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
 package eu.etaxonomy.taxeditor.annotatedlineeditor;
 
 import java.util.Iterator;
@@ -29,6 +29,7 @@ import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -47,290 +48,293 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  */
 public class AnnotatedLineEditor extends TextEditor implements IConversationEnabled, IPostOperationEnabled {
 
-       protected ConversationHolder conversation;
-
-       private IEntityPersistenceService persistenceService;
-       protected ILineDisplayStrategy lineDisplayStrategy;
-
-
-       /**
-        * <p>Constructor for AnnotatedLineEditor.</p>
-        *
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        */
-       public AnnotatedLineEditor(ConversationHolder conversation) {
-               this.conversation = conversation;
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.editors.text.TextEditor#doSetInput(org.eclipse.ui.IEditorInput)
-        */
-       /** {@inheritDoc} */
-       @Override
-       protected void doSetInput(IEditorInput input) throws CoreException {
-
-               AnnotatedLineDocumentProvider provider = new AnnotatedLineDocumentProvider(input);
-
-               provider.setLineDisplayStrategy(lineDisplayStrategy, input);
-               setDocumentProvider(provider);
-
-               super.doSetInput(input);
-       }
-
-       /**
-        * <p>Setter for the field <code>persistenceService</code>.</p>
-        *
-        * @param persistenceService a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService} object.
-        */
-       protected void setPersistenceService(
-                       IEntityPersistenceService persistenceService) {
-               this.persistenceService = persistenceService;
-       }
-
-       /**
-        * <p>Getter for the field <code>persistenceService</code>.</p>
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService} object.
-        */
-       protected IEntityPersistenceService getPersistenceService() {
-               return persistenceService;
-       }
-
-       /**
-        * <p>Setter for the field <code>lineDisplayStrategy</code>.</p>
-        *
-        * @param lineDisplayStrategy a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.ILineDisplayStrategy} object.
-        */
-       protected void setLineDisplayStrategy(
-                       ILineDisplayStrategy lineDisplayStrategy) {
-               this.lineDisplayStrategy = lineDisplayStrategy;
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       protected ISourceViewer createSourceViewer(Composite parent,
-                       IVerticalRuler ruler, int styles) {
-
-               fAnnotationAccess= getAnnotationAccess();
-               fOverviewRuler= createOverviewRuler(getSharedColors());
-               LineSelectionViewer viewer = new LineSelectionViewer(parent, ruler, getOverviewRuler(),
-                                               isOverviewRulerVisible(), styles);
-//                                             isOverviewRulerVisible(), styles | SWT.WRAP);
-               getSourceViewerDecorationSupport(viewer);
-
-               return viewer;
-       }
-
-       /**
-        * Create an annotated line with an "empty" entity, i.e. using the editor
-        * input's default entity type and a zero-length title cache.
-        *
-        * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
-        */
-       public LineAnnotation createAnnotatedLineNewObject() {
-
-               // Create new object
-
-               AnnotatedLineDocumentProvider documentProvider = (AnnotatedLineDocumentProvider) getDocumentProvider();
-               IEntityCreator entityCreator = documentProvider.getEntityCreator(getEditorInput());
-               Object entity = entityCreator.createEntity(null);
-
-               LineAnnotation annotation = createAnnotatedLine(entity);
-               if (annotation != null) {
-                       annotation.markAsNew(true);
-               }
-               return annotation;
-       }
-
-       /**
-        * Create an annotated line, first creating an entity of type "key" - this key
-        * must be recognized by the editor's entity creator.
-        *
-        * @param key a {@link java.lang.Object} object.
-        * @param titleCache a {@link java.lang.String} object.
-        * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
-        */
-       public LineAnnotation createAnnotatedLineNewObject(Object key, String titleCache) {
-
-
-
-               // Create new object
-               Object entity = ((AnnotatedLineDocumentProvider) getDocumentProvider()).
-                                                       getEntityCreator(getEditorInput()).createEntity(key, titleCache);
-               // checks if the creator also saves the entity (in a different conversation), in which case
-               // we need to bind back this editors conversation
-               // we also need to reload the entity because the conversation used to
-               // to create / save the entity may have been closed
-               if(entity != null && ((AnnotatedLineDocumentProvider) getDocumentProvider()).getEntityCreator(getEditorInput()).savesEntity()) {
-                       getConversationHolder().bind();
-                       Object object = CdmStore.getService(IOccurrenceService.class).load(((CdmBase)entity).getUuid());
-                       entity = HibernateProxyHelper.deproxy(object);
-               }
-
-               if(entity == null) {
-                       return null;
-               }
-               LineAnnotation annotation = createAnnotatedLine(entity);
-               if (annotation != null) {
-                       annotation.markAsNew(true);
-               }
-
-               return annotation;
-
-       }
-
-         @Override
-         public boolean isDirty() {
-               return super.isDirty();
-         }
-
-       /**
-        * Creates an annotated line at the end of the document. The annotation contains the entity.
-        *
-        * @param entity a {@link java.lang.Object} object.
-        * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
-        */
-       public LineAnnotation createAnnotatedLine(Object entity) {
-
-               IEditorInput input = getEditorInput();
-               AnnotatedLineDocumentProvider provider = (AnnotatedLineDocumentProvider) getDocumentProvider();
-
-               LineAnnotation annotation = null;
-               try {
-                       annotation = provider.createAnnotatedLine(input, entity);
-
-                       // Jump to new line
-                       IAnnotationModel model = provider.getAnnotationModel(input);
-                       if(model != null){
-                               int start= model.getPosition(annotation).getOffset();
-                               selectAndReveal(start, 0);
-                       }
-
-               } catch (BadLocationException e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               }
-               return annotation;
-       }
-
-       /**
-        * <p>removeAnnotatedLine</p>
-        *
-        * @param lineno a int.
-        */
-       public void removeAnnotatedLine(int lineno) {
-               ((AnnotatedLineDocumentProvider) getDocumentProvider()).removeAnnotatedLine(lineno);
-       }
-
-       /**
-        * <p>removeAnnotatedLine</p>
-        *
-        * @param annotation a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
-        */
-       public void removeAnnotatedLine(LineAnnotation annotation) {
-               ((AnnotatedLineDocumentProvider) getDocumentProvider()).removeAnnotatedLine(annotation);
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.texteditor.AbstractTextEditor#doSave(org.eclipse.core.runtime.IProgressMonitor)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void doSave(IProgressMonitor progressMonitor) {
-               if (getConversationHolder() != null) {
-                       if( ! getConversationHolder().isBound()){
-                               getConversationHolder().bind();
-                       }
-                       super.doSave(progressMonitor);
-                       getConversationHolder().commit(true);
-               } else {
-                       super.doSave(progressMonitor);
-               }
-               firePropertyChange(PROP_DIRTY);
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.texteditor.AbstractTextEditor#setFocus()
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void setFocus() {
-               super.setFocus();
-               if (getConversationHolder() != null) {
-                       getConversationHolder().bind();
-               }
-               PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setFocus();
-               // TODO pass focus to underlying widgets
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
-        */
-       /**
-        * <p>getConversationHolder</p>
-        *
-        * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        */
-       @Override
+    protected ConversationHolder conversation;
+
+    private IEntityPersistenceService persistenceService;
+    protected ILineDisplayStrategy lineDisplayStrategy;
+
+
+    /**
+     * <p>Constructor for AnnotatedLineEditor.</p>
+     *
+     * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+     */
+    public AnnotatedLineEditor(ConversationHolder conversation) {
+        this.conversation = conversation;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.editors.text.TextEditor#doSetInput(org.eclipse.ui.IEditorInput)
+     */
+    /** {@inheritDoc} */
+    @Override
+    protected void doSetInput(IEditorInput input) throws CoreException {
+
+        AnnotatedLineDocumentProvider provider = new AnnotatedLineDocumentProvider(input);
+
+        provider.setLineDisplayStrategy(lineDisplayStrategy, input);
+        setDocumentProvider(provider);
+
+        super.doSetInput(input);
+    }
+
+    /**
+     * <p>Setter for the field <code>persistenceService</code>.</p>
+     *
+     * @param persistenceService a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService} object.
+     */
+    protected void setPersistenceService(
+            IEntityPersistenceService persistenceService) {
+        this.persistenceService = persistenceService;
+    }
+
+    /**
+     * <p>Getter for the field <code>persistenceService</code>.</p>
+     *
+     * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService} object.
+     */
+    protected IEntityPersistenceService getPersistenceService() {
+        return persistenceService;
+    }
+
+    /**
+     * <p>Setter for the field <code>lineDisplayStrategy</code>.</p>
+     *
+     * @param lineDisplayStrategy a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.ILineDisplayStrategy} object.
+     */
+    protected void setLineDisplayStrategy(
+            ILineDisplayStrategy lineDisplayStrategy) {
+        this.lineDisplayStrategy = lineDisplayStrategy;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected ISourceViewer createSourceViewer(Composite parent,
+            IVerticalRuler ruler, int styles) {
+
+        fAnnotationAccess= getAnnotationAccess();
+        fOverviewRuler= createOverviewRuler(getSharedColors());
+        LineSelectionViewer viewer = new LineSelectionViewer(parent, ruler, getOverviewRuler(),
+                isOverviewRulerVisible(), styles);
+        //                                             isOverviewRulerVisible(), styles | SWT.WRAP);
+        getSourceViewerDecorationSupport(viewer);
+
+        return viewer;
+    }
+
+    /**
+     * Create an annotated line with an "empty" entity, i.e. using the editor
+     * input's default entity type and a zero-length title cache.
+     *
+     * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
+     */
+    public LineAnnotation createAnnotatedLineNewObject() {
+
+        // Create new object
+
+        AnnotatedLineDocumentProvider documentProvider = (AnnotatedLineDocumentProvider) getDocumentProvider();
+        IEntityCreator entityCreator = documentProvider.getEntityCreator(getEditorInput());
+        Object entity = entityCreator.createEntity(null);
+
+        LineAnnotation annotation = createAnnotatedLine(entity);
+        if (annotation != null) {
+            annotation.markAsNew(true);
+        }
+        return annotation;
+    }
+
+    /**
+     * Create an annotated line, first creating an entity of type "key" - this key
+     * must be recognized by the editor's entity creator.
+     *
+     * @param key a {@link java.lang.Object} object.
+     * @param titleCache a {@link java.lang.String} object.
+     * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
+     */
+    public LineAnnotation createAnnotatedLineNewObject(Object key, String titleCache) {
+
+
+
+        // Create new object
+        Object entity = ((AnnotatedLineDocumentProvider) getDocumentProvider()).
+                getEntityCreator(getEditorInput()).createEntity(key, titleCache);
+        // checks if the creator also saves the entity (in a different conversation), in which case
+        // we need to bind back this editors conversation
+        // we also need to reload the entity because the conversation used to
+        // to create / save the entity may have been closed
+        if(entity != null && ((AnnotatedLineDocumentProvider) getDocumentProvider()).getEntityCreator(getEditorInput()).savesEntity()) {
+            getConversationHolder().bind();
+            Object object = CdmStore.getService(IOccurrenceService.class).load(((CdmBase)entity).getUuid());
+            entity = HibernateProxyHelper.deproxy(object);
+        }
+
+        if(entity == null) {
+            return null;
+        }
+        LineAnnotation annotation = createAnnotatedLine(entity);
+        if (annotation != null) {
+            annotation.markAsNew(true);
+        }
+
+        return annotation;
+
+    }
+
+    @Override
+    public boolean isDirty() {
+        return super.isDirty();
+    }
+
+    /**
+     * Creates an annotated line at the end of the document. The annotation contains the entity.
+     *
+     * @param entity a {@link java.lang.Object} object.
+     * @return a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
+     */
+    public LineAnnotation createAnnotatedLine(Object entity) {
+
+        IEditorInput input = getEditorInput();
+        AnnotatedLineDocumentProvider provider = (AnnotatedLineDocumentProvider) getDocumentProvider();
+
+        LineAnnotation annotation = null;
+        try {
+            annotation = provider.createAnnotatedLine(input, entity);
+
+            // Jump to new line
+            IAnnotationModel model = provider.getAnnotationModel(input);
+            if(model != null){
+                int start= model.getPosition(annotation).getOffset();
+                selectAndReveal(start, 0);
+            }
+
+        } catch (BadLocationException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return annotation;
+    }
+
+    /**
+     * <p>removeAnnotatedLine</p>
+     *
+     * @param lineno a int.
+     */
+    public void removeAnnotatedLine(int lineno) {
+        ((AnnotatedLineDocumentProvider) getDocumentProvider()).removeAnnotatedLine(lineno);
+    }
+
+    /**
+     * <p>removeAnnotatedLine</p>
+     *
+     * @param annotation a {@link eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation} object.
+     */
+    public void removeAnnotatedLine(LineAnnotation annotation) {
+        ((AnnotatedLineDocumentProvider) getDocumentProvider()).removeAnnotatedLine(annotation);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.texteditor.AbstractTextEditor#doSave(org.eclipse.core.runtime.IProgressMonitor)
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void doSave(IProgressMonitor progressMonitor) {
+        if (getConversationHolder() != null) {
+            if( ! getConversationHolder().isBound()){
+                getConversationHolder().bind();
+            }
+            super.doSave(progressMonitor);
+            getConversationHolder().commit(true);
+        } else {
+            super.doSave(progressMonitor);
+        }
+        firePropertyChange(PROP_DIRTY);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.texteditor.AbstractTextEditor#setFocus()
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void setFocus() {
+        super.setFocus();
+        if (getConversationHolder() != null) {
+            getConversationHolder().bind();
+        }
+        ((AbstractBulkEditorInput)getEditorInput()).bind();
+        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setFocus();
+        // TODO pass focus to underlying widgets
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
+     */
+    /**
+     * <p>getConversationHolder</p>
+     *
+     * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+     */
+    @Override
     public ConversationHolder getConversationHolder() {
-               return conversation;
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
-        */
-       /** {@inheritDoc} */
-       @Override
+        return conversation;
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
+     */
+    /** {@inheritDoc} */
+    @Override
     public void update(CdmDataChangeMap changeEvents) {}
 
-       /**
-        * Refreshes text in all lines.
-        */
-       protected void refreshLineDisplay() {
-               IDocumentProvider provider = getDocumentProvider();
-               IEditorInput input = getEditorInput();
-               IAnnotationModel model = provider.getAnnotationModel(input);
-               Iterator iter = getDocumentProvider().getAnnotationModel(getEditorInput()).getAnnotationIterator();
-               while (iter.hasNext()) {
-                       Object next = iter.next();
-                       if (next instanceof LineAnnotation) {
-                               LineAnnotation annotation = (LineAnnotation) next;
-                               ((AnnotatedLineDocumentProvider) getDocumentProvider()).
-                                               updateLineFromAnnotation(annotation);
-                       }
-               }
-       }
-
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.operations.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
-        */
-       /** {@inheritDoc} */
-       @Override
+    /**
+     * Refreshes text in all lines.
+     */
+    protected void refreshLineDisplay() {
+        IDocumentProvider provider = getDocumentProvider();
+        IEditorInput input = getEditorInput();
+        IAnnotationModel model = provider.getAnnotationModel(input);
+        Iterator iter = getDocumentProvider().getAnnotationModel(getEditorInput()).getAnnotationIterator();
+        while (iter.hasNext()) {
+            Object next = iter.next();
+            if (next instanceof LineAnnotation) {
+                LineAnnotation annotation = (LineAnnotation) next;
+                ((AnnotatedLineDocumentProvider) getDocumentProvider()).
+                updateLineFromAnnotation(annotation);
+            }
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.operations.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
+     */
+    /** {@inheritDoc} */
+    @Override
     public boolean postOperation(CdmBase objectAffectedByOperation) {
-               refreshLineDisplay();
-
-               return true;
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.editors.text.TextEditor#dispose()
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void dispose() {
-               super.dispose();
-               conversation.close();
-       }
-
-       /**
-        * <p>onComplete</p>
-        *
-        * @return a boolean.
-        */
-       @Override
+        refreshLineDisplay();
+
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.editors.text.TextEditor#dispose()
+     */
+    /** {@inheritDoc} */
+    @Override
+    public void dispose() {
+        super.dispose();
+        conversation.close();
+        ((AbstractBulkEditorInput)getEditorInput()).dispose();
+    }
+
+    /**
+     * <p>onComplete</p>
+     *
+     * @return a boolean.
+     */
+    @Override
     public boolean onComplete() {
-               // TODO Auto-generated method stub
-               return false;
-       }
+        // TODO Auto-generated method stub
+        return false;
+    }
+
 
 }
index c2978874b1a990ce1ac9e37636fe71b87580c3c0..8db6230ba7d0492fa4301d8d5824950a8615ec3c 100644 (file)
@@ -34,9 +34,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IViewPart;
 import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.texteditor.ITextEditorActionConstants;
 
 import eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineDocumentProvider;
@@ -44,7 +42,6 @@ import eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotationModel;
 import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
-import eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView;
 import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
@@ -201,6 +198,7 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                        displayWarningDialog();
                        isInitialFocus = false;
                }
+               super.setFocus();
        }
 
        /**
@@ -286,11 +284,11 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
        @Override
        public void doSave(IProgressMonitor progressMonitor) {
            isDirty = false;
-          
+
            super.doSave(progressMonitor);
-           
+
            selectFirstItem();
-          
+
                getSourceViewer().getTextWidget().setFocus();
 
        }
@@ -323,7 +321,7 @@ public class BulkEditor extends AnnotatedLineEditor implements IPartContentHasDe
                        }
                        conversation.commit();
                        conversation.clear();
-                       
+
                        getEditorInput().performSearch(query);
 
                        refresh();
index 041359836ef7622d6406aa264a7cd826bf50e314..15ca691727c485428c2316c9648b0e3dac73e96a 100644 (file)
@@ -1,34 +1,26 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
 package eu.etaxonomy.taxeditor.bulkeditor.handler;
 
-import java.util.Iterator;
-import java.util.Set;
-import java.util.UUID;
-
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.IWorkbenchPage;
 
+import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IAgentService;
 import eu.etaxonomy.cdm.api.service.IGroupService;
@@ -38,11 +30,8 @@ import eu.etaxonomy.cdm.api.service.IReferenceService;
 import eu.etaxonomy.cdm.api.service.ITaxonService;
 import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator;
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
-import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
@@ -50,17 +39,12 @@ import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.Synonym;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.cdm.persistence.dao.hibernate.HibernateBeanInitializer;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotation;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.LineAnnotationModel;
 import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
 import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
-import eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 
@@ -76,84 +60,75 @@ public class DeleteHandler extends AbstractHandler {
         */
        @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
-               
+
                ISelection selection = HandlerUtil.getCurrentSelection(event);
-               
+
                IEditorPart editor = HandlerUtil.getActiveEditor(event);
-               
+
                IEditorInput input = editor.getEditorInput();
-               
+
                if((input instanceof IEntityPersistenceService) && (selection instanceof IStructuredSelection)){
-                       
-                       
+
+
                        IDocumentProvider provider = ((BulkEditor) editor).getDocumentProvider();
-                       LineAnnotationModel model = 
+                       LineAnnotationModel model =
                                        (LineAnnotationModel) provider.getAnnotationModel(input);
-                       
-                       
+
+
                        IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-                       
+
                        IEntityPersistenceService persistenceService = (IEntityPersistenceService) input;
-                       
-                       
+
+
                        for(Object object : structuredSelection.toList()){
-                               
+
                                LineAnnotation annotation = (LineAnnotation) model.getAnnotation(object);
-                               DeleteResult result = new DeleteResult();       
+                               DeleteResult result = new DeleteResult();
                                //result.setError();
                                try {
                                        ICdmApplicationConfiguration controller;
-                                       controller = (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration();
-                                       //persistenceService.delete(object);
+                                       controller = CdmStore.getCurrentApplicationConfiguration();
+
                                        if (object instanceof SpecimenOrObservationBase){
-                                               
                                                IOccurrenceService service = controller.getOccurrenceService();
-                                               SpecimenOrObservationBase persistedObject = service.load(((SpecimenOrObservationBase) object).getUuid());
-                                               if (persistedObject != null){
-                                                       result = service.delete(persistedObject);
-                                               } 
+                                               if (object != null){
+                                                       result = service.delete(((SpecimenOrObservationBase) object).getUuid());
+                                               }
                                        } else if (object instanceof Reference){
                                                IReferenceService service = controller.getReferenceService();
-                                               
-                                               Reference persistedObject = service.load(((Reference) object).getUuid());
-                                               if (persistedObject != null){
-                                                       result = service.delete(persistedObject);
+                                               if (object != null){
+                                                       result = service.delete(((Reference) object).getUuid());
                                                }
-                                               
+
                                        } else if (object instanceof Group){
                                                IGroupService service = controller.getGroupService();
-                                               Group persistedObject = service.load(((Group) object).getUuid());
-                                               if (persistedObject != null){
-                                                       result = service.delete(persistedObject);
+                                               if (object != null){
+                                                       result = service.delete(((Group) object).getUuid());
                                                }
                                        }else if (object instanceof User){
                                                IUserService service = controller.getUserService();
-                                               User persistedObject = service.load(((User) object).getUuid());
-                                               if (persistedObject != null){
-                                                       result = service.delete(persistedObject);
+                                               if (object != null){
+                                                       result = service.delete(((User) object).getUuid());
                                                }
                                        } else if (object instanceof TaxonNameBase){
                                                INameService service = controller.getNameService();
-                                               TaxonNameBase name = service.load(((TaxonNameBase) object).getUuid());
-                                               if (name != null){
+                                               if (object != null){
                                                        NameDeletionConfigurator config = new NameDeletionConfigurator();
-                                                       
-                                                       result = service.delete(name.getUuid(), config);
-                                               } 
+                                                       result = service.delete(((TaxonNameBase) object).getUuid(), config);
+                                               }
                                        } else if (object instanceof TaxonBase){
                                                ITaxonService service = controller.getTaxonService();
-                                               TaxonBase taxonBase = service.load(((TaxonBase) object).getUuid());
-                                               if (taxonBase != null){
+                                               if (object != null){
                                                        if (object instanceof Taxon){
                                                                result = service.deleteTaxon(((TaxonBase) object).getUuid(), null, null);
                                                        }else{
-                                                               result = service.deleteSynonym((Synonym)object, null);
+                                                               result = service.deleteSynonym(((Synonym)object).getUuid(), null);
                                                        }
                                                }
                                        } else if (object instanceof TeamOrPersonBase){
                                                IAgentService service = controller.getAgentService();
-                                               TeamOrPersonBase teamOrPerson = (TeamOrPersonBase)service.load(((TeamOrPersonBase) object).getUuid());
-                                               result = service.delete((TeamOrPersonBase)object);
+                                               //TeamOrPersonBase teamOrPerson = (TeamOrPersonBase)service.load(((TeamOrPersonBase) object).getUuid());
+                                               result = service.delete(((TeamOrPersonBase)object).getUuid());
                                        }
                                } catch (Exception e){
                                        MessagingUtils.errorDialog("Exception occured. Delete not possible", getClass(), e.getMessage(), TaxeditorBulkeditorPlugin.PLUGIN_ID, null, true);
@@ -169,12 +144,11 @@ public class DeleteHandler extends AbstractHandler {
                                                                message+= ", ";
                                                        }
                                                }
-                                               
-                                               
+
+
                                                MessagingUtils.messageDialog("Delete not possible", getClass(), result.getExceptions().toString(), null);
                                        }else{
                                                MessagingUtils.messageDialog("Delete not possible", getClass(), "The object could not be deleted. An exception occured.", null);
-                                               
                                        }
                                }
                                if (result.isOk() ){
@@ -184,11 +158,11 @@ public class DeleteHandler extends AbstractHandler {
                                        }
 
                                }
-                               
-                       }                               
+
+                       }
                }
-       
-               
+
+
                return null;
        }
 
index 82cd233202777608632aee5d212f9fbc00bf7ee6..0c22bd9bd0dd58da6dda2cad74262458cf2ac08b 100644 (file)
@@ -14,6 +14,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -34,6 +35,7 @@ import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider;
 import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.CdmBaseSortProvider;
 import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.TitleCacheComparator;
 import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
+import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -45,7 +47,8 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @version 1.0
  * @param <T>
  */
-public abstract class AbstractBulkEditorInput<T extends ICdmBase> implements IEditorInput, IEntityPersistenceService<T> {
+public abstract class AbstractBulkEditorInput<T extends ICdmBase> extends CdmEntitySessionInput implements IEditorInput ,
+    IEntityPersistenceService<T> {
 
        private UUID entityUuid;
 
@@ -55,6 +58,10 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> implements IEd
 
        private static Class serviceClass;
 
+       public AbstractBulkEditorInput() {
+
+       }
+
        /**
         * <p>NewInstance</p>
         *
@@ -304,9 +311,27 @@ public abstract class AbstractBulkEditorInput<T extends ICdmBase> implements IEd
        /**
         * @return
         */
-       public List<?> getModel() {
+       public List<T> getModel() {
                return model;
        }
 
 
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
+     */
+    @Override
+    public   List<T> getRootEntities() {
+        return getModel();
+    }
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
+     */
+    @Override
+    public Map<Object, List<String>> getPropertyPathsMap() {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }
index 2a739544f0deeab50984dc606b4db9d09ca8d4d0..6e52be2699e824f72e76cce95fc11db75a67aef4 100644 (file)
@@ -1,23 +1,18 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
-import java.util.Arrays;
 import java.util.List;
-import java.util.UUID;
-
-import org.eclipse.core.commands.ExecutionException;
 
 import eu.etaxonomy.cdm.api.service.IAgentService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
-import eu.etaxonomy.cdm.api.service.exception.DataChangeNoRollbackException;
 import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
 import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.agent.Person;
@@ -29,7 +24,6 @@ import eu.etaxonomy.cdm.strategy.merge.MergeException;
 import eu.etaxonomy.cdm.strategy.merge.MergeMode;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider;
-import eu.etaxonomy.taxeditor.bulkeditor.handler.MergeGroupHandler;
 import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.AgentCreator;
 import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.IdentifiableEntitySortProvider;
 import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
@@ -47,13 +41,13 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase> {
 
        /**
-        * 
+        *
         */
        private static final long serialVersionUID = 3387950621617078479L;
 
        /** Constant <code>ID="bulkeditor.input.author"</code> */
        public static final String ID = "bulkeditor.input.author";
-       
+
        private static AgentEditorInput instance;
 
        /**
@@ -64,7 +58,7 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
        public static String getID() {
                return ID;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.IEditorInput#getName()
         */
@@ -73,7 +67,8 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
         *
         * @return a {@link java.lang.String} object.
         */
-       public String getName() {
+       @Override
+    public String getName() {
                return BulkEditorInputType.AGENT.label;
        }
 
@@ -85,7 +80,8 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
         *
         * @return a {@link java.lang.String} object.
         */
-       public String getToolTipText() {
+       @Override
+    public String getToolTipText() {
                return getName();
        }
 
@@ -109,7 +105,7 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
        public boolean isMergingEnabled() {
                return true;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInput#isMergingEnabled()
         */
@@ -118,7 +114,7 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
        public boolean isConvertingEnabled() {
                return true;
        }
-       
+
        /** {@inheritDoc} */
        @Override
     public boolean merge(TeamOrPersonBase entity, TeamOrPersonBase mergeTarget) {
@@ -126,7 +122,7 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
                        try {
                                IMergeStrategy strategy = DefaultMergeStrategy.NewInstance(Person.class);
                                strategy.setMergeMode("institutionalMemberships", MergeMode.FIRST);
-                               CdmStore.getCommonService().merge((IMergable)mergeTarget, (IMergable)entity, strategy);                         
+                               CdmStore.getCommonService().merge((IMergable)mergeTarget, (IMergable)entity, Person.class);
                        } catch (MergeException e) {
                                MessagingUtils.errorDialog("Bulk Editor Merge Error",
                                                this,
@@ -144,39 +140,39 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
        public List<TeamOrPersonBase> listEntities(IIdentifiableEntityServiceConfigurator configurator) {
                return CdmStore.getSearchManager().findTeamOrPersons(configurator);
        }
-       
-       /** {@inheritDoc} 
+
+       /** {@inheritDoc}
        @Override
        public AgentBase loadEntity(UUID uuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{}); 
+               List<String> propertyPaths = Arrays.asList(new String[]{});
                return CdmStore.getService(IAgentService.class).load(uuid, propertyPaths);
        }*/
 
-       
+
        public boolean delete(AgentBase entity) throws ReferencedObjectUndeletableException  {
-               
-                       return CdmStore.getService(IAgentService.class).delete(entity) != null;                 
-               
-       }
 
-       /** {@inheritDoc} */
-       public boolean save(AgentBase entity) {
-               
-               return CdmStore.getService(IAgentService.class).saveOrUpdate(entity) != null;
+                       return CdmStore.getService(IAgentService.class).delete(entity) != null;
+
        }
 
+//     /** {@inheritDoc} */
+//     public boolean save(AgentBase entity) {
+//
+//             return CdmStore.getService(IAgentService.class).saveOrUpdate(entity) != null;
+//     }
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getSortProviders()
         */
        @Override
        public List<IBulkEditorSortProvider<TeamOrPersonBase>> getSortProviders() {
                List<IBulkEditorSortProvider<TeamOrPersonBase>> sortProviders = super.getSortProviders();
-               
+
                sortProviders.add(0, new IdentifiableEntitySortProvider<TeamOrPersonBase>());
-               
+
                return sortProviders;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#createEntityCreator()
         */
@@ -187,7 +183,11 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
 
        @Override
        public boolean save(TeamOrPersonBase entity) {
-               return CdmStore.getService(IAgentService.class).saveOrUpdate(entity) != null;
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               return CdmStore.getService(IAgentService.class).merge(entity) != null;
+           } else {
+               return CdmStore.getService(IAgentService.class).saveOrUpdate(entity) != null;
+           }
        }
 
        @Override
@@ -197,4 +197,13 @@ public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase>
                return false;
        }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
+
+
 }
index 98724faa802a6a0942d057e5507524cf43dc5873..ce95b2ffea4a843f76d55230bd18f98c74f4548d 100644 (file)
@@ -1,18 +1,16 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
-import java.util.Arrays;
 import java.util.List;
-import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.IGroupService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
@@ -30,9 +28,9 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
 
        public static final String ID = "bulkeditor.input.group";
-       
+
        private static GroupEditorInput instance;
-       
+
        /**
         * @return the instance
         */
@@ -42,7 +40,7 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
                }
                return instance;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.IEditorInput#getName()
         */
@@ -64,7 +62,11 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
         */
        @Override
        public boolean save(Group entity) {
-               return CdmStore.getService(IGroupService.class).saveOrUpdate(entity) != null;
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               return CdmStore.getService(IGroupService.class).merge(entity) != null;
+           } else {
+               return CdmStore.getService(IGroupService.class).saveOrUpdate(entity) != null;
+           }
        }
 
        /* (non-Javadoc)
@@ -86,10 +88,10 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
 
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#loadEntity(java.util.UUID)
-        
+
        @Override
        protected Group loadEntity(UUID entityUuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{}); 
+               List<String> propertyPaths = Arrays.asList(new String[]{});
                return CdmStore.getService(IGroupService.class).load(entityUuid, propertyPaths);
        }
 */
@@ -100,7 +102,7 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
        protected IEntityCreator<Group> createEntityCreator() {
                return new GroupCreator();
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getText(eu.etaxonomy.cdm.model.common.ICdmBase)
         */
@@ -109,6 +111,14 @@ public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
                return entity.getName();
        }
 
-       
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
+
+
 
 }
index c9298f93bd147e80e77643c98f5c56409395dedc..18f5ff8e1e1d6b92ad965aa37dd7a27d228835fa 100644 (file)
@@ -1,22 +1,19 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
-import java.util.Arrays;
 import java.util.List;
-import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.INameService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
-import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider;
@@ -34,14 +31,14 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
 
        /**
-        * 
+        *
         */
        private static final long serialVersionUID = -3085029575759626823L;
        private static NameEditorInput instance;
 
        /** Constant <code>ID="bulkeditor.input.name"</code> */
        public static final String ID = "bulkeditor.input.name";
-       
+
        /**
         * <p>Getter for the field <code>instance</code>.</p>
         *
@@ -53,7 +50,7 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
                }
                return instance;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.IEditorInput#getName()
         */
@@ -62,7 +59,8 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
         *
         * @return a {@link java.lang.String} object.
         */
-       public String getName() {
+       @Override
+    public String getName() {
                return BulkEditorInputType.NAME.label;
        }
 
@@ -74,7 +72,8 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
         *
         * @return a {@link java.lang.String} object.
         */
-       public String getToolTipText() {
+       @Override
+    public String getToolTipText() {
                return getName();
        }
 
@@ -102,22 +101,28 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
                return CdmStore.getSearchManager().findNames(configurator);
        }
 
-       /** {@inheritDoc} 
+       /** {@inheritDoc}
        @Override
        public TaxonNameBase loadEntity(UUID uuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{}); 
+               List<String> propertyPaths = Arrays.asList(new String[]{});
                return CdmStore.getService(INameService.class).load(uuid, propertyPaths);
        }
 */
-       /** {@inheritDoc} 
+       /** {@inheritDoc}
         **/
-       public boolean delete(TaxonNameBase entity)  {
+       @Override
+    public boolean delete(TaxonNameBase entity)  {
                return CdmStore.getService(INameService.class).delete(entity) != null;
        }
 
        /** {@inheritDoc} */
-       public boolean save(TaxonNameBase entity) {
-               return CdmStore.getService(INameService.class).saveOrUpdate(entity) != null;
+       @Override
+    public boolean save(TaxonNameBase entity) {
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               return CdmStore.getService(INameService.class).merge(entity) != null;
+           } else {
+               return CdmStore.getService(INameService.class).saveOrUpdate(entity) != null;
+           }
        }
 
        /* (non-Javadoc)
@@ -134,12 +139,12 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
        @Override
        public List<IBulkEditorSortProvider<TaxonNameBase>> getSortProviders() {
                List<IBulkEditorSortProvider<TaxonNameBase>> sortProviders = super.getSortProviders();
-               
+
                sortProviders.add(0, new IdentifiableEntitySortProvider<TaxonNameBase>());
-               
+
                return sortProviders;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getTypeText(java.lang.Object)
         */
@@ -150,7 +155,7 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
                }
                return super.getTypeText(entity);
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getText(eu.etaxonomy.cdm.model.common.ICdmBase)
         */
@@ -159,5 +164,13 @@ public class NameEditorInput extends AbstractBulkEditorInput<TaxonNameBase> {
                return (entity).getFullTitleCache();
        }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
+
 
 }
index a317feca144f1e561b25e3eaadc674c90650745d..ceaa1e6db4cd79e3dc0816c5b982fc4d9646547c 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -30,7 +30,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class NameRelationshipEditorInput extends AbstractBulkEditorInput<NameRelationship> {
 
        /**
-        * 
+        *
         */
        private static final long serialVersionUID = -7453923697752787687L;
 
@@ -50,7 +50,7 @@ public class NameRelationshipEditorInput extends AbstractBulkEditorInput<NameRel
                }
                return instance;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.IEditorInput#getName()
         */
@@ -105,7 +105,7 @@ public class NameRelationshipEditorInput extends AbstractBulkEditorInput<NameRel
        /** {@inheritDoc} */
        @Override
        protected NameRelationship loadEntity(UUID entityUuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{}); 
+               List<String> propertyPaths = Arrays.asList(new String[]{});
                return null; // CdmStore.getNameService().load(entityUuid, propertyPaths);
        }
 
@@ -117,7 +117,7 @@ public class NameRelationshipEditorInput extends AbstractBulkEditorInput<NameRel
                MessagingUtils.notImplementedMessage(getClass());
                return null;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getTypeText(java.lang.Object)
         */
@@ -126,8 +126,16 @@ public class NameRelationshipEditorInput extends AbstractBulkEditorInput<NameRel
                if(entity instanceof NameRelationship){
                        return ((NameRelationship) entity).getType().getTitleCache();
                }
-               
+
                return super.getTypeText(entity);
        }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
+
 }
index 8e954f8bd163e28d137a6295c6aee14b8cbc802c..7a0cb889c28e9b3ce9060973985c0b6e8475b8e2 100644 (file)
@@ -10,9 +10,7 @@
 
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
-import java.util.Arrays;
 import java.util.List;
-import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
@@ -69,7 +67,7 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#loadEntity(java.util.UUID)
         */
-       /** {@inheritDoc} 
+       /** {@inheritDoc}
        @Override
        protected SpecimenOrObservationBase loadEntity(UUID entityUuid) {
                List<String> propertyPaths = Arrays.asList(new String[]{});
@@ -125,7 +123,7 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#delete(java.lang.Object)
         */
-       /** {@inheritDoc} 
+       /** {@inheritDoc}
         * @throws ReferencedObjectUndeletableException */
        @Override
     public boolean delete(SpecimenOrObservationBase entity) throws ReferencedObjectUndeletableException {
@@ -138,7 +136,11 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
        /** {@inheritDoc} */
        @Override
     public boolean save(SpecimenOrObservationBase entity) {
-               return CdmStore.getService(IOccurrenceService.class).save(entity) != null;
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               return CdmStore.getService(IOccurrenceService.class).merge(entity) != null;
+           } else {
+               return CdmStore.getService(IOccurrenceService.class).save(entity) != null;
+           }
        }
 
 
@@ -161,4 +163,12 @@ public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObs
 
                return sortProviders;
        }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
 }
index d32a648cd0bf522d3a32dcc2e22ec9fe34612537..5a6853a0d080d76d7af3832bd09dfc78171a08e9 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -36,13 +36,13 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
 
        /**
-        * 
+        *
         */
        private static final long serialVersionUID = 3806243517765126749L;
 
        /** Constant <code>ID="bulkeditor.input.reference"</code> */
        public static final String ID = "bulkeditor.input.reference";
-       
+
        private static ReferenceEditorInput instance;
 
        /**
@@ -53,7 +53,7 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
        public static String getID() {
                return ID;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.IEditorInput#getName()
         */
@@ -62,7 +62,8 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
         *
         * @return a {@link java.lang.String} object.
         */
-       public String getName() {
+       @Override
+    public String getName() {
                return BulkEditorInputType.REFERENCE.label;
        }
 
@@ -74,7 +75,8 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
         *
         * @return a {@link java.lang.String} object.
         */
-       public String getToolTipText() {
+       @Override
+    public String getToolTipText() {
                return getName();
        }
 
@@ -98,7 +100,7 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
        public boolean isMergingEnabled() {
                return true;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInput#isMarkerTypeEditingEnabled(eu.etaxonomy.cdm.model.common.MarkerType)
         */
@@ -111,31 +113,37 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
                return super.isMarkerTypeEditingEnabled(markerType);
        }
 
-       
+
        /** {@inheritDoc} */
        @Override
        public List listEntities(IIdentifiableEntityServiceConfigurator configurator) {
                return CdmStore.getSearchManager().findReferences(configurator);
        }
-       
+
        // Entity persistence
-       
+
        /** {@inheritDoc} */
        @Override
        public Reference loadEntity(UUID entityUuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{"*", "inReference.*", "authorTeam.*"}); 
+               List<String> propertyPaths = Arrays.asList(new String[]{"*", "inReference.*", "authorTeam.*"});
                return CdmStore.getService(IReferenceService.class).load(entityUuid, propertyPaths);
        }
 
-       /** {@inheritDoc} 
+       /** {@inheritDoc}
         * @throws ReferencedObjectUndeletableException */
-       public boolean delete(Reference entity) throws ReferencedObjectUndeletableException {
+       @Override
+    public boolean delete(Reference entity) throws ReferencedObjectUndeletableException {
                return CdmStore.getService(IReferenceService.class).delete(entity) != null;
        }
 
        /** {@inheritDoc} */
-       public boolean save(Reference entity) {
-               return CdmStore.getService(IReferenceService.class).saveOrUpdate(entity) != null;
+       @Override
+    public boolean save(Reference entity) {
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               return CdmStore.getService(IReferenceService.class).merge(entity) != null;
+           } else {
+               return CdmStore.getService(IReferenceService.class).saveOrUpdate(entity) != null;
+           }
        }
 
        /* (non-Javadoc)
@@ -145,20 +153,20 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
        protected IEntityCreator<Reference> createEntityCreator() {
                return new ReferenceCreator();
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getSortProviders()
         */
        @Override
        public List<IBulkEditorSortProvider<Reference>> getSortProviders() {
                List<IBulkEditorSortProvider<Reference>> sortProviders = super.getSortProviders();
-               
+
                sortProviders.add(0, new IdentifiableEntitySortProvider<Reference>());
                sortProviders.add(1, new ReferenceSortProvider());
-               
+
                return sortProviders;
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getTypeText(java.lang.Object)
         */
@@ -170,4 +178,12 @@ public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
                return super.getTypeText(entity);
        }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
+
 }
index 3367a5e09279f936f52c687d8c049e656a818f65..a4831c4c62b06a49685d26b4aa5f77f5f24763b6 100644 (file)
@@ -5,20 +5,17 @@ import java.util.Arrays;
 import java.util.List;\r
 import java.util.UUID;\r
 \r
-import eu.etaxonomy.cdm.api.service.INameService;\r
 import eu.etaxonomy.cdm.api.service.ITaxonService;\r
 import eu.etaxonomy.cdm.api.service.config.FindTaxaAndNamesConfiguratorImpl;\r
 import eu.etaxonomy.cdm.api.service.config.IFindTaxaAndNamesConfigurator;\r
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;\r
 import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;\r
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;\r
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.taxon.Synonym;\r
 import eu.etaxonomy.cdm.model.taxon.Taxon;\r
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
 import eu.etaxonomy.cdm.persistence.query.MatchMode;\r
 import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;\r
-import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.NameCreator;\r
 import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.TaxonCreator;\r
 import eu.etaxonomy.taxeditor.store.CdmStore;\r
 \r
@@ -27,9 +24,9 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
        private static TaxonEditorInput instance;\r
        /** Constant <code>ID="bulkeditor.input.taxon"</code> */\r
        public static final String ID = "bulkeditor.input.taxon";\r
-       \r
-       \r
-       \r
+\r
+\r
+\r
        /**\r
         * <p>Getter for the field <code>instance</code>.</p>\r
         *\r
@@ -39,11 +36,11 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
                if (instance == null) {\r
                        instance = new TaxonEditorInput();\r
                }\r
-       \r
+\r
                return instance;\r
        }\r
-       \r
-       \r
+\r
+\r
        @Override\r
        public String getName() {\r
                return BulkEditorInputType.TAXON.label;\r
@@ -54,7 +51,7 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
                return getName();\r
        }\r
 \r
-       \r
+\r
        /**\r
         * <p>getID</p>\r
         *\r
@@ -63,7 +60,7 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
        public static Object getID() {\r
                return ID;\r
        }\r
-       \r
+\r
        /* (non-Javadoc)\r
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInput#isMergingEnabled()\r
         */\r
@@ -74,10 +71,14 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
        }\r
        @Override\r
        public boolean save(TaxonBase entity) {\r
-               return CdmStore.getService(ITaxonService.class).saveOrUpdate(entity) != null;\r
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {\r
+               return CdmStore.getService(ITaxonService.class).merge(entity) != null;\r
+           } else {\r
+               return CdmStore.getService(ITaxonService.class).saveOrUpdate(entity) != null;\r
+           }\r
        }\r
 \r
-       \r
+\r
 \r
        /** {@inheritDoc} */\r
        @Override\r
@@ -88,7 +89,7 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
                List<TaxonBase> taxa =  CdmStore.getSearchManager().findTaxa(configurator);\r
                List<TaxonBase> taxaCopy = new ArrayList<TaxonBase>();\r
                for (TaxonBase taxon:taxa){\r
-                       \r
+\r
                        if (taxon instanceof Taxon){\r
                                taxaCopy.add(HibernateProxyHelper.deproxy(taxon, Taxon.class));\r
                        }else{\r
@@ -101,15 +102,16 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
 \r
        @Override\r
        protected TaxonBase loadEntity(UUID entityUuid) {\r
-               List<String> propertyPaths = Arrays.asList(new String[]{}); \r
+               List<String> propertyPaths = Arrays.asList(new String[]{});\r
                return CdmStore.getService(ITaxonService.class).load(entityUuid, propertyPaths);\r
        }\r
 \r
-       \r
 \r
-       /** {@inheritDoc} \r
+\r
+       /** {@inheritDoc}\r
         * @throws ReferencedObjectUndeletableException */\r
-       public boolean delete(TaxonBase entity) {\r
+       @Override\r
+    public boolean delete(TaxonBase entity) {\r
                return CdmStore.getService(ITaxonService.class).delete(entity) != null;\r
        }\r
        @Override\r
@@ -117,4 +119,13 @@ public class TaxonEditorInput extends AbstractBulkEditorInput<TaxonBase>{
                return new TaxonCreator();\r
        }\r
 \r
+\r
+    /* (non-Javadoc)\r
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()\r
+     */\r
+    @Override\r
+    public void merge() {\r
+\r
+    }\r
+\r
 }\r
index c80733b1e807b558638e0ae860322e959e22f87b..fa8c27760f7cd39d3f8c2e4ecc63ba5340c32efc 100644 (file)
@@ -1,18 +1,16 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
-import java.util.Arrays;
 import java.util.List;
-import java.util.UUID;
 
 import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
@@ -30,9 +28,9 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 public class UserEditorInput extends AbstractBulkEditorInput<User> {
 
        public static final String ID = "bulkeditor.input.user";
-       
+
        private static UserEditorInput instance;
-       
+
        /**
         * @return the instance
         */
@@ -42,7 +40,7 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
                }
                return instance;
        }
-       
+
        /* (non-Javadoc)
         * @see org.eclipse.ui.IEditorInput#getName()
         */
@@ -64,7 +62,12 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
         */
        @Override
        public boolean save(User entity) {
-               return CdmStore.getService(IUserService.class).saveOrUpdate(entity) != null;
+           if(CdmStore.getCurrentSessionManager().isRemoting()) {
+               return CdmStore.getService(IUserService.class).merge(entity) != null;
+           } else {
+               return CdmStore.getService(IUserService.class).saveOrUpdate(entity) != null;
+           }
+
        }
 
        /* (non-Javadoc)
@@ -84,13 +87,13 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
                return CdmStore.getSearchManager().findUsers(configurator);
        }
 
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#loadEntity(java.util.UUID)
-       
+
        @Override
        protected User loadEntity(UUID entityUuid) {
-               List<String> propertyPaths = Arrays.asList(new String[]{}); 
+               List<String> propertyPaths = Arrays.asList(new String[]{});
                return CdmStore.getService(IUserService.class).load(entityUuid, propertyPaths);
        }
  */
@@ -101,7 +104,7 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
        protected IEntityCreator<User> createEntityCreator() {
                return new UserCreator();
        }
-       
+
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getText(eu.etaxonomy.cdm.model.common.ICdmBase)
         */
@@ -110,5 +113,13 @@ public class UserEditorInput extends AbstractBulkEditorInput<User> {
                return String.format("%s, %s", entity.getUsername(), entity.getPerson());
        }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
+     */
+    @Override
+    public void merge() {
+
+    }
+
 
 }
index aba437843535c3a7afac76042df26592e35a13e9..91b7734797b5af7b5ded0242db68422bb69aab9a 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -43,7 +43,11 @@ public class UserCreator  implements IEntityCreator<User>{
        public User createEntity(Object key, String text) {
                try{
                        User user = User.NewInstance(text, text);
-                       CdmStore.getService(IUserService.class).createUser(user);
+                        if(CdmStore.getCurrentSessionManager().isRemoting()) {
+                            user = CdmStore.getService(IUserService.class).merge(user);
+                        } else {
+                            CdmStore.getService(IUserService.class).createUser(user);
+                        }
                        return user;
                } catch (AccessDeniedException e){
                        MessagingUtils.messageDialog("Access denied", getClass(), e.getMessage(), e);
index ee3cd44efb078430a6d24fdee4cd1db9eb08a8a1..105ece954473bed55240ee88b1c9c7f71e12a7b0 100644 (file)
@@ -67,7 +67,7 @@ import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
  * @created 08.07.2009
  * @version 1.0
  */
-public class ReferencingObjectsView extends AbstractCdmViewPart{
+public class ReferencingObjectsView extends AbstractCdmViewPart {
        private static final Logger logger = Logger
                        .getLogger(ReferencingObjectsView.class);
 
@@ -352,5 +352,4 @@ public class ReferencingObjectsView extends AbstractCdmViewPart{
 
        }
 
-
 }
index 3962c23f1c5de34375a67cba740159cad84c22a5..f0537b16b8994140e46a2d6b938134e69f90fb3a 100644 (file)
@@ -1,16 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.8.0-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.8.0-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.8.0-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.8.0-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.8.0-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.8.0-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.8.0-SNAPSHOT.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.8.0-SNAPSHOT.jar"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="src" path="resources"/>
        <classpathentry kind="src" path="src/main/resources"/>
        <classpathentry exported="true" kind="lib" path="lib/activation-1.1.1.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/spring-security-core-3.1.3.RELEASE.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/stax-1.2.0.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/stax-api-1.0.1.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-core-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-database-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-dbmaintainer-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-dbunit-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-easymock-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-inject-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-mock-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-orm-3.3.jar"/>
-       <classpathentry exported="true" kind="lib" path="lib/unitils-spring-3.3.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/usertype.jodatime-2.0.1.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/usertype.spi-2.0.1.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/validation-api-1.0.0.GA.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.3.0.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-schemas-3.10-FINAL.jar"/>
        <classpathentry exported="true" kind="lib" path="lib/swagger-annotations-1.3.5.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-3.8.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-3.8.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-3.8.0-SNAPSHOT.jar" sourcepath="/data/.m2/repository/eu/etaxonomy/cdmlib-io/3.8.0-SNAPSHOT/cdmlib-io-3.8.0-SNAPSHOT-sources.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-3.8.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-3.8.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-3.8.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-3.8.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-3.8.0-SNAPSHOT.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/apache-log4j-extras-1.2.17.jar"/>
        <classpathentry kind="output" path="target/classes"/>
 </classpath>
index c5e82d74585d15d6ea821b5f23cd65624190f244..41b529a2179c63c4a7fdeb5afd85cd68ed2e5720 100644 (file)
@@ -1 +1,5 @@
-bin
\ No newline at end of file
+bin
+/target/
+/target/
+/target/
+/target/
index 158f930cf0e6a1da7eaeb1825e176772a6c48af1..4738620485a7af1e2a538de2754ef64fbf8d8086 100644 (file)
@@ -7,10 +7,11 @@ Eclipse-BundleShape: dir
 Export-Package: com.google.api,
  com.google.api.detect,
  com.google.api.translate,
+ eu.etaxonomy.cdm,
  eu.etaxonomy.cdm.api.application,
+ eu.etaxonomy.cdm.api.cache,
  eu.etaxonomy.cdm.api.conversation,
  eu.etaxonomy.cdm.api.facade,
- eu.etaxonomy.cdm.api.lazyloading,
  eu.etaxonomy.cdm.api.service,
  eu.etaxonomy.cdm.api.service.config,
  eu.etaxonomy.cdm.api.service.description,
@@ -76,6 +77,7 @@ Export-Package: com.google.api,
  eu.etaxonomy.cdm.io.sdd.ikeyplus,
  eu.etaxonomy.cdm.io.sdd.in,
  eu.etaxonomy.cdm.io.sdd.out,
+ eu.etaxonomy.cdm.io.service,
  eu.etaxonomy.cdm.io.specimen,
  eu.etaxonomy.cdm.io.specimen.abcd206.in,
  eu.etaxonomy.cdm.io.specimen.excel.in,
@@ -113,7 +115,6 @@ Export-Package: com.google.api,
  eu.etaxonomy.cdm.persistence.dao.hibernate.occurrence,
  eu.etaxonomy.cdm.persistence.dao.hibernate.reference,
  eu.etaxonomy.cdm.persistence.dao.hibernate.taxon,
- eu.etaxonomy.cdm.persistence.dao.hibernate.validation,
  eu.etaxonomy.cdm.persistence.dao.hibernate.view,
  eu.etaxonomy.cdm.persistence.dao.media,
  eu.etaxonomy.cdm.persistence.dao.name,
@@ -136,7 +137,6 @@ Export-Package: com.google.api,
  eu.etaxonomy.cdm.print.out.pdf,
  eu.etaxonomy.cdm.print.out.taxpub,
  eu.etaxonomy.cdm.print.out.xml,
- eu.etaxonomy.cdm.remote,
  eu.etaxonomy.cdm.remote.config,
  eu.etaxonomy.cdm.remote.controller,
  eu.etaxonomy.cdm.remote.controller.dto,
@@ -189,16 +189,34 @@ Export-Package: com.google.api,
  eu.etaxonomy.cdm.validation.annotation,
  eu.etaxonomy.cdm.validation.constraint,
  eu.etaxonomy.remote.dto.rdf,
+ eu.etaxonomy.taxeditor.remoting,
+ eu.etaxonomy.taxeditor.remoting.cache,
+ eu.etaxonomy.taxeditor.remoting.server,
+ eu.etaxonomy.taxeditor.remoting.source,
+ eu.etaxonomy.taxeditor.service,
+ eu.etaxonomy.taxeditor.session,
+ eu.etaxonomy.taxeditor.session.mock,
+ javassist.util.proxy,
  javax.persistence,
  junit.framework;uses:="org.junit.runner.manipulation,org.junit.runner,org.junit.runner.notification",
+ net.sf.ehcache,
+ net.sf.ehcache.config,
+ net.sf.ehcache.statistics,
+ net.sf.ehcache.store,
  net.sf.json;uses:="net.sf.json.processors,net.sf.json.util,org.apache.commons.lang.exception",
+ org.aopalliance.aop,
  org.apache.commons.collections;uses:="org.apache.commons.collections.keyvalue,new org.apache.commons.collections",
+ org.apache.commons.collections.buffer,
+ org.apache.commons.dbcp,
  org.apache.commons.io;uses:="org.apache.commons.io.filefilter",
  org.apache.commons.lang;uses:="org.apache.commons.lang.exception",
  org.apache.commons.lang.exception,
+ org.apache.commons.lang.text,
+ org.apache.commons.logging,
  org.apache.fop.apps,
  org.apache.http,
  org.apache.http.client,
+ org.apache.http.util,
  org.apache.log4j;uses:="org.apache.log4j.helpers,org.apache.log4j.or,org.apache.log4j.spi",
  org.apache.log4j.chainsaw;
   uses:="org.apache.log4j,
@@ -265,13 +283,28 @@ Export-Package: com.google.api,
  org.hibernate,
  org.hibernate.annotations.common.reflection,
  org.hibernate.cache.internal,
+ org.hibernate.cfg,
  org.hibernate.classic,
  org.hibernate.collection.internal,
+ org.hibernate.collection.spi,
  org.hibernate.criterion,
+ org.hibernate.engine.internal,
+ org.hibernate.engine.spi,
+ org.hibernate.engine.transaction.spi,
  org.hibernate.envers.query.criteria,
+ org.hibernate.internal,
+ org.hibernate.internal.util,
+ org.hibernate.internal.util.collections,
+ org.hibernate.mapping,
+ org.hibernate.persister.collection,
+ org.hibernate.persister.entity,
+ org.hibernate.pretty,
+ org.hibernate.property,
  org.hibernate.proxy,
+ org.hibernate.proxy.pojo.javassist,
  org.hibernate.search,
  org.hibernate.search.spatial.impl,
+ org.hibernate.type,
  org.jadira.usertype.dateandtime.joda,
  org.jadira.usertype.dateandtime.shared.spi,
  org.jboss.logging,
@@ -311,6 +344,10 @@ Export-Package: com.google.api,
  org.odftoolkit.odfdom.dom.element,
  org.odftoolkit.odfdom.dom.element.style,
  org.odftoolkit.odfdom.dom.style,
+ org.slf4j,
+ org.springframework.aop,
+ org.springframework.aop.framework,
+ org.springframework.beans,
  org.springframework.beans.factory,
  org.springframework.beans.factory.annotation;
   uses:="org.apache.commons.logging,
@@ -321,6 +358,9 @@ Export-Package: com.google.api,
    org.springframework.beans.factory.wiring,
    org.springframework.core.type,
    org.springframework.beans.factory",
+ org.springframework.beans.factory.config,
+ org.springframework.beans.factory.support,
+ org.springframework.beans.factory.xml,
  org.springframework.cache.ehcache,
  org.springframework.context;
   uses:="org.springframework.core.io,
@@ -328,14 +368,19 @@ Export-Package: com.google.api,
    org.springframework.core.io.support,
    org.springframework.beans.factory.config,
    org.springframework.beans.factory",
+ org.springframework.context.config,
  org.springframework.context.event;
   uses:="org.springframework.core,
    org.aopalliance.intercept,
    org.springframework.context,
    org.springframework.beans.factory",
+ org.springframework.context.support,
  org.springframework.core;uses:="org.springframework.util",
+ org.springframework.core.env,
  org.springframework.core.io;uses:="org.jboss.virtual",
+ org.springframework.core.io.support,
  org.springframework.core.type.classreading,
+ org.springframework.jdbc.datasource,
  org.springframework.orm.hibernate3;
   uses:="org.apache.commons.logging,
    org.aopalliance.intercept,
@@ -362,9 +407,15 @@ Export-Package: com.google.api,
    org.springframework.dao,
    org.springframework.transaction.support",
  org.springframework.orm.hibernate4,
+ org.springframework.remoting,
+ org.springframework.remoting.httpinvoker,
+ org.springframework.remoting.support,
  org.springframework.security.access,
  org.springframework.security.authentication,
+ org.springframework.security.authentication.dao,
+ org.springframework.security.authentication.encoding,
  org.springframework.security.authentication.event,
+ org.springframework.security.config,
  org.springframework.security.core,
  org.springframework.security.core.context,
  org.springframework.security.core.userdetails,
@@ -401,6 +452,7 @@ Export-Package: com.google.api,
    org.springframework.transaction,
    org.apache.commons.logging,
    org.springframework.beans.factory",
+ org.springframework.util,
  org.springframework.web.servlet;
   uses:="org.springframework.web.multipart,
    org.apache.commons.logging,
@@ -417,7 +469,9 @@ Export-Package: com.google.api,
 Bundle-Vendor: EDIT
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: org.eclipse.osgi,
- org.eclipse.equinox.common
+ org.eclipse.equinox.common,
+ org.apache.commons.httpclient;bundle-version="3.1.0",
+ org.eclipse.core.runtime
 Bundle-ClassPath: .,
  lib/activation-1.1.1.jar,
  lib/antlr-2.7.7.jar,
@@ -574,15 +628,6 @@ Bundle-ClassPath: .,
  lib/spring-security-core-3.1.3.RELEASE.jar,
  lib/stax-1.2.0.jar,
  lib/stax-api-1.0.1.jar,
- lib/unitils-core-3.3.jar,
- lib/unitils-database-3.3.jar,
- lib/unitils-dbmaintainer-3.3.jar,
- lib/unitils-dbunit-3.3.jar,
- lib/unitils-easymock-3.3.jar,
- lib/unitils-inject-3.3.jar,
- lib/unitils-mock-3.3.jar,
- lib/unitils-orm-3.3.jar,
- lib/unitils-spring-3.3.jar,
  lib/usertype.jodatime-2.0.1.jar,
  lib/usertype.spi-2.0.1.jar,
  lib/validation-api-1.0.0.GA.jar,
@@ -619,5 +664,6 @@ Bundle-ClassPath: .,
  lib/cdmlib-persistence-3.8.0-SNAPSHOT.jar,
  lib/cdmlib-print-3.8.0-SNAPSHOT.jar,
  lib/cdmlib-remote-3.8.0-SNAPSHOT.jar,
- lib/cdmlib-services-3.8.0-SNAPSHOT.jar
+ lib/cdmlib-services-3.8.0-SNAPSHOT.jar,
+ lib/apache-log4j-extras-1.2.17.jar
 Import-Package: eu.etaxonomy.cdm.api.application
index 3ce2b145dd7c8b8dc21f692f8634b554f9f4e799..39b94cf8101af2e757e5efaa122371e291bf768e 100644 (file)
@@ -155,15 +155,6 @@ bin.includes = META-INF/,\
                lib/spring-security-core-3.1.3.RELEASE.jar,\\r
                lib/stax-1.2.0.jar,\\r
                lib/stax-api-1.0.1.jar,\\r
-               lib/unitils-core-3.3.jar,\\r
-               lib/unitils-database-3.3.jar,\\r
-               lib/unitils-dbmaintainer-3.3.jar,\\r
-               lib/unitils-dbunit-3.3.jar,\\r
-               lib/unitils-easymock-3.3.jar,\\r
-               lib/unitils-inject-3.3.jar,\\r
-               lib/unitils-mock-3.3.jar,\\r
-               lib/unitils-orm-3.3.jar,\\r
-               lib/unitils-spring-3.3.jar,\\r
                lib/usertype.jodatime-2.0.1.jar,\\r
                lib/usertype.spi-2.0.1.jar,\\r
                lib/validation-api-1.0.0.GA.jar,\\r
@@ -201,12 +192,13 @@ bin.includes = META-INF/,\
                lib/cdmlib-persistence-3.8.0-SNAPSHOT.jar,\\r
                lib/cdmlib-print-3.8.0-SNAPSHOT.jar,\\r
                lib/cdmlib-remote-3.8.0-SNAPSHOT.jar,\\r
-               lib/cdmlib-services-3.8.0-SNAPSHOT.jar\r
+               lib/cdmlib-services-3.8.0-SNAPSHOT.jar,\\r
+               lib/apache-log4j-extras-1.2.17.jar,\\r
+               resources/cdm.map.ser\r
 \r
 jars.compile.order = .\r
 output.. = bin/\r
 source.. = src/main/java/,\\r
-           src/main/resources/,\\r
-           src/test/java/\r
+           src/main/resources/\r
 src.includes = src/\r
 \r
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/apache-log4j-extras-1.2.17.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/apache-log4j-extras-1.2.17.jar
new file mode 100644 (file)
index 0000000..b08d8d5
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/apache-log4j-extras-1.2.17.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/aspectjrt-1.7.1-sources.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/aspectjrt-1.7.1-sources.jar
deleted file mode 100644 (file)
index 21ffee7..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/aspectjrt-1.7.1-sources.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/aspectjweaver-1.7.1-sources.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/aspectjweaver-1.7.1-sources.jar
deleted file mode 100644 (file)
index 9625da0..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/aspectjweaver-1.7.1-sources.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.3.jar
deleted file mode 100644 (file)
index a3a7a7b..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.4.2.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.4.2.jar
new file mode 100644 (file)
index 0000000..ab4c22e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-core-3.4.2.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.3.jar
deleted file mode 100644 (file)
index f9a1647..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.4.2.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.4.2.jar
new file mode 100644 (file)
index 0000000..dfcb6ae
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-database-3.4.2.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.3.jar
deleted file mode 100644 (file)
index bb20970..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.4.2.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.4.2.jar
new file mode 100644 (file)
index 0000000..01f8994
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbmaintainer-3.4.2.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.3.jar
deleted file mode 100644 (file)
index eefa626..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.4.2.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.4.2.jar
new file mode 100644 (file)
index 0000000..778274e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-dbunit-3.4.2.jar differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-easymock-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-easymock-3.3.jar
deleted file mode 100644 (file)
index c603f0b..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-easymock-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-inject-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-inject-3.3.jar
deleted file mode 100644 (file)
index 8bf141e..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-inject-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-mock-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-mock-3.3.jar
deleted file mode 100644 (file)
index f201831..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-mock-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-orm-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-orm-3.3.jar
deleted file mode 100644 (file)
index d8d4e89..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-orm-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.3.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.3.jar
deleted file mode 100644 (file)
index 53074f0..0000000
Binary files a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.3.jar and /dev/null differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.4.2.jar b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.4.2.jar
new file mode 100644 (file)
index 0000000..f30810b
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/lib/unitils-spring-3.4.2.jar differ
index 3369711696df66cf3a600b5f6f14640429d4cf89..2138a725c5026eac957c4d4226cbdd8ea7c76180 100644 (file)
   <artifactId>eu.etaxonomy.taxeditor.cdmlib</artifactId>
   <packaging>eclipse-plugin</packaging>
   <name>CDM Library Dependencies Plugin</name>
-  <description>CDM Library and dependencies as a plugin</description>
-  <build>
-    <plugins>      
+  <description>CDM Library and dependencies as a plugin</description>\r
+\r
+  <build>\r
+    <pluginManagement>\r
+      <plugins>\r
+        <plugin>\r
+          <groupId>org.apache.maven.plugins</groupId>\r
+          <artifactId>maven-surefire-plugin</artifactId>\r
+          <version>2.7</version>\r
+        </plugin>\r
+      </plugins>\r
+    </pluginManagement>\r
+    <plugins>
       <plugin>
-       <groupId>org.apache.maven.plugins</groupId>
-       <artifactId>maven-dependency-plugin</artifactId>
-       <version>2.4</version>
-       <executions>
-         <execution>
-           <id>copy-dependencies</id>
-           <phase>validate</phase>
-           <goals>
-             <goal>copy-dependencies</goal>
-           </goals>
-           <configuration>
-             <includeArtifactIds>cdmlib-commons,cdmlib-model,cdmlib-persistence,cdmlib-remote,cdmlib-print,cdmlib-services,cdmlib-ext,cdmlib-io</includeArtifactIds>
-             <outputDirectory>lib</outputDirectory>
-             <overWriteReleases>true</overWriteReleases>
-             <overWriteSnapshots>true</overWriteSnapshots>
-             <excludeTransitive>true</excludeTransitive>             
-           </configuration>
-         </execution>
-         <execution>
-           <id>copy-dependencies-sources</id>
-           <phase>validate</phase>
-           <goals>
-             <goal>copy-dependencies</goal>
-           </goals>
-           <configuration>
-             <classifier>sources</classifier>
-             <includeArtifactIds>cdmlib-commons,cdmlib-model,cdmlib-persistence,cdmlib-remote,cdmlib-print,cdmlib-services,cdmlib-ext,cdmlib-io</includeArtifactIds>
-             <outputDirectory>lib</outputDirectory>
-             <overWriteReleases>true</overWriteReleases>
-             <overWriteSnapshots>true</overWriteSnapshots>
-             <excludeTransitive>true</excludeTransitive>
-             <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
-           </configuration>
-         </execution>
-       </executions>
-      </plugin>
-      <plugin>
-       <groupId>org.apache.maven.plugins</groupId>
-       <artifactId>maven-antrun-plugin</artifactId>
-       <version>1.7</version>
-       <executions>
-         <execution>
-           <id>remove-existing-jars</id>
-           <phase>clean</phase>
-           <goals>
-             <goal>run</goal>
-           </goals>
-           <configuration>
-             <target>
-               <echo>Remove all cdmlib jars</echo>
-               <delete>
-                 <fileset dir="./lib" includes="cdmlib-*" />
-               </delete>
-             </target> 
-           </configuration>
-         </execution>
-         <execution>
-           <id>update-snapshot-jar-names</id>
-           <phase>validate</phase>
-           <goals>
-             <goal>run</goal>
-           </goals>
-           <configuration>           
-             <target>
-               <echo>Update cdmlib jars to SNAPSHOT when build with timestamp</echo>
-               <move todir="./lib">
-                 <fileset dir="./lib" />
-                 <mapper type="regexp" from="(^cdmlib\-.*\-[0-9]\.[0-9]\.[0-9]\-)[0-9.-]+(\.jar)" to="\1SNAPSHOT\2" />
-               </move>                           
-               <move todir="./lib">
-                 <fileset dir="./lib" />
-                 <mapper type="regexp" from="(^cdmlib\-.*\-[0-9]\.[0-9]\.[0-9]\-)[0-9.-]+(\-sources\.jar)" to="\1SNAPSHOT\2" />
-               </move>                           
-             </target> 
-           </configuration>
-         </execution>
-       </executions>
-      </plugin>
-    </plugins>
-  </build>
-  <dependencies>
-    <dependency>
-      <groupId>identificationKeyAPI</groupId>
-      <artifactId>identificationKeyAPI</artifactId>
-      <version>1.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-commons</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-model</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-persistence</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-remote</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-print</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-services</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-io</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-ext</artifactId>
-      <version>${cdmlib.version}</version>
-    </dependency>
-       <dependency>
-      <groupId>org.aspectj</groupId>
-      <artifactId>aspectjrt</artifactId>
-         <version>1.7.1</version>
-       </dependency>
-         <dependency>
-         <groupId>org.aspectj</groupId>
-         <artifactId>aspectjweaver</artifactId>
-         <version>1.7.1</version>
-        </dependency>
-        
-    <!--  for ikey-plus 
-        TODO this should not be needed but the utils class contained  in this jar 
-        seems to be loaded as bean by spring
-    -->
+        <groupId>org.apache.maven.plugins</groupId>\r
+        <artifactId>maven-dependency-plugin</artifactId>\r
+        <version>2.4</version>\r
+        <executions>\r
+          <execution>\r
+            <id>copy-dependencies</id>\r
+            <phase>validate</phase>\r
+            <goals>\r
+              <goal>copy-dependencies</goal>\r
+            </goals>\r
+            <configuration>\r
+              <excludeArtifactIds>\r
+                cdmlib-remote-webapp\r
+              </excludeArtifactIds>\r
+              <includeArtifactIds>\r
+                cdmlib-services,cdmlib-commons,cdmlib-persistence,cdmlib-ext,cdmlib-model,cdmlib-io,cdmlib-print,cdmlib-remote\r
+              </includeArtifactIds>\r
+              <outputDirectory>${basedir}/lib</outputDirectory>\r
+              <overWriteReleases>true</overWriteReleases>\r
+              <overWriteSnapshots>true</overWriteSnapshots>\r
+              <excludeTransitive>true</excludeTransitive>\r
+            </configuration>\r
+          </execution>\r
+          <execution>\r
+            <id>copy-dependency-war</id>\r
+            <phase>validate</phase>\r
+            <goals>\r
+              <goal>copy-dependencies</goal>\r
+            </goals>\r
+            <configuration>\r
+              <includeArtifactIds>\r
+                cdmlib-remote-webapp\r
+              </includeArtifactIds>\r
+              <outputDirectory>\r
+                ${basedir}/src/main/resources/etc/jetty\r
+              </outputDirectory>\r
+              <overWriteReleases>true</overWriteReleases>\r
+              <overWriteSnapshots>true</overWriteSnapshots>\r
+              <excludeTransitive>true</excludeTransitive>\r
+            </configuration>\r
+          </execution>\r
+        </executions>
+      </plugin>\r
+      <plugin>\r
+        <groupId>org.apache.maven.plugins</groupId>\r
+        <artifactId>maven-antrun-plugin</artifactId>\r
+        <version>1.7</version>\r
+        <executions>\r
+          <execution>\r
+            <id>update-snapshot-jar-names</id>\r
+            <phase>validate</phase>\r
+            <goals>\r
+              <goal>run</goal>\r
+            </goals>\r
+            <configuration>\r
+              <target>\r
+                <echo>Anonymizing war</echo>\r
+                <move todir="./src/main/resources/etc/jetty">\r
+                  <fileset dir="./src/main/resources/etc/jetty" />\r
+                  <mapper type="regexp"\r
+                    from="(^cdmlib\-.*)\-[0-9]\.[0-9]\.[0-9]\-SNAPSHOT(\.war)"\r
+                    to="\1\2" />\r
+                </move>\r
+                <move todir="./src/main/resources/etc/jetty">\r
+                  <fileset dir="./src/main/resources/etc/jetty" />\r
+                  <mapper type="regexp"\r
+                    from="(^cdmlib\-.*)\-[0-9]\.[0-9]\.[0-9]\-[0-9.-]+(\.war)"\r
+                    to="\1\2" />\r
+                </move>\r
+                <echo>Update cdmlib jars to SNAPSHOT when build with\r
+                  timestamp\r
+                </echo>\r
+                <move todir="./lib">\r
+                  <fileset dir="./lib" />\r
+                  <mapper type="regexp"\r
+                    from="(^cdmlib\-.*\-[0-9]\.[0-9]\.[0-9]\-)[0-9.-]+(\.jar)"\r
+                    to="\1SNAPSHOT\2" />\r
+                </move>\r
+                <move todir="./lib">\r
+                  <fileset dir="./lib" />\r
+                  <mapper type="regexp"\r
+                    from="(^cdmlib\-.*\-[0-9]\.[0-9]\.[0-9]\-)[0-9.-]+(\-sources\.jar)"\r
+                    to="\1SNAPSHOT\2" />                \r
+                </move>\r
+              </target>\r
+            </configuration>\r
+          </execution>\r
+        </executions>\r
+      </plugin>\r
+    </plugins>\r
+  </build>\r
+  <profiles>\r
+    <profile>\r
+      <id>cleanCdmlibJars</id>\r
+      <build>\r
+        <plugins>\r
+          <plugin>\r
+            <artifactId>maven-clean-plugin</artifactId>\r
+            <version>2.3</version>\r
+            <configuration>\r
+              <filesets>\r
+                <fileset>\r
+                  <directory>${basedir}/lib</directory>\r
+                  <includes>\r
+                    <include>cdmlib-*</include>\r
+                  </includes>\r
+                  <followSymlinks>false</followSymlinks>\r
+                </fileset>\r
+              </filesets>\r
+            </configuration>\r
+          </plugin>\r
+        </plugins>\r
+      </build>\r
+    </profile>\r
+    <profile>\r
+      <id>cleanAllJars</id>\r
+      <build>\r
+        <plugins>\r
+          <plugin>\r
+            <artifactId>maven-clean-plugin</artifactId>\r
+            <version>2.3</version>\r
+            <configuration>\r
+              <filesets>\r
+                <fileset>\r
+                  <directory>${basedir}/lib</directory>\r
+                  <includes>\r
+                    <include>*</include>\r
+                  </includes>\r
+                  <followSymlinks>false</followSymlinks>\r
+                </fileset>\r
+              </filesets>\r
+            </configuration>\r
+          </plugin>\r
+        </plugins>\r
+      </build>\r
+    </profile>\r
+    <profile>\r
+      <id>copyAllJars</id>\r
+      <build>\r
+        <plugins>\r
+          <plugin>\r
+            <groupId>org.apache.maven.plugins</groupId>\r
+            <artifactId>maven-dependency-plugin</artifactId>\r
+            <version>2.4</version>\r
+            <executions>\r
+              <execution>\r
+                <id>copy-all-dependencies</id>\r
+                <phase>validate</phase>\r
+                <goals>\r
+                  <goal>copy-dependencies</goal>\r
+                </goals>\r
+                <configuration>\r
+                  <excludeArtifactIds>\r
+                    cdmlib-remote-webapp\r
+                  </excludeArtifactIds>\r
+                  <outputDirectory>${basedir}/lib</outputDirectory>\r
+                  <overWriteReleases>true</overWriteReleases>\r
+                  <overWriteSnapshots>true</overWriteSnapshots>\r
+                  <excludeTransitive>true</excludeTransitive>\r
+                </configuration>\r
+              </execution>\r
+            </executions>\r
+          </plugin>\r
+        </plugins>\r
+      </build>\r
+    </profile>\r
+  </profiles>\r
+  <repositories>\r
+    <repository>\r
+      <id>SpringSource Enterprise Bundle Repository - External Bundle\r
+        Milestones\r
+      </id>\r
+      <url>http://repository.springsource.com/maven/bundles/milestone\r
+      </url>\r
+    </repository>\r
+    <repository>\r
+      <id>SpringSource Enterprise Bundle Repository - SpringSource\r
+        Bundle\r
+        Releases\r
+      </id>\r
+      <url>http://repository.springsource.com/maven/bundles/release\r
+      </url>\r
+    </repository>\r
+    <repository>\r
+      <id>SpringSource Enterprise Bundle Repository - External Bundle\r
+        Releases\r
+      </id>\r
+      <url>http://repository.springsource.com/maven/bundles/external\r
+      </url>\r
+    </repository>\r
+  </repositories>\r
+  <dependencies>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-remote-webapp</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+      <type>war</type>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-commons</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-model</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-persistence</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-remote</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-print</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-services</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-io</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>eu.etaxonomy</groupId>\r
+      <artifactId>cdmlib-ext</artifactId>\r
+      <version>${cdmlib.version}</version>\r
+    </dependency>\r
+\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-server</artifactId> -->\r
+    <!-- <version>9.1.3.v20140225</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-util</artifactId> -->\r
+    <!-- <version>9.1.3.v20140225</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-xml</artifactId> -->\r
+    <!-- <version>9.1.3.v20140225</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-servlet</artifactId> -->\r
+    <!-- <version>9.1.3.v20140225</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-webapp</artifactId> -->\r
+    <!-- <version>9.1.3.v20140225</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-security</artifactId> -->\r
+    <!-- <version>9.1.3.v20140225</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-http</artifactId> -->\r
+    <!-- <version>${jetty.version}</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>org.eclipse.jetty</groupId> -->\r
+    <!-- <artifactId>jetty-io</artifactId> -->\r
+    <!-- <version>${jetty.version}</version> -->\r
+    <!-- </dependency> -->\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>javax.servlet</groupId> -->\r
+    <!-- <artifactId>javax.servlet-api</artifactId> -->\r
+    <!-- <version>3.1.0</version> -->\r
+    <!-- </dependency> -->\r
+\r
+    <!-- <dependency> -->\r
+    <!-- <groupId>javax.servlet</groupId> -->\r
+    <!-- <artifactId>jsp-api</artifactId> -->\r
+    <!-- <version>2.0</version> -->\r
+    <!-- </dependency> -->\r
+\r
+    <dependency>\r
+      <groupId>net.sf.ehcache</groupId>\r
+      <artifactId>ehcache-core</artifactId>\r
+      <version>2.4.3</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hibernate</groupId>\r
+      <artifactId>hibernate-core</artifactId>\r
+      <version>4.1.10.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hibernate.common</groupId>\r
+      <artifactId>hibernate-commons-annotations</artifactId>\r
+      <version>4.0.1.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hibernate</groupId>\r
+      <artifactId>hibernate-search-engine</artifactId>\r
+      <version>4.2.0.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hibernate.javax.persistence</groupId>\r
+      <artifactId>hibernate-jpa-2.0-api</artifactId>\r
+      <version>1.0.1.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hibernate</groupId>\r
+      <artifactId>hibernate-envers</artifactId>\r
+      <version>4.1.10.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hibernate</groupId>\r
+      <artifactId>hibernate-entitymanager</artifactId>\r
+      <version>4.1.10.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>dom4j</groupId>\r
+      <artifactId>dom4j</artifactId>\r
+      <version>1.6</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.jadira.usertype</groupId>\r
+      <artifactId>usertype.jodatime</artifactId>\r
+      <version>2.0.1</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.jadira.usertype</groupId>\r
+      <artifactId>usertype.spi</artifactId>\r
+      <version>2.0.1</version>\r
+    </dependency>\r
+\r
+    <dependency>\r
+      <groupId>junit</groupId>\r
+      <artifactId>junit</artifactId>\r
+      <version>4.11</version>\r
+      <scope>test</scope>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>log4j</groupId>\r
+      <artifactId>log4j</artifactId>\r
+      <version>1.2.17</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.jdom</groupId>\r
+      <artifactId>jdom</artifactId>\r
+      <version>1.1.3</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.context</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.context.support</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.aspects</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.test</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.beans</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.transaction</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.web</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.core</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.aop</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.expression</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.orm</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework</groupId>\r
+      <artifactId>org.springframework.jdbc</artifactId>\r
+      <version>3.2.2.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework.security</groupId>\r
+      <artifactId>spring-security-core</artifactId>\r
+      <version>3.1.3.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework.security</groupId>\r
+      <artifactId>spring-security-config</artifactId>\r
+      <version>3.1.3.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.springframework.security</groupId>\r
+      <artifactId>spring-security-remoting</artifactId>\r
+      <version>3.1.3.RELEASE</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.jboss.logging</groupId>\r
+      <artifactId>jboss-logging</artifactId>\r
+      <version>3.1.3.GA</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.hamcrest</groupId>\r
+      <artifactId>hamcrest-core</artifactId>\r
+      <version>1.3</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>com.mchange</groupId>\r
+      <artifactId>c3p0</artifactId>\r
+      <version>0.9.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.jboss.spec.javax.transaction</groupId>\r
+      <artifactId>jboss-transaction-api_1.1_spec</artifactId>\r
+      <version>1.0.0.Final</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.aspectj</groupId>\r
+      <artifactId>aspectjrt</artifactId>\r
+      <version>1.7.1</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>commons-logging</groupId>\r
+      <artifactId>commons-logging</artifactId>\r
+      <version>1.1.1</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>commons-lang</groupId>\r
+      <artifactId>commons-lang</artifactId>\r
+      <version>2.6</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>aopalliance</groupId>\r
+      <artifactId>aopalliance</artifactId>\r
+      <version>1.0</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>joda-time</groupId>\r
+      <artifactId>joda-time</artifactId>\r
+      <version>2.1</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>com.ibm.lsid</groupId>\r
+      <artifactId>lsid-client</artifactId>\r
+      <version>1.1.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>com.ibm.lsid</groupId>\r
+      <artifactId>lsid-server</artifactId>\r
+      <version>1.1.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.apache.lucene</groupId>\r
+      <artifactId>lucene-core</artifactId>\r
+      <version>3.6.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.slf4j</groupId>\r
+      <artifactId>slf4j-api</artifactId>\r
+      <version>1.7.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.javassist</groupId>\r
+      <artifactId>javassist</artifactId>\r
+      <version>3.17.1-GA</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>au.com.bytecode</groupId>\r
+      <artifactId>opencsv</artifactId>\r
+      <version>2.4</version>\r
+    </dependency>\r
+\r
+    <!-- For Unit Tests Start -->\r
+\r
+    <dependency>\r
+      <groupId>org.unitils</groupId>\r
+      <artifactId>unitils-core</artifactId>\r
+      <version>3.4.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.unitils</groupId>\r
+      <artifactId>unitils-spring</artifactId>\r
+      <version>3.4.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.unitils</groupId>\r
+      <artifactId>unitils-database</artifactId>\r
+      <version>3.4.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>commons-dbcp</groupId>\r
+      <artifactId>commons-dbcp</artifactId>\r
+      <version>1.4</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>commons-pool</groupId>\r
+      <artifactId>commons-pool</artifactId>\r
+      <version>1.5.4</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.unitils</groupId>\r
+      <artifactId>unitils-dbmaintainer</artifactId>\r
+      <version>3.4.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>com.h2database</groupId>\r
+      <artifactId>h2</artifactId>\r
+      <version>1.4.181</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.unitils</groupId>\r
+      <artifactId>unitils-dbunit</artifactId>\r
+      <version>3.4.2</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>org.dbunit</groupId>\r
+      <artifactId>dbunit</artifactId>\r
+      <version>2.4.9</version>\r
+    </dependency>\r
+    <!-- For Unit Tests End -->\r
+\r
+    <!-- For Hibernate Mapping Start -->\r
+    <dependency>\r
+      <groupId>wsdl4j</groupId>\r
+      <artifactId>wsdl4j</artifactId>\r
+      <version>1.6.3</version>\r
+    </dependency>\r
+    <dependency>\r
+      <groupId>javax.validation</groupId>\r
+      <artifactId>validation-api</artifactId>\r
+      <version>1.1.0.Final</version>\r
+    </dependency>\r
+    <!-- For Hibernate Mapping End -->\r
   </dependencies>
 </project>
diff --git a/eu.etaxonomy.taxeditor.cdmlib/resources/cdm.map.ser b/eu.etaxonomy.taxeditor.cdmlib/resources/cdm.map.ser
new file mode 100644 (file)
index 0000000..931f12e
Binary files /dev/null and b/eu.etaxonomy.taxeditor.cdmlib/resources/cdm.map.ser differ
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationException.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationException.java
new file mode 100644 (file)
index 0000000..c17e167
--- /dev/null
@@ -0,0 +1,23 @@
+// $Id$
+/**
+* Copyright (C) 2015 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.api.application;
+
+/**
+ * @author cmathew
+ * @date 18 Jun 2015
+ *
+ */
+public class CdmApplicationException extends Exception {
+
+    public CdmApplicationException(Exception ex) {
+        super(ex);
+    }
+
+}
index 90cfc09909bd84ff974481bfed98d01ecaa83cfe..ec310b56397e1e6b3325ef8d7db894b57add55eb 100644 (file)
@@ -1,28 +1,64 @@
 /**\r
-* Copyright (C) 2014 EDIT\r
-* European Distributed Institute of Taxonomy \r
-* http://www.e-taxonomy.eu\r
-* \r
-* The contents of this file are subject to the Mozilla Public License Version 1.1\r
-* See LICENSE.TXT at the top of this package for the full license terms.\r
-*/\r
+ * Copyright (C) 2014 EDIT\r
+ * European Distributed Institute of Taxonomy\r
+ * http://www.e-taxonomy.eu\r
+ *\r
+ * The contents of this file are subject to the Mozilla Public License Version 1.1\r
+ * See LICENSE.TXT at the top of this package for the full license terms.\r
+ */\r
 \r
 package eu.etaxonomy.cdm.api.application;\r
 \r
-import javax.sql.DataSource;\r
-\r
-import org.hibernate.SessionFactory;\r
-\r
 import org.apache.log4j.Logger;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
+import org.springframework.beans.BeansException;\r
+import org.springframework.context.ApplicationContext;\r
+import org.springframework.context.ApplicationContextAware;\r
+import org.springframework.security.authentication.ProviderManager;\r
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;\r
+import org.springframework.security.core.Authentication;\r
+import org.springframework.security.core.context.SecurityContext;\r
+import org.springframework.security.core.context.SecurityContextHolder;\r
 import org.springframework.stereotype.Component;\r
 import org.springframework.transaction.PlatformTransactionManager;\r
 import org.springframework.transaction.TransactionStatus;\r
 \r
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;\r
 import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;\r
+import eu.etaxonomy.cdm.api.service.IAgentService;\r
+import eu.etaxonomy.cdm.api.service.IClassificationService;\r
+import eu.etaxonomy.cdm.api.service.ICollectionService;\r
+import eu.etaxonomy.cdm.api.service.ICommonService;\r
 import eu.etaxonomy.cdm.api.service.IDatabaseService;\r
+import eu.etaxonomy.cdm.api.service.IDescriptionService;\r
+import eu.etaxonomy.cdm.api.service.IEntityConstraintViolationService;\r
+import eu.etaxonomy.cdm.api.service.IEntityValidationService;\r
+import eu.etaxonomy.cdm.api.service.IFeatureNodeService;\r
+import eu.etaxonomy.cdm.api.service.IFeatureTreeService;\r
+import eu.etaxonomy.cdm.api.service.IGrantedAuthorityService;\r
+import eu.etaxonomy.cdm.api.service.IGroupService;\r
+import eu.etaxonomy.cdm.api.service.IIdentificationKeyService;\r
+import eu.etaxonomy.cdm.api.service.ILocationService;\r
+import eu.etaxonomy.cdm.api.service.IMediaService;\r
+import eu.etaxonomy.cdm.api.service.INameService;\r
+import eu.etaxonomy.cdm.api.service.IOccurrenceService;\r
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;\r
+import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;\r
+import eu.etaxonomy.cdm.api.service.IReferenceService;\r
+import eu.etaxonomy.cdm.api.service.IService;\r
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;\r
+import eu.etaxonomy.cdm.api.service.ITaxonService;\r
+import eu.etaxonomy.cdm.api.service.ITermService;\r
+import eu.etaxonomy.cdm.api.service.IUserService;\r
+import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
+import eu.etaxonomy.cdm.api.service.IWorkingSetService;\r
+import eu.etaxonomy.cdm.api.service.molecular.IAmplificationService;\r
+import eu.etaxonomy.cdm.api.service.molecular.IPrimerService;\r
+import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;\r
 import eu.etaxonomy.cdm.ext.geo.IEditGeoService;\r
+import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.cdm.persistence.hibernate.permission.ICdmPermissionEvaluator;\r
+import eu.etaxonomy.taxeditor.service.ICachedCommonService;\r
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;\r
 \r
 \r
 /**\r
@@ -31,85 +67,256 @@ import eu.etaxonomy.cdm.ext.geo.IEditGeoService;
  *\r
  */\r
 @Component\r
-public class CdmApplicationRemoteConfiguration extends CdmApplicationDefaultConfiguration {\r
-       \r
-       @SuppressWarnings("unused")\r
-       private static final Logger logger = Logger.getLogger(CdmApplicationRemoteConfiguration.class);\r
-\r
-       @Autowired\r
-       IEditGeoService editGeoService;\r
-       \r
-       public CdmApplicationRemoteConfiguration() {\r
-       }\r
-       \r
+public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfiguration, ApplicationContextAware  {\r
+\r
+    @SuppressWarnings("unused")\r
+    private static final Logger logger = Logger.getLogger(CdmApplicationRemoteConfiguration.class);\r
+\r
+    protected ApplicationContext applicationContext;\r
+\r
+\r
+    public CdmApplicationRemoteConfiguration() {}\r
+\r
+    // ****************************** APPLICATION CONTEXT *************************************************/\r
+\r
+    @Override\r
+    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException{\r
+        this.applicationContext = applicationContext;\r
+    }\r
+\r
     /* (non-Javadoc)\r
      * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#getTransactionManager()\r
      */\r
     @Override\r
     public PlatformTransactionManager getTransactionManager() throws UnsupportedOperationException {\r
-               throw new UnsupportedOperationException("getTransactionManager is not implemented for CdmApplicationRemoteConfiguration");\r
-       }\r
+        throw new UnsupportedOperationException("getTransactionManager is not implemented for CdmApplicationRemoteConfiguration");\r
+    }\r
 \r
 \r
-    /* (non-Javadoc)\r
-     * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#startTransaction()\r
+\r
+    /**\r
+     * @return\r
+     */\r
+    public IEditGeoService getEditGeoService() {\r
+        return (IEditGeoService)getBean("editGeoService");\r
+    }\r
+\r
+    /**\r
+     * @return\r
      */\r
+    public ICachedCommonService getCachedCommonService(){\r
+        return (ICachedCommonService) getBean("cachedCommonService");\r
+    }\r
+\r
+\r
+    public ICdmEntitySessionManager getCdmEntitySessionManager() {\r
+        return (ICdmEntitySessionManager) getBean("cdmEntitySessionManager");\r
+    }\r
+\r
+\r
+\r
+\r
+\r
+\r
+ // ****************************** GETTER *************************************************/\r
+\r
     @Override\r
-    public TransactionStatus startTransaction() throws UnsupportedOperationException {\r
-               throw new UnsupportedOperationException("startTransaction is not implemented for CdmApplicationRemoteConfiguration");\r
-       }\r
+    public final Object getBean(String name){\r
+        return this.applicationContext.getBean(name);\r
+    }\r
+\r
+    @Override\r
+    public IAgentService getAgentService(){\r
+        return (IAgentService) getBean("agentService");\r
+    }\r
+\r
+    @Override\r
+    public IDatabaseService getDatabaseService(){\r
+        return (IDatabaseService) getBean("databaseService");\r
+    }\r
+\r
+    @Override\r
+    public INameService getNameService(){\r
+        return (INameService) getBean("nameService");\r
+    }\r
+\r
+    @Override\r
+    public IReferenceService getReferenceService(){\r
+        return (IReferenceService) getBean("referenceService");\r
+    }\r
+\r
+    @Override\r
+    public ITaxonService getTaxonService(){\r
+        return (ITaxonService) getBean("taxonService");\r
+    }\r
+\r
+    @Override\r
+    public IClassificationService getClassificationService(){\r
+        return (IClassificationService) getBean("classificationService");\r
+    }\r
+\r
+    @Override\r
+    public ITaxonNodeService getTaxonNodeService(){\r
+        return (ITaxonNodeService) getBean("taxonNodeService");\r
+    }\r
+\r
+    @Override\r
+    public IDescriptionService getDescriptionService(){\r
+        return (IDescriptionService) getBean("descriptionService");\r
+    }\r
+\r
+    @Override\r
+    public IOccurrenceService getOccurrenceService(){\r
+        return (IOccurrenceService) getBean("occurrenceService");\r
+    }\r
+\r
+    @Override\r
+    public IPrimerService getPrimerService(){\r
+        return (IPrimerService) getBean("primerService");\r
+    }\r
+\r
+    @Override\r
+    public IAmplificationService getAmplificationService(){\r
+        return (IAmplificationService) getBean("amplificationService");\r
+    }\r
+\r
+    @Override\r
+    public ISequenceService getSequenceService(){\r
+        return (ISequenceService) getBean("sequenceService");\r
+    }\r
+\r
+    @Override\r
+    public IMediaService getMediaService(){\r
+        return (IMediaService) getBean("mediaService");\r
+    }\r
+\r
+    @Override\r
+    public ITermService getTermService(){\r
+        return (ITermService) getBean("termService");\r
+    }\r
+\r
+    @Override\r
+    public ICommonService getCommonService(){\r
+        return (ICommonService) getBean("commonService");\r
+    }\r
+\r
+    @Override\r
+    public ILocationService getLocationService(){\r
+        return (ILocationService) getBean("locationService");\r
+    }\r
+\r
+    @Override\r
+    public IUserService getUserService(){\r
+        return (IUserService) getBean("userService");\r
+    }\r
+\r
+    @Override\r
+    public IGrantedAuthorityService getGrantedAuthorityService(){\r
+        return (IGrantedAuthorityService) getBean("grantedAuthorityService");\r
+    }\r
+\r
+    @Override\r
+    public IService<CdmBase> getMainService(){\r
+        return (IService<CdmBase>) getBean("mainService");\r
+    }\r
+\r
+\r
+    @Override\r
+    public ProviderManager getAuthenticationManager(){\r
+        return (ProviderManager) getBean("authenticationManager");\r
+    }\r
+\r
+\r
+    @Override\r
+    public ConversationHolder NewConversation() {\r
+        return new ConversationHolderMock();\r
+    }\r
+\r
+    @Override\r
+    public ICollectionService getCollectionService(){\r
+        return (ICollectionService) getBean("collectionService");\r
+    }\r
+\r
+    @Override\r
+    public IFeatureTreeService getFeatureTreeService(){\r
+        return (IFeatureTreeService) getBean("featureTreeService");\r
+    }\r
+\r
+    @Override\r
+    public IFeatureNodeService getFeatureNodeService(){\r
+        return (IFeatureNodeService) getBean("featureNodeService");\r
+    }\r
+\r
+    @Override\r
+    public IVocabularyService getVocabularyService(){\r
+        return (IVocabularyService) getBean("vocabularyService");\r
+    }\r
+\r
+    @Override\r
+    public IIdentificationKeyService getIdentificationKeyService(){\r
+        return (IIdentificationKeyService) getBean("identificationKeyService");\r
+    }\r
+\r
+    @Override\r
+    public IPolytomousKeyService getPolytomousKeyService(){\r
+        return (IPolytomousKeyService) getBean("polytomousKeyService");\r
+    }\r
 \r
 \r
-    /* (non-Javadoc)\r
-     * @see eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration#startTransaction()\r
-     */\r
+    @Override\r
+    public IPolytomousKeyNodeService getPolytomousKeyNodeService(){\r
+        return (IPolytomousKeyNodeService) getBean("polytomousKeyNodeService");\r
+    }\r
+\r
+    @Override\r
+    public IWorkingSetService getWorkingSetService(){\r
+        return (IWorkingSetService) getBean("workingSetService");\r
+    }\r
+\r
+    @Override\r
+    public IGroupService getGroupService(){\r
+        return (IGroupService) getBean("groupService");\r
+    }\r
+\r
+\r
+    @Override\r
+    public IEntityValidationService getEntityValidationService(){\r
+        return (IEntityValidationService) getBean("entityValidationService");\r
+    }\r
+\r
+\r
+    @Override\r
+    public IEntityConstraintViolationService getEntityConstraintViolationService(){\r
+        return (IEntityConstraintViolationService) getBean("entityConstraintViolationService");\r
+    }\r
+\r
+    @Override\r
+    public ICdmPermissionEvaluator getPermissionEvaluator(){\r
+        return (ICdmPermissionEvaluator) getBean("cdmPermissionEvaluator");\r
+    }\r
+\r
+\r
+    @Override\r
+    public TransactionStatus startTransaction() throws UnsupportedOperationException {\r
+        throw new UnsupportedOperationException("startTransaction is not implemented for CdmApplicationRemoteConfiguration");\r
+    }\r
+\r
     @Override\r
     public TransactionStatus startTransaction(Boolean readOnly) throws UnsupportedOperationException {\r
-               throw new UnsupportedOperationException("startTransaction is not implemented for CdmApplicationRemoteConfiguration");\r
-       }\r
+        throw new UnsupportedOperationException("startTransaction is not implemented for CdmApplicationRemoteConfiguration");\r
+    }\r
 \r
 \r
-    /* (non-Javadoc)\r
-     * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#commitTransaction(org.springframework.transaction.TransactionStatus)\r
-     */\r
     @Override\r
     public void commitTransaction(TransactionStatus txStatus) throws UnsupportedOperationException {\r
-               throw new UnsupportedOperationException("commitTransaction is not implemented for CdmApplicationRemoteConfiguration");\r
-       }\r
-                       \r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#NewConversation()\r
-        */\r
-       @Override\r
-       public ConversationHolder NewConversation() {           \r
-               return new ConversationHolderMock();\r
-       }\r
-       \r
-       /**\r
-        * @return\r
-        */\r
-       public IEditGeoService getEditGeoService() {\r
-               return this.editGeoService;\r
-       }\r
-       \r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#setDataSource(javax.sql.DataSource)\r
-        */\r
-       @Override\r
-       public void setDataSource(DataSource dataSource) {                      \r
-    }\r
-       \r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#setTransactionManager(org.springframework.transaction.PlatformTransactionManager)\r
-        */\r
-       @Override\r
-       public void setTransactionManager(PlatformTransactionManager transactionManager) {        \r
-    }\r
-       \r
-       /* (non-Javadoc)\r
-        * @see eu.etaxonomy.cdm.api.application.CdmApplicationDefaultConfiguration#setSessionFactory(org.hibernate.SessionFactory)\r
-        */\r
-       @Override\r
-    public void setSessionFactory(SessionFactory sessionFactory) {     \r
+        throw new UnsupportedOperationException("commitTransaction is not implemented for CdmApplicationRemoteConfiguration");\r
+    }\r
+\r
+    @Override\r
+    public void authenticate(String username, String password){\r
+        UsernamePasswordAuthenticationToken tokenForUser = new UsernamePasswordAuthenticationToken(username, password);\r
+        Authentication authentication = this.getAuthenticationManager().authenticate(tokenForUser);\r
+        SecurityContext context = SecurityContextHolder.getContext();\r
+        context.setAuthentication(authentication);\r
     }\r
 }\r
index 5473ac141981dafc244e0b157a25e9ab7282a0b5..a0fa11a365a6e7ff7e9a79f86b7ee802c63aa88f 100644 (file)
@@ -1,11 +1,11 @@
 /**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
+ * Copyright (C) 2014 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
 
 
 package eu.etaxonomy.cdm.api.application;
@@ -16,39 +16,44 @@ import java.util.Properties;
 import org.apache.log4j.Logger;
 import org.hibernate.collection.internal.AbstractPersistentCollection;
 import org.hibernate.proxy.AbstractLazyInitializer;
-import org.springframework.beans.MutablePropertyValues;
-import org.springframework.beans.factory.config.BeanDefinition;
 import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
 import org.springframework.context.ApplicationListener;
+import org.springframework.context.support.GenericApplicationContext;
 import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
 
+import eu.etaxonomy.cdm.api.service.ITestService;
 import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
 import eu.etaxonomy.cdm.common.monitor.NullProgressMonitor;
-import eu.etaxonomy.cdm.common.monitor.SubProgressMonitor;
-import eu.etaxonomy.cdm.remote.ICdmRemoteSource;
+import eu.etaxonomy.cdm.io.service.IIOService;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmRemoteCacheManager;
+import eu.etaxonomy.taxeditor.remoting.source.ICdmRemoteSource;
+import eu.etaxonomy.taxeditor.service.ICachedCommonService;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
 
 /**
  * CDM Application Controller class for remoting clients
- * 
+ *
  * FIXME:Remoting extending {@link CdmApplicationController} is a temporary workaround.
  * The {@link CdmApplicationController} should be split into a CdmApplicationControllerBase
  * class with {@link CdmApplicationController} and this class as subclasses
  *
  */
 public class CdmApplicationRemoteController  extends CdmApplicationController {
-       
+
     private static final Logger logger = Logger.getLogger(CdmApplicationRemoteController.class);
 
-    public static final Resource DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE = 
-               new ClassPathResource("/eu/etaxonomy/cdm/remotingApplicationContext.xml");
+
+    public static final Resource DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE =
+            new ClassPathResource("/eu/etaxonomy/cdm/remotingApplicationContext.xml");
     private final Resource applicationContextResource;
     private final IProgressMonitor progressMonitor;
-    
+
+
     /**
      * Creates new instance of CdmApplicationRemoteController
-     * 
+     *
      * @param applicationContextResource
      * @param remoteSource
      * @param omitTermLoading
@@ -56,21 +61,20 @@ public class CdmApplicationRemoteController  extends CdmApplicationController {
      * @param listeners
      * @return
      */
-    public static CdmApplicationRemoteController NewInstance(Resource applicationContextResource, 
-                       ICdmRemoteSource remoteSource,                          
-                       boolean omitTermLoading, 
-                       IProgressMonitor progressMonitor, 
-                       List<ApplicationListener> listeners) {
-       return new CdmApplicationRemoteController(applicationContextResource, 
-                       remoteSource, 
-                       omitTermLoading, 
-                       progressMonitor, 
-                               listeners);
-       
-    }
+//    public static CdmApplicationRemoteController NewInstance(Resource applicationContextResource,
+//            ICdmRemoteSource remoteSource,
+//            IProgressMonitor progressMonitor,
+//            List<ApplicationListener> listeners) {
+//        return new CdmApplicationRemoteController(applicationContextResource,
+//                remoteSource,
+//                false,
+//                progressMonitor,
+//                listeners);
+//
+//    }
     /**
      * Creates new instance of CdmApplicationRemoteController
-     * 
+     *
      * @param applicationContextResource
      * @param remoteSource
      * @param omitTermLoading
@@ -78,66 +82,80 @@ public class CdmApplicationRemoteController  extends CdmApplicationController {
      * @param listeners
      * @return
      */
-    public static CdmApplicationRemoteController NewInstance(ICdmRemoteSource remoteSource,                            
-                       boolean omitTermLoading, 
-                       IProgressMonitor progressMonitor, 
-                       List<ApplicationListener> listeners) {
-       
-       return new CdmApplicationRemoteController(DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE, 
-                       remoteSource, 
-                       omitTermLoading, 
-                       progressMonitor, 
-                               listeners);
-       
+    public static CdmApplicationRemoteController NewInstance(ICdmRemoteSource remoteSource,
+            IProgressMonitor progressMonitor,
+            List<ApplicationListener> listeners) {
+
+        return new CdmApplicationRemoteController(DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE,
+                remoteSource,
+                false,
+                progressMonitor,
+                listeners);
+
+    }
+
+    public static CdmApplicationRemoteController NewInstance(ICdmRemoteSource remoteSource,
+            boolean validateXml,
+            IProgressMonitor progressMonitor,
+            List<ApplicationListener> listeners) {
+
+        return new CdmApplicationRemoteController(DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE,
+                remoteSource,
+                validateXml,
+                progressMonitor,
+                listeners);
+
     }
-    
-       /**
-        * Constructs CdmApplicationRemoteController
-        * 
-        * @param applicationContextResource
-        * @param remoteSource
-        * @param omitTermLoading
-        * @param progressMonitor
-        * @param listeners
-        */
-       private CdmApplicationRemoteController(Resource applicationContextResource, 
-                               ICdmRemoteSource remoteSource,                          
-                               boolean omitTermLoading, 
-                               IProgressMonitor progressMonitor, 
-                               List<ApplicationListener> listeners){
-               logger.info("Start CdmApplicationRemoteController with remote source: " + remoteSource.getName());
-        this.applicationContextResource = 
-                       applicationContextResource != null ? applicationContextResource : DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE;
+
+    /**
+     * Constructs CdmApplicationRemoteController
+     *
+     * @param applicationContextResource
+     * @param remoteSource
+     * @param omitTermLoading
+     * @param progressMonitor
+     * @param listeners
+     */
+    private CdmApplicationRemoteController(Resource applicationContextResource,
+            ICdmRemoteSource remoteSource,
+            boolean validateXml,
+            IProgressMonitor progressMonitor,
+            List<ApplicationListener> listeners){
+        logger.info("Start CdmApplicationRemoteController with remote source: " + remoteSource.getName());
+        this.applicationContextResource =
+                applicationContextResource != null ? applicationContextResource : DEFAULT_REMOTE_APPLICATION_CONTEXT_RESOURCE;
         this.progressMonitor = progressMonitor != null ? progressMonitor : new NullProgressMonitor();
+        setNewRemoteSource(remoteSource, validateXml, listeners);
+
+    }
+
+
 
-        setNewRemoteSource(remoteSource, omitTermLoading, listeners);
-               
-       }
-       
 
-    
-    
     /**
      * Creates and starts a new spring application context
-     * 
+     *
      * @param remoteSource object for connecting to an http-invoker server
      * @param omitTermLoading
      * @param listeners
      * @return
      */
-    protected boolean setNewRemoteSource(ICdmRemoteSource remoteSource, 
-               boolean omitTermLoading, 
-               List<ApplicationListener> listeners){
+    public boolean setNewRemoteSource(ICdmRemoteSource remoteSource,
+            boolean validateXml,
+            List<ApplicationListener> listeners){
 
         logger.info("Connecting to '" + remoteSource.getName() + "'");
 
-        MonitoredGenericApplicationContext applicationContext =  new MonitoredGenericApplicationContext();
-        int refreshTasks = 45;
-        int nTasks = 5 + refreshTasks;
+        GenericApplicationContext applicationContext =  new GenericApplicationContext();
+
+        int nTasks = 3;
 
         progressMonitor.beginTask("Connecting to '" + remoteSource.getName() + "'", nTasks);
 
-        progressMonitor.subTask("Registering remote source.");
+        progressMonitor.subTask("Initialising CDM Model Cache ...");
+        CdmRemoteCacheManager.getInstance();
+
+        progressMonitor.subTask("Loading context beans ...");
         PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer();
         Properties properties = new Properties();
         properties.setProperty("remoteServer", remoteSource.getServer());
@@ -145,49 +163,58 @@ public class CdmApplicationRemoteController  extends CdmApplicationController {
         properties.setProperty("remoteContext", remoteSource.getContextPath());
         pspc.setProperties(properties);
         applicationContext.addBeanFactoryPostProcessor(pspc);
-        progressMonitor.worked(1);
-
+        applicationContext.getEnvironment().setActiveProfiles("remoting");
         XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(applicationContext);
-        //xmlReader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_NONE);
-        progressMonitor.subTask("Registering resources.");
-        xmlReader.loadBeanDefinitions(applicationContextResource);
-        progressMonitor.worked(1);
-
-        //omitTerms
-        if (omitTermLoading == true){
-            String initializerName = "persistentTermInitializer";
-            BeanDefinition beanDef = applicationContext.getBeanDefinition(initializerName);
-            MutablePropertyValues values = beanDef.getPropertyValues();
-            values.addPropertyValue("omit", omitTermLoading);
+        if(!validateXml) {
+            xmlReader.setValidating(false);
         }
-
+        xmlReader.loadBeanDefinitions(applicationContextResource);
         if (listeners != null){
             for(ApplicationListener listener : listeners){
                 applicationContext.addApplicationListener(listener);
             }
         }
+        progressMonitor.worked(1);
 
-
-        applicationContext.refresh(new SubProgressMonitor(progressMonitor, refreshTasks));
+        progressMonitor.subTask("Starting application context ...");
+        applicationContext.refresh();
         applicationContext.start();
-
-        progressMonitor.subTask("Cleaning up.");
         setApplicationContext(applicationContext);
         progressMonitor.worked(1);
-
         progressMonitor.done();
         return true;
     }
-    
+
+
+
     /* (non-Javadoc)
      * @see eu.etaxonomy.cdm.api.application.CdmApplicationController#init()
      */
     @Override
-    protected void init(){    
+    protected void init(){
+
+        // retrieving the application configuration
         configuration = (ICdmApplicationConfiguration)applicationContext.getBean("cdmApplicationRemoteConfiguration");
-               AbstractLazyInitializer.setConfiguration(this);
-               AbstractPersistentCollection.setConfiguration(this);
+        AbstractLazyInitializer.setConfiguration((CdmApplicationRemoteConfiguration)configuration);
+        AbstractPersistentCollection.setConfiguration((CdmApplicationRemoteConfiguration)configuration);
+
+
 
     }
 
+    public ICdmEntitySessionManager getCdmEntitySessionManager() {
+        return ((CdmApplicationRemoteConfiguration)configuration).getCdmEntitySessionManager();
+    }
+
+    public IIOService getIOService(){
+        return (IIOService) getBean("ioService");
+    }
+
+    public ITestService getTestService(){
+        return (ITestService) getBean("testService");
+    }
+
+    public ICachedCommonService getCachedCommonService(){
+        return (ICachedCommonService) getBean("cachedCommonService");
+    }
 }
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationState.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationState.java
new file mode 100644 (file)
index 0000000..07dfa81
--- /dev/null
@@ -0,0 +1,205 @@
+// $Id$
+/**
+* Copyright (C) 2015 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.api.application;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+
+import org.springframework.security.core.context.SecurityContext;
+
+import eu.etaxonomy.cdm.api.cache.CdmServiceCacher;
+import eu.etaxonomy.cdm.api.service.ICommonService;
+import eu.etaxonomy.cdm.api.service.IService;
+import eu.etaxonomy.cdm.api.service.ITestService;
+import eu.etaxonomy.cdm.io.service.IIOService;
+import eu.etaxonomy.taxeditor.service.ICachedCommonService;
+
+/**
+ * @author cmathew
+ * @date 17 Jun 2015
+ *
+ */
+public class CdmApplicationState {
+
+    private static CdmApplicationState cdmApplicationState;
+
+    private ICdmApplicationConfiguration appConfig;
+
+    private ICdmDataChangeService dataChangeService;
+
+    private SecurityContext securityContext;
+
+    private static CdmServiceCacher cdmServiceCacher;
+
+
+    public static CdmApplicationState getInstance() {
+        if(cdmApplicationState == null) {
+            cdmApplicationState = new CdmApplicationState();
+            cdmServiceCacher = new CdmServiceCacher();
+        }
+
+        return cdmApplicationState;
+    }
+
+    public void setAppConfig(ICdmApplicationConfiguration appConfig) {
+        this.appConfig = appConfig;
+    }
+
+    public ICdmApplicationConfiguration getAppConfig() {
+        return appConfig;
+    }
+
+    public static void setCurrentAppConfig(ICdmApplicationConfiguration appConfig) {
+        getInstance().setAppConfig(appConfig);
+    }
+
+    public static ICdmApplicationConfiguration getCurrentAppConfig() {
+        return getInstance().getAppConfig();
+    }
+
+    /**
+     * @return the dataChangeService
+     */
+    public ICdmDataChangeService getDataChangeService() {
+        return dataChangeService;
+    }
+
+    /**
+     * @param dataChangeService the dataChangeService to set
+     */
+    public void setDataChangeService(ICdmDataChangeService dataChangeService) {
+        this.dataChangeService = dataChangeService;
+    }
+
+    public static ICdmDataChangeService getCurrentDataChangeService() {
+        return getInstance().getDataChangeService();
+    }
+
+    public static void setCurrentDataChangeService(ICdmDataChangeService dataChangeService) {
+        getInstance().setDataChangeService(dataChangeService);
+    }
+
+
+
+    /**
+     * @return the securityContext
+     */
+    public SecurityContext getSecurityContext() {
+        return securityContext;
+    }
+
+    /**
+     * @param securityContext the securityContext to set
+     */
+    public void setSecurityContext(SecurityContext securityContext) {
+        this.securityContext = securityContext;
+    }
+
+    /**
+     * @return the securityContext
+     */
+    public static SecurityContext getCurrentSecurityContext() {
+        return getInstance().getSecurityContext();
+    }
+
+    /**
+     * @param securityContext the securityContext to set
+     */
+    public static void setCurrentSecurityContext(SecurityContext securityContext) {
+        getInstance().setSecurityContext(securityContext);
+    }
+
+    public static void dispose() {
+        getInstance().setCurrentDataChangeService(null);
+        getInstance().setAppConfig(null);
+        getInstance().setSecurityContext(null);
+        cdmApplicationState = null;
+        cdmServiceCacher = null;
+    }
+
+
+    /**
+     * Generic method that will scan the getters of {@link ICdmApplicationConfiguration} for the given service
+     * interface. If a matching getter is found the according service implementation is returned by
+     * invoking the getter otherwise the method returns <code>null</code>.
+     *
+     * @param <T>
+     * @param serviceClass
+     * @return the configured implementation of <code>serviceClass</code> or <code>null</code>
+     * @throws CdmApplicationException
+     */
+    public static <T extends IService> T getService(Class<T> serviceClass) throws CdmApplicationException {
+        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+
+        Method[] methods = ICdmApplicationConfiguration.class.getDeclaredMethods();
+
+        T service = null;
+
+        for (Method method : methods) {
+            Type type = method.getGenericReturnType();
+
+            if (type.equals(serviceClass)) {
+                try {
+                    service = (T) method.invoke(configuration, null);
+                    break;
+                } catch (IllegalArgumentException iae) {
+                    throw new CdmApplicationException(iae);
+                } catch (IllegalAccessException iae) {
+                    throw new CdmApplicationException(iae);
+                } catch (InvocationTargetException ite) {
+                    throw new CdmApplicationException(ite);
+                }
+            }
+        }
+
+        return service;
+    }
+
+
+    /**
+     * @see #getService(Class)
+     * As ICommonService is not extending IService we need a specific request here
+     */
+    public static ICommonService getCommonService() {
+        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+
+        return configuration.getCommonService();
+
+    }
+
+    public static IIOService getIOService() {
+        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+
+        return ((CdmApplicationRemoteController)configuration).getIOService();
+
+    }
+
+
+    public static ITestService getTestService() {
+        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+
+        return ((CdmApplicationRemoteController)configuration).getTestService();
+
+    }
+
+    public static ICachedCommonService getCachedCommonService() {
+        ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+
+        return ((CdmApplicationRemoteController)configuration).getCachedCommonService();
+
+    }
+
+    public static CdmServiceCacher getCdmServiceCacher() {
+        return cdmServiceCacher;
+    }
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmChangeEvent.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmChangeEvent.java
new file mode 100644 (file)
index 0000000..26fb75d
--- /dev/null
@@ -0,0 +1,86 @@
+// $Id$
+/**
+* Copyright (C) 2015 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.api.application;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+/**
+ * @author cmathew
+ * @date 7 Apr 2015
+ *
+ */
+public class CdmChangeEvent {
+
+    public enum Action {
+        Create,
+        Update,
+        Delete
+    }
+
+    private final Action action;
+    private final Set<CdmBase> changedObjects;
+    private final Class sourceType;
+    private Object source;
+
+    public CdmChangeEvent(Action action, Set<CdmBase> changedObjects, Class sourceType) {
+        this.action = action;
+        this.changedObjects = changedObjects;
+        this.sourceType = sourceType;
+    }
+
+    public CdmChangeEvent(Action action, CdmBase changedObject, Class sourceType) {
+        this.action = action;
+        changedObjects = new HashSet<CdmBase>();
+        changedObjects.add(changedObject);
+        this.sourceType = sourceType;
+    }
+
+    public CdmChangeEvent(Action action, Set<CdmBase> changedObjects, Object source) {
+        this(action, changedObjects, source.getClass());
+        this.source = source;
+    }
+
+    /**
+     * @return the action
+     */
+    public Action getAction() {
+        return action;
+    }
+
+    /**
+     * @return the changedObjects
+     */
+    public Set<? extends CdmBase> getChangedObjects() {
+        return changedObjects;
+    }
+
+    /**
+     * @return the sourceType
+     */
+    public Class getSourceType() {
+        return sourceType;
+    }
+
+
+    /**
+     * @return the source
+     */
+    public Object getSource() {
+        return source;
+    }
+
+    public boolean hasChanges() {
+        return changedObjects != null && !changedObjects.isEmpty();
+    }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmDataChangeService.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmDataChangeService.java
new file mode 100644 (file)
index 0000000..f569102
--- /dev/null
@@ -0,0 +1,94 @@
+// $Id$
+/**
+ * Copyright (C) 2015 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.cdm.api.application;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author cmathew
+ * @date 18 Jun 2015
+ *
+ */
+public class CdmDataChangeService implements ICdmDataChangeService {
+
+    protected final Set<ICdmChangeListener> listeners;
+
+    private final List<CdmChangeEvent> currentEvents;
+
+    public CdmDataChangeService() {
+        listeners = new HashSet<ICdmChangeListener>();
+        currentEvents = new ArrayList<CdmChangeEvent>();
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.store.ICdmDataChangeService#register(eu.etaxonomy.cdm.api.application.ICdmChangeListener)
+     */
+    @Override
+    public void register(ICdmChangeListener listener) {
+        listeners.add(listener);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.cdm.api.application.ICdmDataChangeService#unregister(eu.etaxonomy.cdm.api.application.ICdmChangeListener)
+     */
+    @Override
+    public void unregister(ICdmChangeListener listener) {
+        listeners.remove(listener);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.store.ICdmDataChangeService#addEvent(eu.etaxonomy.cdm.api.application.CdmChangeEvent)
+     */
+    @Override
+    public void addEvent(CdmChangeEvent event) {
+        currentEvents.add(event);
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.store.ICdmDataChangeService#fireCurrentChangeEvents(boolean)
+     */
+    @Override
+    public void fireCurrentChangeEvents(boolean async) {
+        try {
+            for(CdmChangeEvent event : currentEvents) {
+                fireChangeEvent(event,async);
+            }
+        } finally {
+            currentEvents.clear();
+        }
+    }
+
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.store.ICdmDataChangeService#fireChangeEvent(eu.etaxonomy.cdm.api.application.CdmChangeEvent, boolean)
+     */
+    @Override
+    public void fireChangeEvent(final CdmChangeEvent event, boolean async) {
+
+        for(final ICdmChangeListener listener : listeners) {
+            listener.onChange(event);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.store.ICdmDataChangeService#clear()
+     */
+    @Override
+    public void clear() {
+        listeners.clear();
+        currentEvents.clear();
+    }
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/ICdmChangeListener.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/ICdmChangeListener.java
new file mode 100644 (file)
index 0000000..4ae1834
--- /dev/null
@@ -0,0 +1,21 @@
+// $Id$
+/**
+* Copyright (C) 2015 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.api.application;
+
+/**
+ * @author cmathew
+ * @date 7 Apr 2015
+ *
+ */
+public interface ICdmChangeListener {
+
+    public void onChange(CdmChangeEvent event);
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/ICdmDataChangeService.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/ICdmDataChangeService.java
new file mode 100644 (file)
index 0000000..84bb324
--- /dev/null
@@ -0,0 +1,32 @@
+// $Id$
+/**
+ * Copyright (C) 2015 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.cdm.api.application;
+
+
+/**
+ * @author cmathew
+ * @date 18 Jun 2015
+ *
+ */
+public interface ICdmDataChangeService {
+
+    public abstract void register(ICdmChangeListener listener);
+
+    public abstract void unregister(ICdmChangeListener listener);
+
+    public abstract void addEvent(CdmChangeEvent event);
+
+    public abstract void fireCurrentChangeEvents(boolean async);
+
+    public abstract void fireChangeEvent(CdmChangeEvent event, boolean async);
+
+    public abstract void clear();
+
+}
\ No newline at end of file
index 4de156c496dadc30b98aa873290f29f8d6b2613e..288b20eb1310bbca841295655c6be1ea98bd233c 100644 (file)
@@ -2,11 +2,22 @@ package eu.etaxonomy.cdm.api.cache;
 
 import java.util.UUID;
 
-import org.springframework.beans.factory.annotation.Autowired;
+import net.sf.ehcache.config.CacheConfiguration;
+import net.sf.ehcache.config.SizeOfPolicyConfiguration;
+
 import org.springframework.stereotype.Component;
 
-import eu.etaxonomy.cdm.api.service.ITermService;
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.taxeditor.remoting.cache.CacheLoader;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmEntityCacheKey;
+import eu.etaxonomy.taxeditor.remoting.cache.CdmTransientEntityCacher;
+import eu.etaxonomy.taxeditor.service.TermServiceRequestExecutor;
+import eu.etaxonomy.taxeditor.session.CdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManagerObserver;
 
 /**
  * Class which uses CDM services to cache cdm entities
@@ -20,41 +31,120 @@ import eu.etaxonomy.cdm.model.common.CdmBase;
  * @param <T>
  */
 @Component
-public class CdmServiceCacher<T extends CdmBase> extends CdmCacher {
+public class CdmServiceCacher extends CdmCacher  implements ICdmEntitySessionManagerObserver {
 
-       @Autowired
-       ITermService termService;
 
-       @Override
-       protected T findByUuid(UUID uuid) {
-               return (T)termService.findWithoutFlush(uuid);
-       }
 
-    /* (non-Javadoc)
-     * @see eu.etaxonomy.cdm.api.cache.CdmCacher#setup()
-     */
+    private ICdmEntitySessionManager cdmEntitySessionManager;
+
+    private CdmTransientEntityCacher cdmTransientEntityCacher;
+
+    private CacheLoader cacheLoader;
+
     @Override
     protected void setup() {
-        // TODO Auto-generated method stub
+        DefinedTermBase.setCacher(this);
+        CdmTransientEntityCacher.setDefaultCacher(this);
+        TermServiceRequestExecutor.setDefaultCacher(this);
 
+        cacheLoader = new CacheLoader(this);
+    }
+
+
+    @Override
+    protected CacheConfiguration getDefaultCacheConfiguration() {
+        // For a better understanding on how to size caches, refer to
+        // http://ehcache.org/documentation/configuration/cache-size
+
+        SizeOfPolicyConfiguration sizeOfConfig = new SizeOfPolicyConfiguration();
+        sizeOfConfig.setMaxDepth(100);
+        sizeOfConfig.setMaxDepthExceededBehavior("abort");
+
+        return new CacheConfiguration(DEFAULT_CACHE_NAME, 0)
+        .eternal(true)
+        .statistics(true)
+        .sizeOfPolicy(sizeOfConfig)
+        .overflowToOffHeap(false);
+
+    }
+
+    @Override
+    protected CdmBase findByUuid(UUID uuid) {
+        CdmBase term = CdmApplicationState.getCurrentAppConfig().getTermService().findWithoutFlush(uuid);
+        return load(term);
     }
 
     /* (non-Javadoc)
      * @see eu.etaxonomy.cdm.model.ICdmCacher#isCachable(eu.etaxonomy.cdm.model.common.CdmBase)
      */
     @Override
-    public boolean isCachable(CdmBase arg0) {
-        // TODO Auto-generated method stub
+    public boolean isCachable(CdmBase cdmEntity) {
+        if(cdmEntity != null && cdmEntity instanceof DefinedTermBase) {
+            return true;
+        }
         return false;
     }
 
+
+    public void setCdmEntitySessionManager(ICdmEntitySessionManager cdmEntitySessionManager) {
+        this.cdmEntitySessionManager = cdmEntitySessionManager;
+        if(cdmEntitySessionManager != null) {
+            cdmEntitySessionManager.addSessionObserver(this);
+        }
+    }
+
+
+    public CdmTransientEntityCacher getCurrentCacher() {
+        ICdmEntitySession cdmEntitySession = cdmEntitySessionManager.getActiveSession();
+        if(cdmEntitySession != null && cdmEntitySession instanceof CdmEntitySession) {
+            return ((CdmEntitySession) cdmEntitySession).getCacher();
+        }
+        return null;
+    }
+
+    @Override
+    public CdmBase getFromCache(CdmBase cdmBase) {
+        CdmBase cachedCdmEntity = null;
+        // first we check in the active session cache if the
+        // entity has been loaded there
+        // FIXME:Remoting do we really need the cdmTransientEntityCacher
+        // here. Is it not guarenteed that all every entity which 'isCachable'
+        // by this cacher is cached only in this cacher ?
+        if(!isCachable(cdmBase) && cdmTransientEntityCacher != null) {
+            CdmEntityCacheKey key = CdmTransientEntityCacher.generateKey(cdmBase);
+            cachedCdmEntity = cdmTransientEntityCacher.getFromCache(key);
+
+        }
+        if(cachedCdmEntity == null) {
+            cachedCdmEntity = super.getFromCache(cdmBase);
+        }
+        return cachedCdmEntity;
+    }
+
+
     /* (non-Javadoc)
      * @see eu.etaxonomy.cdm.api.cache.CdmCacher#load(eu.etaxonomy.cdm.model.common.CdmBase)
      */
     @Override
-    public CdmBase load(CdmBase arg0) {
-        // TODO Auto-generated method stub
-        return null;
+    public CdmBase load(CdmBase cdmEntity) {
+        CdmBase cachedCdmEntity = getFromCache(cdmEntity.getUuid());
+
+        if(isCachable(cdmEntity) && cachedCdmEntity == null) {
+            cachedCdmEntity =  cacheLoader.load(cdmEntity, false, true);
+        }
+        return cachedCdmEntity;
     }
 
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionManagerObserver#changed()
+     */
+    @Override
+    public void changed() {
+        ICdmEntitySession cdmEntitySession = cdmEntitySessionManager.getActiveSession();
+        if(cdmEntitySession != null && cdmEntitySession instanceof CdmEntitySession) {
+            this.cdmTransientEntityCacher = ((CdmEntitySession) cdmEntitySession).getCacher();
+        } else {
+            this.cdmTransientEntityCacher = null;
+        }
+    }
 }
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmEagerLoadingException.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmEagerLoadingException.java
new file mode 100644 (file)
index 0000000..08cc011
--- /dev/null
@@ -0,0 +1,13 @@
+package eu.etaxonomy.taxeditor.remoting;
+
+public class CdmEagerLoadingException extends RuntimeException {
+       
+       public CdmEagerLoadingException(Throwable t) {
+               super(t);
+       }
+       
+       public CdmEagerLoadingException(String message) {
+               super(message);
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmRemotingException.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/CdmRemotingException.java
new file mode 100644 (file)
index 0000000..13fcb4f
--- /dev/null
@@ -0,0 +1,18 @@
+package eu.etaxonomy.taxeditor.remoting;
+
+public class CdmRemotingException extends RuntimeException {
+
+       /**
+        *
+        */
+       private static final long serialVersionUID = -560332689478356360L;
+
+       public CdmRemotingException(String message) {
+               super(message);
+       }
+
+       public CdmRemotingException(Exception exception) {
+           super(exception);
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CacheLoader.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CacheLoader.java
new file mode 100644 (file)
index 0000000..ba31ba3
--- /dev/null
@@ -0,0 +1,391 @@
+// $Id$
+/**
+ * Copyright (C) 2015 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.taxeditor.remoting.cache;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.Element;
+
+import org.apache.log4j.Logger;
+import org.springframework.util.ReflectionUtils;
+
+import eu.etaxonomy.cdm.model.ICdmCacher;
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+/**
+ * @author cmathew
+ * @date 19 Feb 2015
+ *
+ */
+public class CacheLoader {
+    private static final Logger logger = Logger.getLogger(CacheLoader.class);
+
+    private static boolean isRecursiveEnabled = true;
+
+    protected final ICdmCacher cdmCacher;
+
+    private final Cache cdmlibModelCache;
+
+
+
+    public CacheLoader(ICdmCacher cdmCacher) {
+        this.cdmCacher = cdmCacher;
+        this.cdmlibModelCache = CdmRemoteCacheManager.getInstance().getCdmModelGetMethodsCache();
+
+    }
+
+
+    public CdmModelFieldPropertyFromClass getFromCdmlibModelCache(String className) {
+        Element e = cdmlibModelCache.get(className);
+        if (e == null) {
+            return null;
+        } else {
+            return (CdmModelFieldPropertyFromClass) e.getObjectValue();
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public <T extends Object> T load(T obj, boolean recursive, boolean update) {
+        if(obj == null) {
+            return null;
+        }
+        if(obj instanceof CdmBase) {
+            return (T) load((CdmBase)obj, recursive, update);
+        } else if (obj instanceof Map) {
+            return (T) load((Map<T,T>)obj, recursive, update);
+        } else if (obj instanceof Collection) {
+            return (T) load((Collection<T>)obj, recursive, update);
+        }
+
+        return obj;
+    }
+
+    @SuppressWarnings("unchecked")
+    private <T extends Object> T loadRecursive(T obj, List<Object> alreadyVisitedEntities, boolean update) {
+        if(obj == null) {
+            return null;
+        }
+        if(obj instanceof CdmBase) {
+            return (T) loadRecursive((CdmBase)obj, alreadyVisitedEntities, update);
+        } else if (obj instanceof Map) {
+            return (T) load((Map<T,T>)obj, alreadyVisitedEntities, update);
+        } else if (obj instanceof Collection) {
+            return (T) load((Collection<T>)obj, alreadyVisitedEntities, update);
+        }
+
+
+        logger.info("No caching yet for type " + obj.getClass().getName());
+
+        return obj;
+    }
+
+    public <T extends Object> Map<T,T> load(Map<T,T> map, boolean recursive, boolean update){
+
+
+        if(isRecursiveEnabled && recursive) {
+            logger.info("---- starting recursive load for cdm entity map");
+            List<Object> alreadyVisitedEntities = new ArrayList<Object>();
+            Map<T,T> cachedMap = load(map, alreadyVisitedEntities, update);
+            alreadyVisitedEntities.clear();
+            logger.info("---- ending recursive load for cdm entity map \n");
+            return cachedMap;
+        } else {
+            return load(map, null, update);
+        }
+    }
+
+
+    private <T extends Object> Map<T,T> load(Map<T,T> map, List<Object> alreadyVisitedEntities, boolean update){
+        //map = (Map<T,T>)deproxy(map);
+
+        if(map == null || map.isEmpty()) {
+            return map;
+        }
+
+        int originalMapSize = map.size();
+        Object[] result = new Object[ map.size() * 2 ];
+        Iterator<Map.Entry<T,T>> iter = map.entrySet().iterator();
+        int i=0;
+        // to avoid ConcurrentModificationException
+        alreadyVisitedEntities.add(map);
+        while ( iter.hasNext() ) {
+            Map.Entry<T,T> e = iter.next();
+            result[i++] = e.getKey();
+            result[i++] = e.getValue();
+        }
+
+        for(i=0; i<result.length;i++) {
+            if(alreadyVisitedEntities == null) {
+                result[i] = load(result[i], false, update);
+            } else {
+                result[i] = loadRecursive(result[i], alreadyVisitedEntities, update);
+            }
+        }
+        map.clear();
+        for(i = 0; i < originalMapSize; i+=2 ) {
+            map.put(
+                    (T)result[i],
+                    (T)result[i+1]
+                    );
+        }
+        return map;
+    }
+
+    public <T extends Object> Collection<T> load(Collection<T> collection, boolean recursive, boolean update){
+
+        Collection<T> loadedCollection;
+        if(isRecursiveEnabled && recursive) {
+            logger.info("---- starting recursive load for cdm entity collection");
+            List<Object> alreadyVisitedEntities = new ArrayList<Object>();
+            Collection<T> cachedCollection = load(collection, alreadyVisitedEntities, update);
+            alreadyVisitedEntities.clear();
+            logger.info("---- ending recursive load for cdm entity collection \n");
+            loadedCollection = cachedCollection;
+        } else {
+            loadedCollection = load(collection, null, update);
+        }
+        return loadedCollection;
+    }
+
+    @SuppressWarnings("unchecked")
+    private <T extends Object> Collection<T> load(Collection<T> collection, List<Object> alreadyVisitedEntities, boolean update) {
+
+
+
+        if(collection == null || collection.isEmpty()) {
+            return collection;
+        }
+        int length = collection.size();
+        Object[] result = new Object[length];
+        Iterator<T> collectionItr = collection.iterator();
+        int count = 0;
+        // to avoid ConcurrentModificationException
+        alreadyVisitedEntities.add(collection);
+        while(collectionItr.hasNext()) {
+            Object obj = collectionItr.next();
+            if(alreadyVisitedEntities == null) {
+                result[count] = load(obj, false, update);
+            } else {
+                result[count] = loadRecursive(obj, alreadyVisitedEntities, update);
+            }
+
+            count++;
+        }
+
+        collection.clear();
+
+        for ( int i = 0; i < length; i++ ) {
+            collection.add((T)result[i]);
+        }
+
+        return collection;
+    }
+
+
+    /**
+     * Puts the (Key,Value) pair of ({@link java.util.UUID}, {@link eu.etaxonomy.cdm.model.common.CdmBase}),
+     * in the cache corresponding to the given cache id
+     *
+     * @param cacheId
+     * @param uuid
+     * @param cdmEntity
+     */
+    public CdmBase load(CdmBase cdmEntity, boolean recursive, boolean update) {
+        if(cdmEntity == null) {
+            return null;
+        }
+
+        // start by looking up the cdm entity in the cache
+        CdmBase cachedCdmEntity = cdmCacher.getFromCache(cdmEntity);
+
+        if(cachedCdmEntity != null) {
+            // if cdm entity was found in cache then
+            logger.info(" - object of type " + cdmEntity.getClass().getName() + " with id " + cdmEntity.getId() + " already exists");
+            // .. return if the cached and input objects are identical, else (this is a newly loaded object so) continue
+            if(cachedCdmEntity == cdmEntity) {
+                return cachedCdmEntity;
+            }
+        }
+
+        CdmBase loadedCdmBase;
+        if(isRecursiveEnabled && recursive) {
+            logger.info("---- starting recursive load for cdm entity " + cdmEntity.getClass().getName() + " with id " + cdmEntity.getId());
+            List<Object> alreadyVisitedEntities = new ArrayList<Object>();
+            CdmBase cb =  loadRecursive(cdmEntity, alreadyVisitedEntities, update);
+            alreadyVisitedEntities.clear();
+            logger.info("---- ending recursive load for cdm entity " + cdmEntity.getClass().getName() + " with id " + cdmEntity.getId() + "\n");
+            loadedCdmBase =  cb;
+        } else {
+            loadedCdmBase = load(cdmEntity);
+        }
+        return loadedCdmBase;
+
+    }
+
+
+    protected CdmBase load(CdmBase cdmEntity) {
+        logger.info("loading object of type " + cdmEntity.getClass().getName() + " with id " + cdmEntity.getId());
+        cdmCacher.put((CdmBase)ProxyUtils.deproxy(cdmEntity));
+        return cdmCacher.getFromCache(cdmEntity);
+    }
+
+
+    private CdmBase loadRecursive(CdmBase cdmEntity,  List<Object> alreadyVisitedEntities, boolean update) {
+
+        CdmBase cachedCdmEntity = load(cdmEntity);
+
+
+        // we want to recursive through the cdmEntity (and not the cachedCdmEntity)
+        // since there could be new or deleted objects in the cdmEntity sub-graph
+
+        // start by getting the fields from the cdm entity
+        String className = cdmEntity.getClass().getName();
+        CdmModelFieldPropertyFromClass cmgmfc = getFromCdmlibModelCache(className);
+        if(cmgmfc != null) {
+            alreadyVisitedEntities.add(cdmEntity);
+            List<String> fields = cmgmfc.getFields();
+            for(String field : fields) {
+                // retrieve the actual object corresponding to the field.
+                // this object will be either a CdmBase or a Collection / Map
+                // with CdmBase as the generic type
+
+                CdmBase cdmEntityInSubGraph = getCdmBaseTypeFieldValue(cdmEntity, cachedCdmEntity, field, alreadyVisitedEntities, update);
+                if(cdmEntityInSubGraph != null) {
+                    //checkForIdenticalCdmEntity(alreadyVisitedEntities, cdmEntityInSubGraph);
+                    if(!checkForIdenticalCdmEntity(alreadyVisitedEntities, cdmEntityInSubGraph)) {
+                        logger.info("recursive loading object of type " + cdmEntityInSubGraph.getClass().getName() + " with id " + cdmEntityInSubGraph.getId());
+                        loadRecursive(cdmEntityInSubGraph, alreadyVisitedEntities, update);
+                    } else {
+                        logger.info("object of type " + cdmEntityInSubGraph.getClass().getName() + " with id " + cdmEntityInSubGraph.getId() + " already visited");
+                    }
+                }
+            }
+        } else {
+            throw new CdmClientCacheException("CdmEntity with class " + cdmEntity.getClass().getName() + " is not found in the cdmlib model cache. " +
+                    "The cache may be corrupted or not in sync with the latest model version" );
+        }
+
+        return cachedCdmEntity;
+    }
+
+
+    private CdmBase getCdmBaseTypeFieldValue(CdmBase cdmEntity,
+            CdmBase cachedCdmEntity,
+            String fieldName,
+            List<Object> alreadyVisitedEntities,
+            boolean update) {
+
+        // this method attempts to make sure that for any two objects found in
+        // the object graph, if they are equal then they should also be the same,
+        // which is crucial for the merge to work
+        if(cachedCdmEntity == null) {
+            throw new CdmClientCacheException("When trying to set field value, the cached cdm entity cannot be null");
+        }
+
+        Class<?> clazz = cdmEntity.getClass();
+        try {
+            // this call will search in the provided class as well as
+            // the super classes until it finds the field
+            Field field = ReflectionUtils.findField(clazz, fieldName);
+
+            if(field == null) {
+                throw new CdmClientCacheException("Field '" + fieldName
+                        + "' not found when searching in class '" + clazz.getName() + "' and its supercalsses");
+            }
+            field.setAccessible(true);
+            Object o = field.get(cdmEntity);
+            // resetting the value in cdm entity to the deproxied object
+            o = ProxyUtils.deproxy(o);
+            field.set(cdmEntity, o);
+            Object cachedo = field.get(cachedCdmEntity);
+            CdmBase cdmEntityInSubGraph = null;
+
+            if(update || ProxyUtils.isProxy(cachedo)) {
+                // if we are in update mode we have to make the field of the cached entity
+                // up-to-date by setting it to the value of the cdm entity being loaded
+                //
+                // if the cdm entity is a proxy then we always update to make sure that
+                // newly created entities are always up-to-date
+                //
+                // NOTE : the field is overridden in the case of the exception
+                // found below
+                field.set(cachedCdmEntity, o);
+
+            }
+
+            if(o != null && !ProxyUtils.isProxy(o)) {
+                if(CdmBase.class.isAssignableFrom(o.getClass())) {
+                    logger.info("found initialised cdm entity '" + fieldName + "' in object of type " + clazz.getName() + " with id " + cdmEntity.getId());
+
+                    cdmEntityInSubGraph  = (CdmBase)o;
+                    CdmBase cachedCdmEntityInSubGraph = cdmCacher.getFromCache(cdmEntityInSubGraph);
+
+                    if(cachedCdmEntityInSubGraph != null) {
+                        if(cachedCdmEntityInSubGraph != cdmEntityInSubGraph) {
+                            // exception : is the case where
+                            // the field has been already initialised, cached and
+                            // is not the same as the one in the cache, in which case we set the value
+                            // of the field to the one found in the cache
+                            logger.info("setting cached + real value to '" + fieldName + "' in object of type " + clazz.getName() + " with id " + cdmEntity.getId());
+                            field.set(cachedCdmEntity, cachedCdmEntityInSubGraph);
+                            field.set(cdmEntity, cachedCdmEntityInSubGraph);
+                        } else {
+                            // since the field value object in cdmEntity
+                            // is the same as the field value object in cachedCdmEntity
+                            // we are sure that the its subgraph is also correctly loaded,
+                            // so we can exit the recursion
+                            return null;
+                        }
+                    }
+                } else if(o instanceof Map && !checkForIdenticalCdmEntity(alreadyVisitedEntities, o)) {
+                    loadRecursive((Map)o, alreadyVisitedEntities, update);
+                } else if(o instanceof Collection && !checkForIdenticalCdmEntity(alreadyVisitedEntities, o)) {
+                    loadRecursive((Collection)o, alreadyVisitedEntities, update);
+                }
+            }
+            // we return the original cdm entity in the sub graph because we
+            // want to continue to recurse on the input cdm entity graph
+            // and not the one in the cache
+            return cdmEntityInSubGraph;
+        } catch (SecurityException e) {
+            throw new CdmClientCacheException(e);
+        } catch (IllegalArgumentException e) {
+            throw new CdmClientCacheException(e);
+        } catch (IllegalAccessException e) {
+            throw new CdmClientCacheException(e);
+        }
+    }
+
+    private boolean checkForIdenticalCdmEntity(List<Object> objList, Object objToCompare) {
+        if(objToCompare != null) {
+            for(Object obj : objList) {
+                if(obj == objToCompare) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+
+    public static boolean isRecursiveEnabled() {
+        return isRecursiveEnabled;
+    }
+
+    public static void  setRecursiveEnabled(boolean ire) {
+        isRecursiveEnabled = ire;
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmClientCacheException.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmClientCacheException.java
new file mode 100644 (file)
index 0000000..e00649f
--- /dev/null
@@ -0,0 +1,12 @@
+package eu.etaxonomy.taxeditor.remoting.cache;
+
+public class CdmClientCacheException extends RuntimeException {
+       
+       public CdmClientCacheException(String message) {
+               super(message);
+       }
+
+       public CdmClientCacheException(Exception e) {
+               super(e);
+       }
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmEntityCacheKey.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmEntityCacheKey.java
new file mode 100644 (file)
index 0000000..74e543c
--- /dev/null
@@ -0,0 +1,56 @@
+package eu.etaxonomy.taxeditor.remoting.cache;
+
+import eu.etaxonomy.cdm.model.common.CdmBase;
+
+public class CdmEntityCacheKey {
+
+       private Class<? extends CdmBase> persistenceClass;
+       private int persistenceId;
+       
+       public CdmEntityCacheKey(CdmBase cdmBase) {
+               this.persistenceClass = cdmBase.getClass();
+               this.persistenceId = cdmBase.getId();
+       }
+       
+       public CdmEntityCacheKey(Class<? extends CdmBase> clazz, int id) {
+               this.persistenceClass = clazz;
+               this.persistenceId = id;
+       }
+       
+
+       
+       public Class<? extends CdmBase> getPersistenceClass() {
+               return persistenceClass;
+       }
+       
+       public int getPersistenceId() {
+               return persistenceId;
+       }
+       @Override
+       public boolean equals(Object obj) {
+               if(obj == null || !(obj instanceof CdmEntityCacheKey)) {
+                       return false;
+               }
+               
+               if(this == obj) {
+                       return true;
+               }
+               CdmEntityCacheKey that = (CdmEntityCacheKey) obj;
+               if(this.persistenceClass.equals(that.persistenceClass) && this.persistenceId == that.persistenceId) {
+                       return true;
+               }
+               
+               return false;
+       }
+       
+       @Override
+       public int hashCode() {
+               return (this.persistenceClass.getName() + String.valueOf(this.persistenceId)).hashCode();
+       }
+       
+       @Override
+       public String toString() {
+               return this.persistenceClass.getName() + String.valueOf(this.persistenceId);
+       }
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelCacher.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelCacher.java
new file mode 100644 (file)
index 0000000..cf53ea5
--- /dev/null
@@ -0,0 +1,137 @@
+package eu.etaxonomy.taxeditor.remoting.cache;
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.lang.reflect.Field;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.Element;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.mapping.PersistentClass;
+import org.hibernate.mapping.Property;
+import org.hibernate.property.Getter;
+import org.osgi.framework.Bundle;
+
+
+public class CdmModelCacher {
+
+
+
+
+    public static String HB_CONFIG_FILE_PATH= "/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml";
+
+    public static final String CDM_MAP_SER_FILE_PATH = "resources/cdm.map.ser";
+
+
+
+
+    public void cacheGetterFields(Cache cache) throws IOException, ClassNotFoundException, URISyntaxException {
+        Map<String, CdmModelFieldPropertyFromClass> modelClassMap = loadModelClassMap();
+
+        cache.removeAll();
+
+        for(Map.Entry<String, CdmModelFieldPropertyFromClass> entry : modelClassMap.entrySet()) {
+            cache.put(new Element(entry.getKey(), entry.getValue()));
+        }
+    }
+
+    public Map<String, CdmModelFieldPropertyFromClass> loadModelClassMap() throws URISyntaxException, IOException, ClassNotFoundException  {
+
+        Bundle bundle = Platform.getBundle("eu.etaxonomy.taxeditor.cdmlib");
+
+        URL modelMapFileBundleURL = bundle.getEntry(CDM_MAP_SER_FILE_PATH);
+        URL modelMapFileURL = FileLocator.resolve(modelMapFileBundleURL);
+        String modelMapFilePath = modelMapFileURL.getFile();
+
+        FileInputStream fin = new FileInputStream(modelMapFilePath);
+        ObjectInputStream ois = new ObjectInputStream(fin);
+        Map<String, CdmModelFieldPropertyFromClass> modelClassMap = (Map<String, CdmModelFieldPropertyFromClass>) ois.readObject();
+        ois.close();
+        return modelClassMap;
+    }
+
+
+    public Map<String, CdmModelFieldPropertyFromClass> generateModelClassMap() {
+
+        Configuration configuration = buildConfiguration(HB_CONFIG_FILE_PATH);
+        Iterator<PersistentClass> classMappingIterator =   configuration.getClassMappings();
+
+        Map<String, CdmModelFieldPropertyFromClass> modelClassMap = new HashMap<String, CdmModelFieldPropertyFromClass>();
+
+        while(classMappingIterator.hasNext()) {
+            PersistentClass persistentClass = classMappingIterator.next();
+            Class mappedClass = persistentClass.getMappedClass();
+            String mappedClassName = mappedClass.getName();
+
+            CdmModelFieldPropertyFromClass cmgmfc = new CdmModelFieldPropertyFromClass(mappedClassName);
+            System.out.println("Adding class : " + mappedClassName + " to cache");
+            addGetters(persistentClass, cmgmfc);
+            modelClassMap.put(mappedClassName, cmgmfc);
+        }
+        return modelClassMap;
+    }
+
+
+    public static Configuration buildConfiguration(String hibernateConfigFilePath) {
+        Configuration configuration = new Configuration().configure(hibernateConfigFilePath);
+        configuration.buildMappings();
+        return configuration;
+    }
+
+    private void addGetters(PersistentClass persistentClass, CdmModelFieldPropertyFromClass cmgmfc) {
+        if (persistentClass != null) {
+            Iterator propertyIt = persistentClass.getPropertyIterator();
+
+            while(propertyIt.hasNext())
+            {
+                Property property = (Property)propertyIt.next();
+                Getter getter = property.getGetter(persistentClass.getMappedClass());
+                if(getter != null && getter.getMember() != null) {
+                    Field field = (Field)getter.getMember();
+
+                    //logger.info(" - contains field '" + field.getName() + "' of type '" + field.getType().getName() + "'");
+                    cmgmfc.addGetMethods(field.getName());
+                }
+            }
+            addGetters(persistentClass.getSuperclass(), cmgmfc);
+        }
+    }
+
+
+
+    public static void main(String argv[]) {
+
+        // To re-create the serialised cdm map run,
+        // mvn exec:java -Dexec.mainClass="eu.etaxonomy.taxeditor.remoting.cache.CdmModelCacher"
+        // in the eu.etaxonomy.taxeditor.cdmlib project root dir
+        String CDM_MAP_SER_DIR = "resources/";
+
+        CdmModelCacher cdmModelCacher = new CdmModelCacher();
+        Map<String, CdmModelFieldPropertyFromClass> modelClassMap = cdmModelCacher.generateModelClassMap();
+        try{
+
+            FileOutputStream fout = new FileOutputStream(CDM_MAP_SER_DIR + "cdm.map.ser");
+            ObjectOutputStream oos = new ObjectOutputStream(fout);
+            oos.writeObject(modelClassMap);
+            oos.close();
+            System.out.println("CDM Map serialized");
+
+        }catch(Exception ex){
+            ex.printStackTrace();
+        }
+
+    }
+
+
+}
diff --git a/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelFieldPropertyFromClass.java b/eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmModelFieldPropertyFromClass.java
new file mode 100644 (file)
index 0000000..e90ec6d
--- /dev/null
@@ -0,0 +1,51 @@
+package eu.etaxonomy.taxeditor.remoting.cache;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class CdmModelField