Author: scottbw
Date: Thu Apr 28 18:56:30 2011
New Revision: 1097572
URL: http://svn.apache.org/viewvc?rev=1097572&view=rev
Log:
Added an "updateLocation" property to IWidget, which is used to store the
location of a widget's update site (see WOOKIE-103).
Modified:
incubator/wookie/trunk/etc/ddl-schema/wookie-schema.xml
incubator/wookie/trunk/src/org/apache/wookie/beans/IWidget.java
incubator/wookie/trunk/src/org/apache/wookie/beans/jcr/impl/WidgetImpl.java
incubator/wookie/trunk/src/org/apache/wookie/beans/jcr/wookie-schema.cnd
incubator/wookie/trunk/src/org/apache/wookie/beans/jpa/impl/WidgetImpl.java
incubator/wookie/trunk/src/org/apache/wookie/helpers/WidgetFactory.java
Modified: incubator/wookie/trunk/etc/ddl-schema/wookie-schema.xml
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/etc/ddl-schema/wookie-schema.xml?rev=1097572&r1=1097571&r2=1097572&view=diff
==============================================================================
--- incubator/wookie/trunk/etc/ddl-schema/wookie-schema.xml (original)
+++ incubator/wookie/trunk/etc/ddl-schema/wookie-schema.xml Thu Apr 28 18:56:30
2011
@@ -27,6 +27,7 @@
<column name="height" type="INTEGER"/>
<column name="width" type="INTEGER"/>
<column name="guid" required="true" size="255" type="VARCHAR"/>
+ <column name="update_location" type="LONGVARCHAR"/>
<column name="widget_author" size="255" type="VARCHAR"/>
<column name="widget_author_email" size="320" type="VARCHAR"/>
<column name="widget_author_href" type="LONGVARCHAR"/>
Modified: incubator/wookie/trunk/src/org/apache/wookie/beans/IWidget.java
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/beans/IWidget.java?rev=1097572&r1=1097571&r2=1097572&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/beans/IWidget.java (original)
+++ incubator/wookie/trunk/src/org/apache/wookie/beans/IWidget.java Thu Apr 28
18:56:30 2011
@@ -37,6 +37,17 @@ public interface IWidget extends ILocali
void setPackagePath(String path);
+ /**
+ * Get widget update location
+ * @return widget update location as a string
+ */
+ String getUpdateLocation();
+
+ /**
+ * Set the widget update location
+ * @param location the location to set
+ */
+ void setUpdateLocation(String location);
/**
* Get widget height.
Modified:
incubator/wookie/trunk/src/org/apache/wookie/beans/jcr/impl/WidgetImpl.java
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/beans/jcr/impl/WidgetImpl.java?rev=1097572&r1=1097571&r2=1097572&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/beans/jcr/impl/WidgetImpl.java
(original)
+++ incubator/wookie/trunk/src/org/apache/wookie/beans/jcr/impl/WidgetImpl.java
Thu Apr 28 18:56:30 2011
@@ -51,6 +51,9 @@ public class WidgetImpl extends Localize
@Field(jcrName="wookie:packagePath")
private String packagePath;
+
+ @Field(jcrName="wookie:updateLocation")
+ private String updateLocation;
@Field(jcrName="wookie:height")
private Integer height;
@@ -148,7 +151,21 @@ public class WidgetImpl extends Localize
return descriptionImpls;
}
- /**
+ /* (non-Javadoc)
+ * @see org.apache.wookie.beans.IWidget#getUpdateLocation()
+ */
+ public String getUpdateLocation() {
+ return this.updateLocation;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.apache.wookie.beans.IWidget#setUpdateLocation(java.lang.String)
+ */
+ public void setUpdateLocation(String location) {
+ this.updateLocation = location;
+ }
+
+ /**
* Set description implementations collection.
*
* @param descriptionImpls description implementations collection
Modified:
incubator/wookie/trunk/src/org/apache/wookie/beans/jcr/wookie-schema.cnd
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/beans/jcr/wookie-schema.cnd?rev=1097572&r1=1097571&r2=1097572&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/beans/jcr/wookie-schema.cnd
(original)
+++ incubator/wookie/trunk/src/org/apache/wookie/beans/jcr/wookie-schema.cnd
Thu Apr 28 18:56:30 2011
@@ -82,6 +82,7 @@
- wookie:height (long)
- wookie:width (long)
- wookie:guid (string) mandatory
+- wookie:updateLocation (string)
- wookie:widgetAuthor (string)
- wookie:widgetAuthorEmail (string)
- wookie:widgetAuthorHref (string)
Modified:
incubator/wookie/trunk/src/org/apache/wookie/beans/jpa/impl/WidgetImpl.java
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/beans/jpa/impl/WidgetImpl.java?rev=1097572&r1=1097571&r2=1097572&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/beans/jpa/impl/WidgetImpl.java
(original)
+++ incubator/wookie/trunk/src/org/apache/wookie/beans/jpa/impl/WidgetImpl.java
Thu Apr 28 18:56:30 2011
@@ -83,6 +83,10 @@ public class WidgetImpl extends Localize
@ElementDependent
private Collection<WidgetTypeImpl> widgetTypes;
+ @Basic
+ @Column(name="update_location")
+ private String updateLocation;
+
@Basic(optional=false)
@Column(name="guid", nullable=false)
private String guid;
@@ -159,6 +163,20 @@ public class WidgetImpl extends Localize
}
/* (non-Javadoc)
+ * @see org.apache.wookie.beans.IWidget#getUpdateLocation()
+ */
+ public String getUpdateLocation() {
+ return this.updateLocation;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.apache.wookie.beans.IWidget#setUpdateLocation(java.lang.String)
+ */
+ public void setUpdateLocation(String location) {
+ this.updateLocation = location;
+ }
+
+ /* (non-Javadoc)
* @see org.apache.wookie.beans.IWidget#getFeatures()
*/
public Collection<IFeature> getFeatures()
Modified:
incubator/wookie/trunk/src/org/apache/wookie/helpers/WidgetFactory.java
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/helpers/WidgetFactory.java?rev=1097572&r1=1097571&r2=1097572&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/helpers/WidgetFactory.java
(original)
+++ incubator/wookie/trunk/src/org/apache/wookie/helpers/WidgetFactory.java Thu
Apr 28 18:56:30 2011
@@ -131,6 +131,7 @@ public class WidgetFactory {
widget.setHeight(model.getHeight());
widget.setWidth(model.getWidth());
widget.setVersion(model.getVersion());
+ widget.setUpdateLocation(model.getUpdate());
return widget;
}
@@ -318,6 +319,7 @@ public class WidgetFactory {
widget.setHeight(model.getHeight());
widget.setWidth(model.getWidth());
widget.setVersion(model.getVersion());
+ widget.setUpdateLocation(model.getUpdate());
// Clear old values
widget.setStartFiles(null);