|
From: <pe...@us...> - 2003-09-26 00:22:12
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store
In directory sc8-pr-cvs1:/tmp/cvs-serv2478/src/java/org/neuclear/store
Modified Files:
EncryptedFileStore.java FileStore.java Store.java
Log Message:
Cleanups and final changes to code for refactoring of the Verifier and Reader part.
Index: EncryptedFileStore.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store/EncryptedFileStore.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** EncryptedFileStore.java 24 Sep 2003 23:56:49 -0000 1.4
--- EncryptedFileStore.java 26 Sep 2003 00:22:07 -0000 1.5
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.5 2003/09/26 00:22:07 pelle
+ * Cleanups and final changes to code for refactoring of the Verifier and Reader part.
+ *
* Revision 1.4 2003/09/24 23:56:49 pelle
* Refactoring nearly done. New model for creating signed objects.
***************
*** 134,138 ****
import org.neuclear.id.NSTools;
import org.neuclear.id.SignedNamedObject;
- import org.neuclear.id.NamedObjectFactory;
import org.neudist.crypto.CryptoTools;
import org.neudist.utils.NeudistException;
--- 137,140 ----
***************
*** 161,168 ****
// Quick and dirty encryption for now.
// String xmlData=obj.getElement().asXML();
! byte encrypted[] = CryptoTools.encrypt(obj.getName(), XMLSecTools.getElementBytes(obj.getElement()));
BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(outputFile));
! os.write(encrypted);
os.close();
}
--- 163,170 ----
// Quick and dirty encryption for now.
// String xmlData=obj.getElement().asXML();
! //TODO Find alternative byte encrypted[] = CryptoTools.encrypt(obj.getName(), XMLSecTools.getElementBytes(obj.getElement()));
BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(outputFile));
! //TODO Find alternative os.write(encrypted);
os.close();
}
***************
*** 188,192 ****
// System.out.println(clearString);
org.dom4j.Document doc = DocumentHelper.parseText(clearString);
! ns = NamedObjectFactory.createNamedObject(doc);
// Utility.rethrowException(e);
} catch (IOException e) {
--- 190,194 ----
// System.out.println(clearString);
org.dom4j.Document doc = DocumentHelper.parseText(clearString);
! //TODO Find alternative ns = NamedObjectFactory.createNamedObject(doc);
// Utility.rethrowException(e);
} catch (IOException e) {
Index: FileStore.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store/FileStore.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FileStore.java 24 Sep 2003 23:56:49 -0000 1.4
--- FileStore.java 26 Sep 2003 00:22:07 -0000 1.5
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.5 2003/09/26 00:22:07 pelle
+ * Cleanups and final changes to code for refactoring of the Verifier and Reader part.
+ *
* Revision 1.4 2003/09/24 23:56:49 pelle
* Refactoring nearly done. New model for creating signed objects.
***************
*** 120,124 ****
import org.neuclear.id.NSTools;
import org.neuclear.id.SignedNamedObject;
- import org.neuclear.id.NamedObjectFactory;
import org.neudist.utils.NeudistException;
import org.neudist.xml.XMLTools;
--- 123,126 ----
***************
*** 145,149 ****
File outputFile = new File(outputFilename);
outputFile.getParentFile().mkdirs();
! XMLTools.writeFile(outputFile, obj.getElement());
}
--- 147,151 ----
File outputFile = new File(outputFilename);
outputFile.getParentFile().mkdirs();
! //TODO Find alternative XMLTools.writeFile(outputFile, obj.getElement());
}
***************
*** 162,166 ****
try {
Document doc = XMLTools.loadDocument(new FileInputStream(fin));
! ns = NamedObjectFactory.createNamedObject(doc);
// System.out.println("NEUDIST: Fetched SignedNamedObject tag:"+rootName.getName()+" URI:"+rootName.getNamespaceURI());
// } catch (ParserConfigurationException e) {
--- 164,168 ----
try {
Document doc = XMLTools.loadDocument(new FileInputStream(fin));
! //TODO Find alternative ns = NamedObjectFactory.createNamedObject(doc);
// System.out.println("NEUDIST: Fetched SignedNamedObject tag:"+rootName.getName()+" URI:"+rootName.getNamespaceURI());
// } catch (ParserConfigurationException e) {
Index: Store.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store/Store.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Store.java 24 Sep 2003 23:56:49 -0000 1.4
--- Store.java 26 Sep 2003 00:22:07 -0000 1.5
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.5 2003/09/26 00:22:07 pelle
+ * Cleanups and final changes to code for refactoring of the Verifier and Reader part.
+ *
* Revision 1.4 2003/09/24 23:56:49 pelle
* Refactoring nearly done. New model for creating signed objects.
***************
*** 129,133 ****
import org.neuclear.id.InvalidIdentityException;
import org.neuclear.id.SignedNamedObject;
- import org.neuclear.id.verifier.NSVerifier;
import org.neuclear.receiver.Receiver;
import org.neudist.utils.NeudistException;
--- 132,135 ----
***************
*** 149,154 ****
// throw new InvalidIdentityException("The name: "+obj.getName()+" already exists");
- if (!NSVerifier.isNameValid(obj))
- throw new InvalidIdentityException("The name: " + obj.getName() + " is not allowed");
rawStore(obj);
if (next != null)
--- 151,154 ----
|