diff --git a/ccm-cms-types-baseAddress/.svnignore b/ccm-cms-types-address/.svnignore similarity index 100% rename from ccm-cms-types-baseAddress/.svnignore rename to ccm-cms-types-address/.svnignore diff --git a/ccm-cms-types-baseAddress/application.xml b/ccm-cms-types-address/application.xml similarity index 88% rename from ccm-cms-types-baseAddress/application.xml rename to ccm-cms-types-address/application.xml index 3238246d0..29979d282 100755 --- a/ccm-cms-types-baseAddress/application.xml +++ b/ccm-cms-types-address/application.xml @@ -1,6 +1,6 @@ - The BaseAddress Content Type for the Red Hat CCM CMS. + The Address Content Type for the Red Hat CCM CMS. diff --git a/ccm-cms-types-baseAddress/pdl/com/arsdigita/content-types/BaseAddress.pdl b/ccm-cms-types-address/pdl/com/arsdigita/content-types/Address.pdl similarity index 56% rename from ccm-cms-types-baseAddress/pdl/com/arsdigita/content-types/BaseAddress.pdl rename to ccm-cms-types-address/pdl/com/arsdigita/content-types/Address.pdl index e32141882..c6d33b988 100644 --- a/ccm-cms-types-baseAddress/pdl/com/arsdigita/content-types/BaseAddress.pdl +++ b/ccm-cms-types-address/pdl/com/arsdigita/content-types/Address.pdl @@ -4,8 +4,8 @@ import com.arsdigita.cms.basetypes.Address; import com.arsdigita.cms.ContentPage; // Address object -object type BaseAddress extends Address { +object type Address extends com.arsdigita.cms.basetypes.Address { - reference key ( ct_baseAddresses.address_id ); + reference key ( ct_addresses.address_id ); } diff --git a/ccm-cms-types-baseAddress/sql/ccm-cms-types-baseAddress/oracle-se-create.sql b/ccm-cms-types-address/sql/ccm-cms-types-address/oracle-se-create.sql similarity index 100% rename from ccm-cms-types-baseAddress/sql/ccm-cms-types-baseAddress/oracle-se-create.sql rename to ccm-cms-types-address/sql/ccm-cms-types-address/oracle-se-create.sql diff --git a/ccm-cms-types-baseAddress/sql/ccm-cms-types-baseAddress/postgres-create.sql b/ccm-cms-types-address/sql/ccm-cms-types-address/postgres-create.sql similarity index 100% rename from ccm-cms-types-baseAddress/sql/ccm-cms-types-baseAddress/postgres-create.sql rename to ccm-cms-types-address/sql/ccm-cms-types-address/postgres-create.sql diff --git a/ccm-cms-types-baseAddress/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/BaseAddress.xml b/ccm-cms-types-address/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Address.xml similarity index 76% rename from ccm-cms-types-baseAddress/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/BaseAddress.xml rename to ccm-cms-types-address/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Address.xml index 45c445ae0..f4e6e2c68 100644 --- a/ccm-cms-types-baseAddress/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/BaseAddress.xml +++ b/ccm-cms-types-address/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Address.xml @@ -5,10 +5,10 @@ xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> + label="Address" + description="An Address type" + objectType="com.arsdigita.cms.contenttypes.Address" + classname="com.arsdigita.cms.contenttypes.Address"> @@ -18,7 +18,7 @@ labelBundle="com.arsdigita.cms.basetypes.BasetypesResources" descriptionKey="address.authoring.basic_properties.description" descriptionBundle="com.arsdigita.cms.basetypes.BasetypesResources" - component="com.arsdigita.cms.contenttypes.ui.BaseAddressPropertiesStep" + component="com.arsdigita.cms.contenttypes.ui.AddressPropertiesStep" ordering="1"/> diff --git a/ccm-cms-types-baseAddress/src/ccm-cms-types-baseAddress.config b/ccm-cms-types-address/src/ccm-cms-types-address.config similarity index 100% rename from ccm-cms-types-baseAddress/src/ccm-cms-types-baseAddress.config rename to ccm-cms-types-address/src/ccm-cms-types-address.config diff --git a/ccm-cms-types-baseAddress/src/ccm-cms-types-baseAddress.load b/ccm-cms-types-address/src/ccm-cms-types-address.load similarity index 50% rename from ccm-cms-types-baseAddress/src/ccm-cms-types-baseAddress.load rename to ccm-cms-types-address/src/ccm-cms-types-address.load index 666caf833..95c7208a3 100755 --- a/ccm-cms-types-baseAddress/src/ccm-cms-types-baseAddress.load +++ b/ccm-cms-types-address/src/ccm-cms-types-address.load @@ -6,11 +6,11 @@ - - +
+ - - + + diff --git a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/BaseAddressInitializer.java b/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/BaseAddressInitializer.java similarity index 100% rename from ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/BaseAddressInitializer.java rename to ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/BaseAddressInitializer.java diff --git a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/BaseAddressLoader.java b/ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/BaseAddressLoader.java similarity index 100% rename from ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/BaseAddressLoader.java rename to ccm-cms-types-address/src/com/arsdigita/cms/contenttypes/BaseAddressLoader.java diff --git a/ccm-cms-types-baseAddress/web/static/content-types/com/arsdigita/cms/contenttypes/BaseAddress.xsl b/ccm-cms-types-address/web/static/content-types/com/arsdigita/cms/contenttypes/BaseAddress.xsl similarity index 100% rename from ccm-cms-types-baseAddress/web/static/content-types/com/arsdigita/cms/contenttypes/BaseAddress.xsl rename to ccm-cms-types-address/web/static/content-types/com/arsdigita/cms/contenttypes/BaseAddress.xsl diff --git a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/BaseAddress.java b/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/BaseAddress.java deleted file mode 100755 index 9ed8e886c..000000000 --- a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/BaseAddress.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2002-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; - -import com.arsdigita.globalization.LocaleNegotiator; -import com.arsdigita.cms.ContentType; -import com.arsdigita.cms.basetypes.Address; -import com.arsdigita.domain.DataObjectNotFoundException; -import com.arsdigita.persistence.DataObject; -import com.arsdigita.persistence.OID; -import com.arsdigita.util.Assert; -import java.math.BigDecimal; -import java.util.Locale; -import java.util.TreeMap; - -/** - *

DomainObject class to represent address ContentType - * objects. - *
- * This content type represents a generic address which is not country specific. - * It provides methods for creating new address objects, retrieving existing - * objects from the persistent storage and retrieving and setting is properties.

- *

This class extends {@link com.arsdigita.cms.ContentItem content item} and - * adds extended attributes specific for an not country specific address:

- * - * @author Sören Bernstein - **/ -public class BaseAddress extends Address { - - /** Data object type for this domain object */ - public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.BaseAddress"; - - /** - * Default constructor. This creates a new (empty) BaseAddress. - **/ - public BaseAddress() { - this(BASE_DATA_OBJECT_TYPE); - } - - /** - * Constructor. The contained DataObject is retrieved - * from the persistent storage mechanism with an OID - * specified by id and - * Address.BASE_DATA_OBJECT_TYPE. - * - * @param id The id for the retrieved - * DataObject. - **/ - public BaseAddress(BigDecimal id) throws DataObjectNotFoundException { - this(new OID(BASE_DATA_OBJECT_TYPE, id)); - } - - /** - * Constructor. The contained DataObject is retrieved - * from the persistent storage mechanism with an OID - * specified by id. - * - * @param id The OID for the retrieved - * DataObject. - **/ - public BaseAddress(OID id) throws DataObjectNotFoundException { - super(id); - } - - /** - * Constructor. Retrieves or creates a content item using the - * DataObject argument. - * - * @param obj The DataObject with which to create or - * load a content item - */ - public BaseAddress(DataObject obj) { - super(obj); - } - - /** - * Constructor. Creates a new content item using the given data - * object type. Such items are created as draft versions. - * - * @param type The String data object type of the - * item to create - */ - public BaseAddress(String type) { - super(type); - } - - /** - * For new content items, sets the associated content type if it - * has not been already set. - */ - public void beforeSave() { - super.beforeSave(); - - Assert.exists(getContentType(), ContentType.class); - } - - /* accessors *****************************************************/ -} diff --git a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/BaseAddressConfig_parameter.properties b/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/BaseAddressConfig_parameter.properties deleted file mode 100644 index c0522251c..000000000 --- a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/BaseAddressConfig_parameter.properties +++ /dev/null @@ -1,9 +0,0 @@ -com.arsdigita.cms.contenttypes.baseaddress.hide_country_code_selection.title=Hide ISO Country Code -com.arsdigita.cms.contenttypes.baseaddress.hide_country_code_selection.purpose=Hide the ISO country code selection box -com.arsdigita.cms.contenttypes.baseaddress.hide_country_code_selection.example=false -com.arsdigita.cms.contenttypes.baseaddress.hide_country_code_selection.format=[boolean] - -com.arsdigita.cms.contenttypes.baseaddress.hide_postal_code.title=Hide Postal Code -com.arsdigita.cms.contenttypes.baseaddress.hide_postal_code.purpose=Hide the the postal code entry field -com.arsdigita.cms.contenttypes.baseaddress.hide_postal_code.example=false -com.arsdigita.cms.contenttypes.baseaddress.hide_postal_code.format=[boolean] diff --git a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/ui/BaseAddressPropertiesStep.java b/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/ui/BaseAddressPropertiesStep.java deleted file mode 100644 index d57c23a60..000000000 --- a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/ui/BaseAddressPropertiesStep.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2009 Jens Pelzetter, for the Center of Social Politics of the University of Bremen - * - * 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.ui; - -import com.arsdigita.bebop.Component; -import com.arsdigita.cms.basetypes.ui.AddressPropertiesStep; -import com.arsdigita.cms.ItemSelectionModel; -import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; -import com.arsdigita.cms.ui.authoring.BasicPageForm; -import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; - - -public class BaseAddressPropertiesStep extends AddressPropertiesStep { - - public static final String EDIT_SHEET_NAME = "edit"; - - public BaseAddressPropertiesStep(ItemSelectionModel itemModel, - AuthoringKitWizard parent) { - super(itemModel, parent); - } - - @Override - protected void createEditSheet(ItemSelectionModel itemModel) { - BasicPageForm editSheet; - editSheet = new BaseAddressPropertyForm(itemModel, this); - add(EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.getSaveCancelSection().getCancelButton()); - } - - public static Component getBaseAddressPropertySheet(ItemSelectionModel itemModel) { - Component sheet = AddressPropertiesStep.getAddressPropertySheet(itemModel); - return sheet; - } -} diff --git a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/ui/BaseAddressPropertyForm.java b/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/ui/BaseAddressPropertyForm.java deleted file mode 100644 index 05229d3d2..000000000 --- a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/ui/BaseAddressPropertyForm.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2009 Jens Pelzetter, for the Center of Social Politics of the University of Bremen - * - * 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.ui; - -import com.arsdigita.cms.basetypes.ui.AddressPropertyForm; -import com.arsdigita.bebop.event.FormInitListener; -import com.arsdigita.bebop.event.FormProcessListener; -import com.arsdigita.bebop.event.FormSectionEvent; -import com.arsdigita.bebop.event.FormSubmissionListener; -import com.arsdigita.cms.ItemSelectionModel; -import org.apache.log4j.Logger; - -/** - * Form to edit the properties of a baseAddress. - * - * @author: Jens Pelzetter - * @author: Sören Bernstein - */ -public class BaseAddressPropertyForm extends AddressPropertyForm implements FormProcessListener, FormInitListener, FormSubmissionListener { - - private static final Logger s_log = Logger.getLogger(BaseAddressPropertyForm.class); - private BaseAddressPropertiesStep m_step; - public static final String ID = "BaseAddress_edit"; - - public BaseAddressPropertyForm(ItemSelectionModel itemModel) { - this(itemModel, null); - } - - public BaseAddressPropertyForm(ItemSelectionModel itemModel, BaseAddressPropertiesStep step) { - super(itemModel, step); - m_step = step; - addSubmissionListener(this); - } - - @Override - protected void addWidgets() { - super.addWidgets(); - } - - @Override - public void init(FormSectionEvent fse) { - super.init(fse); -// FormData data = fse.getFormData(); -// BaseAddress baseAddress = (BaseAddress) super.initBasicWidgets(fse); - } - - @Override - public void process(FormSectionEvent fse) { - super.process(fse); -// FormData data = fse.getFormData(); - -// BaseAddress baseAddress = (BaseAddress) super.processBasicWidgets(fse); - } -} diff --git a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/util/BaseAddressGlobalizationUtil.java b/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/util/BaseAddressGlobalizationUtil.java deleted file mode 100755 index 55799ea20..000000000 --- a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/util/BaseAddressGlobalizationUtil.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.arsdigita.cms.contenttypes.util; - -import com.arsdigita.globalization.GlobalizedMessage; - -public class BaseAddressGlobalizationUtil { - - final public static String BUNDLE_NAME = - "com.arsdigita.cms.contenttypes.util.BaseAddressResourceBundle"; - - /** - * This returns a globalized message using the type specific bundle, - * BUNDLE_NAME - */ - public static GlobalizedMessage globalize(String key) { - return new GlobalizedMessage(key, BUNDLE_NAME); - } - - /** - * This returns a globalized message using the type specific bundle, - * BUNDLE_NAME - */ - public static GlobalizedMessage globalize(String key, Object[] args) { - return new GlobalizedMessage(key, BUNDLE_NAME, args); - } -} diff --git a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/util/BaseAddressResourceBundle.java b/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/util/BaseAddressResourceBundle.java deleted file mode 100755 index 9983324ea..000000000 --- a/ccm-cms-types-baseAddress/src/com/arsdigita/cms/contenttypes/util/BaseAddressResourceBundle.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.arsdigita.cms.contenttypes.util; - -import java.util.PropertyResourceBundle; -import com.arsdigita.globalization.ChainedResourceBundle; -import com.arsdigita.cms.CMSGlobalized; - -public class BaseAddressResourceBundle extends ChainedResourceBundle implements CMSGlobalized { - - public final static String BASE_ADDRESS_BUNDLE_NAME = - "com.arsdigita.cms.contenttypes.BaseAddressResources"; - - public BaseAddressResourceBundle() { - super(); - addBundle((PropertyResourceBundle)getBundle(BASE_ADDRESS_BUNDLE_NAME)); - addBundle((PropertyResourceBundle)getBundle(BUNDLE_NAME)); - } -}