From portal-commits at lists.jboss.org Tue Jan 23 11:46:21 2007 Content-Type: multipart/mixed; boundary="===============3568685205915524253==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r6082 - in trunk: core/src/main/org/jboss/portal/core/impl/model/content/portlet and 12 other directories. Date: Tue, 23 Jan 2007 11:46:20 -0500 Message-ID: --===============3568685205915524253== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-01-23 11:46:19 -0500 (Tue, 23 Jan 2007) New Revision: 6082 Added: trunk/core/src/main/org/jboss/portal/core/model/portal/metadata/ContentM= etaData.java trunk/core/src/resources/dtd/portal-object_2_6.dtd Removed: trunk/core/src/main/org/jboss/portal/core/impl/model/content/cms/CMSCont= entMetaData.java trunk/core/src/main/org/jboss/portal/core/impl/model/content/portlet/Por= tletContentMetaData.java trunk/core/src/main/org/jboss/portal/core/model/content/metadata/ Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/editor/CMSContentEdito= r.java trunk/core/src/main/org/jboss/portal/core/impl/model/content/cms/CMSCont= entHandler.java trunk/core/src/main/org/jboss/portal/core/impl/model/content/portlet/Por= tletContentHandler.java trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PageImpl.java trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.j= ava trunk/core/src/main/org/jboss/portal/core/model/content/spi/ContentHandl= er.java trunk/core/src/main/org/jboss/portal/core/model/portal/Page.java trunk/core/src/main/org/jboss/portal/core/model/portal/metadata/WindowMe= taData.java trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/AddWindowCon= text.java trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/PortletConte= ntEditor.java trunk/core/src/main/org/jboss/portal/core/portlet/management/actions/Add= WindowAction.java trunk/core/src/main/org/jboss/portal/test/core/model/content/NullContent= Handler.java trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObject= ContainerTestCase.java trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml Log: - simplified how window content metadata is build from XML - changed the schema of the content part of the window of portal object XML - added DTD for portal object, needs to be completed with comments Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/content/cms/= CMSContentHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/impl/model/content/cms/CMSCon= tentHandler.java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/core/impl/model/content/cms/CMSCon= tentHandler.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -26,9 +26,6 @@ import org.jboss.portal.core.model.content.spi.ContentState; import org.jboss.portal.core.impl.model.content.AbstractContentHandler; import org.jboss.portal.core.model.content.Content; -import org.jboss.portal.core.model.content.metadata.ContentMetaData; -import org.jboss.portal.common.util.XML; -import org.w3c.dom.Element; = /** * @author Julien Viet @@ -40,12 +37,4 @@ { return new CMSContent(state); } - - public ContentMetaData newMetaData(Element windowElement) - { - CMSContentMetaData contentMD =3D new CMSContentMetaData(); - String instanceRef =3D XML.asString(XML.getUniqueChild(windowElement= , "uri", true)); - contentMD.setUri(instanceRef); - return contentMD; - } } Deleted: trunk/core/src/main/org/jboss/portal/core/impl/model/content/cms/C= MSContentMetaData.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/impl/model/content/cms/CMSCon= tentMetaData.java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/core/impl/model/content/cms/CMSCon= tentMetaData.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -1,53 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.core.impl.model.content.cms; - -import org.jboss.portal.core.model.content.metadata.ContentMetaData; -import org.jboss.portal.core.model.content.Content; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class CMSContentMetaData implements ContentMetaData -{ - - /** The instance handle of this window. */ - protected String uri; - - public String getUri() - { - return uri; - } - - public void setUri(String uri) - { - this.uri =3D uri; - } - - public void configure(Content content) - { - CMSContent pc =3D (CMSContent)content; - pc.setURI(uri); - } -} Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/content/port= let/PortletContentHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/impl/model/content/portlet/Po= rtletContentHandler.java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/core/impl/model/content/portlet/Po= rtletContentHandler.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -26,11 +26,8 @@ import org.jboss.portal.core.model.content.spi.ContentState; import org.jboss.portal.core.impl.model.content.AbstractContentHandler; import org.jboss.portal.core.model.content.Content; -import org.jboss.portal.core.model.content.metadata.ContentMetaData; import org.jboss.portal.core.model.instance.InstanceContainer; import org.jboss.portal.core.model.instance.Instance; -import org.jboss.portal.common.util.XML; -import org.w3c.dom.Element; = /** * @author Julien Viet @@ -57,14 +54,6 @@ return new PortletContent(this, contextId, state); } = - public ContentMetaData newMetaData(Element windowElement) - { - PortletContentMetaData contentMD =3D new PortletContentMetaData(); - String instanceRef =3D XML.asString(XML.getUniqueChild(windowElement= , "instance-ref", true)); - contentMD.setInstanceRef(instanceRef); - return contentMD; - } - public void destroyContent(String contextId, ContentState state) { String instanceRef =3D state.getURI(); Deleted: trunk/core/src/main/org/jboss/portal/core/impl/model/content/portl= et/PortletContentMetaData.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/impl/model/content/portlet/Po= rtletContentMetaData.java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/core/impl/model/content/portlet/Po= rtletContentMetaData.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -1,53 +0,0 @@ -/*************************************************************************= ***** - * JBoss, a division of Red Hat = * - * Copyright 2006, Red Hat Middleware, LLC, and individual = * - * contributors as indicated by the @authors tag. See the = * - * copyright.txt in the distribution for a full listing of = * - * individual contributors. = * - * = * - * This is free software; you can redistribute it and/or modify it = * - * under the terms of the GNU Lesser General Public License as = * - * published by the Free Software Foundation; either version 2.1 of = * - * the License, or (at your option) any later version. = * - * = * - * This software is distributed in the hope that it will be useful, = * - * but WITHOUT ANY WARRANTY; without even the implied warranty of = * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * - * Lesser General Public License for more details. = * - * = * - * You should have received a copy of the GNU Lesser General Public = * - * License along with this software; if not, write to the Free = * - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * - *************************************************************************= *****/ -package org.jboss.portal.core.impl.model.content.portlet; - -import org.jboss.portal.core.model.content.metadata.ContentMetaData; -import org.jboss.portal.core.model.content.Content; - -/** - * @author Julien Viet - * @version $Revision: 1.1 $ - */ -public class PortletContentMetaData implements ContentMetaData -{ - - /** The instance handle of this window. */ - protected String instanceRef; - - public String getInstanceRef() - { - return instanceRef; - } - - public void setInstanceRef(String instanceRef) - { - this.instanceRef =3D instanceRef; - } - - public void configure(Content content) - { - PortletContent pc =3D (PortletContent)content; - pc.setInstanceRef(instanceRef); - } -} Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PageI= mpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PageImpl.ja= va 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PageImpl.ja= va 2007-01-23 16:46:19 UTC (rev 6082) @@ -85,9 +85,9 @@ return null; } = - public Window createWindow(String name, ContentType contentType) throws= DuplicatePortalObjectException, IllegalArgumentException + public Window createWindow(String name, ContentType contentType, String= contentURI) throws DuplicatePortalObjectException, IllegalArgumentException { - WindowImpl window =3D new WindowImpl(contentType); + WindowImpl window =3D new WindowImpl(contentType, contentURI); addChild(name, window); return window; } Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/Windo= wImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.= java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.= java 2007-01-23 16:46:19 UTC (rev 6082) @@ -54,17 +54,17 @@ super(true); = // + this.contentType =3D null; this.instanceRef =3D null; - this.contentType =3D null; } = /** * Creates a new window. * * @param contentType the window content type - * @throws IllegalArgumentException if the content type is null + * @throws IllegalArgumentException if the content type is null or the = content URI is null */ - public WindowImpl(ContentType contentType) throws IllegalArgumentExcept= ion + public WindowImpl(ContentType contentType, String contentURI) throws Il= legalArgumentException { super(false); = @@ -73,10 +73,14 @@ { throw new IllegalArgumentException("No null content type accepted= "); } + if (contentURI =3D=3D null) + { + throw new IllegalArgumentException("No null content URI accepted"= ); + } = // - this.instanceRef =3D null; this.contentType =3D contentType; + this.instanceRef =3D contentURI; = // setDeclaredProperty(PORTAL_PROP_WINDOW_CONTENT_TYPE, contentType.toS= tring()); Modified: trunk/core/src/main/org/jboss/portal/core/model/content/spi/Conte= ntHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/model/content/spi/ContentHand= ler.java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/core/model/content/spi/ContentHand= ler.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -22,9 +22,7 @@ *************************************************************************= *****/ package org.jboss.portal.core.model.content.spi; = -import org.jboss.portal.core.model.content.metadata.ContentMetaData; import org.jboss.portal.core.model.content.Content; -import org.w3c.dom.Element; = /** * @author Julien Viet @@ -46,9 +44,4 @@ * Life cycle method to signal destruction. */ void destroyContent(String contextId, ContentState state); - - /** - * Factory method treate the window content meta data from XML. - */ - ContentMetaData newMetaData(Element windowElement); } Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/Page.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/model/portal/Page.java 2007-0= 1-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/core/model/portal/Page.java 2007-0= 1-23 16:46:19 UTC (rev 6082) @@ -54,9 +54,10 @@ * * @param name window name * @param contentType the window content type + * @param contentURI the window content URI * @return the created window * @throws DuplicatePortalObjectException if a portal object with the s= pecified name already exist * @throws IllegalArgumentException if the name is null */ - Window createWindow(String name, ContentType contentType) throws Duplic= atePortalObjectException, IllegalArgumentException; + Window createWindow(String name, ContentType contentType, String conten= tURI) throws DuplicatePortalObjectException, IllegalArgumentException; } Added: trunk/core/src/main/org/jboss/portal/core/model/portal/metadata/Cont= entMetaData.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/model/portal/metadata/Content= MetaData.java (rev 0) +++ trunk/core/src/main/org/jboss/portal/core/model/portal/metadata/Content= MetaData.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -0,0 +1,59 @@ +/*************************************************************************= ***** + * JBoss, a division of Red Hat = * + * Copyright 2006, Red Hat Middleware, LLC, and individual = * + * contributors as indicated by the @authors tag. See the = * + * copyright.txt in the distribution for a full listing of = * + * individual contributors. = * + * = * + * This is free software; you can redistribute it and/or modify it = * + * under the terms of the GNU Lesser General Public License as = * + * published by the Free Software Foundation; either version 2.1 of = * + * the License, or (at your option) any later version. = * + * = * + * This software is distributed in the hope that it will be useful, = * + * but WITHOUT ANY WARRANTY; without even the implied warranty of = * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU = * + * Lesser General Public License for more details. = * + * = * + * You should have received a copy of the GNU Lesser General Public = * + * License along with this software; if not, write to the Free = * + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA = * + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. = * + *************************************************************************= *****/ +package org.jboss.portal.core.model.portal.metadata; + +import org.jboss.portal.core.model.content.ContentType; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class ContentMetaData +{ + + /** . */ + private ContentType contentType; + + /** . */ + private String uri; + + public ContentType getContentType() + { + return contentType; + } + + public void setContentType(ContentType contentType) + { + this.contentType =3D contentType; + } + + public String getURI() + { + return uri; + } + + public void setURI(String uri) + { + this.uri =3D uri; + } +} Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/metadata/W= indowMetaData.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/model/portal/metadata/WindowM= etaData.java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/core/model/portal/metadata/WindowM= etaData.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -26,9 +26,7 @@ import org.jboss.portal.core.model.portal.PortalObject; import org.jboss.portal.core.model.portal.Window; import org.jboss.portal.core.model.content.ContentType; -import org.jboss.portal.core.model.content.metadata.ContentMetaData; import org.jboss.portal.core.model.content.spi.ContentHandlerRegistry; -import org.jboss.portal.core.model.content.spi.ContentHandler; import org.jboss.portal.theme.ThemeConstants; import org.jboss.portal.common.util.XML; import org.w3c.dom.Element; @@ -100,16 +98,13 @@ } = // - Window window =3D ((Page)parent).createWindow(getName(), contentType= ); + Window window =3D ((Page)parent).createWindow(getName(), content.get= ContentType(), content.getURI()); = // window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION, region= ); window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + or= der); = // - content.configure(window.getContent()); - - // return window; } = @@ -130,18 +125,31 @@ windowMD.setOrder(height); = // - ContentType contentType =3D ContentType.PORTLET; - Element contentTypeElt =3D XML.getUniqueChild(windowElt, "content-ty= pe", false); - if (contentTypeElt !=3D null) + ContentType contentType; + String contentURI; + Element instanceRefElt =3D XML.getUniqueChild(windowElt, "instance-r= ef", false); + if (instanceRefElt !=3D null) { - String value =3D XML.asString(contentTypeElt); - contentType =3D ContentType.create(value); + contentType =3D ContentType.PORTLET; + contentURI =3D XML.asString(instanceRefElt); } - windowMD.setContentType(contentType); + else + { + Element contentElt =3D XML.getUniqueChild(windowElt, "content", t= rue); + Element contentTypeElt =3D XML.getUniqueChild(contentElt, "conten= t-type", true); + Element contentURIElt =3D XML.getUniqueChild(contentElt, "content= -uri", true); = + // + contentType =3D ContentType.create(XML.asString(contentTypeElt)); + contentURI =3D XML.asString(contentURIElt); + } + // Build content meta data - ContentHandler handler =3D registry.getHandler(contentType); - ContentMetaData contentMD =3D handler.newMetaData(windowElt); + ContentMetaData contentMD =3D new ContentMetaData(); + contentMD.setContentType(contentType); + contentMD.setURI(contentURI); + + // windowMD.setContent(contentMD); = // Modified: trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/AddWi= ndowContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/AddWindowCo= ntext.java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/AddWindowCo= ntext.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -48,7 +48,7 @@ this.toRegion =3D toRegion; } = - public Content createWindow(ContentType contentType) + public Content createWindow(ContentType contentType, String contentURI) { try { @@ -57,7 +57,7 @@ { windowName =3D "" + doWindowNaming(); } - Window window =3D page.createWindow(windowName, contentType); + Window window =3D page.createWindow(windowName, contentType, cont= entURI); window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION, toR= egion); window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" += Integer.MAX_VALUE); return window.getContent(); Modified: trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/Portl= etContentEditor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/PortletCont= entEditor.java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/PortletCont= entEditor.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -80,8 +80,7 @@ Instance instance =3D instanceContainer.getDefinition(instance= Ref); if (instance !=3D null) { - PortletContent content =3D (PortletContent)ctx.createWindow= (ContentType.PORTLET); - content.setInstanceRef(instanceRef); + PortletContent content =3D (PortletContent)ctx.createWindow= (ContentType.PORTLET, instanceRef); } else { Modified: trunk/core/src/main/org/jboss/portal/core/portlet/management/acti= ons/AddWindowAction.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/core/portlet/management/actions/Ad= dWindowAction.java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/core/portlet/management/actions/Ad= dWindowAction.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -25,7 +25,6 @@ import org.jboss.portal.core.model.portal.Page; import org.jboss.portal.core.model.portal.Window; import org.jboss.portal.core.model.content.ContentType; -import org.jboss.portal.core.impl.model.content.portlet.PortletContent; import org.jboss.portal.core.portlet.management.PortalObjectManagerBean; import org.jboss.portal.theme.ThemeConstants; = @@ -121,13 +120,9 @@ Page page =3D (Page)pomgr.getSelectedObject(); = // - Window window =3D page.createWindow(windowName, ContentType.PORTL= ET); + Window window =3D page.createWindow(windowName, ContentType.PORTL= ET, instanceId); window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION, reg= ion); window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" += Integer.MAX_VALUE); - - // - PortletContent content =3D (PortletContent)window.getContent(); - content.setInstanceRef(instanceId); } catch (Exception e) { Modified: trunk/core/src/main/org/jboss/portal/test/core/model/content/Null= ContentHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/test/core/model/content/NullConten= tHandler.java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/test/core/model/content/NullConten= tHandler.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -24,7 +24,6 @@ = import org.jboss.portal.core.model.content.spi.ContentState; import org.jboss.portal.core.model.content.Content; -import org.jboss.portal.core.model.content.metadata.ContentMetaData; import org.jboss.portal.core.impl.model.content.AbstractContentHandler; import org.jboss.portal.common.NotYetImplemented; import org.w3c.dom.Element; @@ -47,9 +46,4 @@ public void destroyContent(String contextId, ContentState state) { } - - public ContentMetaData newMetaData(Element windowElement) - { - throw new NotYetImplemented(); - } } Modified: trunk/core/src/main/org/jboss/portal/test/core/model/portal/Porta= lObjectContainerTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjec= tContainerTestCase.java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjec= tContainerTestCase.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -174,7 +174,7 @@ assertEquals("bar3", page.getProperty("foo3")); = // - Window window =3D page.createWindow("default", ContentType.PORTLET); + Window window =3D page.createWindow("default", ContentType.PORTLET, = "uri"); assertNotNull(window); PortalObjectId windowId =3D window.getId(); assertNotNull(windowId); @@ -268,7 +268,7 @@ portal.getSupportedModes().add(Mode.VIEW); Page page =3D portal.createPage("default"); page.setDeclaredProperty("pagename", "pagevalue"); - Window window =3D page.createWindow("window", ContentType.PORTLET); + Window window =3D page.createWindow("window", ContentType.PORTLET, "= uri"); window.setDeclaredProperty("windowname", "windowvalue"); NullContent content =3D (NullContent)window.getContent(); assertNotNull(content); Added: trunk/core/src/resources/dtd/portal-object_2_6.dtd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/resources/dtd/portal-object_2_6.dtd = (rev 0) +++ trunk/core/src/resources/dtd/portal-object_2_6.dtd 2007-01-23 16:46:19 = UTC (rev 6082) @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: trunk/core/src/resources/portal-core-sar/conf/data/default-object= .xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml 2= 007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml 2= 007-01-23 16:46:19 UTC (rev 6082) @@ -91,10 +91,12 @@ CMSWindow - cms + + cms + /default/index.html + center 0 - /default/index.html UserPortletWindow @@ -263,10 +265,12 @@ CMSWindow - cms + + cms + /default/index.html + center 0 - /default/index.html UserPortletWindow Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/editor/CMSConte= ntEditor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/core-cms/src/main/org/jboss/portal/core/cms/editor/CMSContentEdit= or.java 2007-01-23 15:43:00 UTC (rev 6081) +++ trunk/core-cms/src/main/org/jboss/portal/core/cms/editor/CMSContentEdit= or.java 2007-01-23 16:46:19 UTC (rev 6082) @@ -82,8 +82,7 @@ for (int i =3D 0; i < files.length; i++) { String file =3D files[i]; - CMSContent content =3D (CMSContent)ctx.createWindow(ContentTyp= e.CMS); - content.setURI(file); + CMSContent content =3D (CMSContent)ctx.createWindow(ContentTyp= e.CMS, file); } } catch (Exception e) --===============3568685205915524253==--