Index: topia/src/java/org/codelutin/topia/generators/ObjectModelToContextPropertiesGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/ObjectModelToContextPropertiesGenerator.java:1.6 topia/src/java/org/codelutin/topia/generators/ObjectModelToContextPropertiesGenerator.java:1.7 --- topia/src/java/org/codelutin/topia/generators/ObjectModelToContextPropertiesGenerator.java:1.6 Fri Apr 29 16:00:39 2005 +++ topia/src/java/org/codelutin/topia/generators/ObjectModelToContextPropertiesGenerator.java Wed May 4 16:09:41 2005 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * - * Mise a jour: $Date: 2005/04/29 16:00:39 $ + * Mise a jour: $Date: 2005/05/04 16:09:41 $ * par : $Author: thimel $ */ @@ -82,7 +82,7 @@ //Secuity Variables /*{ topia.auth.type=simple -#topia.auth.simple.file=passwords.file +topia.auth.simple.file=passwords.file #topia.auth.simple.hash=SHA }*/ } Index: topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityImplGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityImplGenerator.java:1.8 topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityImplGenerator.java:1.9 --- topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityImplGenerator.java:1.8 Sat Feb 5 10:47:09 2005 +++ topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityImplGenerator.java Wed May 4 16:09:41 2005 @@ -23,10 +23,10 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ * - * Mise a jour: $Date: 2005/02/05 10:47:09 $ - * par : $Author: pineau $ + * Mise a jour: $Date: 2005/05/04 16:09:41 $ + * par : $Author: thimel $ */ package org.codelutin.topia.generators; @@ -109,6 +109,7 @@ public void generateGetNormalAttributeAccessor(Writer output, ObjectModelAttribute attribute) throws IOException { /*{ public <%=Util.getAttributeType(attribute)%> get<%=Util.capitalize(attribute.getName())%>() throws TopiaException { + TopiaAccessController.checkPermission(this, "read"); return <%=attribute.getName()%>; } public boolean is_<%=attribute.getName()%>Modified_(){ @@ -124,6 +125,7 @@ * @return an unmodifiable collection *) public <%=Util.getAttributeType(attribute)%> get<%=Util.capitalize(attribute.getName())%>() throws TopiaException { + TopiaAccessController.checkPermission(this, "read"); return Collections.unmodifiableCollection(<%=attribute.getName()%>); } public boolean is_<%=attribute.getName()%>Modified_(){ Index: topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceGenerator.java:1.6 topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceGenerator.java:1.7 --- topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceGenerator.java:1.6 Wed Apr 27 14:39:50 2005 +++ topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceGenerator.java Wed May 4 16:09:41 2005 @@ -23,9 +23,9 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * - * Mise a jour: $Date: 2005/04/27 14:39:50 $ + * Mise a jour: $Date: 2005/05/04 16:09:41 $ * par : $Author: thimel $ */ @@ -132,10 +132,16 @@ public <%=clazz.getName()%> makePersistent(<%=clazz.getName()%> entity) throws TopiaException; - /** - * Return the <%=clazz.getName()%> corresponding to the given XML representation - *) - public <%=clazz.getName()%> fromXML(String entityXML) throws TopiaException; + /** + * Return the <%=clazz.getName()%> corresponding to the given XML representation + *)}*/ +//TODO Arno : A verif ac Cédric ! + Iterator it = ((ObjectModelClass)clazz).getSuperclasses().iterator(); + String out = clazz.getName(); + if (it.hasNext()) + out = ((ObjectModelClass)it.next()).getName(); +/*{ + public <%=out%> fromXML(String entityXML) throws TopiaException; }*/ } Index: topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceImplGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceImplGenerator.java:1.5 topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceImplGenerator.java:1.6 --- topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceImplGenerator.java:1.5 Sat Feb 5 10:47:09 2005 +++ topia/src/java/org/codelutin/topia/generators/ObjectModelToEntityPersistenceServiceImplGenerator.java Wed May 4 16:09:41 2005 @@ -23,10 +23,10 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * - * Mise a jour: $Date: 2005/02/05 10:47:09 $ - * par : $Author: pineau $ + * Mise a jour: $Date: 2005/05/04 16:09:41 $ + * par : $Author: thimel $ */ package org.codelutin.topia.generators; @@ -197,7 +197,14 @@ /** * Return the <%=clazz.getName()%> corresponding to the given XML representation *) - public <%=clazz.getName()%> fromXML(String entityXML) throws TopiaException { +}*/ +// TODO Arno : A verif ac Cédric ! + Iterator it = ((ObjectModelClass)clazz).getSuperclasses().iterator(); + String out = clazz.getName(); + if (it.hasNext()) + out = ((ObjectModelClass)it.next()).getName(); +/*{ + public <%=out%> fromXML(String entityXML) throws TopiaException { TopiaEntity entity =(<%=clazz.getName()%>) <%=getProperty("defaultPackage")%>.<%=model.getName()%>EntitiesHelper.fromXML(entityXML); if (! (entity instanceof <%=clazz.getName()%>)) { throw new TopiaException("Wrong persistence service. You should use the entity related persistence service"); Index: topia/src/java/org/codelutin/topia/generators/TopiaAbstractObjectModelGenerator.java diff -u topia/src/java/org/codelutin/topia/generators/TopiaAbstractObjectModelGenerator.java:1.4 topia/src/java/org/codelutin/topia/generators/TopiaAbstractObjectModelGenerator.java:1.5 --- topia/src/java/org/codelutin/topia/generators/TopiaAbstractObjectModelGenerator.java:1.4 Sat Feb 5 10:47:09 2005 +++ topia/src/java/org/codelutin/topia/generators/TopiaAbstractObjectModelGenerator.java Wed May 4 16:09:41 2005 @@ -23,10 +23,10 @@ * * @author Benjamin Poussin * Copyright Code Lutin - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * - * Mise a jour: $Date: 2005/02/05 10:47:09 $ - * par : $Author: pineau $ + * Mise a jour: $Date: 2005/05/04 16:09:41 $ + * par : $Author: thimel $ */ package org.codelutin.topia.generators; @@ -181,6 +181,7 @@ import org.codelutin.topia.TopiaPersistenceService; import org.codelutin.topia.TopiaQuery; import org.codelutin.topia.TopiaArgument; +import org.codelutin.topia.security.TopiaAccessController; import org.codelutin.generator.models.object.ObjectModelClass; import org.codelutin.generator.models.object.ObjectModelInterface; import java.util.List;