I’ve been keeping busy. The first installment of the application is about done. I am way ahead of my schedul, and I am very happy with the results so far. Here are the completed features:
- Open Keystore (works automatically for any supported type)
- Save Keystore
- Save KeyStore As…
- Close KeyStore
- New KeyStore
- Delete Key Entry
That doesn’t sound like much, and over all, those tasks were easy. It was getting an architecture in place that allows me to write the actual “functional” code quickly. Here is what I’ve done on the architecture side:
- Configurable Action Definitions - a HashMap of all the Action classes loaded up at startup into a HashMap.
- Config - central Configuration management. Allows for a “default” implementation, and a user specific.
- Centralized Application State - a Central repository for all information, using String keys to access individual properties (again, a HashMap). The ApplicationState object also uses the Observer pattern (Using JFace’s Listener Interface) to facilitate notification of state cahgne to all interested components.
- TableViewer implementation - This is the central “view” of the app, and as such is central to the whole program.
Unfortunately, I feel that I am not quite doing the TableViewer right yet. The TableViewer widget is pretty complex as far as SWT/JFace goes. I’ve had to create a lot of helper and anonymous inner classes to handle things that I was hoping the TableViewer would handle itself, such as defining a Sorting mechanism for each column. It *should* (in my opinion) be as easy as
tableViewer.getColumn(index).setSorter(new MySorter())
Instead, it is like this:
col1.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
table.setSorter(new KeysTableSorter(Constants.KeyTypeColumn));
main.fireEvent(Constants.RefreshAction);
}
});
… with the KeysTableSorter helper class handling all of the comparisons. I am OK with a small helper class now and then, but when you are dealing with simple data types (String, int, and java.util.Date), I would think that there could be a general purpose sorter for each type. It should only be necessary to create your own sorter when you have peculiar data going into the column.
Anyway, enough ranting. Here are the new screenshots:

JKeyManager when first opened. Note all of the disabled icons.

JKeyManger after KeyStore is opened
I still have a few more items (important ones) that need to be handled before I release:
- KeyPair / Certificate generation
- Import / Export of Certificates, PrivateKeys (X.509 and PKCS12)
- Somewhat optional: SecretKey generation - this is a really triky one, so I’m not sure what type of support it will have right now
- Key Details Viewer - this one I’m not sure how much I can do right now… there may be no viewer at all
And last but definetly not least:
- Documentation
- Release / Install packaging