Eigener XML-Namespace für PublicPersonalProfile
git-svn-id: https://svn.libreccm.org/ccm/trunk@1060 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
3a43e3df6a
commit
fe50a3c468
|
|
@ -163,13 +163,18 @@ public class PublicPersonalProfilesServlet extends BaseApplicationServlet {
|
||||||
PublicPersonalProfile profile =
|
PublicPersonalProfile profile =
|
||||||
(PublicPersonalProfile) DomainObjectFactory.
|
(PublicPersonalProfile) DomainObjectFactory.
|
||||||
newInstance(profiles.getDataObject());
|
newInstance(profiles.getDataObject());
|
||||||
Element profileElem = root.newChildElement("profile");
|
Element profileElem =
|
||||||
|
root.newChildElement("ppp:profile",
|
||||||
|
"http://www,arsdigita.com/publicPersonalProfile/1.0");
|
||||||
GenericPerson owner = profile.getOwner();
|
GenericPerson owner = profile.getOwner();
|
||||||
if (owner == null) {
|
if (owner == null) {
|
||||||
throw new IllegalStateException(
|
throw new IllegalStateException(
|
||||||
"Failed to get owner of profile.");
|
"Failed to get owner of profile.");
|
||||||
}
|
}
|
||||||
profileElem.setText(owner.getFullName());
|
Element profileOwnerName = profileElem.newChildElement(
|
||||||
|
"ppp:ownerName",
|
||||||
|
"http://www,arsdigita.com/publicPersonalProfile/1.0");
|
||||||
|
profileOwnerName.setText(owner.getFullName());
|
||||||
|
|
||||||
createNavigation(profile, root, navPath);
|
createNavigation(profile, root, navPath);
|
||||||
|
|
||||||
|
|
@ -361,19 +366,19 @@ public class PublicPersonalProfilesServlet extends BaseApplicationServlet {
|
||||||
"");
|
"");
|
||||||
|
|
||||||
/*if (owner.hasContacts()) {
|
/*if (owner.hasContacts()) {
|
||||||
final GenericPersonContactCollection contacts = owner.getContacts();
|
final GenericPersonContactCollection contacts = owner.getContacts();
|
||||||
final String contactType = config.getContactType();
|
final String contactType = config.getContactType();
|
||||||
|
|
||||||
contacts.addFilter(String.format("link.link_key = '%s'",
|
contacts.addFilter(String.format("link.link_key = '%s'",
|
||||||
contactType));
|
contactType));
|
||||||
|
|
||||||
if (contacts.size() > 0) {
|
if (contacts.size() > 0) {
|
||||||
contacts.next();
|
contacts.next();
|
||||||
PublicPersonalProfileXmlGenerator contactXml =
|
PublicPersonalProfileXmlGenerator contactXml =
|
||||||
new PublicPersonalProfileXmlGenerator(
|
new PublicPersonalProfileXmlGenerator(
|
||||||
contacts.getContact());
|
contacts.getContact());
|
||||||
contactXml.generateXML(state, profileOwnerElem, "");
|
contactXml.generateXML(state, profileOwnerElem, "");
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue