Author: rgardler
Date: Tue Jan 22 12:35:21 2013
New Revision: 1436870
URL: http://svn.apache.org/viewvc?rev=1436870&view=rev
Log:
enable widgets to override the widget.id in their properties file
Added:
wookie/trunk/widgets/templates/login/default.widget.properties
wookie/trunk/widgets/templates/walkthrough/default.widget.properties
Modified:
wookie/trunk/widgets/templates/base/config.xml
wookie/trunk/widgets/templates/base/default.widget.properties
wookie/trunk/widgets/templates/browse/default.widget.properties
wookie/trunk/widgets/templates/composite/default.widget.properties
wookie/trunk/widgets/templates/default.widget.properties
wookie/trunk/widgets/templates/itemDetail/default.widget.properties
wookie/trunk/widgets/templates/message/default.widget.properties
wookie/trunk/widgets/templates/readme.txt
wookie/trunk/widgets/templates/scanning/default.widget.properties
wookie/trunk/widgets/templates/twoColumn/default.widget.properties
Modified: wookie/trunk/widgets/templates/base/config.xml
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/base/config.xml?rev=1436870&r1=1436869&r2=1436870&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/base/config.xml (original)
+++ wookie/trunk/widgets/templates/base/config.xml Tue Jan 22 12:35:21 2013
@@ -15,7 +15,7 @@
limitations under the License.
%>
<widget xmlns="http://www.w3.org/ns/widgets"
- id="http://wookie.apache.org/widgets/${widget.shortname}"
+ id="${widget.id}"
version="0.1"
width="320"
height="480"
Modified: wookie/trunk/widgets/templates/base/default.widget.properties
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/base/default.widget.properties?rev=1436870&r1=1436869&r2=1436870&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/base/default.widget.properties (original)
+++ wookie/trunk/widgets/templates/base/default.widget.properties Tue Jan 22
12:35:21 2013
@@ -3,4 +3,5 @@
# display the home page, smaller or equal to these will display the
# tile page
widget.tile.max.height=310
-widget.tile.max.width=310
\ No newline at end of file
+widget.tile.max.width=310
+widget.id=http://www.apache.org/widgets/CHANGEME-base
\ No newline at end of file
Modified: wookie/trunk/widgets/templates/browse/default.widget.properties
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/browse/default.widget.properties?rev=1436870&r1=1436869&r2=1436870&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/browse/default.widget.properties (original)
+++ wookie/trunk/widgets/templates/browse/default.widget.properties Tue Jan 22
12:35:21 2013
@@ -1,52 +1,53 @@
-# The URL from which to retrieve data for the browse index
-#
-# type: string
-# variables: sort = the sort term for APIs that support it
-# order = the sort order for APIs that support it
-browse.index.url="http://localhost:8080/wookie/widgets?all=true"
-
-browse.format="xml"
-
-#
-# The template string to use for the collection of items to browse. This is
used to hold
-# the set of items to display.
-#
-# type: string
-#
-browse.collection.template = "<div id='results'
data-role='collapsible-set'>${ITEMS}</div>"
-
-#
-# The name of the XML element that represents a single item
-# type: string
-#
-browse.item.name = "widget"
-
-#
-# The names of the elements to map into the template placeholders. E.g. if it
contains "title", then $TITLE in the template
-# would be replaced by the content of the <title> element in the XML data
-#
-browse.item.elements = "description,title"
-
-#
-# The names of the attributes to map into the template placeholders. E.g. if
it contains "id", then $ID in the template
-# would be replaced by the content of the id attribute of the item XML element
in the XML data
-#
-browse.item.attributes = "id"
-
-# The URL from which to retrieve search data
-#
-# type: string
-# variables: query = query string entered into the search form
-# sort = the sort term for APIs that support it
-# order = the sort order for APIs that support it
-browse.search.url=
-
-# Default sort parameter for APIs that support sorting of the results
-browse.sort=updated
-
-# The URL from which to retrieve detailed
-# information about an item
-#
-# type: string
-# variables: itemId is the ID of the item to display
+widget.id=http://www.apache.org/widgets/CHANGEME-browse
+# The URL from which to retrieve data for the browse index
+#
+# type: string
+# variables: sort = the sort term for APIs that support it
+# order = the sort order for APIs that support it
+browse.index.url="http://localhost:8080/wookie/widgets?all=true"
+
+browse.format="xml"
+
+#
+# The template string to use for the collection of items to browse. This is
used to hold
+# the set of items to display.
+#
+# type: string
+#
+browse.collection.template = "<div id='results'
data-role='collapsible-set'>${ITEMS}</div>"
+
+#
+# The name of the XML element that represents a single item
+# type: string
+#
+browse.item.name = "widget"
+
+#
+# The names of the elements to map into the template placeholders. E.g. if it
contains "title", then $TITLE in the template
+# would be replaced by the content of the <title> element in the XML data
+#
+browse.item.elements = "description,title"
+
+#
+# The names of the attributes to map into the template placeholders. E.g. if
it contains "id", then $ID in the template
+# would be replaced by the content of the id attribute of the item XML element
in the XML data
+#
+browse.item.attributes = "id"
+
+# The URL from which to retrieve search data
+#
+# type: string
+# variables: query = query string entered into the search form
+# sort = the sort term for APIs that support it
+# order = the sort order for APIs that support it
+browse.search.url=
+
+# Default sort parameter for APIs that support sorting of the results
+browse.sort=updated
+
+# The URL from which to retrieve detailed
+# information about an item
+#
+# type: string
+# variables: itemId is the ID of the item to display
browse.get.detail.url="http://localhost:8080/wookie/widgets/" + itemId
\ No newline at end of file
Modified: wookie/trunk/widgets/templates/composite/default.widget.properties
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/composite/default.widget.properties?rev=1436870&r1=1436869&r2=1436870&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/composite/default.widget.properties
(original)
+++ wookie/trunk/widgets/templates/composite/default.widget.properties Tue Jan
22 12:35:21 2013
@@ -1,11 +1,13 @@
-composite.wookie.domain=localhost
-composite.wookie.port=8080
-composite.wookie.path=wookie/
-
-composite.wookie.apikey=TEST
-composite.wookie.userid=testsuer
-composite.wookie.shareddatakey=mysharedkey
-
-# Array of widget ids to be included in the composite widget.
-composite.widgets=["http://wookie.apache.org/widgets/BrowseTestWidget",
"http://wookie.apache.org/widgets/ItemDetailTestWidget"]
-
+widget.id=http://www.apache.org/widgets/CHANGEME-composite
+
+composite.wookie.domain=localhost
+composite.wookie.port=8080
+composite.wookie.path=wookie/
+
+composite.wookie.apikey=TEST
+composite.wookie.userid=testsuer
+composite.wookie.shareddatakey=mysharedkey
+
+# Array of widget ids to be included in the composite widget.
+composite.widgets=["http://wookie.apache.org/widgets/BrowseTestWidget",
"http://wookie.apache.org/widgets/ItemDetailTestWidget"]
+
Modified: wookie/trunk/widgets/templates/default.widget.properties
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/default.widget.properties?rev=1436870&r1=1436869&r2=1436870&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/default.widget.properties (original)
+++ wookie/trunk/widgets/templates/default.widget.properties Tue Jan 22
12:35:21 2013
@@ -2,6 +2,7 @@ template.name=base
widget.shortname=BaseTemplateWidget
widget.name=Base Widget
widget.description=A simple widget that is derived from the base template and
nothing more.
+widget.id=http://wookie.apache.org/widgets/CHANGEME
widget.help=<p>There is nothing much to do here, so little need of help.</p>
widget.icon.src=images/icon.png
Modified: wookie/trunk/widgets/templates/itemDetail/default.widget.properties
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/itemDetail/default.widget.properties?rev=1436870&r1=1436869&r2=1436870&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/itemDetail/default.widget.properties
(original)
+++ wookie/trunk/widgets/templates/itemDetail/default.widget.properties Tue Jan
22 12:35:21 2013
@@ -1,37 +1,39 @@
-# The URL for retrieving the item detals in XML format.
-#
-# Variables: itemId is the id of the item to be displayed
-itemDetail.get.url="http://api.twitter.com/1/statuses/show.xml?id=" + itemId +
"&include_entities=false"
-
-# The initial itemID to use if none has been set.
-# This value can be overwritten by setting
Widget.preferences.getItem("itemId");
-# This value can be overwritten by passing a parameter "itemId" in the request
URL
-# A value passed in the URL will take priority and set the widget preference
value.
-itemDetail.default.itemId=129284508087357440
-
-
-#
-# The template string to use for the collection of items to browse. This is
used to hold
-# the set of items to display.
-#
-# type: string
-#
-browse.collection.template = "<div>${ITEMS}</div>"
-
-#
-# The name of the XML element that represents a single item
-# type: string
-#
-browse.item.name = "status"
-
-#
-# The names of the elements to map into the template placeholders. E.g. if it
contains "title", then $TITLE in the template
-# would be replaced by the content of the <title> element in the XML data
-#
-browse.item.elements =
"name,screen_name,location,description,url,followers_count,listed_count,friends_count,statuses_count,text,profile_image_url,created_at,source"
-
-#
-# The names of the attributes to map into the template placeholders. E.g. if
it contains "id", then $ID in the template
-# would be replaced by the content of the id attribute of the item XML element
in the XML data
-#
+widget.id=http://www.apache.org/widgets/CHANGEME-itemDetail
+
+# The URL for retrieving the item detals in XML format.
+#
+# Variables: itemId is the id of the item to be displayed
+itemDetail.get.url="http://api.twitter.com/1/statuses/show.xml?id=" + itemId +
"&include_entities=false"
+
+# The initial itemID to use if none has been set.
+# This value can be overwritten by setting
Widget.preferences.getItem("itemId");
+# This value can be overwritten by passing a parameter "itemId" in the request
URL
+# A value passed in the URL will take priority and set the widget preference
value.
+itemDetail.default.itemId=129284508087357440
+
+
+#
+# The template string to use for the collection of items to browse. This is
used to hold
+# the set of items to display.
+#
+# type: string
+#
+browse.collection.template = "<div>${ITEMS}</div>"
+
+#
+# The name of the XML element that represents a single item
+# type: string
+#
+browse.item.name = "status"
+
+#
+# The names of the elements to map into the template placeholders. E.g. if it
contains "title", then $TITLE in the template
+# would be replaced by the content of the <title> element in the XML data
+#
+browse.item.elements =
"name,screen_name,location,description,url,followers_count,listed_count,friends_count,statuses_count,text,profile_image_url,created_at,source"
+
+#
+# The names of the attributes to map into the template placeholders. E.g. if
it contains "id", then $ID in the template
+# would be replaced by the content of the id attribute of the item XML element
in the XML data
+#
browse.item.attributes = "id"
\ No newline at end of file
Added: wookie/trunk/widgets/templates/login/default.widget.properties
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/login/default.widget.properties?rev=1436870&view=auto
==============================================================================
--- wookie/trunk/widgets/templates/login/default.widget.properties (added)
+++ wookie/trunk/widgets/templates/login/default.widget.properties Tue Jan 22
12:35:21 2013
@@ -0,0 +1 @@
+widget.id=http://www.apache.org/widgets/CHANGEME-login
\ No newline at end of file
Modified: wookie/trunk/widgets/templates/message/default.widget.properties
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/message/default.widget.properties?rev=1436870&r1=1436869&r2=1436870&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/message/default.widget.properties (original)
+++ wookie/trunk/widgets/templates/message/default.widget.properties Tue Jan 22
12:35:21 2013
@@ -1,3 +1,5 @@
+widget.id=http://www.apache.org/widgets/CHANGEME-message
+
# The URL the message form should be submitted to.
#
# type: string
Modified: wookie/trunk/widgets/templates/readme.txt
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/readme.txt?rev=1436870&r1=1436869&r2=1436870&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/readme.txt (original)
+++ wookie/trunk/widgets/templates/readme.txt Tue Jan 22 12:35:21 2013
@@ -67,6 +67,7 @@ In this example we will create a simple
world (what else would the first widget be?)
* cd WOOKIE_HOME/widgets/templates/widgets
+ * NB if you want to build your widgets elsewhere then see the advanced
topic section below.
* mkdir helloWorld
* create a file called "./widget.properties
* open widget.properties in your favourite editor and add the
@@ -75,6 +76,7 @@ world (what else would the first widget
* widget.shortname=HelloWorld
* widget.name=Hello World
* widget.description=A very friendly widget to demonstrate how easy it is
to build a widget from templates.
+ * widget.id=http://www.apache.org/widgets/HelloWorld
* Create a file called "content_primary.html" and the following content
* <p>Hello World!</p>
Modified: wookie/trunk/widgets/templates/scanning/default.widget.properties
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/scanning/default.widget.properties?rev=1436870&r1=1436869&r2=1436870&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/scanning/default.widget.properties (original)
+++ wookie/trunk/widgets/templates/scanning/default.widget.properties Tue Jan
22 12:35:21 2013
@@ -1,2 +1,4 @@
+widget.id=http://www.apache.org/widgets/CHANGEME-scanning
+
scanning.start=true
scanning.delay=1000
Modified: wookie/trunk/widgets/templates/twoColumn/default.widget.properties
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/twoColumn/default.widget.properties?rev=1436870&r1=1436869&r2=1436870&view=diff
==============================================================================
--- wookie/trunk/widgets/templates/twoColumn/default.widget.properties
(original)
+++ wookie/trunk/widgets/templates/twoColumn/default.widget.properties Tue Jan
22 12:35:21 2013
@@ -1,3 +1,5 @@
+widget.id=http://www.apache.org/widgets/CHANGEME-twoColumn
+
#
# Position of secondary and primary content when there is sufficient
# width to place them side by side. Can be "left" or "right"
Added: wookie/trunk/widgets/templates/walkthrough/default.widget.properties
URL:
http://svn.apache.org/viewvc/wookie/trunk/widgets/templates/walkthrough/default.widget.properties?rev=1436870&view=auto
==============================================================================
--- wookie/trunk/widgets/templates/walkthrough/default.widget.properties (added)
+++ wookie/trunk/widgets/templates/walkthrough/default.widget.properties Tue
Jan 22 12:35:21 2013
@@ -0,0 +1 @@
+widget.id=http://www.apache.org/widgets/CHANGEME-walkthrough
\ No newline at end of file