All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.download.CertificateBlock

java.lang.Object
   |
   +----semper.download.CertificateBlock

public class CertificateBlock
extends Object
implements Serializable
The CertificateBlock module defines all the data types and the associated methods in order to keep version characteristics for a package.

Version:
$Revision: 1.6 $ $Date: 1998/08/20 09:28:50 $
Author:
Petros Pantis, Kostas Tzelepis

Constructor Index

 o CertificateBlock(Credentials, String, long, Vector)
Creates a new Certificate Block

Method Index

 o checkCredential()
Checks if the certificate block credentials are valid
 o checkFiles()
Checks if the package name is declared in the certificate block credentials
 o checkSignature()
Checks the certificate block signature
 o createSignature()
Creates the signature of all the files contained in the package plus the package's relative path name and the version number
 o Differences(CertificateBlock, Vector[])
This method compares two certificate blocks and informs the callee about the differences
 o getCredentials()
Retrieves the certificate block credentials
 o getFileList()
 o getIdentifier()
Retieves the certificate block identifier
 o getPath()
Retrieves the relative path name of the certificate block package
 o getSequence()
Method which returns the file(s) contained in a certificate block
 o getVersion()
Retrieves the version number of the certificate block
 o isSame(CertificateBlock)
Compares two certificate blocks for credential equality
 o printSelf()
Method for debugging reasons
 o updateVersion(long)
Updates the version number of the certificate block

Constructors

 o CertificateBlock
 public CertificateBlock(Credentials cred,
                         String path,
                         long version,
                         Vector fileData)
Creates a new Certificate Block

Parameters:
cred - the associated credentials object
path - the relative directory name of the package
version - the version number for the package
fileData - a collection of file(s)-characteristics contained in a package

Methods

 o getSequence
 public Vector getSequence()
Method which returns the file(s) contained in a certificate block

Returns:
value a vector object of file(s)-characteristics
 o Differences
 public boolean Differences(CertificateBlock certBlock,
                            Vector diffs[])
This method compares two certificate blocks and informs the callee about the differences

Parameters:
certBlock - the second certificate block. This certificate block will be compared with the current
diffs - all differences are added in this array
Returns:
value returns true if changes are found
 o checkSignature
 public boolean checkSignature()
Checks the certificate block signature

Returns:
value true if the signature is valid
 o createSignature
 public boolean createSignature()
Creates the signature of all the files contained in the package plus the package's relative path name and the version number

Returns:
value true on success
 o checkCredential
 public boolean checkCredential()
Checks if the certificate block credentials are valid

 o isSame
 public int isSame(CertificateBlock cbl)
Compares two certificate blocks for credential equality

Parameters:
cbl - the other certificate block object
Returns:
value returns the state of the passed credentials
 o getCredentials
 public Credentials getCredentials()
Retrieves the certificate block credentials

Returns:
value credentials contained in the certificate block
 o updateVersion
 public void updateVersion(long newVer)
Updates the version number of the certificate block

Parameters:
newVer - the new version number
 o getVersion
 public long getVersion()
Retrieves the version number of the certificate block

Returns:
value the version number
 o getPath
 public String getPath()
Retrieves the relative path name of the certificate block package

Returns:
value the path name
 o getIdentifier
 public String getIdentifier()
Retieves the certificate block identifier

Returns:
value the certificate block identifier
 o checkFiles
 public boolean checkFiles()
Checks if the package name is declared in the certificate block credentials

Returns:
value true on success
 o printSelf
 public void printSelf()
Method for debugging reasons

 o getFileList
 public Vector getFileList()

All Packages  Class Hierarchy  This Package  Previous  Next  Index