Minor fixes, added documentation, improved formatting.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2072 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
18196e775a
commit
91c2b394a5
|
|
@ -228,7 +228,7 @@ waf.admin.password=lib2000
|
|||
waf.admin.password.question=12345
|
||||
waf.admin.password.answer=6
|
||||
|
||||
waf.runtime.jdbc_url=jdbc\:postgresql\://localhost/openccm?user\=ccm&password\=ccm42web
|
||||
waf.runtime.jdbc_url=jdbc\:postgresql\://localhost/ccm?user\=ccm&password\=ccm42web
|
||||
waf.runtime.jdbc_pool_size=40
|
||||
|
||||
waf.web.server=localhost\:8080
|
||||
|
|
|
|||
|
|
@ -66,19 +66,25 @@
|
|||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
||||
<!-- Content Assets -->
|
||||
<!--
|
||||
<ccm:application name="ccm-cms-assets-fileattachment"/>
|
||||
<ccm:application name="ccm-cms-assets-notes"/>
|
||||
|
||||
-->
|
||||
<!-- Content Types -->
|
||||
<ccm:application name="ccm-cms-types-bookmark"/>
|
||||
<!--
|
||||
<ccm:application name="ccm-cms-types-event"/>
|
||||
<ccm:application name="ccm-cms-types-image"/>
|
||||
<ccm:application name="ccm-cms-types-mparticle"/>
|
||||
-->
|
||||
<ccm:application name="ccm-cms-types-newsitem"/>
|
||||
<!--
|
||||
<ccm:application name="ccm-cms-types-person"/>
|
||||
|
||||
-->
|
||||
<!-- Applications -->
|
||||
<!--
|
||||
<ccm:application name="ccm-cms-publicpersonalprofile"/>
|
||||
-->
|
||||
|
||||
<!-- LDN extension -->
|
||||
<!-- temporarily excluded because configuration issues have to be resolved
|
||||
|
|
@ -117,9 +123,9 @@
|
|||
<ccm:application name="ccm-bookmarks"/>
|
||||
<ccm:application name="ccm-docmgr"/>
|
||||
<ccm:application name="ccm-docrepo"/>
|
||||
-->
|
||||
<ccm:application name="ccm-forum"/>
|
||||
<ccm:application name="ccm-forum-categorised"/>
|
||||
-->
|
||||
<!--
|
||||
<ccm:application name="ccm-portalserver"/>
|
||||
<ccm:application name="ccm-weblog"/>
|
||||
|
|
@ -133,6 +139,12 @@
|
|||
<ccm:application name="ccm-ldn-importer"/>
|
||||
-->
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<!-- Libre CMS modules under development -->
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
<ccm:application name="ccm-portlet-bookmarks"/>
|
||||
<ccm:application name="ccm-portlet-latestnews"/>
|
||||
|
||||
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
||||
|
|
|
|||
|
|
@ -34,13 +34,11 @@ import org.apache.log4j.Logger;
|
|||
* @see com.arsdigita.kernel.Resource
|
||||
* @author Justin Ross <<a href="mailto:jross@redhat.com">jross@redhat.com</a>>
|
||||
* @author Eric Lorenzo
|
||||
* @version $Id: ResourceConfigFormSection.java 287 2005-02-22 00:29:02Z sskracic $
|
||||
*/
|
||||
public abstract class ResourceConfigFormSection extends FormSection {
|
||||
public static final String versionId =
|
||||
"$Id: ResourceConfigFormSection.java 287 2005-02-22 00:29:02Z sskracic $" +
|
||||
"$Author: sskracic $" +
|
||||
"$DateTime: 2004/08/16 18:10:38 $";
|
||||
|
||||
/** Private logger instance for debugging purpose */
|
||||
private static final Logger s_log = Logger.getLogger
|
||||
(ResourceConfigFormSection.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ import com.arsdigita.cms.ui.authoring.TextAssetBody.PageTextForm;
|
|||
import com.arsdigita.kernel.ResourceType;
|
||||
import com.arsdigita.portalworkspace.Workspace;
|
||||
import com.arsdigita.portalworkspace.portlet.FreeformHTMLPortlet;
|
||||
// @deprecated use com.arsdigita.bebop.portal.PortletConfigFormSection
|
||||
// import com.arsdigita.london.portal.ui.PortletConfigFormSection;
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
public class FreeformHTMLPortletEditor extends PortletConfigFormSection {
|
||||
|
|
|
|||
|
|
@ -28,13 +28,11 @@ import com.arsdigita.bebop.parameters.StringInRangeValidationListener;
|
|||
import com.arsdigita.bebop.parameters.StringParameter;
|
||||
import com.arsdigita.kernel.ResourceType;
|
||||
import com.arsdigita.portalworkspace.portlet.RSSFeedPortlet;
|
||||
// @deprecated use com.arsdigita.bebop.portal.PortletConfigFormSection
|
||||
// import com.arsdigita.london.portal.ui.PortletConfigFormSection;
|
||||
import com.arsdigita.portal.Portlet;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author pb
|
||||
* @author
|
||||
*/
|
||||
public class RSSFeedPortletEditorForm extends PortletConfigFormSection {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
// author chris gilbert
|
||||
// model for a portlet that holds a list of bookmark links
|
||||
|
||||
model uk.gov.westsussex.portlet;
|
||||
// model uk.gov.westsussex.portlet;
|
||||
model com.arsdigita.portlet;
|
||||
|
||||
import com.arsdigita.portal.Portlet;
|
||||
import com.arsdigita.cms.contenttypes.Link;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import com.arsdigita.globalization.GlobalizedMessage;
|
|||
|
||||
public interface BookmarkConstants {
|
||||
|
||||
public static final String BUNDLE_NAME = "uk.gov.westsussex.portlet.bookmarks.ui.BookmarkResources";
|
||||
public static final String BUNDLE_NAME = "com.arsdigita.portlet.bookmarks.ui.BookmarkResources";
|
||||
|
||||
|
||||
// bookmark portlet attributes
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class BookmarksPortlet extends Portlet implements BookmarkConstants {
|
|||
public static final Logger s_log = Logger.getLogger(BookmarksPortlet.class);
|
||||
|
||||
public static final String BASE_DATA_OBJECT_TYPE =
|
||||
"uk.gov.westsussex.portlet.BookmarksPortlet";
|
||||
"com.arsdigita.portlet.BookmarksPortlet";
|
||||
|
||||
private static BookmarksPortletConfig s_config =
|
||||
new BookmarksPortletConfig();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import com.arsdigita.util.parameter.Parameter;
|
|||
public class BookmarksPortletConfig extends AbstractConfig {
|
||||
|
||||
private BooleanParameter checkPermissions = new BooleanParameter(
|
||||
"uk.gov.westsussex.portlet.bookmarks.checkPermissions",
|
||||
"com.arsdigita.portlet.bookmarks.checkPermissions",
|
||||
Parameter.REQUIRED, new Boolean(false));
|
||||
|
||||
public BookmarksPortletConfig() {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class Initializer extends CompoundInitializer {
|
|||
add(
|
||||
new PDLInitializer(
|
||||
new ManifestSource(
|
||||
"ccm-wsx-bookmarks-portlet.pdl.mf",
|
||||
"ccm-portlet-bookmarks.pdl.mf",
|
||||
new NameFilter(
|
||||
DbHelper.getDatabaseSuffix(database),
|
||||
"pdl"))));
|
||||
|
|
@ -118,6 +118,6 @@ public class Initializer extends CompoundInitializer {
|
|||
*/
|
||||
PortletType.registerXSLFile(BookmarksPortlet.BASE_DATA_OBJECT_TYPE,
|
||||
"/packages/westsussex-portlets/xsl/bookmarks-portlet.xsl");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -102,11 +102,11 @@ public class BookmarksPortletEditor
|
|||
@Override
|
||||
protected Object initialValue(PageState ps) {
|
||||
String userURL = (String) m_url.getValue(ps);
|
||||
|
||||
java.net.URL contextURL;
|
||||
try {
|
||||
contextURL =
|
||||
new java.net.URL(
|
||||
Web.getRequest().getRequestURL().toString());
|
||||
contextURL = new java.net.URL(Web.getRequest().getRequestURL()
|
||||
.toString());
|
||||
} catch (MalformedURLException ex) {
|
||||
throw new UncheckedWrapperException(ex);
|
||||
}
|
||||
|
|
@ -127,11 +127,8 @@ public class BookmarksPortletEditor
|
|||
|
||||
StringTokenizer tok = new StringTokenizer(path, "/");
|
||||
if (!tok.hasMoreTokens()) {
|
||||
s_log.info(
|
||||
"Couldn't find a content section for "
|
||||
+ path
|
||||
+ " in "
|
||||
+ userURL);
|
||||
s_log.info("Couldn't find a content section for "
|
||||
+ path + " in " + userURL);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -152,12 +149,8 @@ public class BookmarksPortletEditor
|
|||
section = sections.getContentSection();
|
||||
sections.close();
|
||||
} else {
|
||||
s_log.info(
|
||||
"Content section "
|
||||
+ sectionPath
|
||||
+ " in "
|
||||
+ userURL
|
||||
+ " doesn't exist.");
|
||||
s_log.info("Content section " + sectionPath + " in "
|
||||
+ userURL + " doesn't exist.");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -177,15 +170,12 @@ public class BookmarksPortletEditor
|
|||
|
||||
SecurityManager sm = new SecurityManager(item.getContentSection());
|
||||
|
||||
boolean canRead =
|
||||
sm.canAccess(
|
||||
ps.getRequest(),
|
||||
boolean canRead = sm.canAccess(ps.getRequest(),
|
||||
SecurityManager.PUBLIC_PAGES,
|
||||
item);
|
||||
if (!canRead) {
|
||||
s_log.debug("User not allowed access to item");
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
return item.getDraftVersion();
|
||||
|
|
@ -219,7 +209,6 @@ public class BookmarksPortletEditor
|
|||
|
||||
m_newWindow = new CheckboxGroup(Link.TARGET_WINDOW);
|
||||
m_newWindow.addOption(new Option(NEW_WINDOW_YES, NEW_WINDOW));
|
||||
|
||||
try {
|
||||
m_newWindow.addPrintListener(new PrintListener() {
|
||||
|
||||
|
|
@ -229,7 +218,6 @@ public class BookmarksPortletEditor
|
|||
if (m_bookmarkSelectionModel.isSelected(state)) {
|
||||
Link link = m_bookmarkSelectionModel.getSelectedLink(state);
|
||||
newWindow.setValue(state, link.getTargetWindow());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -245,7 +233,7 @@ public class BookmarksPortletEditor
|
|||
m_portletSelectionModel = new PortletSelectionModel(m_selectedPortlet);
|
||||
m_selectedBookmark = new BigDecimalParameter("bookmark");
|
||||
m_bookmarkSelectionModel = new BookmarkSelectionModel(
|
||||
"uk.gov.westsussex.portlet.bookmarks.Bookmark",
|
||||
"com.arsdigita.portlet.bookmarks.Bookmark",
|
||||
Bookmark.BASE_DATA_OBJECT_TYPE, m_selectedBookmark);
|
||||
m_existingBookmarks = new BookmarksTable(m_bookmarkSelectionModel,
|
||||
m_portletSelectionModel);
|
||||
|
|
@ -286,12 +274,12 @@ public class BookmarksPortletEditor
|
|||
portlet.getPortletRenderer().invalidateCachedVersion(state);
|
||||
m_portletSelectionModel.setSelectedObject(state, portlet);
|
||||
super.initWidgets(state, portlet);
|
||||
|
||||
if (m_bookmarkSelectionModel.isSelected(state)) {
|
||||
Bookmark link = m_bookmarkSelectionModel.getSelectedLink(state);
|
||||
m_url.setValue(state, BookmarksPortlet.getURIForBookmark(link, state));
|
||||
m_description.setValue(state, link.getDescription());
|
||||
m_title.setValue(state, link.getTitle());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -321,6 +309,7 @@ public class BookmarksPortletEditor
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* add new bookmark to portlet, or amend existing one if we are editing
|
||||
* a selected bookmark
|
||||
|
|
@ -331,7 +320,6 @@ public class BookmarksPortletEditor
|
|||
s_log.debug("START processWidgets");
|
||||
super.processWidgets(state, portlet);
|
||||
|
||||
|
||||
BookmarksPortlet myportlet = (BookmarksPortlet) portlet;
|
||||
|
||||
String titleText = (String) m_title.getValue(state);
|
||||
|
|
@ -340,18 +328,15 @@ public class BookmarksPortletEditor
|
|||
|
||||
ContentItem item = (ContentItem) contentItem.get(state);
|
||||
String[] newWindowValue = (String[]) m_newWindow.getValue(state);
|
||||
String newWindow =
|
||||
newWindowValue == null ? NEW_WINDOW_NO : NEW_WINDOW_YES;
|
||||
String newWindow = newWindowValue == null ? NEW_WINDOW_NO
|
||||
: NEW_WINDOW_YES;
|
||||
|
||||
Bookmark newBookmark;
|
||||
|
||||
if (m_bookmarkSelectionModel.isSelected(state)) {
|
||||
newBookmark = m_bookmarkSelectionModel.getSelectedLink(state);
|
||||
|
||||
} else {
|
||||
newBookmark = new Bookmark();
|
||||
myportlet.addBookmark(newBookmark);
|
||||
|
||||
}
|
||||
newBookmark.setTitle(titleText);
|
||||
newBookmark.setDescription(descriptionText);
|
||||
|
|
@ -359,16 +344,14 @@ public class BookmarksPortletEditor
|
|||
if (item == null) {
|
||||
newBookmark.setTargetType(Link.EXTERNAL_LINK);
|
||||
newBookmark.setTargetURI(urlText);
|
||||
|
||||
} else {
|
||||
newBookmark.setTargetType(Link.INTERNAL_LINK);
|
||||
newBookmark.setTargetItem(item);
|
||||
}
|
||||
|
||||
|
||||
m_bookmarkSelectionModel.clearSelection(state);
|
||||
s_log.debug("END processWidgets");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<ccm:application name="ccm-wsx-news-portlet"
|
||||
<ccm:application name="ccm-portlet-latestnews"
|
||||
prettyName="Personalised News Portlet"
|
||||
version="1.0.1"
|
||||
release="1"
|
||||
|
|
@ -9,6 +9,9 @@
|
|||
|
||||
<ccm:dependencies>
|
||||
<ccm:requires name="ccm-cms-types-newsitem" version="6.1.0"/>
|
||||
<ccm:requires name="ccm-navigation" version="6.6.0"/>
|
||||
<ccm:requires name="ccm-ldn-terms" version="6.6.0"/>
|
||||
|
||||
<!--
|
||||
<ccm:requires name="ccm-ldn-portal" version="1.4.2"/>
|
||||
<ccm:requires name="ccm-wsx-authentication" version="1.0.1"/>
|
||||
|
|
|
|||
|
|
@ -37,16 +37,17 @@ import org.apache.log4j.Logger;
|
|||
|
||||
|
||||
/**
|
||||
*
|
||||
* Provides configuration pane for NewsPortlet.
|
||||
*
|
||||
* @author Chris Gilbert (cgyg9330) <chris.gilbert@westsussex.gov.uk>
|
||||
* @version $Id: NewsPortletEditor.java 2005/03/07 13:48:49 cgyg9330 Exp $
|
||||
*/
|
||||
public class NewsPortletEditor extends PortletConfigFormSection {
|
||||
|
||||
private TextField m_itemCount;
|
||||
private static final Logger s_log = Logger.getLogger(NewsPortletEditor.class);
|
||||
|
||||
private TextField m_itemCount;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
|
@ -69,19 +70,16 @@ public class NewsPortletEditor extends PortletConfigFormSection {
|
|||
|
||||
|
||||
/**
|
||||
*
|
||||
* Add widgets to the form containing the configuration options.
|
||||
*/
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
super.addWidgets();
|
||||
|
||||
m_itemCount =
|
||||
new TextField(new StringParameter(NewsPortlet.ITEM_COUNT));
|
||||
|
||||
/* Define the number of news item to display */
|
||||
m_itemCount = new TextField(new StringParameter(NewsPortlet.ITEM_COUNT));
|
||||
add(new Label("Number of items:", Label.BOLD), ColumnPanel.RIGHT);
|
||||
|
||||
m_itemCount.addValidationListener(new IntegerValidationListener());
|
||||
|
||||
add(m_itemCount);
|
||||
|
||||
}
|
||||
|
|
@ -102,9 +100,9 @@ public class NewsPortletEditor extends PortletConfigFormSection {
|
|||
|
||||
if (portlet != null) {
|
||||
NewsPortlet myportlet = (NewsPortlet) portlet;
|
||||
|
||||
m_itemCount.setValue(state, myportlet.getItemCount()+ "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -125,4 +123,5 @@ public class NewsPortletEditor extends PortletConfigFormSection {
|
|||
(String) m_itemCount.getValue(state)).intValue());
|
||||
s_log.debug("END processWidgets");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ import org.apache.log4j.Logger;
|
|||
public class NewsPortletRenderer extends AbstractPortletRenderer
|
||||
implements NewsConstants {
|
||||
|
||||
/** Private logger instance for debugging purpose */
|
||||
private static final Logger s_log =
|
||||
Logger.getLogger(NewsPortletRenderer.class);
|
||||
|
||||
|
|
@ -67,6 +68,7 @@ public class NewsPortletRenderer extends AbstractPortletRenderer
|
|||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param portlet
|
||||
*/
|
||||
|
|
@ -83,9 +85,10 @@ public class NewsPortletRenderer extends AbstractPortletRenderer
|
|||
protected void generateBodyXML(PageState state, Element parent) {
|
||||
s_log.debug("START - generateBodyXML");
|
||||
|
||||
Element newsPortlet = parent.newChildElement( MAIN_PORTLET_ELEMENT,
|
||||
Element newsPortlet = parent.newChildElement(MAIN_PORTLET_ELEMENT,
|
||||
PortletType.PORTLET_XML_NS);
|
||||
DateFormat formatter = new SimpleDateFormat("dd/MM/yy");
|
||||
|
||||
User thisUser = (User) Kernel.getContext().getParty();
|
||||
if (null == thisUser) {
|
||||
thisUser = Kernel.getPublicUser();
|
||||
|
|
@ -94,13 +97,13 @@ public class NewsPortletRenderer extends AbstractPortletRenderer
|
|||
// Object customUser = ExternalUserFactory.getCustomUserObject(thisUser);
|
||||
// if (customUser instanceof PersonalisedNewsTarget) {
|
||||
// newsPortlet.addAttribute(PERSONALISED_ATTRIBUTE, "true");
|
||||
// getPersonalisedNews(
|
||||
// state,
|
||||
// getPersonalisedNews(state,
|
||||
// newsPortlet,
|
||||
// (PersonalisedNewsTarget) customUser,
|
||||
// formatter);
|
||||
//
|
||||
// } else {
|
||||
|
||||
newsPortlet.addAttribute(PERSONALISED_ATTRIBUTE, "false");
|
||||
getGeneralNews(newsPortlet, formatter);
|
||||
|
||||
|
|
@ -113,6 +116,7 @@ public class NewsPortletRenderer extends AbstractPortletRenderer
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param newsPortlet
|
||||
* @param profiledUser
|
||||
*/
|
||||
|
|
@ -170,14 +174,14 @@ public class NewsPortletRenderer extends AbstractPortletRenderer
|
|||
DomainCollection rssRoots = rss.getRootTerms();
|
||||
rssRoots.addEqualsFilter(Term.NAME, "News");
|
||||
Term newsTerm = null;
|
||||
|
||||
while (rssRoots.next()) {
|
||||
newsTerm = (Term) rssRoots.getDomainObject();
|
||||
s_log.debug("found the news rss feed term");
|
||||
Category cat = newsTerm.getModel();
|
||||
DataCollection newsItems = SessionManager.getSession()
|
||||
.retrieve(ContentPage.BASE_DATA_OBJECT_TYPE);
|
||||
newsItems.addEqualsFilter("parent.categories.id",
|
||||
cat.getID());
|
||||
newsItems.addEqualsFilter("parent.categories.id",cat.getID());
|
||||
|
||||
newsItems.addEqualsFilter(ContentItem.VERSION, ContentItem.LIVE);
|
||||
newsItems.addOrder(ContentPage.LAUNCH_DATE + " desc");
|
||||
|
|
@ -185,17 +189,16 @@ public class NewsPortletRenderer extends AbstractPortletRenderer
|
|||
// CategorizedCollection newsItems =
|
||||
// cat.getObjects(ContentPage.BASE_DATA_OBJECT_TYPE);
|
||||
s_log.debug("total items = " + newsItems.size());
|
||||
newsItems.setRange(
|
||||
new Integer(1),
|
||||
newsItems.setRange(new Integer(1),
|
||||
new Integer(m_portlet.getItemCount() + 1));
|
||||
|
||||
ContentPage newsItem = null;
|
||||
while (newsItems.next()) {
|
||||
Element item =
|
||||
main.newChildElement(NEWS_ITEM_ELEMENT, XML_NEWS_NS);
|
||||
Element item = main.newChildElement(NEWS_ITEM_ELEMENT, XML_NEWS_NS);
|
||||
//newsItem = (ContentPage) newsItems.getDomainObject();
|
||||
newsItem = (ContentPage)DomainObjectFactory
|
||||
.newInstance(newsItems.getDataObject());
|
||||
|
||||
Date d = newsItem.getLaunchDate();
|
||||
String date = (d != null) ? formatter.format(d) : "";
|
||||
item.addAttribute(DATE_ATTRIBUTE, date);
|
||||
|
|
@ -203,8 +206,7 @@ public class NewsPortletRenderer extends AbstractPortletRenderer
|
|||
item.addAttribute(TITLE_ATTRIBUTE, newsItem.getTitle());
|
||||
|
||||
item.addAttribute(LEAD_ATTRIBUTE, newsItem.getSearchSummary());
|
||||
item.addAttribute(
|
||||
URL_ATTRIBUTE,
|
||||
item.addAttribute(URL_ATTRIBUTE,
|
||||
Navigation.redirectURL(newsItem.getOID()));
|
||||
|
||||
}
|
||||
|
|
@ -214,39 +216,34 @@ public class NewsPortletRenderer extends AbstractPortletRenderer
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
public Object getCacheKey() {
|
||||
|
||||
if (getProfiledUser() == null) {
|
||||
return GENERAL_NEWS_CACHE_KEY;
|
||||
} else {
|
||||
|
||||
|
||||
return m_portlet.getID();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// is dirty if edited, as this means the number of entries has changed.
|
||||
// For non personalised news, dirty if homepage
|
||||
// newsitems are added or edited.
|
||||
// For personalised, dirty if pushed items added or edited.
|
||||
|
||||
public boolean isDirty() {
|
||||
|
||||
|
||||
// has it been edited? - add in this condition when response
|
||||
// from Redhat about AbstractPortletRenderer
|
||||
|
||||
// if not has news changed
|
||||
if (getCacheKey().equals(GENERAL_NEWS_CACHE_KEY)) {
|
||||
isDirty = m_portlet.isNewNews();
|
||||
s_log.debug("general news: dirty? " + isDirty);
|
||||
|
||||
} else {
|
||||
// implement later
|
||||
isDirty = true;
|
||||
}
|
||||
}
|
||||
return isDirty;
|
||||
*/
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue