|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.fullspan.pwkeep.persist.PwkFileMgr
public class PwkFileMgr
This class manages the persistence of the PWKeep data. It handles the following tasks:
| Field Summary | |
|---|---|
static java.lang.String |
CHARSET_ENCODING
|
static java.lang.String |
FILE_EXTENSION
|
static java.lang.String |
FILE_EXTENSION_WITH_DOT
|
static java.lang.String |
FILE_FORMAT_VERSION
|
static java.lang.String |
TAG_CATEGORIES
|
static java.lang.String |
TAG_CATEGORY
|
static java.lang.String |
TAG_COMMENTS
|
static java.lang.String |
TAG_CRYPTOMARKER
|
static java.lang.String |
TAG_ENCRYPTED
|
static java.lang.String |
TAG_ITEM
|
static java.lang.String |
TAG_ITEMS
|
static java.lang.String |
TAG_NAME
|
static java.lang.String |
TAG_PASSWORD
|
static java.lang.String |
TAG_PWKEEP
|
static java.lang.String |
TAG_SALT
|
static java.lang.String |
TAG_URL
|
static java.lang.String |
TAG_VERSION
|
| Constructor Summary | |
|---|---|
PwkFileMgr(java.lang.String passphrase)
Create a new file manager with the specified passphrase. |
|
| Method Summary | |
|---|---|
static org.jdom.output.XMLOutputter |
getXMLOutputter()
|
static void |
jdomDocToModel(org.jdom.Document jdomDoc,
PwkTreeModel treeModel)
Transforms a JDOM document to a tree model. |
boolean |
loadFile(java.io.File file,
PwkTreeModel treeModel)
Loads the file and decrypts it, using the passphrase associated with this file manager. |
static void |
modelToJdomDoc(javax.swing.tree.DefaultMutableTreeNode startNode,
org.jdom.Element startElem)
Transforms a tree model (or part of a tree model) to JDOM document. |
static org.jdom.Document |
modelToJdomDoc(PwkTreeModel treeModel)
Transforms a tree model to a JDOM document. |
static void |
outputXML(PwkTreeModel treeModel,
java.io.Writer writer)
Outputs the tree model in XML format to the specified writer. |
void |
saveFile(PwkTreeModel treeModel,
java.io.File file)
Saves and encrypts the file, using the passphrase associated with this file manager. |
static void |
transform(PwkTreeModel treeModel,
javax.xml.transform.stream.StreamSource styleSheetSource,
javax.xml.transform.Result result)
Transforms a tree model using an XSLT stylesheet. |
static void |
transform(PwkTreeModel treeModel,
javax.xml.transform.stream.StreamSource styleSheetSource,
javax.xml.transform.Result result,
java.util.Map extraAttribMap)
Transforms a tree model using an XSLT stylesheet. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TAG_CATEGORIES
public static final java.lang.String TAG_CATEGORY
public static final java.lang.String TAG_COMMENTS
public static final java.lang.String TAG_CRYPTOMARKER
public static final java.lang.String TAG_ENCRYPTED
public static final java.lang.String TAG_ITEM
public static final java.lang.String TAG_ITEMS
public static final java.lang.String TAG_NAME
public static final java.lang.String TAG_PASSWORD
public static final java.lang.String TAG_PWKEEP
public static final java.lang.String TAG_SALT
public static final java.lang.String TAG_URL
public static final java.lang.String TAG_VERSION
public static final java.lang.String FILE_FORMAT_VERSION
public static final java.lang.String FILE_EXTENSION
public static final java.lang.String FILE_EXTENSION_WITH_DOT
public static final java.lang.String CHARSET_ENCODING
| Constructor Detail |
|---|
public PwkFileMgr(java.lang.String passphrase)
throws PwkException
passphrase - the passphrase for this file manager
PwkException| Method Detail |
|---|
public static void jdomDocToModel(org.jdom.Document jdomDoc,
PwkTreeModel treeModel)
public static void modelToJdomDoc(javax.swing.tree.DefaultMutableTreeNode startNode,
org.jdom.Element startElem)
startNode - the starting node in the tree to transformstartElem - the starting element in the JDOM document under which
the new document elements should be addedpublic static org.jdom.Document modelToJdomDoc(PwkTreeModel treeModel)
public static void transform(PwkTreeModel treeModel,
javax.xml.transform.stream.StreamSource styleSheetSource,
javax.xml.transform.Result result)
throws PwkException
transform(treeModel, styleSheetSource, result, null).
PwkExceptiontransform(PwkTreeModel, StreamSource, Result, Map)
public static void transform(PwkTreeModel treeModel,
javax.xml.transform.stream.StreamSource styleSheetSource,
javax.xml.transform.Result result,
java.util.Map extraAttribMap)
throws PwkException
Optionally, extra attributes can be specified as String-Object pairs
in the extraAttribMap. These attributes are made available
to be used by XSLT param elements.
treeModel - the model to transformstyleSheetSource - the XSLT stylesheetresult - the result of the transformextraAttribMap - an optional map of String-Object pairs; this
parameter can be null if there are no extra attributes
PwkException - if an error occurspublic static org.jdom.output.XMLOutputter getXMLOutputter()
public static void outputXML(PwkTreeModel treeModel,
java.io.Writer writer)
throws java.io.IOException
java.io.IOException
public boolean loadFile(java.io.File file,
PwkTreeModel treeModel)
throws PwkException
PwkException
public void saveFile(PwkTreeModel treeModel,
java.io.File file)
throws PwkException
PwkException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||