CT NewsItem

* Kleine Korrekturen

git-svn-id: https://svn.libreccm.org/ccm/trunk@440 8810af33-2d31-482b-a856-94f89814c4df
master
quasi 2010-05-26 06:58:52 +00:00
parent 8fde211eba
commit 90acf45f3c
3 changed files with 48 additions and 51 deletions

View File

@ -2,7 +2,7 @@
<xrd:adapters xmlns:xrd="http://xmlns.redhat.com/schemas/waf/xml-renderer-rules"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://rhea.redhat.com/schemas/waf/xml-renderer-rules xml-renderer-rules.xsd">
<!-- No need to list all the content types here. Only
<!-- No need to list all the content types here. Only
need to list a type if is adds associations that
were not in the parent type, or to remove attributes
-->

View File

@ -18,8 +18,6 @@
*/
package com.arsdigita.cms.contenttypes;
import com.arsdigita.cms.basetypes.Article;
import com.arsdigita.cms.ContentType;
import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.persistence.DataObject;
@ -57,22 +55,19 @@ import java.util.Date;
* @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a>
* @version $Revision: #7 $ $Date: 2004/08/17 $
**/
public class NewsItem extends Article {
public class NewsItem extends com.arsdigita.cms.basetypes.Article {
/** PDL property name for lead */
public static final String LEAD = "lead";
/** PDL property name for news date */
public static final String NEWS_DATE = "newsDate";
public static final String IS_HOMEPAGE = "isHomepage";
public static final String RECENT_NEWS =
"com.arsdigita.cms.contenttypes.RecentNews";
/** Data object type for this domain object */
public static final String BASE_DATA_OBJECT_TYPE
= "com.arsdigita.cms.contenttypes.NewsItem";
public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.NewsItem";
private static final NewsItemConfig s_config = new NewsItemConfig();
static {
s_config.load();
}
@ -101,6 +96,7 @@ public class NewsItem extends Article {
super(type);
}
@Override
public void initialize() {
super.initialize();
@ -109,6 +105,7 @@ public class NewsItem extends Article {
}
}
@Override
public void beforeSave() {
super.beforeSave();
@ -139,15 +136,15 @@ public class NewsItem extends Article {
public String getDisplayNewsDate() {
Date d = getNewsDate();
return (d != null) ? DateFormat.getDateInstance(DateFormat.LONG)
.format(d) : null;
return (d != null) ? DateFormat.getDateInstance(DateFormat.LONG).format(d) : null;
}
public void setNewsDate(Date newsDate) {
set(NEWS_DATE, newsDate);
}
public static final int SUMMARY_LENGTH = 200;
@Override
public String getSearchSummary() {
return com.arsdigita.util.StringUtils.truncateString(getLead(),
SUMMARY_LENGTH,