Skip to content

Commit

Permalink
#19 up
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Oct 3, 2023
1 parent 13a7684 commit 8984bf8
Show file tree
Hide file tree
Showing 11 changed files with 184 additions and 210 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012-2017, jcabi.com
Copyright (c) 2012-2023, jcabi.com
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
152 changes: 72 additions & 80 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,86 +1,78 @@
<?xml version="1.0"?>
<!--
* Copyright (c) 2012-2017, jcabi.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: 1) Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer. 2) Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution. 3) Neither the name of the jcabi.com nor
* the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jcabi</groupId>
<artifactId>jcabi</artifactId>
<version>1.18</version>
</parent>
<artifactId>jcabi-velocity</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jcabi-velocity</name>
<description>Wrapper of Apache Velocity</description>
<issueManagement>
<system>github</system>
<url>https://github.com/jcabi/jcabi-velocity/issues</url>
</issueManagement>
<ciManagement>
<system>travis</system>
<url>https://travis-ci.org/jcabi/jcabi-velocity</url>
</ciManagement>
<scm>
<connection>scm:git:github.com:jcabi/jcabi-velocity.git</connection>
<developerConnection>scm:git:github.com:jcabi/jcabi-velocity.git</developerConnection>
<url>https://github.com/jcabi/jcabi-velocity</url>
</scm>
<dependencies>
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-aspects</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<!--
Copyright (c) 2012-2023, jcabi.com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met: 1) Redistributions of source code must retain the above
copyright notice, this list of conditions and the following
disclaimer. 2) Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution. 3) Neither the name of the jcabi.com nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jcabi</groupId>
<artifactId>jcabi</artifactId>
<version>1.37.1</version>
</parent>
<artifactId>jcabi-velocity</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jcabi-velocity</name>
<description>Wrapper of Apache Velocity</description>
<issueManagement>
<system>github</system>
<url>https://github.com/jcabi/jcabi-velocity/issues</url>
</issueManagement>
<ciManagement>
<system>travis</system>
<url>https://travis-ci.org/jcabi/jcabi-velocity</url>
</ciManagement>
<scm>
<connection>scm:git:github.com:jcabi/jcabi-velocity.git</connection>
<developerConnection>scm:git:github.com:jcabi/jcabi-velocity.git</developerConnection>
<url>https://github.com/jcabi/jcabi-velocity</url>
</scm>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
</dependency>
<dependency>
<!--
Apache Velocity, text formatting tool
@see http://velocity.apache.org/
-->
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.7</version>
</dependency>
</dependencies>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-log</artifactId>
<version>0.22.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
65 changes: 32 additions & 33 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
<?xml version="1.0"?>
<!--
*
* Copyright (c) 2012-2017, jcabi.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met: 1) Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer. 2) Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution. 3) Neither the name of the jcabi.com nor
* the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
-->
Copyright (c) 2012-2023, jcabi.com
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met: 1) Redistributions of source code must retain the above
copyright notice, this list of conditions and the following
disclaimer. 2) Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution. 3) Neither the name of the jcabi.com nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<document xmlns="http://maven.apache.org/changes/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/xsd/changes-1.0.0.xsd">
<body>
<release version="0.8" date="4 Sep 2013" description="migrated to its own repo in Github"/>
<release version="0.1.6" date="13 May 2012" description="first release"/>
</body>
<body>
<release version="0.8" date="4 Sep 2013" description="migrated to its own repo in Github"/>
<release version="0.1.6" date="13 May 2012" description="first release"/>
</body>
</document>
1 change: 0 additions & 1 deletion src/main/aspect/README.txt

This file was deleted.

21 changes: 8 additions & 13 deletions src/main/java/com/jcabi/velocity/VelocityPage.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2012-2017, jcabi.com
/*
* Copyright (c) 2012-2023, jcabi.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -32,7 +32,6 @@
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Map;
import javax.validation.constraints.NotNull;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
Expand All @@ -53,12 +52,10 @@
*
* <p>The class is mutable and thread-safe.
*
* @author Yegor Bugayenko ([email protected])
* @version $Id$
* @since 0.1.6
* @see <a href="http://velocity.apache.org/engine/releases/velocity-1.7/user-guide.html">Velocity User Guide</a>
* @see <a href="http://velocity.apache.org/engine/releases/velocity-1.7/developer-guide.html">Velocity Developer Guide</a>
* @see <a href="http://velocity.apache.org/engine/devel/apidocs/org/apache/velocity/slf4j/Slf4jLogChute.html">Slf4jLogChute</a>
* @since 0.1.6
*/
public final class VelocityPage {

Expand All @@ -75,15 +72,16 @@ public final class VelocityPage {
/**
* The context.
*/
private final transient VelocityContext context = new VelocityContext();
private final transient VelocityContext context;

/**
* Public ctor, with absolute resource name in classpath.
* @param res Name of resource with template (absolute resource name in
* classpath)
*/
public VelocityPage(@NotNull final String res) {
public VelocityPage(final String res) {
this.name = res;
this.context = new VelocityContext();
}

/**
Expand All @@ -92,7 +90,7 @@ public VelocityPage(@NotNull final String res) {
* @param value The value to use
* @return This object
*/
public VelocityPage set(@NotNull final String prop, final Object value) {
public VelocityPage set(final String prop, final Object value) {
synchronized (this.context) {
this.context.put(prop, value);
}
Expand All @@ -105,7 +103,7 @@ public VelocityPage set(@NotNull final String prop, final Object value) {
* @return This object
* @since 0.8
*/
public VelocityPage set(@NotNull final Map<String, Object> args) {
public VelocityPage set(final Map<String, Object> args) {
synchronized (this.context) {
for (final Map.Entry<String, Object> entry : args.entrySet()) {
this.context.put(entry.getKey(), entry.getValue());
Expand All @@ -114,9 +112,6 @@ public VelocityPage set(@NotNull final Map<String, Object> args) {
return this;
}

/**
* {@inheritDoc}
*/
@Override
public String toString() {
final Template template =
Expand Down
10 changes: 4 additions & 6 deletions src/main/java/com/jcabi/velocity/package-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2012-2017, jcabi.com
/*
* Copyright (c) 2012-2023, jcabi.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -34,14 +34,12 @@
* <p>The only dependency you need is (check our latest version available
* at <a href="http://www.jcabi.com">www.jcabi.com</a>):
*
* <pre>&lt;depedency&gt;
* <pre>&lt;dependency&gt;
* &lt;groupId&gt;com.jcabi&lt;/groupId&gt;
* &lt;artifactId&gt;jcabi-velocity&lt;/artifactId&gt;
* &lt;/dependency&gt;</pre>
*
* @author Yegor Bugayenko ([email protected])
* @version $Id$
* @since 0.1.6
* @see <a href="http://www.jcabi.com/jcabi-velocity">project website</a>
* @since 0.1.6
*/
package com.jcabi.velocity;
2 changes: 1 addition & 1 deletion src/site/apt/index.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
------

~~
~~ Copyright (c) 2012-2017, jcabi.com
~~ Copyright (c) 2012-2023, jcabi.com
~~ All rights reserved.
~~
~~ Redistribution and use in source and binary forms, with or without
Expand Down
Loading

0 comments on commit 8984bf8

Please sign in to comment.