com.qoppa.pdf
Class TimestampServer

java.lang.Object
  extended by com.qoppa.pdf.TimestampServer

public class TimestampServer
extends Object

This class is used to setup a timestamp server to use when applying a digital signature. When a digital signature is applied to a PDF document, it is possible to get the signature time stamp from a certified timestamp server. Use this class to pass the timestamp server information to the signing process inside SigningInformation.

Author:
Qoppa Software

Constructor Summary
TimestampServer(String serverURL, String user, String pwd)
          Construct a time stamp server object.
TimestampServer(String serverURL, String user, String pwd, String name)
          Construct a time stamp server object.
 
Method Summary
 String getDisplayName()
          Return the display name.
 int getLengthEstimate()
          Returns a length estimate of the time stamp server signature.
 String getPWD()
          Return the password that will be used to log into the time stamp server.
 String getServerURL()
          Return the time stamp server URL.
 String getUser()
          Return the user name to log into the time stamp server.
 void setDisplayName(String name)
          Set the display name.
 void setLengthEstimate(int estimate)
          Set the length estimate for the size of the time stamp server signature.
 void setPassword(String password)
          Set the password.
 void setServerURL(String url)
          Set the time stamp server URL.
 void setUserName(String username)
          Set the user name;
 String toString()
          Returns the display name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimestampServer

public TimestampServer(String serverURL,
                       String user,
                       String pwd)
Construct a time stamp server object. This object is used when applying a digital signature to a PDF. It contains information about the time stamp server and its login so that a time stamp can be requested and retrieved at the time of signing. To use the server, it has to be set in the SigningInformation object by calling its setTimeStampServer() method.


TimestampServer

public TimestampServer(String serverURL,
                       String user,
                       String pwd,
                       String name)
Construct a time stamp server object. This object is used when applying a digital signature to a PDF. It contains information about the time stamp server and its login so that a time stamp can be requested and retrieved at the time of signing. To use the server, it has to be set in the SigningInformation object by calling its setTimeStampServer() method.

Method Detail

getServerURL

public String getServerURL()
Return the time stamp server URL.

Returns:
The time stamp server URL.

setServerURL

public void setServerURL(String url)
Set the time stamp server URL.

Parameters:
url -

getUser

public String getUser()
Return the user name to log into the time stamp server.

Returns:
The user name to use to log into the time stamp server.

setUserName

public void setUserName(String username)
Set the user name;

Parameters:
username -

getPWD

public String getPWD()
Return the password that will be used to log into the time stamp server.

Returns:
The password to log into the time stamp server.

setPassword

public void setPassword(String password)
Set the password.

Parameters:
password -

getLengthEstimate

public int getLengthEstimate()
Returns a length estimate of the time stamp server signature. This is set to a default of 5000 bytes, and is used for padding when creating the digital signature. This can be overriden by the host application to use a smaller or larger number if the size of the time stamp signature from the time stamp server is well known.

Returns:
The current length estimate.

setLengthEstimate

public void setLengthEstimate(int estimate)
Set the length estimate for the size of the time stamp server signature.

Parameters:
estimate - The new estimate, to use when padding the digital signature.

getDisplayName

public String getDisplayName()
Return the display name. This is an alias to identify the server and may be null.

Returns:
The display name for the server

setDisplayName

public void setDisplayName(String name)
Set the display name. This is an alias to identify the server.

Parameters:
name -

toString

public String toString()
Returns the display name.

Overrides:
toString in class Object