Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DARIAH-DE
DARIAH-DE Common
Commits
bee7b31f
Commit
bee7b31f
authored
Apr 30, 2021
by
Stefan Funk
Browse files
Merge branch 'release/3.6.0'
parents
34c6346a
1835ed2d
Changes
16
Hide whitespace changes
Inline
Side-by-side
cli-tools/pom.xml
View file @
bee7b31f
...
...
@@ -7,7 +7,7 @@
<parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
common
</artifactId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
cli-tools
</artifactId>
...
...
confclient/pom.xml
View file @
bee7b31f
...
...
@@ -7,7 +7,7 @@
<parent>
<artifactId>
common
</artifactId>
<groupId>
info.textgrid.middleware
</groupId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
confclient
</artifactId>
...
...
const/pom.xml
View file @
bee7b31f
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
common
</artifactId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
const
</artifactId>
...
...
dariah-storage-client/pom.xml
View file @
bee7b31f
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
common
</artifactId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
dariah-storage-client
</artifactId>
...
...
dariah-storage-client/src/main/java/info/textgrid/middleware/common/DariahStorageClient.java
View file @
bee7b31f
...
...
@@ -32,7 +32,7 @@ import javax.ws.rs.core.Response.Status;
import
org.apache.commons.io.IOUtils
;
/**
* @version 2021-0
3-17
* @version 2021-0
4-30
*/
public
class
DariahStorageClient
implements
Serializable
{
...
...
@@ -59,7 +59,6 @@ public class DariahStorageClient implements Serializable {
private
static
final
String
LOG
=
" "
;
private
static
final
String
STORAGE_SAYS
=
"Storage says: "
;
private
static
final
String
ERROR_READING
=
"Error reading file! "
+
STORAGE_SAYS
;
private
static
final
String
ERROR_CREATING
=
"Error creating file! "
+
STORAGE_SAYS
;
private
static
final
String
ERROR_UPDATING
=
"Error updating file! "
+
STORAGE_SAYS
;
private
static
final
String
ERROR_DELETING
=
"Error deleting file! "
+
STORAGE_SAYS
;
...
...
@@ -197,9 +196,8 @@ public class DariahStorageClient implements Serializable {
* @param token
* @param logID
* @return
* @throws IOException
*/
public
Response
readResponse
(
String
id
,
String
token
,
String
logID
)
throws
IOException
{
public
Response
readResponse
(
String
id
,
String
token
,
String
logID
)
{
Response
result
=
null
;
...
...
@@ -213,13 +211,6 @@ public class DariahStorageClient implements Serializable {
this
.
defaultLogger
.
log
(
Level
.
INFO
,
logID
+
id
+
LOG
+
result
.
getStatus
());
if
(
result
.
getStatus
()
!=
Status
.
OK
.
getStatusCode
())
{
String
message
=
logID
+
id
+
LOG
+
ERROR_READING
+
result
.
getStatus
()
+
" "
+
result
.
getStatusInfo
().
getReasonPhrase
();
this
.
defaultLogger
.
log
(
Level
.
SEVERE
,
message
);
throw
new
IOException
(
message
);
}
return
result
;
}
...
...
dariah-storage-client/src/test/java/info/textgrid/middleware/common/TestDariahStorageClientONLINE.java
View file @
bee7b31f
...
...
@@ -54,6 +54,8 @@ import info.textgrid.middleware.common.TextGridMimetypes;
**
* CHANGELOG
*
* 2020-04-30 - Funk - Adapt to non-exception readResponse storage client method.
*
* 2019-04-24 - Funk - More tests added for list resources methods.
*
* 2019-03-06 - Funk - Added online tests for new Storage API V2.0 methods.
...
...
@@ -67,7 +69,7 @@ import info.textgrid.middleware.common.TextGridMimetypes;
* </p>
*
* @author Stefan E. Funk, SUB Göttingen
* @version 2021-0
3-16
* @version 2021-0
4-30
* @since 2018-04-23
*/
@Ignore
...
...
@@ -354,20 +356,12 @@ public class TestDariahStorageClientONLINE {
System
.
out
.
print
(
"\t#READ ("
+
id
+
")"
+
ARR
);
t
=
String
.
valueOf
(
System
.
currentTimeMillis
());
try
{
Response
response
=
ownStorageClient
.
readResponse
(
id
,
token
,
logID
+
t
);
Response
response
=
ownStorageClient
.
readResponse
(
id
,
token
,
logID
+
t
);
int
statusCode
=
response
.
getStatus
();
if
(
statusCode
!=
Status
.
NOT_FOUND
.
getStatusCode
())
{
assertTrue
(
false
);
}
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
e
.
getMessage
()
+
ARR
+
OK
);
return
;
int
statusCode
=
response
.
getStatus
();
if
(
statusCode
!=
Status
.
NOT_FOUND
.
getStatusCode
())
{
assertTrue
(
false
);
}
// No exception.
assertTrue
(
false
);
}
/**
...
...
@@ -544,27 +538,23 @@ public class TestDariahStorageClientONLINE {
// Test #READ (no token)
System
.
out
.
print
(
"\t#READ NOTOK ("
+
id
+
")"
+
ARR
);
try
{
Response
response
=
ownStorageClient
.
readResponse
(
id
,
null
,
log
);
System
.
out
.
println
(
OK
+
": "
+
response
.
getStatus
()
+
" "
+
response
.
getStatusInfo
().
getReasonPhrase
());
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
ERROR
+
": "
+
e
.
getMessage
()
+
ARR
+
OK
);
Response
response
=
ownStorageClient
.
readResponse
(
id
,
null
,
log
);
String
responseString
=
response
.
getStatus
()
+
" "
+
response
.
getStatusInfo
().
getReasonPhrase
();
if
(
response
.
getStatus
()
==
Status
.
OK
.
getStatusCode
())
{
System
.
out
.
println
(
OK
+
": "
+
responseString
);
}
else
{
System
.
out
.
println
(
ERROR
+
": "
+
responseString
);
}
// Test #READ (invalid token)
System
.
out
.
print
(
"\t#READ INVTOK ("
+
id
+
")"
+
ARR
);
try
{
Response
response
=
ownStorageClient
.
readResponse
(
id
,
invalidToken
,
log
);
System
.
out
.
println
(
OK
+
": "
+
response
.
getStatus
()
+
" "
+
response
.
getStatusInfo
().
getReasonPhrase
());
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
ERROR
+
": "
+
e
.
getMessage
()
+
ARR
+
OK
);
response
=
ownStorageClient
.
readResponse
(
id
,
invalidToken
,
log
);
responseString
=
response
.
getStatus
()
+
" "
+
response
.
getStatusInfo
().
getReasonPhrase
();
if
(
response
.
getStatus
()
==
Status
.
OK
.
getStatusCode
())
{
System
.
out
.
println
(
OK
+
": "
+
responseString
);
}
else
{
System
.
out
.
println
(
ERROR
+
": "
+
responseString
);
}
// TEST #PUBLISH
...
...
@@ -605,30 +595,24 @@ public class TestDariahStorageClientONLINE {
// Test #READ (no token)
System
.
out
.
print
(
"\t#READ NOTOK ("
+
id
+
")"
+
ARR
);
try
{
Response
response
=
ownStorageClient
.
readResponse
(
id
,
null
,
log
);
System
.
out
.
println
(
OK
+
": "
+
response
.
getStatus
()
+
" "
+
response
.
getStatusInfo
().
getReasonPhrase
());
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
ERROR
+
": "
+
e
.
getMessage
());
response
=
ownStorageClient
.
readResponse
(
id
,
null
,
log
);
responseString
=
response
.
getStatus
()
+
" "
+
response
.
getStatusInfo
().
getReasonPhrase
();
if
(
response
.
getStatus
()
==
Status
.
OK
.
getStatusCode
())
{
System
.
out
.
println
(
OK
+
": "
+
responseString
);
}
else
{
System
.
out
.
println
(
ERROR
+
": "
+
responseString
);
assertTrue
(
false
);
}
// Test #READ (invalid token)
System
.
out
.
print
(
"\t#READ INVTOK ("
+
id
+
")"
+
ARR
);
try
{
Response
response
=
ownStorageClient
.
readResponse
(
id
,
invalidToken
,
log
);
System
.
out
.
println
(
OK
+
": "
+
response
.
getStatus
()
+
" "
+
response
.
getStatusInfo
().
getReasonPhrase
());
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
ERROR
+
": "
+
e
.
getMessage
());
response
=
ownStorageClient
.
readResponse
(
id
,
invalidToken
,
log
);
responseString
=
response
.
getStatus
()
+
" "
+
response
.
getStatusInfo
().
getReasonPhrase
();
if
(
response
.
getStatus
()
==
Status
.
OK
.
getStatusCode
())
{
System
.
out
.
println
(
OK
+
": "
+
responseString
);
}
else
{
System
.
out
.
println
(
ERROR
+
": "
+
responseString
);
assertTrue
(
false
);
}
...
...
@@ -665,19 +649,19 @@ public class TestDariahStorageClientONLINE {
// Test #READ (again with no token)
System
.
out
.
print
(
"\t#READ NOTOK ("
+
id
+
")"
+
ARR
);
try
{
ownStorageClient
.
readResponse
(
id
,
null
,
log
);
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
OK
+
"
:
"
+
e
.
getMessag
e
());
response
=
ownStorageClient
.
readResponse
(
id
,
null
,
log
);
if
(
response
.
getStatus
()
!=
Status
.
OK
.
getStatusCode
())
{
System
.
out
.
println
(
OK
+
": "
+
response
.
getStatus
()
+
" "
+
response
.
getStatusInfo
().
getReasonPhras
e
());
}
// Test #READ (again with invalid token)
System
.
out
.
print
(
"\t#READ INVTOK ("
+
id
+
")"
+
ARR
);
try
{
ownStorageClient
.
readResponse
(
id
,
invalidToken
,
log
);
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
OK
+
"
:
"
+
e
.
getMessag
e
());
response
=
ownStorageClient
.
readResponse
(
id
,
invalidToken
,
log
);
if
(
response
.
getStatus
()
!=
Status
.
OK
.
getStatusCode
())
{
System
.
out
.
println
(
OK
+
": "
+
response
.
getStatus
()
+
" "
+
response
.
getStatusInfo
().
getReasonPhras
e
());
}
// TEST #CHECKACCESS/DELETE
...
...
esutils/pom.xml
View file @
bee7b31f
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
common
</artifactId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.utils
</groupId>
<artifactId>
esutils
</artifactId>
...
...
httpclients/pom.xml
View file @
bee7b31f
...
...
@@ -7,7 +7,7 @@
<parent>
<artifactId>
common
</artifactId>
<groupId>
info.textgrid.middleware
</groupId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.utils
</groupId>
<artifactId>
httpclients
</artifactId>
...
...
jpairtree/pom.xml
View file @
bee7b31f
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
common
</artifactId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
jpairtree
</artifactId>
...
...
ltputils/pom.xml
View file @
bee7b31f
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
common
</artifactId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
ltputils
</artifactId>
...
...
metadata-core-jaxb/pom.xml
View file @
bee7b31f
...
...
@@ -5,7 +5,7 @@
<parent>
<artifactId>
common
</artifactId>
<groupId>
info.textgrid.middleware
</groupId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.namespaces
</groupId>
<artifactId>
metadata-core-jaxb
</artifactId>
...
...
pom.xml
View file @
bee7b31f
...
...
@@ -6,12 +6,12 @@
<artifactId>
common
</artifactId>
<groupId>
info.textgrid.middleware
</groupId>
<name>
DARIAHDE :: Common Tools and Packages
</name>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
<packaging>
pom
</packaging>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<felix.version>
2.3.4
</felix.version>
<cxf.version>
3.3.
6
</cxf.version>
<cxf.version>
3.3.
10
</cxf.version>
<commons-io.version>
2.6
</commons-io.version>
<junit.version>
4.12
</junit.version>
<java-compiler.version>
1.8
</java-compiler.version>
...
...
@@ -54,8 +54,8 @@
<modules>
<module>
metadata-core-jaxb
</module>
<module>
httpclients
</module>
<module>
confclient
</module>
<module>
const
</module>
<module>
confclient
</module>
<module>
const
</module>
<module>
projectfile-jaxb
</module>
<module>
portalconfig-jaxb
</module>
<module>
esutils
</module>
...
...
portalconfig-jaxb/pom.xml
View file @
bee7b31f
...
...
@@ -5,7 +5,7 @@
<parent>
<artifactId>
common
</artifactId>
<groupId>
info.textgrid.middleware
</groupId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.namespaces
</groupId>
<artifactId>
portalconfig-jaxb
</artifactId>
...
...
projectfile-jaxb/pom.xml
View file @
bee7b31f
...
...
@@ -5,7 +5,7 @@
<parent>
<artifactId>
common
</artifactId>
<groupId>
info.textgrid.middleware
</groupId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.namespaces
</groupId>
<artifactId>
projectfile-jaxb
</artifactId>
...
...
rdfutils/pom.xml
View file @
bee7b31f
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
common
</artifactId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
rdfutils
</artifactId>
...
...
textgrid-clients/pom.xml
View file @
bee7b31f
...
...
@@ -7,7 +7,7 @@
<parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
common
</artifactId>
<version>
3.
5.5
</version>
<version>
3.
6.0
</version>
</parent>
<groupId>
info.textgrid.middleware.clients
</groupId>
<artifactId>
textgrid-clients
</artifactId>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment