|
-business
@@ -132,9 +171,11 @@
diff --git a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/DublinCoreConfig.java b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/DublinCoreConfig.java index f70ba4788..e2f61448f 100755 --- a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/DublinCoreConfig.java +++ b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/DublinCoreConfig.java @@ -25,18 +25,19 @@ import com.arsdigita.util.parameter.BooleanParameter; public class DublinCoreConfig extends AbstractConfig { - private Parameter m_audience; - private Parameter m_coverageSpatial; - private Parameter m_coverageUnit; - private Parameter m_owner; - private Parameter m_owner_contact; - private Parameter m_rights; - private Parameter m_publisher; - private Parameter m_use_ccn_portal; + private final Parameter m_audience; + private final Parameter m_coverageSpatial; + private final Parameter m_coverageUnit; + private final Parameter m_owner; + private final Parameter m_owner_contact; + private final Parameter m_rights; + private final Parameter m_publisher; + private final Parameter m_use_ccn_portal; - private Parameter m_relatedItemsSubjectDomain; + private final Parameter m_relatedItemsSubjectDomain; public DublinCoreConfig() { + m_audience = new StringParameter( "com.arsdigita.london.cms.dublin.audience_domain", Parameter.OPTIONAL, diff --git a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/DublinCoreItem.java b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/DublinCoreItem.java index 203be4097..1fbed904f 100755 --- a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/DublinCoreItem.java +++ b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/DublinCoreItem.java @@ -63,8 +63,9 @@ import org.apache.log4j.Logger; public class DublinCoreItem extends ContentItem { private static final Logger logger = Logger.getLogger(DublinCoreItem.class); + public static final String BASE_DATA_OBJECT_TYPE = - "com.arsdigita.london.cms.dublin.DublinCoreItem"; + "com.arsdigita.london.cms.dublin.DublinCoreItem"; private static final DublinCoreConfig s_config = new DublinCoreConfig(); static { @@ -288,10 +289,12 @@ public class DublinCoreItem extends ContentItem { /*Language*/ + @Override public String getLanguage() { return getOwner().getLanguage(); } + @Override public void setLanguage(String language) { throw new UnsupportedOperationException( "Metadata language is no longer set explicitly. " + @@ -396,6 +399,7 @@ public class DublinCoreItem extends ContentItem { } + @Override public void beforeSave() { super.beforeSave(); if (get(DC_LANGUAGE) == null) { diff --git a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/Initializer.java b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/Initializer.java index 06e84fa0c..8b642c161 100755 --- a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/Initializer.java +++ b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/Initializer.java @@ -32,35 +32,42 @@ public class Initializer extends ContentAssetInitializer { super("ccm-ldn-dublin.pdl.mf"); } + @Override public String getTraversalXML() { return "/WEB-INF/traversal-adapters/com/arsdigita/" + "cms/contentassets/DublinCore.xml"; } + @Override public String getProperty() { return "dublinCore"; } + @Override public String getBaseType() { return ContentPage.BASE_DATA_OBJECT_TYPE; } + @Override public Class getAuthoringStep() { return DublinCoreEdit.class; } + @Override public GlobalizedMessage getAuthoringStepLabel() { return new GlobalizedMessage( "com.arsdigita.london.cms.dublin.dublin_core_label", "com.arsdigita.london.cms.dublin.DublinCoreResources"); } + @Override public GlobalizedMessage getAuthoringStepDescription() { return new GlobalizedMessage( "com.arsdigita.london.cms.dublin.dublin_core_description", "com.arsdigita.london.cms.dublin.DublinCoreResources"); } + @Override public int getAuthoringStepSortKey() { return 3; // XXX config param please } diff --git a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/RelatedItemsQueryFactoryImpl.java b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/RelatedItemsQueryFactoryImpl.java index 9a3b68b9a..45b37df45 100755 --- a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/RelatedItemsQueryFactoryImpl.java +++ b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/RelatedItemsQueryFactoryImpl.java @@ -28,6 +28,7 @@ import com.arsdigita.categorization.Category; public class RelatedItemsQueryFactoryImpl extends RelatedItemsQueryFactory { + @Override public RelatedItemsQuery getRelatedItems(ContentPage page, Category current) { ContentBundle bundle = (ContentBundle)page.getParent(); diff --git a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreForm.java b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreForm.java index 6201a50ed..fb56ce460 100755 --- a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreForm.java +++ b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreForm.java @@ -15,37 +15,13 @@ package com.arsdigita.london.cms.dublin.ui; -import com.arsdigita.london.cms.dublin.DublinCoreItem; import com.arsdigita.cms.ContentItem; import com.arsdigita.cms.ContentPage; -import com.arsdigita.bebop.form.SingleSelect; -import com.arsdigita.bebop.FormSection; -import com.arsdigita.bebop.Label; -import com.arsdigita.bebop.form.TextField; -import com.arsdigita.bebop.form.DateTime; -import com.arsdigita.bebop.form.TextArea; -import com.arsdigita.bebop.form.Widget; -import com.arsdigita.bebop.parameters.StringParameter; -import com.arsdigita.bebop.parameters.TrimmedStringParameter; -import com.arsdigita.bebop.SaveCancelSection; -import com.arsdigita.bebop.parameters.DateTimeParameter; -import com.arsdigita.bebop.parameters.StringLengthValidationListener; import com.arsdigita.bebop.ColumnPanel; import com.arsdigita.bebop.form.Submit; -import com.arsdigita.kernel.Kernel; -import com.arsdigita.kernel.Party; -import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.bebop.Form; import com.arsdigita.cms.ItemSelectionModel; -import com.arsdigita.bebop.event.FormInitListener; -import com.arsdigita.bebop.FormProcessException; -import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.PageState; -import com.arsdigita.bebop.event.FormProcessListener; -import com.arsdigita.bebop.form.Option; -import com.arsdigita.london.terms.Domain; - -import java.util.Date; import org.apache.log4j.Logger; @@ -55,7 +31,7 @@ public class DublinCoreForm extends Form { private ItemSelectionModel m_itemModel; - private DublinCoreFormSection m_section; + private final DublinCoreFormSection m_section; public DublinCoreForm(ItemSelectionModel itemModel) { @@ -63,10 +39,12 @@ public class DublinCoreForm extends Form { m_itemModel = itemModel; m_section = new DublinCoreFormSection(false) { + @Override protected String getInitialDescription(ContentItem item) { return ((ContentPage) item).getSearchSummary(); } + @Override protected ContentItem getSelectedItem(PageState state) { return m_itemModel.getSelectedItem(state); } diff --git a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreFormSection.java b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreFormSection.java index b446b17b9..21d46af62 100755 --- a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreFormSection.java +++ b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreFormSection.java @@ -25,7 +25,6 @@ import com.arsdigita.bebop.parameters.StringLengthValidationListener; import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.bebop.parameters.TrimmedStringParameter; import com.arsdigita.cms.ContentItem; -import com.arsdigita.cms.ContentPage; import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Party; @@ -37,54 +36,56 @@ public abstract class DublinCoreFormSection extends FormSection private static final Logger s_log = Logger.getLogger(DublinCoreFormSection.class); - private Widget m_audience; + private final Widget m_audience; private Widget m_ccn_portal_instance; // private TextField m_contributor; // obviously not used anywhere, nevertheless // a db field! Not part of the UI - private Widget m_coverageSpatial; + private final Widget m_coverageSpatial; - private TextField m_coveragePostcode; + private final TextField m_coveragePostcode; - private Widget m_coverageUnit; + private final Widget m_coverageUnit; - private DateTime m_temporalBegin; + private final DateTime m_temporalBegin; - private DateTime m_temporalEnd; + private final DateTime m_temporalEnd; - private TextArea m_creatorOwner; + private final TextArea m_creatorOwner; - private TextField m_creatorContact; + private final TextField m_creatorContact; - private TextArea m_description; + private final TextArea m_description; // private TextField m_identifier; // private TextField m_location; // private TextField m_preservation; - private TextArea m_publisher; + private final TextArea m_publisher; // private TextField m_relation; - private TextArea m_rights; + private final TextArea m_rights; // private TextField m_source; - private TextField m_coverageSpatialRef; + private final TextField m_coverageSpatialRef; - private TextField m_dateValid; + private final TextField m_dateValid; - private TextField m_disposalReview; + private final TextField m_disposalReview; - private TextField m_keywords; + private final TextField m_keywords; - private boolean editableDescription; + private final boolean editableDescription; - private Submit m_cancel; + private final Submit m_cancel; public DublinCoreFormSection(boolean editableDescription) { + this.editableDescription = editableDescription; - m_audience = createControlledList("audience", DublinCoreItem - .getConfig().getAudienceDomain()); + m_audience = createControlledList("audience", + DublinCoreItem.getConfig() + .getAudienceDomain()); m_coverageSpatial = createControlledList("coverageSpatial", DublinCoreItem.getConfig().getCoverageSpatialDomain()); @@ -267,6 +268,7 @@ public abstract class DublinCoreFormSection extends FormSection } } + @Override public void init(FormSectionEvent fse) throws FormProcessException { PageState state = fse.getPageState(); @@ -329,6 +331,7 @@ public abstract class DublinCoreFormSection extends FormSection } } + @Override public void process(FormSectionEvent fse) throws FormProcessException { PageState state = fse.getPageState(); diff --git a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreSummary.java b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreSummary.java index bfde1d615..2ec7933fe 100755 --- a/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreSummary.java +++ b/ccm-ldn-dublin/src/com/arsdigita/london/cms/dublin/ui/DublinCoreSummary.java @@ -223,6 +223,7 @@ public class DublinCoreSummary extends ColumnPanel { } } + @Override public void generateXML(PageState state, Element parent) { ContentPage item = (ContentPage)m_itemModel.getSelectedObject(state); @@ -299,8 +300,8 @@ public class DublinCoreSummary extends ColumnPanel { protected class CategoryListModelBuilder extends LockableImpl implements ListModelBuilder { - private ItemSelectionModel m_itemModel; - private String m_context; + private final ItemSelectionModel m_itemModel; + private final String m_context; public CategoryListModelBuilder(ItemSelectionModel itemModel, String context) { @@ -308,6 +309,7 @@ public class DublinCoreSummary extends ColumnPanel { m_context = context; } + @Override public ListModel makeModel( List l, PageState state ) { ContentPage item = (ContentPage) m_itemModel.getSelectedObject(state); return new CategoryIteratorListModel(item.getCategories(m_context)); @@ -315,6 +317,7 @@ public class DublinCoreSummary extends ColumnPanel { } protected class SimpleCellRenderer implements ListCellRenderer { + @Override public Component getComponent(List list, PageState state, Object value, String key, int index, boolean isSelected) { diff --git a/ccm-ldn-dublin/web/packages/dublin/xsl/metadata.xsl b/ccm-ldn-dublin/web/themes/heirloom/contentassets/DublinCoreItem/xsl/metadata.xsl similarity index 100% rename from ccm-ldn-dublin/web/packages/dublin/xsl/metadata.xsl rename to ccm-ldn-dublin/web/themes/heirloom/contentassets/DublinCoreItem/xsl/metadata.xsl diff --git a/ccm-ldn-freeform/src/com/arsdigita/london/cms/freeform/FreeformContentItem.java b/ccm-ldn-freeform/src/com/arsdigita/london/cms/freeform/FreeformContentItem.java index a175eb951..0e0546ff5 100755 --- a/ccm-ldn-freeform/src/com/arsdigita/london/cms/freeform/FreeformContentItem.java +++ b/ccm-ldn-freeform/src/com/arsdigita/london/cms/freeform/FreeformContentItem.java @@ -101,6 +101,9 @@ public class FreeformContentItem extends ContentPage { /** * Retrieves all assets with the specified mime type and returns * the one with the specified ranking. + * @param mimeType + * @param rank + * @return **/ public Asset getOneAsset(String mimeType, String rank) { Asset asset = null; @@ -157,7 +160,8 @@ public class FreeformContentItem extends ContentPage { /** * remove an asset from associationw with the FreeformContentItem * - * TODO: what to do if the asset isn't already associated ? + * TODO: what to do if the asset isn't already associated ? + * @param oneAsset **/ public void removeAsset( Asset oneAsset ) { DataAssociationCursor da = ((DataAssociation)get(ASSETS)).cursor(); diff --git a/ccm-ldn-freeform/src/com/arsdigita/london/cms/freeform/Loader.java b/ccm-ldn-freeform/src/com/arsdigita/london/cms/freeform/Loader.java index dce674e8d..fe94fa405 100755 --- a/ccm-ldn-freeform/src/com/arsdigita/london/cms/freeform/Loader.java +++ b/ccm-ldn-freeform/src/com/arsdigita/london/cms/freeform/Loader.java @@ -43,6 +43,7 @@ public class Loader extends PackageLoader { private static final Logger s_log = Logger.getLogger(Loader.class); + @Override public void run(final ScriptContext ctx) { // Nada yet } diff --git a/ccm-ldn-freeform/src/com/arsdigita/london/cms/freeform/asset/FreeformTextAsset.java b/ccm-ldn-freeform/src/com/arsdigita/london/cms/freeform/asset/FreeformTextAsset.java index dca3acaf8..a5c1b8cc2 100755 --- a/ccm-ldn-freeform/src/com/arsdigita/london/cms/freeform/asset/FreeformTextAsset.java +++ b/ccm-ldn-freeform/src/com/arsdigita/london/cms/freeform/asset/FreeformTextAsset.java @@ -62,6 +62,7 @@ public class FreeformTextAsset extends TextAsset { /* abstract implementation */ + @Override public String getBaseDataObjectType() { return BASE_DATA_OBJECT_TYPE; } @@ -69,6 +70,7 @@ public class FreeformTextAsset extends TextAsset { // This is a temporary fix to a null value being inserted into // acs_object.display_name. + @Override public void beforeSave() { String displayName = getDisplayName(); set(com.arsdigita.kernel.ACSObject.DISPLAY_NAME, displayName); diff --git a/ccm-ldn-freeform/web/packages/freeform/xsl/freeform.xsl b/ccm-ldn-freeform/web/themes/heirloom/contenttypes/ldn/freeform.xsl similarity index 100% rename from ccm-ldn-freeform/web/packages/freeform/xsl/freeform.xsl rename to ccm-ldn-freeform/web/themes/heirloom/contenttypes/ldn/freeform.xsl diff --git a/ccm-ldn-types-contact/application.xml b/ccm-ldn-types-contact/application.xml index 0dff3d959..997fa06aa 100755 --- a/ccm-ldn-types-contact/application.xml +++ b/ccm-ldn-types-contact/application.xml @@ -3,7 +3,7 @@ name="ccm-ldn-types-contact" prettyName="Red Hat CCM Content Types" version="6.6.1" - release="1" + release="2" webapp="ROOT">DomainObject class to represent Contact ContentType
+ * objects.
+ *
+ * @author Shashin Shinde sshinde@redhat.com
+ * @version $Id: Contact.java 1689 2007-10-26 11:06:23Z chrisg23 $
+ */
+public class Contact extends ContentPage {
+
+ /**
+ * data object type for this domain object
+ */
+ public static final String BASE_DATA_OBJECT_TYPE
+ = "com.arsdigita.cms.contenttypes.ldn.Contact";
+
+ /**
+ * PDL property names
+ */
+ /*
+ * Flattened out Person object properties.Next 3 properties can be moved out
+ * to seperate object if needed.
+ */
+ public static final String GIVEN_NAME = "givenName";
+ public static final String FAMILY_NAME = "familyName";
+ public static final String SUFFIX = "suffix";
+ public static final String EMAILS = "emails";
+
+ public static final String DESCRIPTION = "description";
+ public static final String ORG_NAME = "orgName";
+ public static final String DEPT_NAME = "deptName";
+ public static final String ROLE = "role";
+
+ /* Composite objects used by this class */
+ public static final String CONTACT_TYPE = "contactType";
+ public static final String CONTACT_ADDRESS = "contactAddress";
+ public static final String PHONES = "phones";
+
+ public static final String ITEMS = "associatedContentItemsForContact";
+
+ private static final Logger s_log = Logger.getLogger(Contact.class);
+
+ /**
+ * Default constructor.
+ */
+ public Contact() {
+ super(BASE_DATA_OBJECT_TYPE);
+ }
+
+ /**
+ * Adds an association between this contact and the given content item.
+ *
+ * @param item
+ */
+ public void addContentItem(ContentItem item) {
+ s_log.debug("item is " + item);
+ item.addToAssociation(getItemsForContact());
+ }
+
+ /**
+ * Deletes the association between this contact and the given content item.
+ *
+ * @param item
+ */
+ public void removeContentItem(ContentItem item) {
+ s_log.debug("item is " + item);
+ DataOperation operation = SessionManager
+ .getSession()
+ .retrieveDataOperation(
+ "com.arsdigita.contenttypes.ldn.removeContactFromContentItemAssociation");
+ operation.setParameter("itemID", new Integer(item.getID().intValue()));
+ operation.execute();
+ }
+
+ /**
+ * Removes all mappings between this contact and any other content item.
+ *
+ */
+ private void removeItemMappings() {
+ DataOperation operation = SessionManager
+ .getSession()
+ .retrieveDataOperation(
+ "com.arsdigita.contenttypes.ldn.removeContactFromAllAssociations");
+ operation.setParameter("contactID", new Integer(this.getID().intValue()));
+ operation.execute();
+ }
+
+ /**
+ * Gets the DataAssociation that holds the mapping between this contact and
+ * any content items.
+ *
+ * @return
+ */
+ public DataAssociation getItemsForContact() {
+ return (DataAssociation) get(ITEMS);
+ }
+
+ /**
+ * Returns the Contact for a given content item.
+ *
+ * @param item
+ * @return
+ */
+ public static Contact getContactForItem(ContentItem item) {
+ s_log.debug("getting contact for item " + item);
+ DataQuery query = SessionManager.getSession().retrieveQuery(
+ "com.arsdigita.contenttypes.ldn.getContactForItem");
+ query.setParameter("itemID", item.getID());
+ BigDecimal contactID;
+ Contact contact = null;
+ while (query.next()) {
+ contactID = (BigDecimal) query.get("contactID");
+ contact = new Contact(contactID);
+ }
+ s_log.debug("returning contact " + contact);
+ return contact;
+ }
+
+ /**
+ * Constructor. Retrieves an object instance with the given id.
+ *
+ * @param id the id of the object to retrieve
+ */
+ public Contact(BigDecimal id) throws DataObjectNotFoundException {
+ this(new OID(BASE_DATA_OBJECT_TYPE, id));
+ }
+
+ /**
+ * Constructor. Retrieves an object instance with the given OID.
+ *
+ * @param oid the object id of the object to retrieve
+ */
+ public Contact(OID oid) throws DataObjectNotFoundException {
+ super(oid);
+ }
+
+ /**
+ * Constructor. Create a Contact domain object using the given data object.
+ *
+ * @param obj the object data to use
+ */
+ public Contact(DataObject obj) {
+ super(obj);
+ }
+
+ /**
+ * Constructor.
+ * @param type
+ */
+ public Contact(String type) {
+ super(type);
+ }
+
+ @Override
+ public void beforeSave() {
+ super.beforeSave();
+
+ Assert.exists(getContentType(), ContentType.class);
+ }
+
+ @Override
+ public String getBaseDataObjectType() {
+ return BASE_DATA_OBJECT_TYPE;
+ }
+
+ /**
+ * Accessor. Get the GIVEN_NAME for this Contact.
+ * @return
+ */
+ public String getGivenName() {
+ return (String) get(GIVEN_NAME);
+ }
+
+ /**
+ * Mutator. Set the GIVEN_NAME for this Contact.
+ * @param gn
+ */
+ public void setGivenName(String gn) {
+ set(GIVEN_NAME, gn);
+ }
+
+ /**
+ * Accessor. Get the FAMILY_NAME for this Contact.
+ * @return
+ */
+ public String getFamilyName() {
+ return (String) get(FAMILY_NAME);
+ }
+
+ /**
+ * Mutator. Set the FAMILY_NAME for this Contact.
+ * @param fn
+ */
+ public void setFamilyName(String fn) {
+ set(FAMILY_NAME, fn);
+ }
+
+ /**
+ * Accessor. Get the SUFFIX for this Contact.
+ * @return
+ */
+ public String getSuffix() {
+ return (String) get(SUFFIX);
+ }
+
+ /**
+ * Mutator. Set the DESCRIPTION for this Contact.
+ * @param suf
+ */
+ public void setSuffix(String suf) {
+ set(SUFFIX, suf);
+ }
+
+ /**
+ * Accessor. Get the EMAILS for this Contact.
+ * @return
+ */
+ public String getEmails() {
+ return (String) get(EMAILS);
+ }
+
+ /**
+ * Mutator. Set the EMAILS for this Contact.
+ * @param ems
+ */
+ public void setEmails(String ems) {
+ set(EMAILS, ems);
+ }
+
+ /**
+ * Accessor. Get the CONTACT_TYPE for this Contact.
+ * @return
+ */
+ public String getContactTypeName() {
+ String ctTypeName = "";
+ if (getContactType() != null) {
+ ctTypeName = getContactType().getTypeName();
+ }
+ return ctTypeName;
+ }
+
+ /**
+ * Accessor. Get the DESCRIPTION for this Contact.
+ * @return
+ */
+ @Override
+ public String getDescription() {
+ return (String) get(DESCRIPTION);
+ }
+
+ /**
+ * Mutator. Set the DESCRIPTION for this Contact.
+ * @param desc
+ */
+ @Override
+ public void setDescription(String desc) {
+ set(DESCRIPTION, desc);
+ }
+
+ /**
+ * Accessor. Get the ORG_NAME for this Contact.
+ * @return
+ */
+ public String getOrganisationName() {
+ return (String) get(ORG_NAME);
+ }
+
+ /**
+ * Mutator. Set the ORG_NAME for this Contact.
+ * @param orgName
+ */
+ public void setOrganisationName(String orgName) {
+ set(ORG_NAME, orgName);
+ }
+
+ /**
+ * Accessor. Get the DEPT_NAME for this Contact.
+ * @return
+ */
+ public String getDeptName() {
+ return (String) get(DEPT_NAME);
+ }
+
+ /**
+ * Mutator. Set the DEPT_NAME for this Contact.
+ * @param deptName
+ */
+ public void setDeptName(String deptName) {
+ set(DEPT_NAME, deptName);
+ }
+
+ /**
+ * Accessor. Get the ROLE for this Contact.
+ * @return
+ */
+ public String getRole() {
+ return (String) get(ROLE);
+ }
+
+ /**
+ * Mutator. Set the ROLE for this Contact.
+ * @param role
+ */
+ public void setRole(String role) {
+ set(ROLE, role);
+ }
+
+ /**
+ * return type of Contact associated with this Contact object.
+ *
+ * @return null if there is no associated object.
+ */
+ public ContactType getContactType() {
+ DataObject obj = retrieveDataobject(CONTACT_TYPE);
+ if (obj != null) {
+ return new ContactType(obj);
+ }
+ return null;
+ }
+
+ /**
+ * Mutator. Set the CONTACT_TYPE for this Contact.
+ * @param ct
+ */
+ public void setContactType(ContactType ct) {
+ setAssociation(CONTACT_TYPE, ct);
+ }
+
+ /**
+ * ***** ContactAddress object manipulation methods ********************
+ */
+ /**
+ * set the ContactAddress object association.
+ * @param caddr
+ */
+ public void setContactAddress(ContactAddress caddr) {
+ setAssociation(CONTACT_ADDRESS, caddr);
+ }
+
+ /**
+ * Get the associated ContactAddress object for this Contact.
+ *
+ * @return null if no Address is present.
+ */
+ public ContactAddress getContactAddress() {
+ DataObject obj = retrieveDataobject(CONTACT_ADDRESS);
+ if (obj != null) {
+ return new ContactAddress(obj);
+ }
+ return null;
+ }
+
+ /**
+ * ***** ContactPhone object manipulation methods ********************
+ */
+ /**
+ * Add a Phone object to the collection of the phone objects this contact
+ * has.
+ * @param ph
+ */
+ public void addPhone(ContactPhone ph) {
+ add(PHONES, ph);
+ save();
+ }
+
+ /**
+ * Remove the passed in Phone object from the list of phones this contact
+ * object has.
+ * @param ph
+ */
+ public void removePhone(ContactPhone ph) {
+ ph.delete();
+ save();
+ }
+
+ /**
+ * Return collection of Phone objects associated with this Contact object.
+ * @return
+ */
+ public ContactPhonesCollection getPhones() {
+ DataAssociationCursor dac = ((DataAssociation) get(PHONES)).cursor();
+ return new ContactPhonesCollection(dac);
+ }
+
+ private DataObject retrieveDataobject(String attr) {
+ return (DataObject) get(attr);
+ }
+
+}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactAddress.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactAddress.java
new file mode 100755
index 000000000..3d0ddb18b
--- /dev/null
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactAddress.java
@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+package com.arsdigita.cms.contenttypes.ldn;
+
+import java.math.BigDecimal;
+
+import com.arsdigita.cms.ContentItem;
+import com.arsdigita.domain.DataObjectNotFoundException;
+import com.arsdigita.persistence.DataObject;
+import com.arsdigita.persistence.OID;
+
+/**
+ * DomainObject class to represent objects of type ContactAddress
+ * These objects are associated with Contact objects in this package.
+ *
+ * @author Shashin Shinde sshinde@redhat.com
+ * @version $Id: ContactAddress.java 287 2005-02-22 00:29:02Z sskracic $
+ */
+public class ContactAddress extends ContentItem {
+
+ /**
+ * data object type for this domain object
+ */
+ public static final String BASE_DATA_OBJECT_TYPE
+ = "com.arsdigita.cms.contenttypes.ldn.ContactAddress";
+
+ public static final String SAON = "saon";
+ public static final String PAON = "paon";
+ public static final String STREET_DESC = "streetDesc";
+ public static final String STREET_REF_NO = "streetRefNo";
+ public static final String LOCALITY = "locality";
+ public static final String TOWN = "town";
+ public static final String ADMINISTRATIVE_AREA = "administrativeArea";
+ public static final String POST_TOWN = "postTown";
+ public static final String POST_CODE = "postCode";
+ public static final String PROP_REF_NO = "referenceNo";
+
+ /**
+ * Default constructor.
+ */
+ public ContactAddress() {
+ super(BASE_DATA_OBJECT_TYPE);
+ }
+
+ /**
+ * Constructor. Retrieves an object instance with the given id.
+ *
+ * @param id the id of the object to retrieve
+ */
+ public ContactAddress(BigDecimal id) throws DataObjectNotFoundException {
+ this(new OID(BASE_DATA_OBJECT_TYPE, id));
+ }
+
+ /**
+ * Constructor. Create a Contact domain object using the given data object.
+ *
+ * @param obj the object data to use
+ */
+ public ContactAddress(DataObject obj) {
+ super(obj);
+ }
+
+ /**
+ * Constructor. Retrieves an object instance with the given OID.
+ *
+ * @param oid the object id of the object to retrieve
+ */
+ public ContactAddress(OID oid) throws DataObjectNotFoundException {
+ super(oid);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param type
+ */
+ public ContactAddress(String type) {
+ super(type);
+ }
+
+ @Override
+ public String getBaseDataObjectType() {
+ return BASE_DATA_OBJECT_TYPE;
+ }
+
+ public String getSaon() {
+ return (String) get(SAON);
+ }
+
+ public void setSaon(String saon) {
+ set(SAON, saon);
+ }
+
+ public String getPaon() {
+ return (String) get(PAON);
+ }
+
+ public void setPaon(String paon) {
+ set(PAON, paon);
+ }
+
+ public String getStreetDesc() {
+ return (String) get(STREET_DESC);
+ }
+
+ public void setStreetDesc(String desc) {
+ set(STREET_DESC, desc);
+ }
+
+ public String getStreetRefNo() {
+ return (String) get(STREET_REF_NO);
+ }
+
+ public void setStreetRefNo(String refno) {
+ set(STREET_REF_NO, refno);
+ }
+
+ public String getLocality() {
+ return (String) get(LOCALITY);
+ }
+
+ public void setLocality(String locality) {
+ set(LOCALITY, locality);
+ }
+
+ public String getTown() {
+ return (String) get(TOWN);
+ }
+
+ public void setTown(String town) {
+ set(TOWN, town);
+ }
+
+ public String getAdministrativeArea() {
+ return (String) get(ADMINISTRATIVE_AREA);
+ }
+
+ public void setAdministrativeArea(String adArea) {
+ set(ADMINISTRATIVE_AREA, adArea);
+ }
+
+ public String getPostTown() {
+ return (String) get(POST_TOWN);
+ }
+
+ public void setPostTown(String ptown) {
+ set(POST_TOWN, ptown);
+ }
+
+ public String getPostCode() {
+ return (String) get(POST_CODE);
+ }
+
+ public void setPostCode(String pcode) {
+ set(POST_CODE, pcode);
+ }
+
+ public String getReferenceNo() {
+ return (String) get(PROP_REF_NO);
+ }
+
+ public void setReferenceNo(String refno) {
+ set(PROP_REF_NO, refno);
+ }
+
+}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactInitializer.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactInitializer.java
similarity index 92%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactInitializer.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactInitializer.java
index 3e05e743c..58fa5e8d6 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactInitializer.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactInitializer.java
@@ -17,13 +17,13 @@
*
*/
-package com.arsdigita.london.contenttypes;
+package com.arsdigita.cms.contenttypes.ldn;
import com.arsdigita.cms.ContentPage;
import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter;
import com.arsdigita.cms.contenttypes.ContentTypeInitializer;
-import com.arsdigita.london.contenttypes.ui.ContactPropertiesAddStep;
+import com.arsdigita.cms.contenttypes.ldn.ui.ContactPropertiesAddStep;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.runtime.DomainInitEvent;
@@ -77,15 +77,16 @@ public class ContactInitializer extends ContentTypeInitializer {
/**
* Retrieves fully qualified traversal adapter file name.
+ *
* @return
*/
@Override
public String getTraversalXML() {
return
- "/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/Contact.xml";
+ "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/ldn/Contact.xml";
}
- private static ArrayList phoneTypesList = new ArrayList(10);
+ private static final ArrayList phoneTypesList = new ArrayList(10);
static {
logger.debug("Static initalizer starting...");
phoneTypesList.add("Office");
@@ -98,6 +99,7 @@ public class ContactInitializer extends ContentTypeInitializer {
/**
* Return the statically initialized list of phone types.
+ * @return
*/
public static ArrayList getPhoneTypes() {
return phoneTypesList;
@@ -141,13 +143,13 @@ public class ContactInitializer extends ContentTypeInitializer {
private GlobalizedMessage getAuthoringStepDescription() {
return new GlobalizedMessage(
"com.arsdigita.london.contenttypes.contact_authoring_step_description",
- "com.arsdigita.london.contenttypes.ContactResources");
+ "com.arsdigita.cms.contenttypes.ldn.ContactResources");
}
private GlobalizedMessage getAuthoringStepLabel() {
return new GlobalizedMessage(
"com.arsdigita.london.contenttypes.contact_authoring_step_label",
- "com.arsdigita.london.contenttypes.ContactResources");
+ "com.arsdigita.cms.contenttypes.ldn.ContactResources");
}
private Class getAuthoringStep() {
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactLoader.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactLoader.java
new file mode 100755
index 000000000..069c51b20
--- /dev/null
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactLoader.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+package com.arsdigita.cms.contenttypes.ldn;
+
+import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
+import com.arsdigita.runtime.ScriptContext;
+
+/**
+ * Loader for ContentType Contact.
+ *
+ * Also loads a fixed set of ContactType objects.
+ *
+ * @author Shashin Shinde sshinde@redhat.com
+ *
+ * @version $Id: ContactLoader.java 287 2005-02-22 00:29:02Z sskracic $
+ *
+ */
+public class ContactLoader extends AbstractContentTypeLoader {
+
+ /**
+ * Defines the xml file containing the Contact content types property
+ * definitions.
+ */
+ private static final String[] TYPES = {
+ "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ldn/Contact.xml"
+ };
+
+ /**
+ * Provides the of Contact contenttype property definitions implementing the
+ * parent's class abstract method.
+ *
+ * The file defines the types name as displayed in content center select box
+ * and the authoring steps. These are loaded into database.
+ *
+ * @return String Atring Array of fully qualified file names
+ */
+ @Override
+ public String[] getTypes() {
+ return TYPES;
+ }
+
+ /**
+ * @see
+ * com.arsdigita.runtime.Script#run(com.arsdigita.runtime.ScriptContext)
+ */
+ @Override
+ public void run(ScriptContext context) {
+ super.run(context);
+ loadContactTypes();
+ }
+
+ /**
+ * Create the fixed set of ContactTypes. This is a quick hack for now.If we
+ * need to extend it then we have to move it into an XML file and load it
+ * from initializer after checking it.
+ */
+ protected void loadContactTypes() {
+ ContactType ct = new ContactType();
+ ct.setName("ContactType-Service-Provision");
+ ct.setTypeName("Service Provision");
+ ct.save();
+
+ ct = new ContactType();
+ ct.setName("ContactType-Enquiry");
+ ct.setTypeName("Enquiry");
+ ct.save();
+
+ ct = new ContactType();
+ ct.setName("ContactType-Complaint");
+ ct.setTypeName("Complaint");
+ ct.save();
+
+ ct = new ContactType();
+ ct.setName("ContactType-Escalation");
+ ct.setTypeName("Escalation");
+ ct.save();
+
+ }
+
+}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactPhone.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactPhone.java
new file mode 100755
index 000000000..a483b6910
--- /dev/null
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactPhone.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+package com.arsdigita.cms.contenttypes.ldn;
+
+import java.math.BigDecimal;
+
+import com.arsdigita.cms.ContentItem;
+import com.arsdigita.domain.DataObjectNotFoundException;
+import com.arsdigita.persistence.DataObject;
+import com.arsdigita.persistence.OID;
+
+/**
+ * DomainObject class to represent objects of type ContactPhone.
+ * This object represents type of phone and it's number. They are associated
+ * with Contact objects.
+ *
+ * @author Shashin Shinde sshinde@redhat.com
+ *
+ * @version $Id: ContactPhone.java 287 2005-02-22 00:29:02Z sskracic $
+ *
+ */
+public class ContactPhone extends ContentItem {
+
+ /**
+ * data object type for this domain object
+ */
+ public static final String BASE_DATA_OBJECT_TYPE
+ = "com.arsdigita.cms.contenttypes.ldn.ContactPhone";
+
+ /**
+ * PDL property names
+ */
+ public static final String PHONE_TYPE = "phoneType";
+ public static final String PHONE_NUMBER = "phoneNumber";
+
+ /**
+ * Default constructor.
+ */
+ public ContactPhone() {
+ super(BASE_DATA_OBJECT_TYPE);
+ }
+
+ /**
+ * Constructor. Retrieves an object instance with the given OID.
+ *
+ * @param oid the object id of the object to retrieve
+ */
+ public ContactPhone(OID oid) throws DataObjectNotFoundException {
+ super(oid);
+ }
+
+ /**
+ * Constructor. Retrieves an object instance with the given id.
+ *
+ * @param id the id of the object to retrieve
+ */
+ public ContactPhone(BigDecimal id) throws DataObjectNotFoundException {
+ this(new OID(BASE_DATA_OBJECT_TYPE, id));
+ }
+
+ /**
+ * Constructor. Create a Contact domain object using the given data object.
+ *
+ * @param obj the object data to use
+ */
+ public ContactPhone(DataObject obj) {
+ super(obj);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param type
+ */
+ public ContactPhone(String type) {
+ super(type);
+ }
+
+ @Override
+ public String getBaseDataObjectType() {
+ return BASE_DATA_OBJECT_TYPE;
+ }
+
+ //Accessors
+ public String getPhoneType() {
+ return (String) get(PHONE_TYPE);
+ }
+
+ public String getPhoneNumber() {
+ return (String) get(PHONE_NUMBER);
+ }
+
+ public void setPhoneNumber(String num) {
+ set(PHONE_NUMBER, num);
+ }
+
+ public void setPhoneType(String type) {
+ set(PHONE_TYPE, type);
+ }
+
+}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactPhonesCollection.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactPhonesCollection.java
similarity index 59%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactPhonesCollection.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactPhonesCollection.java
index acad1d2e4..063276835 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactPhonesCollection.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactPhonesCollection.java
@@ -16,43 +16,47 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.london.contenttypes;
+package com.arsdigita.cms.contenttypes.ldn;
import com.arsdigita.domain.DomainCollection;
import com.arsdigita.persistence.DataCollection;
/**
* Collection of ContactPhoneS objects.
- *
- * @author Shashin Shinde sshinde@redhat.com
*
- * @version $Id: ContactPhonesCollection.java 287 2005-02-22 00:29:02Z sskracic $
+ * @author Shashin Shinde sshinde@redhat.com
+ *
+ * @version $Id: ContactPhonesCollection.java 287 2005-02-22 00:29:02Z sskracic
+ * $
*/
public class ContactPhonesCollection extends DomainCollection {
-
- /**
- * Constructor.
- *
- **/
- public ContactPhonesCollection(DataCollection dataCollection) {
- super(dataCollection);
- }
- /**
- * Returns a DomainObject for the current position in
- * the collection.
- *
- **/
- public ContactPhone getPhone() {
- return new ContactPhone(m_dataCollection.getDataObject());
- }
+ /**
+ * Constructor.
+ *
+ * @param dataCollection
+ */
+ public ContactPhonesCollection(DataCollection dataCollection) {
+ super(dataCollection);
+ }
- public String getPhoneType(){
- return getPhone().getPhoneType();
- }
+ /**
+ * Returns a DomainObject for the current position in the
+ * collection.
+ *
+ * @return
+ */
+ public ContactPhone getPhone() {
+ return new ContactPhone(m_dataCollection.getDataObject());
+ }
- public String getPhoneNumber(){
- return getPhone().getPhoneNumber();
- }
+ public String getPhoneType() {
+ return getPhone().getPhoneType();
+ }
+
+ public String getPhoneNumber() {
+ return getPhone().getPhoneNumber();
+ }
}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactResources.properties b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactResources.properties
similarity index 92%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactResources.properties
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactResources.properties
index 40d9d2f86..8b507fea9 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactResources.properties
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactResources.properties
@@ -12,8 +12,8 @@ london.contenttypes.ui.contact.type=Contact Type
london.contenttypes.ui.contact.orgname=Organization Name
london.contenttypes.ui.contact.deptname=Department Name
london.contenttypes.ui.contact.role=Role of Contact
-london.contenttypes.ui.contact.givenname=Given Name
-london.contenttypes.ui.contact.familyname=Family Name
+cms.contenttypes.ldn.ui.contact.givenname=Given Name
+cms.contenttypes.ldn.ui.contact.familyname=Family Name
london.contenttypes.ui.contact.suffix=Suffix
london.contenttypes.ui.contact.phone_number=Number
london.contenttypes.ui.contact.phone_type=Types
@@ -33,3 +33,4 @@ london.contenttypes.ui.contact.remove_contact=Remove contact
london.contenttypes.ui.contact.search_contact_label=Search for Contact:
london.contenttypes.ui.contact.no_contacts_yet=This item does not have a contact.
london.contenttypes.ui.contact.add_contact=Add
+cms.contenttypes.ldn.contact.type_label=Contact
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactResources_de.properties b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactResources_de.properties
similarity index 91%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactResources_de.properties
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactResources_de.properties
index 07ea932a1..237789dc1 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactResources_de.properties
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactResources_de.properties
@@ -8,12 +8,12 @@ london.contenttypes.ui.contact.address.administrative_area=Administrative Area
london.contenttypes.ui.contact.address.posttown=Postalischer Ort
london.contenttypes.ui.contact.address.postcode=Postalischer Code
london.contenttypes.ui.contact.address.proprefno=Gebietsreferenz
-london.contenttypes.ui.contact.type=Kontakt Typ
+london.contenttypes.ui.contact.type=Art des Kontakts
london.contenttypes.ui.contact.orgname=Organisation (Name)
london.contenttypes.ui.contact.deptname=Kreis
london.contenttypes.ui.contact.role=Rolle des Kontakts
-london.contenttypes.ui.contact.givenname=Vorname
-london.contenttypes.ui.contact.familyname=Familienname
+cms.contenttypes.ldn.ui.contact.givenname=Vorname
+cms.contenttypes.ldn.ui.contact.familyname=Familienname
london.contenttypes.ui.contact.suffix=Erg\u00e4nzung
london.contenttypes.ui.contact.phone_number=Telefonnummer
london.contenttypes.ui.contact.phone_type=Telefon Typ
@@ -33,3 +33,4 @@ london.contenttypes.ui.contact.remove_contact=Kontakt entfernen
london.contenttypes.ui.contact.search_contact_label=Nach Kontakt suchen:
london.contenttypes.ui.contact.no_contacts_yet=es ist kein Kontakt zugeordnet.
london.contenttypes.ui.contact.add_contact=Hinzuf\u00fcgen
+cms.contenttypes.ldn.contact.type_label=Kontakt
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactResources_fr.properties b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactResources_fr.properties
similarity index 92%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactResources_fr.properties
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactResources_fr.properties
index 40d9d2f86..8b507fea9 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactResources_fr.properties
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactResources_fr.properties
@@ -12,8 +12,8 @@ london.contenttypes.ui.contact.type=Contact Type
london.contenttypes.ui.contact.orgname=Organization Name
london.contenttypes.ui.contact.deptname=Department Name
london.contenttypes.ui.contact.role=Role of Contact
-london.contenttypes.ui.contact.givenname=Given Name
-london.contenttypes.ui.contact.familyname=Family Name
+cms.contenttypes.ldn.ui.contact.givenname=Given Name
+cms.contenttypes.ldn.ui.contact.familyname=Family Name
london.contenttypes.ui.contact.suffix=Suffix
london.contenttypes.ui.contact.phone_number=Number
london.contenttypes.ui.contact.phone_type=Types
@@ -33,3 +33,4 @@ london.contenttypes.ui.contact.remove_contact=Remove contact
london.contenttypes.ui.contact.search_contact_label=Search for Contact:
london.contenttypes.ui.contact.no_contacts_yet=This item does not have a contact.
london.contenttypes.ui.contact.add_contact=Add
+cms.contenttypes.ldn.contact.type_label=Contact
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactType.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactType.java
new file mode 100755
index 000000000..efc43735e
--- /dev/null
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactType.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+package com.arsdigita.cms.contenttypes.ldn;
+
+import java.math.BigDecimal;
+
+import com.arsdigita.cms.ContentItem;
+import com.arsdigita.domain.DataObjectNotFoundException;
+import com.arsdigita.persistence.DataObject;
+import com.arsdigita.persistence.OID;
+
+/**
+ * DomainObject class to represent objects of ContactType. These
+ * objects are associated with Contact objects.
+ *
+ * @author Shashin Shinde sshinde@redhat.com
+ * @version $Id: ContactType.java 287 2005-02-22 00:29:02Z sskracic $
+ */
+public class ContactType extends ContentItem {
+
+ /**
+ * data object type for this domain object
+ */
+ public static final String BASE_DATA_OBJECT_TYPE
+ = "com.arsdigita.cms.contenttypes.ldn.ContactType";
+
+ public static final String TYPE_NAME = "typeName";
+
+ /**
+ * Default constructor.
+ */
+ public ContactType() {
+ super(BASE_DATA_OBJECT_TYPE);
+ }
+
+ /**
+ * Constructor. Retrieves an object instance with the given id.
+ *
+ * @param id the id of the object to retrieve
+ */
+ public ContactType(BigDecimal id) throws DataObjectNotFoundException {
+ this(new OID(BASE_DATA_OBJECT_TYPE, id));
+ }
+
+ /**
+ * Constructor. Retrieves an object instance with the given OID.
+ *
+ * @param oid the object id of the object to retrieve
+ */
+ public ContactType(OID oid) throws DataObjectNotFoundException {
+ super(oid);
+ }
+
+ /**
+ * Constructor. Create a Contact domain object using the given data object.
+ *
+ * @param obj the object data to use
+ */
+ public ContactType(DataObject obj) {
+ super(obj);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param type
+ */
+ public ContactType(String type) {
+ super(type);
+ }
+
+ @Override
+ public String getBaseDataObjectType() {
+ return BASE_DATA_OBJECT_TYPE;
+ }
+
+ public String getTypeName() {
+ return (String) get(TYPE_NAME);
+ }
+
+ public void setTypeName(String tname) {
+ set(TYPE_NAME, tname);
+ }
+
+}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactTypesCollection.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactTypesCollection.java
new file mode 100755
index 000000000..9bf6390a6
--- /dev/null
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ContactTypesCollection.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+package com.arsdigita.cms.contenttypes.ldn;
+
+import java.math.BigDecimal;
+
+import com.arsdigita.domain.DomainCollection;
+import com.arsdigita.domain.DomainObject;
+import com.arsdigita.persistence.DataCollection;
+import com.arsdigita.persistence.SessionManager;
+
+/**
+ * Class which represents a collection of ContactTypes.
+ *
+ * @author Shashin Shinde sshinde@redhat.com
+ * @version $Id: ContactTypesCollection.java 287 2005-02-22 00:29:02Z sskracic $
+ */
+public class ContactTypesCollection extends DomainCollection {
+
+ /**
+ * Retrieve the collection of ContactTypes.
+ */
+ public static ContactTypesCollection getContactTypesCollection() {
+ DataCollection typesColl = SessionManager.getSession().
+ retrieve(ContactType.BASE_DATA_OBJECT_TYPE);
+ return new ContactTypesCollection(typesColl);
+ }
+
+ /**
+ * private Constructor.Single ton type of class.
+ *
+ *
+ */
+ private ContactTypesCollection(DataCollection dataCollection) {
+ super(dataCollection);
+ }
+
+ /**
+ * Returns a DomainObject for the current position in the
+ * collection.
+ *
+ * @return
+ */
+ @Override
+ public DomainObject getDomainObject() {
+ return new ContactType(m_dataCollection.getDataObject());
+ }
+
+ /**
+ * Returns a ContactType for the current position in the
+ * collection.
+ *
+ * @return
+ */
+ public ContactType getContactType() {
+ return (ContactType) getDomainObject();
+ }
+
+ /**
+ * Return the name of ContactType from current row.
+ *
+ * @return
+ */
+ public String getContactTypeName() {
+ return getContactType().getTypeName();
+ }
+
+ /**
+ * Return the ID of ContactType from current row.
+ *
+ * @return
+ */
+ public BigDecimal getContactTypeID() {
+ return getContactType().getID();
+ }
+
+}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/package.html b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/package.html
similarity index 100%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/package.html
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/package.html
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactAddressProperties.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactAddressProperties.java
similarity index 97%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactAddressProperties.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactAddressProperties.java
index 56abe6b10..f014d40ca 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactAddressProperties.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactAddressProperties.java
@@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.cms.ItemSelectionModel;
-import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.util.ContactGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactAddressPropertyForm.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactAddressPropertyForm.java
similarity index 55%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactAddressPropertyForm.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactAddressPropertyForm.java
index 09e931e62..fada84544 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactAddressPropertyForm.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactAddressPropertyForm.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import org.apache.log4j.Logger;
@@ -28,44 +28,49 @@ import com.arsdigita.bebop.parameters.NotNullValidationListener;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
-import com.arsdigita.london.contenttypes.Contact;
-import com.arsdigita.london.contenttypes.ContactAddress;
-import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.Contact;
+import com.arsdigita.cms.contenttypes.ldn.ContactAddress;
+import com.arsdigita.cms.contenttypes.ldn.util.ContactGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
/**
* A form class to edit the properties of ContactAddress object.
- *
- * @author Shashin Shinde sshinde@redhat.com
*
- * @version $Id: ContactAddressPropertyForm.java 287 2005-02-22 00:29:02Z sskracic $
- *
+ * @author Shashin Shinde sshinde@redhat.com
+ *
+ * @version $Id: ContactAddressPropertyForm.java 287 2005-02-22 00:29:02Z
+ * sskracic $
+ *
*/
public class ContactAddressPropertyForm extends BasicItemForm {
-
- private static final Logger s_log = Logger.getLogger(
- ContactAddressPropertyForm.class);
- /** Name of this form */
- private static final String ID = "Contact_address_edit";
-
- /**
- * Creates a new form to edit the ContactAddress object properties
- * associated with the Contact object specified by the
- * item selection model passed in.
- *
- * @param itemModel The ItemSelectionModel to use to obtain the Contact
- * object to work on
- */
- public ContactAddressPropertyForm(ItemSelectionModel itemModel) {
- super(ID, itemModel);
- }
+ private static final Logger s_log = Logger.getLogger(
+ ContactAddressPropertyForm.class);
/**
- * Adds widgets to edit the address properties to form.
- * Only paon and streetDesc are required, rest are optional.
- * This was cut down into small methods for subclasses to pick and choose.
- **/
+ * Name of this form
+ */
+ private static final String ID = "Contact_address_edit";
+
+ /**
+ * Creates a new form to edit the ContactAddress object
+ * properties associated with the Contact object specified by
+ * the item selection model passed in.
+ *
+ * @param itemModel The ItemSelectionModel to use to obtain the Contact
+ * object to work on
+ */
+ public ContactAddressPropertyForm(ItemSelectionModel itemModel) {
+ super(ID, itemModel);
+ }
+
+ /**
+ * Adds widgets to edit the address properties to form. Only paon and
+ * streetDesc are required, rest are optional. This was cut down into small
+ * methods for subclasses to pick and choose.
+ *
+ */
@Override
protected void addWidgets() {
addSAON();
@@ -96,7 +101,7 @@ public class ContactAddressPropertyForm extends BasicItemForm {
paon.addValidationListener(new NotNullValidationListener());
add(paon);
}
-
+
protected void addStreetDesc() {
add(new Label(ContactGlobalizationUtil
.globalize("london.contenttypes.ui.contact.address.streetdesc")));
@@ -105,7 +110,7 @@ public class ContactAddressPropertyForm extends BasicItemForm {
streetDesc.addValidationListener(new NotNullValidationListener());
add(streetDesc);
}
-
+
protected void addStreetRefNo() {
add(new Label(ContactGlobalizationUtil
.globalize("london.contenttypes.ui.contact.address.streetrefno")));
@@ -113,7 +118,7 @@ public class ContactAddressPropertyForm extends BasicItemForm {
TextField streetRefNo = new TextField(streetRefNoParam);
add(streetRefNo);
}
-
+
protected void addLocality() {
add(new Label(ContactGlobalizationUtil
.globalize("london.contenttypes.ui.contact.address.locality")));
@@ -121,7 +126,7 @@ public class ContactAddressPropertyForm extends BasicItemForm {
TextField locality = new TextField(localityParam);
add(locality);
}
-
+
protected void addTown() {
add(new Label(ContactGlobalizationUtil
.globalize("london.contenttypes.ui.contact.address.town")));
@@ -129,7 +134,7 @@ public class ContactAddressPropertyForm extends BasicItemForm {
TextField town = new TextField(townParam);
add(town);
}
-
+
protected void addArea() {
add(new Label(ContactGlobalizationUtil
.globalize("london.contenttypes.ui.contact.address.administrative_area")));
@@ -137,7 +142,7 @@ public class ContactAddressPropertyForm extends BasicItemForm {
TextField adArea = new TextField(adAreaParam);
add(adArea);
}
-
+
protected void addPostTown() {
add(new Label(ContactGlobalizationUtil
.globalize("london.contenttypes.ui.contact.address.posttown")));
@@ -145,7 +150,7 @@ public class ContactAddressPropertyForm extends BasicItemForm {
TextField postTown = new TextField(postTownParam);
add(postTown);
}
-
+
protected void addPostCode() {
add(new Label(ContactGlobalizationUtil
.globalize("london.contenttypes.ui.contact.address.postcode")));
@@ -153,7 +158,7 @@ public class ContactAddressPropertyForm extends BasicItemForm {
TextField postCode = new TextField(postCodeParam);
add(postCode);
}
-
+
protected void addPropRefNo() {
add(new Label(ContactGlobalizationUtil
.globalize("london.contenttypes.ui.contact.address.proprefno")));
@@ -162,74 +167,80 @@ public class ContactAddressPropertyForm extends BasicItemForm {
add(propRefNo);
}
- /**
- * Initialize Form values from Contact object.
- */
- public void init(FormSectionEvent fse) {
+ /**
+ * Initialize Form values from Contact object.
+ *
+ * @param fse
+ */
+ @Override
+ public void init(FormSectionEvent fse) {
- FormData data = fse.getFormData();
- Contact contact = (Contact) this.getItemSelectionModel().getSelectedObject(fse.getPageState());
- ContactAddress ctAddress = contact.getContactAddress();
+ FormData data = fse.getFormData();
+ Contact contact = (Contact) this.getItemSelectionModel().getSelectedObject(fse.getPageState());
+ ContactAddress ctAddress = contact.getContactAddress();
- if(ctAddress != null){
+ if (ctAddress != null) {
- data.put(ContactAddress.PAON, ctAddress.getPaon());
- data.put(ContactAddress.SAON, ctAddress.getSaon());
- data.put(ContactAddress.STREET_DESC, ctAddress.getStreetDesc());
- data.put(ContactAddress.STREET_REF_NO, ctAddress.getStreetRefNo());
- data.put(ContactAddress.LOCALITY, ctAddress.getLocality());
- data.put(ContactAddress.TOWN, ctAddress.getTown());
- data.put(ContactAddress.ADMINISTRATIVE_AREA, ctAddress.getAdministrativeArea());
- data.put(ContactAddress.POST_TOWN, ctAddress.getPostTown());
- data.put(ContactAddress.POST_CODE, ctAddress.getPostCode());
- data.put(ContactAddress.PROP_REF_NO, ctAddress.getReferenceNo());
+ data.put(ContactAddress.PAON, ctAddress.getPaon());
+ data.put(ContactAddress.SAON, ctAddress.getSaon());
+ data.put(ContactAddress.STREET_DESC, ctAddress.getStreetDesc());
+ data.put(ContactAddress.STREET_REF_NO, ctAddress.getStreetRefNo());
+ data.put(ContactAddress.LOCALITY, ctAddress.getLocality());
+ data.put(ContactAddress.TOWN, ctAddress.getTown());
+ data.put(ContactAddress.ADMINISTRATIVE_AREA, ctAddress.getAdministrativeArea());
+ data.put(ContactAddress.POST_TOWN, ctAddress.getPostTown());
+ data.put(ContactAddress.POST_CODE, ctAddress.getPostCode());
+ data.put(ContactAddress.PROP_REF_NO, ctAddress.getReferenceNo());
+ }
}
- }
- /**
- * Process the form submission event.
- * Create a new ContactAddress object and associate it with
- * Contact object if one does not exist yet.
- */
- public void process(FormSectionEvent fse) {
+ /**
+ * Process the form submission event. Create a new
+ * ContactAddress object and associate it with
+ * Contact object if one does not exist yet.
+ *
+ * @param fse
+ */
+ @Override
+ public void process(FormSectionEvent fse) {
- FormData data = fse.getFormData();
- Contact contact = (Contact) this.getItemSelectionModel().getSelectedObject(fse.getPageState());
- s_log.debug("Process Event Object :" + contact);
+ FormData data = fse.getFormData();
+ Contact contact = (Contact) this.getItemSelectionModel().getSelectedObject(fse.getPageState());
+ s_log.debug("Process Event Object :" + contact);
- // save only if save button was pressed
- if (contact != null
- && getSaveCancelSection().getSaveButton().isSelected(fse.getPageState())) {
-
- ContactAddress ctAddress = contact.getContactAddress();
+ // save only if save button was pressed
+ if (contact != null
+ && getSaveCancelSection().getSaveButton().isSelected(fse.getPageState())) {
+
+ ContactAddress ctAddress = contact.getContactAddress();
//User submitted the Form.If the associated ContactAddress does not exist
- //just create it.
- if(ctAddress == null){
- ctAddress = new ContactAddress();
- ctAddress.setName("address-for-contact-"+ contact.getID());
- }
+ //just create it.
+ if (ctAddress == null) {
+ ctAddress = new ContactAddress();
+ ctAddress.setName("address-for-contact-" + contact.getID());
+ }
- ctAddress.setPaon((String) data.get(ContactAddress.PAON));
- ctAddress.setSaon((String) data.get(ContactAddress.SAON));
- ctAddress.setStreetDesc((String) data.get(ContactAddress.STREET_DESC));
- ctAddress.setStreetRefNo((String) data.get(ContactAddress.STREET_REF_NO));
+ ctAddress.setPaon((String) data.get(ContactAddress.PAON));
+ ctAddress.setSaon((String) data.get(ContactAddress.SAON));
+ ctAddress.setStreetDesc((String) data.get(ContactAddress.STREET_DESC));
+ ctAddress.setStreetRefNo((String) data.get(ContactAddress.STREET_REF_NO));
- ctAddress.setLocality((String) data.get(ContactAddress.LOCALITY));
- ctAddress.setTown((String) data.get(ContactAddress.TOWN));
- ctAddress.setAdministrativeArea((String) data.get(ContactAddress.ADMINISTRATIVE_AREA));
- ctAddress.setPostTown((String) data.get(ContactAddress.POST_TOWN));
- ctAddress.setPostCode((String) data.get(ContactAddress.POST_CODE));
- ctAddress.setReferenceNo((String) data.get(ContactAddress.PROP_REF_NO));
+ ctAddress.setLocality((String) data.get(ContactAddress.LOCALITY));
+ ctAddress.setTown((String) data.get(ContactAddress.TOWN));
+ ctAddress.setAdministrativeArea((String) data.get(ContactAddress.ADMINISTRATIVE_AREA));
+ ctAddress.setPostTown((String) data.get(ContactAddress.POST_TOWN));
+ ctAddress.setPostCode((String) data.get(ContactAddress.POST_CODE));
+ ctAddress.setReferenceNo((String) data.get(ContactAddress.PROP_REF_NO));
- ctAddress.save();
+ ctAddress.save();
- //If not present then only set and save Contact object.
- if(contact.getContactAddress() == null){
- contact.setContactAddress(ctAddress);
- contact.save();
- }
+ //If not present then only set and save Contact object.
+ if (contact.getContactAddress() == null) {
+ contact.setContactAddress(ctAddress);
+ contact.save();
+ }
+ }
}
- }
}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactCreate.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactCreate.java
similarity index 90%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactCreate.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactCreate.java
index e49f80a85..6bd82aa54 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactCreate.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactCreate.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.FormProcessException;
@@ -29,8 +29,8 @@ import com.arsdigita.cms.ContentBundle;
import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.Folder;
import com.arsdigita.cms.ItemSelectionModel;
-import com.arsdigita.london.contenttypes.Contact;
-import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.Contact;
+import com.arsdigita.cms.contenttypes.ldn.util.ContactGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.CreationSelector;
import com.arsdigita.cms.ui.authoring.PageCreate;
@@ -44,7 +44,7 @@ import com.arsdigita.cms.ui.authoring.PageCreate;
*/
public class ContactCreate extends PageCreate {
- private CreationSelector m_parent;
+ private final CreationSelector m_parent;
public ContactCreate(ItemSelectionModel itemModel,
CreationSelector parent) {
@@ -61,13 +61,13 @@ public class ContactCreate extends PageCreate {
TextField givenName = new TextField(Contact.GIVEN_NAME);
add(new Label(ContactGlobalizationUtil
- .globalize("london.contenttypes.ui.contact.givenname")));
+ .globalize("cms.contenttypes.ldn.ui.contact.givenname")));
givenName.addValidationListener(new NotNullValidationListener());
add(givenName);
TextField familyName = new TextField(Contact.FAMILY_NAME);
add(new Label(ContactGlobalizationUtil
- .globalize("london.contenttypes.ui.contact.familyname")));
+ .globalize("cms.contenttypes.ldn.ui.contact.familyname")));
familyName.addValidationListener(new NotNullValidationListener());
add(familyName);
}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactCreatePhone.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactCreatePhone.java
similarity index 93%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactCreatePhone.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactCreatePhone.java
index 89a70f8ef..0297cec13 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactCreatePhone.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactCreatePhone.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.Label;
@@ -28,10 +28,10 @@ import com.arsdigita.bebop.parameters.NotNullValidationListener;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
-import com.arsdigita.london.contenttypes.Contact;
-import com.arsdigita.london.contenttypes.ContactInitializer;
-import com.arsdigita.london.contenttypes.ContactPhone;
-import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.Contact;
+import com.arsdigita.cms.contenttypes.ldn.ContactInitializer;
+import com.arsdigita.cms.contenttypes.ldn.ContactPhone;
+import com.arsdigita.cms.contenttypes.ldn.util.ContactGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import java.util.ArrayList;
@@ -89,6 +89,7 @@ class ContactCreatePhone extends BasicItemForm {
/**
*/
+ @Override
public void init(FormSectionEvent e) {
//Do nothing.
}
@@ -97,6 +98,7 @@ class ContactCreatePhone extends BasicItemForm {
* Create an object of type ContactPhone and add it
* to Contact object retrieved from passed in ItemSelectionModel.
*/
+ @Override
public void process(FormSectionEvent fse) {
FormData data = fse.getFormData();
Contact contact = (Contact) m_model.getSelectedObject(fse.getPageState());
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPhonesPanel.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPhonesPanel.java
similarity index 94%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPhonesPanel.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPhonesPanel.java
index 4692b89ba..e73fa79d9 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPhonesPanel.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPhonesPanel.java
@@ -16,14 +16,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicItemForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
-import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.util.ContactGlobalizationUtil;
/**
* A UI step to manipulate Phones for the Contact object which is
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPhonesTable.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPhonesTable.java
similarity index 94%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPhonesTable.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPhonesTable.java
index 34bc09f06..354d7a2a1 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPhonesTable.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPhonesTable.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.ControlLink;
@@ -33,10 +33,10 @@ import com.arsdigita.bebop.table.TableModelBuilder;
import com.arsdigita.cms.CMS;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.SecurityManager;
-import com.arsdigita.london.contenttypes.Contact;
-import com.arsdigita.london.contenttypes.ContactPhone;
-import com.arsdigita.london.contenttypes.ContactPhonesCollection;
-import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.Contact;
+import com.arsdigita.cms.contenttypes.ldn.ContactPhone;
+import com.arsdigita.cms.contenttypes.ldn.ContactPhonesCollection;
+import com.arsdigita.cms.contenttypes.ldn.util.ContactGlobalizationUtil;
import com.arsdigita.util.LockableImpl;
import org.apache.log4j.Logger;
@@ -108,7 +108,7 @@ class ContactPhonesTable extends Table implements TableActionListener {
private class PhonesTableModelBuilder extends LockableImpl
implements TableModelBuilder {
- private ItemSelectionModel m_sel;
+ private final ItemSelectionModel m_sel;
/**
* Private class constructor
@@ -124,6 +124,7 @@ class ContactPhonesTable extends Table implements TableActionListener {
* @param state
* @return
*/
+ @Override
public TableModel makeModel(Table table, PageState state) {
table.getRowSelectionModel().clearSelection(state);
@@ -138,8 +139,8 @@ class ContactPhonesTable extends Table implements TableActionListener {
*/
private class PhonesTableModel implements TableModel {
- private Table m_table;
- private ContactPhonesCollection m_phones;
+ private final Table m_table;
+ private final ContactPhonesCollection m_phones;
private ContactPhone m_phone;
/**
@@ -154,6 +155,7 @@ class ContactPhonesTable extends Table implements TableActionListener {
}
/** Return the number of columsn this TableModel has. */
+ @Override
public int getColumnCount() {
return m_table.getColumnModel().size();
}
@@ -162,6 +164,7 @@ class ContactPhonesTable extends Table implements TableActionListener {
* check collection for the existence of another row. If it has fetch
* the value of Current Phone object into m_phone class variable.
*/
+ @Override
public boolean nextRow() {
if (m_phones != null && m_phones.next()) {
m_phone = m_phones.getPhone();
@@ -177,6 +180,7 @@ class ContactPhonesTable extends Table implements TableActionListener {
*
* @see com.arsdigita.bebop.table.TableModel#getElementAt(int)
*/
+ @Override
public Object getElementAt(int columnIndex) {
switch (columnIndex) {
@@ -200,6 +204,7 @@ class ContactPhonesTable extends Table implements TableActionListener {
*
* @see com.arsdigita.bebop.table.TableModel#getKeyAt(int)
*/
+ @Override
public Object getKeyAt(int columnIndex) {
return m_phone.getID();
}
@@ -226,6 +231,7 @@ class ContactPhonesTable extends Table implements TableActionListener {
* @return the link to delete the selected
* entry or just a label without link.
*/
+ @Override
public Component getComponent(Table table, PageState state,
Object value, boolean isSelected,
Object key, int row, int column) {
@@ -263,6 +269,7 @@ class ContactPhonesTable extends Table implements TableActionListener {
* Provide implementation to TableActionListener method. Code that comes
* into picture when a link on the table is clicked. Handles delete event.
*/
+ @Override
public void cellSelected(TableActionEvent evt) {
PageState state = evt.getPageState();
@@ -281,6 +288,7 @@ class ContactPhonesTable extends Table implements TableActionListener {
* provide Implementation to TableActionListener method. Does nothing in our
* case.
*/
+ @Override
public void headSelected(TableActionEvent e) {
throw new UnsupportedOperationException("Not Implemented");
}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPropertiesAddStep.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPropertiesAddStep.java
similarity index 95%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPropertiesAddStep.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPropertiesAddStep.java
index 83a4d1a76..7888fd7f2 100644
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPropertiesAddStep.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPropertiesAddStep.java
@@ -1,4 +1,4 @@
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import org.apache.log4j.Logger;
@@ -14,9 +14,9 @@ import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.util.GlobalizationUtil;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ItemSelectionModel;
-import com.arsdigita.london.contenttypes.Contact;
+import com.arsdigita.cms.contenttypes.ldn.Contact;
import com.arsdigita.cms.contenttypes.ui.ResettableContainer;
-import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.util.ContactGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.workflow.WorkflowLockedContainer;
import com.arsdigita.domain.DomainObject;
@@ -199,17 +199,18 @@ public class ContactPropertiesAddStep extends ResettableContainer {
Contact.TITLE);
sheet.add(ContactGlobalizationUtil.globalize(
- "com.arsdigita.london.contenttypes.ui.contact_givenname"),
+ "cms.contenttypes.ldn.ui.contact.givenname"),
Contact.GIVEN_NAME);
sheet.add(ContactGlobalizationUtil.globalize(
- "com.arsdigita.london.contenttypes.ui.contact_familyname"),
+ "cms.contenttypes.ldn.ui.contact.familyname"),
Contact.FAMILY_NAME);
sheet.add(ContactGlobalizationUtil.globalize(
"com.arsdigita.london.contenttypes.ui.contact_type"),
Contact.CONTACT_TYPE,
new DomainObjectPropertySheet.AttributeFormatter() {
+ @Override
public String format(DomainObject item,
String attribute,
PageState state) {
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPropertiesStep.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPropertiesStep.java
similarity index 93%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPropertiesStep.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPropertiesStep.java
index 170ffb122..33ed38f00 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPropertiesStep.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPropertiesStep.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.cms.ItemSelectionModel;
@@ -26,8 +26,8 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.domain.DomainObject;
-import com.arsdigita.london.contenttypes.Contact;
-import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.Contact;
+import com.arsdigita.cms.contenttypes.ldn.util.ContactGlobalizationUtil;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
import com.arsdigita.bebop.PageState;
@@ -77,11 +77,11 @@ public class ContactPropertiesStep extends SimpleEditStep {
Contact.NAME);
sheet.add(ContactGlobalizationUtil.globalize(
- "london.contenttypes.ui.contact.givenname"),
+ "cms.contenttypes.ldn.ui.contact.givenname"),
Contact.GIVEN_NAME);
sheet.add(ContactGlobalizationUtil.globalize(
- "london.contenttypes.ui.contact.familyname"),
+ "cms.contenttypes.ldn.ui.contact.familyname"),
Contact.FAMILY_NAME);
sheet.add(ContactGlobalizationUtil.globalize(
@@ -92,6 +92,7 @@ public class ContactPropertiesStep extends SimpleEditStep {
"london.contenttypes.ui.contact.type"),
Contact.CONTACT_TYPE,
new DomainObjectPropertySheet.AttributeFormatter() {
+ @Override
public String format(DomainObject item,
String attribute,
PageState state) {
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPropertyForm.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPropertyForm.java
similarity index 96%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPropertyForm.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPropertyForm.java
index e2c99e83b..d7074fdd6 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactPropertyForm.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactPropertyForm.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import java.math.BigDecimal;
@@ -30,10 +30,10 @@ import com.arsdigita.bebop.form.TextField;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
-import com.arsdigita.london.contenttypes.Contact;
-import com.arsdigita.london.contenttypes.ContactType;
-import com.arsdigita.london.contenttypes.ContactTypesCollection;
-import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.Contact;
+import com.arsdigita.cms.contenttypes.ldn.ContactType;
+import com.arsdigita.cms.contenttypes.ldn.ContactTypesCollection;
+import com.arsdigita.cms.contenttypes.ldn.util.ContactGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.util.GlobalizationUtil;
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactToItemAddForm.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactToItemAddForm.java
similarity index 96%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactToItemAddForm.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactToItemAddForm.java
index 9ff21b255..71648bb4b 100644
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ui/ContactToItemAddForm.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/ui/ContactToItemAddForm.java
@@ -1,4 +1,4 @@
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.ActionLink;
import com.arsdigita.bebop.ColumnPanel;
@@ -18,10 +18,10 @@ import com.arsdigita.bebop.event.FormValidationListener;
import com.arsdigita.bebop.util.GlobalizationUtil;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ItemSelectionModel;
-import com.arsdigita.london.contenttypes.Contact;
+import com.arsdigita.cms.contenttypes.ldn.Contact;
import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
-import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.util.ContactGlobalizationUtil;
public class ContactToItemAddForm extends FormSection implements
FormInitListener, FormValidationListener, FormProcessListener,
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/util/ContactGlobalizationUtil.java b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/util/ContactGlobalizationUtil.java
similarity index 88%
rename from ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/util/ContactGlobalizationUtil.java
rename to ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/util/ContactGlobalizationUtil.java
index 08436d997..b3938c01d 100755
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/util/ContactGlobalizationUtil.java
+++ b/ccm-ldn-types-contact/src/com/arsdigita/cms/contenttypes/ldn/util/ContactGlobalizationUtil.java
@@ -16,9 +16,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.london.contenttypes.util;
+package com.arsdigita.cms.contenttypes.ldn.util;
-import com.arsdigita.globalization.Globalized;
import com.arsdigita.globalization.GlobalizedMessage;
/**
@@ -34,11 +33,14 @@ public class ContactGlobalizationUtil {
/** Name of Java resource files to handle Contact's globalisation. */
final public static String BUNDLE_NAME =
- "com.arsdigita.london.contenttypes.ContactResources";
+ "com.arsdigita.cms.contenttypes.ldn.ContactResources";
/**
* Returns a globalized message using the package specific bundle,
- * provided by BUNDLE_NAME.
+ * provided by BUNDLE_NAME.
+ *
+ * @param key
+ * @return
*/
public static GlobalizedMessage globalize(String key) {
return new GlobalizedMessage(key, BUNDLE_NAME);
@@ -48,6 +50,10 @@ public class ContactGlobalizationUtil {
* Returns a globalized message object, using the package specific bundle,
* as specified by BUNDLE_NAME. Also takes in an Object[] of arguments to
* interpolate into the retrieved message using the MessageFormat class.
+ *
+ * @param key
+ * @param args
+ * @return
*/
public static GlobalizedMessage globalize(String key, Object[] args) {
return new GlobalizedMessage(key, BUNDLE_NAME, args);
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/Contact.java b/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/Contact.java
deleted file mode 100755
index 931c33168..000000000
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/Contact.java
+++ /dev/null
@@ -1,352 +0,0 @@
-/*
- * Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-package com.arsdigita.london.contenttypes;
-
-import java.math.BigDecimal;
-
-import org.apache.log4j.Logger;
-
-import com.arsdigita.cms.ContentItem;
-import com.arsdigita.cms.ContentPage;
-import com.arsdigita.cms.ContentType;
-import com.arsdigita.domain.DataObjectNotFoundException;
-import com.arsdigita.persistence.DataAssociation;
-import com.arsdigita.persistence.DataAssociationCursor;
-import com.arsdigita.persistence.DataObject;
-import com.arsdigita.persistence.DataOperation;
-import com.arsdigita.persistence.DataQuery;
-import com.arsdigita.persistence.OID;
-import com.arsdigita.persistence.SessionManager;
-import com.arsdigita.util.Assert;
-
-
-/**
- * DomainObject class to represent Contact ContentType
- * objects.
- *
- * @author Shashin Shinde sshinde@redhat.com
- * @version $Id: Contact.java 1689 2007-10-26 11:06:23Z chrisg23 $
- */
-public class Contact extends ContentPage {
-
- /** PDL property names */
- /*
- * Flattened out Person object properties.Next 3 properties can be moved out
- * to seperate object if needed.
- */
- public static final String GIVEN_NAME = "givenName";
- public static final String FAMILY_NAME = "familyName";
- public static final String SUFFIX = "suffix";
- public static final String EMAILS = "emails";
-
- public static final String DESCRIPTION = "description";
- public static final String ORG_NAME = "orgName";
- public static final String DEPT_NAME = "deptName";
- public static final String ROLE = "role";
-
- /* Composite objects used by this class */
- public static final String CONTACT_TYPE = "contactType";
- public static final String CONTACT_ADDRESS = "contactAddress";
- public static final String PHONES = "phones";
-
- public static final String ITEMS = "associatedContentItemsForContact";
-
- private static final Logger s_log = Logger.getLogger(Contact.class);
-
- /** data object type for this domain object */
- public static final String BASE_DATA_OBJECT_TYPE =
- "com.arsdigita.london.contenttypes.Contact";
-
- /** Default constructor. */
- public Contact() {
- super(BASE_DATA_OBJECT_TYPE);
- }
-
- /**
- * Adds an association between this contact and the given content item.
- * @param item
- */
- public void addContentItem(ContentItem item) {
- s_log.debug("item is " + item);
- item.addToAssociation(getItemsForContact());
- }
-
- /**
- * Deletes the association between this contact and the given content item.
- * @param item
- */
- public void removeContentItem(ContentItem item) {
- s_log.debug("item is " + item);
- DataOperation operation = SessionManager
- .getSession()
- .retrieveDataOperation(
- "com.arsdigita.london.contenttypes.removeContactFromContentItemAssociation");
- operation.setParameter("itemID", new Integer(item.getID().intValue()));
- operation.execute();
- }
-
- /**
- * Removes all mappings between this contact and any other content item.
- *
- */
- private void removeItemMappings() {
- DataOperation operation = SessionManager
- .getSession()
- .retrieveDataOperation(
- "com.arsdigita.london.contenttypes.removeContactFromAllAssociations");
- operation.setParameter("contactID", new Integer(this.getID().intValue()));
- operation.execute();
- }
-
-
- /**
- * Gets the DataAssociation that holds the mapping between this contact
- * and any content items.
- * @return
- */
- public DataAssociation getItemsForContact() {
- return (DataAssociation) get(ITEMS);
- }
-
-
- /**
- * Returns the Contact for a given content item.
- * @param item
- * @return
- */
- public static Contact getContactForItem(ContentItem item) {
- s_log.debug("getting contact for item " + item);
- DataQuery query = SessionManager.getSession().retrieveQuery(
- "com.arsdigita.london.contenttypes.getContactForItem");
- query.setParameter("itemID", item.getID());
- BigDecimal contactID;
- Contact contact = null;
- while (query.next()) {
- contactID = (BigDecimal) query.get("contactID");
- contact = new Contact(contactID);
- }
- s_log.debug("returning contact " + contact);
- return contact;
- }
-
-
-
-
- /**
- * Constructor. Retrieves an object instance with the given id.
- * @param id the id of the object to retrieve
- */
- public Contact( BigDecimal id ) throws DataObjectNotFoundException {
- this(new OID(BASE_DATA_OBJECT_TYPE, id));
- }
-
- /**
- * Constructor. Retrieves an object instance with the given OID.
- *
- * @param oid the object id of the object to retrieve
- */
- public Contact(OID oid) throws DataObjectNotFoundException {
- super(oid);
- }
-
- /**
- * Constructor. Create a Contact domain object using the given data object.
- * @param obj the object data to use
- */
- public Contact( DataObject obj ) {
- super(obj);
- }
-
- /** Constructor. */
- public Contact( String type ) {
- super(type);
- }
-
- public void beforeSave() {
- super.beforeSave();
-
- Assert.exists(getContentType(), ContentType.class);
- }
-
- public String getBaseDataObjectType() {
- return BASE_DATA_OBJECT_TYPE;
- }
-
- /** Accessor. Get the GIVEN_NAME for this Contact. */
- public String getGivenName(){
- return (String) get(GIVEN_NAME);
- }
-
- /** Mutator. Set the GIVEN_NAME for this Contact. */
- public void setGivenName(String gn){
- set(GIVEN_NAME , gn);
- }
-
- /** Accessor. Get the FAMILY_NAME for this Contact. */
- public String getFamilyName(){
- return (String) get(FAMILY_NAME);
- }
-
- /** Mutator. Set the FAMILY_NAME for this Contact. */
- public void setFamilyName(String fn){
- set(FAMILY_NAME , fn);
- }
-
- /** Accessor. Get the SUFFIX for this Contact. */
- public String getSuffix(){
- return (String) get(SUFFIX);
- }
-
- /** Mutator. Set the DESCRIPTION for this Contact. */
- public void setSuffix(String suf){
- set(SUFFIX , suf);
- }
-
- /** Accessor. Get the EMAILS for this Contact. */
- public String getEmails(){
- return (String) get(EMAILS);
- }
-
- /** Mutator. Set the EMAILS for this Contact. */
- public void setEmails(String ems){
- set(EMAILS , ems);
- }
-
- /** Accessor. Get the CONTACT_TYPE for this Contact. */
- public String getContactTypeName() {
- String ctTypeName = "";
- if(getContactType() != null){
- ctTypeName = getContactType().getTypeName();
- }
- return ctTypeName;
- }
-
- /** Accessor. Get the DESCRIPTION for this Contact. */
- @Override
- public String getDescription() {
- return (String) get(DESCRIPTION);
- }
-
- /** Mutator. Set the DESCRIPTION for this Contact. */
- @Override
- public void setDescription( String desc ) {
- set(DESCRIPTION , desc);
- }
-
- /** Accessor. Get the ORG_NAME for this Contact. */
- public String getOrganisationName() {
- return (String) get(ORG_NAME);
- }
-
- /** Mutator. Set the ORG_NAME for this Contact. */
- public void setOrganisationName( String orgName ) {
- set(ORG_NAME , orgName);
- }
-
- /** Accessor. Get the DEPT_NAME for this Contact. */
- public String getDeptName() {
- return (String) get(DEPT_NAME);
- }
-
- /** Mutator. Set the DEPT_NAME for this Contact. */
- public void setDeptName( String deptName ) {
- set(DEPT_NAME , deptName);
- }
-
- /** Accessor. Get the ROLE for this Contact. */
- public String getRole() {
- return (String) get(ROLE);
- }
-
- /** Mutator. Set the ROLE for this Contact. */
- public void setRole( String role ) {
- set(ROLE , role);
- }
-
- /**
- * return type of Contact associated with this Contact object.
- *
- * @return null if there is no associated object.
- */
- public ContactType getContactType(){
- DataObject obj = retrieveDataobject( CONTACT_TYPE );
- if(obj != null){
- return new ContactType(obj);
- }
- return null;
- }
-
- /** Mutator. Set the CONTACT_TYPE for this Contact. */
- public void setContactType( ContactType ct ) {
- setAssociation(CONTACT_TYPE , ct);
- }
-
-/******* ContactAddress object manipulation methods *********************/
- /**
- * set the ContactAddress object association.
- */
- public void setContactAddress(ContactAddress caddr){
- setAssociation(CONTACT_ADDRESS , caddr);
- }
-
- /**
- * Get the associated ContactAddress object for this Contact.
- * @return null if no Address is present.
- */
- public ContactAddress getContactAddress(){
- DataObject obj = retrieveDataobject( CONTACT_ADDRESS);
- if(obj != null){
- return new ContactAddress(obj);
- }
- return null;
- }
-
- /******* ContactPhone object manipulation methods *********************/
-
- /**
- * Add a Phone object to the collection of the phone objects this contact
- * has.
- */
- public void addPhone(ContactPhone ph){
- add(PHONES , ph);
- save();
- }
-
- /**
- * Remove the passed in Phone object from the list of phones this contact
- * object has.
- */
- public void removePhone(ContactPhone ph){
- ph.delete();
- save();
- }
-
- /**
- * Return collection of Phone objects associated with this Contact object.
- */
- public ContactPhonesCollection getPhones(){
- DataAssociationCursor dac = ((DataAssociation) get(PHONES)).cursor();
- return new ContactPhonesCollection(dac);
- }
-
- private DataObject retrieveDataobject(String attr){
- return ( DataObject ) get( attr );
- }
-
-} //End of class.
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactAddress.java b/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactAddress.java
deleted file mode 100755
index 9baa63802..000000000
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactAddress.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-package com.arsdigita.london.contenttypes;
-
-import java.math.BigDecimal;
-
-import com.arsdigita.cms.ContentItem;
-import com.arsdigita.domain.DataObjectNotFoundException;
-import com.arsdigita.persistence.DataObject;
-import com.arsdigita.persistence.OID;
-
-/**
- * DomainObject class to represent objects of type ContactAddress
- * These objects are associated with Contact objects in this package.
- *
- * @author Shashin Shinde sshinde@redhat.com
- * @version $Id: ContactAddress.java 287 2005-02-22 00:29:02Z sskracic $
- */
-public class ContactAddress extends ContentItem {
-
- /** data object type for this domain object */
- public static final String BASE_DATA_OBJECT_TYPE =
- "com.arsdigita.london.contenttypes.ContactAddress";
-
- public static final String SAON = "saon";
- public static final String PAON = "paon";
- public static final String STREET_DESC = "streetDesc";
- public static final String STREET_REF_NO = "streetRefNo";
- public static final String LOCALITY = "locality";
- public static final String TOWN = "town";
- public static final String ADMINISTRATIVE_AREA = "administrativeArea";
- public static final String POST_TOWN = "postTown";
- public static final String POST_CODE = "postCode";
- public static final String PROP_REF_NO = "referenceNo";
-
- /** Default constructor. */
- public ContactAddress() {
- super(BASE_DATA_OBJECT_TYPE);
- }
-
- /**
- * Constructor. Retrieves an object instance with the given id.
- * @param id the id of the object to retrieve
- */
- public ContactAddress(BigDecimal id) throws DataObjectNotFoundException {
- this(new OID(BASE_DATA_OBJECT_TYPE, id));
- }
-
- /**
- * Constructor. Create a Contact domain object using the given data object.
- * @param obj the object data to use
- */
- public ContactAddress(DataObject obj) {
- super(obj);
- }
-
- /**
- * Constructor. Retrieves an object instance with the given OID.
- *
- * @param oid the object id of the object to retrieve
- */
- public ContactAddress(OID oid) throws DataObjectNotFoundException {
- super(oid);
- }
-
- /** Constructor. */
- public ContactAddress( String type ) {
- super(type);
- }
-
- public String getBaseDataObjectType() {
- return BASE_DATA_OBJECT_TYPE;
- }
-
- public String getSaon() {
- return (String) get(SAON);
- }
-
- public void setSaon(String saon) {
- set(SAON,saon);
- }
-
- public String getPaon() {
- return (String) get(PAON);
- }
-
- public void setPaon(String paon) {
- set(PAON , paon);
- }
-
- public String getStreetDesc() {
- return (String) get(STREET_DESC);
- }
-
- public void setStreetDesc(String desc) {
- set(STREET_DESC,desc);
- }
-
- public String getStreetRefNo() {
- return (String) get(STREET_REF_NO);
- }
-
- public void setStreetRefNo(String refno) {
- set(STREET_REF_NO,refno);
- }
-
- public String getLocality() {
- return (String) get(LOCALITY);
- }
-
- public void setLocality(String locality) {
- set(LOCALITY,locality);
- }
-
- public String getTown() {
- return (String) get(TOWN);
- }
-
- public void setTown(String town) {
- set(TOWN,town);
- }
-
- public String getAdministrativeArea() {
- return (String) get(ADMINISTRATIVE_AREA);
- }
-
- public void setAdministrativeArea(String adArea) {
- set(ADMINISTRATIVE_AREA,adArea);
- }
-
- public String getPostTown() {
- return (String) get(POST_TOWN);
- }
-
- public void setPostTown(String ptown) {
- set(POST_TOWN, ptown);
- }
-
- public String getPostCode() {
- return (String) get(POST_CODE);
- }
-
- public void setPostCode(String pcode) {
- set(POST_CODE, pcode);
- }
-
- public String getReferenceNo() {
- return (String) get(PROP_REF_NO);
- }
-
- public void setReferenceNo(String refno) {
- set(PROP_REF_NO, refno);
- }
-
-}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactLoader.java b/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactLoader.java
deleted file mode 100755
index 7bd48d795..000000000
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactLoader.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-package com.arsdigita.london.contenttypes;
-
-import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
-import com.arsdigita.runtime.ScriptContext;
-
-/**
- * Loader for ContentType Contact.
- *
- * Also loads a fixed set of ContactType objects.
- *
- * @author Shashin Shinde sshinde@redhat.com
- *
- * @version $Id: ContactLoader.java 287 2005-02-22 00:29:02Z sskracic $
- *
- */
-public class ContactLoader extends AbstractContentTypeLoader {
-
- /** Defines the xml file containing the Contact content types property
- * definitions. */
- private static final String[] TYPES = {
- "/WEB-INF/content-types/com/arsdigita/london/contenttypes/Contact.xml"
- };
-
- /**
- * Provides the of Contact contenttype property definitions implementing
- * the parent's class abstract method.
- *
- * The file defines the types name as displayed in content center
- * select box and the authoring steps. These are loaded into database.
- *
- * @return String Atring Array of fully qualified file names
- */
- public String[] getTypes() {
- return TYPES;
- }
-
- /**
- * @see com.arsdigita.runtime.Script#run(com.arsdigita.runtime.ScriptContext)
- */
- @Override
- public void run(ScriptContext context) {
- super.run(context);
- loadContactTypes();
- }
-
- /**
- * Create the fixed set of ContactTypes.
- * This is a quick hack for now.If we need to extend it then we have
- * to move it into an XML file and load it from initializer after
- * checking it.
- */
- protected void loadContactTypes(){
- ContactType ct = new ContactType();
- ct.setName("ContactType-Service-Provision");
- ct.setTypeName("Service Provision");
- ct.save();
-
- ct = new ContactType();
- ct.setName("ContactType-Enquiry");
- ct.setTypeName("Enquiry");
- ct.save();
-
- ct = new ContactType();
- ct.setName("ContactType-Complaint");
- ct.setTypeName("Complaint");
- ct.save();
-
- ct = new ContactType();
- ct.setName("ContactType-Escalation");
- ct.setTypeName("Escalation");
- ct.save();
-
- }
-
-}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactPhone.java b/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactPhone.java
deleted file mode 100755
index 345b9d8d2..000000000
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactPhone.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-package com.arsdigita.london.contenttypes;
-
-import java.math.BigDecimal;
-
-import com.arsdigita.cms.ContentItem;
-import com.arsdigita.domain.DataObjectNotFoundException;
-import com.arsdigita.persistence.DataObject;
-import com.arsdigita.persistence.OID;
-
-/**
- * DomainObject class to represent objects of type ContactPhone.
- * This object represents type of phone and it's number.
- * They are associated with Contact objects.
- *
- * @author Shashin Shinde sshinde@redhat.com
- *
- * @version $Id: ContactPhone.java 287 2005-02-22 00:29:02Z sskracic $
- *
- */
-public class ContactPhone extends ContentItem {
-
- /** data object type for this domain object */
- public static final String BASE_DATA_OBJECT_TYPE =
- "com.arsdigita.london.contenttypes.ContactPhone";
-
- /** PDL property names */
- public static final String PHONE_TYPE = "phoneType";
- public static final String PHONE_NUMBER = "phoneNumber";
-
- /** Default constructor. */
- public ContactPhone() {
- super(BASE_DATA_OBJECT_TYPE);
- }
-
- /**
- * Constructor. Retrieves an object instance with the given OID.
- *
- * @param oid the object id of the object to retrieve
- */
- public ContactPhone(OID oid) throws DataObjectNotFoundException {
- super(oid);
- }
-
- /**
- * Constructor. Retrieves an object instance with the given id.
- * @param id the id of the object to retrieve
- */
- public ContactPhone( BigDecimal id ) throws DataObjectNotFoundException {
- this(new OID(BASE_DATA_OBJECT_TYPE, id));
- }
-
- /**
- * Constructor. Create a Contact domain object using the given data object.
- * @param obj the object data to use
- */
- public ContactPhone( DataObject obj ) {
- super(obj);
- }
-
- /** Constructor. */
- public ContactPhone( String type ) {
- super(type);
- }
-
- @Override
- public String getBaseDataObjectType() {
- return BASE_DATA_OBJECT_TYPE;
- }
-
- //Accessors
- public String getPhoneType(){
- return (String) get(PHONE_TYPE);
- }
-
- public String getPhoneNumber(){
- return (String) get(PHONE_NUMBER);
- }
-
- public void setPhoneNumber(String num){
- set(PHONE_NUMBER,num);
- }
-
- public void setPhoneType(String type){
- set(PHONE_TYPE, type);
- }
-
-}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactType.java b/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactType.java
deleted file mode 100755
index 737bef80f..000000000
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactType.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-package com.arsdigita.london.contenttypes;
-
-import java.math.BigDecimal;
-
-import com.arsdigita.cms.ContentItem;
-import com.arsdigita.domain.DataObjectNotFoundException;
-import com.arsdigita.persistence.DataObject;
-import com.arsdigita.persistence.OID;
-
-/**
- * DomainObject class to represent objects of ContactType.
- * These objects are associated with Contact objects.
- *
- * @author Shashin Shinde sshinde@redhat.com
- * @version $Id: ContactType.java 287 2005-02-22 00:29:02Z sskracic $
- */
-public class ContactType extends ContentItem {
-
- /** data object type for this domain object */
- public static final String BASE_DATA_OBJECT_TYPE =
- "com.arsdigita.london.contenttypes.ContactType";
-
- public static final String TYPE_NAME = "typeName";
-
- /** Default constructor. */
- public ContactType() {
- super(BASE_DATA_OBJECT_TYPE);
- }
-
- /**
- * Constructor. Retrieves an object instance with the given id.
- * @param id the id of the object to retrieve
- */
- public ContactType( BigDecimal id ) throws DataObjectNotFoundException {
- this(new OID(BASE_DATA_OBJECT_TYPE, id));
- }
-
- /**
- * Constructor. Retrieves an object instance with the given OID.
- *
- * @param oid the object id of the object to retrieve
- */
- public ContactType(OID oid) throws DataObjectNotFoundException {
- super(oid);
- }
-
- /**
- * Constructor. Create a Contact domain object using the given data object.
- * @param obj the object data to use
- */
- public ContactType( DataObject obj ) {
- super(obj);
- }
-
- /** Constructor. */
- public ContactType( String type ) {
- super(type);
- }
-
- public String getBaseDataObjectType() {
- return BASE_DATA_OBJECT_TYPE;
- }
-
- public String getTypeName(){
- return (String) get(TYPE_NAME);
- }
-
- public void setTypeName(String tname){
- set(TYPE_NAME,tname);
- }
-
-}
diff --git a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactTypesCollection.java b/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactTypesCollection.java
deleted file mode 100755
index 45e998502..000000000
--- a/ccm-ldn-types-contact/src/com/arsdigita/london/contenttypes/ContactTypesCollection.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-package com.arsdigita.london.contenttypes;
-
-import java.math.BigDecimal;
-
-import com.arsdigita.domain.DomainCollection;
-import com.arsdigita.domain.DomainObject;
-import com.arsdigita.persistence.DataCollection;
-import com.arsdigita.persistence.SessionManager;
-
-/**
- * Class which represents a collection of ContactTypes.
- *
- * @author Shashin Shinde sshinde@redhat.com
- * @version $Id: ContactTypesCollection.java 287 2005-02-22 00:29:02Z sskracic $
- */
-public class ContactTypesCollection extends DomainCollection {
-
- /** Retrieve the collection of ContactTypes. */
- public static ContactTypesCollection getContactTypesCollection(){
- DataCollection typesColl = SessionManager.getSession().
- retrieve(ContactType.BASE_DATA_OBJECT_TYPE);
- return new ContactTypesCollection(typesColl);
- }
-
- /**
- * private Constructor.Single ton type of class.
- *
- **/
- private ContactTypesCollection(DataCollection dataCollection) {
- super(dataCollection);
- }
-
- /**
- * Returns a DomainObject for the current position in
- * the collection.
- *
- **/
- @Override
- public DomainObject getDomainObject() {
- return new ContactType(m_dataCollection.getDataObject());
- }
-
- /**
- * Returns a ContactType for the current position in
- * the collection.
- *
- **/
- public ContactType getContactType() {
- return (ContactType) getDomainObject();
- }
-
- /**
- * Return the name of ContactType from current row.
- */
- public String getContactTypeName(){
- return getContactType().getTypeName();
- }
-
- /**
- * Return the ID of ContactType from current row.
- */
- public BigDecimal getContactTypeID(){
- return getContactType().getID();
- }
-
-}
diff --git a/ccm-ldn-types-contact/web/themes/heirloom/contenttypes/ldn/Contact.xsl b/ccm-ldn-types-contact/web/themes/heirloom/contenttypes/ldn/Contact.xsl
index bb33a8ab5..3c59aa6d0 100755
--- a/ccm-ldn-types-contact/web/themes/heirloom/contenttypes/ldn/Contact.xsl
+++ b/ccm-ldn-types-contact/web/themes/heirloom/contenttypes/ldn/Contact.xsl
@@ -6,8 +6,8 @@
xmlns:cms="http://www.arsdigita.com/cms/1.0"
version="1.0">
-
+
@@ -118,8 +118,8 @@
-
+
CONTACT& gt;
Given Name
@@ -141,9 +141,9 @@
+ name="cms:CT_text_com_arsdigita_cms_contenttypes_ldn_ContactPhone">
Contact Phone Type
Contact Phone Number
diff --git a/ccm-ldn-types-councillor/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/Councillor.xml b/ccm-ldn-types-councillor/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ldn/Councillor.xml
similarity index 100%
rename from ccm-ldn-types-councillor/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/Councillor.xml
rename to ccm-ldn-types-councillor/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ldn/Councillor.xml
diff --git a/ccm-ldn-types-councillor/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/Person.xml b/ccm-ldn-types-councillor/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ldn/Person.xml
similarity index 100%
rename from ccm-ldn-types-councillor/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/Person.xml
rename to ccm-ldn-types-councillor/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ldn/Person.xml
diff --git a/ccm-ldn-types-councillor/src/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/Councillor.xml b/ccm-ldn-types-councillor/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/ldn/Councillor.xml
similarity index 100%
rename from ccm-ldn-types-councillor/src/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/Councillor.xml
rename to ccm-ldn-types-councillor/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/ldn/Councillor.xml
diff --git a/ccm-ldn-types-councillor/src/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/Person.xml b/ccm-ldn-types-councillor/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/ldn/Person.xml
similarity index 100%
rename from ccm-ldn-types-councillor/src/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/Person.xml
rename to ccm-ldn-types-councillor/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/ldn/Person.xml
diff --git a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/Councillor.java b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/Councillor.java
similarity index 98%
rename from ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/Councillor.java
rename to ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/Councillor.java
index f48f445a7..2427bb12f 100644
--- a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/Councillor.java
+++ b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/Councillor.java
@@ -13,7 +13,7 @@
*
*/
-package com.arsdigita.london.contenttypes;
+package com.arsdigita.cms.contenttypes.ldn;
import com.arsdigita.persistence.DataObject;
diff --git a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/CouncillorInitializer.java b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/CouncillorInitializer.java
similarity index 96%
rename from ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/CouncillorInitializer.java
rename to ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/CouncillorInitializer.java
index 0a711af41..754309e4f 100644
--- a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/CouncillorInitializer.java
+++ b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/CouncillorInitializer.java
@@ -13,7 +13,7 @@
*
*/
-package com.arsdigita.london.contenttypes;
+package com.arsdigita.cms.contenttypes.ldn;
import com.arsdigita.cms.contenttypes.*;
diff --git a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/CouncillorLoader.java b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/CouncillorLoader.java
similarity index 96%
rename from ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/CouncillorLoader.java
rename to ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/CouncillorLoader.java
index ffec663aa..3d4d12c02 100644
--- a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/CouncillorLoader.java
+++ b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/CouncillorLoader.java
@@ -13,7 +13,7 @@
*
*/
-package com.arsdigita.coventry.cms.contenttypes;
+package com.arsdigita.cms.contenttypes.ldn;
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
diff --git a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/Person.java b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/Person.java
similarity index 98%
rename from ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/Person.java
rename to ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/Person.java
index ac6ee6aa3..1d6b18633 100644
--- a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/Person.java
+++ b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/Person.java
@@ -13,7 +13,7 @@
*
*/
-package com.arsdigita.london.contenttypes;
+package com.arsdigita.cms.contenttypes.ldn;
import com.arsdigita.cms.TextAsset;
import com.arsdigita.cms.contenttypes.GenericArticle;
diff --git a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/PersonInitializer.java b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/PersonInitializer.java
similarity index 93%
rename from ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/PersonInitializer.java
rename to ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/PersonInitializer.java
index 6942b2e55..cbb58d815 100644
--- a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/PersonInitializer.java
+++ b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/PersonInitializer.java
@@ -13,9 +13,10 @@
*
*/
-package com.arsdigita.coventry.cms.contenttypes;
+package com.arsdigita.cms.contenttypes.ldn;
-import com.arsdigita.cms.contenttypes.*;import com.arsdigita.cms.ContentType;
+import com.arsdigita.cms.contenttypes.*;
+import com.arsdigita.cms.ContentType;
import com.arsdigita.db.*;
import com.arsdigita.persistence.pdl.*;
diff --git a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/PersonLoader.java b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/PersonLoader.java
similarity index 96%
rename from ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/PersonLoader.java
rename to ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/PersonLoader.java
index a24c9796a..b5006a3fe 100644
--- a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/PersonLoader.java
+++ b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/PersonLoader.java
@@ -13,7 +13,7 @@
*
*/
-package com.arsdigita.coventry.cms.contenttypes;
+package com.arsdigita.cms.contenttypes.ldn;
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
diff --git a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/ui/CouncillorEditForm.java b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/ui/CouncillorEditForm.java
similarity index 98%
rename from ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/ui/CouncillorEditForm.java
rename to ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/ui/CouncillorEditForm.java
index 610ef0d57..d5eb1a50a 100644
--- a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/ui/CouncillorEditForm.java
+++ b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/ui/CouncillorEditForm.java
@@ -13,7 +13,7 @@
*
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.Label;
@@ -26,7 +26,7 @@ import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.CMSDHTMLEditor;
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
-import com.arsdigita.london.contenttypes.Councillor;
+import com.arsdigita.cms.contenttypes.ldn.Councillor;
import org.apache.log4j.Logger;
diff --git a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/ui/CouncillorPropertiesStep.java b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/ui/CouncillorPropertiesStep.java
similarity index 97%
rename from ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/ui/CouncillorPropertiesStep.java
rename to ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/ui/CouncillorPropertiesStep.java
index 43500cbc9..3f5dfc402 100644
--- a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/ui/CouncillorPropertiesStep.java
+++ b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/ui/CouncillorPropertiesStep.java
@@ -13,7 +13,7 @@
*
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.Component;
@@ -24,7 +24,7 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
-import com.arsdigita.london.contenttypes.Councillor;
+import com.arsdigita.cms.contenttypes.ldn.Councillor;
/**
* Authoring step to edit the simple attributes of the Councillor content type (and
diff --git a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/ui/PersonEditForm.java b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/ui/PersonEditForm.java
similarity index 98%
rename from ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/ui/PersonEditForm.java
rename to ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/ui/PersonEditForm.java
index bab179b1b..a764836a3 100644
--- a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/ui/PersonEditForm.java
+++ b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/ui/PersonEditForm.java
@@ -13,7 +13,7 @@
*
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.Label;
@@ -32,7 +32,7 @@ import com.arsdigita.cms.ui.authoring.BasicPageForm;
//import com.arsdigita.cms.ui.authoring.NameValidationListener;
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
-import com.arsdigita.london.contenttypes.Person;
+import com.arsdigita.cms.contenttypes.ldn.Person;
import org.apache.log4j.Logger;
diff --git a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/ui/PersonPropertiesStep.java b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/ui/PersonPropertiesStep.java
similarity index 96%
rename from ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/ui/PersonPropertiesStep.java
rename to ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/ui/PersonPropertiesStep.java
index 1bb0b7c2f..629428bb7 100644
--- a/ccm-ldn-types-councillor/src/com/arsdigita/london/contenttypes/ui/PersonPropertiesStep.java
+++ b/ccm-ldn-types-councillor/src/com/arsdigita/cms/contenttypes/ldn/ui/PersonPropertiesStep.java
@@ -13,7 +13,7 @@
*
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.Component;
@@ -24,7 +24,7 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
-import com.arsdigita.london.contenttypes.Person;
+import com.arsdigita.cms.contenttypes.ldn.Person;
/**
diff --git a/ccm-ldn-types-esdservice/application.xml b/ccm-ldn-types-esdservice/application.xml
index 934cf541d..d4f893240 100755
--- a/ccm-ldn-types-esdservice/application.xml
+++ b/ccm-ldn-types-esdservice/application.xml
@@ -3,7 +3,7 @@
name="ccm-ldn-types-esdservice"
prettyName="Red Hat CCM Content Types"
version="6.6.1"
- release="1"
+ release="2"
webapp="ROOT">
diff --git a/ccm-ldn-types-esdservice/pdl/com/arsdigita/london/contenttypes/ESDService.pdl b/ccm-ldn-types-esdservice/pdl/com/arsdigita/cms/contenttypes/ldn/ESDService.pdl
similarity index 97%
rename from ccm-ldn-types-esdservice/pdl/com/arsdigita/london/contenttypes/ESDService.pdl
rename to ccm-ldn-types-esdservice/pdl/com/arsdigita/cms/contenttypes/ldn/ESDService.pdl
index 7f5da54f5..f9d0085b4 100755
--- a/ccm-ldn-types-esdservice/pdl/com/arsdigita/london/contenttypes/ESDService.pdl
+++ b/ccm-ldn-types-esdservice/pdl/com/arsdigita/cms/contenttypes/ldn/ESDService.pdl
@@ -15,7 +15,7 @@
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-model com.arsdigita.london.contenttypes;
+model com.arsdigita.cms.contenttypes.ldn;
import com.arsdigita.cms.contenttypes.GenericArticle;
diff --git a/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/update_system_tables.sql b/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/update_system_tables.sql
index b0c29f4c9..3a62e8114 100644
--- a/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/update_system_tables.sql
+++ b/ccm-ldn-types-esdservice/sql/ccm-ldn-types-esdservice/upgrade/default/6.6.0-6.6.1/update_system_tables.sql
@@ -24,11 +24,11 @@ ALTER TABLE init_requirements DROP CONSTRAINT init_requirements_init_f_cmmdn ;
ALTER TABLE init_requirements DROP CONSTRAINT init_require_requ_init_f_i6rgg ;
UPDATE inits
- SET class_name = 'com.arsdigita.london.contenttypes.ESDServiceInitializer'
+ SET class_name = 'com.arsdigita.cms.contenttypes.ldn.ESDServiceInitializer'
WHERE class_name = 'com.arsdigita.cms.contenttypes.ESDServiceInitializer' ;
UPDATE init_requirements
- SET init = 'com.arsdigita.london.contenttypes.ESDServiceInitializer'
+ SET init = 'com.arsdigita.london.contenttypes.ldn.ESDServiceInitializer'
WHERE init = 'com.arsdigita.cms.contenttypes.ESDServiceInitializer' ;
ALTER TABLE init_requirements
@@ -42,48 +42,48 @@ ALTER TABLE init_requirements
UPDATE content_types
- SET object_type = 'com.arsdigita.london.contenttypes.ESDService',
+ SET object_type = 'com.arsdigita.cms.contenttypes.ldn.ESDService',
label = 'ESD Service',
description = 'An ESDService',
- classname = 'com.arsdigita.london.contenttypes.ESDService'
+ classname = 'com.arsdigita.cms.contenttypes.ldn.ESDService'
WHERE classname = 'com.arsdigita.cms.contenttypes.ESDService' ;
UPDATE authoring_steps
SET label_key = 'ESD Service Properties',
- label_bundle = 'com.arsdigita.london.contenttypes.ESDServiceResources',
+ label_bundle = 'com.arsdigita.cms.contenttypes.ldn.ESDServiceResources',
description_key = 'Edit the basic ESDService properties',
- description_bundle = 'com.arsdigita.london.contenttypes.ESDServiceResources',
- component = 'com.arsdigita.london.contenttypes.ui.ESDServicePropertiesStep'
+ description_bundle = 'com.arsdigita.cms.contenttypes.ldn.ESDServiceResources',
+ component = 'com.arsdigita.cms.contenttypes.ldn.ui.ESDServicePropertiesStep'
WHERE component = 'com.arsdigita.cms.contenttypes.ui.ESDServicePropertiesStep' ;
UPDATE authoring_steps
SET label_key = 'ESD Service Contact',
- label_bundle = 'com.arsdigita.london.contenttypes.ESDServiceResources',
+ label_bundle = 'com.arsdigita.cms.contenttypes.ldn.ESDServiceResources',
description_key = 'Edit/Choose the associated Contact object',
- description_bundle = 'com.arsdigita.london.contenttypes.ESDServiceResources',
- component = 'com.arsdigita.london.contenttypes.ui.ESDServiceChooseContactStep'
+ description_bundle = 'com.arsdigita.cms.contenttypes.ldn.ESDServiceResources',
+ component = 'com.arsdigita.cms.contenttypes.ldn.ui.ESDServiceChooseContactStep'
WHERE component = 'com.arsdigita.cms.contenttypes.ui.ESDServiceChooseContactStep' ;
UPDATE acs_objects
- SET (object_type,default_domain_class) = ('com.arsdigita.london.contenttypes.ESDService' ,
- 'com.arsdigita.london.contenttypes.ESDService' )
+ SET (object_type,default_domain_class) = ('com.arsdigita.cms.contenttypes.ldn.ESDService' ,
+ 'com.arsdigita.cms.contenttypes.ldn.ESDService' )
WHERE default_domain_class = 'com.arsdigita.cms.contenttypes.ESDService' ;
UPDATE lucene_docs
- SET type = 'com.arsdigita.london.contenttypes.ESDService'
+ SET type = 'com.arsdigita.cms.contenttypes.ldn.ESDService'
WHERE type = 'com.arsdigita.cms.contenttypes.ESDService' ;
UPDATE vcx_generic_operations
- SET value = replace(value, 'cms.contenttypes.ESDService', 'london.contenttypes.ESDService')
+ SET value = replace(value, 'cms.contenttypes.ESDService', 'london.contenttypes.ldn.ESDService')
WHERE value LIKE '%cms.contenttypes.ESDService%';
UPDATE vcx_obj_changes
- SET obj_id = REPLACE(obj_id,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService')
+ SET obj_id = REPLACE(obj_id,'cms.contenttypes.ESDService', 'london.contenttypes.ldn.ESDService')
WHERE obj_id LIKE '%cms.contenttypes.ESDService%';
UPDATE vcx_tags
- SET tagged_oid = REPLACE(tagged_oid,'cms.contenttypes.ESDService', 'london.contenttypes.ESDService')
+ SET tagged_oid = REPLACE(tagged_oid,'cms.contenttypes.ESDService', 'london.contenttypes.ldn.ESDService')
WHERE tagged_oid LIKE '%cms.contenttypes.ESDService%';
diff --git a/ccm-ldn-types-esdservice/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/ESDService.xml b/ccm-ldn-types-esdservice/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ldn/ESDService.xml
similarity index 79%
rename from ccm-ldn-types-esdservice/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/ESDService.xml
rename to ccm-ldn-types-esdservice/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ldn/ESDService.xml
index b7dc90f6a..3524494de 100755
--- a/ccm-ldn-types-esdservice/src/WEB-INF/content-types/com/arsdigita/london/contenttypes/ESDService.xml
+++ b/ccm-ldn-types-esdservice/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ldn/ESDService.xml
@@ -6,21 +6,21 @@
+ objectType="com.arsdigita.cms.contenttypes.ldn.ESDService"
+ classname="com.arsdigita.cms.contenttypes.ldn.ESDService">
+ component="com.arsdigita.cms.contenttypes.ldn.ui.ESDServicePropertiesStep"/>
+ component="com.arsdigita.cms.contenttypes.ldn.ui.ESDServiceChooseContactStep"/>
diff --git a/ccm-ldn-types-esdservice/src/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/ESDService.xml b/ccm-ldn-types-esdservice/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/ldn/ESDService.xml
similarity index 92%
rename from ccm-ldn-types-esdservice/src/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/ESDService.xml
rename to ccm-ldn-types-esdservice/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/ldn/ESDService.xml
index c273eb214..472834515 100755
--- a/ccm-ldn-types-esdservice/src/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/ESDService.xml
+++ b/ccm-ldn-types-esdservice/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/ldn/ESDService.xml
@@ -8,7 +8,7 @@
The default properties for Contact are left as is and are inherited from ContentPage
-->
-
diff --git a/ccm-ldn-types-esdservice/src/ccm-ldn-types-esdservice.load b/ccm-ldn-types-esdservice/src/ccm-ldn-types-esdservice.load
index d27f658a1..aa3c797d5 100755
--- a/ccm-ldn-types-esdservice/src/ccm-ldn-types-esdservice.load
+++ b/ccm-ldn-types-esdservice/src/ccm-ldn-types-esdservice.load
@@ -8,10 +8,10 @@
-
+
-
+
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDService.java b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDService.java
similarity index 91%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDService.java
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDService.java
index 7cd32c619..25fdb891c 100755
--- a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDService.java
+++ b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDService.java
@@ -15,7 +15,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-package com.arsdigita.london.contenttypes;
+package com.arsdigita.cms.contenttypes.ldn;
import com.arsdigita.cms.ContentType;
import com.arsdigita.cms.contenttypes.GenericArticle;
@@ -37,9 +37,11 @@ public class ESDService extends GenericArticle {
/** data object type for this domain object */
public static final String BASE_DATA_OBJECT_TYPE =
- "com.arsdigita.london.contenttypes.ESDService";
+ "com.arsdigita.cms.contenttypes.ldn.ESDService";
+ /** Internally used to set the contact object association. */
public static final String SERVICE_CONTACT = "serviceContact";
+ /** Internally used to set the contact object association. */
public static final String SERVICE_TIMES = "serviceTimes";
/** Default constructor. */
@@ -85,6 +87,8 @@ public class ESDService extends GenericArticle {
/**
* Over-ride to return the proper type for this object.
+ *
+ * @return
*/
@Override
public String getBaseDataObjectType() {
@@ -105,6 +109,8 @@ public class ESDService extends GenericArticle {
/**
* set the Contact object association.
+ *
+ * @param ct
* @pre ct != null
*/
public void setContact(Contact ct) {
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceInitializer.java b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceInitializer.java
similarity index 94%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceInitializer.java
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceInitializer.java
index f98b54039..da620a6d7 100755
--- a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceInitializer.java
+++ b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceInitializer.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-package com.arsdigita.london.contenttypes;
+package com.arsdigita.cms.contenttypes.ldn;
import com.arsdigita.cms.contenttypes.ContentTypeInitializer;
@@ -66,7 +66,7 @@ public class ESDServiceInitializer extends ContentTypeInitializer {
*/
@Override
public String getTraversalXML() {
- return "/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/ESDService.xml";
+ return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/ldn/ESDService.xml";
}
}
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceLoader.java b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceLoader.java
similarity index 70%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceLoader.java
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceLoader.java
index 545014db3..24d1df542 100755
--- a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceLoader.java
+++ b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceLoader.java
@@ -15,29 +15,33 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-package com.arsdigita.london.contenttypes;
+package com.arsdigita.cms.contenttypes.ldn;
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
/**
* Loader for ContentType ESDService.
- *
- * @author Shashin Shinde sshinde@redhat.com
+ *
+ * @author Shashin Shinde sshinde@redhat.com
*
* @version $Id: ESDServiceLoader.java 287 2005-02-22 00:29:02Z sskracic $
- *
+ *
*/
public class ESDServiceLoader extends AbstractContentTypeLoader {
- private static final String[] TYPES = {
- "/WEB-INF/content-types/com/arsdigita/london/contenttypes/ESDService.xml"
- };
+ private static final String[] TYPES = {
+ "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ldn/ESDService.xml"
+ };
- /**
- * @see com.arsdigita.cms.contenttypes.AbstractContentTypeLoader#getTypes()
- */
- public String[] getTypes() {
- return TYPES;
- }
+ /**
+ * @see com.arsdigita.cms.contenttypes.AbstractContentTypeLoader#getTypes()
+ *
+ * @return
+ */
+ @Override
+ public String[] getTypes() {
+ return TYPES;
+ }
}
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceResources.properties b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceResources.properties
similarity index 68%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceResources.properties
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceResources.properties
index d63002168..5882a1a84 100755
--- a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceResources.properties
+++ b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceResources.properties
@@ -1,5 +1,6 @@
london.contenttypes.ui.esdservice.servicetimes=Service Times
-london.contenttypes.ui.esdservice.select_contact=Select Contact
+cms.contenttypes.ldn.esdservice.ui.select_contact=Select Contact
london.contenttypes.ui.esdservice.no_contacts=No contacts assoziated yet.
london.contenttypes.ui.esdservice.select=select
london.contenttypes.ui.esdservice.select_this_contact=Select this Contact?
+cms.contenttypes.ldn.esdservice.type_label=ESD Service
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceResources_de.properties b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceResources_de.properties
similarity index 71%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceResources_de.properties
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceResources_de.properties
index eb5691a78..ad605d35d 100755
--- a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceResources_de.properties
+++ b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceResources_de.properties
@@ -1,7 +1,7 @@
london.contenttypes.ui.esdservice.servicetimes=\u00d6ffnungszeiten
-london.contenttypes.ui.esdservice.select_contact=Kontakt ausw\u00e4hlen
+cms.contenttypes.ldn.esdservice.ui.select_contact=Kontakt ausw\u00e4hlen
#No contacts assoziated yet.
london.contenttypes.ui.esdservice.no_contacts=Bisher sind keine Kontakte zugeordnet.
london.contenttypes.ui.esdservice.select=ausw\u00e4hlen
london.contenttypes.ui.esdservice.select_this_contact=Diesen Kontakt ausw\u00e4hlen?
-iesen Kontakt ausw\u00e4hlen?
+cms.contenttypes.ldn.esdservice.type_label=ESD Service
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceResources_en.properties b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceResources_en.properties
similarity index 70%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceResources_en.properties
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceResources_en.properties
index 843d6244a..dce62bfb5 100755
--- a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceResources_en.properties
+++ b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceResources_en.properties
@@ -1,6 +1,7 @@
london.contenttypes.ui.esdservice.servicetimes=Service Times
-london.contenttypes.ui.esdservice.select_contact=Select Contact
+cms.contenttypes.ldn.esdservice.ui.select_contact=Select Contact
#No contacts assoziated yet.
london.contenttypes.ui.esdservice.no_contacts=No contacts assoziated yet.
london.contenttypes.ui.esdservice.select=select
london.contenttypes.ui.esdservice.select_this_contact=Select this Contact?
+cms.contenttypes.ldn.esdservice.type_label=ESD Service
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceResources_fr.properties b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceResources_fr.properties
similarity index 70%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceResources_fr.properties
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceResources_fr.properties
index 843d6244a..dce62bfb5 100755
--- a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ESDServiceResources_fr.properties
+++ b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ESDServiceResources_fr.properties
@@ -1,6 +1,7 @@
london.contenttypes.ui.esdservice.servicetimes=Service Times
-london.contenttypes.ui.esdservice.select_contact=Select Contact
+cms.contenttypes.ldn.esdservice.ui.select_contact=Select Contact
#No contacts assoziated yet.
london.contenttypes.ui.esdservice.no_contacts=No contacts assoziated yet.
london.contenttypes.ui.esdservice.select=select
london.contenttypes.ui.esdservice.select_this_contact=Select this Contact?
+cms.contenttypes.ldn.esdservice.type_label=ESD Service
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/package.html b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/package.html
similarity index 100%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/package.html
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/package.html
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ui/ESDServiceChooseContactStep.java b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ui/ESDServiceChooseContactStep.java
similarity index 80%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ui/ESDServiceChooseContactStep.java
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ui/ESDServiceChooseContactStep.java
index 75bd383f2..2cbc83ebf 100755
--- a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ui/ESDServiceChooseContactStep.java
+++ b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ui/ESDServiceChooseContactStep.java
@@ -15,15 +15,15 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
-import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
-import com.arsdigita.london.contenttypes.util.ESDServiceGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.util.ContactGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.util.ESDServiceGlobalizationUtil;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
/**
@@ -52,7 +52,7 @@ public class ESDServiceChooseContactStep extends SimpleEditStep {
addComponent(EDIT_SHEET_NAME,
ESDServiceGlobalizationUtil.globalize(
- "london.contenttypes.ui.esdservice.select_contact"),
+ "cms.contenttypes.ldn.esdservice.ui.select_contact"),
new WorkflowLockedComponentAccess(table, itemModel));
setDisplayComponent(getContactPropertiesSheet(itemModel));
@@ -67,16 +67,16 @@ public class ESDServiceChooseContactStep extends SimpleEditStep {
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
sheet.add(ContactGlobalizationUtil.globalize(
- "london.contenttypes.ui.contact.givenname"),
- "serviceContact.givenName");
+ "cms.contenttypes.ldn.ui.contact.givenname"),
+ "serviceContact.givenName");
sheet.add(ContactGlobalizationUtil.globalize(
- "london.contenttypes.ui.contact.familyname"),
- "serviceContact.familyName");
+ "cms.contenttypes.ldn.ui.contact.familyname"),
+ "serviceContact.familyName");
sheet.add(ContactGlobalizationUtil.globalize(
- "london.contenttypes.ui.contact.type"),
- "serviceContact.contactType.typeName");
+ "london.contenttypes.ui.contact.type"),
+ "serviceContact.contactType.typeName");
return sheet;
}
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ui/ESDServiceContactsTable.java b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ui/ESDServiceContactsTable.java
similarity index 94%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ui/ESDServiceContactsTable.java
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ui/ESDServiceContactsTable.java
index 06a3d8ad8..10ff2de19 100755
--- a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ui/ESDServiceContactsTable.java
+++ b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ui/ESDServiceContactsTable.java
@@ -15,7 +15,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.ControlLink;
@@ -32,10 +32,10 @@ import com.arsdigita.bebop.table.TableModelBuilder;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.domain.DomainObjectFactory;
-import com.arsdigita.london.contenttypes.Contact;
-import com.arsdigita.london.contenttypes.ESDService;
-import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
-import com.arsdigita.london.contenttypes.util.ESDServiceGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.Contact;
+import com.arsdigita.cms.contenttypes.ldn.ESDService;
+import com.arsdigita.cms.contenttypes.ldn.util.ContactGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.util.ESDServiceGlobalizationUtil;
import com.arsdigita.persistence.DataCollection;
import com.arsdigita.persistence.OID;
import com.arsdigita.persistence.SessionManager;
@@ -84,12 +84,12 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
model.add(new TableColumn(
GIVENNAME_COL_IDX,
new Label(ContactGlobalizationUtil.globalize(
- "london.contenttypes.ui.contact.givenname")
+ "cms.contenttypes.ldn.ui.contact.givenname")
) ));
model.add(new TableColumn(
FAMILYNAME_COL_IDX,
new Label(ContactGlobalizationUtil.globalize(
- "london.contenttypes.ui.contact.familyname")
+ "cms.contenttypes.ldn.ui.contact.familyname")
) ));
model.add(new TableColumn(
TYPE_COL_IDX,
@@ -192,6 +192,7 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
*
* @see com.arsdigita.bebop.table.TableModel#getKeyAt(int)
*/
+ @Override
public Object getKeyAt(int columnIndex) {
return m_contact.getID();
}
@@ -216,6 +217,7 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
* @return the link to assoziate the selected
* contact entry with the service editet.
*/
+ @Override
public Component getComponent(Table table, PageState state, Object value,
boolean isSelected, Object key,
int row, int column) {
@@ -231,7 +233,9 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
* Provide implementation to TableActionListener method. Code that comes
* into picture when select link in the table is clicked. Handles selection
* event.
+ * @param evt
*/
+ @Override
public void cellSelected(TableActionEvent evt) {
PageState state = evt.getPageState();
@@ -250,6 +254,7 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
* provide Implementation to TableActionListener method. Does nothing in our
* case.
*/
+ @Override
public void headSelected(TableActionEvent e) {
throw new UnsupportedOperationException("Not Implemented");
}
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ui/ESDServicePropertiesForm.java b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ui/ESDServicePropertiesForm.java
similarity index 91%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ui/ESDServicePropertiesForm.java
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ui/ESDServicePropertiesForm.java
index 726efc300..dac23229a 100755
--- a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ui/ESDServicePropertiesForm.java
+++ b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ui/ESDServicePropertiesForm.java
@@ -15,7 +15,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.Label;
@@ -24,8 +24,8 @@ import com.arsdigita.bebop.form.TextField;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.ItemSelectionModel;
-import com.arsdigita.london.contenttypes.ESDService;
-import com.arsdigita.london.contenttypes.util.ESDServiceGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.ESDService;
+import com.arsdigita.cms.contenttypes.ldn.util.ESDServiceGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.BasicPageForm;
/**
@@ -45,6 +45,7 @@ public class ESDServicePropertiesForm extends BasicPageForm {
/**
* @param itemModel
+ * @param step
*/
public ESDServicePropertiesForm(ItemSelectionModel itemModel, ESDServicePropertiesStep step) {
super(ID, itemModel);
@@ -54,6 +55,7 @@ public class ESDServicePropertiesForm extends BasicPageForm {
/**
* Adds widgets to the form.
**/
+ @Override
protected void addWidgets() {
/* Add standard widgets Title & name/url */
@@ -68,7 +70,9 @@ public class ESDServicePropertiesForm extends BasicPageForm {
/**
* Initialize Form with values if already set.
+ * @param fse
*/
+ @Override
public void init(FormSectionEvent fse) {
FormData data = fse.getFormData();
ESDService esdService = (ESDService) super.initBasicWidgets(fse);
@@ -77,7 +81,10 @@ public class ESDServicePropertiesForm extends BasicPageForm {
/**
* Process this form and set the values from form.
+ *
+ * @param fse
*/
+ @Override
public void process(FormSectionEvent fse) {
FormData data = fse.getFormData();
ESDService esdService = (ESDService) super.processBasicWidgets(fse);
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ui/ESDServicePropertiesStep.java b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ui/ESDServicePropertiesStep.java
similarity index 94%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ui/ESDServicePropertiesStep.java
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ui/ESDServicePropertiesStep.java
index f412b0e80..77f3020b7 100755
--- a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/ui/ESDServicePropertiesStep.java
+++ b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/ui/ESDServicePropertiesStep.java
@@ -15,12 +15,12 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-package com.arsdigita.london.contenttypes.ui;
+package com.arsdigita.cms.contenttypes.ldn.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.cms.ItemSelectionModel;
-import com.arsdigita.london.contenttypes.ESDService;
-import com.arsdigita.london.contenttypes.util.ESDServiceGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.ldn.ESDService;
+import com.arsdigita.cms.contenttypes.ldn.util.ESDServiceGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
diff --git a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/util/ESDServiceGlobalizationUtil.java b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/util/ESDServiceGlobalizationUtil.java
similarity index 94%
rename from ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/util/ESDServiceGlobalizationUtil.java
rename to ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/util/ESDServiceGlobalizationUtil.java
index 8791207e9..f46c50ff9 100755
--- a/ccm-ldn-types-esdservice/src/com/arsdigita/london/contenttypes/util/ESDServiceGlobalizationUtil.java
+++ b/ccm-ldn-types-esdservice/src/com/arsdigita/cms/contenttypes/ldn/util/ESDServiceGlobalizationUtil.java
@@ -15,7 +15,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-package com.arsdigita.london.contenttypes.util;
+package com.arsdigita.cms.contenttypes.ldn.util;
import com.arsdigita.globalization.Globalized;
import com.arsdigita.globalization.GlobalizedMessage;
@@ -33,7 +33,7 @@ public class ESDServiceGlobalizationUtil implements Globalized {
/** Name of Java resource files to handle CMS's globalisation. */
final public static String BUNDLE_NAME =
- "com.arsdigita.london.contenttypes.ESDServiceResources";
+ "com.arsdigita.cms.contenttypes.ldn.ESDServiceResources";
/**
* Returns a globalized message using the package specific bundle,
diff --git a/ccm-ldn-types-esdservice/web/themes/heirloom/contenttypes/ldn/ESDService.xsl b/ccm-ldn-types-esdservice/web/themes/heirloom/contenttypes/ldn/ESDService.xsl
index 56786bdf8..b5c6255f7 100755
--- a/ccm-ldn-types-esdservice/web/themes/heirloom/contenttypes/ldn/ESDService.xsl
+++ b/ccm-ldn-types-esdservice/web/themes/heirloom/contenttypes/ldn/ESDService.xsl
@@ -6,9 +6,9 @@
xmlns:cms="http://www.arsdigita.com/cms/1.0"
version="1.0">
-
+ name="cms:CT_graphics_com_arsdigita_cms_contenttypes_ldn_ESDService">
@@ -72,8 +72,8 @@
+ match="cms:item[objectType='com.arsdigita.cms.contenttypes.ldn.ESDService']" mode="cms:CT_text"
+ name="cms:CT_text_com_arsdigita_cms_contenttypes_ldn_ESDService">
ESDSERVICE& gt;
contact given name & gt;
diff --git a/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/PersistentUserPrefs.java b/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/PersistentUserPrefs.java
index 29ac25921..8d34c1fc8 100755
--- a/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/PersistentUserPrefs.java
+++ b/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/PersistentUserPrefs.java
@@ -70,6 +70,7 @@ public class PersistentUserPrefs extends DomainObject {
DomainObjectFactory.registerInstantiator(
BASE_DATA_OBJECT_TYPE,
new DomainObjectInstantiator() {
+ @Override
protected DomainObject doNewInstance( DataObject obj ) {
return new PersistentUserPrefs( obj );
}
diff --git a/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/Pref.java b/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/Pref.java
index e4ab49a6c..466672984 100755
--- a/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/Pref.java
+++ b/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/Pref.java
@@ -36,7 +36,7 @@ public class Pref extends DomainObject {
public static final String VALUE = "value";
public static final String BASE_DATA_OBJECT_TYPE =
- "com.arsdigita.london.userprefs.Pref";
+ "com.arsdigita.london.userprefs.Pref";
Pref() {
super( BASE_DATA_OBJECT_TYPE );
@@ -60,6 +60,7 @@ public class Pref extends DomainObject {
DomainObjectFactory.registerInstantiator(
BASE_DATA_OBJECT_TYPE,
new DomainObjectInstantiator() {
+ @Override
protected DomainObject doNewInstance( DataObject obj ) {
return new Pref( obj );
}
diff --git a/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/UserPrefs.java b/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/UserPrefs.java
index 4fcdbf8ca..8afb1c74c 100755
--- a/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/UserPrefs.java
+++ b/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/UserPrefs.java
@@ -63,7 +63,7 @@ public class UserPrefs {
private OID m_persistentPrefs = null;
private Long m_cookie = null;
- private HashMap m_prefs = new HashMap();
+ private final HashMap m_prefs = new HashMap();
private static final CacheTable s_prefsCache =
new CacheTable( "user_preferences" );
@@ -91,7 +91,6 @@ public class UserPrefs {
* Retrieve a UserPrefs object for the current request.
*
* In order, this will:
- *
*
* - Look for prefs in the http session
* - Look for prefs for the currently logged in user
@@ -99,6 +98,10 @@ public class UserPrefs {
* - Create a new preferences object
*
*
+ *
+ * @param req
+ * @param res
+ * @return
*/
public static UserPrefs retrieve( HttpServletRequest req,
HttpServletResponse res ) {
@@ -206,6 +209,8 @@ public class UserPrefs {
*
* @param key The identifier of the preference to be stored
* @param value The value of the preference to be stored
+ * @param req
+ * @param res
*/
public void set( String key, String value,
HttpServletRequest req, HttpServletResponse res ) {
@@ -220,6 +225,7 @@ public class UserPrefs {
* Remove a user preference.
*
* @param key The identifier of the preference to be removed
+ * @param req
*/
public void remove( String key, HttpServletRequest req ) {
m_prefs.remove( key );
@@ -238,6 +244,8 @@ public class UserPrefs {
/**
* Save user preferences to the database
+ * @param req
+ * @param res
*/
public void persist( HttpServletRequest req,
HttpServletResponse res ) {
diff --git a/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/ui/UserPrefsComponent.java b/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/ui/UserPrefsComponent.java
index 8ed92f795..ed27d3ff6 100755
--- a/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/ui/UserPrefsComponent.java
+++ b/ccm-ldn-userpreferences/src/com/arsdigita/london/userprefs/ui/UserPrefsComponent.java
@@ -45,11 +45,12 @@ public class UserPrefsComponent extends SimpleComponent {
super();
}
- private StringParameter m_setKey = new StringParameter( "pref.set.key" );
- private StringParameter m_setValue = new StringParameter( "pref.set.value" );
- private StringParameter m_remove = new StringParameter( "pref.remove" );
- private BooleanParameter m_immediate = new BooleanParameter( "pref.immediate" );
+ private final StringParameter m_setKey = new StringParameter( "pref.set.key" );
+ private final StringParameter m_setValue = new StringParameter( "pref.set.value" );
+ private final StringParameter m_remove = new StringParameter( "pref.remove" );
+ private final BooleanParameter m_immediate = new BooleanParameter( "pref.immediate" );
+ @Override
public void generateXML( PageState ps, Element parent ) {
UserPrefs prefs = UserPrefs.retrieve( ps.getRequest(),
ps.getResponse() );
@@ -72,6 +73,7 @@ public class UserPrefsComponent extends SimpleComponent {
}
}
+ @Override
public void register( Page p ) {
super.register( p );
@@ -81,6 +83,7 @@ public class UserPrefsComponent extends SimpleComponent {
p.addGlobalStateParam( m_immediate );
p.addRequestListener( new RequestListener() {
+ @Override
public void pageRequested( RequestEvent ev ) {
PageState ps = ev.getPageState();
diff --git a/ccm-rssfeed/src/com/arsdigita/rssfeed/Loader.java b/ccm-rssfeed/src/com/arsdigita/rssfeed/Loader.java
index 03b98d577..e2263c745 100755
--- a/ccm-rssfeed/src/com/arsdigita/rssfeed/Loader.java
+++ b/ccm-rssfeed/src/com/arsdigita/rssfeed/Loader.java
@@ -76,7 +76,8 @@ public class Loader extends PackageLoader {
setupChannelControlCenter();
// Load local feeds into database
- setupLocalFeeds();
+ // setupLocalFeeds(); // currently not working, incompatible with
+ // changes in handling webapp's web context
// load portlet type into database
loadWorkspaceDirectoryPortlet();
diff --git a/ccm-sci-bundle/web/themes/static/aplaws-generic/lib/lib.xsl b/ccm-sci-bundle/web/themes/static/aplaws-generic/lib/lib.xsl
index 216ffc077..2225e3d26 100644
--- a/ccm-sci-bundle/web/themes/static/aplaws-generic/lib/lib.xsl
+++ b/ccm-sci-bundle/web/themes/static/aplaws-generic/lib/lib.xsl
@@ -88,6 +88,7 @@
+
|