From 6a67a236c6c1c71a875197a7514379fe4a2fe545 Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Mon, 29 Nov 2021 10:37:30 -0500 Subject: [PATCH] USRE-85 Fixed the error for docs build --- .../rets/retsapi/InputStreamDataSource.java | 2 +- .../realtor/rets/retsapi/RETSConnection.java | 4 +- .../retsapi/RETSGetObjectTransaction.java | 52 ++++++++----------- .../retsapi/RETSSearchAgentTransaction.java | 2 +- 4 files changed, 25 insertions(+), 35 deletions(-) diff --git a/src/main/java/org/realtor/rets/retsapi/InputStreamDataSource.java b/src/main/java/org/realtor/rets/retsapi/InputStreamDataSource.java index df492c9..2825445 100644 --- a/src/main/java/org/realtor/rets/retsapi/InputStreamDataSource.java +++ b/src/main/java/org/realtor/rets/retsapi/InputStreamDataSource.java @@ -9,7 +9,7 @@ import java.util.Vector; /** * A class to provide a {@link javax.activation.DataSource} interface to - * an input stream of unknown characteristics. The DataSource + * an input stream of unknown characteristics. The DataSource * interface requires that its implementor be able to repeatedly restart * the read from the beginning. This isn't guaranteed by InputStream, so * we encapsulate the InputStream with an object that will buffer the diff --git a/src/main/java/org/realtor/rets/retsapi/RETSConnection.java b/src/main/java/org/realtor/rets/retsapi/RETSConnection.java index 58abb2c..82898e5 100644 --- a/src/main/java/org/realtor/rets/retsapi/RETSConnection.java +++ b/src/main/java/org/realtor/rets/retsapi/RETSConnection.java @@ -90,7 +90,7 @@ public class RETSConnection extends java.lang.Object { /** * Executes a transaction * - * @param RETSTransaction transaction to execute + * @param transaction transaction to execute */ public void execute(RETSTransaction transaction) { execute(transaction, false); @@ -99,7 +99,7 @@ public class RETSConnection extends java.lang.Object { /** * Executes a transaction * - * @param RETSTransaction transaction to execute + * @param transaction transaction to execute */ public void executeStreamResponse(RETSTransaction transaction) { execute(transaction, true); diff --git a/src/main/java/org/realtor/rets/retsapi/RETSGetObjectTransaction.java b/src/main/java/org/realtor/rets/retsapi/RETSGetObjectTransaction.java index 581ef5c..4cd5d41 100644 --- a/src/main/java/org/realtor/rets/retsapi/RETSGetObjectTransaction.java +++ b/src/main/java/org/realtor/rets/retsapi/RETSGetObjectTransaction.java @@ -16,11 +16,10 @@ import java.util.Iterator; /** * RETSGetObjectTransaction.java * + * @author jbrush * @version 1.0 - * @author jbrush */ -public class RETSGetObjectTransaction extends RETSTransaction -{ +public class RETSGetObjectTransaction extends RETSTransaction { /** * Encapsulates the RETS GetObject transaction, and provides services for * interpreting the result. As with all {@link RETSTransaction} classes, @@ -66,10 +65,11 @@ public class RETSGetObjectTransaction extends RETSTransaction setRequestVariable("Resource", str); } + /** * Sets the type attribute to the string passed in. * - * @param type type attribute value + * @param str type attribute value */ public void setType(String str) { logger.debug("set Type=" + str); @@ -82,7 +82,7 @@ public class RETSGetObjectTransaction extends RETSTransaction * @param str ID of the object */ public void setID(String str) { - if ( str != null ) { + if (str != null) { logger.debug("set ID=" + str.trim()); setRequestVariable("ID", str.trim()); } else { @@ -103,7 +103,7 @@ public class RETSGetObjectTransaction extends RETSTransaction /** * Sets the response stream. This triggers various actions depending on the * content-type of the response stream: - + *

* If the content-type is text/plain or text/xml, then assume we have a * RETS response and parse it accordingly. Note that we'll not have * anything in the RETS response except error information. (We might @@ -111,21 +111,20 @@ public class RETSGetObjectTransaction extends RETSTransaction * is that we made a request with Location=1 and the server has * responded in kind.) We still make this available, in case there *is* * something else in the response. - + *

* A content-type of multipart, with any subtype, is interpreted as a * multipart response. This is parsed to create a list of MIME parts. * Any other content type is simply made available as a single MIME part. - + *

* This method is called by {@link RETSConnection} to provide access to * the response from a transaction. You don't normally call this method * yourself. * * @param responseStream The response stream to associate with this transaction. - * @call Rarely. - * @override Rarely. You can override this method if you want to provide - * special processing of a GetObject response stream, but - * it will usually be more convenient to override one - * of the methods that handles particular MIME types. + * Rarely. You can override this method if you want to provide + * special processing of a GetObject response stream, but + * it will usually be more convenient to override one + * of the methods that handles particular MIME types. */ public void setResponseStream(InputStream responseStream) { @@ -172,8 +171,7 @@ public class RETSGetObjectTransaction extends RETSTransaction * deal with it. If not, handle as for an unknown response. * * @param responseStream The response stream containing the XML data. - * @call Only from subclasses. - * @ @override Override to provide your own handling of XML data + * Override to provide your own handling of XML data * streams. */ protected void handleXMLStream(InputStream responseStream, String mimeType, String contentType) { @@ -203,11 +201,7 @@ public class RETSGetObjectTransaction extends RETSTransaction * * @param responseStream The stream to parse. * @param mimeType The MIME type and subtype associated with the stream. - * @param contentType The Content-Type header, including the MIME type and its parameters, if any. - * @call Only from subclasses. - * @override Override to provide your own handling of MIME multipart - *

- * data. + * @param contentType The Content-Type header, including the MIME type and its parameters, if any */ protected void handleMultipartStream(InputStream responseStream, String mimeType, String contentType) { @@ -239,7 +233,7 @@ public class RETSGetObjectTransaction extends RETSTransaction setResponseStatusText("RETSAPI: I/O exception while creating multipart stream from response: " + ioException.getMessage()); } finally { // We always want at least an empty body part list. - if ( parts == null ) parts = new ArrayList(); + if (parts == null) parts = new ArrayList(); } } @@ -250,8 +244,6 @@ public class RETSGetObjectTransaction extends RETSTransaction * * @param inputBytes A byte array containing the response data. * @param contentType The content-type header. - * @call Rarely. - * @override Rarely. */ protected void makeSinglePartFromByteStream(byte[] inputBytes, String contentType) { // First, we need to gather the response headers into an InternetHeader object @@ -264,7 +256,7 @@ public class RETSGetObjectTransaction extends RETSTransaction headerName = (String) headerIterator.next(); // String headerContent = (String) getResponseHeaderMap().get(headerName); headerContent = getResponseHeaderMap().get(headerName); - if ( headerContent != null ) + if (headerContent != null) originalHeaders.addHeader(headerName, headerContent.toString()); } parts = new ArrayList(1); // We may not have *any*, but we won't have more than 1. @@ -286,10 +278,8 @@ public class RETSGetObjectTransaction extends RETSTransaction * @param responseStream The stream to parse. * @param mimeType The MIME type and subtype associated with the stream. * @param contentType The Content-Type header, including the MIME type and its parameters, if any. - * @call Only from subclasses. - * @override Override to provide your own handling of data with special - *

- * MIME types. + *

+ * MIME types. */ protected void handleStreamWithType(InputStream responseStream, String mimeType, String contentType) { try { @@ -306,7 +296,7 @@ public class RETSGetObjectTransaction extends RETSTransaction * Returns the count of retrieved objects. */ public int getObjectCount() { - if ( parts == null ) return 0; + if (parts == null) return 0; return parts.size(); } @@ -325,7 +315,7 @@ public class RETSGetObjectTransaction extends RETSTransaction * @param objectIndex The index of the object to retrieve. */ public MimeBodyPart partAtIndex(int objectIndex) { - if ( parts == null || objectIndex < 0 || objectIndex >= parts.size() ) + if (parts == null || objectIndex < 0 || objectIndex >= parts.size()) return null; return (MimeBodyPart) parts.get(objectIndex); } @@ -334,7 +324,7 @@ public class RETSGetObjectTransaction extends RETSTransaction InputStream inputStream = null; MimeBodyPart part = this.partAtIndex(objectIndex); try { - if ( part != null ) { + if (part != null) { Object content = part.getContent(); inputStream = (InputStream) content; logger.debug("--- MimeBodyPart Content--> " + content); diff --git a/src/main/java/org/realtor/rets/retsapi/RETSSearchAgentTransaction.java b/src/main/java/org/realtor/rets/retsapi/RETSSearchAgentTransaction.java index 9ded199..aea1b29 100644 --- a/src/main/java/org/realtor/rets/retsapi/RETSSearchAgentTransaction.java +++ b/src/main/java/org/realtor/rets/retsapi/RETSSearchAgentTransaction.java @@ -23,7 +23,7 @@ public class RETSSearchAgentTransaction extends RETSSearchTransaction { /** Search by last name, pass in the lastname of a user * as the "query" argument. - * @param searchByLastName lastname of the user to search. + * @param searchByLastname lastname of the user to search. */ public void setSearchByLastname(String searchByLastname) { // convert to DMQL