ccs.cpc.impl
Class ArchLogic

java.lang.Object
  extended by ccs.cpc.impl.ArchLogic

public class ArchLogic
extends java.lang.Object

Methods for opening and creating archives and jars / zips. Due to the variety of access mechanisms available, these are rather fragmented.


Constructor Summary
ArchLogic(CpcImpl cpc)
           
 
Method Summary
(package private)  void compactArchive(ccs.cdb.CDBeeTree bt, boolean isChg)
          Comapct an archive, with optional password change (not CDBs).
(package private)  java.io.File determineDefaultDirectory(BrowserLogic bl)
          Returns the default folder to start in when looking for the location of an archive; this is the current folder of the device in the specified browser panel, which is required to be a disk vdevice.
(package private)  void getArchFile(ArchLoadData ald, BrowserLogic bl)
          Return the location of the new or current archive.
(package private)  void getArchPassword(ArchLoadData ald)
          Obtain the user's attempt at a password.
(package private)  void mangleArchPassword(byte[] pwd)
          Lightly mangle the supplied password.
(package private)  void openArchive(ArchLoadData ald, BrowserLogic bl)
          Open the archive represented by the specified data, in the specified browser.
(package private)  void openZip(java.io.File zipf, BrowserLogic bl, boolean isTransient)
          Open a zip.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArchLogic

ArchLogic(CpcImpl cpc)
Method Detail

openArchive

void openArchive(ArchLoadData ald,
                 BrowserLogic bl)
           throws java.io.IOException
Open the archive represented by the specified data, in the specified browser. Shared between the three access routes - Do|Open, the archive-opener viewer, and the command-line args processor. Not applicable to CDBs.

Throws:
java.io.IOException - on I/O failure or wrong password (CipherException).

compactArchive

void compactArchive(ccs.cdb.CDBeeTree bt,
                    boolean isChg)
              throws ccs.ArghException,
                     ccs.LoseException,
                     java.io.IOException
Comapct an archive, with optional password change (not CDBs).

Parameters:
bt - The BeeTree to compact. If isChg, caller must ensure that it isn't a CDB.
isChg - Whether to change the password (not CDBs).
Throws:
ccs.ArghException
ccs.LoseException
java.io.IOException

determineDefaultDirectory

java.io.File determineDefaultDirectory(BrowserLogic bl)
                                 throws java.lang.IllegalStateException
Returns the default folder to start in when looking for the location of an archive; this is the current folder of the device in the specified browser panel, which is required to be a disk vdevice.

Throws:
java.lang.IllegalStateException - if not in a disk device.

getArchFile

void getArchFile(ArchLoadData ald,
                 BrowserLogic bl)
           throws java.lang.IllegalStateException,
                  java.lang.InterruptedException
Return the location of the new or current archive.

Parameters:
ald - The ArchLoadData (or ArchCreateData) to return the result in.
bl - The browser containing the folder to start from.
Throws:
java.lang.IllegalStateException - if not in a disk device.
java.lang.InterruptedException - If user cancels.

getArchPassword

void getArchPassword(ArchLoadData ald)
               throws java.lang.InterruptedException
Obtain the user's attempt at a password. Used for both create, and all arch-open routes where required.

Throws:
java.lang.InterruptedException - If user cancels.

mangleArchPassword

void mangleArchPassword(byte[] pwd)
Lightly mangle the supplied password. It was formerly thought important for various (marketing?) reasons that it shouldn't be easy to register an Archive with Checkpoint without going through the proper registration process. The reasons for this desideratum are now lost in the mists; the legacy remains as a backward-compatibilty wartlet.


openZip

void openZip(java.io.File zipf,
             BrowserLogic bl,
             boolean isTransient)
       throws java.io.IOException
Open a zip.

Throws:
java.io.IOException