diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPanel.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPanel.java index d3189aef0..bcfd3b9ce 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPanel.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPanel.java @@ -92,7 +92,7 @@ public class GenericOrganizationalUnitPanel extends CompoundContentItemPanel { GenericContact contact; contact = contacts.getContact(); - generateContactXML(contact, + generateGenericContactXML(contact, contactsElem, state, Integer.toString(contacts.getContactOrder()), @@ -157,17 +157,13 @@ public class GenericOrganizationalUnitPanel extends CompoundContentItemPanel { } } } - + protected void generateContactXML(final GenericContact contact, final Element parent, final PageState state, final String order, - final boolean withPerson) { - ContactXmlLGenerator generator = new ContactXmlLGenerator(contact); - - generator.generateXML(state, parent, order); - - /*Element contactElem = parent.newChildElement("contact"); + final boolean withPerson) { + Element contactElem = parent.newChildElement("contact"); contactElem.addAttribute("order", order); Element title = contactElem.newChildElement("title"); @@ -244,7 +240,17 @@ public class GenericOrganizationalUnitPanel extends CompoundContentItemPanel { country.setText(address.getIsoCountryCode()); Element theState = addressElem.newChildElement("state"); theState.setText(address.getState()); - }*/ + } + } + + protected void generateGenericContactXML(final GenericContact contact, + final Element parent, + final PageState state, + final String order, + final boolean withPerson) { + ContactXmlLGenerator generator = new ContactXmlLGenerator(contact); + + generator.generateXML(state, parent, order); } @Override diff --git a/ccm-ldn-terms/src/com/arsdigita/london/terms/TermCategoryListener.java b/ccm-ldn-terms/src/com/arsdigita/london/terms/TermCategoryListener.java index 0a4f253bd..ea0a2a099 100755 --- a/ccm-ldn-terms/src/com/arsdigita/london/terms/TermCategoryListener.java +++ b/ccm-ldn-terms/src/com/arsdigita/london/terms/TermCategoryListener.java @@ -34,17 +34,23 @@ import com.arsdigita.persistence.SessionManager; */ public class TermCategoryListener implements CategoryListener { - private static final Logger s_log = Logger.getLogger(TermCategoryListener.class); + private static final Logger s_log = Logger.getLogger( + TermCategoryListener.class); - public void onDelete(Category cat) {} + public void onDelete(Category cat) { + } - public void onAddChild(Category cat, Category child) {} + public void onAddChild(Category cat, Category child) { + } - public void onRemoveChild(Category cat, Category child) {} + public void onRemoveChild(Category cat, Category child) { + } - public void onMap(Category cat, ACSObject obj) {} + public void onMap(Category cat, ACSObject obj) { + } - public void onUnmap(Category cat, ACSObject obj) {} + public void onUnmap(Category cat, ACSObject obj) { + } /** * Create new term by hooking into setDefaultParent() category @@ -57,8 +63,8 @@ public class TermCategoryListener implements CategoryListener { */ public void onSetDefaultParent(Category cat, Category parent) { // Check whether a term already exists for this category. - DataCollection allTerms = SessionManager.getSession() - .retrieve(Term.BASE_DATA_OBJECT_TYPE); + DataCollection allTerms = SessionManager.getSession().retrieve( + Term.BASE_DATA_OBJECT_TYPE); allTerms.addEqualsFilter(Term.MODEL, cat.getID()); if (allTerms.next()) { s_log.debug("A term already exists for cat: " + cat); @@ -78,8 +84,8 @@ public class TermCategoryListener implements CategoryListener { return; } - DataCollection domains = SessionManager.getSession() - .retrieve(Domain.BASE_DATA_OBJECT_TYPE); + DataCollection domains = SessionManager.getSession().retrieve( + Domain.BASE_DATA_OBJECT_TYPE); domains.addEqualsFilter(Domain.MODEL, root.getID()); Domain termDomain = null; if (domains.next()) { @@ -98,12 +104,9 @@ public class TermCategoryListener implements CategoryListener { } Term.create(cat, - String.valueOf(maxID.intValue()+1), + String.valueOf(maxID.intValue() + 1), false, "", - termDomain - ); + termDomain); } - } -