Author: julien_viet
Date: 2010-01-06 08:33:19 -0500 (Wed, 06 Jan 2010)
New Revision: 1174
Modified:
components/mop/trunk/core/pom.xml
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/MOPFormatter.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/GroupSite.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/GroupSiteContainer.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/NavigationContainer.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/NavigationImpl.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PageContainer.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PageImpl.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PageLinkImpl.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PortalSite.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PortalSiteContainer.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIBodyImpl.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIContainerImpl.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIWindowImpl.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/URLLinkImpl.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UserSite.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UserSiteContainer.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/WorkspaceImpl.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/ContextSpecialization.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/ContextType.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/ContextTypeContainer.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/CustomizationContainer.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/WorkspaceClone.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/WorkspaceCustomization.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/WorkspaceSpecialization.java
components/mop/trunk/core/src/main/resources/conf/mop-nodetypes.xml
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/POMFormatterTestCase.java
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/workspace/NameEncodingTestCase.java
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/gadget/GadgetContentProvider.java
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/gadget/GadgetState.java
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/portlet/PortletContentProvider.java
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/portlet/PortletPreferenceState.java
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/portlet/PortletPreferencesState.java
components/mop/trunk/core/src/test/resources/conf/content-nodetypes.xml
Log:
- use mop: prefix for children name and properties
- update to chromattic 1.0.0-beta13
Modified: components/mop/trunk/core/pom.xml
===================================================================
--- components/mop/trunk/core/pom.xml 2010-01-06 11:25:14 UTC (rev 1173)
+++ components/mop/trunk/core/pom.xml 2010-01-06 13:33:19 UTC (rev 1174)
@@ -56,14 +56,14 @@
<dependency>
<groupId>org.chromattic</groupId>
- <version>1.0.0-beta9</version>
+ <version>1.0.0-beta13</version>
<artifactId>chromattic.api</artifactId>
</dependency>
<dependency>
<groupId>org.chromattic</groupId>
<artifactId>chromattic.apt</artifactId>
- <version>1.0.0-beta9</version>
+ <version>1.0.0-beta13</version>
<scope>compile</scope>
</dependency>
@@ -83,20 +83,20 @@
<dependency>
<groupId>org.chromattic</groupId>
<artifactId>chromattic.common</artifactId>
- <version>1.0.0-beta9</version>
+ <version>1.0.0-beta13</version>
</dependency>
<dependency>
<groupId>org.chromattic</groupId>
<artifactId>chromattic.core</artifactId>
- <version>1.0.0-beta9</version>
+ <version>1.0.0-beta13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.chromattic</groupId>
<artifactId>chromattic.exo</artifactId>
- <version>1.0.0-beta9</version>
+ <version>1.0.0-beta13</version>
<scope>test</scope>
</dependency>
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/MOPFormatter.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/MOPFormatter.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/MOPFormatter.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -114,6 +114,11 @@
public String decodeNodeName(FormatterContext context, String internalName)
{
+ if (!internalName.startsWith("mop:"))
+ {
+ throw new IllegalStateException("Incorrect internal name " +
internalName);
+ }
+ internalName = internalName.substring(4);
int length = internalName.length();
for (int i = 0; i < length; i++)
{
@@ -151,24 +156,31 @@
public String encodeNodeName(FormatterContext context, String externalName)
{
int length = externalName.length();
+
+ //
for (int i = 0; i < length; i++)
{
char c = externalName.charAt(i);
if (isSpecialChar(c))
{
- return encode(externalName, i);
+ externalName = encode(externalName, i);
+ break;
}
}
- return externalName;
+
+ //
+ return "mop:" + externalName;
}
+/*
public String decodePropertyName(FormatterContext context, String internalName)
{
- return internalName;
+ return decodeNodeName(context, internalName);
}
public String encodePropertyName(FormatterContext context, String externalName)
{
- return externalName;
+ return encodeNodeName(context, externalName);
}
+*/
}
\ No newline at end of file
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/GroupSite.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/GroupSite.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/GroupSite.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,7 +18,7 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.PrimaryType;
import org.gatein.mop.api.workspace.ObjectType;
import org.gatein.mop.api.workspace.Site;
@@ -26,7 +26,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:groupsite")
+@PrimaryType(name = "mop:groupsite")
public abstract class GroupSite extends SiteImpl
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/GroupSiteContainer.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/GroupSiteContainer.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/GroupSiteContainer.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,14 +18,14 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.RelatedMappedBy;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:groupsites")
+@PrimaryType(name = "mop:groupsites")
public abstract class GroupSiteContainer extends SiteContainer<GroupSite>
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/NavigationContainer.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/NavigationContainer.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/NavigationContainer.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,10 +18,10 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.OneToMany;
import org.chromattic.api.annotations.OneToOne;
import org.chromattic.api.annotations.Create;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.RelatedMappedBy;
import java.util.List;
@@ -31,7 +31,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:navigationcontainer")
+@PrimaryType(name = "mop:navigationcontainer")
public abstract class NavigationContainer
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/NavigationImpl.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/NavigationImpl.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/NavigationImpl.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -22,8 +22,8 @@
import org.chromattic.api.annotations.Create;
import org.chromattic.api.annotations.MappedBy;
import org.chromattic.api.annotations.ManyToOne;
-import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.Destroy;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.RelatedMappedBy;
import org.chromattic.api.RelationshipType;
import org.gatein.mop.api.workspace.Navigation;
@@ -39,7 +39,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:navigation")
+@PrimaryType(name = "mop:navigation")
public abstract class NavigationImpl extends WorkspaceObjectImpl implements Navigation
{
@@ -70,7 +70,7 @@
public abstract PageLinkImpl createPageLink();
@ManyToOne(type = RelationshipType.PATH)
- @MappedBy("template")
+ @MappedBy("mop:template")
public abstract PageImpl getPageTemplate();
public abstract void setPageTemplate(PageImpl template);
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PageContainer.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PageContainer.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PageContainer.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -19,10 +19,10 @@
package org.gatein.mop.core.api.workspace;
import org.chromattic.api.annotations.FormattedBy;
-import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.OneToMany;
import org.chromattic.api.annotations.OneToOne;
import org.chromattic.api.annotations.Create;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.RelatedMappedBy;
import org.gatein.mop.core.api.MOPFormatter;
@@ -32,7 +32,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:pagecontainer")
+@PrimaryType(name = "mop:pagecontainer")
@FormattedBy(MOPFormatter.class)
public abstract class PageContainer
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PageImpl.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PageImpl.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PageImpl.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -21,8 +21,8 @@
import org.chromattic.api.annotations.OneToMany;
import org.chromattic.api.annotations.OneToOne;
import org.chromattic.api.annotations.ManyToOne;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.RelatedMappedBy;
-import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.MappedBy;
import org.chromattic.api.annotations.Destroy;
import org.chromattic.api.RelationshipType;
@@ -48,7 +48,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:page")
+@PrimaryType(name = "mop:page")
public abstract class PageImpl extends WorkspaceObjectImpl implements Page,
WorkspaceCustomizationContext
{
@@ -72,21 +72,21 @@
};
@ManyToOne(type = RelationshipType.PATH)
- @MappedBy("template")
+ @MappedBy("mop:template")
public abstract PageImpl getPageTemplate();
public abstract void setPageTemplate(PageImpl template);
@OneToMany(type = RelationshipType.PATH)
- @RelatedMappedBy("template")
+ @RelatedMappedBy("mop:template")
public abstract Collection<NavigationImpl> getTemplatizedNavigations();
@OneToMany(type = RelationshipType.PATH)
- @RelatedMappedBy("template")
+ @RelatedMappedBy("mop:template")
public abstract Collection<PageImpl> getTemplatizedPages();
@OneToMany(type = RelationshipType.PATH)
- @RelatedMappedBy("template")
+ @RelatedMappedBy("mop:template")
public abstract Collection<? extends WorkspaceObject> getTemplatizedObjects();
@OneToOne
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PageLinkImpl.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PageLinkImpl.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PageLinkImpl.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,9 +18,9 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.ManyToOne;
import org.chromattic.api.annotations.MappedBy;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.Property;
import org.chromattic.api.annotations.Path;
import org.chromattic.api.RelationshipType;
@@ -32,22 +32,16 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:pagelink")
+@PrimaryType(name = "mop:pagelink")
public abstract class PageLinkImpl extends LinkImpl implements PageLink
{
@ManyToOne(type = RelationshipType.PATH)
- @MappedBy("page")
+ @MappedBy("mop:page")
public abstract PageImpl getPage();
public abstract void setPage(PageImpl page);
- @Path
- @Property(name = "path")
- public abstract String getPathPath();
-
- public abstract void setPagePath(String path);
-
public void setPage(Page page)
{
setPage((PageImpl)page);
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PortalSite.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PortalSite.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PortalSite.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,7 +18,7 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.PrimaryType;
import org.gatein.mop.api.workspace.ObjectType;
import org.gatein.mop.api.workspace.Site;
@@ -26,7 +26,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:portalsite")
+@PrimaryType(name = "mop:portalsite")
public abstract class PortalSite extends SiteImpl
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PortalSiteContainer.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PortalSiteContainer.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/PortalSiteContainer.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,16 +18,14 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.RelatedMappedBy;
-import org.gatein.mop.core.api.workspace.SiteContainer;
-import org.gatein.mop.core.api.workspace.WorkspaceImpl;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:portalsites")
+@PrimaryType(name = "mop:portalsites")
public abstract class PortalSiteContainer extends SiteContainer<PortalSite>
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIBodyImpl.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIBodyImpl.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIBodyImpl.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,7 +18,7 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.PrimaryType;
import org.gatein.mop.api.workspace.ui.UIBody;
import org.gatein.mop.api.workspace.ObjectType;
@@ -26,7 +26,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:uibody")
+@PrimaryType(name = "mop:uibody")
public abstract class UIBodyImpl extends UIComponentImpl implements UIBody
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIContainerImpl.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIContainerImpl.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIContainerImpl.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,10 +18,10 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.OneToMany;
import org.chromattic.api.annotations.Create;
import org.chromattic.api.annotations.Name;
+import org.chromattic.api.annotations.PrimaryType;
import org.gatein.mop.api.workspace.ui.UIContainer;
import org.gatein.mop.api.workspace.ui.UIComponent;
import org.gatein.mop.api.workspace.ObjectType;
@@ -36,7 +36,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:uicontainer")
+@PrimaryType(name = "mop:uicontainer")
public abstract class UIContainerImpl extends UIComponentImpl implements UIContainer
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIWindowImpl.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIWindowImpl.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIWindowImpl.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,10 +18,10 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.OneToOne;
import org.chromattic.api.annotations.MappedBy;
import org.chromattic.api.annotations.Create;
+import org.chromattic.api.annotations.PrimaryType;
import org.gatein.mop.api.workspace.ui.UIWindow;
import org.gatein.mop.api.workspace.ObjectType;
import org.gatein.mop.api.workspace.WorkspaceCustomizationContext;
@@ -36,7 +36,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:uiwindow")
+@PrimaryType(name = "mop:uiwindow")
public abstract class UIWindowImpl extends UIComponentImpl implements UIWindow,
CustomizationContext
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/URLLinkImpl.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/URLLinkImpl.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/URLLinkImpl.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,7 +18,7 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.Property;
import org.gatein.mop.api.workspace.link.URLLink;
import org.gatein.mop.api.workspace.ObjectType;
@@ -27,11 +27,11 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:urllink")
+@PrimaryType(name = "mop:urllink")
public abstract class URLLinkImpl extends LinkImpl implements URLLink
{
- @Property(name = "url")
+ @Property(name = "mop:url")
public abstract String getURL();
public abstract void setURL(String url);
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UserSite.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UserSite.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UserSite.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,7 +18,7 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.PrimaryType;
import org.gatein.mop.core.api.workspace.SiteImpl;
import org.gatein.mop.api.workspace.ObjectType;
import org.gatein.mop.api.workspace.Site;
@@ -27,7 +27,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:usersite")
+@PrimaryType(name = "mop:usersite")
public abstract class UserSite extends SiteImpl
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UserSiteContainer.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UserSiteContainer.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UserSiteContainer.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,14 +18,14 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.RelatedMappedBy;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:usersites")
+@PrimaryType(name = "mop:usersites")
public abstract class UserSiteContainer extends SiteContainer<UserSite>
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/WorkspaceImpl.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/WorkspaceImpl.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/WorkspaceImpl.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,10 +18,10 @@
*/
package org.gatein.mop.core.api.workspace;
-import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.OneToOne;
import org.chromattic.api.annotations.MappedBy;
import org.chromattic.api.annotations.FindById;
+import org.chromattic.api.annotations.PrimaryType;
import org.gatein.mop.api.workspace.Workspace;
import org.gatein.mop.api.workspace.Site;
import org.gatein.mop.api.workspace.ObjectType;
@@ -37,7 +37,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:workspace")
+@PrimaryType(name = "mop:workspace")
public abstract class WorkspaceImpl extends WorkspaceObjectImpl implements Workspace,
WorkspaceCustomizationContext
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/ContextSpecialization.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/ContextSpecialization.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/ContextSpecialization.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -20,7 +20,7 @@
import org.chromattic.api.annotations.Name;
import org.chromattic.api.annotations.ManyToOne;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.PrimaryType;
import org.gatein.mop.api.content.CustomizationContext;
import org.gatein.mop.api.content.ContentType;
import org.gatein.mop.core.api.content.CustomizationContextResolver;
@@ -29,7 +29,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:contextspecialization")
+@PrimaryType(name = "mop:contextspecialization")
public abstract class ContextSpecialization extends AbstractCustomization
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/ContextType.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/ContextType.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/ContextType.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -20,9 +20,9 @@
import org.chromattic.api.annotations.FormattedBy;
import org.chromattic.api.annotations.OneToMany;
-import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.Name;
import org.chromattic.api.annotations.ManyToOne;
+import org.chromattic.api.annotations.PrimaryType;
import org.gatein.mop.core.api.MOPFormatter;
import java.util.Map;
@@ -31,7 +31,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:contexttype")
+@PrimaryType(name = "mop:contexttype")
@FormattedBy(MOPFormatter.class)
public abstract class ContextType
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/ContextTypeContainer.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/ContextTypeContainer.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/ContextTypeContainer.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -21,7 +21,7 @@
import org.chromattic.api.annotations.FormattedBy;
import org.chromattic.api.annotations.ManyToOne;
import org.chromattic.api.annotations.OneToMany;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.PrimaryType;
import org.gatein.mop.core.api.MOPFormatter;
import java.util.Map;
@@ -30,7 +30,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:contexttypecontainer")
+@PrimaryType(name = "mop:contexttypecontainer")
@FormattedBy(MOPFormatter.class)
public abstract class ContextTypeContainer
{
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/CustomizationContainer.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/CustomizationContainer.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/CustomizationContainer.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -19,13 +19,13 @@
package org.gatein.mop.core.api.workspace.content;
import org.chromattic.api.annotations.FormattedBy;
+import org.chromattic.api.annotations.PrimaryType;
import org.gatein.mop.api.content.Customization;
import org.gatein.mop.api.content.ContentType;
import org.gatein.mop.api.workspace.WorkspaceCustomizationContext;
import org.chromattic.api.annotations.Create;
import org.chromattic.api.annotations.OneToOne;
import org.chromattic.api.annotations.OneToMany;
-import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.RelatedMappedBy;
import org.gatein.mop.core.api.MOPFormatter;
@@ -35,13 +35,13 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:customizationcontainer")
+@PrimaryType(name = "mop:customizationcontainer")
@FormattedBy(MOPFormatter.class)
public abstract class CustomizationContainer
{
@OneToOne
- @RelatedMappedBy("customizations")
+ @RelatedMappedBy("mop:customizations")
public abstract WorkspaceCustomizationContext getOwner();
@OneToMany
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/WorkspaceClone.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/WorkspaceClone.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/WorkspaceClone.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,8 +18,7 @@
*/
package org.gatein.mop.core.api.workspace.content;
-import org.chromattic.api.annotations.Property;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.Name;
import org.chromattic.api.annotations.RelatedMappedBy;
import org.chromattic.api.annotations.OneToMany;
@@ -36,7 +35,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:workspaceclone")
+@PrimaryType(name = "mop:workspaceclone")
public abstract class WorkspaceClone extends WorkspaceCustomization
{
@@ -49,7 +48,7 @@
public abstract String getFooName();
@OneToMany(type = RelationshipType.PATH)
- @RelatedMappedBy("customization")
+ @RelatedMappedBy("mop:customization")
public abstract Collection<WorkspaceSpecialization> getSpecializations();
//
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/WorkspaceCustomization.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/WorkspaceCustomization.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/WorkspaceCustomization.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -33,12 +33,12 @@
public abstract class WorkspaceCustomization extends AbstractCustomization
{
- @Property(name = "mimetype")
+ @Property(name = "mop:mimetype")
public abstract String getMimeType();
public abstract void setMimeType(String mimeType);
- @Property(name = "contentid")
+ @Property(name = "mop:contentid")
public abstract String getContentId();
public abstract void setContentId(String contentId);
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/WorkspaceSpecialization.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/WorkspaceSpecialization.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/content/WorkspaceSpecialization.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,21 +18,21 @@
*/
package org.gatein.mop.core.api.workspace.content;
-import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.ManyToOne;
import org.chromattic.api.annotations.MappedBy;
import org.chromattic.api.RelationshipType;
+import org.chromattic.api.annotations.PrimaryType;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:workspacespecialization")
+@PrimaryType(name = "mop:workspacespecialization")
public abstract class WorkspaceSpecialization extends WorkspaceCustomization
{
@ManyToOne(type = RelationshipType.PATH)
- @MappedBy("customization")
+ @MappedBy("mop:customization")
public abstract WorkspaceCustomization getCustomization();
public abstract void setCustomization(WorkspaceCustomization customization);
Modified: components/mop/trunk/core/src/main/resources/conf/mop-nodetypes.xml
===================================================================
--- components/mop/trunk/core/src/main/resources/conf/mop-nodetypes.xml 2010-01-06
11:25:14 UTC (rev 1173)
+++ components/mop/trunk/core/src/main/resources/conf/mop-nodetypes.xml 2010-01-06
13:33:19 UTC (rev 1174)
@@ -63,13 +63,13 @@
<supertype>mix:referenceable</supertype>
</supertypes>
<childNodeDefinitions>
- <childNodeDefinition name="contexttypes"
defaultPrimaryType="mop:contexttypecontainer" autoCreated="true"
mandatory="false"
+ <childNodeDefinition name="mop:contexttypes"
defaultPrimaryType="mop:contexttypecontainer" autoCreated="true"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:contexttypecontainer</requiredPrimaryType>
</requiredPrimaryTypes>
</childNodeDefinition>
- <childNodeDefinition name="state"
defaultPrimaryType="mop:customizationstate" autoCreated="false"
mandatory="false"
+ <childNodeDefinition name="mop:state"
defaultPrimaryType="mop:customizationstate" autoCreated="false"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:customizationstate</requiredPrimaryType>
@@ -85,10 +85,10 @@
<supertype>mop:customization</supertype>
</supertypes>
<propertyDefinitions>
- <propertyDefinition name="contentid" requiredType="String"
autoCreated="false" mandatory="true" onParentVersion="COPY"
protected="false" multiple="false">
+ <propertyDefinition name="mop:contentid"
requiredType="String" autoCreated="false" mandatory="true"
onParentVersion="COPY" protected="false"
multiple="false">
<valueConstraints/>
</propertyDefinition>
- <propertyDefinition name="mimetype" requiredType="String"
autoCreated="false" mandatory="true" onParentVersion="COPY"
protected="false" multiple="false">
+ <propertyDefinition name="mop:mimetype"
requiredType="String" autoCreated="false" mandatory="true"
onParentVersion="COPY" protected="false"
multiple="false">
<valueConstraints/>
</propertyDefinition>
</propertyDefinitions>
@@ -105,7 +105,7 @@
<supertype>mop:workspacecustomization</supertype>
</supertypes>
<propertyDefinitions>
- <propertyDefinition name="customization" requiredType="Path"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
+ <propertyDefinition name="mop:customization"
requiredType="Path" autoCreated="false" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="false">
<valueConstraints/>
</propertyDefinition>
</propertyDefinitions>
@@ -137,7 +137,7 @@
<supertype>nt:base</supertype>
</supertypes>
<childNodeDefinitions>
- <childNodeDefinition name="customizations"
defaultPrimaryType="mop:customizationcontainer" autoCreated="true"
mandatory="false"
+ <childNodeDefinition name="mop:customizations"
defaultPrimaryType="mop:customizationcontainer" autoCreated="true"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:customizationcontainer</requiredPrimaryType>
@@ -186,7 +186,7 @@
<supertype>mop:uicomponent</supertype>
</supertypes>
<childNodeDefinitions>
- <childNodeDefinition name="customization"
defaultPrimaryType="mop:workspacecustomization" autoCreated="false"
mandatory="false"
+ <childNodeDefinition name="mop:customization"
defaultPrimaryType="mop:workspacecustomization" autoCreated="false"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:workspacecustomization</requiredPrimaryType>
@@ -203,7 +203,7 @@
<nodeType name="mop:templatized" isMixin="true"
hasOrderableChildNodes="false" primaryItemName="">
<propertyDefinitions>
- <propertyDefinition name="template" requiredType="Path"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
+ <propertyDefinition name="mop:template" requiredType="Path"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
<valueConstraints/>
</propertyDefinition>
</propertyDefinitions>
@@ -215,13 +215,13 @@
<supertype>mop:templatized</supertype>
</supertypes>
<childNodeDefinitions>
- <childNodeDefinition name="children"
defaultPrimaryType="mop:navigationcontainer" autoCreated="true"
mandatory="false"
+ <childNodeDefinition name="mop:children"
defaultPrimaryType="mop:navigationcontainer" autoCreated="true"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:navigationcontainer</requiredPrimaryType>
</requiredPrimaryTypes>
</childNodeDefinition>
- <childNodeDefinition name="link"
defaultPrimaryType="mop:link" autoCreated="false"
mandatory="false"
+ <childNodeDefinition name="mop:link"
defaultPrimaryType="mop:link" autoCreated="false"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:link</requiredPrimaryType>
@@ -256,7 +256,7 @@
<supertype>mop:link</supertype>
</supertypes>
<propertyDefinitions>
- <propertyDefinition name="page" requiredType="Path"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
+ <propertyDefinition name="mop:page" requiredType="Path"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
<valueConstraints/>
</propertyDefinition>
</propertyDefinitions>
@@ -267,7 +267,7 @@
<supertype>mop:link</supertype>
</supertypes>
<propertyDefinitions>
- <propertyDefinition name="url" requiredType="String"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
+ <propertyDefinition name="mop:url" requiredType="String"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
<valueConstraints/>
</propertyDefinition>
</propertyDefinitions>
@@ -280,13 +280,13 @@
<supertype>mop:customizationcontext</supertype>
</supertypes>
<childNodeDefinitions>
- <childNodeDefinition name="children"
defaultPrimaryType="mop:pagecontainer" autoCreated="true"
mandatory="false"
+ <childNodeDefinition name="mop:children"
defaultPrimaryType="mop:pagecontainer" autoCreated="true"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:pagecontainer</requiredPrimaryType>
</requiredPrimaryTypes>
</childNodeDefinition>
- <childNodeDefinition name="rootcomponent"
defaultPrimaryType="mop:uicontainer" autoCreated="true"
mandatory="false"
+ <childNodeDefinition name="mop:rootcomponent"
defaultPrimaryType="mop:uicontainer" autoCreated="true"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:uicontainer</requiredPrimaryType>
@@ -316,13 +316,13 @@
<supertype>mop:customizationcontext</supertype>
</supertypes>
<childNodeDefinitions>
- <childNodeDefinition name="rootpage"
defaultPrimaryType="mop:page" autoCreated="true"
mandatory="false"
+ <childNodeDefinition name="mop:rootpage"
defaultPrimaryType="mop:page" autoCreated="true"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:page</requiredPrimaryType>
</requiredPrimaryTypes>
</childNodeDefinition>
- <childNodeDefinition name="rootnavigation"
defaultPrimaryType="mop:navigation" autoCreated="true"
mandatory="false"
+ <childNodeDefinition name="mop:rootnavigation"
defaultPrimaryType="mop:navigation" autoCreated="true"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:navigation</requiredPrimaryType>
@@ -400,19 +400,19 @@
<supertype>mop:customizationcontext</supertype>
</supertypes>
<childNodeDefinitions>
- <childNodeDefinition name="portalsites"
defaultPrimaryType="mop:portalsites" autoCreated="true"
mandatory="false"
+ <childNodeDefinition name="mop:portalsites"
defaultPrimaryType="mop:portalsites" autoCreated="true"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:portalsites</requiredPrimaryType>
</requiredPrimaryTypes>
</childNodeDefinition>
- <childNodeDefinition name="groupsites"
defaultPrimaryType="mop:groupsites" autoCreated="true"
mandatory="false"
+ <childNodeDefinition name="mop:groupsites"
defaultPrimaryType="mop:groupsites" autoCreated="true"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:groupsites</requiredPrimaryType>
</requiredPrimaryTypes>
</childNodeDefinition>
- <childNodeDefinition name="usersites"
defaultPrimaryType="mop:usersites" autoCreated="true"
mandatory="false"
+ <childNodeDefinition name="mop:usersites"
defaultPrimaryType="mop:usersites" autoCreated="true"
mandatory="false"
onParentVersion="COPY" protected="false"
sameNameSiblings="false">
<requiredPrimaryTypes>
<requiredPrimaryType>mop:usersites</requiredPrimaryType>
Modified:
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/POMFormatterTestCase.java
===================================================================
---
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/POMFormatterTestCase.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/POMFormatterTestCase.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -51,19 +51,19 @@
public void testStrings()
{
- assertString("", "");
- assertString("a", "a");
- assertString("%00", "{");
- assertString("%01", "}");
- assertString("%02", ".");
- assertString("%03", "/");
- assertString("%04", ":");
- assertString("%05", "[");
- assertString("%06", "]");
- assertString("%07", "|");
- assertString("%08", "*");
- assertString("%09", "%");
- assertString("a%03b", "a/b");
+ assertString("mop:", "");
+ assertString("mop:a", "a");
+ assertString("mop:%00", "{");
+ assertString("mop:%01", "}");
+ assertString("mop:%02", ".");
+ assertString("mop:%03", "/");
+ assertString("mop:%04", ":");
+ assertString("mop:%05", "[");
+ assertString("mop:%06", "]");
+ assertString("mop:%07", "|");
+ assertString("mop:%08", "*");
+ assertString("mop:%09", "%");
+ assertString("mop:a%03b", "a/b");
}
public void testDecodeFailure()
Modified:
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/workspace/NameEncodingTestCase.java
===================================================================
---
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/workspace/NameEncodingTestCase.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/workspace/NameEncodingTestCase.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -41,6 +41,6 @@
Site site = workspace.addSite(ObjectType.GROUP_SITE, ":");
DomainSession session = (DomainSession)model.getSession();
Node siteNode = session.getNode(site);
- assertEquals("%04", siteNode.getName());
+ assertEquals("mop:%04", siteNode.getName());
}
}
Modified:
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/gadget/GadgetContentProvider.java
===================================================================
---
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/gadget/GadgetContentProvider.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/gadget/GadgetContentProvider.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -50,9 +50,9 @@
//
GadgetState prefs;
- if (node.hasNode("state"))
+ if (node.hasNode("mop:state"))
{
- Node stateNode = node.getNode("state");
+ Node stateNode = node.getNode("mop:state");
prefs = (GadgetState)session.findById(Object.class, stateNode.getUUID());
if (state == null)
{
@@ -68,7 +68,7 @@
}
else
{
- Node stateNode = node.addNode("state", "mop:gadget");
+ Node stateNode = node.addNode("mop:state",
"mop:gadget");
prefs = (GadgetState)session.findById(Object.class, stateNode.getUUID());
}
}
@@ -92,9 +92,9 @@
//
GadgetState prefs;
- if (node.hasNode("state"))
+ if (node.hasNode("mop:state"))
{
- Node stateNode = node.getNode("state");
+ Node stateNode = node.getNode("mop:state");
prefs = (GadgetState)session.findById(Object.class, stateNode.getUUID());
Gadget gadget = new Gadget();
gadget.setUserPref(prefs.getUserPrefs());
Modified:
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/gadget/GadgetState.java
===================================================================
---
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/gadget/GadgetState.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/gadget/GadgetState.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,18 +18,18 @@
*/
package org.gatein.mop.core.support.content.gadget;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.Property;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:gadget")
+@PrimaryType(name = "mop:gadget")
public abstract class GadgetState
{
- @Property(name = "prefs")
+ @Property(name = "mop:prefs")
public abstract String getUserPrefs();
public abstract void setUserPrefs(String userPrefs);
Modified:
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/portlet/PortletContentProvider.java
===================================================================
---
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/portlet/PortletContentProvider.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/portlet/PortletContentProvider.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -68,9 +68,9 @@
//
PortletPreferencesState prefs;
- if (node.hasNode("state"))
+ if (node.hasNode("mop:state"))
{
- Node stateNode = node.getNode("state");
+ Node stateNode = node.getNode("mop:state");
prefs = (PortletPreferencesState)session.findById(Object.class,
stateNode.getUUID());
if (state == null)
{
@@ -86,7 +86,7 @@
}
else
{
- Node stateNode = node.addNode("state",
"mop:portletpreferences");
+ Node stateNode = node.addNode("mop:state",
"mop:portletpreferences");
prefs = (PortletPreferencesState)session.findById(Object.class,
stateNode.getUUID());
}
}
@@ -110,9 +110,9 @@
//
PortletPreferencesState prefs;
- if (node.hasNode("state"))
+ if (node.hasNode("mop:state"))
{
- Node stateNode = node.getNode("state");
+ Node stateNode = node.getNode("mop:state");
prefs = (PortletPreferencesState)session.findById(Object.class,
stateNode.getUUID());
return (Preferences)prefs.getPayload();
}
Modified:
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/portlet/PortletPreferenceState.java
===================================================================
---
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/portlet/PortletPreferenceState.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/portlet/PortletPreferenceState.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,10 +18,12 @@
*/
package org.gatein.mop.core.support.content.portlet;
-import org.chromattic.api.annotations.NodeMapping;
+import org.chromattic.api.annotations.FormattedBy;
import org.chromattic.api.annotations.ManyToOne;
import org.chromattic.api.annotations.Name;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.Property;
+import org.gatein.mop.core.api.MOPFormatter;
import java.util.List;
@@ -29,7 +31,8 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:portletpreference")
+@PrimaryType(name = "mop:portletpreference")
+(a)FormattedBy(MOPFormatter.class)
public abstract class PortletPreferenceState
{
@@ -39,17 +42,17 @@
@Name
public abstract String getName();
- @Property(name = "value")
+ @Property(name = "mop:value")
public abstract List<String> getValue();
public abstract void setValue(List<String> value);
- @Property(name = "value")
+ @Property(name = "mop:value")
public abstract List<String> getValues();
public abstract void setValues(List<String> value);
- @Property(name = "readonly")
+ @Property(name = "mop:readonly")
public abstract boolean getReadOnly();
public abstract void setReadOnly(boolean readOnly);
Modified:
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/portlet/PortletPreferencesState.java
===================================================================
---
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/portlet/PortletPreferencesState.java 2010-01-06
11:25:14 UTC (rev 1173)
+++
components/mop/trunk/core/src/test/java/org/gatein/mop/core/support/content/portlet/PortletPreferencesState.java 2010-01-06
13:33:19 UTC (rev 1174)
@@ -18,14 +18,11 @@
*/
package org.gatein.mop.core.support.content.portlet;
-import org.chromattic.api.annotations.NodeMapping;
import org.chromattic.api.annotations.OneToMany;
import org.chromattic.api.annotations.Create;
import org.chromattic.api.annotations.OneToOne;
+import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.RelatedMappedBy;
-import org.gatein.mop.core.support.content.portlet.Preferences;
-import org.gatein.mop.core.support.content.portlet.Preference;
-import org.gatein.mop.core.support.content.portlet.PreferencesBuilder;
import org.gatein.mop.core.api.workspace.content.AbstractCustomization;
import java.util.Map;
@@ -34,7 +31,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-@NodeMapping(name = "mop:portletpreferences")
+@PrimaryType(name = "mop:portletpreferences")
public abstract class PortletPreferencesState
{
Modified: components/mop/trunk/core/src/test/resources/conf/content-nodetypes.xml
===================================================================
--- components/mop/trunk/core/src/test/resources/conf/content-nodetypes.xml 2010-01-06
11:25:14 UTC (rev 1173)
+++ components/mop/trunk/core/src/test/resources/conf/content-nodetypes.xml 2010-01-06
13:33:19 UTC (rev 1174)
@@ -40,10 +40,10 @@
<supertype>mix:referenceable</supertype>
</supertypes>
<propertyDefinitions>
- <propertyDefinition name="value" requiredType="String"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="true">
+ <propertyDefinition name="mop:value" requiredType="String"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="true">
<valueConstraints/>
</propertyDefinition>
- <propertyDefinition name="readonly" requiredType="Boolean"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
+ <propertyDefinition name="mop:readonly"
requiredType="Boolean" autoCreated="false" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="false">
<valueConstraints/>
</propertyDefinition>
</propertyDefinitions>
@@ -54,7 +54,7 @@
<supertype>mop:customizationstate</supertype>
</supertypes>
<propertyDefinitions>
- <propertyDefinition name="prefs" requiredType="String"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
+ <propertyDefinition name="mop:prefs" requiredType="String"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
<valueConstraints/>
</propertyDefinition>
</propertyDefinitions>