|
From: <pe...@us...> - 2003-09-24 23:56:55
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/targets
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/id/targets
Modified Files:
TargetReference.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: TargetReference.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/targets/TargetReference.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TargetReference.java 23 Sep 2003 19:16:27 -0000 1.3
--- TargetReference.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:27 pelle
* Changed NameSpace to Identity.
***************
*** 26,30 ****
* Revision 1.2 2003/02/14 21:10:33 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The NamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 35,39 ----
* Revision 1.2 2003/02/14 21:10:33 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 55,59 ****
import org.dom4j.Element;
import org.dom4j.Namespace;
! import org.neuclear.id.NamedObject;
import org.neuclear.senders.Sender;
import org.neudist.utils.NeudistException;
--- 64,68 ----
import org.dom4j.Element;
import org.dom4j.Namespace;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.senders.Sender;
import org.neudist.utils.NeudistException;
***************
*** 62,66 ****
public class TargetReference extends AbstractElementProxy {
! public TargetReference(NamedObject obj, Element elem) throws NeudistException {
super(elem);
if (!elem.getName().equals(TAG_NAME))
--- 71,75 ----
public class TargetReference extends AbstractElementProxy {
! public TargetReference(SignedNamedObject obj, Element elem) throws NeudistException {
super(elem);
if (!elem.getName().equals(TAG_NAME))
***************
*** 69,87 ****
}
! public TargetReference(NamedObject obj, String href, String type) {
! super(DocumentHelper.createQName(TAG_NAME, NamedObject.NS_NSDL));
if (!Utility.isEmpty(href))
! getElement().addAttribute(DocumentHelper.createQName("href", NamedObject.NS_NSDL), href);
if (!Utility.isEmpty(type))
! getElement().addAttribute(DocumentHelper.createQName("type", NamedObject.NS_NSDL), type);
owner = obj;
}
public String getHref() {
! return getElement().attributeValue(DocumentHelper.createQName("href", NamedObject.NS_NSDL));
}
public String getType() {
! return getElement().attributeValue(DocumentHelper.createQName("type", NamedObject.NS_NSDL));
}
--- 78,96 ----
}
! public TargetReference(SignedNamedObject obj, String href, String type) {
! super(DocumentHelper.createQName(TAG_NAME, SignedNamedObject.NS_NSDL));
if (!Utility.isEmpty(href))
! getElement().addAttribute(DocumentHelper.createQName("href", SignedNamedObject.NS_NSDL), href);
if (!Utility.isEmpty(type))
! getElement().addAttribute(DocumentHelper.createQName("type", SignedNamedObject.NS_NSDL), type);
owner = obj;
}
public String getHref() {
! return getElement().attributeValue(DocumentHelper.createQName("href", SignedNamedObject.NS_NSDL));
}
public String getType() {
! return getElement().attributeValue(DocumentHelper.createQName("type", SignedNamedObject.NS_NSDL));
}
***************
*** 93,97 ****
public Namespace getNS() {
! return NamedObject.NS_NSDL;
}
--- 102,106 ----
public Namespace getNS() {
! return SignedNamedObject.NS_NSDL;
}
***************
*** 100,103 ****
}
! private NamedObject owner;
}
--- 109,112 ----
}
! private SignedNamedObject owner;
}
|