Commit 523f73ac authored by Stefan Funk's avatar Stefan Funk
Browse files

New RELEASE version >>> 3.2.5

parent dfe6a2f1
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>");
......
......@@ -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;
}
......@@ -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);
......
......@@ -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;
......
......@@ -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 + ":");
......
......@@ -43,6 +43,7 @@ import org.apache.http.util.EntityUtils;
* @author ubbo
*
*/
@Deprecated
public class TGHttpResponse {
private HttpResponse response;
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment