Skip to content

Commit

Permalink
SAK-30338 - A few followup issues for the simple rss portlet tool after
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
jonespm committed Mar 1, 2016
1 parent baac0c6 commit 4df6778
Show file tree
Hide file tree
Showing 100 changed files with 33 additions and 4,321 deletions.
4 changes: 2 additions & 2 deletions reference/docs/conversion/sakai_11_mysql_conversion.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
-- ---------------------------
-- Add the titles from all existing news tools
INSERT INTO SAKAI_SITE_TOOL_PROPERTY (site_id, tool_id, name, value)
SELECT site_id, tool_id, 'javax.portlet:portlet_title', title FROM SAKAI_SITE_TOOL WHERE registration = 'sakai.news';
SELECT site_id, tool_id, 'javax.portlet-portlet_title', title FROM SAKAI_SITE_TOOL WHERE registration = 'sakai.news';

-- Setup all instances with the URL
UPDATE SAKAI_SITE_TOOL_PROPERTY SET name = 'javax.portlet:feed_url' WHERE name = 'channel-url';
UPDATE SAKAI_SITE_TOOL_PROPERTY SET name = 'javax.portlet-feed_url' WHERE name = 'channel-url';

-- Finally, convert all news tools to the new portlet (must run last)
UPDATE SAKAI_SITE_TOOL SET registration = 'sakai.simple.rss' WHERE registration = 'sakai.news';
Expand Down
4 changes: 2 additions & 2 deletions reference/docs/conversion/sakai_11_oracle_conversion.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
-- ---------------------------
-- Add the titles from all existing news tools
INSERT INTO sakai_site_tool_property (site_id, tool_id, name, value)
SELECT site_id, tool_id, 'javax.portlet:portlet_title', title FROM sakai_site_tool WHERE registration = 'sakai.news';
SELECT site_id, tool_id, 'javax.portlet-portlet_title', title FROM sakai_site_tool WHERE registration = 'sakai.news';

-- Setup all instances with the URL
UPDATE sakai_site_tool_property SET name = 'javax.portlet:feed_url' WHERE name = 'channel-url';
UPDATE sakai_site_tool_property SET name = 'javax.portlet-feed_url' WHERE name = 'channel-url';

-- Finally, convert all news tools to the new portlet (must run last)
UPDATE sakai_site_tool SET registration = 'sakai.simple.rss' WHERE registration = 'sakai.news';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
.icon-sakai-mailbox{ @extend .fa-envelope-o;}
.icon-sakai-emailtemplateservice{ @extend .fa-envelope;}
.icon-sakai-news{ @extend .fa-newspaper-o;}
.icon-sakai-simple-rss{ @extend .fa-newspaper-o;}
.icon-sakai-basiclti{ @extend .fa-globe;}
.icon-sakai-messages{ @extend .fa-inbox;}
.icon-sakai-dashboard{ @extend .fa-dashboard;}
Expand Down
28 changes: 0 additions & 28 deletions simple-rss-portlet/.classpath

This file was deleted.

17 changes: 0 additions & 17 deletions simple-rss-portlet/.project

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

connection.error=Connection failed

config.portlet.title=Enter the portlet title:
config.portlet.title=Enter the tool title:
config.portlet.url=Enter the RSS feed URL:
config.portlet.maxitems=Max items to display:

Expand All @@ -12,12 +12,12 @@ error.form.readonly.error=Attempt to set value onto readonly field.
error.form.save.error=Saving your preferences failed.

error.no.remote.data=No data was returned from the remote server. Please ensure the URL added is correct.
error.no.config=Please configure this portlet
error.no.config=Please configure this news tool before using.

error.heading.general=An error has occurred
error.heading.config=Not yet configured

edit.preconfigured=This portlet is mostly pre-configured by the Portal Administrator and cannot be altered, however you can personalise the available settings below.
edit.preconfigured=This tool is mostly pre-configured by the Portal Administrator and cannot be altered, however you can personalise the available settings below.

view.attachment.default=Attachment

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,17 @@
* @throws ValidatorException if there are any errors
*/
public class SimpleRSSPreferencesValidator implements PreferencesValidator {
private final String PREF_FEED_URL = "feed_url";

@Override
public void validate(PortletPreferences prefs) throws ValidatorException {

//get prefs as strings
String max_items = prefs.getValue("max_items", Integer.toString(Constants.MAX_ITEMS));
String feed_url = prefs.getValue("feed_url", null);
String feed_url = prefs.getValue(PREF_FEED_URL, null);

//check readonly
boolean feedUrlIsLocked = prefs.isReadOnly("feed_url");
boolean feedUrlIsLocked = prefs.isReadOnly(PREF_FEED_URL);

/**
* max_items
Expand Down Expand Up @@ -73,17 +74,17 @@ public void validate(PortletPreferences prefs) throws ValidatorException {

//check not null
if(StringUtils.isBlank(feed_url)){
throw new ValidatorException("You must specify a URL for the RSS feed", Collections.singleton("feed_url"));
throw new ValidatorException("You must specify a URL for the RSS feed", Collections.singleton(PREF_FEED_URL));
}

//check valid scheme
if(!urlValidator.isValidScheme(feed_url)){
throw new ValidatorException("Invalid feed scheme. Must be one of: " + Arrays.toString(schemes), Collections.singleton("feed_url"));
throw new ValidatorException("Invalid feed scheme. Must be one of: " + Arrays.toString(schemes), Collections.singleton(PREF_FEED_URL));
}

//check valid URL
if(!urlValidator.isValid(feed_url)){
throw new ValidatorException("Invalid feed URL", Collections.singleton("feed_url"));
throw new ValidatorException("Invalid feed URL", Collections.singleton(PREF_FEED_URL));

}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0"?>
<registration>

<tool id="sakai.simple.rss" title="RSS Portlet" description="For displaying RSS feeds">
<tool id="sakai.simple.rss" title="News" description="For viewing content from RSS News Feeds">

<category name="course" />
<category name="project" />
<category name="portfolio" />
<category name="myworkspace" />

<configuration name="functions.require" />
<configuration name="reset.button" value="true"/>
<configuration name="allowMultipleInstances" value="true" />
<configuration name="feed_url" value="http://sakaiproject.org/feed" />

</tool>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
channel-url=URL Channel
javax.portlet-feed_url=URL Channel
source=Source
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#X-Generator: crowdin.net
channel-url=Canal URL
javax.portlet-feed_url=Canal URL
source=Font
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
channel-url=URL-Kanal
javax.portlet-feed_url=URL-Kanal
source=Quelle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
channel-url=URL Channel
javax.portlet-feed_url=URL Channel
source=Source
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
channel-url=Canal URL
javax.portlet-feed_url=Canal URL
source=Recurso
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Fri Nov 26 20:32:22 CET 2010
channel-url=URL kanala
javax.portlet-feed_url=URL kanala
source=Baliabidea
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#X-Generator: crowdin.net
channel-url=\u092f\u0942\u0906\u0930\u090f\u0932 \u091a\u0948\u0928\u0932
javax.portlet-feed_url=\u092f\u0942\u0906\u0930\u090f\u0932 \u091a\u0948\u0928\u0932
source=\u0938\u094d\u0930\u094b\u0924
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
channel-url=Canale URL
javax.portlet-feed_url=Canale URL
source=Provenienza
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
channel-url=URL \u30c1\u30e3\u30f3\u30cd\u30eb
javax.portlet-feed_url=URL \u30c1\u30e3\u30f3\u30cd\u30eb
source=\u30bd\u30fc\u30b9
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
channel-url=URL \ucc44\ub110
javax.portlet-feed_url=URL \ucc44\ub110
source=\uc18c\uc2a4
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# email: [email protected] #
###################################

channel-url=URL-\u044B\u043D \u0441\u0443\u0432\u0430\u0433
javax.portlet-feed_url=URL-\u044B\u043D \u0441\u0443\u0432\u0430\u0433
source=\u042D\u0445 \u04AF\u04AF\u0441\u0432\u044D\u0440
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
channel-url=URL Channel
javax.portlet-feed_url=URL Channel
source=\u0179r\u00D3d\u0142o
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# TIDIA-Ae Project Fapesp, Sao Paulo, Brazil
#-------------------------------------------------------------------------------

channel-url=Canal de URL
javax.portlet-feed_url=Canal de URL
source=Fonte
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
channel-url=URL Kanal\u0131
javax.portlet-feed_url=URL Kanal\u0131
source=Kaynak
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
channel-url=URL\u5730\u5740
javax.portlet-feed_url=URL\u5730\u5740
source=\u5916\u90E8\u7F51\u7AD9\u5730\u5740
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,8 @@ public class SiteAction extends PagedResourceActionII {
private final static String WEB_CONTENT_TOOL_SOURCE_CONFIG_VALUE = "http://";

/** the news tool **/
private final static String NEWS_TOOL_ID = "sakai.news";
private final static String NEWS_TOOL_CHANNEL_CONFIG = "channel-url";
private final static String NEWS_TOOL_ID = "sakai.simple.rss";
private final static String NEWS_TOOL_CHANNEL_CONFIG = "javax.portlet-feed_url";
private final static String NEWS_TOOL_CHANNEL_CONFIG_VALUE = "http://sakaiproject.org/feed";

private final static String LESSONS_TOOL_ID = "sakai.lessonbuildertool";
Expand Down
43 changes: 0 additions & 43 deletions web/news-api/api/pom.xml

This file was deleted.

Loading

0 comments on commit 4df6778

Please sign in to comment.