DataObject is retrieved
* from the persistent storage mechanism with an OID
* specified by id and
- * Address.BASE_DATA_OBJECT_TYPE.
+ * GenericAddress.BASE_DATA_OBJECT_TYPE.
*
* @param id The id for the retrieved
* DataObject.
diff --git a/ccm-cms-types-article/pdl/com/arsdigita/content-types/Article.pdl b/ccm-cms-types-article/pdl/com/arsdigita/content-types/Article.pdl
index 00aa019b6..197842a76 100755
--- a/ccm-cms-types-article/pdl/com/arsdigita/content-types/Article.pdl
+++ b/ccm-cms-types-article/pdl/com/arsdigita/content-types/Article.pdl
@@ -19,9 +19,7 @@
// $DateTime: 2004/08/17 23:15:09 $
model com.arsdigita.cms.contenttypes;
-import com.arsdigita.cms.basetypes.*;
-
-object type Article extends com.arsdigita.cms.basetypes.Article {
+object type Article extends GenericArticle {
String [0..1] lead = ct_articles.lead VARCHAR(1000);
reference key (ct_articles.item_id);
diff --git a/ccm-cms-types-article/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Article.xml b/ccm-cms-types-article/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Article.xml
index 2782085b9..a30814203 100755
--- a/ccm-cms-types-article/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Article.xml
+++ b/ccm-cms-types-article/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Article.xml
@@ -1,24 +1,28 @@
DataObject is retrieved
* from the persistent storage mechanism with an OID
* specified by id and
- * Address.BASE_DATA_OBJECT_TYPE.
+ * GenericAddress.BASE_DATA_OBJECT_TYPE.
*
* @param id The id for the retrieved
* DataObject.
**/
- public Address(BigDecimal id) throws DataObjectNotFoundException {
+ public GenericAddress(BigDecimal id) throws DataObjectNotFoundException {
this(new OID(BASE_DATA_OBJECT_TYPE, id));
}
@@ -96,7 +96,7 @@ public class Address extends ContentPage {
* @param id The OID for the retrieved
* DataObject.
**/
- public Address(OID id) throws DataObjectNotFoundException {
+ public GenericAddress(OID id) throws DataObjectNotFoundException {
super(id);
}
@@ -107,7 +107,7 @@ public class Address extends ContentPage {
* @param obj The DataObject with which to create or
* load a content item
*/
- public Address(DataObject obj) {
+ public GenericAddress(DataObject obj) {
super(obj);
}
@@ -118,7 +118,7 @@ public class Address extends ContentPage {
* @param type The String data object type of the
* item to create
*/
- public Address(String type) {
+ public GenericAddress(String type) {
super(type);
}
diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/AddressConfig.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericAddressConfig.java
similarity index 84%
rename from ccm-cms/src/com/arsdigita/cms/basetypes/AddressConfig.java
rename to ccm-cms/src/com/arsdigita/cms/contenttypes/GenericAddressConfig.java
index bcabe197a..06a7a6559 100644
--- a/ccm-cms/src/com/arsdigita/cms/basetypes/AddressConfig.java
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericAddressConfig.java
@@ -16,25 +16,25 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.cms.basetypes;
+package com.arsdigita.cms.contenttypes;
import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.BooleanParameter;
-public class AddressConfig extends AbstractConfig {
+public class GenericAddressConfig extends AbstractConfig {
private final Parameter m_hideCountryCodeSelection;
private final Parameter m_hidePostalCode;
- public AddressConfig() {
+ public GenericAddressConfig() {
m_hideCountryCodeSelection = new BooleanParameter(
- "com.arsdigita.cms.basetypes.ddress.hide_country_code_selection",
+ "com.arsdigita.cms.contenttypes.generic_address.hide_country_code_selection",
Parameter.REQUIRED,
new Boolean(false));
m_hidePostalCode = new BooleanParameter(
- "com.arsdigita.cms.basetypes.address.hide_postal_code",
+ "com.arsdigita.cms.contenttypes.generic_address.hide_postal_code",
Parameter.REQUIRED,
new Boolean(false));
diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericAddressConfig_parameter.properties b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericAddressConfig_parameter.properties
new file mode 100644
index 000000000..0f7455125
--- /dev/null
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericAddressConfig_parameter.properties
@@ -0,0 +1,9 @@
+com.arsdigita.cms.contenttypes.generic_address.hide_country_code_selection.title=Hide ISO Country Code
+com.arsdigita.cms.contenttypes.generic_address.hide_country_code_selection.purpose=Hide the ISO country code selection box
+com.arsdigita.cms.contenttypes.generic_address.hide_country_code_selection.example=false
+com.arsdigita.cms.contenttypes.generic_address.hide_country_code_selection.format=[boolean]
+
+com.arsdigita.cms.contenttypes.generic_address.hide_postal_code.title=Hide Postal Code
+com.arsdigita.cms.contenttypes.generic_address.hide_postal_code.purpose=Hide the the postal code entry field
+com.arsdigita.cms.contenttypes.generic_address.hide_postal_code.example=false
+com.arsdigita.cms.contenttypes.generic_address.hide_postal_code.format=[boolean]
diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/Article.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericArticle.java
old mode 100755
new mode 100644
similarity index 83%
rename from ccm-cms/src/com/arsdigita/cms/basetypes/Article.java
rename to ccm-cms/src/com/arsdigita/cms/contenttypes/GenericArticle.java
index 3357417a0..78ec304a8
--- a/ccm-cms/src/com/arsdigita/cms/basetypes/Article.java
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericArticle.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.cms.basetypes;
+package com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.ImageAsset;
import com.arsdigita.cms.ImageAssetCollection;
@@ -38,22 +38,22 @@ import java.math.BigDecimal;
* @version $Revision: #28 $ $Date: 2004/08/17 $
* @version $Id: Article.java 2070 2010-01-28 08:47:41Z pboy $
*/
-public class Article extends TextPage {
+public class GenericArticle extends TextPage {
public static final String BASE_DATA_OBJECT_TYPE =
- "com.arsdigita.cms.basetypes.Article";
+ "com.arsdigita.cms.contenttypes.GenericArticle";
protected static final String IMAGES = "imageAssets";
private static final String IMAGE_CAPTIONS = "imageCaptions";
private static org.apache.log4j.Logger s_log =
- org.apache.log4j.Logger.getLogger(Article.class);
+ org.apache.log4j.Logger.getLogger(GenericArticle.class);
/**
* Default constructor. This creates a new article.
**/
- public Article() {
+ public GenericArticle() {
super(BASE_DATA_OBJECT_TYPE);
}
@@ -65,11 +65,11 @@ public class Article extends TextPage {
* @param oid The OID for the retrieved
* DataObject.
**/
- public Article(OID oid) throws DataObjectNotFoundException {
+ public GenericArticle(OID oid) throws DataObjectNotFoundException {
super(oid);
}
- public Article(String type) {
+ public GenericArticle(String type) {
super(type);
}
@@ -82,11 +82,11 @@ public class Article extends TextPage {
* @param id The id for the retrieved
* DataObject.
**/
- public Article(BigDecimal id) throws DataObjectNotFoundException {
+ public GenericArticle(BigDecimal id) throws DataObjectNotFoundException {
this(new OID(BASE_DATA_OBJECT_TYPE, id));
}
- public Article(DataObject obj) {
+ public GenericArticle(DataObject obj) {
super(obj);
}
@@ -109,14 +109,14 @@ public class Article extends TextPage {
*/
public boolean addImage(ImageAsset image, String caption) {
ImageAssetCollection col = getImages();
- col.addEqualsFilter(ArticleImageAssociation.IMAGE_ID,image.getID());
+ col.addEqualsFilter(GenericArticleImageAssociation.IMAGE_ID,image.getID());
boolean toReturn = false;
- ArticleImageAssociation assn = null;
+ GenericArticleImageAssociation assn = null;
if (col.next()) {
- assn = (ArticleImageAssociation)(col.getDomainObject());
+ assn = (GenericArticleImageAssociation)(col.getDomainObject());
col.close();
} else {
- assn = new ArticleImageAssociation();
+ assn = new GenericArticleImageAssociation();
String name = this.getName();
Assert.exists(name, String.class);
String imgName = image.getName();
@@ -136,8 +136,8 @@ public class Article extends TextPage {
* Get the caption of the image
* @deprecated Do not use this method, it will always return the
* first available caption regardless of what image is in use. Use
- * ArticleImageAssnCollection.getCaption() or
- * ArticleImageAssociation.getCaption().
+ * GenericArticleImageAssnCollection.getCaption() or
+ * GenericArticleImageAssociation.getCaption().
* @return the caption, or null if the image is not associated to this
* article
*/
@@ -156,7 +156,7 @@ public class Article extends TextPage {
* @return true is the image is removed, false otherwise.
*/
public boolean removeImage(ImageAsset image) {
- ArticleImageAssociation assn = ArticleImageAssociation
+ GenericArticleImageAssociation assn = GenericArticleImageAssociation
.retrieveAssociation(getID(), image.getID());
if (assn != null) {
assn.delete();
@@ -171,7 +171,7 @@ public class Article extends TextPage {
*/
public ImageAssetCollection getImages() {
DataAssociationCursor dac = ((DataAssociation) get(IMAGE_CAPTIONS)).cursor();
- ImageAssetCollection images = new ArticleImageAssnCollection(dac);
+ ImageAssetCollection images = new GenericArticleImageAssnCollection(dac);
return images;
}
@@ -190,7 +190,7 @@ public class Article extends TextPage {
super.propagateMaster(master);
ImageAssetCollection collection = getImages();
while (collection.next()) {
- ArticleImageAssociation assn = (ArticleImageAssociation)(collection.getDomainObject());
+ GenericArticleImageAssociation assn = (GenericArticleImageAssociation)(collection.getDomainObject());
assn.setMaster(master);
assn.save();
}
diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/ArticleImageAssnCollection.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericArticleImageAssnCollection.java
old mode 100755
new mode 100644
similarity index 80%
rename from ccm-cms/src/com/arsdigita/cms/basetypes/ArticleImageAssnCollection.java
rename to ccm-cms/src/com/arsdigita/cms/contenttypes/GenericArticleImageAssnCollection.java
index 849ece4f2..31820c65d
--- a/ccm-cms/src/com/arsdigita/cms/basetypes/ArticleImageAssnCollection.java
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericArticleImageAssnCollection.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.cms.basetypes;
+package com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.ImageAsset;
import com.arsdigita.cms.ImageAssetCollection;
@@ -37,26 +37,26 @@ import com.arsdigita.persistence.Filter;
*
*
* @author Hugh Brock .
- * @version $Id: ArticleImageAssnCollection.java 287 2005-02-22 00:29:02Z sskracic $
+ * @version $Id: GenericArticleImageAssnCollection.java 287 2005-02-22 00:29:02Z sskracic $
*/
-public class ArticleImageAssnCollection extends ImageAssetCollection {
+public class GenericArticleImageAssnCollection extends ImageAssetCollection {
/**
* Constructor. Should only be called from Article.getImages()
*
**/
- protected ArticleImageAssnCollection(DataCollection dataCollection) {
+ protected GenericArticleImageAssnCollection(DataCollection dataCollection) {
super(dataCollection);
}
/**
* Returns a DomainObject (the
- * ArticleImageAssociation for the current position in the
+ * GenericArticleImageAssociation for the current position in the
* collection.
*
**/
public DomainObject getDomainObject() {
- return new ArticleImageAssociation
+ return new GenericArticleImageAssociation
(m_dataCollection.getDataObject());
}
@@ -66,11 +66,11 @@ public class ArticleImageAssnCollection extends ImageAssetCollection {
*
**/
public ImageAsset getImage() {
- return ((ArticleImageAssociation)getDomainObject()).getImage();
+ return ((GenericArticleImageAssociation)getDomainObject()).getImage();
}
public String getCaption() {
- return ((ArticleImageAssociation)getDomainObject()).getCaption();
+ return ((GenericArticleImageAssociation)getDomainObject()).getCaption();
}
// Exposed methods
diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/ArticleImageAssociation.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericArticleImageAssociation.java
old mode 100755
new mode 100644
similarity index 87%
rename from ccm-cms/src/com/arsdigita/cms/basetypes/ArticleImageAssociation.java
rename to ccm-cms/src/com/arsdigita/cms/contenttypes/GenericArticleImageAssociation.java
index be2a84850..2104fa5f1
--- a/ccm-cms/src/com/arsdigita/cms/basetypes/ArticleImageAssociation.java
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericArticleImageAssociation.java
@@ -16,14 +16,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.cms.basetypes;
+package com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.CustomCopy;
import com.arsdigita.cms.ImageAsset;
import com.arsdigita.cms.ItemCollection;
import com.arsdigita.cms.ItemCopier;
-import com.arsdigita.cms.basetypes.Article;
import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.persistence.DataCollection;
@@ -37,17 +36,17 @@ import com.arsdigita.versioning.VersionedACSObject;
import java.math.BigDecimal;
/**
- * This class associates an Article and an Image with a particular
+ * This class associates an GenericArticle and an Image with a particular
* caption.
*
* @author Jack Chung (flattop@arsdigita.com)
* @version $Revision: #17 $ $Date: 2004/08/17 $
- * @version $Id: ArticleImageAssociation.java 287 2005-02-22 00:29:02Z sskracic $
+ * @version $Id: GenericArticleImageAssociation.java 287 2005-02-22 00:29:02Z sskracic $
*/
-public class ArticleImageAssociation extends ContentItem {
+public class GenericArticleImageAssociation extends ContentItem {
public static final String BASE_DATA_OBJECT_TYPE =
- "com.arsdigita.cms.ArticleImageAssociation";
+ "com.arsdigita.cms.GenericArticleImageAssociation";
protected static final String ARTICLE = "captionArticle";
protected static final String IMAGE = "imageAsset";
@@ -59,7 +58,7 @@ public class ArticleImageAssociation extends ContentItem {
/**
* Default constructor.
**/
- public ArticleImageAssociation() {
+ public GenericArticleImageAssociation() {
super(BASE_DATA_OBJECT_TYPE);
}
@@ -71,15 +70,15 @@ public class ArticleImageAssociation extends ContentItem {
* @param oid The OID for the retrieved
* DataObject.
**/
- public ArticleImageAssociation(OID oid) throws DataObjectNotFoundException {
+ public GenericArticleImageAssociation(OID oid) throws DataObjectNotFoundException {
super(oid);
}
- public ArticleImageAssociation(DataObject obj) {
+ public GenericArticleImageAssociation(DataObject obj) {
super(obj);
}
- public ArticleImageAssociation(String type) {
+ public GenericArticleImageAssociation(String type) {
super(type);
}
@@ -87,7 +86,7 @@ public class ArticleImageAssociation extends ContentItem {
* This returns the association object that is specified by
* the passed in IDs or it returns null if no such association exists
*/
- public static ArticleImageAssociation retrieveAssociation
+ public static GenericArticleImageAssociation retrieveAssociation
(BigDecimal articleID, BigDecimal imageID) {
DataCollection collection = SessionManager.getSession().retrieve
(BASE_DATA_OBJECT_TYPE);
@@ -96,8 +95,8 @@ public class ArticleImageAssociation extends ContentItem {
// no deleted associations, please
collection.addEqualsFilter(VersionedACSObject.IS_DELETED, new BigDecimal(0));
if (collection.next()) {
- ArticleImageAssociation association =
- new ArticleImageAssociation(collection.getDataObject());
+ GenericArticleImageAssociation association =
+ new GenericArticleImageAssociation(collection.getDataObject());
collection.close();
return association;
}
@@ -146,8 +145,9 @@ public class ArticleImageAssociation extends ContentItem {
if (!returnValue) {
if (!image.getVersion().equals(ContentItem.DRAFT)) {
ContentItem item = image.getWorkingVersion();
- if (item != null)
+ if (item != null) {
returnValue = imageHasDirectAssociation(item.getID());
+ }
}
}
if (!returnValue) {
@@ -162,8 +162,9 @@ public class ArticleImageAssociation extends ContentItem {
if (!returnValue) {
if (!image.getVersion().equals(ContentItem.LIVE)) {
ContentItem item = image.getLiveVersion();
- if (item != null)
+ if (item != null) {
returnValue = imageHasDirectAssociation(item.getID());
+ }
}
}
@@ -183,17 +184,17 @@ public class ArticleImageAssociation extends ContentItem {
return (BigDecimal) get(ARTICLE_ID);
}
- public Article getArticle() {
+ public GenericArticle getArticle() {
DataCollection col = SessionManager.getSession().retrieve(ARTICLE);
if (col.next()) {
- Article art = new Article(col.getDataObject());
+ GenericArticle art = new GenericArticle(col.getDataObject());
col.close();
return art;
}
return null;
}
- public void setArticle(Article article) {
+ public void setArticle(GenericArticle article) {
setAssociation(ARTICLE, article);
}
@@ -229,6 +230,7 @@ public class ArticleImageAssociation extends ContentItem {
* that regular metadata-driven methods should be used
* to copy the property.
*/
+ @Override
public boolean copyProperty(final CustomCopy source,
final Property property,
final ItemCopier copier) {
@@ -240,7 +242,7 @@ public class ArticleImageAssociation extends ContentItem {
if (copier.getCopyType() == ItemCopier.VERSION_COPY
&& IMAGE.equals(attribute)) {
- ImageAsset image = ((ArticleImageAssociation)source).getImage();
+ ImageAsset image = ((GenericArticleImageAssociation)source).getImage();
if (image != null) {
ImageAsset liveImage = (ImageAsset) image.getLiveVersion();
if (liveImage == null) {
diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/Contact.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContact.java
similarity index 71%
rename from ccm-cms/src/com/arsdigita/cms/basetypes/Contact.java
rename to ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContact.java
index 6610bcd6b..a86496900 100644
--- a/ccm-cms/src/com/arsdigita/cms/basetypes/Contact.java
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContact.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.cms.basetypes;
+package com.arsdigita.cms.contenttypes;
import com.arsdigita.persistence.OID;
import com.arsdigita.persistence.DataObject;
@@ -33,7 +33,7 @@ import java.math.BigDecimal;
* This content type represents an basic contact
*
*/
-public class Contact extends ContentPage {
+public class GenericContact extends ContentPage {
/** PDL property names */
public static final String PERSON = "person";
@@ -41,34 +41,34 @@ public class Contact extends ContentPage {
public static final String CONTACT_ENTRIES = "contactentries";
// Config
- private static final ContactConfig s_config = new ContactConfig();
+ private static final GenericContactConfig s_config = new GenericContactConfig();
static {
s_config.load();
}
/** Data object type for tihs domain object */
public static final String BASE_DATA_OBJECT_TYPE
- = "com.arsdigita.cms.basetypes.Contact";
+ = "com.arsdigita.cms.contenttypes.GenericContact";
- public Contact() {
+ public GenericContact() {
super(BASE_DATA_OBJECT_TYPE);
}
- public Contact(BigDecimal id)
+ public GenericContact(BigDecimal id)
throws DataObjectNotFoundException {
this(new OID(BASE_DATA_OBJECT_TYPE, id));
}
- public Contact(OID id)
+ public GenericContact(OID id)
throws DataObjectNotFoundException {
super(id);
}
- public Contact(DataObject obj) {
+ public GenericContact(DataObject obj) {
super(obj);
}
- public Contact(String type) {
+ public GenericContact(String type) {
super(type);
}
@@ -82,7 +82,7 @@ public class Contact extends ContentPage {
/**
* Retrieves the current configuration
*/
- public static final ContactConfig getConfig() {
+ public static final GenericContactConfig getConfig() {
return s_config;
}
@@ -91,12 +91,12 @@ public class Contact extends ContentPage {
// accessors
// Get the person for this contact
- public Person getPerson() {
- return (Person) DomainObjectFactory.newInstance((DataObject)get(PERSON));
+ public GenericPerson getPerson() {
+ return (GenericPerson) DomainObjectFactory.newInstance((DataObject)get(PERSON));
}
// Set the person for this contact
- public void setPerson(Person person) {
+ public void setPerson(GenericPerson person) {
set(PERSON, person);
}
@@ -106,12 +106,12 @@ public class Contact extends ContentPage {
}
// Get the address for this contact
- public Address getAddress() {
- return (Address)DomainObjectFactory.newInstance((DataObject)get(ADDRESS));
+ public GenericAddress getAddress() {
+ return (GenericAddress)DomainObjectFactory.newInstance((DataObject)get(ADDRESS));
}
// Set the address for this contact
- public void setAddress(Address address) {
+ public void setAddress(GenericAddress address) {
set(ADDRESS, address);
}
@@ -121,19 +121,19 @@ public class Contact extends ContentPage {
}
// Get all contact entries for this contact, p. ex. phone number, type of contact etc.
- public ContactEntryCollection getContactEntries() {
- return new ContactEntryCollection ((DataCollection) get(CONTACT_ENTRIES));
+ public GenericContactEntryCollection getContactEntries() {
+ return new GenericContactEntryCollection ((DataCollection) get(CONTACT_ENTRIES));
}
// Add a contact entry for this contact
- public void addContactEntry(ContactEntry contactEntry) {
- Assert.exists(contactEntry, ContactEntry.class);
+ public void addContactEntry(GenericContactEntry contactEntry) {
+ Assert.exists(contactEntry, GenericContactEntry.class);
add(CONTACT_ENTRIES, contactEntry);
}
// Remove a contect entry for this contact
- public void removeContactEntry(ContactEntry contactEntry) {
- Assert.exists(contactEntry, ContactEntry.class);
+ public void removeContactEntry(GenericContactEntry contactEntry) {
+ Assert.exists(contactEntry, GenericContactEntry.class);
remove(CONTACT_ENTRIES, contactEntry);
}
diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/ContactConfig.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactConfig.java
similarity index 82%
rename from ccm-cms/src/com/arsdigita/cms/basetypes/ContactConfig.java
rename to ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactConfig.java
index c99c8a22c..e838baed1 100644
--- a/ccm-cms/src/com/arsdigita/cms/basetypes/ContactConfig.java
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactConfig.java
@@ -1,5 +1,5 @@
-package com.arsdigita.cms.basetypes;
+package com.arsdigita.cms.contenttypes;
import com.arsdigita.runtime.AbstractConfig;
import com.arsdigita.util.parameter.Parameter;
@@ -9,13 +9,13 @@ import java.util.StringTokenizer;
import org.apache.log4j.Logger;
/**
- * Stores the configuration record for the contact.
+ * Stores the configuration record for the generic contact.
*
* @author Sören Bernstein (quasimodo) quasi@zes.uni-bremen.de
*/
-public final class ContactConfig extends AbstractConfig {
+public final class GenericContactConfig extends AbstractConfig {
- private static Logger s_log = Logger.getLogger(ContactConfig.class);
+ private static Logger s_log = Logger.getLogger(GenericContactConfig.class);
private final Parameter m_hidePerson;
private final Parameter m_hideAddress;
@@ -27,13 +27,13 @@ public final class ContactConfig extends AbstractConfig {
/**
* Public Constructor
*/
- public ContactConfig() {
+ public GenericContactConfig() {
/**
* If set to true disables the possibility to attach a person ct
*/
m_hidePerson = new BooleanParameter
- ("com.arsdigita.cms.basetypes.contact.hide_person",
+ ("com.arsdigita.cms.contenttypes.generic_contact.hide_person",
Parameter.REQUIRED,
new Boolean(false));
@@ -41,7 +41,7 @@ public final class ContactConfig extends AbstractConfig {
* If set to true disables the possibility to attach a baseAddress ct
*/
m_hideAddress = new BooleanParameter
- ("com.arsdigita.cms.basetypes.contact.hide_address",
+ ("com.arsdigita.cms.contenttypes.generic_contact.hide_address",
Parameter.REQUIRED,
new Boolean(false));
@@ -49,7 +49,7 @@ public final class ContactConfig extends AbstractConfig {
* If set to true hides the postal code entry field for the attached address ct
*/
m_hideAddressPostalCode = new BooleanParameter
- ("com.arsdigita.cms.basetypes.contact.address.hide_postal_code",
+ ("com.arsdigita.cms.contenttypes.generic_contact.address.hide_postal_code",
Parameter.REQUIRED,
new Boolean(false));
@@ -57,7 +57,7 @@ public final class ContactConfig extends AbstractConfig {
* If set to true hides the state entry field for the attached address ct
*/
m_hideAddressState = new BooleanParameter
- ("com.arsdigita.cms.basetypes.contact.address.hide_state",
+ ("com.arsdigita.cms.contenttypes.generic_contact.address.hide_state",
Parameter.REQUIRED,
new Boolean(false));
@@ -65,14 +65,14 @@ public final class ContactConfig extends AbstractConfig {
* If set to true hides the country selection for the attaches address ct
*/
m_hideAddressCountry = new BooleanParameter
- ("com.arsdigita.cms.basetypes.contact.address.hide_country",
+ ("com.arsdigita.cms.contenttypes.generic_contact.address.hide_country",
Parameter.REQUIRED,
new Boolean(false));
/**
*/
m_contactEntryKeys = new StringParameter
- ("com.arsdigita.cms.basetypes.contact.contact_entry_keys",
+ ("com.arsdigita.cms.contenttypes.generic_contact.contact_entry_keys",
Parameter.REQUIRED,
"contact_type,office_hours,phone_office,phone_private,phone_mobile,email,fax,im,www");
@@ -117,7 +117,7 @@ public final class ContactConfig extends AbstractConfig {
}
/**
- * Returns the contactEntryKeys as StringTokenizer.
+ * Returns the generic_contactEntryKeys as StringTokenizer.
*/
public final StringTokenizer getContactEntryKeys() {
return new StringTokenizer((((String) get(m_contactEntryKeys)).replace(" ","")), ",", false);
diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactConfig_parameter.properties b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactConfig_parameter.properties
new file mode 100644
index 000000000..e0b2a2bd3
--- /dev/null
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactConfig_parameter.properties
@@ -0,0 +1,29 @@
+com.arsdigita.cms.contenttypes.generic_contact.hide_person.title=Hide person attachment
+com.arsdigita.cms.contenttypes.generic_contact.hide_person.purpose=Hide the part to attach a person CT
+com.arsdigita.cms.contenttypes.generic_contact.hide_person.example=false
+com.arsdigita.cms.contenttypes.generic_contact.hide_person.format=[boolean]
+
+com.arsdigita.cms.contenttypes.generic_contact.hide_address.title=Hide address attachment
+com.arsdigita.cms.contenttypes.generic_contact.hide_address.purpose=Hide the part to attach a baseAddress CT
+com.arsdigita.cms.contenttypes.generic_contact.hide_address.example=false
+com.arsdigita.cms.contenttypes.generic_contact.hide_address.format=[boolean]
+
+com.arsdigita.cms.contenttypes.generic_contact.address.hide_postal_code.title=Hide postal code for attached adress
+com.arsdigita.cms.contenttypes.generic_contact.address.hide_postal_code.purpose=Hide the postal code entry field for the attached baseAddress
+com.arsdigita.cms.contenttypes.generic_contact.address.hide_postal_code.example=false
+com.arsdigita.cms.contenttypes.generic_contact.address.hide_postal_code.format=[boolean]
+
+com.arsdigita.cms.contenttypes.generic_contact.address.hide_state.title=Hide state for attached adress
+com.arsdigita.cms.contenttypes.generic_contact.address.hide_state.purpose=Hide the state entry field for the attached baseAddress
+com.arsdigita.cms.contenttypes.generic_contact.address.hide_state.example=false
+com.arsdigita.cms.contenttypes.generic_contact.address.hide_state.format=[boolean]
+
+com.arsdigita.cms.contenttypes.generic_contact.address.hide_country.title=Hide country for attached address
+com.arsdigita.cms.contenttypes.generic_contact.address.hide_country.purpose=Hide the country selection box for the attached baseAddress
+com.arsdigita.cms.contenttypes.generic_contact.address.hide_country.example=false
+com.arsdigita.cms.contenttypes.generic_contact.address.hide_country.format=[boolean]
+
+com.arsdigita.cms.contenttypes.generic_contact.contact_entry_keys.title=Select available contact entry types
+com.arsdigita.cms.contenttypes.generic_contact.contact_entry_keys.purpose=Select available contact entry types and define display order
+com.arsdigita.cms.contenttypes.generic_contact.contact_entry_keys.example=contact_type,office_hours,phone_office,phone_private,phone_mobile,email,fax,im,www
+com.arsdigita.cms.contenttypes.generic_contact.contact_entry_keys.format=[string]
diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/ContactEntry.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactEntry.java
similarity index 78%
rename from ccm-cms/src/com/arsdigita/cms/basetypes/ContactEntry.java
rename to ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactEntry.java
index be83a843a..13fe089cb 100644
--- a/ccm-cms/src/com/arsdigita/cms/basetypes/ContactEntry.java
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactEntry.java
@@ -18,7 +18,7 @@
* office phone: 1234 / 123456
*/
-package com.arsdigita.cms.basetypes;
+package com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.domain.DataObjectNotFoundException;
@@ -31,12 +31,12 @@ import org.apache.log4j.Logger;
*
* @author quasi
*/
-public class ContactEntry extends ContentItem {
+public class GenericContactEntry extends ContentItem {
- public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.basetypes.ContactEntry";
- private static final String BASE_DATA_OBJECT_PACKAGE = "com.arsdigita.cms.basetypes";
+ public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.ContactEntry";
+ private static final String BASE_DATA_OBJECT_PACKAGE = "com.arsdigita.cms.contenttypes";
- private static final Logger s_log = Logger.getLogger(ContactEntry.class);
+ private static final Logger s_log = Logger.getLogger(GenericContactEntry.class);
/** PDL property names */
public static final String KEY = "key";
@@ -45,21 +45,21 @@ public class ContactEntry extends ContentItem {
/**
- * Creates a new instance of ContactEntry
+ * Creates a new instance of GenericContactEntry
*/
- public ContactEntry() {
+ public GenericContactEntry() {
this(BASE_DATA_OBJECT_TYPE);
}
- public ContactEntry(String typeName) {
+ public GenericContactEntry(String typeName) {
super(typeName);
}
- public ContactEntry(OID oid) {
+ public GenericContactEntry(OID oid) {
super(oid);
}
- public ContactEntry(DataObject object) {
+ public GenericContactEntry(DataObject object) {
super(object);
}
@@ -67,11 +67,11 @@ public class ContactEntry extends ContentItem {
* Constructor. Retrieves an object instance with the given id.
* @param id the id of the object to retrieve
*/
- public ContactEntry(BigDecimal id) throws DataObjectNotFoundException {
+ public GenericContactEntry(BigDecimal id) throws DataObjectNotFoundException {
this(new OID(BASE_DATA_OBJECT_TYPE, id));
}
- public ContactEntry(Contact contact, String key, String value, String description) {
+ public GenericContactEntry(GenericContact contact, String key, String value, String description) {
this();
setName(key + " for " + contact.getName() + "(" + contact.getID() + ")");
setKey(key);
diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/ContactEntryCollection.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactEntryCollection.java
similarity index 67%
rename from ccm-cms/src/com/arsdigita/cms/basetypes/ContactEntryCollection.java
rename to ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactEntryCollection.java
index ee59c3c67..2802d4646 100644
--- a/ccm-cms/src/com/arsdigita/cms/basetypes/ContactEntryCollection.java
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericContactEntryCollection.java
@@ -1,12 +1,14 @@
/*
- * ContactEntryCollection.java
+ * GenericContactEntryCollection.java
*
* Created on 13. Mai 2009, 12:32
*
*
*/
-package com.arsdigita.cms.basetypes;
+package com.arsdigita.cms.contenttypes;
+import com.arsdigita.cms.contenttypes.GenericContact;
+import com.arsdigita.cms.contenttypes.GenericContactEntry;
import com.arsdigita.domain.DomainCollection;
import com.arsdigita.persistence.DataCollection;
import java.util.Comparator;
@@ -17,21 +19,21 @@ import java.util.TreeSet;
*
* @author quasi
*/
-public class ContactEntryCollection extends DomainCollection {
+public class GenericContactEntryCollection extends DomainCollection {
private TreeSet m_sortedCollection = new TreeSet(new ContactEntryComparator());
private Iterator m_iterator;
private boolean m_firstElem;
- private ContactEntry m_currentContactEntry;
+ private GenericContactEntry m_currentContactEntry;
/**
- * Creates a new instance of ContactEntryCollection
+ * Creates a new instance of GenericContactEntryCollection
*/
- public ContactEntryCollection(Contact contact) {
+ public GenericContactEntryCollection(GenericContact contact) {
this((DataCollection) contact.getContactEntries());
}
- public ContactEntryCollection(DataCollection dataCollection) {
+ public GenericContactEntryCollection(DataCollection dataCollection) {
super(dataCollection);
// Now copy all objects from m_dataCollection to the sorting TreeSet
@@ -42,7 +44,7 @@ public class ContactEntryCollection extends DomainCollection {
public boolean next() {
boolean retVal = m_iterator.hasNext();
if (retVal) {
- m_currentContactEntry = (ContactEntry) m_iterator.next();
+ m_currentContactEntry = (GenericContactEntry) m_iterator.next();
m_firstElem = false;
}
return retVal;
@@ -104,8 +106,8 @@ public class ContactEntryCollection extends DomainCollection {
return (String) getContactEntry().getValue();
}
- public ContactEntry getContactEntry() {
-// return new ContactEntry(m_dataCollection.getDataObject());
+ public GenericContactEntry getContactEntry() {
+// return new GenericContactEntry(m_dataCollection.getDataObject());
return m_currentContactEntry;
}
@@ -114,7 +116,7 @@ public class ContactEntryCollection extends DomainCollection {
m_dataCollection.rewind();
while (m_dataCollection.next()) {
- m_sortedCollection.add(new ContactEntry(m_dataCollection.getDataObject()));
+ m_sortedCollection.add(new GenericContactEntry(m_dataCollection.getDataObject()));
}
m_iterator = m_sortedCollection.iterator();
@@ -125,11 +127,11 @@ public class ContactEntryCollection extends DomainCollection {
public int compare(Object o1, Object o2) {
int retVal = 0;
- if (o1 instanceof ContactEntry && o2 instanceof ContactEntry) {
- ContactEntry bc1 = (ContactEntry) o1;
- ContactEntry bc2 = (ContactEntry) o2;
- retVal = Contact.getConfig().getKeyIndex(bc1.getKey())
- - Contact.getConfig().getKeyIndex(bc2.getKey());
+ if (o1 instanceof GenericContactEntry && o2 instanceof GenericContactEntry) {
+ GenericContactEntry bc1 = (GenericContactEntry) o1;
+ GenericContactEntry bc2 = (GenericContactEntry) o2;
+ retVal = GenericContact.getConfig().getKeyIndex(bc1.getKey())
+ - GenericContact.getConfig().getKeyIndex(bc2.getKey());
if (retVal == 0) {
retVal = -1;
}
diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/Person.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPerson.java
similarity index 84%
rename from ccm-cms/src/com/arsdigita/cms/basetypes/Person.java
rename to ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPerson.java
index 91d53187e..c211f5b13 100644
--- a/ccm-cms/src/com/arsdigita/cms/basetypes/Person.java
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPerson.java
@@ -17,7 +17,7 @@
*
*/
-package com.arsdigita.cms.basetypes;
+package com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.contenttypes.*;
import com.arsdigita.cms.ContentType;
@@ -29,11 +29,11 @@ import com.arsdigita.util.Assert;
import java.math.BigDecimal;
/**
- * Basic Person Contenttype for OpenCCM.
+ * Basic GenericPerson Contenttype for OpenCCM.
*
* @author Jens Pelzetter
*/
-public class Person extends ContentPage {
+public class GenericPerson extends ContentPage {
public static final String PERSON = "person";
public static final String SURNAME = "surname";
@@ -41,29 +41,29 @@ public class Person extends ContentPage {
public static final String TITLEPRE = "titlepre";
public static final String TITLEPOST = "titlepost";
/** Data object type for this domain object */
- public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.basetypes.Person";
+ public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.GenericPerson";
/**
- * Default constructor. This creates a new (empty) Person.
+ * Default constructor. This creates a new (empty) GenericPerson.
**/
- public Person() {
+ public GenericPerson() {
this(BASE_DATA_OBJECT_TYPE);
}
- public Person(BigDecimal id) throws DataObjectNotFoundException {
+ public GenericPerson(BigDecimal id) throws DataObjectNotFoundException {
this(new OID(BASE_DATA_OBJECT_TYPE, id));
}
- public Person(OID id) throws DataObjectNotFoundException {
+ public GenericPerson(OID id) throws DataObjectNotFoundException {
super(id);
}
- public Person(DataObject obj) {
+ public GenericPerson(DataObject obj) {
super(obj);
}
- public Person(String type) {
+ public GenericPerson(String type) {
super(type);
}
diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/ui/AddressPropertiesStep.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressPropertiesStep.java
similarity index 72%
rename from ccm-cms/src/com/arsdigita/cms/basetypes/ui/AddressPropertiesStep.java
rename to ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressPropertiesStep.java
index 64cc0f8cd..ceb889417 100644
--- a/ccm-cms/src/com/arsdigita/cms/basetypes/ui/AddressPropertiesStep.java
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressPropertiesStep.java
@@ -16,30 +16,30 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.cms.basetypes.ui;
+package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.PageState;
import com.arsdigita.cms.ContentPage;
import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.ItemSelectionModel;
-import com.arsdigita.cms.basetypes.Address;
+import com.arsdigita.cms.contenttypes.GenericAddress;
import com.arsdigita.domain.DomainObject;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
-import com.arsdigita.cms.basetypes.util.BasetypesGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
import com.arsdigita.cms.util.GlobalizationUtil;
import java.text.DateFormat;
-public class AddressPropertiesStep extends SimpleEditStep {
+public class GenericAddressPropertiesStep extends SimpleEditStep {
public static final String EDIT_SHEET_NAME = "edit";
- public AddressPropertiesStep(ItemSelectionModel itemModel,
+ public GenericAddressPropertiesStep(ItemSelectionModel itemModel,
AuthoringKitWizard parent) {
super(itemModel, parent);
@@ -51,30 +51,30 @@ public class AddressPropertiesStep extends SimpleEditStep {
protected void createEditSheet(ItemSelectionModel itemModel) {
BasicPageForm editSheet;
- editSheet = new AddressPropertyForm(itemModel, this);
+ editSheet = new GenericAddressPropertyForm(itemModel, this);
add(EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.getSaveCancelSection().getCancelButton());
}
public static Component getAddressPropertySheet(ItemSelectionModel itemModel) {
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
- sheet.add((String) GlobalizationUtil.globalize("cms.contenttypes.ui.name").localize(), Address.NAME);
- sheet.add((String) GlobalizationUtil.globalize("cms.contenttypes.ui.title").localize(), Address.TITLE);
- sheet.add((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.address.address").localize(), Address.ADDRESS);
- sheet.add((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.address.postal_code").localize(), Address.POSTAL_CODE);
- sheet.add((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.address.city").localize(), Address.CITY);
- sheet.add((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.address.state").localize(), Address.STATE);
+ sheet.add((String) GlobalizationUtil.globalize("cms.contenttypes.ui.name").localize(), GenericAddress.NAME);
+ sheet.add((String) GlobalizationUtil.globalize("cms.contenttypes.ui.title").localize(), GenericAddress.TITLE);
+ sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.address").localize(), GenericAddress.ADDRESS);
+ sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.postal_code").localize(), GenericAddress.POSTAL_CODE);
+ sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.city").localize(), GenericAddress.CITY);
+ sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.state").localize(), GenericAddress.STATE);
- sheet.add((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.address.iso_country_code").localize(),
- Address.ISO_COUNTRY_CODE,
+ sheet.add((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.iso_country_code").localize(),
+ GenericAddress.ISO_COUNTRY_CODE,
new DomainObjectPropertySheet.AttributeFormatter() {
public String format(DomainObject item,
String attribute,
PageState state) {
- Address address = (Address) item;
+ GenericAddress address = (GenericAddress) item;
if (address != null && address.getIsoCountryCode() != null) {
- return Address.getCountryNameFromIsoCode(address.getIsoCountryCode());
+ return GenericAddress.getCountryNameFromIsoCode(address.getIsoCountryCode());
} else {
return (String) GlobalizationUtil.globalize("cms.ui.unknown").localize();
}
diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/ui/AddressPropertyForm.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressPropertyForm.java
similarity index 71%
rename from ccm-cms/src/com/arsdigita/cms/basetypes/ui/AddressPropertyForm.java
rename to ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressPropertyForm.java
index 922c30db8..812dc116c 100644
--- a/ccm-cms/src/com/arsdigita/cms/basetypes/ui/AddressPropertyForm.java
+++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericAddressPropertyForm.java
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-package com.arsdigita.cms.basetypes.ui;
+package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.FormProcessException;
@@ -37,8 +37,8 @@ import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.bebop.parameters.ParameterData;
import com.arsdigita.cms.ItemSelectionModel;
-import com.arsdigita.cms.basetypes.Address;
-import com.arsdigita.cms.basetypes.util.BasetypesGlobalizationUtil;
+import com.arsdigita.cms.contenttypes.GenericAddress;
+import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.BasicPageForm;
import java.util.Iterator;
import java.util.Map;
@@ -50,22 +50,22 @@ import org.apache.log4j.Logger;
* @author: Jens Pelzetter
* @author: Sören Bernstein
*/
-public class AddressPropertyForm extends BasicPageForm implements FormProcessListener, FormInitListener, FormSubmissionListener {
+public class GenericAddressPropertyForm extends BasicPageForm implements FormProcessListener, FormInitListener, FormSubmissionListener {
- private static final Logger s_log = Logger.getLogger(AddressPropertyForm.class);
- private AddressPropertiesStep m_step;
- public static final String ADDRESS = Address.ADDRESS;
- public static final String POSTAL_CODE = Address.POSTAL_CODE;
- public static final String CITY = Address.CITY;
- public static final String STATE = Address.STATE;
- public static final String ISO_COUNTRY_CODE = Address.ISO_COUNTRY_CODE;
+ private static final Logger s_log = Logger.getLogger(GenericAddressPropertyForm.class);
+ private GenericAddressPropertiesStep m_step;
+ public static final String ADDRESS = GenericAddress.ADDRESS;
+ public static final String POSTAL_CODE = GenericAddress.POSTAL_CODE;
+ public static final String CITY = GenericAddress.CITY;
+ public static final String STATE = GenericAddress.STATE;
+ public static final String ISO_COUNTRY_CODE = GenericAddress.ISO_COUNTRY_CODE;
public static final String ID = "Address_edit";
- public AddressPropertyForm(ItemSelectionModel itemModel) {
+ public GenericAddressPropertyForm(ItemSelectionModel itemModel) {
this(itemModel, null);
}
- public AddressPropertyForm(ItemSelectionModel itemModel, AddressPropertiesStep step) {
+ public GenericAddressPropertyForm(ItemSelectionModel itemModel, GenericAddressPropertiesStep step) {
super(ID, itemModel);
m_step = step;
addSubmissionListener(this);
@@ -75,7 +75,7 @@ public class AddressPropertyForm extends BasicPageForm implements FormProcessLis
protected void addWidgets() {
super.addWidgets();
- add(new Label((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.address.address").localize()));
+ add(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.address").localize()));
ParameterModel addressParam = new StringParameter(ADDRESS);
addressParam.addParameterListener(new NotNullValidationListener());
addressParam.addParameterListener(new StringInRangeValidationListener(0, 1000));
@@ -84,32 +84,32 @@ public class AddressPropertyForm extends BasicPageForm implements FormProcessLis
address.setCols(30);
add(address);
- add(new Label((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.address.postal_code").localize()));
+ add(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.postal_code").localize()));
ParameterModel postalCodeParam = new StringParameter(POSTAL_CODE);
TextField postalCode = new TextField(postalCodeParam);
/* XXX NumberListener ?*/
add(postalCode);
- add(new Label((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.address.city").localize()));
+ add(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.city").localize()));
ParameterModel cityParam = new StringParameter(CITY);
TextField city = new TextField(cityParam);
add(city);
- add(new Label((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.address.state").localize()));
+ add(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.state").localize()));
ParameterModel stateParam = new StringParameter(STATE);
TextField state = new TextField(stateParam);
add(state);
- if (!Address.getConfig().getHideCountryCodeSelection()) {
- add(new Label((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.address.iso_country_code").localize()));
+ if (!GenericAddress.getConfig().getHideCountryCodeSelection()) {
+ add(new Label((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.address.iso_country_code").localize()));
ParameterModel countryParam = new StringParameter(ISO_COUNTRY_CODE);
countryParam.addParameterListener(new StringInRangeValidationListener(0, 2));
SingleSelect country = new SingleSelect(countryParam);
- country.addOption(new Option("", new Label((String) BasetypesGlobalizationUtil.globalize("cms.ui.select_one").localize())));
+ country.addOption(new Option("", new Label((String) ContenttypesGlobalizationUtil.globalize("cms.ui.select_one").localize())));
- Iterator countries = Address.getSortedListOfCountries(null).entrySet().iterator();
+ Iterator countries = GenericAddress.getSortedListOfCountries(null).entrySet().iterator();
while (countries.hasNext()) {
Map.Entry*ArticleImageDisplay d = new ArticleImageDisplay(myItemSelectionModel, false);
@@ -47,7 +47,7 @@ public class ArticleImageDisplay extends ImageDisplay {
* Construct a new ArticleImageDisplay
*
* @param article the {@link ItemSelectionModel} which
- * supplies the {@link Article}
+ * supplies the {@link GenericArticle}
*
* @param assets the {@link ItemSelectionModel} which
* supplies the {@link ImageAsset} for the article; it is
@@ -74,9 +74,9 @@ public class ArticleImageDisplay extends ImageDisplay {
* @return the currently selected article
* @post ( return != null )
*/
- protected Article getArticle(PageState state) {
- Article article = (Article) m_article.getSelectedObject(state);
- Assert.exists(article, "Article");
+ protected GenericArticle getArticle(PageState state) {
+ GenericArticle article = (GenericArticle) m_article.getSelectedObject(state);
+ Assert.exists(article, "GenericArticle");
return article;
}
@@ -89,7 +89,7 @@ public class ArticleImageDisplay extends ImageDisplay {
super.generateImagePropertiesXML(image, state, element);
- Article article = getArticle(state);
+ GenericArticle article = getArticle(state);
String caption = article.getCaption(image);
if ( caption != null ) {
element.addAttribute("caption", caption);
diff --git a/ccm-cms/src/com/arsdigita/cms/ui/ImageBrowser.java b/ccm-cms/src/com/arsdigita/cms/ui/ImageBrowser.java
index f114765e8..d84cc3af7 100755
--- a/ccm-cms/src/com/arsdigita/cms/ui/ImageBrowser.java
+++ b/ccm-cms/src/com/arsdigita/cms/ui/ImageBrowser.java
@@ -30,7 +30,7 @@ import com.arsdigita.bebop.table.DefaultTableCellRenderer;
import com.arsdigita.bebop.table.TableCellRenderer;
import com.arsdigita.bebop.table.TableModel;
import com.arsdigita.bebop.table.TableModelBuilder;
-import com.arsdigita.cms.basetypes.ArticleImageAssociation;
+import com.arsdigita.cms.contenttypes.GenericArticleImageAssociation;
import com.arsdigita.cms.ImageAsset;
import com.arsdigita.cms.SecurityManager;
import com.arsdigita.cms.dispatcher.Utilities;
@@ -208,7 +208,7 @@ public class ImageBrowser extends Table {
try {
ImageAsset asset = (ImageAsset) DomainObjectFactory.newInstance
(new OID(ImageAsset.BASE_DATA_OBJECT_TYPE,(BigDecimal) key));
- if (!ArticleImageAssociation.imageHasAssociation(asset)) {
+ if (!GenericArticleImageAssociation.imageHasAssociation(asset)) {
canDelete = true;
}
} catch (DataObjectNotFoundException e) {
diff --git a/ccm-cms/src/com/arsdigita/cms/ui/SingleImageSelectionModel.java b/ccm-cms/src/com/arsdigita/cms/ui/SingleImageSelectionModel.java
index a9bf693bb..a1218a34d 100755
--- a/ccm-cms/src/com/arsdigita/cms/ui/SingleImageSelectionModel.java
+++ b/ccm-cms/src/com/arsdigita/cms/ui/SingleImageSelectionModel.java
@@ -22,7 +22,7 @@ import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.ParameterSingleSelectionModel;
import com.arsdigita.bebop.SingleSelectionModel;
import com.arsdigita.bebop.parameters.BigDecimalParameter;
-import com.arsdigita.cms.basetypes.Article;
+import com.arsdigita.cms.contenttypes.GenericArticle;
import com.arsdigita.cms.ImageAsset;
import com.arsdigita.cms.ImageAssetCollection;
import com.arsdigita.cms.ItemSelectionModel;
@@ -120,10 +120,10 @@ public class SingleImageSelectionModel extends ItemSelectionModel {
// Load the object from the item.
com.arsdigita.cms.ContentItem temp =
(com.arsdigita.cms.ContentItem)m_articleModel.getSelectedObject(state);
- Article item = null;
+ GenericArticle item = null;
if ( temp != null ) {
item =
- (Article) com.arsdigita.cms.ACSObjectFactory.castContentItem(temp);
+ (GenericArticle) com.arsdigita.cms.ACSObjectFactory.castContentItem(temp);
}
if ( item != null ) {
ImageAssetCollection images = item.getImages();
diff --git a/ccm-cms/src/com/arsdigita/cms/ui/authoring/ArticleImage.java b/ccm-cms/src/com/arsdigita/cms/ui/authoring/ArticleImage.java
index 18d41cd7d..8768bbe1a 100755
--- a/ccm-cms/src/com/arsdigita/cms/ui/authoring/ArticleImage.java
+++ b/ccm-cms/src/com/arsdigita/cms/ui/authoring/ArticleImage.java
@@ -32,7 +32,7 @@ import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.event.FormSubmissionListener;
import com.arsdigita.bebop.parameters.BigDecimalParameter;
import com.arsdigita.bebop.parameters.StringParameter;
-import com.arsdigita.cms.basetypes.Article;
+import com.arsdigita.cms.contenttypes.GenericArticle;
import com.arsdigita.cms.ImageAsset;
import com.arsdigita.cms.ImageAssetCollection;
import com.arsdigita.cms.ItemSelectionModel;
@@ -180,7 +180,7 @@ public class ArticleImage extends SimpleContainer implements AuthoringStepCompon
PageState state = event.getPageState();
// get the image fresh from the db each time this component displays;
// otherwise rollback doesn't appear to work on this pane
- Article art = (Article)(m_article.getSelectedObject(state));
+ GenericArticle art = (GenericArticle)(m_article.getSelectedObject(state));
ImageAssetCollection col = art.getImages();
ImageAsset img = null;
if (col.next()) {
@@ -366,7 +366,7 @@ public class ArticleImage extends SimpleContainer implements AuthoringStepCompon
public void actionPerformed(ActionEvent event) {
PageState state = event.getPageState();
ImageAsset img = getImageAsset(state);
- Article articleTarget = getArticle(state);
+ GenericArticle articleTarget = getArticle(state);
articleTarget.removeImage(img);
articleTarget.save();
m_assetsWithImage.setSelectedObject(state, null);
@@ -419,9 +419,9 @@ public class ArticleImage extends SimpleContainer implements AuthoringStepCompon
return image;
}
- private Article getArticle(PageState state) {
- Article article = (Article) m_articleWithImage.getSelectedObject(state);
- Assert.exists(article, "Article");
+ private GenericArticle getArticle(PageState state) {
+ GenericArticle article = (GenericArticle) m_articleWithImage.getSelectedObject(state);
+ Assert.exists(article, "GenericArticle");
return article;
}
diff --git a/ccm-cms/src/com/arsdigita/cms/ui/authoring/ArticleImageChooser.java b/ccm-cms/src/com/arsdigita/cms/ui/authoring/ArticleImageChooser.java
index b881a6898..674dc93a2 100755
--- a/ccm-cms/src/com/arsdigita/cms/ui/authoring/ArticleImageChooser.java
+++ b/ccm-cms/src/com/arsdigita/cms/ui/authoring/ArticleImageChooser.java
@@ -27,7 +27,7 @@ import com.arsdigita.bebop.event.FormProcessListener;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.event.FormSubmissionListener;
import com.arsdigita.bebop.parameters.BigDecimalParameter;
-import com.arsdigita.cms.basetypes.ArticleImageAssociation;
+import com.arsdigita.cms.contenttypes.GenericArticleImageAssociation;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ContentType;
import com.arsdigita.cms.ImageAsset;
@@ -172,7 +172,7 @@ public class ArticleImageChooser extends SimpleContainer {
try {
ImageAsset asset = (ImageAsset) DomainObjectFactory.newInstance
(new OID(ImageAsset.BASE_DATA_OBJECT_TYPE,imageId));
- if (!ArticleImageAssociation.imageHasAssociation(asset)) {
+ if (!GenericArticleImageAssociation.imageHasAssociation(asset)) {
asset.setLive(null);
ItemCollection pendingVersions = asset.getPendingVersions();
while(pendingVersions.next()) {
diff --git a/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicImageForm.java b/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicImageForm.java
index d212b9976..3d31de768 100755
--- a/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicImageForm.java
+++ b/ccm-cms/src/com/arsdigita/cms/ui/authoring/BasicImageForm.java
@@ -32,7 +32,7 @@ import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.form.TextField;
import com.arsdigita.bebop.parameters.NotNullValidationListener;
import com.arsdigita.bebop.parameters.StringParameter;
-import com.arsdigita.cms.basetypes.Article;
+import com.arsdigita.cms.contenttypes.GenericArticle;
import com.arsdigita.cms.ImageAsset;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.util.GlobalizationUtil;
@@ -125,7 +125,7 @@ public abstract class BasicImageForm extends Form
FormData data = e.getFormData();
PageState state = e.getPageState();
- Article item = getArticle(state);
+ GenericArticle item = getArticle(state);
ImageAsset asset = getImageAsset(state);
if(item != null && asset != null) {
@@ -145,7 +145,7 @@ public abstract class BasicImageForm extends Form
FormData data = e.getFormData();
PageState state = e.getPageState();
- Article item = getArticle(state);
+ GenericArticle item = getArticle(state);
ImageAsset asset = getImageAsset(state);
if(item != null && asset != null) {
@@ -178,8 +178,8 @@ public abstract class BasicImageForm extends Form
* @param state The page state
* @return the currently selected item
*/
- public Article getArticle(PageState state) {
- return (Article)m_itemModel.getSelectedObject(state);
+ public GenericArticle getArticle(PageState state) {
+ return (GenericArticle)m_itemModel.getSelectedObject(state);
}
/**
diff --git a/ccm-cms/src/com/arsdigita/cms/ui/authoring/ImagePropertiesForm.java b/ccm-cms/src/com/arsdigita/cms/ui/authoring/ImagePropertiesForm.java
index 146bed8a9..e1eb8a6c4 100755
--- a/ccm-cms/src/com/arsdigita/cms/ui/authoring/ImagePropertiesForm.java
+++ b/ccm-cms/src/com/arsdigita/cms/ui/authoring/ImagePropertiesForm.java
@@ -23,7 +23,7 @@ import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.event.FormSectionEvent;
-import com.arsdigita.cms.basetypes.Article;
+import com.arsdigita.cms.contenttypes.GenericArticle;
import com.arsdigita.cms.ImageAsset;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.util.GlobalizationUtil;
@@ -56,7 +56,7 @@ public class ImagePropertiesForm extends BasicImageForm {
public void init(FormSectionEvent e) throws FormProcessException {
FormData data = e.getFormData();
PageState state = e.getPageState();
- Article item = this.getArticle(state);
+ GenericArticle item = this.getArticle(state);
ImageAsset asset = this.getImageAsset(state);
if ( asset == null ) {
@@ -70,7 +70,7 @@ public class ImagePropertiesForm extends BasicImageForm {
public void process(FormSectionEvent e) throws FormProcessException {
FormData data = e.getFormData();
PageState state = e.getPageState();
- Article item = this.getArticle(state);
+ GenericArticle item = this.getArticle(state);
ImageAsset asset = this.getImageAsset(state);
if ( asset == null ) {
diff --git a/ccm-cms/src/com/arsdigita/cms/ui/authoring/ImageSelectionForm.java b/ccm-cms/src/com/arsdigita/cms/ui/authoring/ImageSelectionForm.java
index 5b193bf61..0344b0cac 100755
--- a/ccm-cms/src/com/arsdigita/cms/ui/authoring/ImageSelectionForm.java
+++ b/ccm-cms/src/com/arsdigita/cms/ui/authoring/ImageSelectionForm.java
@@ -23,7 +23,7 @@ import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.FormProcessException;
import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.event.FormSectionEvent;
-import com.arsdigita.cms.basetypes.Article;
+import com.arsdigita.cms.contenttypes.GenericArticle;
import com.arsdigita.cms.ImageAsset;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.ImageDisplay;
@@ -73,7 +73,7 @@ public class ImageSelectionForm extends BasicImageForm {
s_log.debug("Selecting Image");
FormData data = e.getFormData();
PageState state = e.getPageState();
- Article item = this.getArticle(state);
+ GenericArticle item = this.getArticle(state);
ImageAsset a = this.getImageAsset(state);
if(a != null) {
diff --git a/ccm-cms/src/com/arsdigita/cms/ui/authoring/ImageUploadForm.java b/ccm-cms/src/com/arsdigita/cms/ui/authoring/ImageUploadForm.java
index a5e125590..0322dba1e 100755
--- a/ccm-cms/src/com/arsdigita/cms/ui/authoring/ImageUploadForm.java
+++ b/ccm-cms/src/com/arsdigita/cms/ui/authoring/ImageUploadForm.java
@@ -26,7 +26,7 @@ import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.event.FormSubmissionListener;
import com.arsdigita.bebop.parameters.NotNullValidationListener;
-import com.arsdigita.cms.basetypes.Article;
+import com.arsdigita.cms.contenttypes.GenericArticle;
import com.arsdigita.cms.ImageAsset;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ReusableImageAsset;
@@ -117,7 +117,7 @@ public class ImageUploadForm extends BasicImageForm implements FormSubmissionLis
FormData data = event.getFormData();
PageState state = event.getPageState();
- Article item = this.getArticle(state);
+ GenericArticle item = this.getArticle(state);
ImageAsset a = null;
try {
diff --git a/ccm-core/src/com/arsdigita/persistence/CompoundFilterImpl.java b/ccm-core/src/com/arsdigita/persistence/CompoundFilterImpl.java
index 50119bf74..1ddb8db6a 100755
--- a/ccm-core/src/com/arsdigita/persistence/CompoundFilterImpl.java
+++ b/ccm-core/src/com/arsdigita/persistence/CompoundFilterImpl.java
@@ -67,7 +67,7 @@ class CompoundFilterImpl extends FilterImpl implements CompoundFilter {
/**
- * Creates a filter that will AND together all filters passed in to it
+ * Creates a filter that will OR together all filters passed in to it
* For instance, if developers want to combine two filters in to one,
* they can write
*