org.illeva.jordino.answer
Class Ping

java.lang.Object
  extended byorg.illeva.jordino.answer.Response
      extended byorg.illeva.jordino.answer.Ping

public class Ping
extends org.illeva.jordino.answer.Response


Field Summary
protected  java.lang.String dAction
           
protected  java.lang.StringBuffer dBuff
          This is the buffer to add the message text.
protected  java.lang.String dPassword
           
protected  int dStatus
           
protected  java.lang.String dUser
           
 
Constructor Summary
Ping(javax.mail.internet.MimeMessage aMsg)
           
 
Method Summary
protected  javax.mail.internet.MimeBodyPart addTextPart()
          Build the text message whith header, body and footer part.
protected  javax.mail.Multipart buildMessage()
          This method create a MimeMultipart object and adds to it the text part of message.
protected  boolean checkUserPassword()
           
protected  boolean checkUserPermission()
          Return true if the user can perform the operations.
 java.lang.String getCommand()
          Extract the part of subject that is the command to Jordino!
protected  java.lang.String getOperationPermission()
          Return the string rappresentation of permission to perform the specific response.
 int getStatus()
          Return the object status.
protected  java.lang.String parseEngine(java.lang.String aLine)
           
protected  void prepareTextBody()
           
protected  void prepareTextFooter()
          Puts a foother to body text.
protected  void prepareTextHeader()
          Puts an header to body text.
protected  void translateFrom()
          By default the sender is the receiver of answer.
protected  void translateSubject()
          Build the subject of answer removing the Jordino command at the and of original subject and prefix itself with "jdR: " string.
protected  void translateTo()
          By default the receiver of response is the sender of answer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dStatus

protected int dStatus

dBuff

protected java.lang.StringBuffer dBuff
This is the buffer to add the message text.

Since:
Version 1.0

dUser

protected java.lang.String dUser

dPassword

protected java.lang.String dPassword

dAction

protected java.lang.String dAction
Constructor Detail

Ping

public Ping(javax.mail.internet.MimeMessage aMsg)
Method Detail

prepareTextBody

protected void prepareTextBody()

getCommand

public java.lang.String getCommand()
Extract the part of subject that is the command to Jordino!

Returns:
The command in the subject of message.
Since:
Version 1.0

getStatus

public int getStatus()
Return the object status. If value is 0 then the object is Ok!

Returns:
Status of object.
Since:
Version 1.0

translateTo

protected void translateTo()
                    throws javax.mail.MessagingException
By default the receiver of response is the sender of answer. In the base class this method is empty.

Throws:
javax.mail.MessagingException
Since:
Version 1.0

translateFrom

protected void translateFrom()
                      throws javax.mail.MessagingException
By default the sender is the receiver of answer. In the base class this method is empty.

Throws:
javax.mail.MessagingException
Since:
Version 1.0

translateSubject

protected void translateSubject()
                         throws javax.mail.MessagingException
Build the subject of answer removing the Jordino command at the and of original subject and prefix itself with "jdR: " string.

Throws:
javax.mail.MessagingException
Since:
Version 1.0

prepareTextHeader

protected void prepareTextHeader()
Puts an header to body text.

Since:
Version 1.0

prepareTextFooter

protected void prepareTextFooter()
Puts a foother to body text.

Since:
Version 1.0

addTextPart

protected javax.mail.internet.MimeBodyPart addTextPart()
Build the text message whith header, body and footer part.

Since:
Version 1.0

buildMessage

protected javax.mail.Multipart buildMessage()
This method create a MimeMultipart object and adds to it the text part of message.

Since:
Version 1.0

getOperationPermission

protected java.lang.String getOperationPermission()
Return the string rappresentation of permission to perform the specific response. The default value is "PUBLIC" that means no grants are required.

Since:
Version 1.0

checkUserPermission

protected boolean checkUserPermission()
Return true if the user can perform the operations.

Since:
Version 1.0

checkUserPassword

protected boolean checkUserPassword()

parseEngine

protected java.lang.String parseEngine(java.lang.String aLine)