portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r216203 - in /portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site: ./ resources/
Date Wed, 13 Jul 2005 18:24:28 GMT
Author: taylor
Date: Wed Jul 13 11:24:26 2005
New Revision: 216203

URL: http://svn.apache.org/viewcvs?rev=216203&view=rev
Log:
continued work on Site Admin portlet: 
http://issues.apache.org/jira/browse/JS2-306

Modified:
    portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/FolderProxyBean.java
    portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/SiteDetailsPortlet.java
    portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources.properties
    portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_en.properties
    portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_fr.properties
    portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_it.properties

Modified: portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/FolderProxyBean.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/FolderProxyBean.java?rev=216203&r1=216202&r2=216203&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/FolderProxyBean.java
(original)
+++ portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/FolderProxyBean.java
Wed Jul 13 11:24:26 2005
@@ -37,9 +37,57 @@
 {
     private transient PageManager pageManager = null;
     private transient Folder folder;
-    private String title;
     private String lookupKey;
     private boolean isNew = true;
+
+    private String title;
+    private String shortTitle;
+    private String defaultPage;
+    private String theme;
+    private String resourceType;
+    
+    /**
+     * @return Returns the defaultPage.
+     */
+    public String getDefaultPage()
+    {
+        return defaultPage;
+    }
+    /**
+     * @param defaultPage The defaultPage to set.
+     */
+    public void setDefaultPage(String defaultPage)
+    {
+        this.defaultPage = defaultPage;
+    }
+    /**
+     * @return Returns the resourceType.
+     */
+    public String getResourceType()
+    {
+        return resourceType;
+    }
+    /**
+     * @param resourceType The resourceType to set.
+     */
+    public void setResourceType(String resourceType)
+    {
+        this.resourceType = resourceType;
+    }
+    /**
+     * @return Returns the shortTitle.
+     */
+    public String getShortTitle()
+    {
+        return shortTitle;
+    }
+    /**
+     * @param shortTitle The shortTitle to set.
+     */
+    public void setShortTitle(String shortTitle)
+    {
+        this.shortTitle = shortTitle;
+    }
     
     public FolderProxyBean()
     {        
@@ -53,6 +101,13 @@
         }
     }
     
+    public void update(Folder folder)
+    {
+        folder.setTitle(this.getTitle());
+        folder.setDefaultPage(this.getDefaultPage());
+        folder.setShortTitle(this.getShortTitle());
+    }
+    
     public boolean lookup(String key)
     {
         boolean result = true;
@@ -61,7 +116,9 @@
             if (pageManager != null)
             {
                 this.folder = pageManager.getFolder(key);    
-                setTitle(folder.getTitle());
+                setTitle(folder.getTitle());                
+                setShortTitle(folder.getShortTitle());
+                setDefaultPage(folder.getDefaultPage(true));
                 isNew = false;
             }
         }

Modified: portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/SiteDetailsPortlet.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/SiteDetailsPortlet.java?rev=216203&r1=216202&r2=216203&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/SiteDetailsPortlet.java
(original)
+++ portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/SiteDetailsPortlet.java
Wed Jul 13 11:24:26 2005
@@ -28,7 +28,11 @@
 import javax.portlet.RenderResponse;
 
 import org.apache.jetspeed.CommonPortletServices;
+import org.apache.jetspeed.exception.JetspeedException;
+import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.page.PageNotFoundException;
 import org.apache.jetspeed.portlets.pam.PortletApplicationResources;
 import org.apache.portals.bridges.frameworks.VelocityFrameworkPortlet;
 import org.apache.portals.messaging.PortletMessaging;
@@ -68,7 +72,7 @@
                 PortletApplicationResources.SITE_PORTLET, PortletApplicationResources.CURRENT_FOLDER);
         String currentPage = (String) PortletMessaging.consume(request,
                 PortletApplicationResources.SITE_PORTLET, PortletApplicationResources.CURRENT_PAGE);
-
+        
         if (currentFolder != null)
         {
             request.setAttribute("site.folder.key", currentFolder);
@@ -77,11 +81,24 @@
 
     }
 
-    public String processSaveAction(ActionRequest request, ActionResponse response) throws
PortletException,
-            IOException
+    public String processSaveFolderAction(ActionRequest request, ActionResponse response,
Object bean) 
+    throws PortletException,
+           IOException
     {
         System.out.println("Processing SAVE action.");
-        return "stocks-help:success";
+        FolderProxyBean proxy = (FolderProxyBean)bean;
+        String key = proxy.getLookupKey();
+        try
+        {
+            Folder folder = pageManager.getFolder(key);
+            proxy.update(folder);
+            //pageManager.updateFolder(folder);
+        }
+        catch (JetspeedException e)
+        {
+            
+        }
+        return "folder-view:success";
     }
 
 }

Modified: portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources.properties?rev=216203&r1=216202&r2=216203&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources.properties
(original)
+++ portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources.properties
Wed Jul 13 11:24:26 2005
@@ -29,4 +29,5 @@
 save = Save
 add.page = Add Page
 add.subfolder = Add SubFolder
-add.docset = Add Docset
+edit.menus = Menus
+edit.security = Security

Modified: portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_en.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_en.properties?rev=216203&r1=216202&r2=216203&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_en.properties
(original)
+++ portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_en.properties
Wed Jul 13 11:24:26 2005
@@ -26,9 +26,18 @@
 # Folder titles
 folder.details = Folder Details
 Title = Title
+ShortTitle = Short Title
+DefaultPage = Default Page
+Theme = Theme
+ResourceType = Resource Type
 
 # buttons and navigations
 save = Save
+remove = Remove
 add.page = Add Page
 add.subfolder = Add SubFolder
-add.docset = Add Docset
+add.link = Add Link
+doc.order = Document Order
+menus = Menus
+security = Security
+

Modified: portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_fr.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_fr.properties?rev=216203&r1=216202&r2=216203&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_fr.properties
(original)
+++ portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_fr.properties
Wed Jul 13 11:24:26 2005
@@ -11,4 +11,5 @@
 save = Sauver
 add.page = Add Page
 add.subfolder = Add SubFolder
-add.docset = Add Docset
+edit.menus = Menus
+edit.security = Securite

Modified: portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_it.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_it.properties?rev=216203&r1=216202&r2=216203&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_it.properties
(original)
+++ portals/jetspeed-2/trunk/applications/pam/src/java/org/apache/jetspeed/portlets/site/resources/SiteResources_it.properties
Wed Jul 13 11:24:26 2005
@@ -31,4 +31,6 @@
 save = Salva
 add.page = Aggiungi Pagina
 add.subfolder = Aggiungi sotto cartella
-add.docset = Aggiungi Docset
\ No newline at end of file
+add.docset = Aggiungi Docset
+edit.menus = Menus
+edit.security = Security



---------------------------------------------------------------------
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