Skip to content

Commit

Permalink
v 4.5, fix #16
Browse files Browse the repository at this point in the history
  • Loading branch information
jirkapinkas committed May 2, 2020
1 parent 8f3c8d0 commit 55b8185
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Add this library to classpath:
<dependency>
<groupId>cz.jiripinkas</groupId>
<artifactId>jsitemapgenerator</artifactId>
<version>4.4</version>
<version>4.5</version>
</dependency>

If you want to use "ping google / bing" functionality, also add this library to classpath:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>cz.jiripinkas</groupId>
<artifactId>jsitemapgenerator</artifactId>
<version>4.4</version>
<version>4.5</version>
<packaging>jar</packaging>
<name>Java sitemap generator</name>
<description>This library generates a web sitemap and can ping Google that it has changed. This project has been
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,25 @@ public class RssGenerator extends AbstractGenerator<RssGenerator> {
private String defaultExtension;

/**
* Create RssGenerator
* Creates RssGenerator.
* This constructor is public, because sometimes somebody wants RssGenerator to be
* a Spring bean and Spring wants to create a proxy which requires public constructor.
* But you shouldn't call this constructor on your own, use {@link RssGenerator#of(String, String, String)} instead.
*
* @param baseUrl Base URL
* @param root If Base URL is root (for example http://www.javavids.com or if
* it's some path like http://www.javalibs.com/blog)
* @param webTitle Web title
* @param webDescription Web description
*/
private RssGenerator(String baseUrl, boolean root, String webTitle, String webDescription) {
public RssGenerator(String baseUrl, boolean root, String webTitle, String webDescription) {
super(baseUrl, root);
this.webTitle = webTitle;
this.webDescription = webDescription;
}

/**
* Create RssGenerator. Root = true.
* Creates RssGenerator. Root = true.
*
* @param baseUrl Base URL
* @param webTitle Web title
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ public enum AdditionalNamespace {
}

/**
* This constructor is public, because sometimes somebody wants SitemapGenerator to be
* a Spring bean and Spring wants to create a proxy which requires public constructor.
* But you shouldn't call this constructor on your own, use {@link SitemapGenerator#of(String)} instead.
* @param baseUrl Base URL
*/
private SitemapGenerator(String baseUrl) {
public SitemapGenerator(String baseUrl) {
super(baseUrl);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
public class SitemapIndexGenerator extends AbstractSitemapGenerator<SitemapIndexGenerator> {

/**
* @param baseUrl Base url
* This constructor is public, because sometimes somebody wants SitemapIndexGenerator to be
* a Spring bean and Spring wants to create a proxy which requires public constructor.
* But you shouldn't call this constructor on your own, use {@link SitemapIndexGenerator#of(String)} instead.
* @param baseUrl Base URL
*/
private SitemapIndexGenerator(String baseUrl) {
public SitemapIndexGenerator(String baseUrl) {
super(baseUrl);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cz.jiripinkas.jsitemapgenerator.robots;

import cz.jiripinkas.jsitemapgenerator.UrlUtil;
import cz.jiripinkas.jsitemapgenerator.generator.SitemapGenerator;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -13,6 +14,14 @@ public class RobotsTxtGenerator {

private String baseUrl;

/**
* This constructor is public, because sometimes somebody wants RobotsTxtGenerator to be
* a Spring bean and Spring wants to create a proxy which requires public constructor.
* But you shouldn't call this constructor on your own, use {@link RobotsTxtGenerator#of(String)} instead.
*/
public RobotsTxtGenerator() {
}

public static RobotsTxtGenerator of(String baseUrl) {
RobotsTxtGenerator robotsTxtGenerator = new RobotsTxtGenerator();
if (!baseUrl.endsWith("/")) {
Expand Down

0 comments on commit 55b8185

Please sign in to comment.