r1890 - in trunk: . src/license src/site src/site/rst topia-persistence topia-persistence/src/main/java/org/nuiton/topia topia-persistence/src/main/java/org/nuiton/topia/event topia-persistence/src/main/java/org/nuiton/topia/framework topia-persistence/src/main/java/org/nuiton/topia/generator topia-persistence/src/main/java/org/nuiton/topia/persistence topia-persistence/src/main/java/org/nuiton/topia/persistence/util topia-persistence/src/site topia-persistence/src/site/rst topia-persistence
Author: tchemit Date: 2010-04-13 20:42:03 +0200 (Tue, 13 Apr 2010) New Revision: 1890 Log: - Evolution #503: Use maven-license-plugin 2.1 - Evolution #505: Do not generate redundant interface declaration in EntityImpl - clean code + use new header format Modified: trunk/pom.xml trunk/src/license/project.xml trunk/src/site/rst/index.rst trunk/src/site/site_fr.xml trunk/topia-persistence/pom.xml trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaContext.java trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaContextFactory.java trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaException.java trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaNotFoundException.java trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaRuntimeException.java trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaVetoException.java trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextEvent.java trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextListener.java trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntitiesEvent.java trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntitiesVetoable.java trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntityEvent.java trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntityListener.java trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntityVetoable.java trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionEvent.java trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionListener.java trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionVetoable.java trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/EntityState.java trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaFiresSupport.java trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaService.java trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaUtil.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/BeanGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/BeanTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/BinderHelperTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOAbstractGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOAbstractTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOHelperGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOHelperTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOImplGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOImplTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DTOGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DTOTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityAbstractGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityAbstractTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityDTOGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityDTOTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityHibernateMappingGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityImplGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityImplTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityInterfaceGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityInterfaceTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/InterfaceGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/InterfaceTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/ServiceTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaGeneratorUtil.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaJavaValidator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaMetaGenerator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaMetaTransformer.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaRelationValidator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/DepthEntityVisitor.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/EntityVisitor.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/HorizontalEntityVisitor.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/SearchFields.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAO.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntity.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntityAbstract.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntityEnum.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaId.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Collector.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Creator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/DBMapping.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Deletor.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/DiffState.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/EntityListUpdator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/EntityOperator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/EntityOperatorStore.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/ListUpdator.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Loador.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityBinder.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityHelper.java trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityRef.java trunk/topia-persistence/src/site/rst/Devel.rst trunk/topia-persistence/src/site/rst/FAQ.rst trunk/topia-persistence/src/site/rst/HibernateMapping.rst trunk/topia-persistence/src/site/rst/Isolation.rst trunk/topia-persistence/src/site/rst/ModelGeneration.rst trunk/topia-persistence/src/site/rst/SchemaMigration.rst trunk/topia-persistence/src/site/rst/Todo.rst trunk/topia-persistence/src/site/rst/TopiaDocumentation.rst trunk/topia-persistence/src/site/rst/TopiaQuery.rst trunk/topia-persistence/src/site/rst/event.rst trunk/topia-persistence/src/site/rst/howto.rst trunk/topia-persistence/src/site/rst/index.rst trunk/topia-persistence/src/site/rst/project.rst trunk/topia-persistence/src/site/rst/security.rst trunk/topia-persistence/src/site/site_fr.xml trunk/topia-persistence/src/test/java/org/nuiton/topia/framework/EntityStateTest.java trunk/topia-persistence/src/test/java/org/nuiton/topia/framework/TopiaQueryTest.java trunk/topia-persistence/src/test/java/org/nuiton/topia/framework/TopiaUtilTest.java trunk/topia-persistence/src/test/java/org/nuiton/topia/generator/TopiaGeneratorUtilTest.java trunk/topia-persistence/src/test/java/org/nuiton/topia/generator/TopiaTestCase.java trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/EntityVisitorExportXmlTest.java trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/ExportXMLVisitor.java trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/NaturalIdTest.java trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/CollectorTest.java trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/EntityOperatorTest.java trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityBinderTest.java trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityHelperTest.java trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityRefTester.java trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityRefTesterTest.java trunk/topia-persistence/src/test/java/org/nuiton/topiatest/TestUtils.java trunk/topia-persistence/src/test/java/org/nuiton/topiatest/beangen/RoueImpl.java trunk/topia-persistence/src/test/java/org/nuiton/topiatest/deletetest/Contact2DAOImpl.java trunk/topia-persistence/src/test/java/org/nuiton/topiatest/deletetest/DeleteEntityTest.java trunk/topia-service-history/src/main/java/org/nuiton/topia/history/TopiaHistoryService.java trunk/topia-service-index/src/main/java/org/nuiton/topia/index/TopiaIndexImplementor.java trunk/topia-service-index/src/main/java/org/nuiton/topia/index/TopiaIndexService.java trunk/topia-service-migration/pom.xml trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/DatabaseManager.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationCallback.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationEngine.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationService.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceException.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceImpl.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationService.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationServiceImpl.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/callback/MigrationCallbackHandler.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ExceptionAttributeUndefined.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapter.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterAdmin.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterImpl.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClass.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClassMapped.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClass.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClassMapped.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/Version.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/BaseException.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationAdapter.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationHelper.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/DependenciesHelper.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/NullMigrationClass.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ObjectNotFound.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/Transformer.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersion.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/AbstractMigration.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/FinderMigration.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MapHelper.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/Migration.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationClass.java trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationNull.java trunk/topia-service-migration/src/site/rst/index.rst trunk/topia-service-migration/src/site/rst/manualMigration.rst trunk/topia-service-migration/src/site/site_fr.xml trunk/topia-service-migration/src/test/java/org/nuiton/topia/migration/common/VersionTest.java trunk/topia-service-migration/src/test/java/org/nuiton/topia/migration/kernel/ConfigurationAdapterTest.java trunk/topia-service-replication/pom.xml trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/ReplicationEngine.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/TopiaReplicationImplementor.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/TopiaReplicationOperation.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/TopiaReplicationService.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/Link.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationModel.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationNode.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationOperationDef.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationOperationPhase.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/AttachAssociation.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/AttachDependency.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/AttachLink.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/DettachAssociation.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/DettachDependency.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/Duplicate.java trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/LoadLink.java trunk/topia-service-replication/src/site/rst/index.rst trunk/topia-service-replication/src/site/site_fr.xml trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/AbstractReplicationEngineTest.java trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/ReplicationEngineAllTest.java trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/ReplicationEngineTest.java trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationOperationTest.java trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/operation/FakeOperation.java trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/operation/UncreatableOperation.java trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/operation/UnregistredOperation.java trunk/topia-service-security/pom.xml trunk/topia-service-security/src/main/java/org/nuiton/topia/security/TopiaSecurityService.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/TopiaSecurityServiceImpl.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaAssociationAuthorizationImpl.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaEntityAuthorizationImpl.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/user/TopiaGroupImpl.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/user/TopiaUserImpl.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaCallbackHandler.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaConfiguration.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaLoginModule.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaPermission.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaPolicy.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaPrincipal.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/EntityVetoable.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/NoSecurityLoad.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/PropertyReadListener.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/PropertyVetoable.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/PropertyWriteListener.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/util/TopiaSecurityCaching.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/util/TopiaSecurityFactoryFilter.java trunk/topia-service-security/src/main/java/org/nuiton/topia/security/util/TopiaSecurityUtil.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/TaasService.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/TaasUtil.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/event/TaasAccessEntity.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/event/TaasEntityVetoable.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/event/TaasEntityVetoableRequestPermission.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasCallbackHandler.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasConfiguration.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasLoginModule.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPermission.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPolicy.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPrincipalWrapper.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasSubjectFinder.java trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasSubjectFinderImpl.java trunk/topia-service-security/src/site/rst/index.rst trunk/topia-service-security/src/site/site_fr.xml trunk/topia-service-security/src/test/java/org/nuiton/topia/TestUtils.java trunk/topia-service-security/src/test/java/org/nuiton/topia/security/TopiaSecurityTest.java trunk/topia-soa/src/main/java/org/nuiton/topia/service/TopiaApplicationService.java trunk/topia-soa/src/main/java/org/nuiton/topia/service/TopiaProxy.java trunk/topia-soa/src/main/java/org/nuiton/topia/service/TopiaServiceServer.java trunk/topia-soa/src/test/java/org/nuiton/topia/service/ExampleService.java Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/pom.xml 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,4 +1,32 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ToPIA + + $Author$ + $LastChangedDate$ + $LastChangedRevision$ + $Id$ + $HeadURL$ + %% + Copyright (C) 2004 - 2010 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> + <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> Modified: trunk/src/license/project.xml =================================================================== --- trunk/src/license/project.xml 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/src/license/project.xml 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,4 +1,31 @@ <?xml version='1.0' encoding='UTF-8'?> +<!-- + #%L + ToPIA + + $Author$ + $LastChangedDate$ + $LastChangedRevision$ + $Id$ + $HeadURL$ + %% + Copyright (C) 2004 - 2010 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> <project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProjectDescriptor-1.0.0.xsd"> Modified: trunk/src/site/rst/index.rst =================================================================== --- trunk/src/site/rst/index.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/src/site/rst/index.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,6 +1,34 @@ Accueil ======= +.. - +.. * #%L +.. * ToPIA +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + Présentation ------------ Modified: trunk/src/site/site_fr.xml =================================================================== --- trunk/src/site/site_fr.xml 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/src/site/site_fr.xml 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,4 +1,32 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ToPIA + + $Author$ + $LastChangedDate$ + $LastChangedRevision$ + $Id$ + $HeadURL$ + %% + Copyright (C) 2004 - 2010 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> + <project name="ToPIA"> <bannerLeft> Modified: trunk/topia-persistence/pom.xml =================================================================== --- trunk/topia-persistence/pom.xml 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/pom.xml 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,4 +1,32 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ToPIA :: Persistence + + $Author$ + $LastChangedDate$ + $LastChangedRevision$ + $Id$ + $HeadURL$ + %% + Copyright (C) 2004 - 2010 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> + <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaContext.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaContext.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaContext.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaContext.java Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaContextFactory.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaContextFactory.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaContextFactory.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaContextFactory.java Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaException.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaException.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaException.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaException.java @@ -44,7 +53,6 @@ * */ public TopiaException() { - super(); } /** Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaNotFoundException.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaNotFoundException.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaNotFoundException.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaNotFoundException.java @@ -44,7 +53,6 @@ * */ public TopiaNotFoundException() { - super(); } /** Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaRuntimeException.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaRuntimeException.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaRuntimeException.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaVetoException.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaVetoException.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/TopiaVetoException.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaVetoException.java @@ -45,7 +54,6 @@ * */ public TopiaVetoException() { - super(); } /** Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextEvent.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextEvent.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextEvent.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.event; @@ -45,9 +54,7 @@ super(source); } - /** - * Get source - */ + @Override public TopiaContext getSource() { return (TopiaContext) source; } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextListener.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextListener.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextListener.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.event; @@ -41,35 +50,35 @@ * Called before createSchema call * @param event evet */ - public void preCreateSchema(TopiaContextEvent event); + void preCreateSchema(TopiaContextEvent event); /** * Called after createSchema call * @param event event */ - public void postCreateSchema(TopiaContextEvent event); + void postCreateSchema(TopiaContextEvent event); /** * Called before updateSchema call * @param event event */ - public void preUpdateSchema(TopiaContextEvent event); + void preUpdateSchema(TopiaContextEvent event); /** * Called after updateSchema call * @param event event */ - public void postUpdateSchema(TopiaContextEvent event); + void postUpdateSchema(TopiaContextEvent event); /** * Called after updateSchema call * @param event event */ - public void preRestoreSchema(TopiaContextEvent event); + void preRestoreSchema(TopiaContextEvent event); /** * Called after updateSchema call * @param event event */ - public void postRestoreSchema(TopiaContextEvent event); + void postRestoreSchema(TopiaContextEvent event); } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntitiesEvent.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntitiesEvent.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntitiesEvent.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.event; @@ -40,6 +49,7 @@ return entities; } + @Override public TopiaContext getSource() { return (TopiaContext) super.getSource(); } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntitiesVetoable.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntitiesVetoable.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntitiesVetoable.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.event; @@ -32,6 +41,6 @@ */ public interface TopiaEntitiesVetoable extends EventListener { - public <E extends TopiaEntity> List<E> load(TopiaEntitiesEvent<E> event); + <E extends TopiaEntity> List<E> load(TopiaEntitiesEvent<E> event); } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntityEvent.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntityEvent.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntityEvent.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.event; @@ -41,6 +50,7 @@ return entity; } + @Override public TopiaContext getSource() { return (TopiaContext) super.getSource(); } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntityListener.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntityListener.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntityListener.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.event; @@ -23,12 +32,12 @@ public interface TopiaEntityListener extends EventListener { - public void create(TopiaEntityEvent event); + void create(TopiaEntityEvent event); - public void load(TopiaEntityEvent event); + void load(TopiaEntityEvent event); - public void update(TopiaEntityEvent event); + void update(TopiaEntityEvent event); - public void delete(TopiaEntityEvent event); + void delete(TopiaEntityEvent event); } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntityVetoable.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntityVetoable.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaEntityVetoable.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.event; @@ -23,12 +32,12 @@ public interface TopiaEntityVetoable extends EventListener { - public void create(TopiaEntityEvent event); + void create(TopiaEntityEvent event); - public void load(TopiaEntityEvent event); + void load(TopiaEntityEvent event); - public void update(TopiaEntityEvent event); + void update(TopiaEntityEvent event); - public void delete(TopiaEntityEvent event); + void delete(TopiaEntityEvent event); } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionEvent.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionEvent.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionEvent.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.event; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionListener.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionListener.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionListener.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.event; @@ -23,8 +32,8 @@ public interface TopiaTransactionListener extends EventListener { - public void commit(TopiaTransactionEvent event); + void commit(TopiaTransactionEvent event); - public void rollback(TopiaTransactionEvent event); + void rollback(TopiaTransactionEvent event); } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionVetoable.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionVetoable.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionVetoable.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.event; @@ -23,6 +32,6 @@ public interface TopiaTransactionVetoable extends EventListener { - public void beginTransaction(TopiaTransactionEvent event); + void beginTransaction(TopiaTransactionEvent event); } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/EntityState.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/EntityState.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/EntityState.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * EntityState.java Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.framework; import org.apache.commons.collections.set.MapBackedSet; @@ -119,7 +129,7 @@ * * Last update: $Date$ by : $Author$ */ -public class TopiaContextImpl implements TopiaContext, TopiaContextImplementor { +public class TopiaContextImpl implements TopiaContextImplementor { /** to use log facility, just put in your code: log.info(\"...\"); */ static private Log log = LogFactory.getLog(TopiaContextImpl.class); @@ -129,28 +139,28 @@ /** * Le pere de ce context, les contexts initaux n'ont pas de context pere */ - protected TopiaContextImplementor parentContext = null; + protected TopiaContextImplementor parentContext; /** * L'objet configuration utilisé pour la creation de la factory hibernate */ - protected Configuration hibernateConfiguration = null; + protected Configuration hibernateConfiguration; /** * la factory permettant de recuperer la session hibernate. Seul les * TopiaContextImpl initiaux contiennent un hibernateFactory */ - protected SessionFactory hibernateFactory = null; + protected SessionFactory hibernateFactory; /** * La session utilisé par le TopiaContextImpl */ - protected Session hibernate = null; + protected Session hibernate; /** * Indique si le contexte a ete ferme */ - protected boolean closed = false; + protected boolean closed; /** * Propriete de configuration */ - protected Properties config = null; + protected Properties config; /** * cache des DAO deja chargé pour ce context */ @@ -163,7 +173,7 @@ // protected Set<TopiaContextImplementor> childContext = MapBackedSet.decorate(new WeakHashMap<TopiaContextImplementor, Object>()); protected Set<TopiaContextImplementor> childContext = SynchronizedSet.decorate(MapBackedSet.decorate(new WeakHashMap<TopiaContextImplementor, Object>())); /** key: service name; value: service instance */ - protected Map<String, TopiaService> services = null; + protected Map<String, TopiaService> services; /** */ protected TopiaFiresSupport firesSupport = new TopiaFiresSupport(); /** Liste des classes perssitance */ @@ -319,7 +329,7 @@ @Override public Set<TopiaContextImplementor> getChildContext() { - return this.childContext; + return childContext; } protected void addChildContext(TopiaContextImplementor child) { @@ -724,13 +734,13 @@ // on se desenregistre du context pere et on ferme les connexions si // on est pas le root context if (getRootContext() != this) { - this.closed = true; + closed = true; hibernate.close(); getParentContext().removeChildContext(this); } else { if (hibernateFactory != null) { hibernateFactory.close(); - this.closed = true; + closed = true; TopiaContextFactory.removeContext(this); log.debug("TopiaContext finalized"); } @@ -746,7 +756,7 @@ if (hibernateFactory != null) { closeContext(); hibernateFactory.close(); - this.closed = true; + closed = true; log.debug("TopiaContext finalized"); } } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaContextImplementor.java Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaFiresSupport.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaFiresSupport.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaFiresSupport.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.framework; @@ -25,7 +34,6 @@ import java.beans.VetoableChangeSupport; import java.util.HashSet; import java.util.Iterator; -import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,22 +1,29 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ package org.nuiton.topia.framework; @@ -42,7 +49,7 @@ /** * Query HQL managment to simplify usage of - * {@link TopiaContext#find(java.lang.String, java.lang.Object[]) }. + * {@link TopiaContext#find(String, Object...) }. * * TODO-FD20091224 Complete documentation of this class + JUnit Tests * @@ -67,7 +74,7 @@ * SQL : * "SELECT * FROM PersonImpl WHERE firstName LIKE 'M%' AND year > 1980" * - * HQL using {@link org.nuiton.topia.TopiaContext#find(java.lang.String, java.lang.Object[]) } : + * HQL using {@link TopiaContext#find(String, Object...) } : * TopiaContext context = rootContext.beginTransaction(); * context.find("FROM " + Person.class.getName() + " WHERE firstName LIKE :firstName AND year > :year", * "firstName", "M%", year, 1980); @@ -83,7 +90,7 @@ * Example 2 : * ----------- * - * HQL using {@link org.nuiton.topia.TopiaContext#find(java.lang.String, java.lang.Object[]) } : + * HQL using {@link TopiaContext#find(String, Object...) } : * TopiaContext context = rootContext.beginTransaction(); * * String query = "FROM " + Person.class.getName(); @@ -155,7 +162,7 @@ * ---------------- * * - execute : as the same result as - * {@link org.nuiton.topia.TopiaContext#find(java.lang.String, java.lang.Object[]) } + * {@link TopiaContext#find(String, Object...) } * * Depends on entity type ; * ------------------------ @@ -182,7 +189,7 @@ * When using Hibernate, some times, Entities linked to the main one will be * lazy initialized, but you want them directly when the query will be executed * to avoid problems when closing context. You can use the method - * {@link #addLoad(java.lang.String[]) } to tell the TopiaQuery to load some + * {@link #addLoad(String...) } to tell the TopiaQuery to load some * properties when executing the query. After that, you don't need to call them * for loading them in Hibernate. * @@ -254,7 +261,7 @@ /** * Enum to simmplify using operation in query */ - public static enum Op { + public enum Op { /** EQUALS **/ EQ("="), /** GREATER THAN **/ @@ -287,7 +294,7 @@ @Override public String toString() { - return this.value; + return value; } } @@ -410,7 +417,7 @@ * @param entityClass Class for an entity Query * @return the new TopiaQuery * @deprecated use constructor instead : - * {@link #TopiaQuery(org.nuiton.topia.persistence.TopiaDAO) } + * {@link #TopiaQuery(TopiaDAO) } */ @Deprecated public static <T extends TopiaEntity> TopiaQuery createQuery(Class<T> entityClass) { @@ -424,7 +431,7 @@ * @param dao DAO linked to the entity to threat * @return the new TopiaQuery * @deprecated use constructor instead : - * {@link #TopiaQuery(org.nuiton.topia.persistence.TopiaDAO) } + * {@link #TopiaQuery(TopiaDAO) } */ @Deprecated public static <T extends TopiaEntity> TopiaQuery createQuery(TopiaDAO<T> dao) { @@ -440,7 +447,7 @@ * @param alias of the main entity in the query * @return the new TopiaQuery * @deprecated use constructor instead : - * {@link #TopiaQuery(java.lang.Class, java.lang.String) } + * {@link #TopiaQuery(Class, String) } */ @Deprecated public static <T extends TopiaEntity> TopiaQuery createQuery(Class<T> entityClass, String alias) { @@ -456,7 +463,7 @@ * @param alias of the main entity in the query * @return the new TopiaQuery * @deprecated use constructor instead : - * {@link #TopiaQuery(org.nuiton.topia.persistence.TopiaDAO, String) java.lang.Class) } + * {@link #TopiaQuery(TopiaDAO, String) java.lang.Class) } */ @Deprecated public static <T extends TopiaEntity> TopiaQuery createQuery(TopiaDAO<T> dao, String alias) { @@ -529,7 +536,7 @@ * * @param params a list of HQL params with key and value in order. * @return the TopiaQuery - * @see TopiaQuery#getValueName(java.lang.String) + * @see TopiaQuery#getValueName(String) */ public TopiaQuery addParams(List<Object> params) { for (int i = 0; i < params.size(); i += 2) { @@ -701,7 +708,7 @@ * @param paramName name of the parameter in the query * @param paramValue values of the parameter * @return the TopiaQuery - * @see TopiaQuery#add(String, TopiaQuery.Op, Object) + * @see TopiaQuery#add(String, Op, Object) * @since 2.3.1 */ public TopiaQuery add(String paramName, Object... paramValue) { @@ -761,8 +768,8 @@ * @param values different values for this parameter * @param isNull use it to test the nullity of parameter * @return the TopiaQuery - * @see #add(java.lang.String) - * @deprecated use {@link #add(java.lang.String, java.lang.Object[]) } + * @see #add(String) + * @deprecated use {@link #add(String, Object...) } * with a null or not */ @Deprecated @@ -794,7 +801,7 @@ * Add an element to the select in the query. Depends on the result wanted * in execute methods. The main entity will be automatically added only if * an alias is initialize from constructor. If you want only this select - * element, use {@link #setSelect(java.lang.String) } + * element, use {@link #setSelect(String...) } * method instead. * * @param select element to add @@ -838,7 +845,7 @@ * @return the TopiaQuery */ public TopiaQuery addDistinct() { - this.distinct = true; + distinct = true; return this; } @@ -906,8 +913,8 @@ * @return the TopiaQuery */ public TopiaQuery setLimit(int start, int end) { - this.startIndex = start; - this.endIndex = end; + startIndex = start; + endIndex = end; return this; } @@ -938,7 +945,7 @@ * @param transaction the TopiaContext to use for execution * @return a List of results * @throws TopiaException - * @see org.nuiton.topia.TopiaContext#find(java.lang.String, java.lang.Object[]) + * @see TopiaContext#find(String, Object...) */ public List execute(TopiaContext transaction) throws TopiaException { String query = fullQuery(); @@ -959,7 +966,7 @@ * * @return a List of results * @throws TopiaException - * @see #execute(org.nuiton.topia.TopiaContext) + * @see #execute(TopiaContext) */ public List execute() throws TopiaException { validateDAO(); @@ -969,7 +976,7 @@ /** * Execute the query and get a List of entity. Some properties will be * loaded if they are - * prealably set using ${@link #addLoad(java.lang.String[]) }. + * prealably set using ${@link #addLoad(String...) }. * * @param <E> * @param transaction the TopiaContext to use for execution @@ -1018,7 +1025,7 @@ * @return a List of TopiaEntity corresponding to the entityClass in argument * @throws TopiaException * @throws ClassCastException - * @see #executeToEntityList(org.nuiton.topia.TopiaContext) + * @see #executeToEntityList(TopiaContext,Class) * @deprecated use dao method instead : * {@link TopiaDAO#findAllByQuery(TopiaQuery) } */ @@ -1032,7 +1039,7 @@ /** * Execute the query and get a Map of entity with key type in argument. Some * properties will be loaded if they are - * prealably set using ${@link #addLoad(java.lang.String[]) }. + * prealably set using ${@link #addLoad(String...) }. * * @param <E> * @param <K> the type of the map key @@ -1070,7 +1077,7 @@ * @return a Map with the key type defined and the entity in value * @throws TopiaException * @throws ClassCastException - * @see #executeToEntityMap(org.nuiton.topia.TopiaContext, java.lang.String, java.lang.Class) + * @see #executeToEntityMap(TopiaContext, Class) * @deprecated use dao method instead : * {@link TopiaDAO#findAllMappedByQuery(TopiaQuery, String, Class) } */ @@ -1084,7 +1091,7 @@ /** * Execute the query and get a Map of entity with topiaId in key. Some * properties will be loaded if they are - * prealably set using ${@link #addLoad(java.lang.String[]) }. + * prealably set using ${@link #addLoad(String...) }. * * @param <E> * @param transaction the TopiaContext to use for execution @@ -1105,7 +1112,7 @@ * @return a Map with the key type defined and the entity in value * @throws TopiaException * @throws ClassCastException - * @see #executeToEntityMap(org.nuiton.topia.TopiaContext) + * @see #executeToEntityMap(TopiaContext,Class) * @deprecated use dao method instead : * {@link TopiaDAO#findAllMappedByQuery(TopiaQuery) } */ @@ -1119,7 +1126,7 @@ /** * Execute the query and get the first result entity. Some properties will * be loaded if they are - * prealably set using ${@link #addLoad(java.lang.String[]) }. + * prealably set using ${@link #addLoad(String...) }. * * @param <E> * @param transaction the TopiaContext to use for execution @@ -1143,7 +1150,7 @@ * @return a TopiaEntity corresponding to the entityClass in argument * @throws TopiaException * @throws ClassCastException - * @see #executeToEntity(org.nuiton.topia.TopiaContext) + * @see #executeToEntity(TopiaContext,Class) * @deprecated use dao method instead : * {@link TopiaDAO#findByQuery(TopiaQuery) } */ @@ -1201,7 +1208,7 @@ * @param select * @return an Integer * @throws TopiaException - * @see #executeToInteger(org.nuiton.topia.TopiaContext, java.lang.String) + * @see #executeToInteger(TopiaContext, String) */ public int executeToInteger(String select) throws TopiaException { validateDAO(); @@ -1228,7 +1235,7 @@ * @param select * @return a String result * @throws TopiaException - * @see #executeToString(org.nuiton.topia.TopiaContext, java.lang.String) + * @see #executeToString(TopiaContext, String) */ public String executeToString(String select) throws TopiaException { validateDAO(); @@ -1241,7 +1248,7 @@ * @param select * @return an Object * @throws TopiaException - * @see #executeToObject(org.nuiton.topia.TopiaContext, java.lang.String) + * @see #executeToObject(TopiaContext, String) */ public Object executeToObject(String select) throws TopiaException { validateDAO(); @@ -1265,7 +1272,7 @@ * * @return an int corresponding to the number of result in the query * @throws TopiaException - * @see #executeCount(org.nuiton.topia.TopiaContext) + * @see #executeCount(TopiaContext) */ public int executeCount() throws TopiaException { validateDAO(); @@ -1339,7 +1346,7 @@ log.trace("load property '" + property + "' for '" + entity.getClass().getSimpleName() + "'"); } if (res != null && Collection.class.isAssignableFrom(res.getClass())) { - Collection list = (Collection) res; + Collection<?> list = (Collection<?>) res; list.size(); } return res; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaService.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaService.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaService.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaService.java @@ -52,26 +61,26 @@ * * @return le nom du service */ - public String getServiceName(); + String getServiceName(); /** * Permet de récupérer les entités à persister pour ce service * @return Liste des entités à persister, séparées par des virgules */ - public Class<?>[] getPersistenceClasses(); + Class<?>[] getPersistenceClasses(); /** * Initialise le service avant de creer le context * @param context le context * @return si le service doit etre laissé activé ou pas */ - public boolean preInit(TopiaContextImplementor context); + boolean preInit(TopiaContextImplementor context); /** * Initialise le service apres avoir creer le context * @param context le context * @return si le service doit etre laissé activé ou pas */ - public boolean postInit(TopiaContextImplementor context); + boolean postInit(TopiaContextImplementor context); } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaUtil.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaUtil.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaUtil.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + /******************************************************************************* * TopiaUtil.java * @@ -105,7 +115,7 @@ /** * Compute a regex pattern given a format string. * <p/> - * A {@link String#format(String, Object[])} will be apply to <code>format</code>, with + * A {@link String#format(String, Object...)} will be apply to <code>format</code>, with * for parameters the list of <code>klass</code> transformed in topia pattern via method * {@link #getTopiaIdPattern(Class)} ready to be capture (enclosed by ()). * Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/BeanGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/BeanGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/BeanGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /*{generator option: parentheses = true}*/ /*{generator option: writeString = output.write}*/ Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/BeanTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/BeanTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/BeanTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,26 +1,33 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; -import java.net.URL; import org.apache.commons.lang.StringUtils; import org.nuiton.eugene.GeneratorUtil; import org.nuiton.eugene.java.ObjectModelTransformerToJava; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/BinderHelperTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/BinderHelperTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/BinderHelperTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,29 +1,36 @@ /* - * *##% + * #%L * ToPIA :: Persistence + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% * Copyright (C) 2004 - 2010 CodeLutin - * + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.eugene.GeneratorUtil; -import org.nuiton.eugene.Template; import org.nuiton.eugene.java.ObjectModelTransformerToJava; import org.nuiton.eugene.models.object.*; import org.nuiton.topia.persistence.TopiaEntity; @@ -56,7 +63,7 @@ @Override public void transformFromModel(ObjectModel model) { ObjectModelClass resultClass; - String packageName = getOutputProperties().getProperty(Template.PROP_DEFAULT_PACKAGE); + String packageName = getOutputProperties().getProperty(PROP_DEFAULT_PACKAGE); String modelName = model.getName(); String binderHelperClazzName = modelName + "BinderHelper"; String daoHelperClazzName = modelName + "DAOHelper"; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOAbstractGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOAbstractGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOAbstractGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /*{generator option: parentheses = true}*/ /*{generator option: writeString = output.write}*/ Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOAbstractTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOAbstractTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOAbstractTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,30 +1,37 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.eugene.GeneratorUtil; -import org.nuiton.eugene.Template; import org.nuiton.eugene.java.ObjectModelTransformerToJava; import org.nuiton.eugene.models.object.*; import org.nuiton.topia.TopiaException; @@ -34,6 +41,7 @@ import org.nuiton.topia.persistence.TopiaEntity; import org.nuiton.util.StringUtil; +import java.security.Permission; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -118,16 +126,14 @@ addImport(result, TopiaException.class); addImport(result, TopiaContextImplementor.class); - boolean enableSecurity = ( - clazz.hasTagValue(TopiaGeneratorUtil.TAG_SECURITY_CREATE) || - clazz.hasTagValue(TopiaGeneratorUtil.TAG_SECURITY_LOAD) || - clazz.hasTagValue(TopiaGeneratorUtil.TAG_SECURITY_UPDATE) || - clazz.hasTagValue(TopiaGeneratorUtil.TAG_SECURITY_DELETE) - ); + boolean enableSecurity = clazz.hasTagValue(TopiaGeneratorUtil.TAG_SECURITY_CREATE) || + clazz.hasTagValue(TopiaGeneratorUtil.TAG_SECURITY_LOAD) || + clazz.hasTagValue(TopiaGeneratorUtil.TAG_SECURITY_UPDATE) || + clazz.hasTagValue(TopiaGeneratorUtil.TAG_SECURITY_DELETE); if (enableSecurity) { addImport(result, ArrayList.class); - addImport(result, java.security.Permission.class); + addImport(result, Permission.class); addImport(result, "org.nuiton.topia.taas.entities.TaasAuthorizationImpl"); addImport(result, "org.nuiton.topia.taas.jaas.TaasPermission"); addImport(result, "org.nuiton.topia.taas.TaasUtil"); @@ -291,7 +297,7 @@ StringBuilder body = new StringBuilder(); String modelName = StringUtils.capitalize(model.getName()); String providerFQN = getOutputProperties().getProperty( - Template.PROP_DEFAULT_PACKAGE) + '.' + modelName + + PROP_DEFAULT_PACKAGE) + '.' + modelName + "DAOHelper.getImplementationClass"; for (ObjectModelAttribute attr : clazz.getAttributes()) { String attrType = attr.getType(); @@ -306,6 +312,7 @@ String attrClassifierDBName = TopiaGeneratorUtil.getDBName(attr.getClassifier()); String attrJoinTableName = TopiaGeneratorUtil.getManyToManyTableName(attr); String attrReverseDBName = TopiaGeneratorUtil.getReverseDBName(attr); + //FIXME_-FC-20100413 Use a TopiaQuery (use HQLin elements) body.append("" /*{ { Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /*{generator option: parentheses = true}*/ /*{generator option: writeString = output.write}*/ Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOHelperGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOHelperGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOHelperGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /*{generator option: parentheses = true}*/ /*{generator option: writeString = output.write}*/ Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOHelperTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOHelperTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOHelperTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,29 +1,36 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.eugene.models.object.ObjectModelType; -import org.nuiton.eugene.Template; import org.nuiton.eugene.java.ObjectModelTransformerToJava; import org.nuiton.eugene.models.object.*; import org.nuiton.eugene.models.object.xml.ObjectModelAttributeImpl; @@ -61,7 +68,7 @@ @Override public void transformFromModel(ObjectModel model) { ObjectModelClass resultClass; - String packageName = getOutputProperties().getProperty(Template.PROP_DEFAULT_PACKAGE); + String packageName = getOutputProperties().getProperty(PROP_DEFAULT_PACKAGE); String modelName = model.getName(); String daoHelperClazzName = modelName + "DAOHelper"; String modelVersion = model.getVersion(); Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOImplGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOImplGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOImplGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /*{generator option: parentheses = true}*/ /*{generator option: writeString = output.write}*/ Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOImplTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOImplTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOImplTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; import org.nuiton.eugene.java.ObjectModelTransformerToJava; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DAOTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; import org.nuiton.eugene.java.ObjectModelTransformerToJava; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DTOGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DTOGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DTOGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /*{generator option: parentheses = true}*/ /*{generator option: writeString = output.write}*/ @@ -43,6 +52,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.nuiton.eugene.Transformer; import org.nuiton.eugene.models.object.ObjectModelGenerator; import org.nuiton.eugene.GeneratorUtil; import org.nuiton.eugene.models.object.ObjectModelAssociationClass; @@ -57,7 +67,7 @@ /** * DTO generator * @plexus.component role="org.nuiton.eugene.Template" role-hint="org.nuiton.topia.generator.DTOGenerator" - * @deprecated since 2.3.0, prefer use the corresponding {@link org.nuiton.eugene.Transformer} : + * @deprecated since 2.3.0, prefer use the corresponding {@link Transformer} : * {@link DTOTransformer}. */ @Deprecated Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DTOTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DTOTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/DTOTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; import org.apache.commons.lang.StringUtils; @@ -432,9 +440,10 @@ if (model.hasClass(attr.getType())) { attrEntity = model.getClass(attr.getType()); } - boolean isDTO = (attrEntity != null && attrEntity.hasStereotype(TopiaGeneratorUtil.STEREOTYPE_ENTITY)); //THIMEL : STEREOTYPE ENTITY ??? + boolean isDTO = attrEntity != null && + attrEntity.hasStereotype(TopiaGeneratorUtil.STEREOTYPE_ENTITY); //THIMEL : STEREOTYPE ENTITY ??? ObjectModelAttribute reverse = attr.getReverseAttribute(); - if ((isDTO && (reverse == null || !reverse.isNavigable()) && !attr.hasAssociationClass()) || (!isDTO)) { + if (isDTO && (reverse == null || !reverse.isNavigable()) && !attr.hasAssociationClass() || (!isDTO)) { String attrName = attr.getName(); buffer.append("" /*{ append("<%=attrName%>", this.<%=attrName%>). Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityAbstractGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityAbstractGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityAbstractGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /*{generator option: parentheses = true}*/ /*{generator option: writeString = output.write}*/ Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityAbstractTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityAbstractTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityAbstractTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; import org.apache.commons.lang.StringUtils; @@ -62,7 +70,7 @@ @Override public void transformFromClass(ObjectModelClass clazz) { - if (!clazz.hasStereotype(TopiaGeneratorUtil.STEREOTYPE_ENTITY)) { + if (!clazz.hasStereotype(STEREOTYPE_ENTITY)) { return; } @@ -83,10 +91,11 @@ addImport(result, ArrayList.class); addImport(result, List.class); - addImport(result, Serializable.class); addImport(result, ToStringBuilder.class); addImport(result, TopiaEntity.class); addImport(result, TopiaContextImplementor.class); + //TC-20100413 : TopiaEntity is already Serializable +// addImport(result, Serializable.class); // javadoc @@ -96,7 +105,7 @@ doc.append("}\n"); { - String dbName = clazz.getTagValue(TopiaGeneratorUtil.TAG_DB_NAME); + String dbName = clazz.getTagValue(TAG_DB_NAME); if (dbName != null) { doc.append("<p>Nom de l'entité en BD : "); doc.append(dbName); @@ -113,7 +122,7 @@ //Si une des classes parentes définies des méthodes abstraites, son // impl ne sera pas créé boolean abstractParent = shouldBeAbstract(parent); - if (parent.hasStereotype(TopiaGeneratorUtil.STEREOTYPE_ENTITY)) { + if (parent.hasStereotype(STEREOTYPE_ENTITY)) { if (abstractParent) { extendClass += "Abstract"; } else { @@ -187,14 +196,14 @@ doc = new StringBuilder(); if (TopiaGeneratorUtil.hasDocumentation(attr) || - attr.hasTagValue(TopiaGeneratorUtil.TAG_DB_NAME)) { + attr.hasTagValue(TAG_DB_NAME)) { if (TopiaGeneratorUtil.hasDocumentation(attr)) { String attrDocumentation = attr.getDocumentation(); doc.append(attrDocumentation).append('\n'); } - if (attr.hasTagValue(TopiaGeneratorUtil.TAG_DB_NAME)) { + if (attr.hasTagValue(TAG_DB_NAME)) { String dbName = - attr.getTagValue(TopiaGeneratorUtil.TAG_DB_NAME); + attr.getTagValue(TAG_DB_NAME); doc.append("Nom de l'attribut en BD : "); doc.append(dbName); doc.append('\n'); @@ -204,9 +213,9 @@ setDocumentation(attr2, doc.toString()); - if (attr.hasTagValue(TopiaGeneratorUtil.TAG_ANNOTATION)) { + if (attr.hasTagValue(TAG_ANNOTATION)) { String annotation = - attr.getTagValue(TopiaGeneratorUtil.TAG_ANNOTATION); + attr.getTagValue(TAG_ANNOTATION); //FIXME Make annotation works... //TODO Use the addAnnotation method... ///* <%=annotation%> @@ -376,7 +385,7 @@ addImport(result, collectionInterface); addImport(result, collectionObject); collectionInterface = TopiaGeneratorUtil.getSimpleName(collectionInterface); - collectionObject = TopiaGeneratorUtil.getSimpleName(collectionObject); + collectionObject = getSimpleName(collectionObject); if (!attr.hasAssociationClass()) { //Méthodes remplacées par des accesseurs sur les classes d'assoc @@ -892,7 +901,7 @@ } boolean isEntity = (attrEntity != null && attrEntity.hasStereotype( - TopiaGeneratorUtil.STEREOTYPE_ENTITY)); + STEREOTYPE_ENTITY)); ObjectModelAttribute reverse = attr.getReverseAttribute(); if ((isEntity && (reverse == null || !reverse.isNavigable()) && !attr.hasAssociationClass()) || (!isEntity)) { @@ -932,7 +941,7 @@ for (ObjectModelAttribute attr : clazz.getAttributes()) { if (attr.referenceClassifier() && attr.getClassifier().hasStereotype( - TopiaGeneratorUtil.STEREOTYPE_ENTITY)) { + STEREOTYPE_ENTITY)) { if (attr.isComposite()) { String attrName = attr.getName(); String getterName = "get" + StringUtils.capitalize(attrName); @@ -1032,7 +1041,7 @@ for (ObjectModelAttribute attr : clazz.getAttributes()) { if (attr.referenceClassifier() && attr.getClassifier().hasStereotype( - TopiaGeneratorUtil.STEREOTYPE_ENTITY)) { + STEREOTYPE_ENTITY)) { if (attr.isAggregate()) { String attrName = attr.getName(); String getterName = "get" + StringUtils.capitalize(attrName); Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityDTOGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityDTOGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityDTOGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /*{generator option: parentheses = true}*/ /*{generator option: writeString = output.write}*/ Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityDTOTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityDTOTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityDTOTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; import org.apache.commons.lang.StringUtils; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityHibernateMappingGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityHibernateMappingGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityHibernateMappingGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /*{generator option: parentheses = true}*/ /*{generator option: writeString = output.write}*/ @@ -326,7 +335,7 @@ optionalAttributes += generateFromTagValue(attr, TopiaGeneratorUtil.TAG_NOT_NULL, "not-null"); /*{<%=prefix%> <property name="<%=attrName%>" type="<%=attrType%>" access="<%=accessField%>" }*/ optionalAttributes = optionalAttributes.trim(); - String[] columnNames = this.columnNamesMap.get(attrType); + String[] columnNames = columnNamesMap.get(attrType); if (columnNames == null || columnNames.length == 0) { optionalAttributes += generateFromTagValue(attr, TopiaGeneratorUtil.TAG_LENGTH, "length"); String attrColumn = TopiaGeneratorUtil.getDBName(attr); Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityImplGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityImplGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityImplGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /*{generator option: parentheses = true}*/ /*{generator option: writeString = output.write}*/ Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityImplTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityImplTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityImplTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; import org.apache.commons.logging.Log; @@ -51,7 +59,8 @@ if (!clazz.hasStereotype(TopiaGeneratorUtil.STEREOTYPE_ENTITY)) { return; } - // On ne génère pas le impl si l'entité a des opérations qui ne sont pas seulement pour le DAO + // On ne génère pas le impl si l'entité a des opérations qui ne sont + // pas seulement pour le DAO if (clazz.getOperations().size() > 0 && !hasOnlyDAOOperations(clazz)) { return; } @@ -66,14 +75,18 @@ String clazzFQN = clazz.getQualifiedName(); ObjectModelClass result; if (isAbstract(clazz)) { - result = createAbstractClass(clazzName + "Impl", clazz.getPackageName()); + result = createAbstractClass(clazzName + "Impl", + clazz.getPackageName()); } else { result = createClass(clazzName + "Impl", clazz.getPackageName()); } - setDocumentation(result, "Implantation des operations pour l'entité " + clazzName + "."); + setDocumentation(result, "Implantation des operations pour l'entité " + + clazzName + "."); setSuperClass(result, clazzFQN + "Abstract"); - addInterface(result, Serializable.class); - addInterface(result, clazzFQN); + //TC-20100413 + // Evolution #505: Do not generate redundant interface declaration +// addInterface(result, Serializable.class); +// addInterface(result, clazzFQN); } @@ -84,13 +97,16 @@ //Une classe peut être abstraite si elle a des méthodes définies dans // ses superinterface et non implantées dans ses superclasses - Collection<ObjectModelOperation> allInterfaceOperations = clazz.getAllInterfaceOperations(true); + Collection<ObjectModelOperation> allInterfaceOperations = + clazz.getAllInterfaceOperations(true); allInterfaceOperations.removeAll(clazz.getAllOtherOperations(true)); for (ObjectModelOperation op : allInterfaceOperations) { boolean implementationFound = false; for (ObjectModelClass superClazz : clazz.getSuperclasses()) { - for (ObjectModelOperation matchingOp : superClazz.getOperations(op.getName())) { - implementationFound = (op.equals(matchingOp) && !matchingOp.isAbstract()); + for (ObjectModelOperation matchingOp : + superClazz.getOperations(op.getName())) { + implementationFound = op.equals(matchingOp) && + !matchingOp.isAbstract(); if (implementationFound) { break; } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityInterfaceGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityInterfaceGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityInterfaceGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /*{generator option: parentheses = true}*/ /*{generator option: writeString = output.write}*/ Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityInterfaceTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityInterfaceTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityInterfaceTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; import org.apache.commons.lang.StringUtils; @@ -121,14 +129,17 @@ protected void generateAssociationAttributes(ObjectModelInterface result, ObjectModelClass clazz) { if (clazz instanceof ObjectModelAssociationClass) { - ObjectModelAssociationClass assoc = (ObjectModelAssociationClass) clazz; - for (ObjectModelAttribute attr : assoc.getParticipantsAttributes()) { + ObjectModelAssociationClass assoc = + (ObjectModelAssociationClass) clazz; + for (ObjectModelAttribute attr : + assoc.getParticipantsAttributes()) { if (attr != null) { String type = attr.getType(); String name = attr.getName(); generateAssociationAccessors(result, name, type); if (attr.getReverseAttribute() == null) { - type = ((ObjectModelClassifier) attr.getDeclaringElement()).getQualifiedName(); + type = ((ObjectModelClassifier) + attr.getDeclaringElement()).getQualifiedName(); name = attr.getDeclaringElement().getName(); generateAssociationAccessors(result, name, type); } @@ -156,7 +167,8 @@ if (TopiaGeneratorUtil.hasDocumentation(attr)) { setDocumentation(op, attr.getDocumentation()); } - attr2 = addParameter(op, attrType, GeneratorUtil.toLowerCaseFirstLetter(attrName)); + attr2 = addParameter(op, attrType, + GeneratorUtil.toLowerCaseFirstLetter(attrName)); setDocumentation(attr2, "La valeur de l'attribut " + attrName + " à positionner."); @@ -170,7 +182,8 @@ setDocumentation(op, attr.getDocumentation()); } } else { - String collectionInterface = TopiaGeneratorUtil.getNMultiplicityInterfaceType(attr); + String collectionInterface = + TopiaGeneratorUtil.getNMultiplicityInterfaceType(attr); // addXXX @@ -181,8 +194,10 @@ if (TopiaGeneratorUtil.hasDocumentation(attr)) { setDocumentation(op, attr.getDocumentation()); } - attr2 = addParameter(op, attrType, GeneratorUtil.toLowerCaseFirstLetter(attrName)); - setDocumentation(attr2, "L'instance de " + attrName + " à ajouter"); + attr2 = addParameter(op, attrType, + GeneratorUtil.toLowerCaseFirstLetter(attrName)); + setDocumentation(attr2, + "L'instance de " + attrName + " à ajouter"); // addAllXXX @@ -193,8 +208,11 @@ if (TopiaGeneratorUtil.hasDocumentation(attr)) { setDocumentation(op, attr.getDocumentation()); } - attr2 = addParameter(op, collectionInterface + "<" + attrType + ">", GeneratorUtil.toLowerCaseFirstLetter(attrName)); - setDocumentation(attr2, "Les instances de " + attrName + " à ajouter"); + attr2 = addParameter(op, + collectionInterface + "<" + attrType + ">", + GeneratorUtil.toLowerCaseFirstLetter(attrName)); + setDocumentation(attr2, + "Les instances de " + attrName + " à ajouter"); // setXXX @@ -205,8 +223,11 @@ if (TopiaGeneratorUtil.hasDocumentation(attr)) { setDocumentation(op, attr.getDocumentation()); } - attr2 = addParameter(op, collectionInterface + "<" + attrType + ">", GeneratorUtil.toLowerCaseFirstLetter(attrName)); - setDocumentation(attr2, "La Collection de " + attrName + " à ajouter"); + attr2 = addParameter(op, + collectionInterface + "<" + attrType + ">", + GeneratorUtil.toLowerCaseFirstLetter(attrName)); + setDocumentation(attr2, + "La Collection de " + attrName + " à ajouter"); // removeXXX @@ -217,8 +238,11 @@ if (TopiaGeneratorUtil.hasDocumentation(attr)) { setDocumentation(op, attr.getDocumentation()); } - attr2 = addParameter(op, attrType, GeneratorUtil.toLowerCaseFirstLetter(attrName)); - setDocumentation(attr2, "L'instance de " + attrName + " à retirer"); + attr2 = addParameter(op, + attrType, + GeneratorUtil.toLowerCaseFirstLetter(attrName)); + setDocumentation(attr2, + "L'instance de " + attrName + " à retirer"); // clearXXX @@ -241,7 +265,8 @@ setDocumentation(op, "Retourne la collection."); } - if (!TopiaGeneratorUtil.isPrimitiveType(attr) && !TopiaGeneratorUtil.isDateType(attr)) { + if (!TopiaGeneratorUtil.isPrimitiveType(attr) && + !TopiaGeneratorUtil.isDateType(attr)) { // getXXXByTopiaId Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/InterfaceGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/InterfaceGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/InterfaceGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /*{generator option: parentheses = true}*/ /*{generator option: writeString = output.write}*/ @@ -30,14 +39,14 @@ * * Mise a jour: $Date$ * par : $Author$ - * @deprecated since 2.3.0, use {@link org.nuiton.topia.generator.InterfaceTransformer} instead + * @deprecated since 2.3.0, use {@link InterfaceTransformer} instead */ package org.nuiton.topia.generator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.nuiton.eugene.models.object.ObjectModelGenerator; +import org.nuiton.eugene.Transformer; import org.nuiton.eugene.models.object.*; import java.io.File; @@ -49,7 +58,7 @@ /** * - * @deprecated since 2.3.0, prefer use the corresponding {@link org.nuiton.eugene.Transformer} : + * @deprecated since 2.3.0, prefer use the corresponding {@link Transformer} : * {@link InterfaceTransformer}. * @plexus.component role="org.nuiton.eugene.Template" role-hint="org.nuiton.topia.generator.InterfaceGenerator" */ Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/InterfaceTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/InterfaceTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/InterfaceTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,22 +1,29 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ package org.nuiton.topia.generator; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/ServiceTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/ServiceTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/ServiceTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,3 +1,30 @@ +/* + * #%L + * ToPIA :: Persistence + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ package org.nuiton.topia.generator; @@ -375,8 +402,8 @@ * @param serviceAbstract where the operation will be created * @param source ObjectModelOperation from model * @return the abstract operation created - * @see #isErrorArgsNeeded(org.nuiton.eugene.models.object.ObjectModelOperation) - * @see #isTransactionNeeded(org.nuiton.eugene.models.object.ObjectModelOperation) + * @see #isErrorArgsNeeded(ObjectModelOperation) + * @see #isTransactionNeeded(ObjectModelOperation) */ protected ObjectModelOperation createOperationExecuteAbstract( ObjectModelClass serviceAbstract, ObjectModelOperation source) { @@ -422,8 +449,8 @@ * @param abstOp to execute into the implementation body * @param source ObjectModelOperation from model * @param serviceContractName where the signature method is defined - * @see #isErrorArgsNeeded(org.nuiton.eugene.models.object.ObjectModelOperation) - * @see #isTransactionNeeded(org.nuiton.eugene.models.object.ObjectModelOperation) + * @see #isErrorArgsNeeded(ObjectModelOperation) + * @see #isTransactionNeeded(ObjectModelOperation) */ protected void createOperationImplementation( ObjectModelClass serviceAbstract, Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaGeneratorUtil.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaGeneratorUtil.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaGeneratorUtil.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + /******************************************************************************* * GeneratorUtil.java * Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaJavaValidator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaJavaValidator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaJavaValidator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.generator; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaMetaGenerator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaMetaGenerator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaMetaGenerator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,22 +1,32 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + /******************************************************************************* * ObjectModelToEntityGenerator.java * Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaMetaTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaMetaTransformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaMetaTransformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; import org.apache.commons.logging.Log; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaRelationValidator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaRelationValidator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaRelationValidator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,22 +1,32 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + /* * * TopiaRelationValidator.java * Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/DepthEntityVisitor.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/DepthEntityVisitor.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/DepthEntityVisitor.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.persistence; import java.util.ArrayList; @@ -53,7 +63,7 @@ public DepthEntityVisitor(EntityVisitor delegateVisitor) { - this.alreadyExplored = new ArrayList<TopiaEntity>(); + alreadyExplored = new ArrayList<TopiaEntity>(); this.delegateVisitor = delegateVisitor; } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/EntityVisitor.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/EntityVisitor.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/EntityVisitor.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.persistence; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/HorizontalEntityVisitor.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/HorizontalEntityVisitor.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/HorizontalEntityVisitor.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.persistence; @@ -57,8 +66,8 @@ */ public HorizontalEntityVisitor(EntityVisitor delegateVisitor) { this.delegateVisitor = delegateVisitor; - this.alreadyExplored = new ArrayList<TopiaEntity>(); - this.toVisitEntities = new ArrayList<TopiaEntity>(); + alreadyExplored = new ArrayList<TopiaEntity>(); + toVisitEntities = new ArrayList<TopiaEntity>(); } @Override Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/SearchFields.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/SearchFields.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/SearchFields.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * SearchFields.java Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAO.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAO.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAO.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaDAO.java @@ -30,11 +39,13 @@ */ package org.nuiton.topia.persistence; +import java.lang.Class; import java.security.Permission; import java.util.Collection; import java.util.List; import java.util.Map; +import org.nuiton.topia.TopiaContext; import org.nuiton.topia.TopiaException; import org.nuiton.topia.event.TopiaEntityListener; import org.nuiton.topia.event.TopiaEntityVetoable; @@ -201,7 +212,7 @@ * @return l'entité correspondant à la recherche ou null si aucune entité * n'a été trouvée * @throws TopiaException if any pb while getting datas - * @see org.nuiton.topia.framework.TopiaQuery#executeToEntity(org.nuiton.topia.TopiaContext, java.lang.Class) + * @see TopiaQuery#executeToEntity(TopiaContext, Class) */ Entity findByQuery(TopiaQuery query) throws TopiaException; @@ -212,7 +223,7 @@ * @param query la requête * @return la liste d'entités correspondant à la recherche * @throws TopiaException if any pb while getting datas - * @see org.nuiton.topia.framework.TopiaQuery#executeToEntityList(org.nuiton.topia.TopiaContext, java.lang.Class) + * @see TopiaQuery#executeToEntityList(TopiaContext, Class) */ List<Entity> findAllByQuery(TopiaQuery query) throws TopiaException; @@ -224,7 +235,7 @@ * @param query la requête * @return la map d'entités correspondant à la recherche * @throws TopiaException if any pb while getting datas - * @see org.nuiton.topia.framework.TopiaQuery#executeToEntityMap(org.nuiton.topia.TopiaContext, java.lang.Class) + * @see TopiaQuery#executeToEntityMap(TopiaContext, Class) */ Map<String, Entity> findAllMappedByQuery(TopiaQuery query) throws TopiaException; @@ -239,7 +250,7 @@ * @param keyClass type de la propriété de l'entité utilisée comme clé * @return la map d'entités correspondant à la recherche * @throws TopiaException if any pb while getting datas - * @see org.nuiton.topia.framework.TopiaQuery#executeToEntityMap(org.nuiton.topia.TopiaContext, java.lang.Class) + * @see TopiaQuery#executeToEntityMap(TopiaContext, Class) */ <K> Map<K, Entity> findAllMappedByQuery(TopiaQuery query, String keyName, Class<K> keyClass) throws TopiaException; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaDAOAbstract.java @@ -46,6 +55,7 @@ import org.apache.commons.logging.LogFactory; import org.hibernate.Criteria; import org.hibernate.FlushMode; +import org.nuiton.topia.TopiaContext; import org.nuiton.topia.TopiaException; import org.nuiton.topia.event.TopiaEntityListener; import org.nuiton.topia.event.TopiaEntityVetoable; @@ -76,9 +86,9 @@ /** to use log facility, just put in your code: log.info(\"...\"); */ private static Log log = LogFactory.getLog(TopiaDAOImpl.class); - protected Class<E> entityClass = null; + protected Class<E> entityClass; - protected TopiaContextImplementor context = null; + protected TopiaContextImplementor context; @Override public Class<E> getEntityClass() { @@ -247,7 +257,7 @@ /** * Callback method when context was commit. * By default, the method does nothing - * @throws org.nuiton.topia.TopiaException + * @throws TopiaException */ @Override public void commitTransaction() throws TopiaException { @@ -256,7 +266,7 @@ /** * Callback method when context was rollback. * By default, the method does nothing - * @throws org.nuiton.topia.TopiaException + * @throws TopiaException */ @Override public void rollbackTransaction() throws TopiaException { @@ -456,7 +466,7 @@ * findAllContainsProperties(properties); * @param properties * @return the list of entities corresponding to the request - * @throws org.nuiton.topia.TopiaException if any pb + * @throws TopiaException if any pb */ @Override public List<E> findAllContainsProperties(Map<String, @@ -598,7 +608,7 @@ criterion = or(criterion, Restrictions.like(propName, textValue)); } //numFields - boolean isNumber = (value instanceof Number); + boolean isNumber = value instanceof Number; if (value instanceof String) { try { Double.parseDouble((String) value); @@ -616,10 +626,10 @@ } } //boolFields - boolean isBoolean = (value instanceof Boolean); + boolean isBoolean = value instanceof Boolean; if (value instanceof String) { - isBoolean |= ("true".equalsIgnoreCase((String) value) || "false" - .equalsIgnoreCase((String) value)); + isBoolean |= "true".equalsIgnoreCase((String) value) || "false" + .equalsIgnoreCase((String) value); } if (isBoolean) { Boolean booleanValue; @@ -847,7 +857,7 @@ /** * Count number of existing entities using - * {@link TopiaQuery#executeCount(org.nuiton.topia.TopiaContext) } + * {@link TopiaQuery#executeCount(TopiaContext) } * FIXME-FD20091224 change type to int like in 2.2.2 version * * @return a long for the number of entities in database @@ -964,7 +974,7 @@ * Renvoie un Criteria créé avec l'entityClass * @param mode le FlushMode du Criteria * @return le Criteria nouvellement créé - * @throws org.nuiton.topia.TopiaException if any pb + * @throws TopiaException if any pb */ private Criteria createCriteria(FlushMode mode) throws TopiaException { Criteria criteria = getSession().createCriteria(entityClass); @@ -975,7 +985,7 @@ /** * Renvoie la Session contenue dans le contexte * @return hibernate session - * @throws org.nuiton.topia.TopiaException if any pb + * @throws TopiaException if any pb */ private Session getSession() throws TopiaException { return getContext().getHibernate(); Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntity.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntity.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntity.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaEntity.java Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntityAbstract.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntityAbstract.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntityAbstract.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /******************************************************************************* * TopiaEntityAbstract.java @@ -64,7 +73,7 @@ protected Date topiaCreateDate = new Date(); - transient protected TopiaContext topiaContext = null; + transient protected TopiaContext topiaContext; transient protected VetoableChangeSupport readVetoables = new VetoableChangeSupport(this); @@ -82,7 +91,7 @@ @Override public void setTopiaId(String v) { - this.topiaId = v; + topiaId = v; } @Override @@ -92,7 +101,7 @@ @Override public void setTopiaVersion(long v) { - this.topiaVersion = v; + topiaVersion = v; } @Override @@ -115,8 +124,8 @@ * @throws TopiaException if any pb ? */ public void setTopiaContext(TopiaContext context) throws TopiaException { - if (this.topiaContext == null) { - this.topiaContext = context; + if (topiaContext == null) { + topiaContext = context; } else { throw new TopiaException("Remplacement du contexte interdit"); } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntityEnum.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntityEnum.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntityEnum.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence; /** @@ -37,7 +45,7 @@ * * - a method to accept any TopiaEntity class for this entity description * - * @author chemit + * @author tchemit <chemit@codelutin.com> * @since 2.2.0 */ public interface TopiaEntityEnum { Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaId.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaId.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaId.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaId.java @@ -47,7 +56,7 @@ /** */ private static final long serialVersionUID = 1L; - public String topiaId = null; + public String topiaId; public TopiaId() { } @@ -56,6 +65,7 @@ this.topiaId = topiaId; } + @Override public int hashCode() { if (topiaId == null) { //TODO-TC20100225 : use commons-loggin api instead of jdk one @@ -66,10 +76,12 @@ return topiaId.hashCode(); } + @Override public boolean equals(Object o) { return topiaId.equals(o); } + @Override public String toString() { return topiaId; } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Collector.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Collector.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Collector.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import java.util.ArrayDeque; @@ -41,7 +49,7 @@ * * @param <R> les donnes a retourner * - * @author chemit + * @author tchemit <chemit@codelutin.com> * * @since 2.2.0 */ Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Creator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Creator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Creator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import org.nuiton.topia.TopiaException; @@ -27,7 +35,7 @@ * a parent entity. * <p/> * - * @author chemit + * @author tchemit <chemit@codelutin.com> * @param <P> the type of the parent of the entity to create (if entity has * no parent then used the {@link Void} type). * @param <E> the type of entity to create Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/DBMapping.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/DBMapping.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/DBMapping.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,27 +1,36 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.hibernate.exception.SQLGrammarException; import org.nuiton.topia.TopiaContext; import org.nuiton.topia.TopiaException; import org.nuiton.topia.framework.TopiaContextImpl; @@ -39,6 +48,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Properties; +import java.util.TreeMap; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -47,7 +57,7 @@ * <p/> * On retrouve aussi ici des méthodes utils pour executer du code sql sur la base (notamment la gestion des séquences). * - * @author chemit + * @author tchemit <chemit@codelutin.com> */ public abstract class DBMapping { @@ -81,8 +91,8 @@ protected abstract Class<? extends TopiaEntity> getContractClass(Class<? extends TopiaEntity> entityClass) throws TopiaException; public DBMapping(String propertyFile, String path) throws IOException { - mappingBeanToDb = new java.util.TreeMap<String, String>(); - sequences = new java.util.TreeMap<String, Class<? extends TopiaEntity>>(); + mappingBeanToDb = new TreeMap<String, String>(); + sequences = new TreeMap<String, Class<? extends TopiaEntity>>(); if (propertyFile == null) { propertyFile = path; @@ -207,7 +217,7 @@ } catch (TopiaException e) { // the sequence's name does not exist in database, so it is a grammer exception - if (e.getCause() != null && e.getCause().getClass() == org.hibernate.exception.SQLGrammarException.class) { + if (e.getCause() != null && e.getCause().getClass() == SQLGrammarException.class) { return false; } throw e; @@ -219,7 +229,7 @@ if (check) { checkSequence(sequenceKey); } - final String sql = getSequenceSQL(CREATE_SEQUENCE_FORMAT, sequenceKey); + String sql = getSequenceSQL(CREATE_SEQUENCE_FORMAT, sequenceKey); doSQLWork(ctxt, sql); BigInteger currentValue = getNextValueFromSequence(sequenceKey, ctxt, false); @@ -232,7 +242,7 @@ if (check) { checkSequence(sequenceKey); } - final String sql = getSequenceSQL(UPDATE_SEQUENCE_FORMAT, sequenceKey); + String sql = getSequenceSQL(UPDATE_SEQUENCE_FORMAT, sequenceKey); doSQLWork(ctxt, sql); BigInteger currentValue = getNextValueFromSequence(sequenceKey, ctxt, false); if (log.isDebugEnabled()) { @@ -263,7 +273,7 @@ * @param entityClass the seek entity class * @param property the name of the property to translate * @return the DB name for the given property - * @throws org.nuiton.topia.TopiaException + * @throws TopiaException * if any db pb */ protected String getDBProperty(Class<? extends TopiaEntity> entityClass, String property) throws TopiaException { @@ -280,7 +290,7 @@ /** * @param entityClass the seek entity class * @return the DB name for the given property - * @throws org.nuiton.topia.TopiaException + * @throws TopiaException * if any db pb */ protected String getDBTable(Class<? extends TopiaEntity> entityClass) throws TopiaException { @@ -322,7 +332,7 @@ try { SQLQuery query = ((TopiaContextImpl) ctxt).getHibernate().createSQLQuery(sql); size = (BigInteger) query.list().get(0); - } catch (org.hibernate.exception.SQLGrammarException e) { + } catch (SQLGrammarException e) { // could not obtain sequence throw new TopiaException(e); } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Deletor.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Deletor.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Deletor.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,29 +1,37 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; /** * A simple contract to hook the deletion of an entity. * - * @author chemit + * @author tchemit <chemit@codelutin.com> * @param <P> the parent of the entity to delete (if the entity has no parent * says is not in a association) * of another entity, just used the {@link Void} type). Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/DiffState.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/DiffState.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/DiffState.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import java.util.ArrayList; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/EntityListUpdator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/EntityListUpdator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/EntityListUpdator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import org.apache.commons.beanutils.PropertyUtilsBean; @@ -38,7 +46,7 @@ * * @param <P> type of parent of childs * @param <E> type of child - * @author chemit + * @author tchemit <chemit@codelutin.com> */ public class EntityListUpdator<P extends TopiaEntity, E extends TopiaEntity> implements ListUpdator<P, E> { Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/EntityOperator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/EntityOperator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/EntityOperator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% * Copyright (C) 2004 - 2010 CodeLutin - * + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import java.beans.BeanInfo; @@ -67,7 +75,7 @@ * Note : cet objet ne permet pas d'operation vers les bases. * * @param <B> type de l'entite - * @author chemit + * @author tchemit <chemit@codelutin.com> * @since 2.2.0 */ public class EntityOperator<B extends TopiaEntity> { Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/EntityOperatorStore.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/EntityOperatorStore.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/EntityOperatorStore.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import java.util.HashMap; @@ -28,7 +36,7 @@ /** * Un cache d'operateurs. * - * @author chemit + * @author tchemit <chemit@codelutin.com> * @see EntityOperator */ public class EntityOperatorStore { Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/ListUpdator.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/ListUpdator.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/ListUpdator.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import org.nuiton.topia.TopiaException; @@ -30,7 +38,7 @@ * The purpose of the contract is to make possible (via a StorageService for example) some * automatic and generic behaviour when you want to set a collection of childs into a entity. * - * @author chemit + * @author tchemit <chemit@codelutin.com> * @param <P> the type of the entity which contains the collection to update. * @param <E> the type of entities in the collection. */ Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Loador.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Loador.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/Loador.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,34 +1,43 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; +import java.io.Serializable; import java.util.Map; /** * A simple contract to load an object from another one. * - * @author chemit + * @author tchemit <chemit@codelutin.com> * @param <E> type of bean to load */ -public interface Loador<E> extends java.io.Serializable { +public interface Loador<E> extends Serializable { /** * Obtain from an entity all data to bind to another one according the Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityBinder.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityBinder.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityBinder.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% * Copyright (C) 2004 - 2010 CodeLutin - * + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import org.nuiton.topia.persistence.TopiaEntity; Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityHelper.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityHelper.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityHelper.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import java.util.Iterator; @@ -54,7 +62,7 @@ /** * Une classe avec des méthodes utiles sur les entités. * - * @author chemit + * @author tchemit <chemit@codelutin.com> */ public class TopiaEntityHelper { Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityRef.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityRef.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityRef.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import org.nuiton.topia.persistence.TopiaEntity; @@ -50,7 +58,6 @@ TopiaEntity[] path; public TopiaEntityRef(TopiaEntity root, TopiaEntity ref, String accessorExpression, TopiaEntity[] path) { - super(); this.root = root; this.ref = ref; this.accessorExpression = accessorExpression; Modified: trunk/topia-persistence/src/site/rst/Devel.rst =================================================================== --- trunk/topia-persistence/src/site/rst/Devel.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/Devel.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,6 +1,34 @@ TopiaContextFactory =================== +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + Le topia context est créé en faisant la demande sur le *TopiaContextFactory*. On peut passer en paramètre au *TopiaContextFactory* un object *Property* qui permet de configurer le context. Si aucun fichier est passé en paramètre, un fichier de Modified: trunk/topia-persistence/src/site/rst/FAQ.rst =================================================================== --- trunk/topia-persistence/src/site/rst/FAQ.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/FAQ.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,3 +1,35 @@ +=== +FAQ +=== + +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + Problème lors du chargement d'une entity ======================================== @@ -89,4 +121,4 @@ de la clé métier (méthode create sur le dao). - impossibilité de modifier les valeurs de ces propriétés sur une entité existante ; à moins de le préciser dans la configuration via le tagValue - "naturalIdMutable" placé à "true" (déconseillé). \ No newline at end of file + "naturalIdMutable" placé à "true" (déconseillé). Modified: trunk/topia-persistence/src/site/rst/HibernateMapping.rst =================================================================== --- trunk/topia-persistence/src/site/rst/HibernateMapping.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/HibernateMapping.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -2,6 +2,34 @@ Mapping hibernate ================= +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + Ce document décrit les choix de mapping faits en fonction du diagramme de classe UML. Modified: trunk/topia-persistence/src/site/rst/Isolation.rst =================================================================== --- trunk/topia-persistence/src/site/rst/Isolation.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/Isolation.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -2,6 +2,34 @@ Isolation des TopiaContexts =========================== +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + Remarque: les requètes ne sont pas bonnes, mais sont là pour donner l'idée générale. Modified: trunk/topia-persistence/src/site/rst/ModelGeneration.rst =================================================================== --- trunk/topia-persistence/src/site/rst/ModelGeneration.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/ModelGeneration.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,6 +1,34 @@ Génération des modèles ---------------------- +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + Le module "topia-persistence" de topia est capable de générer la persistence à partir d'un modèle UML. Modified: trunk/topia-persistence/src/site/rst/SchemaMigration.rst =================================================================== --- trunk/topia-persistence/src/site/rst/SchemaMigration.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/SchemaMigration.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -2,6 +2,34 @@ Comment migrer d'un schéma à un autre ===================================== +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + Une application modifie et ajoute des objets. La persistence doit donc être adaptée à ces changements. Le problème est la migration des données existantes dans le nouveau schéma. Modified: trunk/topia-persistence/src/site/rst/Todo.rst =================================================================== --- trunk/topia-persistence/src/site/rst/Todo.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/Todo.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,6 +1,35 @@ +==== TODO ==== +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + Recherches à faire ------------------ Modified: trunk/topia-persistence/src/site/rst/TopiaDocumentation.rst =================================================================== --- trunk/topia-persistence/src/site/rst/TopiaDocumentation.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/TopiaDocumentation.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -2,6 +2,34 @@ ToPIA ===== +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + But === Modified: trunk/topia-persistence/src/site/rst/TopiaQuery.rst =================================================================== --- trunk/topia-persistence/src/site/rst/TopiaQuery.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/TopiaQuery.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -6,6 +6,34 @@ :Revision: $Revision$ :Date: $Date$ +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + L'objet TopiaQuery permet de créer plus simplement des requêtes HQL pour éviter les concaténations complexes lors de l'utilisation de la méthode **find** du TopiaContext. Modified: trunk/topia-persistence/src/site/rst/event.rst =================================================================== --- trunk/topia-persistence/src/site/rst/event.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/event.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,6 +1,34 @@ Gestion des évènements ====================== +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + On peut se mettre listener sur deux sortes d'évènements : les TopiaEntityEvent et les TopiaVetoableEntityEvent. La difference entre les deux se situe sur le moment de l'appel. Modified: trunk/topia-persistence/src/site/rst/howto.rst =================================================================== --- trunk/topia-persistence/src/site/rst/howto.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/howto.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,6 +1,34 @@ How to ====== +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + Ce document a pour objectif de prendre en main le framework Topia. Le document est constitué de 4 parties, la modélisation, la génération, la configuration et l'utilisation. Modified: trunk/topia-persistence/src/site/rst/index.rst =================================================================== (Binary files differ) Modified: trunk/topia-persistence/src/site/rst/project.rst =================================================================== --- trunk/topia-persistence/src/site/rst/project.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/project.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,6 +1,34 @@ Liste de projets similaires ou se rapprochant ============================================= +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + subPersistence -------------- Modified: trunk/topia-persistence/src/site/rst/security.rst =================================================================== --- trunk/topia-persistence/src/site/rst/security.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/rst/security.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,3 +1,34 @@ +======== +sécurité +======== + +.. - +.. * #%L +.. * ToPIA :: Persistence +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - Implantation de la sécurité =========================== Modified: trunk/topia-persistence/src/site/site_fr.xml =================================================================== --- trunk/topia-persistence/src/site/site_fr.xml 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/site/site_fr.xml 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,4 +1,32 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ToPIA :: Persistence + + $Author$ + $LastChangedDate$ + $LastChangedRevision$ + $Id$ + $HeadURL$ + %% + Copyright (C) 2004 - 2010 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> + <project name="${project.name}"> <bannerLeft> Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/framework/EntityStateTest.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/framework/EntityStateTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/framework/EntityStateTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,24 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ - - package org.nuiton.topia.framework; import org.junit.Assert; Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/framework/TopiaQueryTest.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/framework/TopiaQueryTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/framework/TopiaQueryTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,3 +1,30 @@ +/* + * #%L + * ToPIA :: Persistence + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ package org.nuiton.topia.framework; @@ -73,4 +100,4 @@ query.fullQuery()); } -} \ No newline at end of file +} Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/framework/TopiaUtilTest.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/framework/TopiaUtilTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/framework/TopiaUtilTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.framework; import java.net.URL; @@ -41,7 +51,7 @@ /** * Test pour les methodes de {@link TopiaUtil}. * - * @author chemit + * @author tchemit <chemit@codelutin.com> * @version $Revision$ * * Last update: $Date$ Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/generator/TopiaGeneratorUtilTest.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/generator/TopiaGeneratorUtilTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/generator/TopiaGeneratorUtilTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.generator; import org.junit.Test; @@ -25,7 +33,7 @@ /** * - * @author chemit + * @author tchemit <chemit@codelutin.com> */ public class TopiaGeneratorUtilTest { Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/generator/TopiaTestCase.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/generator/TopiaTestCase.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/generator/TopiaTestCase.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.generator; @@ -54,10 +63,10 @@ private final static Log log = LogFactory.getLog(TopiaTestCase.class); /** Proprietes */ - protected static Properties config = null; + protected static Properties config; /** TopiaContext */ - protected static TopiaContext context = null; + protected static TopiaContext context; /** * Init les proprietes de connection a la base Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/EntityVisitorExportXmlTest.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/EntityVisitorExportXmlTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/EntityVisitorExportXmlTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.persistence; Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/ExportXMLVisitor.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/ExportXMLVisitor.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/ExportXMLVisitor.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.persistence; @@ -50,11 +59,11 @@ if(log.isDebugEnabled()) { log.debug("start : " + e); } - - buffer.append("<" + e.getClass().getName()); - buffer.append(" topiaId=\"" + e.getTopiaId() + "\""); - buffer.append(" topiaCreateDate=\"" + e.getTopiaCreateDate() + "\""); - buffer.append(" topiaVersion=\"" + e.getTopiaVersion() + "\""); + + buffer.append("<").append(e.getClass().getName()); + buffer.append(" topiaId=\"").append(e.getTopiaId()).append("\""); + buffer.append(" topiaCreateDate=\"").append(e.getTopiaCreateDate()).append("\""); + buffer.append(" topiaVersion=\"").append(e.getTopiaVersion()).append("\""); buffer.append(">\n"); } @@ -63,8 +72,8 @@ if(log.isDebugEnabled()) { log.debug("visit : " + e); } - - buffer.append("<" + type.getName() + ">" + value + "</" + type.getName() + ">\n"); + + buffer.append("<").append(type.getName()).append(">").append(value).append("</").append(type.getName()).append(">\n"); } @Override @@ -82,8 +91,8 @@ if(log.isDebugEnabled()) { log.debug("end : " + e); } - - buffer.append("</" + e.getClass().getName() + ">\n"); + + buffer.append("</").append(e.getClass().getName()).append(">\n"); } @Override Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/NaturalIdTest.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/NaturalIdTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/NaturalIdTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% * Copyright (C) 2004 - 2010 CodeLutin - * + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##% + * #L% */ + package org.nuiton.topia.persistence; import org.apache.commons.logging.Log; Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/CollectorTest.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/CollectorTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/CollectorTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import org.junit.AfterClass; @@ -37,7 +45,7 @@ /** * - * @author chemit + * @author tchemit <chemit@codelutin.com> */ public class CollectorTest { @@ -75,7 +83,7 @@ protected void onStarted(TopiaEntity e,boolean enter) { super.onStarted(e,enter); int level = stackSize(); - System.out.println(String.format("(%1$2d) %2$" + (level * 2) + "s %3$s", level, ">>", getStack())); + System.out.println(String.format("(%1$2d) %2$" + level * 2 + "s %3$s", level, ">>", getStack())); hits++; } @@ -84,7 +92,7 @@ protected void onEnded(TopiaEntity e,boolean enter) { super.onEnded(e,enter); int level = stackSize() + 1; - System.out.println(String.format("(%1$2d) %2$" + (level * 2) + "s %3$s", level, "<<", getStack())); + System.out.println(String.format("(%1$2d) %2$" + level * 2 + "s %3$s", level, "<<", getStack())); } }; Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/EntityOperatorTest.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/EntityOperatorTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/EntityOperatorTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import java.util.Collection; @@ -39,7 +47,7 @@ /** * - * @author chemit + * @author tchemit <chemit@codelutin.com> */ public class EntityOperatorTest { Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityBinderTest.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityBinderTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityBinderTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import org.junit.Assert; @@ -89,4 +97,4 @@ BinderProvider.getBinder(Company.class, CompanyDTO.class); Assert.assertNotNull(binder); } -} \ No newline at end of file +} Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityHelperTest.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityHelperTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityHelperTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.persistence.util; import java.util.HashSet; @@ -46,7 +54,7 @@ /** * - * @author chemit + * @author tchemit <chemit@codelutin.com> */ public class TopiaEntityHelperTest { Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityRefTester.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityRefTester.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityRefTester.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,3 +1,31 @@ +/* + * #%L + * ToPIA :: Persistence + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + package org.nuiton.topia.persistence.util; import org.junit.After; Modified: trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityRefTesterTest.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityRefTesterTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityRefTesterTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,3 +1,31 @@ +/* + * #%L + * ToPIA :: Persistence + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + package org.nuiton.topia.persistence.util; import org.apache.commons.logging.Log; Modified: trunk/topia-persistence/src/test/java/org/nuiton/topiatest/TestUtils.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topiatest/TestUtils.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topiatest/TestUtils.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ /* - * *##% + * #%L * ToPIA :: Persistence + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% * Copyright (C) 2004 - 2010 CodeLutin - * + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##% + * #L% */ + package org.nuiton.topiatest; import org.apache.commons.logging.Log; Modified: trunk/topia-persistence/src/test/java/org/nuiton/topiatest/beangen/RoueImpl.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topiatest/beangen/RoueImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topiatest/beangen/RoueImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,3 +1,30 @@ +/* + * #%L + * ToPIA :: Persistence + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ package org.nuiton.topiatest.beangen; Modified: trunk/topia-persistence/src/test/java/org/nuiton/topiatest/deletetest/Contact2DAOImpl.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topiatest/deletetest/Contact2DAOImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topiatest/deletetest/Contact2DAOImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topiatest.deletetest; Modified: trunk/topia-persistence/src/test/java/org/nuiton/topiatest/deletetest/DeleteEntityTest.java =================================================================== --- trunk/topia-persistence/src/test/java/org/nuiton/topiatest/deletetest/DeleteEntityTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-persistence/src/test/java/org/nuiton/topiatest/deletetest/DeleteEntityTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,22 +1,32 @@ -/* *##% +/* + * #%L * ToPIA :: Persistence - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + /** * DeleteEntityTest.java * @@ -44,6 +54,7 @@ import org.nuiton.topia.TopiaContextFactory; import org.nuiton.topia.TopiaException; import org.nuiton.topia.TopiaTestDAOHelper; +import org.nuiton.topia.generator.DAOAbstractTransformer; import org.nuiton.topiatest.Personne; import org.nuiton.topiatest.PersonneDAO; import org.nuiton.util.Resource; @@ -98,7 +109,6 @@ public void tearDown() { } - /** * Test for deleting entities with inheritance. Delete from the DAO linked with the subclass * entity and from the DAO linked with the superclass entity. In the test model, the two entities have @@ -155,7 +165,7 @@ * Test for deleting entities with NMultiplicity relation without association class entity. * Test DAO generation for deleting references between two entities with NMultiplicity relation. * In the test model, the two entities have both inheritance. - * @see org.nuiton.topia.generator.DAOAbstractTransformer + * @see DAOAbstractTransformer */ @Test public void testDeleteEntityWithManyToManyRelation() { Modified: trunk/topia-service-history/src/main/java/org/nuiton/topia/history/TopiaHistoryService.java =================================================================== --- trunk/topia-service-history/src/main/java/org/nuiton/topia/history/TopiaHistoryService.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-history/src/main/java/org/nuiton/topia/history/TopiaHistoryService.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -43,21 +43,21 @@ */ public interface TopiaHistoryService extends TopiaService { - public static final String SERVICE_NAME = "history"; + String SERVICE_NAME = "history"; /** * Supprime tout l'historique jusqu'a la date passé en parametre * @param toDate la derniere date effacé inclue * @throws Exception if any pb */ - public void clear(Date toDate) throws Exception; + void clear(Date toDate) throws Exception; /** * Ne garde dans l'historique que les number dernier elements * @param number le nombre d'element a conserver dans l'historique * @throws Exception if any pb */ - public void keep(int number) throws Exception; + void keep(int number) throws Exception; /** * Permet de stocker l'historique dans un writer (par exemple un fichier) @@ -66,7 +66,7 @@ * @param out le flux sur lequel il faut ecrire l'historique * @throws Exception if any pb */ - public void store(Date toDate, Writer out) throws Exception; + void store(Date toDate, Writer out) throws Exception; /** * Search TopiaId targeted by action and user. Results are ordered by @@ -80,7 +80,7 @@ * @return TopiaId of target object * @throws Exception if any pb */ - public List<String> findLastAction(int limit, String user, String type, Integer ... action) throws Exception; + List<String> findLastAction(int limit, String user, String type, Integer ... action) throws Exception; } Modified: trunk/topia-service-index/src/main/java/org/nuiton/topia/index/TopiaIndexImplementor.java =================================================================== --- trunk/topia-service-index/src/main/java/org/nuiton/topia/index/TopiaIndexImplementor.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-index/src/main/java/org/nuiton/topia/index/TopiaIndexImplementor.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -48,15 +48,15 @@ * @param id topiaId object * @param fields object field value */ - public void recordForIndexation(Object id, Object [] fields); + void recordForIndexation(Object id, Object [] fields); /** * This method is called after commit, to indicate to index all record * entry add with addForIndexation method */ - public void doIndexation(); + void doIndexation(); /** * called after commit and rollback to clear the modification record */ - public void clearLastRecordedIndexation(); + void clearLastRecordedIndexation(); } Modified: trunk/topia-service-index/src/main/java/org/nuiton/topia/index/TopiaIndexService.java =================================================================== --- trunk/topia-service-index/src/main/java/org/nuiton/topia/index/TopiaIndexService.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-index/src/main/java/org/nuiton/topia/index/TopiaIndexService.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -60,7 +60,7 @@ */ public interface TopiaIndexService extends TopiaService { - public static final String SERVICE_NAME = "index"; + String SERVICE_NAME = "index"; /** * Permet de faire une recherche, par exemple: @@ -70,7 +70,7 @@ * @param queryText * @return une list triée, le premier élement a le plus gros score */ - public SortedSet<IndexEntry> search(String queryText); + SortedSet<IndexEntry> search(String queryText); /** * Permet de faire une recherche @@ -79,7 +79,7 @@ * recherche, et la valeur la valeur souhaitée pour ce champs * @return une list triée, le premier élement a le plus gros score */ - public SortedSet<IndexEntry> search(Map query); + SortedSet<IndexEntry> search(Map query); } Modified: trunk/topia-service-migration/pom.xml =================================================================== --- trunk/topia-service-migration/pom.xml 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/pom.xml 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,4 +1,32 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ToPIA :: Service Migration + + $Author$ + $LastChangedDate$ + $LastChangedRevision$ + $Id$ + $HeadURL$ + %% + Copyright (C) 2004 - 2010 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> + <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/DatabaseManager.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/DatabaseManager.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/DatabaseManager.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration; import java.sql.Connection; @@ -85,7 +95,7 @@ */ public DatabaseManager(Properties pInfosConnexion) { // initie les proprietes - this.dbConfiguration = new Configuration(); + dbConfiguration = new Configuration(); dbConfiguration.setProperties(pInfosConnexion); logger.debug("Configuration url : " + pInfosConnexion.getProperty(Environment.URL)); @@ -142,7 +152,7 @@ // execute query TMSVersion result = (TMSVersion) session.createCriteria(TMSVersion.class).uniqueResult(); if (result != null) { - version = new Version(result.getVersion().toString()); + version = new Version(result.getVersion()); logger.debug("Query executed, version found : " + version.getVersion()); } else { logger.debug("Query executed, no version found"); Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationCallback.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationCallback.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationCallback.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.migration; import java.lang.reflect.Method; @@ -39,7 +47,7 @@ /** * ManualMigrationCallback * - * @author chemit + * @author tchemit <chemit@codelutin.com> * @version $Revision$ * * Last update : $Date$ @@ -53,7 +61,7 @@ /** * CallbackHandler return type. */ - public static enum MigrationChoice { + public enum MigrationChoice { // no migration NO_MIGRATION, @@ -172,7 +180,7 @@ return result; } - public void executeSQL(TopiaContextImplementor tx, final String... sqls) + public void executeSQL(TopiaContextImplementor tx, String... sqls) throws TopiaException { executeSQL(tx, false, false, sqls); } @@ -215,13 +223,13 @@ public void execute(Connection connection) throws SQLException { int index = 0; int max = sqls.length; - for (final String sql : sqls) { + for (String sql : sqls) { long t0 = System.nanoTime(); - if ((log.isInfoEnabled())) { + if (log.isInfoEnabled()) { String message = ""; if (showProgression) { - message = _("topia.migration.start.sql", (++index), max); + message = _("topia.migration.start.sql", ++index, max); } if (showSql) { message += "\n" + sql; @@ -236,7 +244,7 @@ sta.close(); if (log.isDebugEnabled()) { String message; - message = _("topia.migration.end.sql", (++index), max, StringUtil.convertTime(System.nanoTime() - t0)); + message = _("topia.migration.end.sql", ++index, max, StringUtil.convertTime(System.nanoTime() - t0)); log.debug(message); } } Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationEngine.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationEngine.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationEngine.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration; import org.nuiton.topia.TopiaContext; @@ -167,9 +177,9 @@ String callbackStr = config.getProperty(MIGRATION_CALLBACK, ""); String[] dirs = config.getProperty(TopiaContextImpl.TOPIA_PERSISTENCE_DIRECTORIES, "").split(","); - this.migrateOnInit = Boolean.valueOf(config.getProperty(MIGRATION_MIGRATE_ON_INIT, "true")); - this.showSql = Boolean.valueOf(config.getProperty(MIGRATION_SHOW_SQL, "false")); - this.showProgression = Boolean.valueOf(config.getProperty(MIGRATION_SHOW_PROGRESSION, "false")); + migrateOnInit = Boolean.valueOf(config.getProperty(MIGRATION_MIGRATE_ON_INIT, "true")); + showSql = Boolean.valueOf(config.getProperty(MIGRATION_SHOW_SQL, "false")); + showProgression = Boolean.valueOf(config.getProperty(MIGRATION_SHOW_PROGRESSION, "false")); String modelName = config.getProperty(MIGRATION_MODEL_NAME, null); if (version == null || version.trim().isEmpty()) { @@ -185,13 +195,13 @@ throw new IllegalStateException("'" + MIGRATION_MAPPING_DIRECTORY + "' not set."); } - this.applicationVersion = VersionUtil.valueOf(version.trim()); - this.mappingsDirectory = mappingDirectory.trim() + "/" + modelName.trim(); + applicationVersion = VersionUtil.valueOf(version.trim()); + mappingsDirectory = mappingDirectory.trim() + "/" + modelName.trim(); // enregistrement du callback try { Class<?> clazz = Class.forName(callbackStr); - this.callback = (ManualMigrationCallback) clazz.newInstance(); + callback = (ManualMigrationCallback) clazz.newInstance(); } catch (ClassNotFoundException e) { log.error("CallbackHandler Class " + callbackStr + " not found", e); @@ -505,7 +515,7 @@ // schema des noms de dossier de version // FIX #38 : never use a File.separator for a class-path resource searching - final Pattern MAPPING_PATTERN = Pattern.compile(mappingsDirectory + "/([0-9]+(\\.[0-9]+)*)"); + Pattern MAPPING_PATTERN = Pattern.compile(mappingsDirectory + "/([0-9]+(\\.[0-9]+)*)"); if (log.isDebugEnabled()) { log.debug("MAPPING_PATTERN : " + MAPPING_PATTERN); Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationService.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationService.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationService.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.migration; @@ -50,14 +59,14 @@ /** * Retourne la configuration * @return la configuration - * @see org.hibernate.cfg.Configuration + * @see Configuration */ Configuration getConfiguration(); /** * Renseigne la configuration * @param configuration la configuration - * @see org.hibernate.cfg.Configuration + * @see Configuration */ void setConfiguration(Configuration configuration); Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceException.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceException.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceException.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.migration; @@ -41,7 +50,6 @@ * Constructeur par defaut */ public MigrationServiceException() { - super(); } /** Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceImpl.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.migration; @@ -93,7 +102,6 @@ * Constructeur vide. */ public MigrationServiceImpl() { - super(); // init the configuration file currentHibernateConfigurationFile = null; @@ -117,7 +125,7 @@ */ @Override public void setConfigurationFile(String hibernateConfigurationFile) { - this.currentHibernateConfigurationFile = hibernateConfigurationFile; + currentHibernateConfigurationFile = hibernateConfigurationFile; } /* (non-Javadoc) @@ -133,7 +141,7 @@ */ @Override public void setConfiguration(Configuration configuration) { - this.currentApplicationConfiguration = configuration; + currentApplicationConfiguration = configuration; } /* (non-Javadoc) @@ -175,15 +183,15 @@ protected void loadApplicationConfiguration() { // configuration pas deja fournit - if(this.currentApplicationConfiguration == null) { + if(currentApplicationConfiguration == null) { // creation - this.currentApplicationConfiguration = new Configuration(); + currentApplicationConfiguration = new Configuration(); - if ( this.currentHibernateConfigurationFile != null ) { - logger.debug("Loading configuration file : " + this.currentHibernateConfigurationFile); + if (currentHibernateConfigurationFile != null ) { + logger.debug("Loading configuration file : " + currentHibernateConfigurationFile); // chargement via l'objet configuration dhibernate - currentApplicationConfiguration.configure(this.currentHibernateConfigurationFile); + currentApplicationConfiguration.configure(currentHibernateConfigurationFile); } else { logger.debug("Loading configuration file : default hibernate configuration file"); @@ -206,12 +214,12 @@ */ protected void checkInformation() throws MigrationServiceException { // check that version is set - if(this.currentApplicationVersion == null) { + if(currentApplicationVersion == null) { throw new MigrationServiceException("No version set"); } // check that shema location is set - if(this.mappingsDirectory == null) { + if(mappingsDirectory == null) { throw new MigrationServiceException("No old mapping directory set"); } } @@ -233,7 +241,7 @@ // initie un DatabaseManager // fournit les propietes de connection a la base (properties) - DatabaseManager dbManager = new DatabaseManager(this.currentApplicationConfiguration.getProperties()); + DatabaseManager dbManager = new DatabaseManager(currentApplicationConfiguration.getProperties()); // recupere la version de la base Version vdbVersion = dbManager.getDataBaseVersion(); @@ -318,7 +326,7 @@ //ConfigurationHelper.getConfigurationForVersion(v) // ne positionne pas les properties parce qu'elle n'en a pas connaissance // on les met ici - cConfiguration.setProperties(this.currentApplicationConfiguration.getProperties()); + cConfiguration.setProperties(currentApplicationConfiguration.getProperties()); // renommage des table // et creation des schema intermediaires @@ -336,13 +344,13 @@ // on va instancier le nouveau schema (le creer) // on renomme le nom des tables d'abord - this.currentApplicationConfiguration = dbManager.setRenamedTableSchema(this.currentApplicationConfiguration,this.currentApplicationVersion); + currentApplicationConfiguration = dbManager.setRenamedTableSchema(currentApplicationConfiguration, currentApplicationVersion); logger.debug("Creating current application schema"); - dbManager.setApplicationSchemaInDatabase(this.currentApplicationConfiguration); + dbManager.setApplicationSchemaInDatabase(currentApplicationConfiguration); - ConfigurationAdapter appCfgAdpater = new ConfigurationAdapter(this.currentApplicationConfiguration,this.currentApplicationVersion); - smVersionAndConfigurationAdapterMap.put(this.currentApplicationVersion, appCfgAdpater); + ConfigurationAdapter appCfgAdpater = new ConfigurationAdapter(currentApplicationConfiguration, currentApplicationVersion); + smVersionAndConfigurationAdapterMap.put(currentApplicationVersion, appCfgAdpater); logger.info("Data migration"); @@ -370,7 +378,7 @@ } // renommage correct du schema courant - dbManager.renameTables(this.currentApplicationConfiguration, this.currentApplicationVersion); + dbManager.renameTables(currentApplicationConfiguration, currentApplicationVersion); // il faudrait ici valider les transactions et fermer les sessions // vmvManager a sa propre gestion des transactions/session @@ -403,7 +411,7 @@ // return succes flag // - no migration needed // - or migration needed and accepted - return !bMigrationNeeded || (bMigrationNeeded && + return !bMigrationNeeded || (bMigrationNeeded && ( bMigrationWanted.equals(MigrationChoice.MIGRATION) || bMigrationWanted.equals(MigrationChoice.CUSTOM_MIGRATION))); } @@ -484,7 +492,7 @@ */ protected Map<Version, Configuration> loadIntermediateConfigurations(Version vdbVersion) { // schema des noms de dossier de version - final Pattern pattern = Pattern.compile(mappingsDirectory + File.separator + "([0-9]+(\\.[0-9]+)*)"); + Pattern pattern = Pattern.compile(mappingsDirectory + File.separator + "([0-9]+(\\.[0-9]+)*)"); // instancie la map ordonee Map<Version, Configuration> mVersionAndConfigurationMap = null; Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationService.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationService.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationService.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration; import org.nuiton.topia.event.TopiaContextListener; Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationServiceImpl.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationServiceImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationServiceImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration; import java.io.File; @@ -62,7 +72,6 @@ static final protected String TOPIA_PERSISTENCE_CLASSES = "topia.persistence.classes"; public TopiaMigrationServiceImpl() { - super(); } @Override @@ -72,7 +81,7 @@ @Override public String getServiceName() { - return TopiaMigrationService.SERVICE_NAME; + return SERVICE_NAME; } @Override @@ -129,13 +138,13 @@ hibernateConfiguration.setProperties(prop); // reseigne la configuration qui sera utilisee - this.setConfiguration(hibernateConfiguration); + setConfiguration(hibernateConfiguration); // test version null if (applicationversion == null) { log.error("'" + MIGRATION_APPLICATION_VERSION + "' not set."); } else { - this.setApplicationVersion(applicationversion); + setApplicationVersion(applicationversion); } @@ -182,7 +191,7 @@ for (String modelname : modelnames) { // Don't use File.separator, don't work on windows - this.setMappingsDirectory(mappingdir + "/" + modelname); + setMappingsDirectory(mappingdir + "/" + modelname); boolean complete = false; Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/callback/MigrationCallbackHandler.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/callback/MigrationCallbackHandler.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/callback/MigrationCallbackHandler.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.callback; import org.nuiton.topia.migration.DatabaseManager; @@ -34,7 +44,7 @@ /** * CallbackHandler return type. */ - public static enum MigrationChoice { + enum MigrationChoice { // no migration NO_MIGRATION, @@ -52,5 +62,7 @@ * @param applicationVersion application version * @return migration aggrement */ - public MigrationChoice doMigration(DatabaseManager dbManager, String databaseVersion, String applicationVersion); + MigrationChoice doMigration(DatabaseManager dbManager, + String databaseVersion, + String applicationVersion); } Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ExceptionAttributeUndefined.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ExceptionAttributeUndefined.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ExceptionAttributeUndefined.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.migration.common; @@ -43,7 +52,6 @@ * Constructeur par defaut */ public ExceptionAttributeUndefined() { - super(); } /** Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapter.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapter.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapter.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.common; import java.io.Serializable; Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterAdmin.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterAdmin.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterAdmin.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.common; import java.io.Serializable; Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterImpl.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,27 +1,36 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.common; import org.nuiton.util.Version; import java.io.Serializable; import java.util.HashMap; -import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.TreeSet; @@ -319,7 +328,7 @@ */ @Override public int hashCode() { - return this.idInner.hashCode(); + return idInner.hashCode(); } /** @@ -333,7 +342,7 @@ public boolean equals(Object obj) { if (obj instanceof MapAdapter) { MapAdapter other = (MapAdapter) obj; - return (this.idInner.equals(other)); + return idInner.equals(other); } return false; } @@ -369,8 +378,7 @@ @Override public void copyAll() { Set<String> s = InnerMap.keySet(); - for (Iterator<String> iter = s.iterator(); iter.hasNext();) { - String element = iter.next(); + for (String element : s) { OuterMap.put(element, InnerMap.get(element)); } } @@ -412,7 +420,7 @@ @Override public String toString() { - return "Inner => " + this.InnerClass + ":" + this.InnerMap.toString() + "\n" + "Outer => " + this.OuterClass + ":" + this.OuterMap.toString(); + return "Inner => " + InnerClass + ":" + InnerMap.toString() + "\n" + "Outer => " + OuterClass + ":" + OuterMap.toString(); } @Override Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClass.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClass.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClass.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.common; /** Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClassMapped.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClassMapped.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClassMapped.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.common; import java.io.Serializable; Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClass.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClass.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClass.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.common; import java.util.StringTokenizer; @@ -47,12 +57,11 @@ * @param canonicalName le nom avec package */ public SimpleProxyClass(String canonicalName) { - super(); this.canonicalName = canonicalName; StringTokenizer tokenizer = new StringTokenizer(canonicalName, "."); - this.name = null; + name = null; while (tokenizer.hasMoreTokens()) { - this.name = tokenizer.nextToken(); + name = tokenizer.nextToken(); } } @@ -62,30 +71,30 @@ } public String getShortClassName() { - return this.name; + return name; } @Override public int hashCode() { - return this.canonicalName.hashCode(); + return canonicalName.hashCode(); } @Override public ProxyClass clone() { - return new SimpleProxyClass(this.canonicalName); + return new SimpleProxyClass(canonicalName); } @Override public boolean equals(Object other) { if (other instanceof ProxyClass) { ProxyClass o = (ProxyClass) other; - return o.getCanonicalName().equals(this.canonicalName); + return o.getCanonicalName().equals(canonicalName); } return false; } @Override public String toString() { - return this.canonicalName; + return canonicalName; } } Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClassMapped.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClassMapped.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClassMapped.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.common; import java.io.Serializable; @@ -44,21 +54,18 @@ * @param nameIdAttribute */ public SimpleProxyClassMapped(ProxyClass pc, Serializable nameIdAttribute) { - super(); this.pc = pc; this.nameIdAttribute = nameIdAttribute; } public SimpleProxyClassMapped(ProxyClass pc, Serializable nameIdAttribute, Migration migration) { - super(); this.pc = pc; this.nameIdAttribute = nameIdAttribute; - this.m = migration; + m = migration; } public SimpleProxyClassMapped(ProxyClass class1) { - super(); - this.pc = class1; + pc = class1; } /* (non-Javadoc) @@ -86,21 +93,21 @@ @Override public int hashCode() { - return this.pc.getCanonicalName().hashCode(); + return pc.getCanonicalName().hashCode(); } @Override public boolean equals(Object other) { if (other instanceof ProxyClassMapped) { ProxyClassMapped o = (ProxyClassMapped) other; - return o.getProxyClass().equals(this.pc); + return o.getProxyClass().equals(pc); } return false; } @Override public String toString() { - return this.toString() + "(" + nameIdAttribute + ")"; + return toString() + "(" + nameIdAttribute + ")"; } @Override Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/Version.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/Version.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/Version.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.common; import java.util.StringTokenizer; @@ -51,7 +61,7 @@ * Constructeur vide */ public Version() { - this.value = new String(); + value = ""; } /** @@ -65,7 +75,7 @@ @Override public boolean equals(Object obj) { if (obj instanceof Version) { - return this.compareTo((Version) obj) == 0; + return compareTo((Version) obj) == 0; } return false; } @@ -73,7 +83,7 @@ @Override public int compareTo(Version other) { StringTokenizer tokOther = new StringTokenizer(other.getVersion(), "."); - StringTokenizer tokThis = new StringTokenizer(this.getVersion(), "."); + StringTokenizer tokThis = new StringTokenizer(getVersion(), "."); // resultat boolean find = false; Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/BaseException.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/BaseException.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/BaseException.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.kernel; /** @@ -49,7 +59,6 @@ * */ public BaseException() { - super(); } /** Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationAdapter.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationAdapter.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationAdapter.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.kernel; import java.io.Serializable; @@ -93,9 +103,8 @@ * @param version */ public ConfigurationAdapter(Configuration configuration, Version version) { - super(); this.configuration = configuration; - this.sessionFactory = configuration.buildSessionFactory(); + sessionFactory = configuration.buildSessionFactory(); this.version = version; // sessionFactory necessaire pour le calcul, c'est moche, mais on a pas @@ -162,7 +171,7 @@ LinkedList<MapAdapterAdmin> result = new LinkedList<MapAdapterAdmin>(); // session - Session session = this.sessionFactory.openSession(); + Session session = sessionFactory.openSession(); // transaction Transaction tx = session.beginTransaction(); @@ -182,7 +191,7 @@ MapAdapterAdmin map = new MapAdapterImpl(m, className, nomIdAttribute, (Serializable) m.get(nomIdAttribute)); - map.setInnerVersion(this.getVersion()); + map.setInnerVersion(getVersion()); result.add(map); } @@ -203,7 +212,7 @@ public MapAdapterAdmin getData(ProxyClass className, Serializable idVal) { // session - Session session = this.sessionFactory.openSession(); + Session session = sessionFactory.openSession(); // transaction Transaction tx = session.beginTransaction(); @@ -227,7 +236,7 @@ maa = new MapAdapterImpl(m, className, nomIdAttribute, (Serializable) m.get(nomIdAttribute)); - maa.setInnerVersion(this.getVersion()); + maa.setInnerVersion(getVersion()); } tx.commit(); @@ -247,7 +256,7 @@ Map<ProxyClassMapped, ProxyClassMapped> linkedClass) { logger.debug("Saving collection of maps"); for (MapAdapterAdmin maMap : myMaps) { - this.saveMap(maMap, linkedClass); + saveMap(maMap, linkedClass); } } @@ -267,7 +276,7 @@ ProxyClass clazz = maMap.getInnerClass(); // session - Session session = this.sessionFactory.getCurrentSession(); + Session session = sessionFactory.getCurrentSession(); session.beginTransaction(); Session dynamicSession = session.getSession(EntityMode.MAP); // mode map @@ -279,7 +288,7 @@ session.getTransaction().rollback(); // to disconnect id associated within session // session - session = this.sessionFactory.getCurrentSession(); + session = sessionFactory.getCurrentSession(); session.beginTransaction(); dynamicSession = session.getSession(EntityMode.MAP); // mode map @@ -300,8 +309,9 @@ String clazz = mapData.get("$type$").toString(); ProxyClassMapped pc = null; - if ((linkedClass != null) && (linkedClass.containsKey(new SimpleProxyClassMapped( - new SimpleProxyClass(clazz))))) { + if (linkedClass != null && + linkedClass.containsKey(new SimpleProxyClassMapped( + new SimpleProxyClass(clazz)))) { pc = linkedClass.get(new SimpleProxyClassMapped( new SimpleProxyClass(clazz))); @@ -330,8 +340,7 @@ // remove collections Collection<?> c = (Collection<?>) mapData.get(key); - for (Iterator<?> iter = c.iterator(); iter.hasNext();) { - Object element = iter.next(); + for (Object element : c) { if (element instanceof Map<?, ?>) { deletePersistentCollection((Map<String, Object>) element); } @@ -397,9 +406,8 @@ // sous // niveau tout seul) Iterable<?> pl = (Iterable<?>) m.get(key); - for (Iterator<?> iter = pl.iterator(); iter.hasNext();) { + for (Object element : pl) { // item courant de la map - Object element = iter.next(); if (element instanceof Map<?, ?>) { element = removeProxy((Map<String, Object>) element); } @@ -442,8 +450,9 @@ String clazz = element.get("$type$").toString(); ProxyClassMapped pc = null; - if ((linkedClass != null) && (linkedClass.containsKey(new SimpleProxyClassMapped( - new SimpleProxyClass(clazz))))) { + if (linkedClass != null && + linkedClass.containsKey(new SimpleProxyClassMapped( + new SimpleProxyClass(clazz)))) { pc = linkedClass.get(new SimpleProxyClassMapped( new SimpleProxyClass(clazz))); clazz = pc.getProxyClass().getCanonicalName(); Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationHelper.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationHelper.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationHelper.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.kernel; import java.io.BufferedReader; @@ -97,7 +107,7 @@ public Configuration getConfigurationInDirectory(String pathDirectory) { // schema des noms de fichier a lire - final String regexFilename = ".*\\.hbm\\.xml"; + String regexFilename = ".*\\.hbm\\.xml"; // nouvelle configuration en retour Configuration configuration = null; @@ -144,7 +154,7 @@ logger.debug("already loaded resource : " + url); continue; } - String xmlmapping = ConfigurationHelper.getEntityMappingFromFile(url); + String xmlmapping = getEntityMappingFromFile(url); // lit le fichier avec lutin xml org.w3c.dom.Document domDoc = getDocumentResolvedByHibernate(xmlmapping); @@ -229,7 +239,7 @@ reader.setValidation(false); //DTDEntityResolver = celui d'hibernate reader.setEntityResolver(new DTDEntityResolver()); - org.dom4j.Document document = null; + Document document = null; try { document = reader.read(fichier); } catch (DocumentException e) { @@ -246,7 +256,7 @@ * @return le document construit */ protected static org.w3c.dom.Document getDocumentResolvedByHibernate(String xmlString) { - DocumentBuilder domBuild = ConfigurationHelper.getDocumentBuilder(); + DocumentBuilder domBuild = getDocumentBuilder(); // resolver hibernate domBuild.setEntityResolver(new DTDEntityResolver()); Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/DependenciesHelper.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/DependenciesHelper.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/DependenciesHelper.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.kernel; import java.util.HashSet; @@ -84,7 +94,6 @@ * @param configuration une Configuration */ public DependenciesHelper(SessionFactory sessionFactory, Configuration configuration) { - super(); this.configuration = configuration; this.sessionFactory = sessionFactory; Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/NullMigrationClass.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/NullMigrationClass.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/NullMigrationClass.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.kernel; import org.nuiton.topia.migration.common.ProxyClass; Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ObjectNotFound.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ObjectNotFound.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ObjectNotFound.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.kernel; /** Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/Transformer.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/Transformer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/Transformer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.kernel; import java.io.Serializable; @@ -72,14 +82,14 @@ public Transformer( SortedMap<Version, ConfigurationAdapter> smConfigurationAdapterForVersion) { - this.confAdapters = smConfigurationAdapterForVersion; - this.loadedClass = new HashMap<ProxyClass, Collection<MapAdapterAdmin>>(); - this.baseConf = smConfigurationAdapterForVersion.get(smConfigurationAdapterForVersion.firstKey()); + confAdapters = smConfigurationAdapterForVersion; + loadedClass = new HashMap<ProxyClass, Collection<MapAdapterAdmin>>(); + baseConf = smConfigurationAdapterForVersion.get(smConfigurationAdapterForVersion.firstKey()); alreadyMigrated = new HashSet<ProxyClass>(); - this.linkedClass = new HashMap<ProxyClassMapped, ProxyClassMapped>(); - this.classFinder = new FinderMigration(); - log = LogFactory.getLog(this.getClass()); + linkedClass = new HashMap<ProxyClassMapped, ProxyClassMapped>(); + classFinder = new FinderMigration(); + log = LogFactory.getLog(getClass()); } /** @@ -87,35 +97,35 @@ */ public void execute() { // on l'enleve de la liste des version a obtenir - this.confAdapters.remove(this.baseConf.getVersion()); + confAdapters.remove(baseConf.getVersion()); // tant qu'on en est pas la derniere - while (!this.confAdapters.isEmpty()) { + while (!confAdapters.isEmpty()) { // la suivante : - this.nextConf = confAdapters.get(confAdapters.firstKey()); - this.migrateCurrentToNext(); + nextConf = confAdapters.get(confAdapters.firstKey()); + migrateCurrentToNext(); } } private void migrateCurrentToNext() { - log.info("Processing step: version " + this.baseConf.getVersion().getVersion() + " to version " + this.nextConf.getVersion().getVersion()); + log.info("Processing step: version " + baseConf.getVersion().getVersion() + " to version " + nextConf.getVersion().getVersion()); // les classes de la version de destination : - Collection<ProxyClass> classes = this.nextConf.getClasses(); + Collection<ProxyClass> classes = nextConf.getClasses(); Map<ProxyClass, MigrationClass> migrations = findCurrentMigrations(classes); log.debug("Migrations list : " + migrations); - this.performMigrations(migrations); - this.baseConf = nextConf; + performMigrations(migrations); + baseConf = nextConf; alreadyMigrated.clear(); - this.nextConf = null; - this.linkedClass.clear(); - this.loadedClass.clear(); + nextConf = null; + linkedClass.clear(); + loadedClass.clear(); confAdapters.remove(confAdapters.firstKey()); } private void performMigrations(Map<ProxyClass, MigrationClass> migrations) { for (ProxyClass pc : migrations.keySet()) { - log.debug("Migration of '" + pc.getCanonicalName() + "' to " + this.nextConf.getVersion()); + log.debug("Migration of '" + pc.getCanonicalName() + "' to " + nextConf.getVersion()); migrateAClassRec(pc, migrations, null); } @@ -151,9 +161,9 @@ log.debug(pc.getCanonicalName() + " (data provided by class '" + parent.getCanonicalName() + "')"); - ProxyClassMapped pcmBase = new SimpleProxyClassMapped(parent, this.baseConf.getNameIdAttribute(parent)); + ProxyClassMapped pcmBase = new SimpleProxyClassMapped(parent, baseConf.getNameIdAttribute(parent)); ProxyClassMapped pcmNext = new SimpleProxyClassMapped( - pc, this.nextConf.getNameIdAttribute(pc), migration); + pc, nextConf.getNameIdAttribute(pc), migration); linkedClass.put(pcmBase, pcmNext); for (MapAdapterAdmin m : data) { @@ -170,8 +180,8 @@ } alreadyMigrated.add(pc); - this.switchMaps(data); - log.debug("Saving '" + pc.getCanonicalName() + "' in version " + this.nextConf.getVersion()); + switchMaps(data); + log.debug("Saving '" + pc.getCanonicalName() + "' in version " + nextConf.getVersion()); save(data); clearLoadedClasses(); @@ -184,7 +194,7 @@ } private void clearLoadedClasses() { - this.loadedClass.clear(); + loadedClass.clear(); } private void save(Collection<MapAdapterAdmin> data) { @@ -196,11 +206,11 @@ Map<ProxyClass, MigrationClass> result = new HashMap<ProxyClass, MigrationClass>(); for (ProxyClass klass : classes) { - MigrationClass mig = this.classFinder.getMigrationClass(klass, - this.baseConf.getVersion(), this.nextConf.getVersion()); + MigrationClass mig = classFinder.getMigrationClass(klass, + baseConf.getVersion(), nextConf.getVersion()); if (mig == null) { - mig = new NullMigrationClass(MigrationNull.class.getCanonicalName(), klass, this.baseConf.getVersion(), - this.nextConf.getVersion()); + mig = new NullMigrationClass(MigrationNull.class.getCanonicalName(), klass, baseConf.getVersion(), + nextConf.getVersion()); } result.put(klass, mig); } @@ -209,42 +219,42 @@ @Override public MapAdapter getNewMap(ProxyClass clazz, Serializable idVal) throws ObjectNotFound { - return getMap(this.nextConf, clazz, idVal); + return getMap(nextConf, clazz, idVal); } @Override public MapAdapter getNewMap(String clazz, Serializable idVal) throws ObjectNotFound { - return getMap(this.nextConf, new SimpleProxyClass(clazz), idVal); + return getMap(nextConf, new SimpleProxyClass(clazz), idVal); } @Override public MapAdapter getOldMap(ProxyClass clazz, Serializable idVal) throws ObjectNotFound { - return getMap(this.baseConf, clazz, idVal); + return getMap(baseConf, clazz, idVal); } @Override public MapAdapter getOldMap(String clazz, Serializable idVal) throws ObjectNotFound { - return getMap(this.baseConf, new SimpleProxyClass(clazz), idVal); + return getMap(baseConf, new SimpleProxyClass(clazz), idVal); } @Override public Collection<MapAdapter> getNewMaps(String clazz) { - return getMaps(this.nextConf, new SimpleProxyClass(clazz)); + return getMaps(nextConf, new SimpleProxyClass(clazz)); } @Override public Collection<MapAdapter> getNewMaps(ProxyClass clazz) { - return getMaps(this.nextConf, clazz); + return getMaps(nextConf, clazz); } @Override public Collection<MapAdapter> getOldMaps(String clazz) { - return getMaps(this.baseConf, new SimpleProxyClass(clazz)); + return getMaps(baseConf, new SimpleProxyClass(clazz)); } @Override public Collection<MapAdapter> getOldMaps(ProxyClass clazz) { - return getMaps(this.baseConf, clazz); + return getMaps(baseConf, clazz); } private MapAdapter getMap(ConfigurationAdapter cfg, ProxyClass pc, Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersion.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersion.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersion.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.mappings; /** @@ -42,7 +52,6 @@ * Constructeur */ private TMSVersion() { - super(); } /** Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/AbstractMigration.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/AbstractMigration.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/AbstractMigration.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.transformation; import java.io.Serializable; Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/FinderMigration.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/FinderMigration.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/FinderMigration.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.transformation; import org.apache.commons.logging.Log; @@ -59,7 +69,7 @@ */ public FinderMigration(String packag) { this(); - FinderMigration.PACKAGE = packag; + PACKAGE = packag; } /** Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MapHelper.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MapHelper.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MapHelper.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.transformation; import java.io.Serializable; @@ -47,7 +57,7 @@ * @return le tuple * @throws ObjectNotFound */ - public MapAdapter getNewMap(ProxyClass clazz, Serializable id) throws ObjectNotFound; + MapAdapter getNewMap(ProxyClass clazz, Serializable id) throws ObjectNotFound; /** * Retourne un tuple d'une table des nouvelles bases @@ -55,7 +65,7 @@ * @param id l'id de l'objet * @return le tuple */ - public MapAdapter getNewMap(String clazz, Serializable id) throws ObjectNotFound; + MapAdapter getNewMap(String clazz, Serializable id) throws ObjectNotFound; /** * Retourne un tuple d'une table des annciennes bases @@ -64,7 +74,7 @@ * @return le tuple * @throws ObjectNotFound si objet non trouve */ - public MapAdapter getOldMap(ProxyClass clazz, Serializable id) throws ObjectNotFound; + MapAdapter getOldMap(ProxyClass clazz, Serializable id) throws ObjectNotFound; /** * Retourne un tuple d'une table des anciennes bases @@ -73,33 +83,33 @@ * @return le tuple * @throws ObjectNotFound si objet non trouve */ - public MapAdapter getOldMap(String clazz, Serializable id) throws ObjectNotFound; + MapAdapter getOldMap(String clazz, Serializable id) throws ObjectNotFound; /** * Retourne les tuples d'une table des anciennes bases * @param clazz le nom qualifié de la classe * @return les tuples */ - public Collection<MapAdapter> getOldMaps(String clazz); + Collection<MapAdapter> getOldMaps(String clazz); /** * Retourne les tuples d'une table des anciennes bases * @param clazz un proxy classe * @return les tuples */ - public Collection<MapAdapter> getOldMaps(ProxyClass clazz); + Collection<MapAdapter> getOldMaps(ProxyClass clazz); /** * Retourne les tuples d'une table des nouvelles bases * @param clazz le nom qualifié de la classe * @return les tuples */ - public Collection<MapAdapter> getNewMaps(String clazz); + Collection<MapAdapter> getNewMaps(String clazz); /** * Retourne les tuples d'une table des nouvelles bases * @param clazz un proxy classe * @return les tuples */ - public Collection<MapAdapter> getNewMaps(ProxyClass clazz); + Collection<MapAdapter> getNewMaps(ProxyClass clazz); } Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/Migration.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/Migration.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/Migration.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.transformation; import java.io.Serializable; @@ -40,19 +50,19 @@ * Nom de la classe depuis laquelle provient la nouvelle classe * @return Le nom de la classe depuis laquelle provient la nouvelle classe ou <tt>null</tt> si le nom ne change pas */ - public ProxyClass migrateFrom(); + ProxyClass migrateFrom(); /** * Effectue la migration * @param map La map d'entree/sortie * @param helper ? */ - public void migrate(MapAdapter map, MapHelper helper); + void migrate(MapAdapter map, MapHelper helper); /** * Modification de l'identifiant * @param value L'ancienne valeur de l'identifiant * @return La nouvelle valeur de l'identifiant */ - public Serializable modifyId(Serializable value); + Serializable modifyId(Serializable value); } Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationClass.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationClass.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationClass.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.transformation; import org.nuiton.topia.migration.common.ProxyClass; @@ -51,7 +61,6 @@ * @param end */ public MigrationClass(String nameMigrationClass, ProxyClass nameClass, Version begin, Version end) { - super(); this.nameMigrationClass = nameMigrationClass; this.nameClass = nameClass; this.begin = begin; @@ -122,7 +131,7 @@ //posera peut etre un probleme quand on devra passer a quelque chose de plus complique @Override public int compareTo(MigrationClass o) { - return this.begin.compareTo(o.begin); + return begin.compareTo(o.begin); } /** @@ -136,11 +145,11 @@ try { //on charge la classe de migration Class<Migration> classOfMigration; - classOfMigration = (Class<Migration>) ClassLoader.getSystemClassLoader().loadClass(this.nameMigrationClass); + classOfMigration = (Class<Migration>) ClassLoader.getSystemClassLoader().loadClass(nameMigrationClass); //on si le nom de la classe n'est pas preciser, on l'invente; result = classOfMigration.newInstance().migrateFrom(); if (result == null) { - result = this.nameClass; + result = nameClass; } } catch (ClassNotFoundException e) { e.printStackTrace(); @@ -155,6 +164,6 @@ @Override public String toString() { - return this.nameMigrationClass + "[" + this.nameClass + ":" + this.begin + "->" + this.end + "]"; + return nameMigrationClass + "[" + nameClass + ":" + begin + "->" + end + "]"; } } Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationNull.java =================================================================== --- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationNull.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationNull.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.migration.transformation; import org.nuiton.topia.migration.common.MapAdapter; Modified: trunk/topia-service-migration/src/site/rst/index.rst =================================================================== --- trunk/topia-service-migration/src/site/rst/index.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/site/rst/index.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,6 +1,34 @@ ToPIA Migration Service ======================= +.. - +.. * #%L +.. * ToPIA :: Service Migration +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + ToPIA Migration Service est un module ToPIA chargé d'effectuer la migration d'une base de données existante sans perte de données. Modified: trunk/topia-service-migration/src/site/rst/manualMigration.rst =================================================================== --- trunk/topia-service-migration/src/site/rst/manualMigration.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/site/rst/manualMigration.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,6 +1,34 @@ ToPIA Migration Service (manual version) ======================================== +.. - +.. * #%L +.. * ToPIA :: Service Migration +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + ToPIA Migration Service est un module ToPIA chargé d'effectuer la migration d'une base de données existante sans perte de données. Modified: trunk/topia-service-migration/src/site/site_fr.xml =================================================================== --- trunk/topia-service-migration/src/site/site_fr.xml 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/site/site_fr.xml 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,4 +1,32 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ToPIA :: Service Migration + + $Author$ + $LastChangedDate$ + $LastChangedRevision$ + $Id$ + $HeadURL$ + %% + Copyright (C) 2004 - 2010 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> + <project name="${project.name}"> <bannerLeft> Modified: trunk/topia-service-migration/src/test/java/org/nuiton/topia/migration/common/VersionTest.java =================================================================== --- trunk/topia-service-migration/src/test/java/org/nuiton/topia/migration/common/VersionTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/test/java/org/nuiton/topia/migration/common/VersionTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,22 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.migration.common; import org.junit.Assert; Modified: trunk/topia-service-migration/src/test/java/org/nuiton/topia/migration/kernel/ConfigurationAdapterTest.java =================================================================== --- trunk/topia-service-migration/src/test/java/org/nuiton/topia/migration/kernel/ConfigurationAdapterTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-migration/src/test/java/org/nuiton/topia/migration/kernel/ConfigurationAdapterTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,22 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Migration - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.migration.kernel; import org.nuiton.util.Version; Modified: trunk/topia-service-replication/pom.xml =================================================================== --- trunk/topia-service-replication/pom.xml 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/pom.xml 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,4 +1,32 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ToPIA :: Service Replication + + $Author$ + $LastChangedDate$ + $LastChangedRevision$ + $Id$ + $HeadURL$ + %% + Copyright (C) 2004 - 2010 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> + <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/ReplicationEngine.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/ReplicationEngine.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/ReplicationEngine.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication; import org.nuiton.topia.replication.model.ReplicationOperationDef; @@ -353,7 +361,7 @@ } } - List<? extends TopiaEntity> nodeEntities = ReplicationEngine.getEntitiesList(srcCtxt, nodeEntityIds.toArray(new String[nodeEntityIds.size()])); + List<? extends TopiaEntity> nodeEntities = getEntitiesList(srcCtxt, nodeEntityIds.toArray(new String[nodeEntityIds.size()])); for (ReplicationOperationDef operationDef : operationDefs) { Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/TopiaReplicationImplementor.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/TopiaReplicationImplementor.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/TopiaReplicationImplementor.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaReplicationImplementor.java @@ -153,18 +162,4 @@ TopiaContext dstCtxt, Map<Class<? extends TopiaEntity>, List<String>> data, Set<ReplicationNode> treated) throws Exception; -// /** -// * -// * @param <E> -// * @param operationDef -// * @param srcCtxt -// * @param dstCtxt -// * @param data -// * @throws Exception -// */ -// <E extends TopiaEntity> void doReplicateOperation( -// ReplicationOperationDef operationDef, -// TopiaContext srcCtxt, -// TopiaContext dstCtxt, -// Map<Class<? extends TopiaEntity>, List<TopiaEntity>> data) throws Exception; } Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/TopiaReplicationOperation.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/TopiaReplicationOperation.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/TopiaReplicationOperation.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,27 +1,37 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication; import java.util.List; import java.util.Map; +import java.util.ServiceLoader; + import org.nuiton.topia.framework.TopiaContextImplementor; import org.nuiton.topia.persistence.TopiaEntity; import org.nuiton.topia.replication.model.ReplicationModel; @@ -37,7 +47,7 @@ * <p/> * * Pour definir une nouvelle implantation d'operation, il faut l'enregister - * en tant que service (au sens de la classe {@link java.util.ServiceLoader}, + * en tant que service (au sens de la classe {@link ServiceLoader}, * c'est à dire ajouter dans un fichier (du class-path) * <code>META-INF/services/org.nuiton.topia.replication.TopiaReplicationOperation</code> * @@ -54,7 +64,7 @@ * Creer et enregister une operation utilisateur apres la creation du * modele via la methode * - * {@link TopiaReplicationService#prepare(TopiaEntityEnum[], String[])}. + * {@link TopiaReplicationService#prepare(TopiaEntityEnum[], String...)}. * * @param model le modele de replication * @param ownerNode le noeud proprietaire de l'operation Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/TopiaReplicationService.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/TopiaReplicationService.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/TopiaReplicationService.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * IndexEngin.java Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/Link.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/Link.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/Link.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.model; import java.util.Collections; @@ -47,7 +55,7 @@ tmpSet.addAll(source.getAssociations().values()); tmpSet.addAll(source.getDependencies().values()); tmpSet.remove(target); - this.requires = Collections.unmodifiableSet(tmpSet); + requires = Collections.unmodifiableSet(tmpSet); } public String getName() { Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationModel.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationModel.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationModel.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.model; import java.util.ArrayList; Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationNode.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationNode.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationNode.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.model; import java.util.ArrayList; @@ -224,10 +232,12 @@ public String toString() { return contract.toString(); } - public static final Comparator<ReplicationOperationDef> OPERATION_COMPARATOR = new Comparator<ReplicationOperationDef>() { + public static final Comparator<ReplicationOperationDef> + OPERATION_COMPARATOR = new Comparator<ReplicationOperationDef>() { @Override - public int compare(ReplicationOperationDef o1, ReplicationOperationDef o2) { + public int compare(ReplicationOperationDef o1, + ReplicationOperationDef o2) { int result = o1.getPhase().compareTo(o2.getPhase()); return result; } Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationOperationDef.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationOperationDef.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationOperationDef.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,37 +1,53 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.model; -import java.util.Arrays; import org.nuiton.topia.replication.TopiaReplicationOperation; +import java.util.Arrays; + public class ReplicationOperationDef { final ReplicationOperationPhase phase; + final Class<? extends TopiaReplicationOperation> operationClass; + final ReplicationNode node; + final Object[] parameters; - public ReplicationOperationDef(ReplicationOperationPhase phase, Class<? extends TopiaReplicationOperation> operation, ReplicationNode node, Object... parameters) { - this.operationClass = operation; + public ReplicationOperationDef( + ReplicationOperationPhase phase, + Class<? extends TopiaReplicationOperation> operation, + ReplicationNode node, + Object... parameters) { + operationClass = operation; this.phase = phase; this.node = node; this.parameters = parameters; @@ -55,6 +71,8 @@ @Override public String toString() { - return " <" + operationClass.getSimpleName() + " on " + node + (parameters.length == 0 ? "" : ", params:" + Arrays.toString(parameters)) + ">"; + return " <" + operationClass.getSimpleName() + " on " + node + + (parameters.length == 0 ? "" : + ", params:" + Arrays.toString(parameters)) + ">"; } } Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationOperationPhase.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationOperationPhase.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/model/ReplicationOperationPhase.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,25 +1,35 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.model; +import org.nuiton.topia.replication.operation.Duplicate; + /** * Une enumeration pour definir quand appliquer une operation. * @@ -36,7 +46,7 @@ before, /** * pour dupliquer un noeud (cette phase ne doit etre utilise que sur l'operation - * de type {@link org.nuiton.topia.replication.operation.Duplicate} + * de type {@link Duplicate} */ duplicate, /** Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/AttachAssociation.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/AttachAssociation.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/AttachAssociation.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.operation; import org.nuiton.topia.replication.*; Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/AttachDependency.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/AttachDependency.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/AttachDependency.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.operation; import org.nuiton.topia.replication.*; Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/AttachLink.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/AttachLink.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/AttachLink.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.operation; import org.nuiton.topia.replication.*; Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/DettachAssociation.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/DettachAssociation.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/DettachAssociation.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.operation; import org.nuiton.topia.replication.*; @@ -40,7 +48,7 @@ * * Note : cette operation est interne, et n'est pas creable par * l'utilisateur via la methode - * {@link #register(ReplicationModel, ReplicationNode, ReplicationOperationPhase, Object[])}. + * {@link #register(ReplicationModel, ReplicationNode, ReplicationOperationPhase, Object...)}. * * @author chemit */ Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/DettachDependency.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/DettachDependency.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/DettachDependency.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.operation; import org.nuiton.topia.replication.*; @@ -39,7 +47,7 @@ * * Note : cette operation est interne, et n'est pas creable par * l'utilisateur via la methode - * {@link #register(ReplicationModel, ReplicationNode, ReplicationOperationPhase, Object[])}. + * {@link #register(ReplicationModel, ReplicationNode, ReplicationOperationPhase, Object...)}. * * @author chemit */ Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/Duplicate.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/Duplicate.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/Duplicate.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.operation; import java.util.List; @@ -37,7 +45,7 @@ * * Note : cette operation est interne, et n'est pas creable par * l'utilisateur via la methode - * {@link #register(ReplicationModel, ReplicationNode, ReplicationOperationPhase, Object[])}. + * {@link #register(ReplicationModel, ReplicationNode, ReplicationOperationPhase, Object...)}. * * @author chemit */ Modified: trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/LoadLink.java =================================================================== --- trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/LoadLink.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/main/java/org/nuiton/topia/replication/operation/LoadLink.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.operation; import org.nuiton.topia.replication.*; Modified: trunk/topia-service-replication/src/site/rst/index.rst =================================================================== --- trunk/topia-service-replication/src/site/rst/index.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/site/rst/index.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,5 +1,33 @@ ToPIA Recherche Service ======================= +.. - +.. * #%L +.. * ToPIA :: Service Replication +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + Permet de rechercher un mot clé parmis les entités de l'application. Il repose -sur la librairie lucene d'apache. \ No newline at end of file +sur la librairie lucene d'apache. Modified: trunk/topia-service-replication/src/site/site_fr.xml =================================================================== --- trunk/topia-service-replication/src/site/site_fr.xml 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/site/site_fr.xml 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,4 +1,32 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ToPIA :: Service Replication + + $Author$ + $LastChangedDate$ + $LastChangedRevision$ + $Id$ + $HeadURL$ + %% + Copyright (C) 2004 - 2010 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> + <project name="${project.name}"> <bannerLeft> Modified: trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/AbstractReplicationEngineTest.java =================================================================== --- trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/AbstractReplicationEngineTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/AbstractReplicationEngineTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.replication; import java.io.File; Modified: trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/ReplicationEngineAllTest.java =================================================================== --- trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/ReplicationEngineAllTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/ReplicationEngineAllTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.replication; import java.io.File; Modified: trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/ReplicationEngineTest.java =================================================================== --- trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/ReplicationEngineTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/ReplicationEngineTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.replication; import java.io.File; Modified: trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationOperationTest.java =================================================================== --- trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationOperationTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationOperationTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.replication; import java.io.File; Modified: trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/operation/FakeOperation.java =================================================================== --- trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/operation/FakeOperation.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/operation/FakeOperation.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.operation; import org.nuiton.topia.replication.*; Modified: trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/operation/UncreatableOperation.java =================================================================== --- trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/operation/UncreatableOperation.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/operation/UncreatableOperation.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.operation; import org.nuiton.topia.replication.*; Modified: trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/operation/UnregistredOperation.java =================================================================== --- trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/operation/UnregistredOperation.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/operation/UnregistredOperation.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Replication - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.replication.operation; import org.apache.commons.logging.Log; Modified: trunk/topia-service-security/pom.xml =================================================================== --- trunk/topia-service-security/pom.xml 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/pom.xml 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,4 +1,32 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ToPIA :: Service Security + + $Author$ + $LastChangedDate$ + $LastChangedRevision$ + $Id$ + $HeadURL$ + %% + Copyright (C) 2004 - 2010 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> + <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/TopiaSecurityService.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/TopiaSecurityService.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/TopiaSecurityService.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,30 +1,38 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.security; import org.nuiton.topia.framework.TopiaService; public interface TopiaSecurityService extends TopiaService { - public static final String SERVICE_NAME = "security"; + String SERVICE_NAME = "security"; /** * Vérifie si l'utilisateur actuellement loggué a le droit d'accéder à @@ -33,7 +41,7 @@ * @param actions les actions [load, read, write, admin] * @throws SecurityException */ - public abstract void checkPermission(Class<?> entityClass, int actions) + void checkPermission(Class<?> entityClass, int actions) throws SecurityException; /** @@ -44,7 +52,7 @@ * @param actions les actions [load, read, write, admin] * @throws SecurityException */ - public abstract void checkPermission(String expression, int actions) + void checkPermission(String expression, int actions) throws SecurityException; } Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/TopiaSecurityServiceImpl.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/TopiaSecurityServiceImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/TopiaSecurityServiceImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.security; @@ -140,8 +149,8 @@ */ @Override public boolean postInit(TopiaContextImplementor context) { - this.rootContext = context; - this.securityContext = null; + rootContext = context; + securityContext = null; rootContext.addTopiaEntityVetoable(entityVetoable); rootContext.addTopiaEntityListener(propertyVetoable); Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaAssociationAuthorizationImpl.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaAssociationAuthorizationImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaAssociationAuthorizationImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.security.entities.authorization; Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,26 +1,33 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.security.entities.authorization; - -import org.nuiton.topia.security.entities.authorization.*; import static org.nuiton.topia.security.util.TopiaSecurityUtil.CREATE; import static org.nuiton.topia.security.util.TopiaSecurityUtil.DELETE; import static org.nuiton.topia.security.util.TopiaSecurityUtil.LOAD; Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaEntityAuthorizationImpl.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaEntityAuthorizationImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaEntityAuthorizationImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,26 +1,33 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.security.entities.authorization; - -import org.nuiton.topia.security.entities.authorization.*; import static org.nuiton.topia.security.util.TopiaSecurityUtil.actionsString2Int; import java.security.Principal; import java.util.HashSet; Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,26 +1,33 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.security.entities.authorization; -import org.nuiton.topia.security.entities.authorization.*; - /** * Permet de spécifier entre deux expressions qu'ils ont le même comportement au niveau * de leurs permissions. Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/user/TopiaGroupImpl.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/user/TopiaGroupImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/user/TopiaGroupImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,25 +1,33 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.security.entities.user; -import org.nuiton.topia.security.entities.user.*; import java.util.ArrayList; import java.util.List; Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/user/TopiaUserImpl.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/user/TopiaUserImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/entities/user/TopiaUserImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,26 +1,33 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.security.entities.user; - -import org.nuiton.topia.security.entities.user.*; import static org.nuiton.topia.security.util.TopiaSecurityUtil.hash; import java.util.ArrayList; Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaCallbackHandler.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaCallbackHandler.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaCallbackHandler.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaCallbackHandler.java @@ -55,7 +64,6 @@ * @param password mot de passe de l'utilisateur */ public TopiaCallbackHandler(String username, String password) { - super(); this.username = username; this.password = password; } @@ -67,15 +75,15 @@ */ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - if (callbacks[i] instanceof NameCallback) { - NameCallback nc = (NameCallback) callbacks[i]; + for (Callback callback : callbacks) { + if (callback instanceof NameCallback) { + NameCallback nc = (NameCallback) callback; nc.setName(username); - } else if (callbacks[i] instanceof PasswordCallback) { - PasswordCallback pc = (PasswordCallback) callbacks[i]; + } else if (callback instanceof PasswordCallback) { + PasswordCallback pc = (PasswordCallback) callback; pc.setPassword(password.toCharArray()); } else - throw new UnsupportedCallbackException(callbacks[i]); + throw new UnsupportedCallbackException(callback); } } Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaConfiguration.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaConfiguration.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaConfiguration.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaConfiguration.java @@ -60,7 +69,6 @@ * @param securityManager le service */ public TopiaConfiguration(String name, TopiaSecurityService securityManager) { - super(); appConfEntries = new HashMap<String, AppConfigurationEntry[]>(); addEntry(name, securityManager); } @@ -71,7 +79,7 @@ * * @param name * le nom de la configurationEntry - * @param securityHelper + * @param securityManager * le nom du fichier de propriétés */ private void addEntry(String name, TopiaSecurityService securityManager) { @@ -111,7 +119,7 @@ /** * Créé une entry avec des options vides * - * @param securityHelper + * @param securityManager * le SecurityHelper * @return l'entry créée */ @@ -122,7 +130,7 @@ /** * Créé une entry en rajoutant les options nécessaires à l'attribut options * - * @param securityHelper + * @param securityManager * le nom du fichier de propriétés * @param options * l'objet contenant les options précédentes Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaLoginModule.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaLoginModule.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaLoginModule.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaLoginModule.java @@ -79,8 +88,8 @@ Map<String,?> sharedState, Map<String,?> options) { this.subject = subject; this.callbackHandler = callbackHandler; - this.principals = null; - this.securityManager = (TopiaSecurityServiceImpl)options.get(SECURITY_MANAGER_KEY); + principals = null; + securityManager = (TopiaSecurityServiceImpl)options.get(SECURITY_MANAGER_KEY); } /* (non-Javadoc) Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaPermission.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaPermission.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaPermission.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaPermission.java @@ -80,7 +89,7 @@ if (!(obj instanceof TopiaPermission)) return false; TopiaPermission that = (TopiaPermission)obj; - return (this.implies(that) && that.implies(this)); + return implies(that) && that.implies(this); } /* Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaPolicy.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaPolicy.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaPolicy.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaPolicy.java @@ -60,7 +69,6 @@ protected Policy parentPolicy; public TopiaPolicy(TopiaSecurityServiceImpl securityManager) { - super(); this.securityManager = securityManager; } @@ -150,7 +158,7 @@ */ public void installPolicy() { Policy policy = Policy.getPolicy(); - if (policy == this) + if (equals(policy)) return; if (policy instanceof TopiaPolicy) { if (log.isDebugEnabled()) { Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaPrincipal.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaPrincipal.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/jaas/TopiaPrincipal.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaPrincipal.java @@ -60,7 +69,7 @@ * @see java.lang.Object#toString() */ public String toString() { - return this.getClass().getName() + " : " + name; + return getClass().getName() + " : " + name; } /* (non-Javadoc) @@ -70,7 +79,7 @@ if (!(o instanceof TopiaPrincipal)) return false; if (name == null) { - return (((Principal)o).getName() == null); + return ((Principal)o).getName() == null; } return name.equals(((TopiaPrincipal)o).getName()); } Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/EntityVetoable.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/EntityVetoable.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/EntityVetoable.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaSecurityVetoableListener.java Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/NoSecurityLoad.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/NoSecurityLoad.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/NoSecurityLoad.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.security.listener; Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/PropertyReadListener.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/PropertyReadListener.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/PropertyReadListener.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.security.listener; Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/PropertyVetoable.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/PropertyVetoable.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/PropertyVetoable.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaSecurityVetoableListener.java @@ -52,7 +61,6 @@ * @param write Listener en écriture d'un champ */ public PropertyVetoable(PropertyReadListener read, PropertyWriteListener write) { - super(); this.read = read; this.write = write; } Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/PropertyWriteListener.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/PropertyWriteListener.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/listener/PropertyWriteListener.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.security.listener; Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/util/TopiaSecurityCaching.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/util/TopiaSecurityCaching.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/util/TopiaSecurityCaching.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.security.util; Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/util/TopiaSecurityFactoryFilter.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/util/TopiaSecurityFactoryFilter.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/util/TopiaSecurityFactoryFilter.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ package org.nuiton.topia.security.util; @@ -26,7 +35,6 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.nuiton.topia.TopiaException; import org.nuiton.topia.persistence.TopiaEntity; import org.nuiton.topia.security.TopiaSecurityService; @@ -45,7 +53,6 @@ private TopiaSecurityService securityManager; public TopiaSecurityFactoryFilter(TopiaSecurityService securityManager) { - super(); this.securityManager = securityManager; } @@ -80,7 +87,7 @@ */ public <E extends TopiaEntity> Collection<E> filter(Collection<E> entities, int actions) { Collection<E> result = new ArrayList<E>(entities); - for (Iterator iterator = result.iterator(); iterator.hasNext();) { + for (Iterator<?> iterator = result.iterator(); iterator.hasNext();) { TopiaEntity entity = (TopiaEntity) iterator.next(); try { securityManager.checkPermission(entity.getTopiaId(), actions); Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/security/util/TopiaSecurityUtil.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/security/util/TopiaSecurityUtil.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/security/util/TopiaSecurityUtil.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaSecurityUtil.java @@ -243,7 +252,7 @@ config.setProperty("topia.service.security", ""); String persistences = config.getProperty("topia.persistence.classes"); - for (Class klass : TOPIA_SECURITY_PERSISTENCE_CLASSES) { + for (Class<?> klass : TOPIA_SECURITY_PERSISTENCE_CLASSES) { persistences += "," + klass.getName(); } config.setProperty("topia.persistence.classes", persistences); @@ -271,10 +280,10 @@ public static boolean isImplement(Class klass, Class iface) { boolean result = false; - Class[] interfaces = klass.getInterfaces(); + Class<?>[] interfaces = klass.getInterfaces(); result = ArrayUtils.contains(interfaces, iface); - Class superclass = klass.getSuperclass(); + Class<?> superclass = klass.getSuperclass(); if(!result && superclass != null) { result |= isImplement(superclass, iface); } Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/TaasService.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/TaasService.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/TaasService.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaSecurityVetoableListener.java Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/TaasUtil.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/TaasUtil.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/TaasUtil.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaSecurityUtil.java Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/event/TaasAccessEntity.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/event/TaasAccessEntity.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/event/TaasAccessEntity.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.taas.event; import org.nuiton.topia.event.TopiaEntitiesVetoable; Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/event/TaasEntityVetoable.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/event/TaasEntityVetoable.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/event/TaasEntityVetoable.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.taas.event; import org.apache.commons.logging.Log; Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/event/TaasEntityVetoableRequestPermission.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/event/TaasEntityVetoableRequestPermission.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/event/TaasEntityVetoableRequestPermission.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,23 +1,31 @@ -/** - * *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ + package org.nuiton.topia.taas.event; import org.apache.commons.logging.Log; Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasCallbackHandler.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasCallbackHandler.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasCallbackHandler.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaCallbackHandler.java @@ -55,7 +64,6 @@ * @param password mot de passe de l'utilisateur */ public TaasCallbackHandler(String username, String password) { - super(); this.username = username; this.password = password; } @@ -67,15 +75,15 @@ */ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - if (callbacks[i] instanceof NameCallback) { - NameCallback nc = (NameCallback) callbacks[i]; + for (Callback callback : callbacks) { + if (callback instanceof NameCallback) { + NameCallback nc = (NameCallback) callback; nc.setName(username); - } else if (callbacks[i] instanceof PasswordCallback) { - PasswordCallback pc = (PasswordCallback) callbacks[i]; + } else if (callback instanceof PasswordCallback) { + PasswordCallback pc = (PasswordCallback) callback; pc.setPassword(password.toCharArray()); } else - throw new UnsupportedCallbackException(callbacks[i]); + throw new UnsupportedCallbackException(callback); } } Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasConfiguration.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasConfiguration.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasConfiguration.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaConfiguration.java @@ -57,7 +66,6 @@ * @param taasService le service */ public TaasConfiguration(String name, TaasService taasService) { - super(); appConfEntries = new HashMap<String, AppConfigurationEntry[]>(); addEntry(name, taasService); } @@ -68,7 +76,7 @@ * * @param name * le nom de la configurationEntry - * @param securityHelper + * @param taasService * le nom du fichier de propriétés */ private void addEntry(String name, TaasService taasService) { @@ -110,7 +118,7 @@ /** * Créé une entry avec des options vides * - * @param securityHelper + * @param taasService * le SecurityHelper * @return l'entry créée */ @@ -121,7 +129,7 @@ /** * Créé une entry en rajoutant les options nécessaires à l'attribut options * - * @param securityHelper + * @param taasService * le nom du fichier de propriétés * @param options * l'objet contenant les options précédentes Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasLoginModule.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasLoginModule.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasLoginModule.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaLoginModule.java @@ -82,9 +91,9 @@ Map<String,?> sharedState, Map<String,?> options) { this.subject = subject; this.callbackHandler = callbackHandler; - this.principals = null; - this.privateCredential = null; - this.taasService = (TaasService)options.get(TaasService.SERVICE_NAME); + principals = null; + privateCredential = null; + taasService = (TaasService)options.get(TaasService.SERVICE_NAME); } /* (non-Javadoc) @@ -99,7 +108,7 @@ throw new LoginException("TaasService property must be set"); } - String login, password = null; + String login, password; NameCallback nc = new NameCallback("login"); PasswordCallback pc = new PasswordCallback("password", false); Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPermission.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPermission.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPermission.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaPermission.java @@ -60,8 +69,8 @@ */ public TaasPermission(String expression, int actions) { super(expression); - this.authorizationExpression = expression; - this.authorizationActions = actions; + authorizationExpression = expression; + authorizationActions = actions; } /** @@ -105,7 +114,7 @@ return false; } TaasPermission that = (TaasPermission)obj; - return (this.implies(that) && that.implies(this)); + return implies(that) && that.implies(this); } /* @@ -150,10 +159,10 @@ * @return vrai si thisId implique thatId */ public boolean impliesExpression(String thisExpression, String thatExpression) { - return (thisExpression.equals(thatExpression) || + return thisExpression.equals(thatExpression) || "*".equals(thisExpression) || - (thatExpression.startsWith(thisExpression.substring(0, thisExpression.length()-1)) - && thisExpression.endsWith("*"))); + thatExpression.startsWith(thisExpression.substring(0, thisExpression.length()-1)) + && thisExpression.endsWith("*"); } /** Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPolicy.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPolicy.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPolicy.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaPolicy.java @@ -143,7 +152,7 @@ */ public void installPolicy() { Policy policy = Policy.getPolicy(); - if (policy == this) { + if (equals(policy)) { return; } if (policy instanceof TaasPolicy) { Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPrincipalWrapper.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPrincipalWrapper.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPrincipalWrapper.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TopiaPrincipal.java @@ -57,8 +66,8 @@ * @param principal ? */ public TaasPrincipalWrapper(TaasPrincipal principal) { - this.name = principal.getName(); - this.permissions = new Permissions(); + name = principal.getName(); + permissions = new Permissions(); for (TaasAuthorization authorization : principal.getAuthorizations()) { TaasPermission permission = new TaasPermission(authorization); permissions.add(permission); @@ -86,7 +95,7 @@ */ @Override public String toString() { - return this.getClass().getName() + " : " + name; + return getClass().getName() + " : " + name; } /* (non-Javadoc) @@ -98,7 +107,7 @@ return false; } if (name == null) { - return (((Principal)o).getName() == null); + return ((Principal)o).getName() == null; } return name.equals(((TaasPrincipalWrapper)o).getName()); } Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasSubjectFinder.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasSubjectFinder.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasSubjectFinder.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TaasSubject.java @@ -42,6 +51,6 @@ */ public interface TaasSubjectFinder { - public Subject findSubject(); + Subject findSubject(); } Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasSubjectFinderImpl.java =================================================================== --- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasSubjectFinderImpl.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasSubjectFinderImpl.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,30 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ /* * * TaasSubjectImpl.java Modified: trunk/topia-service-security/src/site/rst/index.rst =================================================================== --- trunk/topia-service-security/src/site/rst/index.rst 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/site/rst/index.rst 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,5 +1,33 @@ ToPIA Sécurité Service ====================== +.. - +.. * #%L +.. * ToPIA :: Service Security +.. * +.. * $Author$ +.. * $LastChangedDate$ +.. * $LastChangedRevision$ +.. * $Id$ +.. * $HeadURL$ +.. * %% +.. * Copyright (C) 2004 - 2010 CodeLutin +.. * %% +.. * This program is free software: you can redistribute it and/or modify +.. * it under the terms of the GNU Lesser General Public License as +.. * published by the Free Software Foundation, either version 3 of the +.. * License, or (at your option) any later version. +.. * +.. * This program is distributed in the hope that it will be useful, +.. * but WITHOUT ANY WARRANTY; without even the implied warranty of +.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. * GNU General Lesser Public License for more details. +.. * +.. * You should have received a copy of the GNU General Lesser Public +.. * License along with this program. If not, see +.. * <http://www.gnu.org/licenses/lgpl-3.0.html>. +.. * #L% +.. - + Permet la gestion des authentifications et des autorisations. Il repose sur le -mécanisme de JAAS. \ No newline at end of file +mécanisme de JAAS. Modified: trunk/topia-service-security/src/site/site_fr.xml =================================================================== --- trunk/topia-service-security/src/site/site_fr.xml 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/site/site_fr.xml 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,4 +1,32 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ToPIA :: Service Security + + $Author$ + $LastChangedDate$ + $LastChangedRevision$ + $Id$ + $HeadURL$ + %% + Copyright (C) 2004 - 2010 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> + <project name="${project.name}"> <bannerLeft> Modified: trunk/topia-service-security/src/test/java/org/nuiton/topia/TestUtils.java =================================================================== --- trunk/topia-service-security/src/test/java/org/nuiton/topia/TestUtils.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/test/java/org/nuiton/topia/TestUtils.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,29 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%* + * #L% */ package org.nuiton.topia; Modified: trunk/topia-service-security/src/test/java/org/nuiton/topia/security/TopiaSecurityTest.java =================================================================== --- trunk/topia-service-security/src/test/java/org/nuiton/topia/security/TopiaSecurityTest.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-service-security/src/test/java/org/nuiton/topia/security/TopiaSecurityTest.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -1,21 +1,31 @@ -/* *##% +/* + * #%L * ToPIA :: Service Security - * Copyright (C) 2004 - 2009 CodeLutin - * + * + * $Author$ + * $LastChangedDate$ + * $LastChangedRevision$ + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2010 CodeLutin + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 of the + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public + * + * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * ##%*/ + * #L% + */ + package org.nuiton.topia.security; import static org.nuiton.topia.security.util.TopiaSecurityUtil.LOAD; @@ -209,14 +219,14 @@ TopiaEntityAuthorization authorizationForRuchaud = topiaEntityAuthorizationDAO.create(); authorizationForRuchaud.setExpression(Person.class.getName() + "#*"); - authorizationForRuchaud.setActions(TopiaSecurityUtil.LOAD); + authorizationForRuchaud.setActions(LOAD); authorizationForRuchaud.setPrincipals(groupRuchaud.getTopiaId()); authorizationForRuchaud.update(); childContext.commitTransaction(); TopiaEntityAuthorization authorizationForThimel = topiaEntityAuthorizationDAO.create(); authorizationForThimel.setExpression(jacques.getTopiaId()); - authorizationForThimel.setActions(TopiaSecurityUtil.LOAD); + authorizationForThimel.setActions(LOAD); authorizationForThimel.setPrincipals(thimel.getTopiaId()); authorizationForThimel.update(); childContext.commitTransaction(); @@ -232,7 +242,7 @@ TopiaAssociationAuthorization associationAuthorization = topiaAssociationAuthorizationDAO.create(); associationAuthorization.setIdBeginAssociation(jacques.getTopiaId()); associationAuthorization.setNameAssociation("pet"); - associationAuthorization.setActions(TopiaSecurityUtil.LOAD); + associationAuthorization.setActions(LOAD); associationAuthorization.setPrincipals(ruchaud.getTopiaId()); associationAuthorization.update(); childContext.commitTransaction(); @@ -240,7 +250,7 @@ associationAuthorization = topiaAssociationAuthorizationDAO.create(); associationAuthorization.setIdBeginAssociation(mylene.getTopiaId()); associationAuthorization.setNameAssociation("pet"); - associationAuthorization.setActions(TopiaSecurityUtil.UPDATE); + associationAuthorization.setActions(UPDATE); associationAuthorization.setPrincipals(ruchaud.getTopiaId()); associationAuthorization.update(); childContext.commitTransaction(); Modified: trunk/topia-soa/src/main/java/org/nuiton/topia/service/TopiaApplicationService.java =================================================================== --- trunk/topia-soa/src/main/java/org/nuiton/topia/service/TopiaApplicationService.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-soa/src/main/java/org/nuiton/topia/service/TopiaApplicationService.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -36,16 +36,16 @@ public interface TopiaApplicationService { /** Common logging) */ - final Log log = LogFactory.getLog(TopiaApplicationService.class); + Log log = LogFactory.getLog(TopiaApplicationService.class); /** * Initialise le service * @param context */ - public void init(TopiaContext context); + void init(TopiaContext context); /** * Detruit le service */ - public void destroy(); + void destroy(); } Modified: trunk/topia-soa/src/main/java/org/nuiton/topia/service/TopiaProxy.java =================================================================== --- trunk/topia-soa/src/main/java/org/nuiton/topia/service/TopiaProxy.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-soa/src/main/java/org/nuiton/topia/service/TopiaProxy.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -39,7 +39,7 @@ * l'URI * @see java.net.URI */ - public void setURI(URI uri); + void setURI(URI uri); /** * Renseigne la classe geree @@ -47,5 +47,5 @@ * @param clazz * la class */ - public void setClass(Class<? extends TopiaApplicationService> clazz); + void setClass(Class<? extends TopiaApplicationService> clazz); } Modified: trunk/topia-soa/src/main/java/org/nuiton/topia/service/TopiaServiceServer.java =================================================================== --- trunk/topia-soa/src/main/java/org/nuiton/topia/service/TopiaServiceServer.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-soa/src/main/java/org/nuiton/topia/service/TopiaServiceServer.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -35,18 +35,17 @@ * @param clazz * le nom de l'interface. */ - public abstract void addService( - Class<? extends TopiaApplicationService> clazz); + void addService(Class<? extends TopiaApplicationService> clazz); /** * Lance le serveur */ - public abstract void launch(); + void launch(); /** * Set dispatcher * * @param mainDispatcher */ - public void setTopiaServiceProvider(TopiaServiceProvider mainDispatcher); + void setTopiaServiceProvider(TopiaServiceProvider mainDispatcher); } Modified: trunk/topia-soa/src/test/java/org/nuiton/topia/service/ExampleService.java =================================================================== --- trunk/topia-soa/src/test/java/org/nuiton/topia/service/ExampleService.java 2010-04-13 11:50:29 UTC (rev 1889) +++ trunk/topia-soa/src/test/java/org/nuiton/topia/service/ExampleService.java 2010-04-13 18:42:03 UTC (rev 1890) @@ -39,5 +39,5 @@ * @param name le nom * @return hello */ - public String sayHello(String name) throws TopiaException; + String sayHello(String name) throws TopiaException; }
participants (1)
-
tchemit@users.nuiton.org