portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r920481 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/ components/jetspeed-portal/src/main/java...
Date Mon, 08 Mar 2010 19:51:57 GMT
Author: woonsan
Date: Mon Mar  8 19:51:56 2010
New Revision: 920481

URL: http://svn.apache.org/viewvc?rev=920481&view=rev
Log:
JS2-1057: Adding page managment jax-rs service component.

Added:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseConcretePageElementBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseElementBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseFragmentsElementBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BasePageElementBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/DocumentBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/FolderBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/LinkBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/NodeBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageSecurityBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecuredResourceBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsDefBean.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java   (with props)
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/util/PathSegmentUtils.java   (with props)
Modified:
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-restful-services.xml

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseConcretePageElementBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseConcretePageElementBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseConcretePageElementBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseConcretePageElementBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.page.BaseConcretePageElement;
+import org.apache.jetspeed.om.page.Fragment;
+
+/**
+ * BasePageElementBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="baseConcretePageElement")
+public class BaseConcretePageElementBean extends BasePageElementBean
+{
+    private static final long serialVersionUID = 1L;
+    
+    private String effectiveDefaultLayoutDecorator;
+    private String effectiveDefaultPortletDecorator;
+    
+    public BaseConcretePageElementBean()
+    {
+        
+    }
+    
+    public BaseConcretePageElementBean(BaseConcretePageElement baseConcretePageElement)
+    {
+        super(baseConcretePageElement);
+        effectiveDefaultLayoutDecorator = baseConcretePageElement.getEffectiveDefaultDecorator(Fragment.LAYOUT);
+        effectiveDefaultPortletDecorator = baseConcretePageElement.getEffectiveDefaultDecorator(Fragment.PORTLET);
+    }
+
+    public String getEffectiveDefaultLayoutDecorator()
+    {
+        return effectiveDefaultLayoutDecorator;
+    }
+
+    public void setEffectiveDefaultLayoutDecorator(String effectiveDefaultLayoutDecorator)
+    {
+        this.effectiveDefaultLayoutDecorator = effectiveDefaultLayoutDecorator;
+    }
+
+    public String getEffectiveDefaultPortletDecorator()
+    {
+        return effectiveDefaultPortletDecorator;
+    }
+
+    public void setEffectiveDefaultPortletDecorator(String effectiveDefaultPortletDecorator)
+    {
+        this.effectiveDefaultPortletDecorator = effectiveDefaultPortletDecorator;
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseConcretePageElementBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseConcretePageElementBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseConcretePageElementBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseElementBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseElementBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseElementBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseElementBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.page.BaseElement;
+
+/**
+ * BaseElementBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="baseElement")
+public class BaseElementBean extends SecuredResourceBean
+{
+    private static final long serialVersionUID = 1L;
+    
+    private String id;
+    private String title;
+    private String shortTitle;
+    
+    public BaseElementBean()
+    {
+        
+    }
+    
+    public BaseElementBean(BaseElement baseElement)
+    {
+        super(baseElement);
+        id = baseElement.getId();
+        title = baseElement.getTitle();
+        shortTitle = baseElement.getShortTitle();
+    }
+
+    public String getId()
+    {
+        return id;
+    }
+
+    public void setId(String id)
+    {
+        this.id = id;
+    }
+
+    public String getTitle()
+    {
+        return title;
+    }
+
+    public void setTitle(String title)
+    {
+        this.title = title;
+    }
+
+    public String getShortTitle()
+    {
+        return shortTitle;
+    }
+
+    public void setShortTitle(String shortTitle)
+    {
+        this.shortTitle = shortTitle;
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseElementBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseElementBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseElementBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseFragmentsElementBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseFragmentsElementBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseFragmentsElementBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseFragmentsElementBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.page.BaseFragmentsElement;
+
+/**
+ * BaseFragmentsElementBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="baseFragmentsElement")
+public class BaseFragmentsElementBean extends DocumentBean
+{
+    private static final long serialVersionUID = 1L;
+    
+    public BaseFragmentsElementBean()
+    {
+        
+    }
+    
+    public BaseFragmentsElementBean(BaseFragmentsElement baseFragmentsElement)
+    {
+        super(baseFragmentsElement);
+    }
+
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseFragmentsElementBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseFragmentsElementBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BaseFragmentsElementBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BasePageElementBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BasePageElementBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BasePageElementBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BasePageElementBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.page.BasePageElement;
+import org.apache.jetspeed.om.page.Fragment;
+
+/**
+ * BasePageElementBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="basePageElement")
+public class BasePageElementBean extends BaseFragmentsElementBean
+{
+    private static final long serialVersionUID = 1L;
+    
+    private String skin;
+    private String defaultLayoutDecorator;
+    private String defaultPortletDecorator;
+    
+    public BasePageElementBean()
+    {
+        
+    }
+    
+    public BasePageElementBean(BasePageElement basePageElement)
+    {
+        super(basePageElement);
+        skin = basePageElement.getSkin();
+        defaultLayoutDecorator = basePageElement.getDefaultDecorator(Fragment.LAYOUT);
+        defaultPortletDecorator = basePageElement.getDefaultDecorator(Fragment.PORTLET);
+    }
+
+    public String getSkin()
+    {
+        return skin;
+    }
+
+    public void setSkin(String skin)
+    {
+        this.skin = skin;
+    }
+
+    public String getDefaultLayoutDecorator()
+    {
+        return defaultLayoutDecorator;
+    }
+
+    public void setDefaultLayoutDecorator(String defaultLayoutDecorator)
+    {
+        this.defaultLayoutDecorator = defaultLayoutDecorator;
+    }
+
+    public String getDefaultPortletDecorator()
+    {
+        return defaultPortletDecorator;
+    }
+
+    public void setDefaultPortletDecorator(String defaultPortletDecorator)
+    {
+        this.defaultPortletDecorator = defaultPortletDecorator;
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BasePageElementBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BasePageElementBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/BasePageElementBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/DocumentBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/DocumentBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/DocumentBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/DocumentBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.page.Document;
+
+/**
+ * DocumentBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="document")
+public class DocumentBean extends NodeBean
+{
+    private static final long serialVersionUID = 1L;
+    
+    private String version;
+    private boolean dirty;
+    
+    public DocumentBean()
+    {
+        
+    }
+    
+    public DocumentBean(Document document)
+    {
+        super(document);
+        version = document.getVersion();
+        dirty = document.isDirty();
+    }
+
+    public String getVersion()
+    {
+        return version;
+    }
+
+    public void setVersion(String version)
+    {
+        this.version = version;
+    }
+
+    public boolean isDirty()
+    {
+        return dirty;
+    }
+
+    public void setDirty(boolean dirty)
+    {
+        this.dirty = dirty;
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/DocumentBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/DocumentBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/DocumentBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/FolderBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/FolderBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/FolderBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/FolderBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.om.page.Fragment;
+import org.apache.jetspeed.om.page.PageSecurity;
+import org.apache.jetspeed.page.document.DocumentNotFoundException;
+import org.apache.jetspeed.page.document.NodeException;
+
+/**
+ * FolderBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="folder")
+public class FolderBean extends NodeBean
+{
+    private static final long serialVersionUID = 1L;
+    
+    private String skin;
+    private String effectiveDefaultLayoutDecorator;
+    private String effectiveDefaultPortletDecorator;
+    private String defaultLayoutDecorator;
+    private String defaultPortletDecorator;
+    private List<String> documentOrder;
+    private String defaultPage;
+    private boolean reserved;
+    private int reservedType;
+    private PageSecurityBean pageSecurityBean;
+    
+    public FolderBean()
+    {
+        
+    }
+    
+    public FolderBean(Folder folder) throws NodeException, DocumentNotFoundException
+    {
+        super(folder);
+        skin = folder.getSkin();
+        effectiveDefaultLayoutDecorator = folder.getEffectiveDefaultDecorator(Fragment.LAYOUT);
+        effectiveDefaultPortletDecorator = folder.getEffectiveDefaultDecorator(Fragment.PORTLET);
+        defaultLayoutDecorator = folder.getDefaultDecorator(Fragment.LAYOUT);
+        defaultPortletDecorator = folder.getDefaultDecorator(Fragment.PORTLET);
+        
+        List<String> temp = folder.getDocumentOrder();
+        if (temp != null)
+        {
+            documentOrder = new ArrayList<String>(temp);
+        }
+        
+        defaultPage = folder.getDefaultPage();
+        reserved = folder.isReserved();
+        reservedType = folder.getReservedType();
+        
+        PageSecurity pageSecurity = folder.getPageSecurity();
+        pageSecurityBean = new PageSecurityBean(pageSecurity);
+    }
+
+    public String getSkin()
+    {
+        return skin;
+    }
+
+    public void setSkin(String skin)
+    {
+        this.skin = skin;
+    }
+
+    public String getEffectiveDefaultLayoutDecorator()
+    {
+        return effectiveDefaultLayoutDecorator;
+    }
+
+    public void setEffectiveDefaultLayoutDecorator(String effectiveDefaultLayoutDecorator)
+    {
+        this.effectiveDefaultLayoutDecorator = effectiveDefaultLayoutDecorator;
+    }
+
+    public String getEffectiveDefaultPortletDecorator()
+    {
+        return effectiveDefaultPortletDecorator;
+    }
+
+    public void setEffectiveDefaultPortletDecorator(String effectiveDefaultPortletDecorator)
+    {
+        this.effectiveDefaultPortletDecorator = effectiveDefaultPortletDecorator;
+    }
+
+    public String getDefaultLayoutDecorator()
+    {
+        return defaultLayoutDecorator;
+    }
+
+    public void setDefaultLayoutDecorator(String defaultLayoutDecorator)
+    {
+        this.defaultLayoutDecorator = defaultLayoutDecorator;
+    }
+
+    public String getDefaultPortletDecorator()
+    {
+        return defaultPortletDecorator;
+    }
+
+    public void setDefaultPortletDecorator(String defaultPortletDecorator)
+    {
+        this.defaultPortletDecorator = defaultPortletDecorator;
+    }
+
+    public List<String> getDocumentOrder()
+    {
+        return documentOrder;
+    }
+
+    public void setDocumentOrder(List<String> documentOrder)
+    {
+        this.documentOrder = documentOrder;
+    }
+
+    public String getDefaultPage()
+    {
+        return defaultPage;
+    }
+
+    public void setDefaultPage(String defaultPage)
+    {
+        this.defaultPage = defaultPage;
+    }
+
+    public boolean isReserved()
+    {
+        return reserved;
+    }
+
+    public void setReserved(boolean reserved)
+    {
+        this.reserved = reserved;
+    }
+
+    public int getReservedType()
+    {
+        return reservedType;
+    }
+
+    public void setReservedType(int reservedType)
+    {
+        this.reservedType = reservedType;
+    }
+
+    @XmlElement(name="pageSecurity")
+    public PageSecurityBean getPageSecurityBean()
+    {
+        return pageSecurityBean;
+    }
+
+    public void setPageSecurityBean(PageSecurityBean pageSecurityBean)
+    {
+        this.pageSecurityBean = pageSecurityBean;
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/FolderBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/FolderBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/FolderBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/LinkBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/LinkBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/LinkBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/LinkBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.page.Link;
+
+/**
+ * LinkBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="link")
+public class LinkBean extends DocumentBean
+{
+    private static final long serialVersionUID = 1L;
+    
+    private String skin;
+    private String url;
+    private String target;
+    
+    public LinkBean()
+    {
+        
+    }
+    
+    public LinkBean(Link link)
+    {
+        super(link);
+        skin = link.getSkin();
+        url = link.getUrl();
+        target = link.getTarget();
+    }
+
+    public String getSkin()
+    {
+        return skin;
+    }
+
+    public void setSkin(String skin)
+    {
+        this.skin = skin;
+    }
+
+    public String getUrl()
+    {
+        return url;
+    }
+
+    public void setUrl(String url)
+    {
+        this.url = url;
+    }
+
+    public String getTarget()
+    {
+        return target;
+    }
+
+    public void setTarget(String target)
+    {
+        this.target = target;
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/LinkBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/LinkBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/LinkBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/NodeBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/NodeBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/NodeBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/NodeBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.portlet.GenericMetadata;
+import org.apache.jetspeed.page.document.Node;
+
+/**
+ * NodeBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="node")
+public class NodeBean extends BaseElementBean
+{
+    private static final long serialVersionUID = 1L;
+    
+    private String path;
+    private String name;
+    private GenericMetadataBean metadataBean;
+    private String type;
+    private String url;
+    private boolean hidden;
+    
+    public NodeBean()
+    {
+        
+    }
+    
+    public NodeBean(Node node)
+    {
+        super(node);
+        path = node.getPath();
+        name = node.getName();
+        
+        GenericMetadata metadata = node.getMetadata();
+        
+        if (metadata != null)
+        {
+            metadataBean = new GenericMetadataBean(metadata);
+        }
+        
+        type = node.getType();
+        url = node.getUrl();
+        hidden = node.isHidden();
+    }
+
+    public String getPath()
+    {
+        return path;
+    }
+
+    public void setPath(String path)
+    {
+        this.path = path;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    @XmlElement(name="metadata")
+    public GenericMetadataBean getMetadataBean()
+    {
+        return metadataBean;
+    }
+
+    public void setMetadataBean(GenericMetadataBean metadataBean)
+    {
+        this.metadataBean = metadataBean;
+    }
+
+    public String getType()
+    {
+        return type;
+    }
+
+    public void setType(String type)
+    {
+        this.type = type;
+    }
+
+    public String getUrl()
+    {
+        return url;
+    }
+
+    public void setUrl(String url)
+    {
+        this.url = url;
+    }
+
+    public boolean isHidden()
+    {
+        return hidden;
+    }
+
+    public void setHidden(boolean hidden)
+    {
+        this.hidden = hidden;
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/NodeBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/NodeBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/NodeBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.page.Page;
+
+/**
+ * PageBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="page")
+public class PageBean extends BaseConcretePageElementBean
+{
+    private static final long serialVersionUID = 1L;
+    
+    public PageBean()
+    {
+        
+    }
+    
+    public PageBean(Page page)
+    {
+        super(page);
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageSecurityBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageSecurityBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageSecurityBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageSecurityBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.page.PageSecurity;
+import org.apache.jetspeed.om.page.SecurityConstraintsDef;
+
+/**
+ * PageSecurityBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="pageSecurity")
+public class PageSecurityBean extends DocumentBean
+{
+    private static final long serialVersionUID = 1L;
+    
+    private List<SecurityConstraintsDefBean> securityConstraintsDefBeans;
+    private List<String> globalSecurityConstraintsRefs;
+    
+    public PageSecurityBean()
+    {
+        
+    }
+    
+    public PageSecurityBean(PageSecurity pageSecurity)
+    {
+        super(pageSecurity);
+        
+        List<SecurityConstraintsDef> securityConstraintsDefs = pageSecurity.getSecurityConstraintsDefs();
+        
+        if (securityConstraintsDefs != null)
+        {
+            securityConstraintsDefBeans = new ArrayList<SecurityConstraintsDefBean>();
+            
+            for (SecurityConstraintsDef securityConstraintsDef : securityConstraintsDefs)
+            {
+                securityConstraintsDefBeans.add(new SecurityConstraintsDefBean(securityConstraintsDef));
+            }
+        }
+        
+        List<String> temp = pageSecurity.getGlobalSecurityConstraintsRefs();
+        
+        if (temp != null)
+        {
+            globalSecurityConstraintsRefs = new ArrayList<String>(temp);
+        }
+    }
+
+    @XmlElementWrapper(name="securityConstraintsDefs")
+    @XmlElements(@XmlElement(name="securityConstraintsDef"))
+    public List<SecurityConstraintsDefBean> getSecurityConstraintsDefBeans()
+    {
+        return securityConstraintsDefBeans;
+    }
+
+    public void setSecurityConstraintsDefBeans(List<SecurityConstraintsDefBean> securityConstraintsDefBeans)
+    {
+        this.securityConstraintsDefBeans = securityConstraintsDefBeans;
+    }
+
+    @XmlElementWrapper(name="globalSecurityConstraintsRefs")
+    @XmlElements(@XmlElement(name="globalSecurityConstraintsRef"))
+    public List<String> getGlobalSecurityConstraintsRefs()
+    {
+        return globalSecurityConstraintsRefs;
+    }
+
+    public void setGlobalSecurityConstraintsRefs(List<String> globalSecurityConstraintsRefs)
+    {
+        this.globalSecurityConstraintsRefs = globalSecurityConstraintsRefs;
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageSecurityBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageSecurityBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/PageSecurityBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecuredResourceBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecuredResourceBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecuredResourceBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecuredResourceBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.common.SecuredResource;
+
+/**
+ * SecuredResourceBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="securedResource")
+public class SecuredResourceBean implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+    
+    private boolean constraintsEnabled;
+    
+    private boolean permissionsEnabled;
+    
+    private SecurityConstraintsBean securityConstraintsBean;
+    
+    public SecuredResourceBean()
+    {
+        
+    }
+    
+    public SecuredResourceBean(SecuredResource securedResource)
+    {
+        constraintsEnabled = securedResource.getConstraintsEnabled();
+        permissionsEnabled = securedResource.getPermissionsEnabled();
+    }
+
+    public boolean isConstraintsEnabled()
+    {
+        return constraintsEnabled;
+    }
+
+    public void setConstraintsEnabled(boolean constraintsEnabled)
+    {
+        this.constraintsEnabled = constraintsEnabled;
+    }
+
+    public boolean isPermissionsEnabled()
+    {
+        return permissionsEnabled;
+    }
+
+    public void setPermissionsEnabled(boolean permissionsEnabled)
+    {
+        this.permissionsEnabled = permissionsEnabled;
+    }
+
+    @XmlElement(name="securityConstraints")
+    public SecurityConstraintsBean getSecurityConstraintsBean()
+    {
+        return securityConstraintsBean;
+    }
+
+    public void setSecurityConstraintsBean(SecurityConstraintsBean securityConstraintsBean)
+    {
+        this.securityConstraintsBean = securityConstraintsBean;
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecuredResourceBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecuredResourceBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecuredResourceBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.common.SecurityConstraint;
+
+/**
+ * SecurityConstraintBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="securityConstraint")
+public class SecurityConstraintBean implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+    
+    private List<String> users;
+    private List<String> roles;
+    private List<String> groups;
+    private List<String> permissions;
+    
+    public SecurityConstraintBean()
+    {
+        
+    }
+    
+    public SecurityConstraintBean(SecurityConstraint securityConstraint)
+    {
+        List<String> temp = securityConstraint.getUsers();
+        
+        if (temp != null)
+        {
+            users = new ArrayList<String>(temp);
+        }
+        
+        temp = securityConstraint.getRoles();
+        
+        if (temp != null)
+        {
+            roles = new ArrayList<String>(temp);
+        }
+        
+        temp = securityConstraint.getGroups();
+        
+        if (temp != null)
+        {
+            groups = new ArrayList<String>(temp);
+        }
+
+        temp = securityConstraint.getPermissions();
+        
+        if (temp != null)
+        {
+            permissions = new ArrayList<String>(temp);
+        }
+    }
+
+    @XmlElementWrapper(name="users")
+    @XmlElements(@XmlElement(name="user"))
+    public List<String> getUsers()
+    {
+        return users;
+    }
+
+    public void setUsers(List<String> users)
+    {
+        this.users = users;
+    }
+
+    @XmlElementWrapper(name="roles")
+    @XmlElements(@XmlElement(name="role"))
+    public List<String> getRoles()
+    {
+        return roles;
+    }
+
+    public void setRoles(List<String> roles)
+    {
+        this.roles = roles;
+    }
+
+    @XmlElementWrapper(name="groups")
+    @XmlElements(@XmlElement(name="group"))
+    public List<String> getGroups()
+    {
+        return groups;
+    }
+
+    public void setGroups(List<String> groups)
+    {
+        this.groups = groups;
+    }
+
+    @XmlElementWrapper(name="permissions")
+    @XmlElements(@XmlElement(name="permission"))
+    public List<String> getPermissions()
+    {
+        return permissions;
+    }
+
+    public void setPermissions(List<String> permissions)
+    {
+        this.permissions = permissions;
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.common.SecurityConstraint;
+import org.apache.jetspeed.om.common.SecurityConstraints;
+
+/**
+ * SecurityConstraintsBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="securityConstraints")
+public class SecurityConstraintsBean implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+    
+    private String owner;
+    
+    private List<SecurityConstraintBean> securityConstraintBeans;
+    
+    private List<String> securityConstraintsRefs;
+    
+    private boolean empty;
+    
+    public SecurityConstraintsBean()
+    {
+        
+    }
+    
+    public SecurityConstraintsBean(SecurityConstraints securityConstraints)
+    {
+        owner = securityConstraints.getOwner();
+        
+        List<SecurityConstraint> securityConstraintList = securityConstraints.getSecurityConstraints();
+        
+        if (securityConstraintList != null)
+        {
+            securityConstraintBeans = new ArrayList<SecurityConstraintBean>();
+            
+            for (SecurityConstraint securityConstraint : securityConstraintList)
+            {
+                securityConstraintBeans.add(new SecurityConstraintBean(securityConstraint));
+            }
+        }
+        
+        List<String> temp = securityConstraints.getSecurityConstraintsRefs();
+        
+        if (temp != null)
+        {
+            securityConstraintsRefs = new ArrayList<String>(temp);
+        }
+        
+        empty = securityConstraints.isEmpty();
+    }
+
+    public String getOwner()
+    {
+        return owner;
+    }
+
+    public void setOwner(String owner)
+    {
+        this.owner = owner;
+    }
+
+    @XmlElementWrapper(name="securityConstraints")
+    @XmlElements(@XmlElement(name="securityConstraint"))
+    public List<SecurityConstraintBean> getSecurityConstraintBeans()
+    {
+        return securityConstraintBeans;
+    }
+
+    public void setSecurityConstraintBeans(List<SecurityConstraintBean> securityConstraintBeans)
+    {
+        this.securityConstraintBeans = securityConstraintBeans;
+    }
+
+    @XmlElementWrapper(name="securityConstraintRefs")
+    @XmlElements(@XmlElement(name="securityConstraintRef"))
+    public List<String> getSecurityConstraintsRefs()
+    {
+        return securityConstraintsRefs;
+    }
+
+    public void setSecurityConstraintsRefs(List<String> securityConstraintsRefs)
+    {
+        this.securityConstraintsRefs = securityConstraintsRefs;
+    }
+
+    public boolean isEmpty()
+    {
+        return empty;
+    }
+
+    public void setEmpty(boolean empty)
+    {
+        this.empty = empty;
+    }
+
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsDefBean.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsDefBean.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsDefBean.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsDefBean.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.beans;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.jetspeed.om.common.SecurityConstraint;
+import org.apache.jetspeed.om.page.SecurityConstraintsDef;
+
+/**
+ * SecurityConstraintsDefBean
+ * 
+ * @version $Id$
+ */
+@XmlRootElement(name="securityConstraintsDef")
+public class SecurityConstraintsDefBean implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+    
+    private String name;
+    private List<SecurityConstraintBean> securityConstraintBeans;
+    
+    public SecurityConstraintsDefBean()
+    {
+        
+    }
+    
+    public SecurityConstraintsDefBean(SecurityConstraintsDef securityConstraintsDef)
+    {
+        name = securityConstraintsDef.getName();
+        
+        List<SecurityConstraint> securityConstraints = securityConstraintsDef.getSecurityConstraints();
+        
+        if (securityConstraints != null)
+        {
+            securityConstraintBeans = new ArrayList<SecurityConstraintBean>();
+            
+            for (SecurityConstraint securityConstraint : securityConstraints)
+            {
+                securityConstraintBeans.add(new SecurityConstraintBean(securityConstraint));
+            }
+        }
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    @XmlElementWrapper(name="securityConstraints")
+    @XmlElements(@XmlElement(name="securityConstraint"))
+    public List<SecurityConstraintBean> getSecurityConstraintBeans()
+    {
+        return securityConstraintBeans;
+    }
+
+    public void setSecurityConstraintBeans(List<SecurityConstraintBean> securityConstraintBeans)
+    {
+        this.securityConstraintBeans = securityConstraintBeans;
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsDefBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsDefBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/beans/SecurityConstraintsDefBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,306 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.rest;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Locale;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.PathSegment;
+import javax.ws.rs.core.UriInfo;
+import javax.ws.rs.core.Response.Status;
+
+import org.apache.commons.lang.BooleanUtils;
+import org.apache.jetspeed.JetspeedActions;
+import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.om.portlet.GenericMetadata;
+import org.apache.jetspeed.om.portlet.LocalizedField;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.page.PageNotFoundException;
+import org.apache.jetspeed.page.document.NodeException;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.jetspeed.services.beans.PageBean;
+import org.apache.jetspeed.services.rest.util.PathSegmentUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * PageManagementService
+ * 
+ * @vesion $Id$
+ */
+
+@Path("/pagemanagement/")
+public class PageManagementService
+{
+    
+    private static Logger log = LoggerFactory.getLogger(PageManagementService.class);
+    
+    @Context
+    private ServletConfig servletConfig;
+    
+    @Context
+    private ServletContext servletContext;
+    
+    private PageManager pageManager;
+    
+    public PageManagementService(PageManager pageManager)
+    {
+        this.pageManager = pageManager;
+    }
+    
+    @GET
+    @Path("/page/{path:.*}")
+    public PageBean getPage(@Context HttpServletRequest servletRequest,
+                            @Context UriInfo uriInfo,
+                            @PathParam("path") List<PathSegment> pathSegments)
+    {
+        String path = PathSegmentUtils.joinWithPrefix(pathSegments, "/", "/");
+        
+        try
+        {
+            Page page = pageManager.getPage(path);
+            page.checkAccess(JetspeedActions.EDIT);
+            return new PageBean(page);
+        }
+        catch (PageNotFoundException e)
+        {
+            throw new WebApplicationException(e, Status.NOT_FOUND);
+        }
+        catch (NodeException e)
+        {
+            throw new WebApplicationException(e);
+        }
+        catch (SecurityException e)
+        {
+            throw new WebApplicationException(e, Status.FORBIDDEN);
+        }
+    }
+    
+    @DELETE
+    @Path("/page/{path:.*}")
+    public PageBean deletePage(@Context HttpServletRequest servletRequest,
+                               @Context UriInfo uriInfo,
+                               @PathParam("path") List<PathSegment> pathSegments)
+    {
+        String path = PathSegmentUtils.joinWithPrefix(pathSegments, "/", "/");
+        
+        try
+        {
+            Page page = pageManager.getPage(path);
+            pageManager.removePage(page);
+            return new PageBean(page);
+        }
+        catch (PageNotFoundException e)
+        {
+            throw new WebApplicationException(e, Status.NOT_FOUND);
+        }
+        catch (NodeException e)
+        {
+            throw new WebApplicationException(e);
+        }
+        catch (SecurityException e)
+        {
+            throw new WebApplicationException(e, Status.FORBIDDEN);
+        }
+    }
+    
+    @POST
+    @Path("/page/copy/{path:.*}")
+    public PageBean copyPage(@Context HttpServletRequest servletRequest,
+                             @Context UriInfo uriInfo,
+                             @PathParam("path") List<PathSegment> targetPathSegments,
+                             @FormParam("source") String sourcePagePath)
+    {
+        String targetPath = PathSegmentUtils.joinWithPrefix(targetPathSegments, "/", "/");
+        
+        try
+        {
+            Page source = pageManager.getPage(sourcePagePath);
+            pageManager.copyPage(source, targetPath);
+            Page target = pageManager.getPage(targetPath);
+            return new PageBean(target);
+        }
+        catch (PageNotFoundException e)
+        {
+            throw new WebApplicationException(e, Status.NOT_FOUND);
+        }
+        catch (NodeException e)
+        {
+            throw new WebApplicationException(e);
+        }
+        catch (SecurityException e)
+        {
+            throw new WebApplicationException(e, Status.FORBIDDEN);
+        }
+    }
+    
+    @POST
+    @Path("/page/move/{path:.*}")
+    public PageBean movePage(@Context HttpServletRequest servletRequest,
+                             @Context UriInfo uriInfo,
+                             @PathParam("path") List<PathSegment> targetPathSegments,
+                             @FormParam("source") String sourcePagePath)
+    {
+        String targetPath = PathSegmentUtils.joinWithPrefix(targetPathSegments, "/", "/");
+        
+        try
+        {
+            Page source = pageManager.getPage(sourcePagePath);
+            pageManager.copyPage(source, targetPath);
+            pageManager.removePage(source);
+            Page copied = pageManager.getPage(targetPath);
+            return new PageBean(copied);
+        }
+        catch (PageNotFoundException e)
+        {
+            throw new WebApplicationException(e, Status.NOT_FOUND);
+        }
+        catch (NodeException e)
+        {
+            throw new WebApplicationException(e);
+        }
+        catch (SecurityException e)
+        {
+            throw new WebApplicationException(e, Status.FORBIDDEN);
+        }
+    }
+
+    @POST
+    @Path("/page/info/{path:.*}")
+    public PageBean updatePage(@Context HttpServletRequest servletRequest,
+                               @Context UriInfo uriInfo,
+                               @PathParam("path") List<PathSegment> pathSegments,
+                               @FormParam("title") String title,
+                               @FormParam("shorttitle") String shortTitle,
+                               @FormParam("hidden") String hidden,
+                               @FormParam("skin") String skin,
+                               @FormParam("version") String version)
+    {
+        RequestContext requestContext = (RequestContext) servletRequest.getAttribute(RequestContext.REQUEST_PORTALENV);
+        String path = PathSegmentUtils.joinWithPrefix(pathSegments, "/", "/");
+        
+        try
+        {
+            Page page = pageManager.getPage(path);
+            page.checkAccess(JetspeedActions.EDIT);
+            
+            boolean changed = false;
+            Locale locale = requestContext.getLocale();
+            GenericMetadata metadata = page.getMetadata();
+            
+            if (title != null && !title.equals(page.getTitle()))
+            {
+                page.setTitle(title);
+                setLocalizedField(metadata, locale, "title", title);
+                changed = true;
+            }
+            
+            if (shortTitle != null && !shortTitle.equals(page.getShortTitle()))
+            {
+                page.setShortTitle(shortTitle);
+                setLocalizedField(metadata, locale, "short-title", title);
+                changed = true;
+            }
+            
+            if (hidden != null)
+            {
+                boolean hiddenFlag = BooleanUtils.toBoolean(hidden);
+                
+                if (hiddenFlag != page.isHidden())
+                {
+                    page.setHidden(hiddenFlag);
+                    changed = true;
+                }
+            }
+            
+            if (skin != null && !skin.equals(page.getSkin()))
+            {
+                page.setSkin(skin);
+                changed = true;
+            }
+            
+            if (version != null && !version.equals(page.getVersion()))
+            {
+                page.setVersion(version);
+                changed = true;
+            }
+            
+            if (changed)
+            {
+                pageManager.updatePage(page);
+            }
+            
+            return new PageBean(page);
+        }
+        catch (PageNotFoundException e)
+        {
+            throw new WebApplicationException(e, Status.NOT_FOUND);
+        }
+        catch (NodeException e)
+        {
+            throw new WebApplicationException(e);
+        }
+        catch (SecurityException e)
+        {
+            throw new WebApplicationException(e, Status.FORBIDDEN);
+        }
+    }
+    
+    private LocalizedField getLocalizedField(GenericMetadata metadata, Locale locale, String name)
+    {
+        Collection<LocalizedField> fields = metadata.getFields(name);
+        
+        if (fields != null)
+        {
+            for (LocalizedField field : fields)
+            {
+                if (locale.equals(field.getLocale()))
+                {
+                    return field;
+                }
+            }
+        }
+        
+        return null;
+    }
+    
+    private void setLocalizedField(GenericMetadata metadata, Locale locale, String name, String value)
+    {
+        LocalizedField field = getLocalizedField(metadata, locale, name);
+        
+        if (field != null)
+        {
+            field.setValue(value);
+        }
+        else
+        {
+            metadata.addField(locale, name, value);
+        }
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/util/PathSegmentUtils.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/util/PathSegmentUtils.java?rev=920481&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/util/PathSegmentUtils.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/util/PathSegmentUtils.java Mon Mar  8 19:51:56 2010
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.jetspeed.services.rest.util;
+
+import java.util.List;
+
+import javax.ws.rs.core.PathSegment;
+
+/**
+ * PathSegmentUtils
+ * 
+ * @version $Id$
+ */
+public class PathSegmentUtils
+{
+    
+    private PathSegmentUtils()
+    {
+    }
+    
+    /**
+     * Returns a joined string from the path segments list separated by the separator argument.
+     * 
+     * @param pathSegments the path segments list.
+     * @param separator the separator between path segments.
+     * @return
+     */
+    public static String join(List<PathSegment> pathSegments, String separator)
+    {
+        return joinWithPrefix(pathSegments, separator, null);
+    }
+    
+    /**
+     * Returns a joined string from the path segments list separated by the separator argument.
+     * If the prefix argument is non null value, then the prefix string will be prepended.
+     * 
+     * @param pathSegments the path segments list.
+     * @param separator the separator between path segments.
+     * @param prefix the prefix string to be prepended.
+     * @return
+     */
+    public static String joinWithPrefix(List<PathSegment> pathSegments, String separator, String prefix)
+    {
+        if (pathSegments == null)
+        {
+            return null;
+        }
+        
+        StringBuilder sbPath = new StringBuilder(100);
+        
+        if (prefix != null)
+        {
+            sbPath.append(prefix);
+        }
+        
+        boolean first = true;
+        
+        for (PathSegment pathSegment : pathSegments)
+        {
+            if (!first)
+            {
+                sbPath.append(separator);
+            }
+            else
+            {
+                first = false;
+            }
+            
+            sbPath.append(pathSegment.getPath());
+        }
+        
+        return sbPath.toString();
+    }
+    
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/util/PathSegmentUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/util/PathSegmentUtils.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/util/PathSegmentUtils.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-restful-services.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-restful-services.xml?rev=920481&r1=920480&r2=920481&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-restful-services.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-restful-services.xml Mon Mar  8 19:51:56 2010
@@ -128,6 +128,10 @@
           <meta key="j2:cat" value="default" />
           <constructor-arg ref="jaxrsPageLayoutService" />
         </bean>
+        <bean class="org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider">
+          <meta key="j2:cat" value="default" />
+          <constructor-arg ref="jaxrsPageManagementService" />
+        </bean>
       </list>
     </property>
   </bean>
@@ -140,7 +144,7 @@
     <constructor-arg ref="org.apache.jetspeed.search.SearchEngine" />
   </bean>
   
-  <!-- Portal Page Management JAX-RS Service -->
+  <!-- Portal Page Layout Management JAX-RS Service -->
   <bean id="jaxrsPageLayoutService" class="org.apache.jetspeed.services.rest.PageLayoutService">
     <meta key="j2:cat" value="default" />
     <constructor-arg ref="org.apache.jetspeed.layout.PageLayoutComponent" />
@@ -148,4 +152,10 @@
     <constructor-arg ref="PortletActionSecurityBehavior" />
   </bean>
   
+  <!-- Portal Page Management JAX-RS Service -->
+  <bean id="jaxrsPageManagementService" class="org.apache.jetspeed.services.rest.PageManagementService">
+    <meta key="j2:cat" value="default" />
+    <constructor-arg ref="org.apache.jetspeed.page.PageManager" />
+  </bean>
+  
 </beans>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message