baseAddress zu Address umbenannt. Läßt sich nicht mehr zusammen mit oldaddress installieren

git-svn-id: https://svn.libreccm.org/ccm/trunk@429 8810af33-2d31-482b-a856-94f89814c4df
master
quasi 2010-05-20 10:48:26 +00:00
parent 78b6573d6a
commit d374d726b2
17 changed files with 13 additions and 297 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project" <ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-cms-types-baseAddress" name="ccm-cms-types-address"
prettyName="Red Hat CCM Content Types" prettyName="Red Hat CCM Content Types"
version="6.6.0" version="6.6.0"
release="1" release="1"
@ -19,6 +19,6 @@
<ccm:contact uri="mailto:rhea@redhat.com" type="support"/> <ccm:contact uri="mailto:rhea@redhat.com" type="support"/>
</ccm:contacts> </ccm:contacts>
<ccm:description> <ccm:description>
The BaseAddress Content Type for the Red Hat CCM CMS. The Address Content Type for the Red Hat CCM CMS.
</ccm:description> </ccm:description>
</ccm:application> </ccm:application>

View File

@ -4,8 +4,8 @@ import com.arsdigita.cms.basetypes.Address;
import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentPage;
// Address object // 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 );
} }

View File

@ -5,10 +5,10 @@
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
<ctd:content-type <ctd:content-type
label="BaseAddress" label="Address"
description="A basic Address type" description="An Address type"
objectType="com.arsdigita.cms.contenttypes.BaseAddress" objectType="com.arsdigita.cms.contenttypes.Address"
classname="com.arsdigita.cms.contenttypes.BaseAddress"> classname="com.arsdigita.cms.contenttypes.Address">
<ctd:authoring-kit <ctd:authoring-kit
createComponent="com.arsdigita.cms.ui.authoring.PageCreate"> createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
@ -18,7 +18,7 @@
labelBundle="com.arsdigita.cms.basetypes.BasetypesResources" labelBundle="com.arsdigita.cms.basetypes.BasetypesResources"
descriptionKey="address.authoring.basic_properties.description" descriptionKey="address.authoring.basic_properties.description"
descriptionBundle="com.arsdigita.cms.basetypes.BasetypesResources" descriptionBundle="com.arsdigita.cms.basetypes.BasetypesResources"
component="com.arsdigita.cms.contenttypes.ui.BaseAddressPropertiesStep" component="com.arsdigita.cms.contenttypes.ui.AddressPropertiesStep"
ordering="1"/> ordering="1"/>
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/> <ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>

View File

@ -6,11 +6,11 @@
<initializer class="com.arsdigita.cms.Initializer"/> <initializer class="com.arsdigita.cms.Initializer"/>
</requires> </requires>
<provides> <provides>
<table name="ct_baseAddresses"/> <table name="ct_addresses"/>
<initializer class="com.arsdigita.cms.contenttypes.BaseAddressInitializer"/> <initializer class="com.arsdigita.cms.contenttypes.AddressInitializer"/>
</provides> </provides>
<scripts> <scripts>
<schema directory="ccm-cms-types-baseAddress"/> <schema directory="ccm-cms-types-address"/>
<data class="com.arsdigita.cms.contenttypes.BaseAddressLoader"/> <data class="com.arsdigita.cms.contenttypes.AddressLoader"/>
</scripts> </scripts>
</load> </load>

View File

@ -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;
/**
* <p><code>DomainObject</code> class to represent address <code>ContentType</code>
* objects.
* <br />
* 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.</p>
* <p>This class extends {@link com.arsdigita.cms.ContentItem content item} and
* adds extended attributes specific for an not country specific address:</p>
*
* @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 <code>DataObject</code> is retrieved
* from the persistent storage mechanism with an <code>OID</code>
* specified by <i>id</i> and
* <code>Address.BASE_DATA_OBJECT_TYPE</code>.
*
* @param id The <code>id</code> for the retrieved
* <code>DataObject</code>.
**/
public BaseAddress(BigDecimal id) throws DataObjectNotFoundException {
this(new OID(BASE_DATA_OBJECT_TYPE, id));
}
/**
* Constructor. The contained <code>DataObject</code> is retrieved
* from the persistent storage mechanism with an <code>OID</code>
* specified by <i>id</i>.
*
* @param id The <code>OID</code> for the retrieved
* <code>DataObject</code>.
**/
public BaseAddress(OID id) throws DataObjectNotFoundException {
super(id);
}
/**
* Constructor. Retrieves or creates a content item using the
* <code>DataObject</code> argument.
*
* @param obj The <code>DataObject</code> 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 <code>String</code> 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 *****************************************************/
}

View File

@ -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]

View File

@ -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;
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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));
}
}