REOC-58 upgrade the version for commons-lang3
This commit is contained in:
parent
04c7308825
commit
7d3261ea45
|
@ -31,7 +31,8 @@ dependencies {
|
|||
compile group: 'log4j', name: 'log4j', version: '1.2.9'
|
||||
|
||||
compile group: 'commons-logging', name: 'commons-logging', version: '1.1.1'
|
||||
compile group: 'commons-lang', name: 'commons-lang', version: '2.4'
|
||||
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
|
||||
|
||||
compile group: 'commons-codec', name: 'commons-codec', version: '1.3'
|
||||
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.1.1'
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
|
||||
import com.ossez.reoc.rets.common.util.CaseInsensitiveTreeMap;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.HttpStatus;
|
||||
|
|
|
@ -6,8 +6,8 @@ import java.util.Map;
|
|||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
import com.ossez.reoc.rets.common.util.CaseInsensitiveTreeMap;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.Header;
|
||||
import org.apache.http.HttpResponse;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.ossez.reoc.rets.client;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class GetMetadataRequest extends VersionInsensitiveRequest {
|
||||
private static final int COMPACT_FORMAT = 0;
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.ossez.reoc.rets.common.metadata.JDomCompactBuilder;
|
|||
import com.ossez.reoc.rets.common.metadata.JDomStandardBuilder;
|
||||
import com.ossez.reoc.rets.common.metadata.MetaObject;
|
||||
import com.ossez.reoc.rets.common.metadata.MetadataException;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
|
||||
import org.jdom.Element;
|
||||
import org.jdom.JDOMException;
|
||||
|
|
|
@ -6,8 +6,8 @@ import java.util.Iterator;
|
|||
import java.util.Set;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.ObjectUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class GetObjectRequest extends VersionInsensitiveRequest {
|
||||
public static final String KEY_RESOURCE = "Resource";
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Map;
|
|||
import java.util.NoSuchElementException;
|
||||
|
||||
import com.ossez.reoc.rets.common.util.CaseInsensitiveTreeMap;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.http.HeaderElement;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.message.BasicHeaderValueParser;
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class GetObjectResponseIterator<T extends SingleObjectResponse> implements GetObjectIterator<T> {
|
||||
public static final char CR = '\r';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.ossez.reoc.rets.client;
|
||||
|
||||
import org.apache.commons.lang.SystemUtils;
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
/**
|
||||
* Exception class for invalid reply codes from a Rets server
|
||||
*/
|
||||
|
|
|
@ -10,8 +10,8 @@ import org.jdom.JDOMException;
|
|||
import org.jdom.Document;
|
||||
import org.jdom.input.SAXBuilder;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
|
|
@ -6,8 +6,8 @@ import java.net.URL;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.ossez.reoc.rets.client;
|
|||
import com.ossez.reoc.rets.common.metadata.MetaCollector;
|
||||
import com.ossez.reoc.rets.common.metadata.MetaObject;
|
||||
import com.ossez.reoc.rets.common.metadata.MetadataType;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package com.ossez.reoc.rets.client;
|
||||
|
||||
import org.apache.commons.lang.exception.NestableException;
|
||||
|
||||
public class RetsException extends NestableException {
|
||||
/**
|
||||
* @author YuCheng Hu
|
||||
*/
|
||||
public class RetsException extends Exception {
|
||||
public RetsException() {
|
||||
super();
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ import java.util.SortedMap;
|
|||
import java.util.TreeMap;
|
||||
|
||||
import com.ossez.reoc.rets.common.util.CaseInsensitiveTreeMap;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
/** Base Http Request object */
|
||||
public abstract class RetsHttpRequest implements Serializable {
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
package com.ossez.reoc.rets.client;
|
||||
|
||||
import org.apache.commons.codec.DecoderException;
|
||||
import org.apache.commons.codec.EncoderException;
|
||||
import org.apache.commons.codec.net.URLCodec;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import org.apache.commons.codec.DecoderException;
|
||||
import org.apache.commons.codec.EncoderException;
|
||||
import org.apache.commons.codec.net.URLCodec;
|
||||
import org.apache.commons.lang.exception.NestableRuntimeException;
|
||||
|
||||
/** Random utility functions. */
|
||||
/**
|
||||
* Random utility functions
|
||||
*
|
||||
* @author YuCheng Hu
|
||||
*/
|
||||
public class RetsUtil {
|
||||
public static void copyStream(InputStream in, OutputStream out) throws IOException {
|
||||
byte[] buf = new byte[512];
|
||||
|
@ -31,7 +34,7 @@ public class RetsUtil {
|
|||
try {
|
||||
return new URLCodec().encode(string);
|
||||
} catch (EncoderException e) {
|
||||
throw new NestableRuntimeException(e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +42,7 @@ public class RetsUtil {
|
|||
try {
|
||||
return new URLCodec().decode(string);
|
||||
} catch (DecoderException e) {
|
||||
throw new NestableRuntimeException(e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@ package com.ossez.reoc.rets.client;
|
|||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
|
||||
public class RetsVersion implements Serializable {
|
||||
public static final String RETS_VERSION_HEADER = "RETS-Version";
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.io.InputStream;
|
|||
import java.io.Reader;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import org.apache.commons.lang.exception.NestableRuntimeException;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.xml.sax.InputSource;
|
||||
|
||||
|
@ -163,7 +162,7 @@ class StreamingSearchResult implements SearchResultSet, SearchResultCollector {
|
|||
if (state() > BUFFER_FULL) {
|
||||
if (this.exception == null)
|
||||
setException(new RetsException("Attempting to add rows to buffer when in complete state"));
|
||||
throw new NestableRuntimeException(this.exception);
|
||||
throw new RuntimeException(this.exception);
|
||||
}
|
||||
|
||||
// check complete.
|
||||
|
@ -174,7 +173,7 @@ class StreamingSearchResult implements SearchResultSet, SearchResultCollector {
|
|||
if (this.exception == null)
|
||||
setException(new RetsException("Timeout writing to streaming result set buffer, timeout length = "
|
||||
+ this.timeout));
|
||||
throw new NestableRuntimeException(this.exception);
|
||||
throw new RuntimeException(this.exception);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -283,7 +282,7 @@ class StreamingSearchResult implements SearchResultSet, SearchResultCollector {
|
|||
try {
|
||||
return checkException();
|
||||
} catch (RetsException e) {
|
||||
throw new NestableRuntimeException(e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -301,7 +300,7 @@ class StreamingSearchResult implements SearchResultSet, SearchResultCollector {
|
|||
wait(this.timeout);
|
||||
} catch (InterruptedException e) {
|
||||
pushState(COMPLETE);
|
||||
throw new NestableRuntimeException(e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import com.ossez.reoc.rets.common.util.CaseInsensitiveTreeMap;
|
||||
import org.apache.commons.lang.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import com.ossez.reoc.rets.common.metadata.attrib.AttrAlphanum;
|
||||
|
|
|
@ -7,9 +7,8 @@
|
|||
*/
|
||||
package com.ossez.reoc.rets.common.metadata;
|
||||
|
||||
import org.apache.commons.lang.exception.NestableException;
|
||||
|
||||
public class MetadataException extends NestableException {
|
||||
public class MetadataException extends Exception {
|
||||
public MetadataException() {
|
||||
super();
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
package com.ossez.reoc.rets.common.metadata.attrib;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.ossez.reoc.rets.common.metadata.AttrType;
|
||||
import com.ossez.reoc.rets.common.metadata.MetaParseException;
|
||||
|
||||
|
|
|
@ -2,11 +2,7 @@ package com.ossez.reoc.rets.examples;
|
|||
|
||||
import java.net.MalformedURLException;
|
||||
|
||||
import com.ossez.reoc.rets.client.CommonsHttpClient;
|
||||
import com.ossez.reoc.rets.client.RetsException;
|
||||
import com.ossez.reoc.rets.client.RetsHttpClient;
|
||||
import com.ossez.reoc.rets.client.RetsSession;
|
||||
import com.ossez.reoc.rets.client.RetsVersion;
|
||||
import com.ossez.reoc.rets.client.*;
|
||||
import com.ossez.reoc.rets.common.metadata.types.MClass;
|
||||
import com.ossez.reoc.rets.common.metadata.types.MResource;
|
||||
import com.ossez.reoc.rets.common.metadata.types.MSystem;
|
||||
|
@ -34,7 +30,9 @@ public class RetsGetMetadataExample {
|
|||
session.setMethod("POST");
|
||||
try {
|
||||
//Login
|
||||
session.login(username, password);
|
||||
LoginResponse loginResponse = session.login(username, password);
|
||||
|
||||
System.out.println(">>>" + loginResponse.getSessionId());
|
||||
} catch (RetsException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.ossez.reoc.rets.examples;
|
|||
|
||||
import java.net.MalformedURLException;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.ossez.reoc.rets.client.CommonsHttpClient;
|
||||
import com.ossez.reoc.rets.client.RetsException;
|
||||
import com.ossez.reoc.rets.client.RetsHttpClient;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<!--**********************************************************************
|
||||
IMMUTABLE PROPERTIES DEFINTIONS
|
||||
***********************************************************************-->
|
||||
<property name="dist" value="C:/WorkDir/Ossez-Com/REoC/Source-Code/reoc-mls-client/../dist"/>
|
||||
<property name="dist" value="C:/WorkDir/Ossez-Com/rets-io-client/../dist"/>
|
||||
<property name="dist.sandbox" value="${dist}/${ant.project.name}-sandbox"/>
|
||||
<property name="dist.lib" value="${dist.sandbox}/lib"/>
|
||||
<!-- junit property stuff -->
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue