updated
git-svn-id: svn://anubis/gvsu@289 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
029d7eb3e2
commit
d391455acb
@ -18,29 +18,32 @@ public class User extends RegistrationInfo
|
||||
{
|
||||
DomRepresentation rep = new DomRepresentation(MediaType.TEXT_XML);
|
||||
Document d = rep.getDocument();
|
||||
|
||||
Element eltRoot = d.createElement("user");
|
||||
d.appendChild(eltRoot);
|
||||
|
||||
fillNodes(d, eltRoot);
|
||||
fillNodes(d, null);
|
||||
|
||||
return rep;
|
||||
}
|
||||
|
||||
public void fillNodes(Document d, Element eltRoot)
|
||||
public void fillNodes(Document d, Element eltParent)
|
||||
{
|
||||
Element eltRoot = d.createElement("user");
|
||||
if (eltParent == null)
|
||||
d.appendChild(eltRoot);
|
||||
else
|
||||
eltRoot.appendChild(eltRoot);
|
||||
|
||||
Element eltName = d.createElement("name");
|
||||
eltName.appendChild(d.createTextNode(getUserName()));
|
||||
eltRoot.appendChild(eltName);
|
||||
|
||||
|
||||
Element eltHost = d.createElement("host");
|
||||
eltHost.appendChild(d.createTextNode(getHost()));
|
||||
eltRoot.appendChild(eltHost);
|
||||
|
||||
|
||||
Element eltPort = d.createElement("port");
|
||||
eltPort.appendChild(d.createTextNode((new Integer(getPort())).toString()));
|
||||
eltRoot.appendChild(eltPort);
|
||||
|
||||
|
||||
Element eltStatus = d.createElement("status");
|
||||
eltStatus.appendChild(
|
||||
d.createTextNode(getStatus() ? "available" : "away"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user