[Comsuite-svn] SF.net SVN: comsuite: [218] trunk/code
Brought to you by:
zduniak
|
From: <mal...@us...> - 2006-11-16 22:00:59
|
Revision: 218
http://svn.sourceforge.net/comsuite/?rev=218&view=rev
Author: malinowskirafal
Date: 2006-11-16 14:00:24 -0800 (Thu, 16 Nov 2006)
Log Message:
-----------
javaDoc updates
Modified Paths:
--------------
trunk/code/CSCommon/src/org/commsuite/enums/State.java
trunk/code/CSMiddleware/src/org/commsuite/converter/Conversion.java
trunk/code/CSMiddleware/src/org/commsuite/converter/ImageToImageConverterDescriptor.java
trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverter.java
trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverterDescriptor.java
trunk/code/CSMiddleware/src/org/commsuite/converter/TiffToPdfConverter.java
trunk/code/CSMiddleware/src/org/commsuite/converter/utils/openoffice/XByteArrayInputStream.java
trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java
trunk/code/CSMiddleware/src/org/commsuite/devices/OutboundMessage.java
trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxInboundMessage.java
trunk/code/CSMiddleware/src/org/commsuite/devices/fax/polling/ReceivePollingJob.java
trunk/code/CSMiddleware/src/org/commsuite/devices/sms/ReceivePollingJob.java
trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java
trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsOutboundMessage.java
trunk/code/CSMiddleware/src/org/commsuite/messaging/AbstractMessageConsumer.java
trunk/code/CSMiddleware/src/org/commsuite/notification/AbstractNotificationConsumer.java
trunk/code/CSMiddleware/src/org/commsuite/queue/IQueueManager.java
Modified: trunk/code/CSCommon/src/org/commsuite/enums/State.java
===================================================================
--- trunk/code/CSCommon/src/org/commsuite/enums/State.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSCommon/src/org/commsuite/enums/State.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -27,6 +27,13 @@
* If any of sentContent's status is FAILED then whole message is in FAILED state and notification
* to SAP server is sent.
*
+ * <ul>
+ * <li><code>NOT_SENT</code> sentContent is waiting in one of system queue to send</li>
+ * <li><code>SENT</code> sentContent was sent by device class to external device (mobile) or external program (HylaFAX)</li>
+ * <li><code>DELIVERED</code> sentContent was delivered to receiver</li>
+ * <li><code>FAILED</code> external device/program failed to deliver sentContent to receiver</li>
+ * </ul>
+ *
* @since 1.0
* @author Rafał Malinowski
*/
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/Conversion.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/Conversion.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/Conversion.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -43,6 +43,8 @@
}
/**
+ * Returns mime type of input data of conversion.
+ *
* @return mime type of input data of conversion
*/
public String getInMimeType() {
@@ -50,6 +52,8 @@
}
/**
+ * Returns mime type of output data of conversion.
+ *
* @return mime type of output data of conversion
*/
public String getOutMimeType() {
@@ -57,12 +61,20 @@
}
/**
+ * Returns true if no conversion is needed - in mime type is equal to out mime type.
+ *
* @return true if no conversion is needed - in mime type is equal to out mime type
*/
public boolean isIdentity() {
return inMimeType.equals(outMimeType);
}
+ /**
+ * Returns true if this object is equal to passed object (if inMimeType and outMimeType are equal).
+ *
+ * @param to object to compare with
+ * @return true if this object is equal to passed object
+ */
public boolean equals(Object to) {
if (null == to) {
return false;
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/ImageToImageConverterDescriptor.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/ImageToImageConverterDescriptor.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/ImageToImageConverterDescriptor.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -78,6 +78,7 @@
/**
* Creates ImageToImageConverter that converts image to image in outType (set in constructor).
+ *
* @return ImageToImageConverter that converts image to image in outType (set in constructor).
*/
public SimpleConverter createSimpleConverter() {
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverter.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverter.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverter.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -62,6 +62,8 @@
}
/**
+ * Returns stream of input data for conversion.
+ *
* @return stream of input data for conversion
*/
protected InputStream getContentStream() {
@@ -69,6 +71,8 @@
}
/**
+ * Returns stream of output data of conversion.
+ *
* @return stream of output data of conversion
*/
protected OutputStream getResultStream() {
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverterDescriptor.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverterDescriptor.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/SimpleConverterDescriptor.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -78,6 +78,7 @@
/**
* Returns list of mime types that described converter can convert from.
+ *
* @return list of mime types that described converter can convert from
*/
public List<String> getInMimeTypes() {
@@ -86,6 +87,7 @@
/**
* Returns true if described converter can convert from inMimeType.
+ *
* @param inMimeType checked mime type.
* @return true if described converter can convert from inMimeType
*/
@@ -95,6 +97,7 @@
/**
* Returns mime type that described converter can convert to.
+ *
* @return mime type that described converter can convert to
*/
public String getOutMimeType() {
@@ -103,6 +106,7 @@
/**
* Sets new quality for conversion.
+ *
* @param quality new quality for conversion
*/
public void setQuality(double quality) {
@@ -111,6 +115,7 @@
/**
* Returns quality of conversion.
+ *
* @return quality of conversion
*/
public double getQuality() {
@@ -119,6 +124,7 @@
/**
* Creates real converter object.
+ *
* @return real converter object
*/
public abstract SimpleConverter createSimpleConverter();
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/TiffToPdfConverter.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/TiffToPdfConverter.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/TiffToPdfConverter.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -163,7 +163,8 @@
/**
* Creates PDFInfo from Tiff tags - readed at readTags.
- * @return pdf info
+ *
+ * @return pdf info in form od PDFInfo object
*/
private PDFInfo createPDFInfoFromTags() {
PDFInfo pdfinfo = new PDFInfo();
Modified: trunk/code/CSMiddleware/src/org/commsuite/converter/utils/openoffice/XByteArrayInputStream.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/converter/utils/openoffice/XByteArrayInputStream.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/converter/utils/openoffice/XByteArrayInputStream.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -54,6 +54,8 @@
* Moves internal pointer to p1 position.
*
* @param p1 new internal pointer position.
+ * @throws IllegalArgumentException when p1 is too small or too big
+ * @throws com.sun.star.io.IOException when IOException occurs
*/
public void seek(long p1) throws IllegalArgumentException,
com.sun.star.io.IOException {
@@ -64,6 +66,7 @@
* Returns internal pointer position.
*
* @return internal pointer position
+ * @throws com.sun.star.io.IOException when IOException occurs
*/
public long getPosition() throws com.sun.star.io.IOException {
return pos;
@@ -73,6 +76,7 @@
* Returns length of data array.
*
* @returns length of data array
+ * @throws com.sun.star.io.IOException when IOException occurs
*/
public long getLength() throws com.sun.star.io.IOException {
return count;
@@ -84,6 +88,9 @@
* @param p1 output data array
* @param p2 max length of data read
* @return count of bytes actually read
+ * @throws NotConnectedException when application is not connected to OOo server
+ * @throws BufferSizeExceededException when buffer size was exceeded in output stream
+ * @throws com.sun.star.io.IOException when IOException occurs
*/
public int readBytes(byte[][] p1, int p2) throws NotConnectedException,
BufferSizeExceededException, com.sun.star.io.IOException {
@@ -113,6 +120,9 @@
* @param p1 output data array
* @param p2 max length of data read
* @return count of bytes actually read
+ * @throws NotConnectedException when application is not connected to OOo server
+ * @throws BufferSizeExceededException when buffer size was exceeded in output stream
+ * @throws com.sun.star.io.IOException when IOException occurs
*/
public int readSomeBytes(byte[][] p1, int p2) throws NotConnectedException,
BufferSizeExceededException, com.sun.star.io.IOException {
@@ -121,16 +131,32 @@
/**
* Skips some bytes from data array.
+ *
+ * @param p1 number of bytes to skip
+ * @throws NotConnectedException when application is not connected to OOo server
+ * @throws BufferSizeExceededException when buffer size was exceeded in output stream
+ * @throws com.sun.star.io.IOException when IOException occurs
*/
public void skipBytes(int p1) throws NotConnectedException,
BufferSizeExceededException, com.sun.star.io.IOException {
skip(p1);
}
+ /**
+ * Returns how many available bytes are ready to read in stream.
+ *
+ * @return how many available bytes are ready to read in stream
+ */
public int available() {
return super.available();
}
+ /**
+ * Closes input stream.
+ *
+ * @throws NotConnectedException when application is not connected to OOo server
+ * @throws com.sun.star.io.IOException when IOException occurs
+ */
public void closeInput() throws NotConnectedException,
com.sun.star.io.IOException {
try {
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/Device.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -160,7 +160,7 @@
}
/**
- * Sends simpel message to receiver. Saves send status into database.
+ * Sends simple message to receiver. Saves send status into database.
*
* @param sentContent sentContent to send
* @param receiver destination address
@@ -247,6 +247,8 @@
/**
* Adds new listener of receiving messages.
+ *
+ * @param receiveListener new receive listener
*/
public void addReceiveListener(ReceiveListener receiveListener) {
synchronized (receiveListeners) {
@@ -256,6 +258,8 @@
/**
* Removes listener of receiving messages.
+ *
+ * @param receiveListener receive listener to remove
*/
public void removeReceiveListener(ReceiveListener receiveListener) {
synchronized (receiveListeners) {
@@ -265,6 +269,8 @@
/**
* Adds new listener of chaning outbound message state.
+ *
+ * @param sendStateChangeListener new sent state change listener
*/
public void addSendStateChangeListener(SendStateChangeListener sendStateChangeListener) {
synchronized (sendStateChangeListeners) {
@@ -274,6 +280,8 @@
/**
* Removes listener ofchaning outbound message state.
+ *
+ * @param sent state change listener to remove
*/
public void removeSendStateChangeListener(SendStateChangeListener sendStateChangeListener) {
synchronized (sendStateChangeListeners) {
@@ -283,6 +291,8 @@
/**
* Sets state of device.
+ *
+ * @param state new state of device
*/
protected void setState(State state) {
this.state = state;
@@ -290,6 +300,8 @@
/**
* Returns state of device.
+ *
+ * @return state of device
*/
public State getState() {
return state;
@@ -297,6 +309,8 @@
/**
* Stub. Return unique name of device. It will be something like "Fax0001" "Fax0002".
+ *
+ * @return unique name of device
*/
public String getName() {
return name;
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/OutboundMessage.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/OutboundMessage.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/OutboundMessage.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -60,8 +60,7 @@
/**
* Creates new outbound message.
*
- * @param device
- * device which will send this message.
+ * @param device device which will send this message.
*/
public OutboundMessage(Device device) {
this.device = device;
@@ -126,8 +125,7 @@
/**
* Sets message mime type.
*
- * @param contentMimeType
- * mime type to set
+ * @param contentMimeType mime type to set
* @return true if given mime type is supported
*/
public boolean setContentMimeType(String contentMimeType) {
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxInboundMessage.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxInboundMessage.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/fax/FaxInboundMessage.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -49,6 +49,13 @@
/**
* FaxDevice creates it after notification of new received Fax.
*
+ * @param device device receiving this message
+ * @param hylaFaxClient HylaFAX Client receiving this message
+ * @param messageId unique HylaFAX message id
+ * @param sourceAddress address of sender
+ * @param destinationAddress address of receiver
+ * @param contentMimeType mime type of message content
+ * @param fileName HylaFAX's FTP filename
* @throws FaxInboundMessageCreateException when inbound message is invalid, fax server's response is invalid, or fax server's response cannot be convered to pdf
*/
public FaxInboundMessage(FaxDevice device, HylaFAXClient hylaFaxClient, String messageId, String sourceAddress, String destinationAddress, String contentMimeType,
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/fax/polling/ReceivePollingJob.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/fax/polling/ReceivePollingJob.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/fax/polling/ReceivePollingJob.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -75,6 +75,7 @@
*
* @see FaxDevice#notifyReceive(org.comsuite.devices.InboundMessage)
* @param context job context, contains FaxDevice
+ * @throws JobExecutionException when any instruction of function fails
*/
public void execute(JobExecutionContext context) throws JobExecutionException {
final FaxDevice faxDevice = (FaxDevice) context.getJobDetail().getJobDataMap().get("FaxDevice");
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/sms/ReceivePollingJob.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/sms/ReceivePollingJob.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/sms/ReceivePollingJob.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -28,6 +28,7 @@
* @see FaxDevice.notifyReceive
* @param context
* job context, contains SmsDevice
+ * @throws JobExecutionException when any instruction of function fails
*/
public void execute(JobExecutionContext context) throws JobExecutionException {
// logger.info("execute");
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsDevice.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -290,6 +290,7 @@
/**
* Sends message throught GSM modem. Message can only have plain/text data.
*
+ * @param message message to send
* @throws DeviceInvalidOutboundMessageException
* message was created on another device
* @throws OutboundMessageInvalidContentMimeTypeException
Modified: trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsOutboundMessage.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsOutboundMessage.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/devices/sms/SmsOutboundMessage.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -20,7 +20,6 @@
*/
package org.commsuite.devices.sms;
-import java.util.ArrayList;
import java.util.List;
import javolution.util.FastTable;
Modified: trunk/code/CSMiddleware/src/org/commsuite/messaging/AbstractMessageConsumer.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/messaging/AbstractMessageConsumer.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/messaging/AbstractMessageConsumer.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -27,6 +27,8 @@
import org.commsuite.util.SpringMiddlewareContext;
/**
+ * Abstract message consumer is a class that can consume object of Message class from ActiveMQ queues.
+ *
* @since 1.0
* @author Marcin Zduniak
*/
@@ -34,6 +36,9 @@
private final static Logger logger = Logger.getLogger(AbstractMessageConsumer.class);
+ /**
+ * Creates new AbstractMessageConsumer.
+ */
public AbstractMessageConsumer() {
super(Message.class);
}
@@ -42,6 +47,11 @@
public abstract Status getMessageSentStatus();
+ /**
+ * Calls consumeMessage function. Before and after that it updates message status in database.
+ *
+ * @param obj Message object
+ */
public final boolean consumeQueueMessage(Object obj) {
// AbstractQueueMessageConsumer:47 - checking for object type
Message csMessage = (Message)obj;
@@ -72,6 +82,11 @@
return errorWhileConsumption;
}
+ /**
+ * Consumes Message object.
+ *
+ * @param msg Message object
+ */
public abstract void consumeMessage(Message msg);
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/notification/AbstractNotificationConsumer.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/notification/AbstractNotificationConsumer.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/notification/AbstractNotificationConsumer.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -81,6 +81,11 @@
return errorWhileConsumption;
}
+ /**
+ * Consumes notifications.
+ *
+ * @param notification Notification object
+ */
public abstract void consumeNotification(Notification notification);
}
Modified: trunk/code/CSMiddleware/src/org/commsuite/queue/IQueueManager.java
===================================================================
--- trunk/code/CSMiddleware/src/org/commsuite/queue/IQueueManager.java 2006-11-11 16:06:44 UTC (rev 217)
+++ trunk/code/CSMiddleware/src/org/commsuite/queue/IQueueManager.java 2006-11-16 22:00:24 UTC (rev 218)
@@ -40,6 +40,7 @@
/**
* Atomicaly creates new queue with given name and associates it with consumer consumer.
+ *
* @param queueName name of queue
* @param consumer queue consumer
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|