Author: apetrelli
Date: Mon Dec 13 19:40:43 2010
New Revision: 1045333
URL: http://svn.apache.org/viewvc?rev=1045333&view=rev
Log:
TILESSB-38
Fixed tiles-autotag-jsp checkstyle.
Added:
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/package-info.java
(with props)
Modified:
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/JspTemplateGeneratorFactory.java
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/TLDGenerator.java
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/TagClassGenerator.java
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/JspTemplateGeneratorFactoryTest.java
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/TLDGeneratorTest.java
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/TagClassGeneratorTest.java
Modified:
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/JspTemplateGeneratorFactory.java
URL:
http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/JspTemplateGeneratorFactory.java?rev=1045333&r1=1045332&r2=1045333&view=diff
==============================================================================
---
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/JspTemplateGeneratorFactory.java
(original)
+++
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/JspTemplateGeneratorFactory.java
Mon Dec 13 19:40:43 2010
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.tiles.autotag.jsp;
import java.io.File;
@@ -7,6 +27,11 @@ import org.apache.tiles.autotag.generate
import org.apache.tiles.autotag.generate.TemplateGeneratorFactory;
import org.apache.velocity.app.VelocityEngine;
+/**
+ * Creates a template generator to build JSP code around template models.
+ *
+ * @version $Rev$ $Date$
+ */
public class JspTemplateGeneratorFactory implements TemplateGeneratorFactory {
/**
@@ -19,12 +44,27 @@ public class JspTemplateGeneratorFactory
*/
private File resourcesOutputDirectory;
+ /**
+ * The Velocity engine.
+ */
private VelocityEngine velocityEngine;
+ /**
+ * The template generator builder.
+ */
private TemplateGeneratorBuilder templateGeneratorBuilder;
+ /**
+ * Constructor.
+ *
+ * @param classesOutputDirectory The directory where classes will be
generated.
+ * @param resourcesOutputDirectory The directory where the TLD file will
be generated.
+ * @param velocityEngine The Velocity engine.
+ * @param templateGeneratorBuilder The template generator builder.
+ */
public JspTemplateGeneratorFactory(File classesOutputDirectory,
- File resourcesOutputDirectory, VelocityEngine velocityEngine,
TemplateGeneratorBuilder templateGeneratorBuilder) {
+ File resourcesOutputDirectory, VelocityEngine velocityEngine,
+ TemplateGeneratorBuilder templateGeneratorBuilder) {
this.classesOutputDirectory = classesOutputDirectory;
this.resourcesOutputDirectory = resourcesOutputDirectory;
this.velocityEngine = velocityEngine;
Modified:
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/TLDGenerator.java
URL:
http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/TLDGenerator.java?rev=1045333&r1=1045332&r2=1045333&view=diff
==============================================================================
---
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/TLDGenerator.java
(original)
+++
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/TLDGenerator.java
Mon Dec 13 19:40:43 2010
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.tiles.autotag.jsp;
import java.io.File;
@@ -7,21 +27,37 @@ import org.apache.tiles.autotag.generate
import org.apache.tiles.autotag.model.TemplateSuite;
import org.apache.velocity.app.VelocityEngine;
+/**
+ * Generates the TLD file, using a template suite.
+ *
+ * @version $Rev$ $Date$
+ */
public class TLDGenerator extends AbstractTemplateSuiteGenerator {
+ /**
+ * Constructor.
+ *
+ * @param velocityEngine The Velocity engine.
+ */
public TLDGenerator(VelocityEngine velocityEngine) {
super(velocityEngine);
}
- protected String getTemplatePath(File directory, String packageName,
TemplateSuite suite, Map<String, String> parameters) {
+ @Override
+ protected String getTemplatePath(File directory, String packageName,
+ TemplateSuite suite, Map<String, String> parameters) {
return "/org/apache/tiles/autotag/jsp/tld.vm";
}
- protected String getFilename(File directory, String packageName,
TemplateSuite suite, Map<String, String> parameters) {
+ @Override
+ protected String getFilename(File directory, String packageName,
+ TemplateSuite suite, Map<String, String> parameters) {
return suite.getName() + "-jsp.tld";
}
- protected String getDirectoryName(File directory, String packageName,
TemplateSuite suite, Map<String, String> parameters) {
+ @Override
+ protected String getDirectoryName(File directory, String packageName,
+ TemplateSuite suite, Map<String, String> parameters) {
return "META-INF/tld/";
}
Modified:
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/TagClassGenerator.java
URL:
http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/TagClassGenerator.java?rev=1045333&r1=1045332&r2=1045333&view=diff
==============================================================================
---
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/TagClassGenerator.java
(original)
+++
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/TagClassGenerator.java
Mon Dec 13 19:40:43 2010
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.tiles.autotag.jsp;
import java.io.File;
@@ -8,8 +28,18 @@ import org.apache.tiles.autotag.model.Te
import org.apache.tiles.autotag.model.TemplateSuite;
import org.apache.velocity.app.VelocityEngine;
+/**
+ * Generates a tag class using a template class.
+ *
+ * @version $Rev$ $Date$
+ */
public class TagClassGenerator extends AbstractTemplateClassGenerator {
+ /**
+ * Constructor.
+ *
+ * @param velocityEngine The Velocity engine.
+ */
public TagClassGenerator(VelocityEngine velocityEngine) {
super(velocityEngine);
}
Added:
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/package-info.java
URL:
http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/package-info.java?rev=1045333&view=auto
==============================================================================
---
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/package-info.java
(added)
+++
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/package-info.java
Mon Dec 13 19:40:43 2010
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Autotag support for JavaServer Pages.
+ */
+package org.apache.tiles.autotag.jsp;
Propchange:
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/package-info.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/main/java/org/apache/tiles/autotag/jsp/package-info.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified:
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/JspTemplateGeneratorFactoryTest.java
URL:
http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/JspTemplateGeneratorFactoryTest.java?rev=1045333&r1=1045332&r2=1045333&view=diff
==============================================================================
---
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/JspTemplateGeneratorFactoryTest.java
(original)
+++
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/JspTemplateGeneratorFactoryTest.java
Mon Dec 13 19:40:43 2010
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.tiles.autotag.jsp;
@@ -38,7 +55,9 @@ public class JspTemplateGeneratorFactory
expect(builder.build()).andReturn(generator);
replay(classesOutputDirectory, resourcesOutputDirectory,
velocityEngine, builder, generator);
- JspTemplateGeneratorFactory factory = new
JspTemplateGeneratorFactory(classesOutputDirectory, resourcesOutputDirectory,
velocityEngine, builder);
+ JspTemplateGeneratorFactory factory = new JspTemplateGeneratorFactory(
+ classesOutputDirectory, resourcesOutputDirectory,
+ velocityEngine, builder);
assertSame(generator, factory.createTemplateGenerator());
verify(classesOutputDirectory, resourcesOutputDirectory,
velocityEngine, builder, generator);
}
Modified:
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/TLDGeneratorTest.java
URL:
http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/TLDGeneratorTest.java?rev=1045333&r1=1045332&r2=1045333&view=diff
==============================================================================
---
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/TLDGeneratorTest.java
(original)
+++
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/TLDGeneratorTest.java
Mon Dec 13 19:40:43 2010
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.tiles.autotag.jsp;
@@ -33,7 +50,7 @@ import org.junit.Test;
public class TLDGeneratorTest {
/**
- * Test method for {...@link
org.apache.tiles.autotag.jsp.TLDGenerator#generate(java.io.File,
java.lang.String, org.apache.tiles.autotag.model.TemplateSuite, Map)}.
+ * Test method for {...@link TLDGenerator#generate(File, String,
TemplateSuite, Map)}.
* @throws Exception If something goes wrong.
*/
@Test
Modified:
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/TagClassGeneratorTest.java
URL:
http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/TagClassGeneratorTest.java?rev=1045333&r1=1045332&r2=1045333&view=diff
==============================================================================
---
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/TagClassGeneratorTest.java
(original)
+++
tiles/sandbox/trunk/tiles-autotag/tiles-autotag-jsp/src/test/java/org/apache/tiles/autotag/jsp/TagClassGeneratorTest.java
Mon Dec 13 19:40:43 2010
@@ -1,5 +1,22 @@
-/**
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.tiles.autotag.jsp;