Nachhalten der Änderungen old contact & esdservice. Update Skript steht noch aus.
git-svn-id: https://svn.libreccm.org/ccm/trunk@1335 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
7248a226db
commit
9938a6d4e8
|
|
@ -2,7 +2,7 @@
|
|||
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
||||
name="ccm-ldn-types-contact"
|
||||
prettyName="Red Hat CCM Content Types"
|
||||
version="6.6.0"
|
||||
version="6.6.1"
|
||||
release="1"
|
||||
webapp="ROOT">
|
||||
<ccm:dependencies>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
//
|
||||
// $Id: Contact.pdl 1689 2007-10-26 11:06:23Z chrisg23 $
|
||||
// $DateTime: 2004/08/17 23:15:09 $
|
||||
model com.arsdigita.cms.contenttypes;
|
||||
|
||||
model com.arsdigita.london.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.ContentPage;
|
||||
import com.arsdigita.cms.ContentItem;
|
||||
|
|
@ -25,33 +26,33 @@ import com.arsdigita.cms.ContentItem;
|
|||
// object type to hold Contact content type
|
||||
object type Contact extends ContentPage {
|
||||
|
||||
String [0..1] givenName = ct_contacts.given_name VARCHAR(1000);
|
||||
String [0..1] familyName = ct_contacts.family_name VARCHAR(1000);
|
||||
String [0..1] suffix = ct_contacts.suffix VARCHAR(100);
|
||||
String [0..1] emails = ct_contacts.emails VARCHAR(500);
|
||||
String [0..1] description = ct_contacts.description VARCHAR(2000);
|
||||
String [0..1] orgName = ct_contacts.orgname VARCHAR(2000);
|
||||
String [0..1] deptName = ct_contacts.deptname VARCHAR(2000);
|
||||
String [0..1] role = ct_contacts.role VARCHAR(2000);
|
||||
String [0..1] givenName = ct_ldn_contacts.given_name VARCHAR(1000);
|
||||
String [0..1] familyName = ct_ldn_contacts.family_name VARCHAR(1000);
|
||||
String [0..1] suffix = ct_ldn_contacts.suffix VARCHAR(100);
|
||||
String [0..1] emails = ct_ldn_contacts.emails VARCHAR(500);
|
||||
String [0..1] description = ct_ldn_contacts.description VARCHAR(2000);
|
||||
String [0..1] orgName = ct_ldn_contacts.orgname VARCHAR(2000);
|
||||
String [0..1] deptName = ct_ldn_contacts.deptname VARCHAR(2000);
|
||||
String [0..1] role = ct_ldn_contacts.role VARCHAR(2000);
|
||||
// type of contact e.g. Enquiry,Complaint etc...
|
||||
ContactType [0..1] contactType = join ct_contacts.type_id
|
||||
to ct_contact_types.type_id;
|
||||
component ContactAddress [0..1] contactAddress = join ct_contacts.address_id
|
||||
to ct_contact_address.address_id;
|
||||
ContactType [0..1] contactType = join ct_ldn_contacts.type_id
|
||||
to ct_ldn_contact_types.type_id;
|
||||
component ContactAddress [0..1] contactAddress = join ct_ldn_contacts.address_id
|
||||
to ct_ldn_contact_address.address_id;
|
||||
|
||||
component ContactPhone [0..n] phones = join ct_contacts.contact_id
|
||||
to ct_contact_phones.contact_id;
|
||||
component ContactPhone [0..n] phones = join ct_ldn_contacts.contact_id
|
||||
to ct_ldn_contact_phones.contact_id;
|
||||
|
||||
reference key ( ct_contacts.contact_id );
|
||||
reference key ( ct_ldn_contacts.contact_id );
|
||||
}
|
||||
|
||||
association {
|
||||
Contact[0..1] associatedContactForItem =
|
||||
join cms_items.item_id to contact_content_item_map.item_id,
|
||||
join contact_content_item_map.contact_id to ct_contacts.contact_id;
|
||||
join contact_content_item_map.contact_id to ct_ldn_contacts.contact_id;
|
||||
ContentItem[0..n] associatedContentItemsForContact =
|
||||
join ct_contacts.contact_id to contact_content_item_map.contact_id,
|
||||
join contact_content_item_map.item_id to cms_items.item_id;
|
||||
join ct_ldn_contacts.contact_id to ldn_contact_content_item_map.contact_id,
|
||||
join ldn_contact_content_item_map.item_id to cms_items.item_id;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -61,13 +62,13 @@ association {
|
|||
|
||||
data operation removeContactFromContentItemAssociation {
|
||||
do {
|
||||
delete from contact_content_item_map where item_id = :itemID
|
||||
delete from ldn_contact_content_item_map where item_id = :itemID
|
||||
}
|
||||
}
|
||||
|
||||
data operation removeContactFromAllAssociations {
|
||||
do {
|
||||
delete from contact_content_item_map where contact_id = :contactID
|
||||
delete from ldn_contact_content_item_map where contact_id = :contactID
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +78,7 @@ query getContactForItem {
|
|||
do {
|
||||
select contact_id, item_id
|
||||
from
|
||||
contact_content_item_map
|
||||
ldn_contact_content_item_map
|
||||
where
|
||||
item_id = :itemID
|
||||
} map {
|
||||
|
|
@ -17,26 +17,27 @@
|
|||
//
|
||||
// $Id: ContactAddress.pdl 287 2005-02-22 00:29:02Z sskracic $
|
||||
// $DateTime: 2004/08/17 23:15:09 $
|
||||
model com.arsdigita.cms.contenttypes;
|
||||
|
||||
model com.arsdigita.london.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.ContentItem;
|
||||
|
||||
// object type to hold ContactAddress domain object type
|
||||
|
||||
object type ContactAddress extends ContentItem {
|
||||
String [0..1] saon = ct_contact_address.saon VARCHAR(2000);
|
||||
String [1..1] paon = ct_contact_address.paon VARCHAR(2000);
|
||||
String [1..1] streetDesc = ct_contact_address.street_desc VARCHAR(2000);
|
||||
String [0..1] saon = ct_ldn_contact_address.saon VARCHAR(2000);
|
||||
String [1..1] paon = ct_ldn_contact_address.paon VARCHAR(2000);
|
||||
String [1..1] streetDesc = ct_ldn_contact_address.street_desc VARCHAR(2000);
|
||||
String [0..1] streetRefNo =
|
||||
ct_contact_address.unique_street_ref_no VARCHAR(2000);
|
||||
String [0..1] locality = ct_contact_address.locality VARCHAR(2000);
|
||||
String [0..1] town = ct_contact_address.town VARCHAR(1000);
|
||||
ct_ldn_contact_address.unique_street_ref_no VARCHAR(2000);
|
||||
String [0..1] locality = ct_ldn_contact_address.locality VARCHAR(2000);
|
||||
String [0..1] town = ct_ldn_contact_address.town VARCHAR(1000);
|
||||
String [0..1] administrativeArea =
|
||||
ct_contact_address.administrativeArea VARCHAR(2000);
|
||||
String [0..1] postTown = ct_contact_address.post_town VARCHAR(1000);
|
||||
String [0..1] postCode = ct_contact_address.post_code VARCHAR(1000);
|
||||
ct_ldn_contact_address.administrativeArea VARCHAR(2000);
|
||||
String [0..1] postTown = ct_ldn_contact_address.post_town VARCHAR(1000);
|
||||
String [0..1] postCode = ct_ldn_contact_address.post_code VARCHAR(1000);
|
||||
String [0..1] referenceNo =
|
||||
ct_contact_address.unique_prop_ref_no VARCHAR(2000);
|
||||
ct_ldn_contact_address.unique_prop_ref_no VARCHAR(2000);
|
||||
|
||||
reference key ( ct_contact_address.address_id );
|
||||
reference key ( ct_ldn_contact_address.address_id );
|
||||
}
|
||||
|
|
@ -17,15 +17,16 @@
|
|||
//
|
||||
// $Id: ContactPhone.pdl 287 2005-02-22 00:29:02Z sskracic $
|
||||
// $DateTime: 2004/08/17 23:15:09 $
|
||||
model com.arsdigita.cms.contenttypes;
|
||||
|
||||
model com.arsdigita.london.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.ContentItem;
|
||||
|
||||
object type ContactPhone extends ContentItem{
|
||||
|
||||
String [1..1] phoneType = ct_contact_phones.phoneType VARCHAR(100);
|
||||
String [1..1] phoneNumber = ct_contact_phones.phoneNumber VARCHAR(100);
|
||||
String [1..1] phoneType = ct_ldn_contact_phones.phoneType VARCHAR(100);
|
||||
String [1..1] phoneNumber = ct_ldn_contact_phones.phoneNumber VARCHAR(100);
|
||||
|
||||
reference key ( ct_contact_phones.phone_id );
|
||||
reference key ( ct_ldn_contact_phones.phone_id );
|
||||
|
||||
}
|
||||
|
|
@ -17,16 +17,17 @@
|
|||
//
|
||||
// $Id: ContactType.pdl 287 2005-02-22 00:29:02Z sskracic $
|
||||
// $DateTime: 2004/08/17 23:15:09 $
|
||||
model com.arsdigita.cms.contenttypes;
|
||||
|
||||
model com.arsdigita.london.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.ContentItem;
|
||||
|
||||
// object type to hold ContactType object type
|
||||
object type ContactType extends ContentItem {
|
||||
|
||||
String [1..1] typeName = ct_contact_types.type_name VARCHAR(1000);
|
||||
String [1..1] typeName = ct_ldn_contact_types.type_name VARCHAR(1000);
|
||||
|
||||
reference key ( ct_contact_types.type_id );
|
||||
reference key ( ct_ldn_contact_types.type_id );
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -16,4 +16,4 @@
|
|||
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
--
|
||||
|
||||
@@ ../default/upgrade/6.5.0-6.5.1/contact_content_item_map_table.sql
|
||||
@@ default/6.5.0-6.5.1/contact_content_item_map_table.sql
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
--
|
||||
-- Copyright (C) 2007 Magpie. 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
|
||||
--
|
||||
|
||||
@@ default/6.5.0-6.5.1/contact_content_item_map_table.sql
|
||||
|
|
@ -16,6 +16,6 @@
|
|||
|
||||
begin;
|
||||
|
||||
\i ../default/upgrade/6.5.0-6.5.1/contact_content_item_map_table.sql
|
||||
\i default/6.5.0-6.5.1/contact_content_item_map_table.sql
|
||||
|
||||
commit;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
--
|
||||
-- Copyright (C) 2007 Magpie. All Rights Reserved.
|
||||
--
|
||||
-- The contents of this file are subject to the CCM Public
|
||||
-- License (the "License"); you may not use this file except in
|
||||
-- compliance with the License. You may obtain a copy of the
|
||||
-- License at http://www.redhat.com/licenses/ccmpl.html.
|
||||
--
|
||||
-- Software distributed under the License is distributed on an
|
||||
-- "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
|
||||
-- or implied. See the License for the specific language governing
|
||||
-- rights and limitations under the License.
|
||||
--
|
||||
|
||||
\echo Red Hat Enterprise CMS 6.5.0 -> 6.5.1 Upgrade Script (PostgreSQL)
|
||||
|
||||
begin;
|
||||
|
||||
\i default/6.5.0-6.5.1/contact_content_item_map_table.sql
|
||||
|
||||
commit;
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
|
||||
<ctd:content-type
|
||||
label="LDN Contact"
|
||||
description="A London Contact person in CMS"
|
||||
objectType="com.arsdigita.cms.contenttypes.Contact"
|
||||
classname="com.arsdigita.cms.contenttypes.Contact">
|
||||
|
||||
<ctd:authoring-kit createComponent="com.arsdigita.cms.contenttypes.ui.contact.ContactCreate">
|
||||
|
||||
<ctd:authoring-step
|
||||
label="Contact Properties"
|
||||
description="Edit the basic contact properties"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ContactResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.contact.ContactPropertiesStep"/>
|
||||
|
||||
<ctd:authoring-step
|
||||
label="Contact Address Properties"
|
||||
description="Edit the basic contact properties"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ContactResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.contact.AddressProperties"/>
|
||||
|
||||
<ctd:authoring-step
|
||||
label="Contact Phones"
|
||||
description="Edit the Phones associated with contact"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ContactResources"
|
||||
component="com.arsdigita.cms.contenttypes.ui.contact.PhonesPanel"/>
|
||||
|
||||
</ctd:authoring-kit>
|
||||
</ctd:content-type>
|
||||
</ctd:content-types>
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
|
||||
|
||||
<ctd:content-type
|
||||
label="LDN Contact"
|
||||
description="A London Contact person in CMS"
|
||||
objectType="com.arsdigita.london.contenttypes.Contact"
|
||||
classname="com.arsdigita.london.contenttypes.Contact">
|
||||
|
||||
<ctd:authoring-kit createComponent="com.arsdigita.london.contenttypes.ui.contact.ContactCreate">
|
||||
|
||||
<ctd:authoring-step
|
||||
label="Contact Properties"
|
||||
description="Edit the basic contact properties"
|
||||
descriptionBundle="com.arsdigita.cms.contenttypes.ContactResources"
|
||||
component="com.arsdigita.london.contenttypes.ui.contact.ContactPropertiesStep"/>
|
||||
|
||||
<ctd:authoring-step
|
||||
label="Contact Address Properties"
|
||||
description="Edit the basic contact properties"
|
||||
descriptionBundle="com.arsdigita.london.contenttypes.ContactResources"
|
||||
component="com.arsdigita.london.contenttypes.ui.contact.AddressProperties"/>
|
||||
|
||||
<ctd:authoring-step
|
||||
label="Contact Phones"
|
||||
description="Edit the Phones associated with contact"
|
||||
descriptionBundle="com.arsdigita.london.contenttypes.ContactResources"
|
||||
component="com.arsdigita.london.contenttypes.ui.contact.PhonesPanel"/>
|
||||
|
||||
</ctd:authoring-kit>
|
||||
</ctd:content-type>
|
||||
</ctd:content-types>
|
||||
|
|
@ -8,7 +8,8 @@
|
|||
The default properties for Contact are left as is and are inherited from ContentPage
|
||||
-->
|
||||
<xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator">
|
||||
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.Contact" extends="com.arsdigita.cms.ContentPage">
|
||||
<xrd:adapter objectType="com.arsdigita.london.contenttypes.Contact"
|
||||
extends="com.arsdigita.cms.ContentPage">
|
||||
<xrd:associations rule="include">
|
||||
<xrd:property name="/object/phones"/>
|
||||
<xrd:property name="/object/contactType"/>
|
||||
|
|
@ -6,15 +6,15 @@
|
|||
<initializer class="com.arsdigita.cms.Initializer"/>
|
||||
</requires>
|
||||
<provides>
|
||||
<table name="ct_contact_types"/>
|
||||
<table name="ct_contact_address"/>
|
||||
<table name="ct_contact_phones"/>
|
||||
<table name="ct_contacts"/>
|
||||
<table name="ct_ldn_contact_types"/>
|
||||
<table name="ct_ldn_contact_address"/>
|
||||
<table name="ct_ldn_contact_phones"/>
|
||||
<table name="ct_ldn_contacts"/>
|
||||
|
||||
<initializer class="com.arsdigita.cms.contenttypes.ContactInitializer"/>
|
||||
<initializer class="com.arsdigita.london.contenttypes.ContactInitializer"/>
|
||||
</provides>
|
||||
<scripts>
|
||||
<schema directory="ccm-ldn-types-contact"/>
|
||||
<data class="com.arsdigita.cms.contenttypes.ContactLoader"/>
|
||||
<data class="com.arsdigita.london.contenttypes.ContactLoader"/>
|
||||
</scripts>
|
||||
</load>
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
cms.contenttypes.ui.contact.address_saon=SAON
|
||||
cms.contenttypes.ui.contact.address_paon=PAON
|
||||
cms.contenttypes.ui.contact.address_streetdesc=Street Description
|
||||
cms.contenttypes.ui.contact.address_streetrefno=Street Reference No
|
||||
cms.contenttypes.ui.contact.address_locality=Locality
|
||||
cms.contenttypes.ui.contact.address_town=Town
|
||||
cms.contenttypes.ui.contact.address_administrative_area=Administrative Area
|
||||
cms.contenttypes.ui.contact.address_posttown=Postal Town
|
||||
cms.contenttypes.ui.contact.address_postcode=Postal Code
|
||||
cms.contenttypes.ui.contact.address_proprefno=Property Reference No
|
||||
cms.contenttypes.ui.contact_type=Contact Type
|
||||
cms.contenttypes.ui.contact_orgname=Organization Name
|
||||
cms.contenttypes.ui.contact_deptname=Department Name
|
||||
cms.contenttypes.ui.contact_role=Role of Contact
|
||||
cms.contenttypes.ui.contact_givenname=Given Name
|
||||
cms.contenttypes.ui.contact_familyname=Family Name
|
||||
cms.contenttypes.ui.contact_suffix=Suffix
|
||||
cms.contenttypes.ui.contact_description=Contact Description
|
||||
cms.contenttypes.ui.contact.phone_number=Number
|
||||
cms.contenttypes.ui.phone_type=Types
|
||||
cms.contenttypes.ui.contact_emails=Emails
|
||||
com.arsdigita.cms.contenttypes.contact_authoring_step_description=Contact
|
||||
com.arsdigita.cms.contenttypes.contact_authoring_step_label=Contact
|
||||
cms.contenttypes.ui.name=Name
|
||||
cms.contenttypes.ui.title=Title
|
||||
cms.contenttypes.ui.description=Description
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
package com.arsdigita.london.contenttypes;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ public class Contact extends ContentPage {
|
|||
|
||||
/** data object type for this domain object */
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.cms.contenttypes.Contact";
|
||||
"com.arsdigita.london.contenttypes.Contact";
|
||||
|
||||
/** Default constructor. */
|
||||
public Contact() {
|
||||
|
|
@ -96,7 +96,7 @@ public class Contact extends ContentPage {
|
|||
DataOperation operation = SessionManager
|
||||
.getSession()
|
||||
.retrieveDataOperation(
|
||||
"com.arsdigita.cms.contenttypes.removeContactFromContentItemAssociation");
|
||||
"com.arsdigita.london.contenttypes.removeContactFromContentItemAssociation");
|
||||
operation.setParameter("itemID", new Integer(item.getID().intValue()));
|
||||
operation.execute();
|
||||
}
|
||||
|
|
@ -109,7 +109,7 @@ public class Contact extends ContentPage {
|
|||
DataOperation operation = SessionManager
|
||||
.getSession()
|
||||
.retrieveDataOperation(
|
||||
"com.arsdigita.cms.contenttypes.removeContactFromAllAssociations");
|
||||
"com.arsdigita.london.contenttypes.removeContactFromAllAssociations");
|
||||
operation.setParameter("contactID", new Integer(this.getID().intValue()));
|
||||
operation.execute();
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ public class Contact extends ContentPage {
|
|||
public static Contact getContactForItem(ContentItem item) {
|
||||
s_log.debug("getting contact for item " + item);
|
||||
DataQuery query = SessionManager.getSession().retrieveQuery(
|
||||
"com.arsdigita.cms.contenttypes.getContactForItem");
|
||||
"com.arsdigita.london.contenttypes.getContactForItem");
|
||||
query.setParameter("itemID", item.getID());
|
||||
BigDecimal contactID;
|
||||
Contact contact = null;
|
||||
|
|
@ -153,7 +153,7 @@ public class Contact extends ContentPage {
|
|||
* @param id the id of the object to retrieve
|
||||
*/
|
||||
public Contact( BigDecimal id ) throws DataObjectNotFoundException {
|
||||
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
||||
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -238,11 +238,13 @@ public class Contact extends ContentPage {
|
|||
}
|
||||
|
||||
/** 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);
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
package com.arsdigita.london.contenttypes;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ public class ContactAddress extends ContentItem {
|
|||
|
||||
/** data object type for this domain object */
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.cms.contenttypes.ContactAddress";
|
||||
"com.arsdigita.london.contenttypes.ContactAddress";
|
||||
|
||||
public static final String SAON = "saon";
|
||||
public static final String PAON = "paon";
|
||||
|
|
@ -16,19 +16,19 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
package com.arsdigita.london.contenttypes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.arsdigita.cms.ContentPage;
|
||||
import com.arsdigita.cms.ContentSection;
|
||||
import com.arsdigita.cms.contenttypes.ui.contact.AddContactPropertiesStep;
|
||||
import com.arsdigita.cms.contenttypes.ContentItemTraversalAdapter;
|
||||
import com.arsdigita.cms.contenttypes.ContentTypeInitializer;
|
||||
import com.arsdigita.london.contenttypes.ui.AddContactPropertiesStep;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
// import com.arsdigita.domain.SimpleDomainObjectTraversalAdapter;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.runtime.DomainInitEvent;
|
||||
import org.apache.log4j.Logger;
|
||||
// import com.arsdigita.runtime.LegacyInitEvent;
|
||||
|
||||
/**
|
||||
* Initializer class to initialize <code>ContentType Contact</code>.
|
||||
|
|
@ -45,13 +45,16 @@ public class ContactInitializer extends ContentTypeInitializer {
|
|||
super("ccm-ldn-types-contact.pdl.mf", Contact.BASE_DATA_OBJECT_TYPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getStylesheets() {
|
||||
return new String[]{
|
||||
"/static/content-types/com/arsdigita/cms/contenttypes/Contact.xsl",};
|
||||
"/static/content-types/com/arsdigita/london/contenttypes/Contact.xsl",};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTraversalXML() {
|
||||
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Contact.xml";
|
||||
return
|
||||
"/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/Contact.xml";
|
||||
}
|
||||
private static ArrayList phoneTypesList = new ArrayList(10);
|
||||
|
||||
|
|
@ -73,6 +76,7 @@ public class ContactInitializer extends ContentTypeInitializer {
|
|||
}
|
||||
|
||||
// public void init(LegacyInitEvent evt) {
|
||||
@Override
|
||||
public void init(DomainInitEvent evt) {
|
||||
super.init(evt);
|
||||
|
||||
|
|
@ -108,14 +112,14 @@ public class ContactInitializer extends ContentTypeInitializer {
|
|||
|
||||
private GlobalizedMessage getAuthoringStepDescription() {
|
||||
return new GlobalizedMessage(
|
||||
"com.arsdigita.cms.contenttypes.contact_authoring_step_description",
|
||||
"com.arsdigita.cms.contenttypes.ContactResources");
|
||||
"com.arsdigita.london.contenttypes.contact_authoring_step_description",
|
||||
"com.arsdigita.london.contenttypes.ContactResources");
|
||||
}
|
||||
|
||||
private GlobalizedMessage getAuthoringStepLabel() {
|
||||
return new GlobalizedMessage(
|
||||
"com.arsdigita.cms.contenttypes.contact_authoring_step_label",
|
||||
"com.arsdigita.cms.contenttypes.ContactResources");
|
||||
"com.arsdigita.london.contenttypes.contact_authoring_step_label",
|
||||
"com.arsdigita.london.contenttypes.ContactResources");
|
||||
}
|
||||
|
||||
private Class getAuthoringStep() {
|
||||
|
|
@ -16,8 +16,9 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
package com.arsdigita.london.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
||||
import com.arsdigita.runtime.ScriptContext;
|
||||
|
||||
/**
|
||||
|
|
@ -33,7 +34,7 @@ import com.arsdigita.runtime.ScriptContext;
|
|||
public class ContactLoader extends AbstractContentTypeLoader {
|
||||
|
||||
private static final String[] TYPES = {
|
||||
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Contact.xml"
|
||||
"/WEB-INF/content-types/com/arsdigita/london/contenttypes/Contact.xml"
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -46,6 +47,7 @@ public class ContactLoader extends AbstractContentTypeLoader {
|
|||
/**
|
||||
* @see com.arsdigita.runtime.Script#run(com.arsdigita.runtime.ScriptContext)
|
||||
*/
|
||||
@Override
|
||||
public void run(ScriptContext context) {
|
||||
super.run(context);
|
||||
loadContactTypes();
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
package com.arsdigita.london.contenttypes;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ public class ContactPhone extends ContentItem {
|
|||
|
||||
/** data object type for this domain object */
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.cms.contenttypes.ContactPhone";
|
||||
"com.arsdigita.london.contenttypes.ContactPhone";
|
||||
|
||||
/** PDL property names */
|
||||
public static final String PHONE_TYPE = "phoneType";
|
||||
|
|
@ -80,6 +80,7 @@ public class ContactPhone extends ContentItem {
|
|||
super(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
com.arsdigita.london.contenttypes.ui.contact.address_saon=SAON
|
||||
com.arsdigita.london.contenttypes.ui.contact.address_paon=PAON
|
||||
com.arsdigita.london.contenttypes.ui.contact.address_streetdesc=Street Description
|
||||
com.arsdigita.london.contenttypes.ui.contact.address_streetrefno=Street Reference No
|
||||
com.arsdigita.london.contenttypes.ui.contact.address_locality=Locality
|
||||
com.arsdigita.london.contenttypes.ui.contact.address_town=Town
|
||||
com.arsdigita.london.contenttypes.ui.contact.address_administrative_area=Administrative Area
|
||||
com.arsdigita.london.contenttypes.ui.contact.address_posttown=Postal Town
|
||||
com.arsdigita.london.contenttypes.ui.contact.address_postcode=Postal Code
|
||||
com.arsdigita.london.contenttypes.ui.contact.address_proprefno=Property Reference No
|
||||
com.arsdigita.london.contenttypes.ui.contact_type=Contact Type
|
||||
com.arsdigita.london.contenttypes.ui.contact_orgname=Organization Name
|
||||
com.arsdigita.london.contenttypes.ui.contact_deptname=Department Name
|
||||
com.arsdigita.london.contenttypes.ui.contact_role=Role of Contact
|
||||
com.arsdigita.london.contenttypes.ui.contact_givenname=Given Name
|
||||
com.arsdigita.london.contenttypes.ui.contact_familyname=Family Name
|
||||
com.arsdigita.london.contenttypes.ui.contact_suffix=Suffix
|
||||
com.arsdigita.london.contenttypes.ui.contact_description=Contact Description
|
||||
com.arsdigita.london.contenttypes.ui.contact.phone_number=Number
|
||||
com.arsdigita.london.contenttypes.ui.phone_type=Types
|
||||
com.arsdigita.london.contenttypes.ui.contact_emails=Emails
|
||||
com.arsdigita.london.contenttypes.contact_authoring_step_description=Contact
|
||||
com.arsdigita.london.contenttypes.contact_authoring_step_label=Contact
|
||||
com.arsdigita.london.contenttypes.ui.name=Name
|
||||
com.arsdigita.london.contenttypes.ui.title=Title
|
||||
com.arsdigita.london.contenttypes.ui.description=Description
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
package com.arsdigita.london.contenttypes;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ public class ContactType extends ContentItem {
|
|||
|
||||
/** data object type for this domain object */
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.cms.contenttypes.ContactType";
|
||||
"com.arsdigita.london.contenttypes.ContactType";
|
||||
|
||||
public static final String TYPE_NAME = "typeName";
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
package com.arsdigita.london.contenttypes;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
|
@ -53,6 +53,7 @@ public class ContactTypesCollection extends DomainCollection {
|
|||
* the collection.
|
||||
*
|
||||
**/
|
||||
@Override
|
||||
public DomainObject getDomainObject() {
|
||||
return new ContactType(m_dataCollection.getDataObject());
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes;
|
||||
package com.arsdigita.london.contenttypes;
|
||||
|
||||
import com.arsdigita.domain.DomainCollection;
|
||||
import com.arsdigita.persistence.DataCollection;
|
||||
|
|
@ -27,7 +27,6 @@ import com.arsdigita.persistence.DataCollection;
|
|||
* @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a>
|
||||
*
|
||||
* @version $Id: PhonesCollection.java 287 2005-02-22 00:29:02Z sskracic $
|
||||
*
|
||||
*/
|
||||
public class PhonesCollection extends DomainCollection {
|
||||
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Content type Contact</title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<body>
|
||||
|
||||
<p>
|
||||
Implementation of a Contact content type.</p>
|
||||
Implementation of a Contact content type, specific for Local Authorities.</p>
|
||||
<p>
|
||||
Contact attributes include
|
||||
</p>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.arsdigita.cms.contenttypes.ui.contact;
|
||||
package com.arsdigita.london.contenttypes.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.cms.contenttypes.Contact;
|
||||
import com.arsdigita.london.contenttypes.Contact;
|
||||
import com.arsdigita.cms.contenttypes.ui.ResettableContainer;
|
||||
import com.arsdigita.cms.contenttypes.util.ContactGlobalizationUtil;
|
||||
import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedContainer;
|
||||
import com.arsdigita.domain.DomainObject;
|
||||
|
|
@ -107,6 +107,7 @@ public class AddContactPropertiesStep extends ResettableContainer {
|
|||
super(m);
|
||||
|
||||
m_contact = new RequestLocal() {
|
||||
@Override
|
||||
protected Object initialValue(PageState s) {
|
||||
ContentItem item = (ContentItem) ((ItemSelectionModel) getSingleSelectionModel())
|
||||
.getSelectedObject(s);
|
||||
|
|
@ -117,24 +118,29 @@ public class AddContactPropertiesStep extends ResettableContainer {
|
|||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getSelectedKey(PageState s) {
|
||||
Contact contact = (Contact) getSelectedObject(s);
|
||||
return (contact == null) ? null : contact.getID();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DomainObject getSelectedObject(PageState s) {
|
||||
return (DomainObject) m_contact.get(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedObject(PageState s, DomainObject o) {
|
||||
m_contact.set(s, o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedKey(PageState s, Object key) {
|
||||
throw new UnsupportedOperationException((String) GlobalizationUtil
|
||||
.globalize("cms.ui.authoring.not_implemented").localize());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelected(PageState s) {
|
||||
return (getSelectedObject(s) != null);
|
||||
}
|
||||
|
|
@ -183,22 +189,24 @@ public class AddContactPropertiesStep extends ResettableContainer {
|
|||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(
|
||||
itemModel);
|
||||
sheet.add(ContactGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.name"), Contact.NAME);
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.name"),
|
||||
Contact.NAME);
|
||||
|
||||
sheet.add(ContactGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.title"), Contact.TITLE);
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.title"),
|
||||
Contact.TITLE);
|
||||
|
||||
sheet.add(ContactGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.contact_givenname"),
|
||||
Contact.GIVEN_NAME);
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_givenname"),
|
||||
Contact.GIVEN_NAME);
|
||||
|
||||
sheet.add(ContactGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.contact_familyname"),
|
||||
Contact.FAMILY_NAME);
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_familyname"),
|
||||
Contact.FAMILY_NAME);
|
||||
|
||||
sheet.add(ContactGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.contact_type"),
|
||||
Contact.CONTACT_TYPE,
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_type"),
|
||||
Contact.CONTACT_TYPE,
|
||||
new DomainObjectPropertySheet.AttributeFormatter() {
|
||||
public String format(DomainObject item,
|
||||
String attribute, PageState state) {
|
||||
|
|
@ -213,27 +221,27 @@ public class AddContactPropertiesStep extends ResettableContainer {
|
|||
});
|
||||
|
||||
sheet.add(ContactGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.description"),
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.description"),
|
||||
Contact.DESCRIPTION);
|
||||
|
||||
sheet.add(ContactGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.contact_emails"),
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_emails"),
|
||||
Contact.EMAILS);
|
||||
|
||||
sheet.add(ContactGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.contact_suffix"),
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_suffix"),
|
||||
Contact.SUFFIX);
|
||||
|
||||
sheet.add(ContactGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.contact_orgname"),
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_orgname"),
|
||||
Contact.ORG_NAME);
|
||||
|
||||
sheet.add(ContactGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.contact_deptname"),
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_deptname"),
|
||||
Contact.DEPT_NAME);
|
||||
|
||||
sheet.add(ContactGlobalizationUtil
|
||||
.globalize("cms.contenttypes.ui.contact_role"),
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_role"),
|
||||
Contact.ROLE);
|
||||
return sheet;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.arsdigita.cms.contenttypes.ui.contact;
|
||||
package com.arsdigita.london.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.ActionLink;
|
||||
import com.arsdigita.bebop.ColumnPanel;
|
||||
|
|
@ -18,7 +18,7 @@ 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.cms.contenttypes.Contact;
|
||||
import com.arsdigita.london.contenttypes.Contact;
|
||||
import com.arsdigita.cms.ui.ItemSearchWidget;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
|
||||
|
|
@ -16,11 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui.contact;
|
||||
package com.arsdigita.london.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.util.ContactGlobalizationUtil;
|
||||
import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||
|
|
@ -70,43 +70,43 @@ public class AddressProperties extends SimpleEditStep {
|
|||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_saon"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact.address_saon"),
|
||||
"contactAddress.saon");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_paon"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact.address_paon"),
|
||||
"contactAddress.paon");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_streetdesc"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact.address_streetdesc"),
|
||||
"contactAddress.streetDesc");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_streetrefno"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact.address_streetrefno"),
|
||||
"contactAddress.streetRefNo");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_locality"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact.address_locality"),
|
||||
"contactAddress.locality");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_town"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact.address_town"),
|
||||
"contactAddress.town");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_administrative_area"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact.address_administrative_area"),
|
||||
"contactAddress.administrativeArea");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_posttown"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact.address_posttown"),
|
||||
"contactAddress.postTown");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_postcode"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact.address_postcode"),
|
||||
"contactAddress.postCode");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_proprefno"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact.address_proprefno"),
|
||||
"contactAddress.referenceNo");
|
||||
|
||||
return sheet;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui.contact;
|
||||
package com.arsdigita.london.contenttypes.ui;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -28,9 +28,9 @@ 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.cms.contenttypes.Contact;
|
||||
import com.arsdigita.cms.contenttypes.ContactAddress;
|
||||
import com.arsdigita.cms.contenttypes.util.ContactGlobalizationUtil;
|
||||
import com.arsdigita.london.contenttypes.Contact;
|
||||
import com.arsdigita.london.contenttypes.ContactAddress;
|
||||
import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
||||
|
||||
/**
|
||||
|
|
@ -65,6 +65,7 @@ public class AddressPropertyForm extends BasicItemForm {
|
|||
* 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();
|
||||
addPAON();
|
||||
|
|
@ -79,14 +80,16 @@ public class AddressPropertyForm extends BasicItemForm {
|
|||
}
|
||||
|
||||
protected void addSAON() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_saon")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact.address_saon")));
|
||||
ParameterModel saonParam = new StringParameter(ContactAddress.SAON);
|
||||
TextField saon = new TextField(saonParam);
|
||||
add(saon);
|
||||
}
|
||||
|
||||
protected void addPAON() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_paon")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact.address_paon")));
|
||||
ParameterModel paonParam = new StringParameter(ContactAddress.PAON);
|
||||
TextField paon = new TextField(paonParam);
|
||||
paon.addValidationListener(new NotNullValidationListener());
|
||||
|
|
@ -94,7 +97,8 @@ public class AddressPropertyForm extends BasicItemForm {
|
|||
}
|
||||
|
||||
protected void addStreetDesc() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_streetdesc")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact.address_streetdesc")));
|
||||
ParameterModel streetDescParam = new StringParameter(ContactAddress.STREET_DESC);
|
||||
TextField streetDesc = new TextField(streetDescParam);
|
||||
streetDesc.addValidationListener(new NotNullValidationListener());
|
||||
|
|
@ -102,49 +106,56 @@ public class AddressPropertyForm extends BasicItemForm {
|
|||
}
|
||||
|
||||
protected void addStreetRefNo() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_streetrefno")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact.address_streetrefno")));
|
||||
ParameterModel streetRefNoParam = new StringParameter(ContactAddress.STREET_REF_NO);
|
||||
TextField streetRefNo = new TextField(streetRefNoParam);
|
||||
add(streetRefNo);
|
||||
}
|
||||
|
||||
protected void addLocality() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_locality")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact.address_locality")));
|
||||
ParameterModel localityParam = new StringParameter(ContactAddress.LOCALITY);
|
||||
TextField locality = new TextField(localityParam);
|
||||
add(locality);
|
||||
}
|
||||
|
||||
protected void addTown() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_town")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact.address_town")));
|
||||
ParameterModel townParam = new StringParameter(ContactAddress.TOWN);
|
||||
TextField town = new TextField(townParam);
|
||||
add(town);
|
||||
}
|
||||
|
||||
protected void addArea() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_administrative_area")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact.address_administrative_area")));
|
||||
ParameterModel adAreaParam = new StringParameter(ContactAddress.ADMINISTRATIVE_AREA);
|
||||
TextField adArea = new TextField(adAreaParam);
|
||||
add(adArea);
|
||||
}
|
||||
|
||||
protected void addPostTown() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_posttown")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact.address_posttown")));
|
||||
ParameterModel postTownParam = new StringParameter(ContactAddress.POST_TOWN);
|
||||
TextField postTown = new TextField(postTownParam);
|
||||
add(postTown);
|
||||
}
|
||||
|
||||
protected void addPostCode() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_postcode")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact.address_postcode")));
|
||||
ParameterModel postCodeParam = new StringParameter(ContactAddress.POST_CODE);
|
||||
TextField postCode = new TextField(postCodeParam);
|
||||
add(postCode);
|
||||
}
|
||||
|
||||
protected void addPropRefNo() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact.address_proprefno")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact.address_proprefno")));
|
||||
ParameterModel propRefNoParam = new StringParameter(ContactAddress.PROP_REF_NO);
|
||||
TextField propRefNo = new TextField(propRefNoParam);
|
||||
add(propRefNo);
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui.contact;
|
||||
package com.arsdigita.london.contenttypes.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.cms.contenttypes.Contact;
|
||||
import com.arsdigita.cms.contenttypes.util.ContactGlobalizationUtil;
|
||||
import com.arsdigita.london.contenttypes.Contact;
|
||||
import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.CreationSelector;
|
||||
import com.arsdigita.cms.ui.authoring.PageCreate;
|
||||
|
||||
|
|
@ -59,12 +59,14 @@ public class ContactCreate extends PageCreate {
|
|||
super.addWidgets();
|
||||
|
||||
TextField givenName = new TextField(Contact.GIVEN_NAME);
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_givenname")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_givenname")));
|
||||
givenName.addValidationListener(new NotNullValidationListener());
|
||||
add(givenName);
|
||||
|
||||
TextField familyName = new TextField(Contact.FAMILY_NAME);
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_familyname")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_familyname")));
|
||||
familyName.addValidationListener(new NotNullValidationListener());
|
||||
add(familyName);
|
||||
}
|
||||
|
|
@ -16,12 +16,12 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui.contact;
|
||||
package com.arsdigita.london.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.Contact;
|
||||
import com.arsdigita.cms.contenttypes.util.ContactGlobalizationUtil;
|
||||
import com.arsdigita.london.contenttypes.Contact;
|
||||
import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||
|
|
@ -72,21 +72,21 @@ public class ContactPropertiesStep extends SimpleEditStep {
|
|||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||
|
||||
sheet.add(
|
||||
GlobalizationUtil.globalize("cms.contenttypes.ui.name"),
|
||||
GlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.name"),
|
||||
Contact.NAME);
|
||||
|
||||
sheet.add(
|
||||
GlobalizationUtil.globalize("cms.contenttypes.ui.title"),
|
||||
GlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.title"),
|
||||
Contact.TITLE);
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.contact_givenname"),
|
||||
"com.arsdigita.london.contenttypes.ui.contact_givenname"),
|
||||
Contact.GIVEN_NAME);
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.contact_familyname"),
|
||||
"com.arsdigita.london.contenttypes.ui.contact_familyname"),
|
||||
Contact.FAMILY_NAME);
|
||||
|
||||
sheet.add(
|
||||
|
|
@ -104,28 +104,28 @@ public class ContactPropertiesStep extends SimpleEditStep {
|
|||
});
|
||||
|
||||
sheet.add(
|
||||
GlobalizationUtil.globalize("cms.contenttypes.ui.description"),
|
||||
GlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.description"),
|
||||
Contact.DESCRIPTION);
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_emails"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact_emails"),
|
||||
Contact.EMAILS);
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_suffix"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact_suffix"),
|
||||
Contact.SUFFIX);
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_orgname"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact_orgname"),
|
||||
Contact.ORG_NAME);
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.contact_deptname"),
|
||||
"com.arsdigita.london.contenttypes.ui.contact_deptname"),
|
||||
Contact.DEPT_NAME);
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_role"),
|
||||
ContactGlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.contact_role"),
|
||||
Contact.ROLE);
|
||||
|
||||
return sheet;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui.contact;
|
||||
package com.arsdigita.london.contenttypes.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.cms.contenttypes.Contact;
|
||||
import com.arsdigita.cms.contenttypes.ContactType;
|
||||
import com.arsdigita.cms.contenttypes.ContactTypesCollection;
|
||||
import com.arsdigita.cms.contenttypes.util.ContactGlobalizationUtil;
|
||||
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.ui.authoring.BasicPageForm;
|
||||
|
||||
/**
|
||||
|
|
@ -81,28 +81,32 @@ public class ContactPropertyForm extends BasicPageForm {
|
|||
}
|
||||
|
||||
protected void addGivenNameWidget() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_givenname")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_givenname")));
|
||||
ParameterModel givenNameParam = new StringParameter(Contact.GIVEN_NAME);
|
||||
TextField givenName = new TextField(givenNameParam);
|
||||
add(givenName);
|
||||
}
|
||||
|
||||
protected void addFamilyNameWidget() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_familyname")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_familyname")));
|
||||
ParameterModel familyNameParam = new StringParameter(Contact.FAMILY_NAME);
|
||||
TextField familyName = new TextField(familyNameParam);
|
||||
add(familyName);
|
||||
}
|
||||
|
||||
protected void addSuffixWidget() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_suffix")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_suffix")));
|
||||
ParameterModel suffixParam = new StringParameter(Contact.SUFFIX);
|
||||
TextField suffix = new TextField(suffixParam);
|
||||
add(suffix);
|
||||
}
|
||||
|
||||
protected void addContactTypeWidget() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_type")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_type")));
|
||||
ParameterModel contactTypeParam = new StringParameter(Contact.CONTACT_TYPE);
|
||||
SingleSelect contactType = new SingleSelect(contactTypeParam);
|
||||
add(contactType);
|
||||
|
|
@ -114,7 +118,8 @@ public class ContactPropertyForm extends BasicPageForm {
|
|||
}
|
||||
|
||||
protected void addDescriptionWidget() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_description")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_description")));
|
||||
ParameterModel descParam = new StringParameter(Contact.DESCRIPTION);
|
||||
TextArea desc = new TextArea(descParam);
|
||||
desc.setRows(5);
|
||||
|
|
@ -122,28 +127,32 @@ public class ContactPropertyForm extends BasicPageForm {
|
|||
}
|
||||
|
||||
protected void addEmailsWidget() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_emails")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_emails")));
|
||||
ParameterModel emailsParam = new StringParameter(Contact.EMAILS);
|
||||
TextField emails = new TextField(emailsParam);
|
||||
add(emails);
|
||||
}
|
||||
|
||||
protected void addOrganizationNameWidget() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_orgname")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_orgname")));
|
||||
ParameterModel orgNameParam = new StringParameter(Contact.ORG_NAME);
|
||||
TextField orgName = new TextField(orgNameParam);
|
||||
add(orgName);
|
||||
}
|
||||
|
||||
protected void addDepartmentNameWidget() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_deptname")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_deptname")));
|
||||
ParameterModel deptParam = new StringParameter(Contact.DEPT_NAME);
|
||||
TextField deptName = new TextField(deptParam);
|
||||
add(deptName);
|
||||
}
|
||||
|
||||
protected void addRoleWidget() {
|
||||
add(new Label(ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_role")));
|
||||
add(new Label(ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_role")));
|
||||
ParameterModel roleParam = new StringParameter(Contact.ROLE);
|
||||
TextField role = new TextField(roleParam);
|
||||
add(role);
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui.contact;
|
||||
package com.arsdigita.london.contenttypes.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.cms.contenttypes.Contact;
|
||||
import com.arsdigita.cms.contenttypes.ContactInitializer;
|
||||
import com.arsdigita.cms.contenttypes.ContactPhone;
|
||||
import com.arsdigita.cms.contenttypes.util.ContactGlobalizationUtil;
|
||||
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.ui.authoring.BasicItemForm;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -66,17 +66,18 @@ class CreatePhone extends BasicItemForm {
|
|||
* Adds widgets to edit the address properties to form. Only paon and
|
||||
* streetDesc are required, rest are optional.
|
||||
*/
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
|
||||
add(new Label(ContactGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.contact.phone_number")));
|
||||
"com.arsdigita.london.contenttypes.ui.contact.phone_number")));
|
||||
ParameterModel phoneNoParam = new StringParameter(ContactPhone.PHONE_NUMBER);
|
||||
TextField phoneNo = new TextField(phoneNoParam);
|
||||
phoneNo.addValidationListener(new NotNullValidationListener());
|
||||
add(phoneNo);
|
||||
|
||||
add(new Label(ContactGlobalizationUtil.globalize(
|
||||
"cms.contenttypes.ui.phone_type")));
|
||||
"com.arsdigita.london.contenttypes.ui.phone_type")));
|
||||
ParameterModel phoneTypeParam = new StringParameter(ContactPhone.PHONE_TYPE);
|
||||
SingleSelect phoneType = new SingleSelect(phoneTypeParam);
|
||||
add(phoneType);
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui.contact;
|
||||
package com.arsdigita.london.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes.ui.contact;
|
||||
package com.arsdigita.london.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.bebop.ControlLink;
|
||||
|
|
@ -32,9 +32,9 @@ import com.arsdigita.bebop.table.TableModel;
|
|||
import com.arsdigita.bebop.table.TableModelBuilder;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.SecurityManager;
|
||||
import com.arsdigita.cms.contenttypes.Contact;
|
||||
import com.arsdigita.cms.contenttypes.ContactPhone;
|
||||
import com.arsdigita.cms.contenttypes.PhonesCollection;
|
||||
import com.arsdigita.london.contenttypes.Contact;
|
||||
import com.arsdigita.london.contenttypes.ContactPhone;
|
||||
import com.arsdigita.london.contenttypes.PhonesCollection;
|
||||
import com.arsdigita.cms.dispatcher.Utilities;
|
||||
import com.arsdigita.util.LockableImpl;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes.util;
|
||||
package com.arsdigita.london.contenttypes.util;
|
||||
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ import com.arsdigita.globalization.GlobalizedMessage;
|
|||
public class ContactGlobalizationUtil {
|
||||
|
||||
final public static String BUNDLE_NAME =
|
||||
"com.arsdigita.cms.contenttypes.util.ContactResourceBundle";
|
||||
"com.arsdigita.london.contenttypes.util.ContactResourceBundle";
|
||||
|
||||
/**
|
||||
* This returns a globalized message using the type specific bundle,
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.cms.contenttypes.util;
|
||||
package com.arsdigita.london.contenttypes.util;
|
||||
|
||||
import java.util.PropertyResourceBundle;
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ import com.arsdigita.cms.CMSGlobalized;
|
|||
public class ContactResourceBundle extends ChainedResourceBundle implements CMSGlobalized {
|
||||
|
||||
public final static String CONTACT_BUNDLE_NAME =
|
||||
"com.arsdigita.cms.contenttypes.ContactResources";
|
||||
"com.arsdigita.london.contenttypes.ContactResources";
|
||||
|
||||
public ContactResourceBundle() {
|
||||
super();
|
||||
|
|
@ -15,22 +15,22 @@
|
|||
// 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.cms.contenttypes;
|
||||
model com.arsdigita.london.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.GenericArticle;
|
||||
|
||||
// object type to hold Contact content type
|
||||
object type ESDService extends GenericArticle {
|
||||
String[0..1] serviceTimes = ct_esdservice.servicetimes VARCHAR(500);
|
||||
String[0..1] serviceTimes = ct_ldn_esdservice.servicetimes VARCHAR(500);
|
||||
|
||||
reference key ( ct_esdservice.service_id );
|
||||
reference key ( ct_ldn_esdservice.service_id );
|
||||
aggressive load (serviceContact.id);
|
||||
}
|
||||
|
||||
association {
|
||||
Contact[0..1] serviceContact = join ct_esdservice.contact_id to
|
||||
ct_contacts.contact_id;
|
||||
ESDService[0..n] contactService = join ct_contacts.contact_id to
|
||||
ct_esdservice.contact_id;
|
||||
Contact[0..1] serviceContact = join ct_ldn_esdservice.contact_id to
|
||||
ct_ldn_contacts.contact_id;
|
||||
ESDService[0..n] contactService = join ct_ldn_contacts.contact_id to
|
||||
ct_ldn_esdservice.contact_id;
|
||||
}
|
||||
|
||||
|
|
@ -3,24 +3,25 @@
|
|||
xmlns:ctd="http://xmlns.redhat.com/cms/content-types"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
|
||||
|
||||
<ctd:content-type
|
||||
label="ESDService"
|
||||
description="An ESDService for Tamaside"
|
||||
objectType="com.arsdigita.cms.contenttypes.ESDService"
|
||||
classname="com.arsdigita.cms.contenttypes.ESDService">
|
||||
objectType="com.arsdigita.london.contenttypes.ESDService"
|
||||
classname="com.arsdigita.london.contenttypes.ESDService">
|
||||
|
||||
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
|
||||
<ctd:authoring-step
|
||||
label="ESDService Properties"
|
||||
description="Edit the basic ESDService properties"
|
||||
component="com.arsdigita.cms.contenttypes.ui.ESDServicePropertiesStep"/>
|
||||
component="com.arsdigita.london.contenttypes.ui.ESDServicePropertiesStep"/>
|
||||
|
||||
<ctd:include href="/WEB-INF/content-types/edit-body-text-step.xml"/>
|
||||
|
||||
<ctd:authoring-step
|
||||
label="Service Contact"
|
||||
description="Edit/Choose the associated Contact object"
|
||||
component="com.arsdigita.cms.contenttypes.ui.ESDServiceChooseContactStep"/>
|
||||
component="com.arsdigita.london.contenttypes.ui.ESDServiceChooseContactStep"/>
|
||||
|
||||
<ctd:include href="/WEB-INF/content-types/shared.xml"/>
|
||||
|
||||
|
|
@ -8,7 +8,8 @@
|
|||
The default properties for Contact are left as is and are inherited from ContentPage
|
||||
-->
|
||||
<xrd:context name="com.arsdigita.cms.dispatcher.SimpleXMLGenerator">
|
||||
<xrd:adapter objectType="com.arsdigita.cms.contenttypes.ESDService" extends="com.arsdigita.cms.ContentPage">
|
||||
<xrd:adapter objectType="com.arsdigita.london.contenttypes.ESDService"
|
||||
extends="com.arsdigita.cms.ContentPage">
|
||||
<xrd:associations rule="include">
|
||||
<xrd:property name="/object/serviceContact"/>
|
||||
<xrd:property name="/object/serviceContact/phones"/>
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@
|
|||
<table name="inits"/>
|
||||
<table name="acs_objects"/>
|
||||
<table name="cms_items"/>
|
||||
<table name="ct_contacts"/>
|
||||
<table name="ct_ldn_contacts"/>
|
||||
<initializer class="com.arsdigita.cms.Initializer"/>
|
||||
</requires>
|
||||
<provides>
|
||||
<table name="ct_esdservice"/>
|
||||
<initializer class="com.arsdigita.cms.contenttypes.ESDServiceInitializer"/>
|
||||
<table name="ct_ldn_esdservice"/>
|
||||
<initializer class="com.arsdigita.london.contenttypes.ESDServiceInitializer"/>
|
||||
</provides>
|
||||
<scripts>
|
||||
<schema directory="ccm-cms-types-esdservice"/>
|
||||
<data class="com.arsdigita.cms.contenttypes.ESDServiceLoader"/>
|
||||
<schema directory="ccm-ldn-types-esdservice"/>
|
||||
<data class="com.arsdigita.london.contenttypes.ESDServiceLoader"/>
|
||||
</scripts>
|
||||
</load>
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
cms.contenttypes.ui.esdservice.servicetimes=Service Times
|
||||
|
|
@ -15,10 +15,10 @@
|
|||
* 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;
|
||||
package com.arsdigita.london.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.GenericArticle;
|
||||
import com.arsdigita.cms.ContentType;
|
||||
import com.arsdigita.cms.contenttypes.GenericArticle;
|
||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||
import com.arsdigita.domain.DomainObjectFactory;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
|
|
@ -37,7 +37,7 @@ public class ESDService extends GenericArticle {
|
|||
|
||||
/** data object type for this domain object */
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"com.arsdigita.cms.contenttypes.ESDService";
|
||||
"com.arsdigita.london.contenttypes.ESDService";
|
||||
|
||||
public static final String SERVICE_CONTACT = "serviceContact";
|
||||
public static final String SERVICE_TIMES = "serviceTimes";
|
||||
|
|
@ -77,6 +77,7 @@ public class ESDService extends GenericArticle {
|
|||
super(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeSave() {
|
||||
super.beforeSave();
|
||||
Assert.exists(getContentType(), ContentType.class);
|
||||
|
|
@ -85,6 +86,7 @@ public class ESDService extends GenericArticle {
|
|||
/**
|
||||
* Over-ride to return the proper type for this object.
|
||||
*/
|
||||
@Override
|
||||
public String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
|
@ -15,7 +15,9 @@
|
|||
* 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;
|
||||
package com.arsdigita.london.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.ContentTypeInitializer;
|
||||
|
||||
/**
|
||||
* Initializer class to initialize <code>ContentType ESDService</code>.
|
||||
|
|
@ -32,14 +34,16 @@ public class ESDServiceInitializer extends ContentTypeInitializer {
|
|||
super("ccm-cms-types-esdservice.pdl.mf", ESDService.BASE_DATA_OBJECT_TYPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getStylesheets() {
|
||||
return new String [] {
|
||||
"/static/content-types/com/arsdigita/cms/contenttypes/ESDService.xsl",
|
||||
"/static/content-types/com/arsdigita/london/contenttypes/ESDService.xsl",
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTraversalXML() {
|
||||
return "/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/ESDService.xml";
|
||||
return "/WEB-INF/traversal-adapters/com/arsdigita/london/contenttypes/ESDService.xml";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -15,7 +15,9 @@
|
|||
* 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;
|
||||
package com.arsdigita.london.contenttypes;
|
||||
|
||||
import com.arsdigita.cms.contenttypes.AbstractContentTypeLoader;
|
||||
|
||||
/**
|
||||
* Loader for <code>ContentType</code> <code>ESDService</code>.
|
||||
|
|
@ -28,7 +30,7 @@ package com.arsdigita.cms.contenttypes;
|
|||
public class ESDServiceLoader extends AbstractContentTypeLoader {
|
||||
|
||||
private static final String[] TYPES = {
|
||||
"/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ESDService.xml"
|
||||
"/WEB-INF/content-types/com/arsdigita/london/contenttypes/ESDService.xml"
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -0,0 +1 @@
|
|||
com.arsdigita.london.contenttypes.ui.esdservice.servicetimes=Service Times
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>ESD Service content type</title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<body>
|
||||
|
||||
<p>
|
||||
|
||||
|
|
@ -15,11 +15,11 @@
|
|||
* 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;
|
||||
package com.arsdigita.london.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.util.ContactGlobalizationUtil;
|
||||
import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||
|
|
@ -66,16 +66,19 @@ public class ESDServiceChooseContactStep extends SimpleEditStep {
|
|||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_givenname"),
|
||||
"serviceContact.givenName");
|
||||
ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_givenname"),
|
||||
"serviceContact.givenName");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_familyname"),
|
||||
"serviceContact.familyName");
|
||||
ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_familyname"),
|
||||
"serviceContact.familyName");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil.globalize("cms.contenttypes.ui.contact_type"),
|
||||
"serviceContact.contactType.typeName");
|
||||
ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_type"),
|
||||
"serviceContact.contactType.typeName");
|
||||
|
||||
return sheet;
|
||||
}
|
||||
|
|
@ -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.cms.contenttypes.ui;
|
||||
package com.arsdigita.london.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.cms.ContentItem;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.Contact;
|
||||
import com.arsdigita.cms.contenttypes.ESDService;
|
||||
import com.arsdigita.london.contenttypes.Contact;
|
||||
import com.arsdigita.london.contenttypes.ESDService;
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.bebop.ControlLink;
|
||||
|
|
@ -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.cms.contenttypes.ui;
|
||||
package com.arsdigita.london.contenttypes.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.cms.contenttypes.ESDService;
|
||||
import com.arsdigita.cms.contenttypes.util.ESDServiceGlobalizationUtil;
|
||||
import com.arsdigita.london.contenttypes.ESDService;
|
||||
import com.arsdigita.london.contenttypes.util.ESDServiceGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||
|
||||
/**
|
||||
|
|
@ -55,7 +55,8 @@ public class ESDServicePropertiesForm extends BasicPageForm {
|
|||
protected void addWidgets() {
|
||||
super.addWidgets();
|
||||
|
||||
add(new Label(ESDServiceGlobalizationUtil.globalize("cms.contenttypes.ui.esdservice.servicetimes")));
|
||||
add(new Label(ESDServiceGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.esdservice.servicetimes")));
|
||||
ParameterModel serviceTimesParam = new StringParameter(ESDService.SERVICE_TIMES);
|
||||
TextField serviceTimes = new TextField(serviceTimesParam);
|
||||
add(serviceTimes);
|
||||
|
|
@ -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.cms.contenttypes.ui;
|
||||
package com.arsdigita.london.contenttypes.ui;
|
||||
|
||||
import com.arsdigita.bebop.Component;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.ESDService;
|
||||
import com.arsdigita.cms.contenttypes.util.ESDServiceGlobalizationUtil;
|
||||
import com.arsdigita.london.contenttypes.ESDService;
|
||||
import com.arsdigita.london.contenttypes.util.ESDServiceGlobalizationUtil;
|
||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||
|
|
@ -73,11 +73,12 @@ public class ESDServicePropertiesStep extends SimpleEditStep {
|
|||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||
|
||||
sheet.add(
|
||||
GlobalizationUtil.globalize("cms.contenttypes.ui.name"),
|
||||
GlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.name"),
|
||||
ESDService.NAME);
|
||||
|
||||
sheet.add(
|
||||
ESDServiceGlobalizationUtil.globalize("cms.contenttypes.ui.esdservice.servicetimes"),
|
||||
ESDServiceGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.esdservice.servicetimes"),
|
||||
ESDService.SERVICE_TIMES);
|
||||
|
||||
return sheet;
|
||||
|
|
@ -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.cms.contenttypes.util;
|
||||
package com.arsdigita.london.contenttypes.util;
|
||||
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ import com.arsdigita.globalization.GlobalizedMessage;
|
|||
public class ESDServiceGlobalizationUtil {
|
||||
|
||||
final public static String BUNDLE_NAME =
|
||||
"com.arsdigita.cms.contenttypes.util.ESDServiceResourceBundle";
|
||||
"com.arsdigita.london.contenttypes.util.ESDServiceResourceBundle";
|
||||
|
||||
/**
|
||||
* This returns a globalized message using the type specific bundle,
|
||||
|
|
@ -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.cms.contenttypes.util;
|
||||
package com.arsdigita.london.contenttypes.util;
|
||||
|
||||
import com.arsdigita.cms.CMSGlobalized;
|
||||
import com.arsdigita.globalization.ChainedResourceBundle;
|
||||
|
|
@ -31,7 +31,7 @@ import java.util.PropertyResourceBundle;
|
|||
public class ESDServiceResourceBundle extends ChainedResourceBundle implements CMSGlobalized {
|
||||
|
||||
public final static String ESDSERVICE_BUNDLE_NAME =
|
||||
"com.arsdigita.cms.contenttypes.ESDServiceResources";
|
||||
"com.arsdigita.london.contenttypes.ESDServiceResources";
|
||||
|
||||
public ESDServiceResourceBundle() {
|
||||
super();
|
||||
|
|
@ -6,8 +6,9 @@
|
|||
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||
version="1.0">
|
||||
|
||||
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.ESDService']" mode="cms:CT_graphics"
|
||||
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_ESDService">
|
||||
<xsl:template match="cms:item[objectType='com.arsdigita.london.contenttypes.ESDService']"
|
||||
mode="cms:CT_graphics"
|
||||
name="cms:CT_graphics_com_arsdigita_london_contenttypes_ESDService">
|
||||
<table width="300" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="250" align="left" valign="top">
|
||||
|
|
@ -42,11 +43,13 @@
|
|||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr>
|
||||
<td width="40%" class="contentSynopsis" valign="top" align="left">Given Name:</td>
|
||||
<td width="60%" class="contentSynopsis" align="right" valign="top"> <xsl:value-of select="./serviceContact/givenName"/></td>
|
||||
<td width="60%" class="contentSynopsis" align="right" valign="top">
|
||||
<xsl:value-of select="./serviceContact/givenName"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" class="contentSynopsis" valign="top" align="left">Family Name:</td>
|
||||
<td width="60%" class="contentSynopsis" align="right" valign="top"> <xsl:value-of select="./serviceContact/familyName"/></td>
|
||||
<td width="60%" class="contentSynopsis" align="right" valign="top">
|
||||
<xsl:value-of select="./serviceContact/familyName"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
|
@ -69,8 +72,8 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template
|
||||
match="cms:item[objectType='com.arsdigita.cms.contenttypes.ESDService']" mode="cms:CT_text"
|
||||
name="cms:CT_text_com_arsdigita_cms_contenttypes_ESDService">
|
||||
match="cms:item[objectType='com.arsdigita.london.contenttypes.ESDService']" mode="cms:CT_text"
|
||||
name="cms:CT_text_com_arsdigita_london_contenttypes_ESDService">
|
||||
<h1 class="mainTitle">ESDSERVICE<xsl:text disable-output-escaping="yes">&</xsl:text>gt; <xsl:value-of select="./title"/></h1>
|
||||
<span class="subtitle">contact given name <xsl:text disable-output-escaping="yes">&</xsl:text>gt; </span><span class="textCap"><xsl:value-of select="./serviceTimes"/></span><br/>
|
||||
</xsl:template>
|
||||
Loading…
Reference in New Issue