-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[maven-release-plugin] copy for tag v1.2.0
- Loading branch information
Showing
21 changed files
with
456 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
box.home=/custom/test/repository/path | ||
box.host_prefix=sftp://localhost: | ||
server.port=8083 | ||
server.port=8083 | ||
box.checksum=disabled | ||
box.sort_desc=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
<groupId>cz.sparko.boxitory</groupId> | ||
<artifactId>boxitory</artifactId> | ||
<version>1.1.0</version> | ||
<version>1.2.0</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>boxitory</name> | ||
|
@@ -34,7 +34,7 @@ | |
<url>https://github.com/sparkoo/boxitory</url> | ||
<connection>scm:git:git://github.com/sparkoo/boxitory.git</connection> | ||
<developerConnection>scm:git:[email protected]:sparkoo/boxitory.git</developerConnection> | ||
<tag>v1.1.0</tag> | ||
<tag>v1.2.0</tag> | ||
</scm> | ||
|
||
<properties> | ||
|
@@ -48,6 +48,10 @@ | |
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-thymeleaf</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-configuration-processor</artifactId> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/cz/sparko/boxitory/factory/HashServiceFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package cz.sparko.boxitory.factory; | ||
|
||
import cz.sparko.boxitory.conf.AppProperties; | ||
import cz.sparko.boxitory.service.FilesystemDigestHashService; | ||
import cz.sparko.boxitory.service.NoopHashService; | ||
import cz.sparko.boxitory.service.HashService; | ||
|
||
import java.security.MessageDigest; | ||
import java.security.NoSuchAlgorithmException; | ||
|
||
public class HashServiceFactory { | ||
|
||
public static HashService createHashService(AppProperties appProperties) throws NoSuchAlgorithmException { | ||
String algorithm = appProperties.getChecksum().toUpperCase(); | ||
|
||
switch (algorithm) { | ||
case "MD5": | ||
return new FilesystemDigestHashService(MessageDigest.getInstance(algorithm), appProperties); | ||
case "SHA1": | ||
return new FilesystemDigestHashService(MessageDigest.getInstance("SHA-1"), appProperties); | ||
case "SHA256": | ||
return new FilesystemDigestHashService(MessageDigest.getInstance("SHA-256"), appProperties); | ||
case "DISABLED": | ||
return new NoopHashService(); | ||
default: | ||
throw new IllegalArgumentException( | ||
"Configured checksum type (box.checksum=" + algorithm + ") is not supported" | ||
); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.