[jboss-svn-commits] JBL Code SVN: r18640 - in labs/shotoku/trunk: cms-template and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Feb 29 10:24:49 EST 2008
Author: adamw
Date: 2008-02-29 10:24:48 -0500 (Fri, 29 Feb 2008)
New Revision: 18640
Removed:
labs/shotoku/trunk/cms-template/feeds/
labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/feeds/
labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/velocity/
Modified:
labs/shotoku/trunk/maven.xml
labs/shotoku/trunk/project.properties
labs/shotoku/trunk/project.xml
labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/ContentManager.java
Log:
Modified: labs/shotoku/trunk/maven.xml
===================================================================
--- labs/shotoku/trunk/maven.xml 2008-02-29 15:17:50 UTC (rev 18639)
+++ labs/shotoku/trunk/maven.xml 2008-02-29 15:24:48 UTC (rev 18640)
@@ -60,12 +60,6 @@
<ant:copy
todir="${shotoku.jar.dest}" overwrite="true"
file="${maven.repo.local}/commons-lang/jars/commons-lang-2.1.jar" />
- <ant:copy
- todir="${shotoku.jar.dest}" overwrite="true">
- <ant:fileset dir="${maven.repo.local}/velocity/jars">
- <ant:filename name="velocity*-1.4.jar" />
- </ant:fileset>
- </ant:copy>
<!-- Constructing the sar -->
<ant:copy todir="target/${shotoku.sar.dir}">
Modified: labs/shotoku/trunk/project.properties
===================================================================
--- labs/shotoku/trunk/project.properties 2008-02-29 15:17:50 UTC (rev 18639)
+++ labs/shotoku/trunk/project.properties 2008-02-29 15:24:48 UTC (rev 18640)
@@ -7,7 +7,7 @@
#shotoku.subprojects.cms=base,base-service,files,jcr,svn
shotoku.subprojects.cms=base,base-service,svn
#shotoku.subprojects=${shotoku.subprojects.cms},aop,test,admin,tags,file-access,portal
-shotoku.subprojects=${shotoku.subprojects.cms},aop,tags,file-access
+shotoku.subprojects=${shotoku.subprojects.cms},aop,file-access
shotoku.jar.dest=${local.deploy.dir}/../lib/shotoku
Modified: labs/shotoku/trunk/project.xml
===================================================================
--- labs/shotoku/trunk/project.xml 2008-02-29 15:17:50 UTC (rev 18639)
+++ labs/shotoku/trunk/project.xml 2008-02-29 15:24:48 UTC (rev 18640)
@@ -28,19 +28,6 @@
<version>1.2.9</version>
</dependency>
- <!-- Velocity dependencies -->
-
- <dependency>
- <groupId>velocity</groupId>
- <artifactId>velocity</artifactId>
- <version>1.4</version>
- </dependency>
- <dependency>
- <groupId>velocity</groupId>
- <artifactId>velocity-dep</artifactId>
- <version>1.4</version>
- </dependency>
-
<!-- Commons dependencies -->
<dependency>
Modified: labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/ContentManager.java
===================================================================
--- labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/ContentManager.java 2008-02-29 15:17:50 UTC (rev 18639)
+++ labs/shotoku/trunk/shotoku-base/src/java/org/jboss/shotoku/ContentManager.java 2008-02-29 15:24:48 UTC (rev 18640)
@@ -28,7 +28,6 @@
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.log4j.Logger;
-import org.apache.velocity.app.VelocityEngine;
import org.jboss.shotoku.exceptions.DeleteException;
import org.jboss.shotoku.exceptions.ResourceDoesNotExist;
import org.jboss.shotoku.exceptions.RepositoryException;
@@ -59,12 +58,6 @@
private String id;
/**
- * A map of initialized velocity engines, The key is a string representation
- * of parameters with which an engine was initialized.
- */
- private static Map<String, VelocityEngine> engines;
-
- /**
* Gets a root directory that is represented by this content manager.
*
* @return A directory that is the root directory of this content manager.
@@ -337,81 +330,6 @@
}
/**
- * Gets a velocity engine, initialized with default properties, as defined
- * in velocity.properties in the shotoku-base jar. Additionaly, the shotoku
- * resource loader will be set to read templates from this content manager
- * (if shotoku resource loader is defined to be used).
- *
- * @return A velocity engine initialized with default properties.
- * @throws Exception
- * In case of a velocity exception/ properties reading
- * exception.
- */
- public VelocityEngine getVelocityEngine() throws Exception {
- return getVelocityEngine(true);
- }
-
- /**
- * Gets a velocity engine, initialized with default properties, as defined
- * in velocity.properties in the shotoku-base jar.
- *
- * @param addIdPrefix
- * True iff id/ prefix properties should be added to the
- * properties.
- * @return A velocity engine initialized with default properties.
- * @throws Exception
- * In case of a velocity exception/ properties reading
- * exception.
- */
- public VelocityEngine getVelocityEngine(boolean addIdPrefix)
- throws Exception {
- return getVelocityEngine(new HashMap<Object, Object>(), addIdPrefix);
- }
-
- /**
- * Gets a velocity engine, initialized with default properties, overwritten
- * by the given propeties.
- *
- * @param overProps
- * Properties which will be added to velocity configuration.
- * @return An initialized velocity engine.
- * @throws Exception
- * In case of a velocity exception/ properties reading
- * exception.
- */
- public VelocityEngine getVelocityEngine(
- Map<? extends Object, ? extends Object> overProps,
- boolean addIdPrefix) throws Exception {
- String representation = "";
- for (Object key : overProps.keySet()) {
- representation += key + "=" + overProps.get(key) + ",";
- }
-
- representation += ";" + prefix + ";" + id + ";";
- representation += addIdPrefix;
-
- VelocityEngine ve = engines.get(representation);
- if (ve == null) {
- ve = new VelocityEngine();
- Properties props = new Properties();
- props.load(ContentManager.class
- .getResourceAsStream(Constants.VELOCITY_PROPERTIES_FILE));
- props.putAll(overProps);
-
- if (addIdPrefix) {
- props.put(Constants.VELOCITY_RL_PREFIX, prefix);
- props.put(Constants.VELOCITY_RL_ID, id);
- }
-
- ve.init(props);
-
- engines.put(representation, ve);
- }
-
- return ve;
- }
-
- /**
* Standard constructor.
*
* @param id
@@ -525,9 +443,6 @@
setupDone = true;
}
- engines = Collections.synchronizedMap(
- new HashMap<String, VelocityEngine>());
-
contentManagers = new HashMap<String, Constructor>();
initializedContentManagers = new HashSet<String>();
initializedIds = new HashSet<String>();
More information about the jboss-svn-commits
mailing list