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
523f73ac
Commit
523f73ac
authored
Mar 02, 2018
by
Stefan Funk
Browse files
New RELEASE version >>> 3.2.5
parent
dfe6a2f1
Changes
14
Hide whitespace changes
Inline
Side-by-side
cli-tools/pom.xml
View file @
523f73ac
...
...
@@ -6,7 +6,7 @@
<parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
common
</artifactId>
<version>
3.2.5
-SNAPSHOT
</version>
<version>
3.2.5
</version>
</parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
cli-tools
</artifactId>
...
...
confclient/pom.xml
View file @
523f73ac
...
...
@@ -6,7 +6,7 @@
<parent>
<artifactId>
common
</artifactId>
<groupId>
info.textgrid.middleware
</groupId>
<version>
3.2.5
-SNAPSHOT
</version>
<version>
3.2.5
</version>
</parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
confclient
</artifactId>
...
...
esutils/pom.xml
View file @
523f73ac
...
...
@@ -4,7 +4,7 @@
<parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
common
</artifactId>
<version>
3.2.5
-SNAPSHOT
</version>
<version>
3.2.5
</version>
</parent>
<groupId>
info.textgrid.utils
</groupId>
<artifactId>
esutils
</artifactId>
...
...
httpclients/pom.xml
View file @
523f73ac
...
...
@@ -6,7 +6,7 @@
<parent>
<artifactId>
common
</artifactId>
<groupId>
info.textgrid.middleware
</groupId>
<version>
3.2.5
-SNAPSHOT
</version>
<version>
3.2.5
</version>
</parent>
<groupId>
info.textgrid.utils
</groupId>
<artifactId>
httpclients
</artifactId>
...
...
httpclients/src/main/java/info/textgrid/utils/existclient/ExistClient.java
View file @
523f73ac
...
...
@@ -43,15 +43,16 @@ import org.apache.http.entity.mime.MultipartEntity;
* @author ubbo
*
*/
@Deprecated
public
class
ExistClient
{
private
static
final
Log
LOG
=
LogFactory
.
getLog
(
ExistClient
.
class
);
.
getLog
(
ExistClient
.
class
);
private
static
final
String
MIME_XML
=
"text/xml"
;
private
String
charset
=
"UTF-8"
;
private
String
delXql
=
"delete-1.1.xql"
;
private
TGHttpClient
thc
;
private
String
charset
=
"UTF-8"
;
private
String
delXql
=
"delete-1.1.xql"
;
private
TGHttpClient
thc
;
/**
* Constructor for using existClient without user and password, e.g. for
...
...
@@ -365,8 +366,8 @@ public class ExistClient {
HttpEntity
entity
;
entity
=
new
StringEntity
(
pqString
,
this
.
charset
);
docResponse
=
thc
.
post
(
""
,
entity
,
"application/xml; charset="
+
this
.
charset
);
docResponse
=
thc
.
post
(
""
,
entity
,
"application/xml; charset="
+
this
.
charset
);
LOG
.
info
(
"exist-post-xquery-res: "
+
docResponse
.
getStatusCode
());
return
docResponse
;
...
...
@@ -423,7 +424,8 @@ public class ExistClient {
StringBuffer
sb
=
new
StringBuffer
();
sb
.
append
(
"<?xml version=\"1.0\" encoding=\""
+
charset
+
"\"?>"
);
sb
.
append
(
"<query xmlns=\"http://exist.sourceforge.net/NS/exist\" start=\"1\" max=\"0\" cache=\"yes\" session=\"\">"
);
sb
.
append
(
"<query xmlns=\"http://exist.sourceforge.net/NS/exist\" start=\"1\" max=\"0\" cache=\"yes\" session=\"\">"
);
sb
.
append
(
"<text>\n <![CDATA["
);
sb
.
append
(
xquery
);
sb
.
append
(
"]]>\n</text>"
);
...
...
httpclients/src/main/java/info/textgrid/utils/existclient/ExistStatusCodes.java
View file @
523f73ac
...
...
@@ -21,12 +21,13 @@
*/
package
info.textgrid.utils.existclient
;
@Deprecated
public
class
ExistStatusCodes
{
public
static
final
int
OK
=
200
;
public
static
final
int
CREATED
=
201
;
public
static
final
int
UNAUTHORIZED
=
401
;
public
static
final
int
NOT_FOUND
=
404
;
public
static
final
int
BAD_REQUEST
=
400
;
public
static
final
int
OK
=
200
;
public
static
final
int
CREATED
=
201
;
public
static
final
int
UNAUTHORIZED
=
401
;
public
static
final
int
NOT_FOUND
=
404
;
public
static
final
int
BAD_REQUEST
=
400
;
}
httpclients/src/main/java/info/textgrid/utils/httpclient/PreemptiveAuth.java
View file @
523f73ac
...
...
@@ -36,30 +36,29 @@ import org.apache.http.client.protocol.ClientContext;
import
org.apache.http.protocol.ExecutionContext
;
import
org.apache.http.protocol.HttpContext
;
@Deprecated
public
class
PreemptiveAuth
implements
HttpRequestInterceptor
{
public
void
process
(
final
HttpRequest
request
,
final
HttpContext
context
)
throws
HttpException
,
IOException
{
public
void
process
(
final
HttpRequest
request
,
final
HttpContext
context
)
throws
HttpException
,
IOException
{
AuthState
authState
=
(
AuthState
)
context
.
getAttribute
(
ClientContext
.
TARGET_AUTH_STATE
);
AuthState
authState
=
(
AuthState
)
context
.
getAttribute
(
ClientContext
.
TARGET_AUTH_STATE
);
// If no auth scheme avaialble yet, try to initialize it preemptively
if
(
authState
.
getAuthScheme
()
==
null
)
{
AuthScheme
authScheme
=
(
AuthScheme
)
context
.
getAttribute
(
"preemptive-auth"
);
CredentialsProvider
credsProvider
=
(
CredentialsProvider
)
context
.
getAttribute
(
ClientContext
.
CREDS_PROVIDER
);
HttpHost
targetHost
=
(
HttpHost
)
context
.
getAttribute
(
ExecutionContext
.
HTTP_TARGET_HOST
);
AuthScheme
authScheme
=
(
AuthScheme
)
context
.
getAttribute
(
"preemptive-auth"
);
CredentialsProvider
credsProvider
=
(
CredentialsProvider
)
context
.
getAttribute
(
ClientContext
.
CREDS_PROVIDER
);
HttpHost
targetHost
=
(
HttpHost
)
context
.
getAttribute
(
ExecutionContext
.
HTTP_TARGET_HOST
);
if
(
authScheme
!=
null
)
{
Credentials
creds
=
credsProvider
.
getCredentials
(
new
AuthScope
(
targetHost
.
getHostName
(),
targetHost
.
getPort
()));
Credentials
creds
=
credsProvider
.
getCredentials
(
new
AuthScope
(
targetHost
.
getHostName
(),
targetHost
.
getPort
()));
if
(
creds
==
null
)
{
throw
new
HttpException
(
"No credentials for preemptive authentication"
);
throw
new
HttpException
(
"No credentials for preemptive authentication"
);
}
authState
.
setAuthScheme
(
authScheme
);
authState
.
setCredentials
(
creds
);
...
...
httpclients/src/main/java/info/textgrid/utils/httpclient/TGHttpClient.java
View file @
523f73ac
...
...
@@ -54,18 +54,18 @@ import org.apache.http.protocol.BasicHttpContext;
*
*
*/
@Deprecated
public
class
TGHttpClient
{
private
static
final
Log
LOG
=
LogFactory
.
getLog
(
TGHttpClient
.
class
);
private
static
final
Log
LOG
=
LogFactory
.
getLog
(
TGHttpClient
.
class
);
private
URL
endpoint
;
private
String
user
=
""
;
private
String
password
=
""
;
private
URL
endpoint
;
private
String
user
=
""
;
private
String
password
=
""
;
private
DefaultHttpClient
client
;
private
DefaultHttpClient
client
;
private
TGHttpConnection
httpConnection
;
private
TGHttpConnection
httpConnection
;
public
TGHttpConnection
getHttpConnection
()
{
return
this
.
httpConnection
;
...
...
httpclients/src/main/java/info/textgrid/utils/httpclient/TGHttpConnection.java
View file @
523f73ac
...
...
@@ -47,17 +47,18 @@ import org.apache.http.params.HttpParams;
* @author ubbo
*
*/
@Deprecated
public
class
TGHttpConnection
{
private
static
TGHttpConnection
instance
=
new
TGHttpConnection
();
private
static
TGHttpConnection
instance
=
new
TGHttpConnection
();
private
static
PoolingClientConnectionManager
cm
;
private
static
final
int
MAX_TOTAL
=
150
;
private
static
final
int
DEFAULT_MAX_PER_ROUTE
=
50
;
private
static
final
int
DEFULT_PORT
=
80
;
private
static
final
int
MAX_TOTAL
=
150
;
private
static
final
int
DEFAULT_MAX_PER_ROUTE
=
50
;
private
static
final
int
DEFULT_PORT
=
80
;
private
static
int
maxTotal
=
MAX_TOTAL
;
private
static
int
defaultMaxPerRoute
=
DEFAULT_MAX_PER_ROUTE
;
private
static
int
maxTotal
=
MAX_TOTAL
;
private
static
int
defaultMaxPerRoute
=
DEFAULT_MAX_PER_ROUTE
;
private
TGHttpConnection
()
{
init
();
...
...
@@ -112,8 +113,8 @@ public class TGHttpConnection {
StringBuffer
buf
=
new
StringBuffer
();
buf
.
append
(
"Leased Connections: "
+
cm
.
getTotalStats
().
getLeased
());
buf
.
append
(
"\nPending Connections: "
+
cm
.
getTotalStats
().
getPending
());
buf
.
append
(
"\nMaxTotalConnections: "
+
cm
.
getTotalStats
().
getMax
()
+
"\n"
);
buf
.
append
(
"\nMaxTotalConnections: "
+
cm
.
getTotalStats
().
getMax
()
+
"\n"
);
for
(
String
r
:
routes
)
{
buf
.
append
(
"\n"
+
r
+
":"
);
...
...
httpclients/src/main/java/info/textgrid/utils/httpclient/TGHttpResponse.java
View file @
523f73ac
...
...
@@ -43,6 +43,7 @@ import org.apache.http.util.EntityUtils;
* @author ubbo
*
*/
@Deprecated
public
class
TGHttpResponse
{
private
HttpResponse
response
;
...
...
metadata-core-jaxb/pom.xml
View file @
523f73ac
...
...
@@ -4,7 +4,7 @@
<parent>
<artifactId>
common
</artifactId>
<groupId>
info.textgrid.middleware
</groupId>
<version>
3.2.5
-SNAPSHOT
</version>
<version>
3.2.5
</version>
</parent>
<groupId>
info.textgrid.namespaces
</groupId>
<artifactId>
metadata-core-jaxb
</artifactId>
...
...
pom.xml
View file @
523f73ac
...
...
@@ -4,7 +4,7 @@
<artifactId>
common
</artifactId>
<groupId>
info.textgrid.middleware
</groupId>
<name>
TextGrid :: Common Tools and Packages
</name>
<version>
3.2.5
-SNAPSHOT
</version>
<version>
3.2.5
</version>
<packaging>
pom
</packaging>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
...
...
projectfile-jaxb/pom.xml
View file @
523f73ac
...
...
@@ -4,7 +4,7 @@
<parent>
<artifactId>
common
</artifactId>
<groupId>
info.textgrid.middleware
</groupId>
<version>
3.2.5
-SNAPSHOT
</version>
<version>
3.2.5
</version>
</parent>
<groupId>
info.textgrid.namespaces
</groupId>
<artifactId>
projectfile-jaxb
</artifactId>
...
...
textgrid-clients/pom.xml
View file @
523f73ac
...
...
@@ -7,7 +7,7 @@
<parent>
<groupId>
info.textgrid.middleware
</groupId>
<artifactId>
common
</artifactId>
<version>
3.2.5
-SNAPSHOT
</version>
<version>
3.2.5
</version>
</parent>
<groupId>
info.textgrid.middleware.clients
</groupId>
...
...
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