--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<project default="javadoc">\r
+<target name="javadoc">\r
+<javadoc access="public" author="true" classpath="lib/commons-logging.jar;lib/ant-launcher.jar;lib/spring-2.0.6.jar;lib/ant.jar" destdir="doc" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" packagenames="org.argeo.slc.ant,org.argeo.slc.core.structure.tree,org.argeo.slc.core.test,org.argeo.slc.ant.test,org.argeo.slc.core.structure,org.argeo.slc.ant.spring,org.argeo.slc.ant.structure" source="1.5" sourcepath="src/test/java;src/main/java" splitindex="true" use="true" version="true"/>\r
+</target>\r
+</project>\r
import org.argeo.slc.core.structure.StructurePath;\r
import org.argeo.slc.core.structure.StructureRegistry;\r
\r
+/** Utilities to manipulate the structure registry in SLC Ant.*/\r
public class AntRegistryUtil {\r
private static Log log = LogFactory.getLog(AntRegistryUtil.class);\r
\r
+ /** Read a structure registry from an Ant file without executing it. */\r
public static StructureRegistry readRegistry(File antFile) {\r
\r
Project p = new Project();\r
return registry;\r
}\r
\r
+ /** Execute only the active paths of teh Ant files. */\r
public static void runActive(File antFile, List<StructurePath> activePaths) {\r
\r
Project p = new Project();\r
helper.parse(p, antFile);\r
\r
StructureRegistry registry = (StructureRegistry) p\r
- .getReference(SlcProjectHelper.REF_STRUCTURE_REGISTRY);\r
+ .getReference(SlcProjectHelper.REF_STRUCTURE_REGISTRY);\r
registry.setMode(StructureRegistry.ACTIVE);\r
registry.setActivePaths(activePaths);\r
p.executeTarget(p.getDefaultTarget());\r
import org.argeo.slc.core.structure.tree.TreeSElement;\r
import org.argeo.slc.core.structure.tree.TreeSPath;\r
\r
+/**\r
+ * Custom implementation of a <code>ProjectHelper</code> binding a Spring\r
+ * application context and a structure registry with the Ant project.\r
+ */\r
public class SlcProjectHelper extends ProjectHelperImpl {\r
public static String PROP_APPLICATION_CONTEXT = "org.argeo.slc.slcRootContext";\r
- //public static String PROP_REGISTRY_MODE = "org.argeo.slc.slcRegistryMode";\r
+ // public static String PROP_REGISTRY_MODE =\r
+ // "org.argeo.slc.slcRegistryMode";\r
public static String REF_ROOT_CONTEXT = "slcApplicationContext";\r
public static String REF_STRUCTURE_REGISTRY = "slcStructureRegistry";\r
\r
\r
// init structure register if it does not exist\r
DefaultSRegistry registry = new DefaultSRegistry();\r
- project.addReference(REF_STRUCTURE_REGISTRY, registry);\r
+ project.addReference(REF_STRUCTURE_REGISTRY, registry);\r
\r
- // call the underlying implementation to do the actual work\r
- super.parse(project, source);\r
+ // call the underlying implementation to do the actual work\r
+ super.parse(project, source);\r
\r
- String projectDescription = project.getDescription() != null ? project\r
- .getDescription()\r
- : "Root";\r
- TreeSElement element = TreeSElement.createRootElelment(\r
- getProjectPathName(project), projectDescription);\r
- registry.register(element);\r
+ String projectDescription = project.getDescription() != null ? project\r
+ .getDescription() : "Root";\r
+ TreeSElement element = TreeSElement.createRootElelment(\r
+ getProjectPathName(project), projectDescription);\r
+ registry.register(element);\r
}\r
\r
private static void stdOut(Object o) {\r
System.out.println(o);\r
}\r
\r
+ /** Get the path of a project (root).*/\r
public static TreeSPath getProjectPath(Project project) {\r
return TreeSPath.createChild(null, getProjectPathName(project));\r
}\r