You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2010/06/16 16:16:40 UTC
svn commit: r955236 [3/10] - in
/incubator/wookie/branches/pluggablepersistence: ./ WebContent/WEB-INF/
WebContent/admin/ WebContent/webmenu/ ant/ etc/ddl-schema/ etc/tomcat/
etc/tomcat/conf/ parser/java/src/org/apache/wookie/w3c/util/ scripts/
scripts...
Modified: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java?rev=955236&r1=955235&r2=955236&view=diff
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java (original)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java Wed Jun 16 14:16:36 2010
@@ -24,10 +24,12 @@ import javax.servlet.http.HttpServletReq
import org.apache.log4j.Logger;
import org.apache.wookie.Messages;
import org.apache.wookie.ajaxmodel.IWidgetAPI;
-import org.apache.wookie.beans.Preference;
-import org.apache.wookie.beans.SharedData;
-import org.apache.wookie.beans.Widget;
-import org.apache.wookie.beans.WidgetInstance;
+import org.apache.wookie.beans.IPreference;
+import org.apache.wookie.beans.ISharedData;
+import org.apache.wookie.beans.IWidget;
+import org.apache.wookie.beans.IWidgetInstance;
+import org.apache.wookie.beans.util.IPersistenceManager;
+import org.apache.wookie.beans.util.PersistenceManagerFactory;
import org.apache.wookie.controller.PropertiesController;
import org.apache.wookie.controller.WidgetInstancesController;
import org.apache.wookie.helpers.Notifier;
@@ -65,14 +67,15 @@ public class WidgetAPIImpl implements IW
/* (non-Javadoc)
* @see org.apache.wookie.ajaxmodel.IWidgetAPI#preferences2(java.lang.String)
*/
- public List<Preference> preferences(String id_key) {
- ArrayList<Preference> prefs = new ArrayList<Preference>();
+ public List<IPreference> preferences(String id_key) {
+ ArrayList<IPreference> prefs = new ArrayList<IPreference>();
if(id_key == null) return prefs;
// check if instance is valid
- WidgetInstance widgetInstance = WidgetInstance.findByIdKey(id_key);
+ IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
+ IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if(widgetInstance==null) return prefs;
- for(Preference preference : Preference.findPreferencesForInstance(widgetInstance)){
- prefs.add(preference);
+ for(IPreference preference : widgetInstance.getPreferences()){
+ prefs.add(new PreferenceDelegate(preference));
}
return prefs;
}
@@ -85,10 +88,11 @@ public class WidgetAPIImpl implements IW
if(id_key == null) return map;
// check if instance is valid
- WidgetInstance widgetInstance = WidgetInstance.findByIdKey(id_key);
+ IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
+ IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if(widgetInstance==null) return map;
// Add in metadata
- Widget widget = widgetInstance.getWidget();
+ IWidget widget = widgetInstance.getWidget();
map.put("id", String.valueOf(widget.getGuid())); //$NON-NLS-1$
map.put("author", String.valueOf(widget.getWidgetAuthor())); //$NON-NLS-1$
map.put("authorEmail", String.valueOf(widget.getWidgetAuthorEmail()));//$NON-NLS-1$
@@ -112,10 +116,11 @@ public class WidgetAPIImpl implements IW
if(id_key == null) return localizedMessages.getString("WidgetAPIImpl.0");
if(key == null)return localizedMessages.getString("WidgetAPIImpl.1");
// check if instance is valid
- WidgetInstance widgetInstance = WidgetInstance.findByIdKey(id_key);
+ IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
+ IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if (widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
//
- Preference preference = Preference.findPreferenceForInstance(widgetInstance, key);
+ IPreference preference = widgetInstance.getPreference(key);
if (preference == null) return localizedMessages.getString("WidgetAPIImpl.1");
return preference.getDvalue();
}
@@ -129,11 +134,12 @@ public class WidgetAPIImpl implements IW
Messages localizedMessages = LocaleHandler.localizeMessages(request);
if(id_key==null) return localizedMessages.getString("WidgetAPIImpl.0");
if(key==null) return localizedMessages.getString("WidgetAPIImpl.1");
- WidgetInstance widgetInstance = WidgetInstance.findByIdKey(id_key);
+ IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
+ IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if (widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
- SharedData data = SharedData.findSharedDataForInstance(widgetInstance, key);
+ ISharedData data = widgetInstance.getSharedData(key);
if (data == null) return localizedMessages.getString("WidgetAPIImpl.1");
- return SharedData.findSharedDataForInstance(widgetInstance, key).getDvalue();
+ return data.getDvalue();
}
/*
@@ -143,7 +149,8 @@ public class WidgetAPIImpl implements IW
public String setPreferenceForKey(String id_key, String key, String value) {
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
Messages localizedMessages = LocaleHandler.localizeMessages(request);
- WidgetInstance widgetInstance = WidgetInstance.findByIdKey(id_key);
+ IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
+ IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if (widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
//
PropertiesController.updatePreference(widgetInstance, key, value);
@@ -157,7 +164,8 @@ public class WidgetAPIImpl implements IW
public String setSharedDataForKey(String id_key, String key, String value) {
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
Messages localizedMessages = LocaleHandler.localizeMessages(request);
- WidgetInstance widgetInstance = WidgetInstance.findByIdKey(id_key);
+ IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
+ IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if(widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
if(widgetInstance.isLocked()) return localizedMessages.getString("WidgetAPIImpl.2");
//
@@ -173,7 +181,8 @@ public class WidgetAPIImpl implements IW
public String appendSharedDataForKey(String id_key, String key, String value) {
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
Messages localizedMessages = LocaleHandler.localizeMessages(request);
- WidgetInstance widgetInstance = WidgetInstance.findByIdKey(id_key);
+ IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
+ IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if(widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
if(widgetInstance.isLocked()) return localizedMessages.getString("WidgetAPIImpl.2");
//
@@ -189,7 +198,8 @@ public class WidgetAPIImpl implements IW
public String lock(String id_key) {
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
Messages localizedMessages = LocaleHandler.localizeMessages(request);
- WidgetInstance widgetInstance = WidgetInstance.findByIdKey(id_key);
+ IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
+ IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if(widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
//
String sharedDataKey = widgetInstance.getSharedDataKey();
@@ -205,7 +215,8 @@ public class WidgetAPIImpl implements IW
public String unlock(String id_key) {
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
Messages localizedMessages = LocaleHandler.localizeMessages(request);
- WidgetInstance widgetInstance = WidgetInstance.findByIdKey(id_key);
+ IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
+ IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if(widgetInstance==null) return localizedMessages.getString("WidgetAPIImpl.0");
//
String sharedDataKey = widgetInstance.getSharedDataKey();
@@ -221,7 +232,8 @@ public class WidgetAPIImpl implements IW
public String hide(String id_key){
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
Messages localizedMessages = LocaleHandler.localizeMessages(request);
- WidgetInstance widgetInstance = WidgetInstance.findByIdKey(id_key);
+ IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
+ IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if (widgetInstance == null) return localizedMessages.getString("WidgetAPIImpl.0");
//
Notifier.callSiblings(widgetInstance,"window.onHide()");//$NON-NLS-1$
@@ -235,7 +247,8 @@ public class WidgetAPIImpl implements IW
public String show(String id_key){
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
Messages localizedMessages = LocaleHandler.localizeMessages(request);
- WidgetInstance widgetInstance = WidgetInstance.findByIdKey(id_key);
+ IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
+ IWidgetInstance widgetInstance = persistenceManager.findWidgetInstanceByIdKey(id_key);
if(widgetInstance==null) return localizedMessages.getString("WidgetAPIImpl.0");
Notifier.callSiblings(widgetInstance,"window.onShow()"); //$NON-NLS-1$
return "okay"; //$NON-NLS-1$
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IAccessRequest.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IAccessRequest.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IAccessRequest.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IAccessRequest.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,155 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * IAccessRequest - access request control for a particular widget.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IAccessRequest extends IBean
+{
+ /**
+ * Get widget access granted flag.
+ *
+ * @return access granted flag
+ */
+ boolean isGranted();
+
+ /**
+ * Set widget access granted flag.
+ *
+ * @param granted access granted flag
+ */
+ void setGranted(boolean granted);
+
+ /**
+ * Get widget access origin.
+ *
+ * @return access origin
+ */
+ String getOrigin();
+
+ /**
+ * Set widget access origin.
+ *
+ * @param origin access origin
+ */
+ void setOrigin(String origin);
+
+ /**
+ * Get widget access subdomains flag.
+ *
+ * @return access subdomains flag
+ */
+ boolean isSubdomains();
+
+ /**
+ * Set widget access subdomains flag.
+ *
+ * @param subdomains access subdomains flag
+ */
+ void setSubdomains(boolean subdomains);
+
+ /**
+ * Get default widget instance.
+ *
+ * @return widget instance
+ */
+ IWidget getWidget();
+
+ /**
+ * Set default widget instance.
+ *
+ * @param widget widget instance
+ */
+ void setWidget(IWidget widget);
+
+ /**
+ * Implementation of the W3C WARP algorithm for a single access request.
+ *
+ * @param requestedUri the URI requested
+ * @return true if this access request grants access, otherwise false
+ */
+ boolean isAllowed(URI requestedUri);
+
+ /**
+ * Shared implementation utilities.
+ */
+ public static class Utilities
+ {
+ /**
+ * Implementation of the W3C WARP algorithm for a single access request.
+ *
+ * @param requestedUri the URI requested
+ * @return true if this access request grants access, otherwise false
+ */
+ public static boolean isAllowed(IAccessRequest accessRequest, URI requestedUri)
+ {
+ // check origin wildcard
+ String origin = accessRequest.getOrigin();
+ if (origin.equals("*"))
+ {
+ return true;
+ }
+ // origins other than "*" MUST be valid URIs
+ URI accessUri = null;
+ try
+ {
+ accessUri = new URI(origin);
+ }
+ catch (URISyntaxException e)
+ {
+ return false;
+ }
+ // schemes must match
+ if (!accessUri.getScheme().equalsIgnoreCase(requestedUri.getScheme()))
+ {
+ return false;
+ }
+ // check host/subdomain
+ boolean subdomains = accessRequest.isSubdomains();
+ if (subdomains)
+ {
+ // host must match or match with subdomains
+ if (!accessUri.getHost().equalsIgnoreCase(requestedUri.getHost()) &&
+ !requestedUri.getHost().endsWith("."+accessUri.getHost()))
+ {
+ return false;
+ }
+ }
+ else
+ {
+ // hosts must match
+ if (!accessUri.getHost().equalsIgnoreCase(requestedUri.getHost()))
+ {
+ return false;
+ }
+ }
+ // ports must match
+ if (accessUri.getPort()==requestedUri.getPort())
+ {
+ return true;
+ }
+ // no match
+ return false;
+ }
+ }
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IApiKey.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IApiKey.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IApiKey.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IApiKey.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,53 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IApiKey - an API key.
+ *
+ * @author Scott Wilson
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IApiKey extends IBean
+{
+ /**
+ * Get API key value.
+ *
+ * @return key value
+ */
+ String getValue();
+
+ /**
+ * Set API key value.
+ *
+ * @param value key value
+ */
+ void setValue(String value);
+
+ /**
+ * Get API key email address.
+ *
+ * @return email address
+ */
+ String getEmail();
+
+ /**
+ * Set API key email address.
+ *
+ * @param email email address
+ */
+ void setEmail(String email);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IBean.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IBean.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IBean.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IBean.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,31 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IBean - base bean with basic opaque id key functionality.
+ *
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IBean
+{
+ /**
+ * Get persistent opaque id key.
+ *
+ * @return id key object
+ */
+ Object getId();
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IDescription.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IDescription.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IDescription.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IDescription.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,39 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IDescription - a widget description.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IDescription extends ILocalizedBean
+{
+ /**
+ * Get widget description content.
+ *
+ * @return content
+ */
+ String getContent();
+
+ /**
+ * Set widget description content.
+ *
+ * @param text content
+ */
+ void setContent(String text);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IFeature.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IFeature.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IFeature.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IFeature.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,69 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+import java.util.Collection;
+
+/**
+ * IFeature - a widget feature found in the config.xml.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IFeature
+{
+ /**
+ * Get widget feature name.
+ *
+ * @return feature name
+ */
+ String getFeatureName();
+
+ /**
+ * Set widget feature name.
+ *
+ * @param featureName feature name
+ */
+ void setFeatureName(String featureName);
+
+ /**
+ * Get widget feature required flag.
+ *
+ * @return required flag
+ */
+ boolean isRequired();
+
+ /**
+ * Set widget feature required flag.
+ *
+ * @param required required flag
+ */
+ void setRequired(boolean required);
+
+ /**
+ * Get collection of widget feature parameters.
+ *
+ * @return parameters collection
+ */
+ Collection<IParam> getParameters();
+
+ /**
+ * Set collection of widget feature parameters.
+ *
+ * @param parameters parameters collection
+ */
+ void setParameters(Collection<IParam> parameters);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/ILicense.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/ILicense.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/ILicense.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/ILicense.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,53 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * ILicense - a widget license.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface ILicense extends ILocalizedBean
+{
+ /**
+ * Get widget license text.
+ *
+ * @return license text
+ */
+ String getText();
+
+ /**
+ * Set widget license text.
+ *
+ * @param text license text
+ */
+ void setText(String text);
+
+ /**
+ * Get widget license href URL.
+ *
+ * @return href URL
+ */
+ String getHref();
+
+ /**
+ * Set widget license href URL.
+ *
+ * @param href href URL
+ */
+ void setHref(String href);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/ILocalizedBean.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/ILocalizedBean.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/ILocalizedBean.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/ILocalizedBean.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,49 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+import org.apache.wookie.w3c.ILocalizedElement;
+
+/**
+ * ILocalizedKeyBean - key bean with localized language and text direction.
+ *
+ * Text direction conforms to http://www.w3.org/TR/2007/REC-its-20070403/
+ *
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface ILocalizedBean extends ILocalizedElement
+{
+ /**
+ * Set localized language.
+ *
+ * @param lang name language
+ */
+ void setLang(String lang);
+
+ /**
+ * Get localized text direction.
+ *
+ * @return name text direction
+ */
+ String getDir();
+
+ /**
+ * Set localized text direction.
+ *
+ * @param dir name text direction
+ */
+ void setDir(String dir);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IName.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IName.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IName.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IName.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,53 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IName - a widget name.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IName extends ILocalizedBean
+{
+ /**
+ * Get widget short name.
+ *
+ * @return short name
+ */
+ String getShortName();
+
+ /**
+ * Set widget short name.
+ *
+ * @param shortName short name
+ */
+ void setShortName(String shortName);
+
+ /**
+ * Get widget name.
+ *
+ * @return name
+ */
+ String getName();
+
+ /**
+ * Set widget name.
+ *
+ * @param name name
+ */
+ void setName(String name);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IParam.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IParam.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IParam.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IParam.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,53 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IParam - a widget feature parameter found in the config.xml.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IParam
+{
+ /**
+ * Get widget feature parameter name.
+ *
+ * @return parameter name
+ */
+ String getParameterName();
+
+ /**
+ * Set widget feature parameter name.
+ *
+ * @return parameterName parameter name
+ */
+ void setParameterName(String parameterName);
+
+ /**
+ * Get widget feature parameter value.
+ *
+ * @return parameter value
+ */
+ String getParameterValue();
+
+ /**
+ * Set widget feature parameter value.
+ *
+ * @return parameterValue parameter value
+ */
+ void setParameterValue(String parameterValue);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IParticipant.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IParticipant.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IParticipant.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IParticipant.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,95 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IParticipant - a participant entity.
+ *
+ * @author Scott Wilson
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IParticipant extends IBean
+{
+ /**
+ * Get widget shared data key.
+ *
+ * @return data key
+ */
+ String getSharedDataKey();
+
+ /**
+ * Set widget shared data key.
+ *
+ * @param sharedDataKey data key
+ */
+ void setSharedDataKey(String sharedDataKey);
+
+ /**
+ * Get owning widget instance.
+ *
+ * @return widget instance
+ */
+ IWidget getWidget();
+
+ /**
+ * Set owning widget instance.
+ *
+ * @param widget widget instance
+ */
+ void setWidget(IWidget widget);
+
+ /**
+ * Get participant id.
+ *
+ * @return participant id
+ */
+ String getParticipantId();
+
+ /**
+ * Set participant id.
+ *
+ * @param participantId participant id
+ */
+ void setParticipantId(String participantId);
+
+ /**
+ * Get participant display name.
+ *
+ * @return participant display name
+ */
+ String getParticipantDisplayName();
+
+ /**
+ * Set participant display name.
+ *
+ * @param participantDisplayName participant display name
+ */
+ void setParticipantDisplayName(String participantDisplayName);
+
+ /**
+ * Get participant thumbnail URL.
+ *
+ * @return participant thumbnail URL
+ */
+ String getParticipantThumbnailUrl();
+
+ /**
+ * Set participant thumbnail URL.
+ *
+ * @param participantThumbnailUrl participant thumbnail URL
+ */
+ void setParticipantThumbnailUrl(String participantThumbnailUrl);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IPost.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IPost.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IPost.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IPost.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,105 @@
+package org.apache.wookie.beans;
+
+import java.util.Collection;
+import java.util.Date;
+
+public interface IPost extends IBean
+{
+ /**
+ * Get widget shared data key.
+ *
+ * @return data key
+ */
+ String getSharedDataKey();
+
+ /**
+ * Set widget shared data key.
+ *
+ * @param sharedDataKey data key
+ */
+ void setSharedDataKey(String sharedDataKey);
+
+ /**
+ * Get widget instance user id.
+ *
+ * @return user id
+ */
+ String getUserId();
+
+ /**
+ * Set widget instance user id.
+ *
+ * @param userId user id
+ */
+ void setUserId(String userId);
+
+ /**
+ * Get collection of child posts.
+ *
+ * @return posts collection
+ */
+ Collection<IPost> getPosts();
+
+ /**
+ * Set collection of child posts.
+ *
+ * @param posts collection
+ */
+ void setPosts(Collection<IPost> posts);
+
+ /**
+ * Get post content string.
+ *
+ * @return content string
+ */
+ String getContent();
+
+ /**
+ * Set post content string.
+ *
+ * @param content content string
+ */
+ void setContent(String content);
+
+ /**
+ * Get post title.
+ *
+ * @return title
+ */
+ String getTitle();
+
+ /**
+ * Set post title
+ *
+ * @param title title
+ */
+ void setTitle(String title);
+
+ /**
+ * Get post publish date.
+ *
+ * @return publish date
+ */
+ Date getPublishDate();
+
+ /**
+ * Set post publish date.
+ *
+ * @param publishDate publish date
+ */
+ void setPublishDate(Date publishDate);
+
+ /**
+ * Get post update date.
+ *
+ * @return update date
+ */
+ Date getUpdateDate();
+
+ /**
+ * Set post update date.
+ *
+ * @param updateDate update date
+ */
+ void setUpdateDate(Date updateDate);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IPreference.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IPreference.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IPreference.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IPreference.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,67 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IPreference - a widget instance preference entity.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IPreference
+{
+ /**
+ * Get widget instance preference value key.
+ *
+ * @return value key
+ */
+ String getDkey();
+
+ /**
+ * Set widget instance preference value key.
+ *
+ * @param dkey value key
+ */
+ void setDkey(String dkey);
+
+ /**
+ * Get widget instance preference value.
+ *
+ * @return value
+ */
+ String getDvalue();
+
+ /**
+ * Set widget instance preference value.
+ *
+ * @param dvalue value
+ */
+ void setDvalue(String dvalue);
+
+ /**
+ * Get widget instance preference read only flag.
+ *
+ * @return read only flag
+ */
+ boolean isReadOnly();
+
+ /**
+ * Set widget instance preference read only flag.
+ *
+ * @param readOnly read only flag
+ */
+ void setReadOnly(boolean readOnly);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IPreferenceDefault.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IPreferenceDefault.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IPreferenceDefault.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IPreferenceDefault.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,67 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IStartFile - a localized start page for a widget.
+ *
+ * @author Scott Wilson
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IPreferenceDefault
+{
+ /**
+ * Get widget preference name.
+ *
+ * @return preference name
+ */
+ String getPreference();
+
+ /**
+ * Set widget preference name.
+ *
+ * @param preference preference name
+ */
+ void setPreference(String preference);
+
+ /**
+ * Get widget preference value.
+ *
+ * @return preference value
+ */
+ String getValue();
+
+ /**
+ * Set widget preference value.
+ *
+ * @param value preference value
+ */
+ void setValue(String value);
+
+ /**
+ * Get widget preference read only flag.
+ *
+ * @return read only flag
+ */
+ boolean isReadOnly();
+
+ /**
+ * Set widget preference read only flag.
+ *
+ * @param readOnly read only flag
+ */
+ void setReadOnly(boolean readOnly);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IServerFeature.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IServerFeature.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IServerFeature.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IServerFeature.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,57 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IServerFeature - an installed widget feature.
+ *
+ * This interface models ALREADY installed features, such as polling for example
+ * NOTE: The config.xml file can also define other features, which may
+ * or may not be supported. These types are modeled in the "IFeature" interface.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IServerFeature extends IBean
+{
+ /**
+ * Get server installed widget feature name.
+ *
+ * @return feature name
+ */
+ String getFeatureName();
+
+ /**
+ * Set server installed widget feature name.
+ *
+ * @param featureName feature name
+ */
+ void setFeatureName(String featureName);
+
+ /**
+ * Get server installed widget feature class name.
+ *
+ * @return class name
+ */
+ String getClassName();
+
+ /**
+ * Set server installed widget feature class name.
+ *
+ * @param className class name
+ */
+ void setClassName(String className);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/ISharedData.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/ISharedData.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/ISharedData.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/ISharedData.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,67 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * ISharedData - a shared data entity.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface ISharedData
+{
+ /**
+ * Get widget shared data value key.
+ *
+ * @return value key
+ */
+ String getDkey();
+
+ /**
+ * Set widget shared data value key.
+ *
+ * @param dkey value key
+ */
+ void setDkey(String dkey);
+
+ /**
+ * Get widget shared data value.
+ *
+ * @return value
+ */
+ String getDvalue();
+
+ /**
+ * Set widget shared data value.
+ *
+ * @param dvalue value
+ */
+ void setDvalue(String dvalue);
+
+ /**
+ * Get widget shared data key.
+ *
+ * @return data key
+ */
+ String getSharedDataKey();
+
+ /**
+ * Set widget shared data key.
+ *
+ * @param sharedDataKey data key
+ */
+ void setSharedDataKey(String sharedDataKey);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IStartFile.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IStartFile.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IStartFile.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IStartFile.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,62 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+import org.apache.wookie.w3c.ILocalizedElement;
+
+/**
+ * IStartFile - a localized start page for a widget.
+ *
+ * @author Scott Wilson
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IStartFile extends ILocalizedElement
+{
+ /**
+ * Get widget start file URL.
+ *
+ * @return start file URL
+ */
+ String getUrl();
+
+ /**
+ * Set widget start file URL.
+ *
+ * @param url start file URL
+ */
+ void setUrl(String url);
+
+ /**
+ * Get widget start file character set.
+ *
+ * @return character set
+ */
+ String getCharset();
+
+ /**
+ * Set widget start file character set.
+ *
+ * @param charset character set
+ */
+ void setCharset(String charset);
+
+ /**
+ * Set widget start file language.
+ *
+ * @param lang file language
+ */
+ void setLang(String lang);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IToken.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IToken.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IToken.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IToken.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,109 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IToken - a widget instance token.
+ *
+ * @author Scott Wilson
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IToken
+{
+ /**
+ * Get widget instance token request URL.
+ *
+ * @return request URL
+ */
+ String getRequestUrl();
+
+ /**
+ * Set widget instance token request URL.
+ *
+ * @param requestUrl request URL
+ */
+ void setRequestUrl(String requestUrl);
+
+ /**
+ * Get widget instance token access URL.
+ *
+ * @return access URL
+ */
+ String getAccessUrl();
+
+ /**
+ * Set widget instance token access URL.
+ *
+ * @param accessUrl access URL
+ */
+ void setAccessUrl(String accessUrl);
+
+ /**
+ * Get widget instance token authorization URL.
+ *
+ * @return authorization URL
+ */
+ String getAuthzUrl();
+
+ /**
+ * Set widget instance token authorization URL.
+ *
+ * @param authzUrl authorization URL
+ */
+ void setAuthzUrl(String authzUrl);
+
+ /**
+ * Get widget instance token request token.
+ *
+ * @return request token
+ */
+ String getRequestToken();
+
+ /**
+ * Set widget instance token request token.
+ *
+ * @param requestToken request token
+ */
+ void setRequestToken(String requestToken);
+
+ /**
+ * Get widget instance token access token.
+ *
+ * @return access token
+ */
+ String getAccessToken();
+
+ /**
+ * Set widget instance token access token.
+ *
+ * @param accessToken access token
+ */
+ void setAccessToken(String accessToken);
+
+ /**
+ * Get widget instance token token secret.
+ *
+ * @return token secret
+ */
+ String getTokenSecret();
+
+ /**
+ * Set widget instance token token secret.
+ *
+ * @param tokenSecret token secret
+ */
+ void setTokenSecret(String tokenSecret);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWhitelist.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWhitelist.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWhitelist.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWhitelist.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,39 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IWhitelist - a whitelist entity.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IWhitelist extends IBean
+{
+ /**
+ * Get whitelist URL.
+ *
+ * @return whitelist URL
+ */
+ String getfUrl();
+
+ /**
+ * Set whitelist URL.
+ *
+ * @param url whitelist URL
+ */
+ void setfUrl(String url);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidget.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidget.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidget.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidget.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,431 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.wookie.w3c.IW3CXMLConfiguration;
+import org.apache.wookie.w3c.util.LocalizationUtils;
+
+/**
+ * IWidget - a simple bean to model a widgets attributes.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IWidget extends IBean
+{
+ /**
+ * Get widget height.
+ *
+ * @return widget height
+ */
+ Integer getHeight();
+
+ /**
+ * Set widget height.
+ *
+ * @param height widget height
+ */
+ void setHeight(Integer height);
+
+ /**
+ * Get widget width.
+ *
+ * @return widget width
+ */
+ Integer getWidth();
+
+ /**
+ * Set widget width.
+ *
+ * @param width widget width
+ */
+ void setWidth(Integer width);
+
+ /**
+ * Get collection of widget types for this widget.
+ *
+ * @return widget types collection
+ */
+ Collection<IWidgetType> getWidgetTypes();
+
+ /**
+ * Set collection of widget types for this widget.
+ *
+ * @param widgetTypes widget types collection
+ */
+ void setWidgetTypes(Collection<IWidgetType> widgetTypes);
+
+ /**
+ * Get widget GUID.
+ *
+ * @return widget GUID
+ */
+ String getGuid();
+
+ /**
+ * Set widget GUID.
+ *
+ * @param guid widget GUID
+ */
+ void setGuid(String guid);
+
+ /**
+ * Get widget author.
+ *
+ * @return widget author
+ */
+ String getWidgetAuthor();
+
+ /**
+ * Set widget author.
+ *
+ * @param widgetAuthor widget author
+ */
+ void setWidgetAuthor(String widgetAuthor);
+
+ /**
+ * Get widget author email address.
+ *
+ * @return widget author email
+ */
+ String getWidgetAuthorEmail();
+
+ /**
+ * Set widget author email address.
+ *
+ * @param widgetAuthorEmail widget author email
+ */
+ void setWidgetAuthorEmail(String widgetAuthorEmail);
+
+ /**
+ * Get widget author web page href URL.
+ *
+ * @return widget author href
+ */
+ String getWidgetAuthorHref();
+
+ /**
+ * Set widget author web page href URL.
+ *
+ * @param widgetAuthorHref widget author href
+ */
+ void setWidgetAuthorHref(String widgetAuthorHref);
+
+ /**
+ * Get widget version number.
+ *
+ * @return widget version
+ */
+ String getVersion();
+
+ /**
+ * Set widget version number.
+ *
+ * @param version widget version
+ */
+ void setVersion(String version);
+
+ /**
+ * Get collection of features for this widget.
+ *
+ * @return features collection
+ */
+ Collection<IFeature> getFeatures();
+
+ /**
+ * Set collection of features for this widget.
+ *
+ * @param features features collection
+ */
+ void setFeatures(Collection<IFeature> features);
+
+ /**
+ * Get collection of widget icons for this widget.
+ *
+ * @return widget icons collection
+ */
+ Collection<IWidgetIcon> getWidgetIcons();
+
+ /**
+ * Set collection of widget icons for this widget.
+ *
+ * @param widgetIcons widget icons collection
+ */
+ void setWidgetIcons(Collection<IWidgetIcon> widgetIcons);
+
+ /**
+ * Get collection of licenses for this widget.
+ *
+ * @return licenses collection
+ */
+ Collection<ILicense> getLicenses();
+
+ /**
+ * Set collection of licenses for this widget.
+ *
+ * @param licenses licenses collection
+ */
+ void setLicenses(Collection<ILicense> licenses);
+
+ /**
+ * Get collection of names for this widget.
+ *
+ * @return names collection
+ */
+ Collection<IName> getNames();
+
+ /**
+ * Set collection of names for this widget.
+ *
+ * @param names names collection
+ */
+ void setNames(Collection<IName> names);
+
+ /**
+ * Get collection of descriptions for this widget.
+ *
+ * @return descriptions collection
+ */
+ Collection<IDescription> getDescriptions();
+
+ /**
+ * Set collection of descriptions for this widget.
+ *
+ * @param descriptions descriptions collection
+ */
+ void setDescriptions(Collection<IDescription> descriptions);
+
+ /**
+ * Get collection of start files for this widget.
+ *
+ * @return start files collection
+ */
+ Collection<IStartFile> getStartFiles();
+
+ /**
+ * Set collection of start files for this widget.
+ *
+ * @param startFiles start files collection
+ */
+ void setStartFiles(Collection<IStartFile> startFiles);
+
+ /**
+ * Get collection of preference defaults for this widget.
+ *
+ * @return preference defaults collection
+ */
+ Collection<IPreferenceDefault> getPreferenceDefaults();
+
+ /**
+ * Set collection of preference defaults for this widget.
+ *
+ * @param preferenceDefaults preference defaults collection
+ */
+ void setPreferenceDefaults(Collection<IPreferenceDefault> preferenceDefaults);
+
+ /**
+ * Get collection of shared data for this widget.
+ *
+ * @return shared data collection
+ */
+ Collection<ISharedData> getSharedData();
+
+ /**
+ * Set collection of shared data for this widget.
+ *
+ * @param sharedData shared data collection
+ */
+ void setSharedData(Collection<ISharedData> sharedData);
+
+ /**
+ * Get default widget title, (deprecated in favor of locale specifying APIs).
+ *
+ * @return widget title
+ */
+ @Deprecated
+ String getWidgetTitle();
+
+ /**
+ * Get widget title for locale.
+ *
+ * @return widget title
+ */
+ String getWidgetTitle(String locale);
+
+ /**
+ * Get default widget description, (deprecated in favor of locale specifying APIs).
+ *
+ * @return widget description
+ */
+ @Deprecated
+ String getWidgetDescription();
+
+ /**
+ * Get default widget short name, (deprecated in favor of locale specifying APIs).
+ *
+ * @return widget short name
+ */
+ @Deprecated
+ String getWidgetShortName();
+
+ /**
+ * Get shared data with specified key for widget.
+ *
+ * @param sharedDataKey shared data key
+ * @return shared data
+ */
+ ISharedData [] getSharedData(String sharedDataKey);
+
+ /**
+ * Get shared data with specified key and name for widget.
+ *
+ * @param sharedDataKey shared data key
+ * @param name shared data name
+ * @return shared data
+ */
+ ISharedData getSharedData(String sharedDataKey, String name);
+
+ /**
+ * Get default start file url, (deprecated in favor of locale specifying APIs).
+ *
+ * @return start file url
+ */
+ @Deprecated
+ String getUrl();
+
+ /**
+ * Get default widget icon location, (deprecated in favor of locale specifying APIs).
+ *
+ * @return widget icon location
+ */
+ @Deprecated
+ String getWidgetIconLocation();
+
+ /**
+ * Shared implementation utilities.
+ */
+ public static class Utilities
+ {
+ /**
+ * Get widget title for locale.
+ *
+ * @param widget widget
+ * @param locale locale
+ * @return widget title
+ */
+ public static String getWidgetTitle(IWidget widget, String locale)
+ {
+ IName name = (IName)LocalizationUtils.getLocalizedElement(widget.getNames(), new String[]{locale});
+ return ((name != null) ? name.getName() : IW3CXMLConfiguration.UNKNOWN);
+ }
+
+ /**
+ * Get widget description for locale.
+ *
+ * @param widget widget
+ * @param locale locale
+ * @return widget description or null
+ */
+ public static String getWidgetDescription(IWidget widget, String locale)
+ {
+ IDescription description = (IDescription)LocalizationUtils.getLocalizedElement(widget.getDescriptions(), new String[]{locale});
+ return ((description != null) ? description.getContent() : null);
+ }
+
+ /**
+ * Get widget short name for locale.
+ *
+ * @param widget widget
+ * @param locale locale
+ * @return widget short name
+ */
+ public static String getWidgetShortName(IWidget widget, String locale)
+ {
+ IName name = (IName)LocalizationUtils.getLocalizedElement(widget.getNames(), new String[]{locale});
+ return ((name != null) ? name.getShortName() : IW3CXMLConfiguration.UNKNOWN);
+ }
+
+ /**
+ * Get shared data with specified key for widget.
+ *
+ * @param widget widget
+ * @param sharedDataKey shared data key
+ * @return shared data array
+ */
+ public static ISharedData [] getSharedData(IWidget widget, String sharedDataKey)
+ {
+ List<ISharedData> sharedDataList = new ArrayList<ISharedData>();
+ for (ISharedData sharedData : widget.getSharedData())
+ {
+ if (sharedData.getSharedDataKey().equals(sharedDataKey))
+ {
+ sharedDataList.add(sharedData);
+ }
+ }
+ return sharedDataList.toArray(new ISharedData[sharedDataList.size()]);
+ }
+
+ /**
+ * Get shared data with specified key and name for widget.
+ *
+ * @param widget widget
+ * @param sharedDataKey shared data key
+ * @param name shared data name
+ * @return shared data or null
+ */
+ public static ISharedData getSharedData(IWidget widget, String sharedDataKey, String name)
+ {
+ for (ISharedData sharedData : widget.getSharedData())
+ {
+ if (sharedData.getSharedDataKey().equals(sharedDataKey) && sharedData.getDkey().equals(name))
+ {
+ return sharedData;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get widget start file url for locale.
+ *
+ * @param widget widget
+ * @param locale locale
+ * @return widget start file url
+ */
+ public static String getUrl(IWidget widget, String locale)
+ {
+ IStartFile startFile = (IStartFile)LocalizationUtils.getLocalizedElement(widget.getStartFiles(), new String[]{locale});
+ return ((startFile != null) ? startFile.getUrl() : null);
+ }
+
+ /**
+ * Get widget icon location for locale.
+ *
+ * @param widget widget
+ * @param locale locale
+ * @return widget icon location
+ */
+ public static String getWidgetIconLocation(IWidget widget, String locale)
+ {
+ IWidgetIcon icon = (IWidgetIcon)LocalizationUtils.getLocalizedElement(widget.getWidgetIcons(), new String[]{locale});
+ return ((icon != null) ? icon.getSrc() : null);
+ }
+ }
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetDefault.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetDefault.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetDefault.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetDefault.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,53 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IWidgetDefault - a default widget entry.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IWidgetDefault extends IBean
+{
+ /**
+ * Get widget context type.
+ *
+ * @return widget context type
+ */
+ String getWidgetContext();
+
+ /**
+ * Set widget context type.
+ *
+ * @param widgetContext widget context type
+ */
+ void setWidgetContext(String widgetContext);
+
+ /**
+ * Get default widget instance.
+ *
+ * @return widget instance
+ */
+ IWidget getWidget();
+
+ /**
+ * Set default widget instance.
+ *
+ * @param widget widget instance
+ */
+ void setWidget(IWidget widget);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetIcon.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetIcon.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetIcon.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetIcon.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,76 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+import org.apache.wookie.w3c.ILocalizedElement;
+
+/**
+ * IWidgetIcon - an object representing an icon for a widget.
+ *
+ * @author Scott Wilson
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IWidgetIcon extends ILocalizedElement
+{
+ /**
+ * Get widget icon source URL.
+ *
+ * @return icon source URL
+ */
+ String getSrc();
+
+ /**
+ * Set widget icon source URL.
+ *
+ * @param src icon source URL
+ */
+ void setSrc(String src);
+
+ /**
+ * Get widget icon height.
+ *
+ * @return icon height
+ */
+ Integer getHeight();
+
+ /**
+ * Set widget icon height.
+ *
+ * @param height icon height
+ */
+ void setHeight(Integer height);
+
+ /**
+ * Get widget icon width.
+ *
+ * @return icon width
+ */
+ Integer getWidth();
+
+ /**
+ * Set widget icon width.
+ *
+ * @param width icon width
+ */
+ void setWidth(Integer width);
+
+ /**
+ * Set widget icon language.
+ *
+ * @param lang icon language
+ */
+ void setLang(String lang);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetInstance.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetInstance.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetInstance.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetInstance.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,288 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+import java.util.Collection;
+
+import org.apache.wookie.w3c.ILocalizedElement;
+
+/**
+ * IWidgetInstance - a simple bean to model an actual widgets instance attributes.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IWidgetInstance extends IBean, ILocalizedElement
+{
+ /**
+ * Get owning widget instance.
+ *
+ * @return widget instance
+ */
+ IWidget getWidget();
+
+ /**
+ * Set owning widget instance.
+ *
+ * @param widget widget instance
+ */
+ void setWidget(IWidget widget);
+
+ /**
+ * Set widget instance language.
+ *
+ * @param lang language
+ */
+ void setLang(String lang);
+
+ /**
+ * Get widget instance shared data key.
+ *
+ * @return shared data key
+ */
+ String getSharedDataKey();
+
+ /**
+ * Set widget instance shared data key.
+ *
+ * @param sharedDataKey shared data key
+ */
+ void setSharedDataKey(String sharedDataKey);
+
+ /**
+ * Get widget instance hidden flag.
+ *
+ * @return hidden flag
+ */
+ boolean isHidden();
+
+ /**
+ * Set widget instance hidden flag.
+ *
+ * @param hidden hidden flag
+ */
+ void setHidden(boolean hidden);
+
+ /**
+ * Get widget instance id key.
+ *
+ * @return id key
+ */
+ String getIdKey();
+
+ /**
+ * Set widget instance id key.
+ *
+ * @param idKey id key
+ */
+ void setIdKey(String idKey);
+
+ /**
+ * Get widget instance API key.
+ *
+ * @return API key
+ */
+ String getApiKey();
+
+ /**
+ * Set widget instance API key.
+ *
+ * @param apiKey API key
+ */
+ void setApiKey(String apiKey);
+
+ /**
+ * Get widget instance OpenSocial token.
+ *
+ * @return OpenSocial token
+ */
+ String getOpensocialToken();
+
+ /**
+ * Set widget instance OpenSocial token.
+ *
+ * @param opensocialToken OpenSocial token
+ */
+ void setOpensocialToken(String opensocialToken);
+
+ /**
+ * Get widget instance nonce string.
+ *
+ * @return nonce string
+ */
+ String getNonce();
+
+ /**
+ * Set widget instance nonce string.
+ *
+ * @param nonce nonce string.
+ */
+ void setNonce(String nonce);
+
+ /**
+ * Get widget instance shown flag.
+ *
+ * @return shown flag
+ */
+ boolean isShown();
+
+ /**
+ * Set widget instance shown flag.
+ *
+ * @param shown shown flag
+ */
+ void setShown(boolean shown);
+
+ /**
+ * Get widget instance updated flag.
+ *
+ * @return updated flag
+ */
+ boolean isUpdated();
+
+ /**
+ * Set widget instance updated flag.
+ *
+ * @param updated updated flag
+ */
+ void setUpdated(boolean updated);
+
+ /**
+ * Get widget instance user id.
+ *
+ * @return user id
+ */
+ String getUserId();
+
+ /**
+ * Set widget instance user id.
+ *
+ * @param userId user id
+ */
+ void setUserId(String userId);
+
+ /**
+ * Get widget instance locked flag.
+ *
+ * @return locked flag
+ */
+ boolean isLocked();
+
+ /**
+ * Set widget instance locked flag.
+ *
+ * @param locked locked flag
+ */
+ void setLocked(boolean locked);
+
+ /**
+ * Get collection of widget instance preferences.
+ *
+ * @return preferences collection
+ */
+ Collection<IPreference> getPreferences();
+
+ /**
+ * Set collection of widget instance preferences.
+ *
+ * @param preferences preferences collection
+ */
+ void setPreferences(Collection<IPreference> preferences);
+
+ /**
+ * Get collection of widget instance tokens.
+ *
+ * @return tokens collection
+ */
+ Collection<IToken> getTokens();
+
+ /**
+ * Set collection of widget instance tokens.
+ *
+ * @param tokens tokens collection
+ */
+ void setTokens(Collection<IToken> tokens);
+
+ /**
+ * Get shared data for widget instance.
+ *
+ * @return shared data
+ */
+ ISharedData [] getSharedData();
+
+ /**
+ * Get shared data with name for widget instance.
+ *
+ * @param name shared data name
+ * @return shared data
+ */
+ ISharedData getSharedData(String name);
+
+ /**
+ * Get preference with specified key for widget instance.
+ *
+ * @param key shared data key
+ * @return shared data
+ */
+ IPreference getPreference(String key);
+
+ /**
+ * Shared implementation utilities.
+ */
+ public static class Utilities
+ {
+ /**
+ * Get shared data for widget instance.
+ *
+ * @param widgetInstance widget instance
+ * @return shared data array
+ */
+ public static ISharedData [] getSharedData(IWidgetInstance widgetInstance)
+ {
+ return widgetInstance.getWidget().getSharedData(widgetInstance.getSharedDataKey());
+ }
+
+ /**
+ * Get shared data with name for widget instance.
+ *
+ * @param widgetInstance widget instance
+ * @param name shared data name
+ * @return shared data or null
+ */
+ public static ISharedData getSharedData(IWidgetInstance widgetInstance, String name)
+ {
+ return widgetInstance.getWidget().getSharedData(widgetInstance.getSharedDataKey(), name);
+ }
+
+ /**
+ * Get preference with specified key for widget instance.
+ *
+ * @param key shared data key
+ * @return shared data
+ */
+ public static IPreference getPreference(IWidgetInstance widgetInstance, String key)
+ {
+ for (IPreference preference : widgetInstance.getPreferences())
+ {
+ if (preference.getDkey().equals(key))
+ {
+ return preference;
+ }
+ }
+ return null;
+ }
+ }
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetService.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetService.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetService.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetService.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,39 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IWidgetService - a type of service provided in the system.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IWidgetService extends IBean
+{
+ /**
+ * Get system service name.
+ *
+ * @return service name
+ */
+ String getServiceName();
+
+ /**
+ * Set system service name.
+ *
+ * @param serviceName service name
+ */
+ void setServiceName(String serviceName);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetType.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetType.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetType.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/IWidgetType.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,39 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans;
+
+/**
+ * IWidgetType - what type of service a particular widget can be.
+ *
+ * @author Paul Sharples
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IWidgetType
+{
+ /**
+ * Get widget context type.
+ *
+ * @return widget context type
+ */
+ String getWidgetContext();
+
+ /**
+ * Set widget context type.
+ *
+ * @param widgetContext widget context type
+ */
+ void setWidgetContext(String widgetContext);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IIdElement.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IIdElement.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IIdElement.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IIdElement.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,38 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans.jcr;
+
+/**
+ * IIdElement - interface to manage collection element ids.
+ *
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IIdElement
+{
+ /**
+ * Get collection element id.
+ *
+ * @return element id
+ */
+ long getElementId();
+
+ /**
+ * Set collection element id.
+ *
+ * @param elementId element id
+ */
+ void setElementId(long elementId);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IInverseRelationship.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IInverseRelationship.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IInverseRelationship.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IInverseRelationship.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,31 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans.jcr;
+
+/**
+ * IInverseRelationship - interface to manage inverse relationships.
+ *
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IInverseRelationship<O extends IUuidBean>
+{
+ /**
+ * Update inverse relationship.
+ *
+ * @param parentObject parent object
+ */
+ void updateInverseRelationship(O parentObject);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IPathBean.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IPathBean.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IPathBean.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IPathBean.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,39 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans.jcr;
+
+/**
+ * IPathBean - base JCR bean with node path.
+ *
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IPathBean
+{
+ /**
+ * Get JCR node path.
+ *
+ * @return node path
+ */
+ String getNodePath();
+
+ /**
+ * Set JCR node path if not previously set.
+ *
+ * @param nodeRootPath node root path for instance class
+ * @return new or exiting node path
+ */
+ String setNodePath(String nodeRootPath);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IPersistenceListener.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IPersistenceListener.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IPersistenceListener.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IPersistenceListener.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,54 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans.jcr;
+
+import org.apache.wookie.beans.util.IPersistenceManager;
+
+/**
+ * IPersistenceListener - persistence operation notifications listener interface.
+ *
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IPersistenceListener
+{
+ /**
+ * Pre-save persistence operation notification.
+ *
+ * @param persistenceManager persistence manager
+ */
+ boolean preSave(IPersistenceManager persistenceManager);
+
+ /**
+ * Post-save persistence operation notification.
+ *
+ * @param persistenceManager persistence manager
+ */
+ boolean postSave(IPersistenceManager persistenceManager);
+
+ /**
+ * Pre-delete persistence operation notification.
+ *
+ * @param persistenceManager persistence manager
+ */
+ boolean preDelete(IPersistenceManager persistenceManager);
+
+ /**
+ * Post-delete persistence operation notification.
+ *
+ * @param persistenceManager persistence manager
+ */
+ boolean postDelete(IPersistenceManager persistenceManager);
+}
Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IUuidBean.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IUuidBean.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IUuidBean.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/IUuidBean.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,38 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wookie.beans.jcr;
+
+/**
+ * IUuidBean - base JCR bean with a reference UUID field.
+ *
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface IUuidBean
+{
+ /**
+ * Get JCR referenceable node UUID.
+ *
+ * @return node UUID
+ */
+ String getUuid();
+
+ /**
+ * Get JCR referenceable node UUID.
+ *
+ * @return node UUID
+ */
+ void setUuid(String uuid);
+}