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 [5/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...

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/LicenseImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/LicenseImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/LicenseImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/LicenseImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,87 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+import org.apache.wookie.beans.ILicense;
+import org.apache.wookie.beans.jcr.IIdElement;
+
+/**
+ * LicenseImpl - JCR OCM ILicense implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:license", extend=LocalizedBeanImpl.class, discriminator=false)
+public class LicenseImpl extends LocalizedBeanImpl implements ILicense, IIdElement
+{
+    @Field(id=true, jcrName="wookie:elementId")
+    private long elementId = -1;
+    
+    @Field(jcrName="wookie:href")
+    private String href;
+    
+    @Field(jcrName="wookie:text")
+    private String text;
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#getElementId()
+     */
+    public long getElementId()
+    {
+        return elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#setElementId(long)
+     */
+    public void setElementId(long elementId)
+    {
+        this.elementId = elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ILicense#getHref()
+     */
+    public String getHref()
+    {
+        return href;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ILicense#setHref(java.lang.String)
+     */
+    public void setHref(String href)
+    {
+        this.href = href;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ILicense#getText()
+     */
+    public String getText()
+    {
+        return text;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ILicense#setText(java.lang.String)
+     */
+    public void setText(String text)
+    {
+        this.text = text;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/LocalizedBeanImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/LocalizedBeanImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/LocalizedBeanImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/LocalizedBeanImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,68 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.ILocalizedBean;
+
+/**
+ * LocalizedBeanImpl - JCR OCM ILocalizedBean implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(isAbstract=true)
+public abstract class LocalizedBeanImpl implements ILocalizedBean
+{
+    @Field(jcrName="wookie:dir")
+    private String dir;
+    
+    @Field(jcrName="wookie:lang")
+    private String lang;
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ILocalizedBean#getDir()
+     */
+    public String getDir()
+    {
+        return dir;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ILocalizedBean#setDir(java.lang.String)
+     */
+    public void setDir(String dir)
+    {
+        this.dir = dir;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ILocalizedBean#getLang()
+     */
+    public String getLang()
+    {
+        return lang;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ILocalizedBean#setLang(java.lang.String)
+     */
+    public void setLang(String lang)
+    {
+        this.lang = lang;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/NameImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/NameImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/NameImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/NameImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,88 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IName;
+import org.apache.wookie.beans.jcr.IIdElement;
+
+/**
+ * NameImpl - JCR OCM IName implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:name", extend=LocalizedBeanImpl.class, discriminator=false)
+public class NameImpl extends LocalizedBeanImpl implements IName, IIdElement
+{
+    @Field(id=true, jcrName="wookie:elementId")
+    private long elementId = -1;
+    
+    @Field(jcrName="wookie:name")
+    private String name;
+    
+    @Field(jcrName="wookie:shortName")
+    private String shortName;
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#getElementId()
+     */
+    public long getElementId()
+    {
+        return elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#setElementId(long)
+     */
+    public void setElementId(long elementId)
+    {
+        this.elementId = elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IName#getName()
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IName#setName(java.lang.String)
+     */
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IName#getShortName()
+     */
+    public String getShortName()
+    {
+        return shortName;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IName#setShortName(java.lang.String)
+     */
+    public void setShortName(String shortName)
+    {
+        this.shortName = shortName;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/ParamImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/ParamImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/ParamImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/ParamImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,88 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IParam;
+import org.apache.wookie.beans.jcr.IIdElement;
+
+/**
+ * ParamImpl - JCR OCM IParam implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:param", discriminator=false)
+public class ParamImpl implements IParam, IIdElement
+{
+    @Field(id=true, jcrName="wookie:elementId")
+    private long elementId = -1;
+    
+    @Field(jcrName="wookie:parameterName")
+    private String parameterName;
+
+    @Field(jcrName="wookie:parameterValue")
+    private String parameterValue;
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#getElementId()
+     */
+    public long getElementId()
+    {
+        return elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#setElementId(long)
+     */
+    public void setElementId(long elementId)
+    {
+        this.elementId = elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParam#getParameterName()
+     */
+    public String getParameterName()
+    {
+        return parameterName;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParam#setParameterName(java.lang.String)
+     */
+    public void setParameterName(String parameterName)
+    {
+        this.parameterName = parameterName;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParam#getParameterValue()
+     */
+    public String getParameterValue()
+    {
+        return parameterValue;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParam#setParameterValue(java.lang.String)
+     */
+    public void setParameterValue(String parameterValue)
+    {
+        this.parameterValue = parameterValue;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/ParticipantImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/ParticipantImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/ParticipantImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/ParticipantImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,201 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.manager.beanconverter.impl.ReferenceBeanConverterImpl;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Bean;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IParticipant;
+import org.apache.wookie.beans.IWidget;
+import org.apache.wookie.beans.jcr.IPathBean;
+import org.apache.wookie.beans.jcr.JCRPersistenceManager;
+
+/**
+ * ParticipantImpl - JCR OCM IParticipant implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:participant", discriminator=false)
+public class ParticipantImpl implements IParticipant, IPathBean
+{
+    @Field(path=true)
+    private String path;
+    
+    @Field(jcrName="wookie:participantId")
+    private String participantId;
+
+    @Field(jcrName="wookie:participantDisplayName")
+    private String participantDisplayName;
+
+    @Field(jcrName="wookie:participantThumbnailUrl")
+    private String participantThumbnailUrl;
+
+    @Field(jcrName="wookie:sharedDataKey")
+    private String sharedDataKey;
+    
+    @Bean(jcrName="wookie:widget", converter=ReferenceBeanConverterImpl.class)
+    private WidgetImpl widgetImpl;
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IBean#getId()
+     */
+    public Object getId()
+    {
+        return path;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IPathBean#getNodePath()
+     */
+    public String getNodePath()
+    {
+        return path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IPathBean#setNodePath(java.lang.String)
+     */
+    public String setNodePath(String nodeRootPath)
+    {
+        if (path == null)
+        {
+            path = nodeRootPath+"/"+JCRPersistenceManager.escapeJCRName(sharedDataKey)+"/"+JCRPersistenceManager.escapeJCRName(widgetImpl.getGuid())+"/"+JCRPersistenceManager.escapeJCRName(participantId);
+        }
+        return path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.util.IParticipant#getParticipantDisplayName()
+     */
+    public String getParticipantDisplayName()
+    {
+        return participantDisplayName;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParticipant#setParticipantDisplayName(java.lang.String)
+     */
+    public void setParticipantDisplayName(String participantDisplayName)
+    {
+        this.participantDisplayName = participantDisplayName;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParticipant#getParticipantId()
+     */
+    public String getParticipantId()
+    {
+        return participantId;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParticipant#setParticipantId(java.lang.String)
+     */
+    public void setParticipantId(String participantId)
+    {
+        this.participantId = participantId;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParticipant#getParticipantThumbnailUrl()
+     */
+    public String getParticipantThumbnailUrl()
+    {
+        return participantThumbnailUrl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParticipant#setParticipantThumbnailUrl(java.lang.String)
+     */
+    public void setParticipantThumbnailUrl(String participantThumbnailUrl)
+    {
+        this.participantThumbnailUrl = participantThumbnailUrl;
+    }
+
+    /**
+     * Get raw persistent JCR absolute node path.
+     * 
+     * @return absolute path
+     */
+    public String getPath()
+    {
+        return path;
+    }
+
+    /**
+     * Set raw persistent JCR absolute node path.
+     * 
+     * @param path absolute path
+     */
+    public void setPath(String path)
+    {
+        this.path = path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParticipant#getSharedDataKey()
+     */
+    public String getSharedDataKey()
+    {
+        return sharedDataKey;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParticipant#setSharedDataKey(java.lang.String)
+     */
+    public void setSharedDataKey(String sharedDataKey)
+    {
+        this.sharedDataKey = sharedDataKey;
+    }    
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParticipant#getWidget()
+     */
+    public IWidget getWidget()
+    {
+        return widgetImpl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IParticipant#setWidget(org.apache.wookie.beans.IWidget)
+     */
+    public void setWidget(IWidget widget)
+    {
+        this.widgetImpl = (WidgetImpl)widget;
+    }
+    
+    /**
+     * Get widget implementation.
+     * 
+     * @return widget implementation
+     */
+    public WidgetImpl getWidgetImpl()
+    {
+        return widgetImpl;
+    }
+
+    /**
+     * Set widget implementation.
+     * 
+     * @return widgetImpl widget implementation
+     */
+    public void setWidgetImpl(WidgetImpl widgetImpl)
+    {
+        this.widgetImpl = widgetImpl;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/PostImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/PostImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/PostImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/PostImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,345 @@
+/*
+ *  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.impl;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+
+import org.apache.jackrabbit.ocm.manager.collectionconverter.impl.BeanReferenceCollectionConverterImpl;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IPost;
+import org.apache.wookie.beans.jcr.IInverseRelationship;
+import org.apache.wookie.beans.jcr.IPathBean;
+import org.apache.wookie.beans.jcr.IUuidBean;
+import org.apache.wookie.beans.jcr.InverseRelationshipCollection;
+import org.apache.wookie.beans.jcr.JCRPersistenceManager;
+import org.apache.wookie.beans.jcr.PersistenceListenerAdapter;
+import org.apache.wookie.beans.util.IPersistenceManager;
+
+/**
+ * PostImpl - JCR OCM IPost implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:post", jcrMixinTypes="mix:referenceable", discriminator=false)
+public class PostImpl extends PersistenceListenerAdapter implements IPost, IPathBean, IUuidBean, IInverseRelationship<PostImpl>
+{
+    @Field(path=true)
+    private String path;
+    
+    @Field(uuid=true)
+    private String uuid;
+
+    @Field(jcrName="wookie:userId")
+    private String userId;
+    
+    @Field(jcrName="wookie:title")
+    private String title;
+
+    @Field(jcrName="wookie:content")
+    private String content;
+
+    @Field(jcrName="wookie:publishDate")
+    private Date publishDate;
+
+    @Field(jcrName="wookie:updateDate")
+    private Date updateDate;
+
+    @Field(jcrName="wookie:sharedDataKey")
+    private String sharedDataKey;
+
+    @Field(jcrName="wookie:parent")
+    private String parent;
+
+    @org.apache.jackrabbit.ocm.mapper.impl.annotation.Collection(jcrName="wookie:posts", elementClassName=PostImpl.class, collectionConverter=BeanReferenceCollectionConverterImpl.class)
+    private Collection<PostImpl> postImpls;
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.PersistenceListenerAdapter#preDelete(org.apache.wookie.beans.util.IPersistenceManager)
+     */
+    public boolean preDelete(IPersistenceManager persistenceManager)
+    {
+        // cascade delete of child posts
+        if (postImpls != null)
+        {
+            for (PostImpl post : postImpls)
+            {
+                if (!persistenceManager.delete(post))
+                {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.PersistenceListenerAdapter#preSave(org.apache.wookie.beans.util.IPersistenceManager)
+     */
+    public boolean preSave(IPersistenceManager persistenceManager)
+    {
+        // cascade saves of child posts
+        if (postImpls != null)
+        {
+            for (PostImpl post : postImpls)
+            {
+                if (!persistenceManager.save(post))
+                {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IInverseRelationship#updateInverseRelationship(org.apache.wookie.beans.jcr.IUuidBean)
+     */
+    public void updateInverseRelationship(PostImpl parentObject)
+    {
+        parent = ((parentObject != null) ? parentObject.getUuid() : null);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#getContent()
+     */
+    public String getContent()
+    {
+        return content;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#setContent(java.lang.String)
+     */
+    public void setContent(String content)
+    {
+        this.content = content;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IBean#getId()
+     */
+    public Object getId()
+    {
+        return path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IPathBean#getNodePath()
+     */
+    public String getNodePath()
+    {
+        return path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IPathBean#setNodePath(java.lang.String)
+     */
+    public String setNodePath(String nodeRootPath)
+    {
+        if (path == null)
+        {
+            path = nodeRootPath+"/"+JCRPersistenceManager.escapeJCRName(sharedDataKey)+"/"+JCRPersistenceManager.escapeJCRName(userId)+"/"+publishDate.getTime();
+        }
+        return path;
+    }
+
+    /**
+     * Get raw persistent parent post UUID.
+     * 
+     * @return parent post UUID
+     */
+    public String getParent()
+    {
+        return parent;
+    }
+
+    /**
+     * Set raw persistent parent post UUID.
+     * 
+     * @param parent parent post UUID
+     */
+    public void setParent(String parent)
+    {
+        this.parent = parent;
+    }
+
+    /**
+     * Get raw persistent JCR absolute node path.
+     * 
+     * @return absolute path
+     */
+    public String getPath()
+    {
+        return path;
+    }
+
+    /**
+     * Set raw persistent JCR absolute node path.
+     * 
+     * @param path absolute path
+     */
+    public void setPath(String path)
+    {
+        this.path = path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#getPosts()
+     */
+    public Collection<IPost> getPosts()
+    {
+        if (postImpls == null)
+        {
+            postImpls = new ArrayList<PostImpl>();
+        }
+        return new InverseRelationshipCollection<PostImpl,PostImpl,IPost>(this, postImpls);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#setPosts(java.util.Collection)
+     */
+    public void setPosts(Collection<IPost> posts)
+    {
+        getPosts().clear();
+        if (posts != null)
+        {
+            for (IPost widgetType : posts)
+            {
+                getPosts().add((PostImpl)widgetType);
+            }
+        }        
+    }
+
+    /**
+     * Get post implementations collection.
+     * 
+     * @return post implementations collection
+     */
+    public Collection<PostImpl> getPostImpls()
+    {
+        return postImpls;
+    }
+
+    /**
+     * Set post implementations collection.
+     * 
+     * @param postImpls post implementations collection
+     */
+    public void setPostImpls(Collection<PostImpl> postImpls)
+    {
+        this.postImpls = postImpls;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#getPublishDate()
+     */
+    public Date getPublishDate()
+    {
+        return publishDate;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#setPublishDate(java.util.Date)
+     */
+    public void setPublishDate(Date publishDate)
+    {
+        this.publishDate = publishDate;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#getSharedDataKey()
+     */
+    public String getSharedDataKey()
+    {
+        return sharedDataKey;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#setSharedDataKey(java.lang.String)
+     */
+    public void setSharedDataKey(String sharedDataKey)
+    {
+        this.sharedDataKey = sharedDataKey;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#getTitle()
+     */
+    public String getTitle()
+    {
+        return title;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#setTitle(java.lang.String)
+     */
+    public void setTitle(String title)
+    {
+        this.title = title;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#getUpdateDate()
+     */
+    public Date getUpdateDate()
+    {
+        return updateDate;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#setUpdateDate(java.util.Date)
+     */
+    public void setUpdateDate(Date updateDate)
+    {
+        this.updateDate = updateDate;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#getUserId()
+     */
+    public String getUserId()
+    {
+        return userId;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPost#setUserId(java.lang.String)
+     */
+    public void setUserId(String userId)
+    {
+        this.userId = userId;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IUuidBean#getUuid()
+     */
+    public String getUuid()
+    {
+        return uuid;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IUuidBean#setUuid(java.lang.String)
+     */
+    public void setUuid(String uuid)
+    {
+        this.uuid = uuid;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/PreferenceDefaultImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/PreferenceDefaultImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/PreferenceDefaultImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/PreferenceDefaultImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,107 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IPreferenceDefault;
+import org.apache.wookie.beans.jcr.IIdElement;
+
+/**
+ * PreferenceDefaultImpl - JCR OCM IPreferenceDefault implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:preferenceDefault", discriminator=false)
+public class PreferenceDefaultImpl implements IPreferenceDefault, IIdElement
+{
+    @Field(id=true, jcrName="wookie:elementId")
+    private long elementId = -1;
+    
+    @Field(jcrName="wookie:preference")
+    private String preference;
+    
+    @Field(jcrName="wookie:value")
+    private String value;
+    
+    @Field(jcrName="wookie:readOnly")
+    private Boolean readOnly;
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#getElementId()
+     */
+    public long getElementId()
+    {
+        return elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#setElementId(long)
+     */
+    public void setElementId(long elementId)
+    {
+        this.elementId = elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPreferenceDefault#getPreference()
+     */
+    public String getPreference()
+    {
+        return preference;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPreferenceDefault#setPreference(java.lang.String)
+     */
+    public void setPreference(String preference)
+    {
+        this.preference = preference;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPreferenceDefault#getValue()
+     */
+    public String getValue()
+    {
+        return value;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPreferenceDefault#setValue(java.lang.String)
+     */
+    public void setValue(String value)
+    {
+        this.value = value;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPreferenceDefault#isReadOnly()
+     */
+    public boolean isReadOnly()
+    {
+        return ((readOnly != null) ? readOnly.booleanValue() : false);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPreferenceDefault#setReadOnly(boolean)
+     */
+    public void setReadOnly(boolean readOnly)
+    {
+        this.readOnly = (readOnly ? Boolean.TRUE : Boolean.FALSE);
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/PreferenceImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/PreferenceImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/PreferenceImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/PreferenceImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,107 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IPreference;
+import org.apache.wookie.beans.jcr.IIdElement;
+
+/**
+ * PreferenceImpl - JCR OCM IPreference implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:preference", discriminator=false)
+public class PreferenceImpl implements IPreference, IIdElement
+{
+    @Field(id=true, jcrName="wookie:elementId")
+    private long elementId = -1;
+    
+    @Field(jcrName="wookie:dkey")
+    private String dkey;
+    
+    @Field(jcrName="wookie:dvalue")
+    private String dvalue;
+    
+    @Field(jcrName="wookie:readOnly")
+    private Boolean readOnly;
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPreference#getDkey()
+     */
+    public String getDkey()
+    {
+        return dkey;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPreference#setDkey(java.lang.String)
+     */
+    public void setDkey(String dkey)
+    {
+        this.dkey = dkey;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPreference#getDvalue()
+     */
+    public String getDvalue()
+    {
+        return dvalue;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPreference#setDvalue(java.lang.String)
+     */
+    public void setDvalue(String dvalue)
+    {
+        this.dvalue = dvalue;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#getElementId()
+     */
+    public long getElementId()
+    {
+        return elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#setElementId(long)
+     */
+    public void setElementId(long elementId)
+    {
+        this.elementId = elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPreference#isReadOnly()
+     */
+    public boolean isReadOnly()
+    {
+        return ((readOnly != null) ? readOnly.booleanValue() : false);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IPreference#setReadOnly(boolean)
+     */
+    public void setReadOnly(boolean readOnly)
+    {
+        this.readOnly = (readOnly ? Boolean.TRUE : Boolean.FALSE);
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/ServerFeatureImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/ServerFeatureImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/ServerFeatureImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/ServerFeatureImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,121 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IServerFeature;
+import org.apache.wookie.beans.jcr.IPathBean;
+import org.apache.wookie.beans.jcr.JCRPersistenceManager;
+
+/**
+ * ServerFeatureImpl - JCR OCM IServerFeature implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:serverFeature", discriminator=false)
+public class ServerFeatureImpl implements IServerFeature, IPathBean
+{
+    @Field(path=true)
+    private String path;
+    
+    @Field(jcrName="wookie:featureName")
+    private String featureName;
+    
+    @Field(jcrName="wookie:className")
+    private String className;
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IServerFeature#getClassName()
+     */
+    public String getClassName()
+    {
+        return className;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IServerFeature#setClassName(java.lang.String)
+     */
+    public void setClassName(String className)
+    {
+        this.className = className;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IServerFeature#getFeatureName()
+     */
+    public String getFeatureName()
+    {
+        return featureName;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IServerFeature#setFeatureName(java.lang.String)
+     */
+    public void setFeatureName(String featureName)
+    {
+        this.featureName = featureName;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IBean#getId()
+     */
+    public Object getId()
+    {
+        return path;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IPathBean#getNodePath()
+     */
+    public String getNodePath()
+    {
+        return path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IPathBean#setNodePath(java.lang.String)
+     */
+    public String setNodePath(String nodeRootPath)
+    {
+        if (path == null)
+        {
+            path = nodeRootPath+"/"+JCRPersistenceManager.escapeJCRName(featureName);
+        }
+        return path;
+    }
+
+    /**
+     * Get raw persistent JCR absolute node path.
+     * 
+     * @return absolute path.
+     */
+    public String getPath()
+    {
+        return path;
+    }
+
+    /**
+     * Set raw persistent JCR absolute node path.
+     * 
+     * @param path absolute path.
+     */
+    public void setPath(String path)
+    {
+        this.path = path;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/SharedDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/SharedDataImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/SharedDataImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/SharedDataImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,107 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.ISharedData;
+import org.apache.wookie.beans.jcr.IIdElement;
+
+/**
+ * SharedDataImpl - JCR OCM ISharedData implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:sharedData", discriminator=false)
+public class SharedDataImpl implements ISharedData, IIdElement
+{
+    @Field(id=true, jcrName="wookie:elementId")
+    private long elementId = -1;
+    
+    @Field(jcrName="wookie:sharedDataKey")
+    private String sharedDataKey;
+
+    @Field(jcrName="wookie:dkey")
+    private String dkey;
+
+    @Field(jcrName="wookie:dvalue")
+    private String dvalue;
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ISharedData#getDkey()
+     */
+    public String getDkey()
+    {
+        return dkey;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ISharedData#setDkey(java.lang.String)
+     */
+    public void setDkey(String dkey)
+    {
+        this.dkey = dkey;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ISharedData#getDvalue()
+     */
+    public String getDvalue()
+    {
+        return dvalue;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ISharedData#setDvalue(java.lang.String)
+     */
+    public void setDvalue(String dvalue)
+    {
+        this.dvalue = dvalue;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#getElementId()
+     */
+    public long getElementId()
+    {
+        return elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#setElementId(long)
+     */
+    public void setElementId(long elementId)
+    {
+        this.elementId = elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ISharedData#getSharedDataKey()
+     */
+    public String getSharedDataKey()
+    {
+        return sharedDataKey;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.ISharedData#setSharedDataKey(java.lang.String)
+     */
+    public void setSharedDataKey(String sharedDataKey)
+    {
+        this.sharedDataKey = sharedDataKey;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/StartFileImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/StartFileImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/StartFileImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/StartFileImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,107 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IStartFile;
+import org.apache.wookie.beans.jcr.IIdElement;
+
+/**
+ * StartFileImpl - JCR OCM IStartFile implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:startFile", discriminator=false)
+public class StartFileImpl implements IStartFile, IIdElement
+{
+    @Field(id=true, jcrName="wookie:elementId")
+    private long elementId = -1;
+    
+    @Field(jcrName="wookie:url")
+    private String url;
+    
+    @Field(jcrName="wookie:charset")
+    private String charset;
+
+    @Field(jcrName="wookie:lang")
+    private String lang;
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IStartFile#getCharset()
+     */
+    public String getCharset()
+    {
+        return charset;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IStartFile#setCharset(java.lang.String)
+     */
+    public void setCharset(String charset)
+    {
+        this.charset = charset;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#getElementId()
+     */
+    public long getElementId()
+    {
+        return elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#setElementId(long)
+     */
+    public void setElementId(long elementId)
+    {
+        this.elementId = elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IStartFile#getLang()
+     */
+    public String getLang()
+    {
+        return lang;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IStartFile#setLang(java.lang.String)
+     */
+    public void setLang(String lang)
+    {
+        this.lang = lang;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IStartFile#getUrl()
+     */
+    public String getUrl()
+    {
+        return url;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IStartFile#setUrl(java.lang.String)
+     */
+    public void setUrl(String url)
+    {
+        this.url = url;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/TokenImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/TokenImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/TokenImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/TokenImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,164 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IToken;
+import org.apache.wookie.beans.jcr.IIdElement;
+
+/**
+ * TokenImpl - JCR OCM IToken implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:token", discriminator=false)
+public class TokenImpl implements IToken, IIdElement
+{
+    @Field(id=true, jcrName="wookie:elementId")
+    private long elementId = -1;
+    
+    @Field(jcrName="wookie:requestUrl")
+    private String requestUrl;
+
+    @Field(jcrName="wookie:accessUrl")
+    private String accessUrl;
+
+    @Field(jcrName="wookie:authzUrl")
+    private String authzUrl;
+
+    @Field(jcrName="wookie:requestToken")
+    private String requestToken;
+
+    @Field(jcrName="wookie:accessToken")
+    private String accessToken;
+
+    @Field(jcrName="wookie:tokenSecret")
+    private String tokenSecret;
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IToken#getAccessToken()
+     */
+    public String getAccessToken()
+    {
+        return accessToken;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IToken#setAccessToken(java.lang.String)
+     */
+    public void setAccessToken(String accessToken)
+    {
+        this.accessToken = accessToken;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IToken#getAccessUrl()
+     */
+    public String getAccessUrl()
+    {
+        return accessUrl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IToken#setAccessUrl(java.lang.String)
+     */
+    public void setAccessUrl(String accessUrl)
+    {
+        this.accessUrl = accessUrl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IToken#getAuthzUrl()
+     */
+    public String getAuthzUrl()
+    {
+        return authzUrl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IToken#setAuthzUrl(java.lang.String)
+     */
+    public void setAuthzUrl(String authzUrl)
+    {
+        this.authzUrl = authzUrl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#getElementId()
+     */
+    public long getElementId()
+    {
+        return elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#setElementId(long)
+     */
+    public void setElementId(long elementId)
+    {
+        this.elementId = elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IToken#getRequestToken()
+     */
+    public String getRequestToken()
+    {
+        return requestToken;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IToken#setRequestToken(java.lang.String)
+     */
+    public void setRequestToken(String requestToken)
+    {
+        this.requestToken = requestToken;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IToken#getRequestUrl()
+     */
+    public String getRequestUrl()
+    {
+        return requestUrl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IToken#setRequestUrl(java.lang.String)
+     */
+    public void setRequestUrl(String requestUrl)
+    {
+        this.requestUrl = requestUrl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IToken#getTokenSecret()
+     */
+    public String getTokenSecret()
+    {
+        return tokenSecret;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IToken#setTokenSecret(java.lang.String)
+     */
+    public void setTokenSecret(String tokenSecret)
+    {
+        this.tokenSecret = tokenSecret;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WhitelistImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WhitelistImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WhitelistImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WhitelistImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,102 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IWhitelist;
+import org.apache.wookie.beans.jcr.IPathBean;
+import org.apache.wookie.beans.jcr.JCRPersistenceManager;
+
+/**
+ * WhitelistImpl - JCR OCM IWhitelist implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:whitelist", discriminator=false)
+public class WhitelistImpl implements IWhitelist, IPathBean
+{
+    @Field(path=true)
+    private String path;
+    
+    @Field(jcrName="wookie:fUrl")
+    private String fUrl;
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWhitelist#getfUrl()
+     */
+    public String getfUrl()
+    {
+        return fUrl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWhitelist#setfUrl(java.lang.String)
+     */
+    public void setfUrl(String url)
+    {
+        this.fUrl = url;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IBean#getId()
+     */
+    public Object getId()
+    {
+        return path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IPathBean#getNodePath()
+     */
+    public String getNodePath()
+    {
+        return path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IPathBean#setNodePath(java.lang.String)
+     */
+    public String setNodePath(String nodeRootPath)
+    {
+        if (path == null)
+        {
+            path = nodeRootPath+"/"+JCRPersistenceManager.escapeJCRName(fUrl);
+        }
+        return path;
+    }
+
+    /**
+     * Get raw persistent JCR absolute node path.
+     * 
+     * @return absolute path
+     */
+    public String getPath()
+    {
+        return path;
+    }
+
+    /**
+     * Set raw persistent JCR absolute node path.
+     * 
+     * @param path absolute path
+     */
+    public void setPath(String path)
+    {
+        this.path = path;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WidgetDefaultImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WidgetDefaultImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WidgetDefaultImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WidgetDefaultImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,144 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.manager.beanconverter.impl.ReferenceBeanConverterImpl;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Bean;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IWidget;
+import org.apache.wookie.beans.IWidgetDefault;
+import org.apache.wookie.beans.jcr.IPathBean;
+import org.apache.wookie.beans.jcr.JCRPersistenceManager;
+
+/**
+ * WidgetDefaultImpl - JCR OCM IWidgetDefault implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:widgetDefault", discriminator=false)
+public class WidgetDefaultImpl implements IWidgetDefault, IPathBean
+{
+    @Field(path=true)
+    private String path;
+    
+    @Field(jcrName="wookie:widgetContext")
+    private String widgetContext;
+
+    @Bean(jcrName="wookie:widget", converter=ReferenceBeanConverterImpl.class)
+    private WidgetImpl widgetImpl;
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IBean#getId()
+     */
+    public Object getId()
+    {
+        return path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IPathBean#getNodePath()
+     */
+    public String getNodePath()
+    {
+        return path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IPathBean#setNodePath(java.lang.String)
+     */
+    public String setNodePath(String nodeRootPath)
+    {
+        if (path == null)
+        {
+            path = nodeRootPath+"/"+JCRPersistenceManager.escapeJCRName(widgetContext);
+        }
+        return path;
+    }
+
+    /**
+     * Get raw persistent JCR absolute node path.
+     * 
+     * @return absolute path
+     */
+    public String getPath()
+    {
+        return path;
+    }
+
+    /**
+     * Set raw persistent JCR absolute node path.
+     * 
+     * @param path absolute path
+     */
+    public void setPath(String path)
+    {
+        this.path = path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidgetDefault#getWidget()
+     */
+    public IWidget getWidget()
+    {
+        return widgetImpl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidgetDefault#setWidget(org.apache.wookie.beans.IWidget)
+     */
+    public void setWidget(IWidget widget)
+    {
+        this.widgetImpl = (WidgetImpl)widget;
+    }
+
+    /**
+     * Get widget implementation.
+     * 
+     * @return widget implementation
+     */
+    public WidgetImpl getWidgetImpl()
+    {
+        return widgetImpl;
+    }
+
+    /**
+     * Set widget implementation.
+     * 
+     * @return widgetImpl widget implementation
+     */
+    public void setWidgetImpl(WidgetImpl widgetImpl)
+    {
+        this.widgetImpl = widgetImpl;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidgetDefault#getWidgetContext()
+     */
+    public String getWidgetContext()
+    {
+        return widgetContext;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidgetDefault#setWidgetContext(java.lang.String)
+     */
+    public void setWidgetContext(String widgetContext)
+    {
+        this.widgetContext = widgetContext;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WidgetIconImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WidgetIconImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WidgetIconImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WidgetIconImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,126 @@
+/*
+ *  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.impl;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IWidgetIcon;
+import org.apache.wookie.beans.jcr.IIdElement;
+
+/**
+ * WidgetIconImpl - JCR OCM IWidgetIcon implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:widgetIcon", discriminator=false)
+public class WidgetIconImpl implements IWidgetIcon, IIdElement
+{
+    @Field(id=true, jcrName="wookie:elementId")
+    private long elementId = -1;
+    
+    @Field(jcrName="wookie:src")
+    private String src;
+
+    @Field(jcrName="wookie:height")
+    private Integer height;
+
+    @Field(jcrName="wookie:width")
+    private Integer width;
+
+    @Field(jcrName="wookie:lang")
+    private String lang;
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#getElementId()
+     */
+    public long getElementId()
+    {
+        return elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IIdElement#setElementId(long)
+     */
+    public void setElementId(long elementId)
+    {
+        this.elementId = elementId;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidgetIcon#getHeight()
+     */
+    public Integer getHeight()
+    {
+        return height;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidgetIcon#setHeight(java.lang.Integer)
+     */
+    public void setHeight(Integer height)
+    {
+        this.height = height;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidgetIcon#getLang()
+     */
+    public String getLang()
+    {
+        return lang;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidgetIcon#setLang(java.lang.String)
+     */
+    public void setLang(String lang)
+    {
+        this.lang = lang;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidgetIcon#getSrc()
+     */
+    public String getSrc()
+    {
+        return src;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidgetIcon#setSrc(java.lang.String)
+     */
+    public void setSrc(String src)
+    {
+        this.src = src;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidgetIcon#getWidth()
+     */
+    public Integer getWidth()
+    {
+        return width;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidgetIcon#setWidth(java.lang.Integer)
+     */
+    public void setWidth(Integer width)
+    {
+        this.width = width;
+    }
+}

Added: incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WidgetImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WidgetImpl.java?rev=955236&view=auto
==============================================================================
--- incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WidgetImpl.java (added)
+++ incubator/wookie/branches/pluggablepersistence/src/org/apache/wookie/beans/jcr/impl/WidgetImpl.java Wed Jun 16 14:16:36 2010
@@ -0,0 +1,763 @@
+/*
+ *  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.impl;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Field;
+import org.apache.jackrabbit.ocm.mapper.impl.annotation.Node;
+
+import org.apache.wookie.beans.IDescription;
+import org.apache.wookie.beans.IFeature;
+import org.apache.wookie.beans.ILicense;
+import org.apache.wookie.beans.IName;
+import org.apache.wookie.beans.IPreferenceDefault;
+import org.apache.wookie.beans.ISharedData;
+import org.apache.wookie.beans.IStartFile;
+import org.apache.wookie.beans.IWidget;
+import org.apache.wookie.beans.IWidgetIcon;
+import org.apache.wookie.beans.IWidgetType;
+import org.apache.wookie.beans.jcr.IPathBean;
+import org.apache.wookie.beans.jcr.IUuidBean;
+import org.apache.wookie.beans.jcr.IdCollection;
+import org.apache.wookie.beans.jcr.JCRPersistenceManager;
+
+/**
+ * WidgetImpl - JCR OCM IWidget implementation.
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+@Node(jcrType="wookie:widget", jcrMixinTypes="mix:referenceable", discriminator=false)
+public class WidgetImpl implements IWidget, IPathBean, IUuidBean
+{
+    @Field(path=true)
+    private String path;
+    
+    @Field(uuid=true)
+    private String uuid;
+    
+    @Field(jcrName="wookie:height")
+    private Integer height;
+    
+    @Field(jcrName="wookie:width")
+    private Integer width;
+    
+    @Field(jcrName="wookie:guid")
+    private String guid;
+
+    @Field(jcrName="wookie:widgetAuthor")
+    private String widgetAuthor;
+
+    @Field(jcrName="wookie:widgetAuthorEmail")
+    private String widgetAuthorEmail;
+
+    @Field(jcrName="wookie:widgetAuthorHref")
+    private String widgetAuthorHref;
+
+    @Field(jcrName="wookie:widgetVersion")
+    private String version;
+    
+    @org.apache.jackrabbit.ocm.mapper.impl.annotation.Collection(jcrName="wookie:widgetTypes", elementClassName=WidgetTypeImpl.class)
+    private Collection<WidgetTypeImpl> widgetTypeImpls;
+    
+    @org.apache.jackrabbit.ocm.mapper.impl.annotation.Collection(jcrName="wookie:features", elementClassName=FeatureImpl.class)
+    private Collection<FeatureImpl> featureImpls;
+    
+    @org.apache.jackrabbit.ocm.mapper.impl.annotation.Collection(jcrName="wookie:widgetIcons", elementClassName=WidgetIconImpl.class)
+    private Collection<WidgetIconImpl> widgetIconImpls;
+    
+    @org.apache.jackrabbit.ocm.mapper.impl.annotation.Collection(jcrName="wookie:licenses", elementClassName=LicenseImpl.class)
+    private Collection<LicenseImpl> licenseImpls;
+    
+    @org.apache.jackrabbit.ocm.mapper.impl.annotation.Collection(jcrName="wookie:names", elementClassName=NameImpl.class)
+    private Collection<NameImpl> nameImpls;
+    
+    @org.apache.jackrabbit.ocm.mapper.impl.annotation.Collection(jcrName="wookie:descriptions", elementClassName=DescriptionImpl.class)
+    private Collection<DescriptionImpl> descriptionImpls;
+    
+    @org.apache.jackrabbit.ocm.mapper.impl.annotation.Collection(jcrName="wookie:startFiles", elementClassName=StartFileImpl.class)
+    private Collection<StartFileImpl> startFileImpls;
+    
+    @org.apache.jackrabbit.ocm.mapper.impl.annotation.Collection(jcrName="wookie:preferenceDefaults", elementClassName=PreferenceDefaultImpl.class)
+    private Collection<PreferenceDefaultImpl> preferenceDefaultImpls;
+    
+    @org.apache.jackrabbit.ocm.mapper.impl.annotation.Collection(jcrName="wookie:sharedData", elementClassName=SharedDataImpl.class)
+    private Collection<SharedDataImpl> sharedDataImpls;
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getDescriptions()
+     */
+    public Collection<IDescription> getDescriptions()
+    {
+        if (descriptionImpls == null)
+        {
+            descriptionImpls = new ArrayList<DescriptionImpl>();
+        }
+        return new IdCollection<DescriptionImpl,IDescription>(descriptionImpls);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setDescriptions(java.util.Collection)
+     */
+    public void setDescriptions(Collection<IDescription> descriptions)
+    {
+        getDescriptions().clear();
+        if (descriptions != null)
+        {
+            for (IDescription description : descriptions)
+            {
+                getDescriptions().add((DescriptionImpl)description);
+            }
+        }
+    }
+
+    /**
+     * Get description implementations collection.
+     * 
+     * @return description implementations collection
+     */
+    public Collection<DescriptionImpl> getDescriptionImpls()
+    {
+        return descriptionImpls;
+    }
+
+    /**
+     * Set description implementations collection.
+     * 
+     * @param descriptionImpls description implementations collection
+     */
+    public void setDescriptionImpls(Collection<DescriptionImpl> descriptionImpls)
+    {
+        this.descriptionImpls = descriptionImpls;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getFeatures()
+     */
+    public Collection<IFeature> getFeatures()
+    {
+        if (featureImpls == null)
+        {
+            featureImpls = new ArrayList<FeatureImpl>();
+        }
+        return new IdCollection<FeatureImpl,IFeature>(featureImpls);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setFeatures(java.util.Collection)
+     */
+    public void setFeatures(Collection<IFeature> features)
+    {
+        getFeatures().clear();
+        if (features != null)
+        {
+            for (IFeature feature : features)
+            {
+                getFeatures().add((FeatureImpl)feature);
+            }
+        }
+    }
+
+    /**
+     * Get feature implementations collection.
+     * 
+     * @return feature implementations collection
+     */
+    public Collection<FeatureImpl> getFeatureImpls()
+    {
+        return featureImpls;
+    }
+
+    /**
+     * Set feature implementations collection.
+     * 
+     * @param featureImpls feature implementations collection
+     */
+    public void setFeatureImpls(Collection<FeatureImpl> featureImpls)
+    {
+        this.featureImpls = featureImpls;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getGuid()
+     */
+    public String getGuid()
+    {
+        return guid;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setGuid(java.lang.String)
+     */
+    public void setGuid(String guid)
+    {
+        this.guid = guid;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getHeight()
+     */
+    public Integer getHeight()
+    {
+        return height;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setHeight(java.lang.Integer)
+     */
+    public void setHeight(Integer height)
+    {
+        this.height = height;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IBean#getId()
+     */
+    public String getId()
+    {
+        return path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getLicenses()
+     */
+    public Collection<ILicense> getLicenses()
+    {
+        if (licenseImpls == null)
+        {
+            licenseImpls = new ArrayList<LicenseImpl>();
+        }
+        return new IdCollection<LicenseImpl,ILicense>(licenseImpls);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setLicenses(java.util.Collection)
+     */
+    public void setLicenses(Collection<ILicense> licenses)
+    {
+        getLicenses().clear();
+        if (licenses != null)
+        {
+            for (ILicense license : licenses)
+            {
+                getLicenses().add((LicenseImpl)license);
+            }
+        }
+    }
+
+    /**
+     * Get license implementations collection.
+     * 
+     * @return license implementations collection
+     */
+    public Collection<LicenseImpl> getLicenseImpls()
+    {
+        return licenseImpls;
+    }
+
+    /**
+     * Set license implementations collection.
+     * 
+     * @param licenseImpls license implementations collection
+     */
+    public void setLicenseImpls(Collection<LicenseImpl> licenseImpls)
+    {
+        this.licenseImpls = licenseImpls;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getNames()
+     */
+    public Collection<IName> getNames()
+    {
+        if (nameImpls == null)
+        {
+            nameImpls = new ArrayList<NameImpl>();
+        }
+        return new IdCollection<NameImpl,IName>(nameImpls);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setNames(java.util.Collection)
+     */
+    public void setNames(Collection<IName> names)
+    {
+        getNames().clear();
+        if (names != null)
+        {
+            for (IName name : names)
+            {
+                getNames().add((NameImpl)name);
+            }
+        }
+    }
+
+    /**
+     * Get name implementations collection.
+     * 
+     * @return name implementations collection
+     */
+    public Collection<NameImpl> getNameImpls()
+    {
+        return nameImpls;
+    }
+
+    /**
+     * Set name implementations collection.
+     * 
+     * @param nameImpls name implementations collection
+     */
+    public void setNameImpls(Collection<NameImpl> nameImpls)
+    {
+        this.nameImpls = nameImpls;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IPathBean#getNodePath()
+     */
+    public String getNodePath()
+    {
+        return path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IPathBean#setNodePath(java.lang.String)
+     */
+    public String setNodePath(String nodeRootPath)
+    {
+        if (path == null)
+        {
+            path = nodeRootPath+"/"+JCRPersistenceManager.escapeJCRName(guid);
+        }
+        return path;
+    }
+
+    /**
+     * Get raw persistent JCR absolute node path.
+     * 
+     * @return absolute path
+     */
+    public String getPath()
+    {
+        return path;
+    }
+
+    /**
+     * Set raw persistent JCR absolute node path.
+     * 
+     * @param path absolute path
+     */
+    public void setPath(String path)
+    {
+        this.path = path;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getPreferenceDefaults()
+     */
+    public Collection<IPreferenceDefault> getPreferenceDefaults()
+    {
+        if (preferenceDefaultImpls == null)
+        {
+            preferenceDefaultImpls = new ArrayList<PreferenceDefaultImpl>();
+        }
+        return new IdCollection<PreferenceDefaultImpl,IPreferenceDefault>(preferenceDefaultImpls);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setPreferenceDefaults(java.util.Collection)
+     */
+    public void setPreferenceDefaults(Collection<IPreferenceDefault> preferenceDefaults)
+    {
+        getPreferenceDefaults().clear();
+        if (preferenceDefaults != null)
+        {
+            for (IPreferenceDefault preferenceDefault : preferenceDefaults)
+            {
+                getPreferenceDefaults().add((PreferenceDefaultImpl)preferenceDefault);
+            }
+        }
+    }
+
+    /**
+     * Get preference default implementations collection.
+     * 
+     * @return preference default implementations collection
+     */
+    public Collection<PreferenceDefaultImpl> getPreferenceDefaultImpls()
+    {
+        return preferenceDefaultImpls;
+    }
+
+    /**
+     * Set preference default implementations collection.
+     * 
+     * @param preferenceDefaultImpls preference default implementations collection
+     */
+    public void setPreferenceDefaultImpls(Collection<PreferenceDefaultImpl> preferenceDefaultImpls)
+    {
+        this.preferenceDefaultImpls = preferenceDefaultImpls;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getSharedData()
+     */
+    public Collection<ISharedData> getSharedData()
+    {
+        if (sharedDataImpls == null)
+        {
+            sharedDataImpls = new ArrayList<SharedDataImpl>();
+        }
+        return new IdCollection<SharedDataImpl,ISharedData>(sharedDataImpls);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setSharedData(java.util.Collection)
+     */
+    public void setSharedData(Collection<ISharedData> sharedData)
+    {
+        getSharedData().clear();
+        if (sharedData != null)
+        {
+            for (ISharedData data : sharedData)
+            {
+                getSharedData().add((SharedDataImpl)data);
+            }
+        }
+    }
+
+    /**
+     * Get shared data implementations collection.
+     * 
+     * @return shared data implementations collection
+     */
+    public Collection<SharedDataImpl> getSharedDataImpls()
+    {
+        return sharedDataImpls;
+    }
+
+    /**
+     * Set shared data implementations collection.
+     * 
+     * @param sharedDataImpls shared data implementations collection
+     */
+    public void setSharedDataImpls(Collection<SharedDataImpl> sharedDataImpls)
+    {
+        this.sharedDataImpls = sharedDataImpls;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getStartFiles()
+     */
+    public Collection<IStartFile> getStartFiles()
+    {
+        if (startFileImpls == null)
+        {
+            startFileImpls = new ArrayList<StartFileImpl>();
+        }
+        return new IdCollection<StartFileImpl,IStartFile>(startFileImpls);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setStartFiles(java.util.Collection)
+     */
+    public void setStartFiles(Collection<IStartFile> startFiles)
+    {
+        getStartFiles().clear();
+        if (startFiles != null)
+        {
+            for (IStartFile startFile : startFiles)
+            {
+                getStartFiles().add((StartFileImpl)startFile);
+            }
+        }
+    }
+
+    /**
+     * Get start file implementations collection.
+     * 
+     * @return start file implementations collection
+     */
+    public Collection<StartFileImpl> getStartFileImpls()
+    {
+        return startFileImpls;
+    }
+
+    /**
+     * Set start file implementations collection.
+     * 
+     * @param startFileImpls start file implementations collection
+     */
+    public void setStartFileImpls(Collection<StartFileImpl> startFileImpls)
+    {
+        this.startFileImpls = startFileImpls;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IUuidBean#getUuid()
+     */
+    public String getUuid()
+    {
+        return uuid;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.jcr.IUuidBean#setUuid(java.lang.String)
+     */
+    public void setUuid(String uuid)
+    {
+        this.uuid = uuid;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getVersion()
+     */
+    public String getVersion()
+    {
+        return version;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setVersion(java.lang.String)
+     */
+    public void setVersion(String version)
+    {
+        this.version = version;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getWidgetAuthor()
+     */
+    public String getWidgetAuthor()
+    {
+        return widgetAuthor;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setWidgetAuthor(java.lang.String)
+     */
+    public void setWidgetAuthor(String widgetAuthor)
+    {
+        this.widgetAuthor = widgetAuthor;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getWidgetAuthorEmail()
+     */
+    public String getWidgetAuthorEmail()
+    {
+        return widgetAuthorEmail;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setWidgetAuthorEmail(java.lang.String)
+     */
+    public void setWidgetAuthorEmail(String widgetAuthorEmail)
+    {
+        this.widgetAuthorEmail = widgetAuthorEmail;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getWidgetAuthorHref()
+     */
+    public String getWidgetAuthorHref()
+    {
+        return widgetAuthorHref;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setWidgetAuthorHref(java.lang.String)
+     */
+    public void setWidgetAuthorHref(String widgetAuthorHref)
+    {
+        this.widgetAuthorHref = widgetAuthorHref;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getWidgetIcons()
+     */
+    public Collection<IWidgetIcon> getWidgetIcons()
+    {
+        if (widgetIconImpls == null)
+        {
+            widgetIconImpls = new ArrayList<WidgetIconImpl>();
+        }
+        return new IdCollection<WidgetIconImpl,IWidgetIcon>(widgetIconImpls);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setWidgetIcons(java.util.Collection)
+     */
+    public void setWidgetIcons(Collection<IWidgetIcon> widgetIcons)
+    {
+        getWidgetIcons().clear();
+        if (widgetIcons != null)
+        {
+            for (IWidgetIcon widgetIcon : widgetIcons)
+            {
+                getWidgetIcons().add((WidgetIconImpl)widgetIcon);
+            }
+        }
+    }
+
+    /**
+     * Get widget icon implementations collection.
+     * 
+     * @return widget icon implementations collection
+     */
+    public Collection<WidgetIconImpl> getWidgetIconImpls()
+    {
+        return widgetIconImpls;
+    }
+
+    /**
+     * Set widget icon implementations collection.
+     * 
+     * @param widgetIconImpls widget icon implementations collection
+     */
+    public void setWidgetIconImpls(Collection<WidgetIconImpl> widgetIconImpls)
+    {
+        this.widgetIconImpls = widgetIconImpls;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getWidgetTypes()
+     */
+    public Collection<IWidgetType> getWidgetTypes()
+    {
+        if (widgetTypeImpls == null)
+        {
+            widgetTypeImpls = new ArrayList<WidgetTypeImpl>();
+        }
+        return new IdCollection<WidgetTypeImpl,IWidgetType>(widgetTypeImpls);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setWidgetTypes(java.util.Collection)
+     */
+    public void setWidgetTypes(Collection<IWidgetType> widgetTypes)
+    {
+        getWidgetTypes().clear();
+        if (widgetTypes != null)
+        {
+            for (IWidgetType widgetType : widgetTypes)
+            {
+                getWidgetTypes().add((WidgetTypeImpl)widgetType);
+            }
+        }
+    }
+
+    /**
+     * Get widget type implementations collection.
+     * 
+     * @return widget type implementations collection
+     */
+    public Collection<WidgetTypeImpl> getWidgetTypeImpls()
+    {
+        return widgetTypeImpls;
+    }
+
+    /**
+     * Set widget type implementations collection.
+     * 
+     * @param widgetTypeImpls widget type implementations collection
+     */
+    public void setWidgetTypeImpls(Collection<WidgetTypeImpl> widgetTypeImpls)
+    {
+        this.widgetTypeImpls = widgetTypeImpls;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getWidth()
+     */
+    public Integer getWidth()
+    {
+        return width;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#setWidth(java.lang.Integer)
+     */
+    public void setWidth(Integer width)
+    {
+        this.width = width;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getSharedData(java.lang.String)
+     */
+    public ISharedData [] getSharedData(String sharedDataKey)
+    {
+        return Utilities.getSharedData(this, sharedDataKey);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getSharedData(java.lang.String, java.lang.String)
+     */
+    public ISharedData getSharedData(String sharedDataKey, String name)
+    {
+        return Utilities.getSharedData(this, sharedDataKey, name);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getWidgetDescription()
+     */
+    public String getWidgetDescription()
+    {
+        return Utilities.getWidgetDescription(this, "en");
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getWidgetShortName()
+     */
+    public String getWidgetShortName()
+    {
+        return Utilities.getWidgetShortName(this, "en");
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getWidgetTitle()
+     */
+    public String getWidgetTitle()
+    {
+        return Utilities.getWidgetTitle(this, "en");
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getWidgetTitle(java.lang.String)
+     */
+    public String getWidgetTitle(String locale)
+    {
+        return Utilities.getWidgetTitle(this, locale);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getUrl()
+     */
+    public String getUrl()
+    {
+        return Utilities.getUrl(this, "en");
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.wookie.beans.IWidget#getWidgetIconLocation()
+     */
+    public String getWidgetIconLocation()
+    {
+        return Utilities.getWidgetIconLocation(this, "en");
+    }
+}