incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r454520 - in /incubator/graffito/trunk: api/src/java/org/apache/portals/graffito/context/ applications/browser/src/java/org/apache/portals/graffito/portlets/browser/actions/ applications/browser/src/java/org/apache/portals/graffito/portlets...
Date Mon, 09 Oct 2006 21:26:10 GMT
Author: clombart
Date: Mon Oct  9 14:26:09 2006
New Revision: 454520

URL: http://svn.apache.org/viewvc?view=rev&rev=454520
Log:
Upgrate the HTML Kupu editor (1.3.5).
This is not yet complete. 

Modified:
    incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/context/CmsRequestContextManager.java
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/actions/DocumentAction.java
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/SessionUtil.java
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/pages.xml
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml
    incubator/graffito/trunk/applications/framework-portlets/.classpath
    incubator/graffito/trunk/applications/framework-portlets/project.xml
    incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/GraffitoPortlet.java
    incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/bean/BeanUtil.java
    incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/util/GraffitoTools.java
    incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/servlets/GraffitoViewerServlet.java
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/context/impl/CmsRequestContextManagerImpl.java
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/CmsAccessControllerImpl.java
    incubator/graffito/trunk/jetspeed2-deploy/src/assembly_head/pipelines.xml

Modified: incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/context/CmsRequestContextManager.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/context/CmsRequestContextManager.java?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/context/CmsRequestContextManager.java
(original)
+++ incubator/graffito/trunk/api/src/java/org/apache/portals/graffito/context/CmsRequestContextManager.java
Mon Oct  9 14:26:09 2006
@@ -39,4 +39,10 @@
        * @param cmsRequestContext The cms request context to assigned
        */
       public void setCurrentCmsRequestContext(CmsRequestContext cmsRequestContext);
+      
+      /**
+       * Clean up the current CmsRequestContent (associated to the current request/thread)
+       *
+       */
+      public void cleanupCmsRequestContent();
 }

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/actions/DocumentAction.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/actions/DocumentAction.java?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/actions/DocumentAction.java
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/actions/DocumentAction.java
Mon Oct  9 14:26:09 2006
@@ -203,7 +203,7 @@
         try
         {
             ActionRequest request = (ActionRequest) actionInfo.getRequest();
-            ActionResponse response = (ActionResponse) actionInfo.getResponse();
+            //ActionResponse response = (ActionResponse) actionInfo.getResponse();
             PortletPageManager portletPageManager = actionInfo.getPortletPageManager(); 
    
             DocumentModelService documentService = ServiceUtil.getDocumentService();
             BrowserSession browserSession = SessionUtil.getBrowserSession(request);

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/SessionUtil.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/SessionUtil.java?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/SessionUtil.java
(original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/browser/session/SessionUtil.java
Mon Oct  9 14:26:09 2006
@@ -17,6 +17,7 @@
 
 import javax.portlet.PortletRequest;
 import javax.portlet.PortletSession;
+import javax.servlet.http.HttpServletRequest;
 
 
 /**
@@ -27,8 +28,8 @@
  */
 public class SessionUtil
 {
-     /** The browser object session name */
-     public static final String BROWSER_SESSION = "browserSession";
+	 public static final String PORTLET_BROWSER_SESSION = "browserSession";
+     public static final String SERVLET_BROWSER_SESSION = "javax.portlet.p.graffitoBrowser?browserSession";
      
      /**
       * Add in the user session a new Browser session object
@@ -37,9 +38,14 @@
       */
      public static void setBrowserSession(PortletRequest request, BrowserSession browserSession)
      {
-         request.getPortletSession().setAttribute(BROWSER_SESSION, browserSession);
+         request.getPortletSession().setAttribute(PORTLET_BROWSER_SESSION, browserSession);
      }
      
+     
+     public static void setBrowserSession(HttpServletRequest request, BrowserSession browserSession)
+     {
+         request.setAttribute(SERVLET_BROWSER_SESSION, browserSession);
+     }     
      /**
       * Get the current Browser session object found in the portlet request
       * @param request the portlet request
@@ -48,8 +54,19 @@
      public static BrowserSession getBrowserSession(PortletRequest request)
      {
           
-         return (BrowserSession) request.getPortletSession().getAttribute(BROWSER_SESSION,
PortletSession.PORTLET_SCOPE);
+         return (BrowserSession) request.getPortletSession().getAttribute(PORTLET_BROWSER_SESSION,
PortletSession.PORTLET_SCOPE);
      }
+     
+     /**
+      * Get the current Browser session object found in the servlet request
+      * @param request the servlet request
+      * @return the browser session object
+      */
+     public static BrowserSession getBrowserSession(HttpServletRequest request)
+     {
+          
+         return (BrowserSession) request.getSession().getAttribute(SERVLET_BROWSER_SESSION);
+     }     
      
      public static String getUri(PortletRequest request)
      {

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/pages.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/pages.xml?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/pages.xml (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/pages.xml Mon Oct  9
14:26:09 2006
@@ -35,7 +35,7 @@
 			<tab id="document-edit">
 				<page id="metadata" label="tab.document-edit.metadata" template= "/WEB-INF/view/document/document-edit-metadata.vm"
defaultTabPage="true" />								
 				<page id="content-text" label="tab.document-edit.content" template="/WEB-INF/view/document/document-edit-text.vm"
condition="documentDTO.isText()" />
-				<page id="content-html" label="tab.document-edit.content" template="/kupu/kupu.vm"
	condition="documentDTO.isHTML()" />
+				<page id="content-html" label="tab.document-edit.content" template="/kupu-1.3.5/kupu.vm"
	condition="documentDTO.isHTML()" />
 				<page id="content-upload" label="tab.document-edit.content" template="/WEB-INF/view/document/document-edit-upload.vm"
condition="documentDTO.isBinary()" />										
 				<page id="security" label="tab.security" template= "/WEB-INF/view/security/security-browser.vm"
 />
 			</tab>
@@ -52,7 +52,7 @@
 			<viewpage portletPageId="documentHtmlTextViewer" />
 		</page>
 		
-		<page id = "htmlEdit" action="document.createWizard" template="/kupu/kupu.vm" >
+		<page id = "htmlEdit" action="document.createWizard" template="/kupu-1.3.5/kupu.vm"
>
 			<viewpage portletPageId="documentHtmlTextViewer" />
 		</page>
 		

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml Mon Oct 
9 14:26:09 2006
@@ -41,6 +41,11 @@
 			<value>viewer</value>
 		</init-param>					
 		<init-param>
+			<name>UpdaterServlet</name>
+			<value>updater</value>
+		</init-param>					
+		
+		<init-param>
 			<name>DocumentTypes</name>
 			<value>document.type.upload,document.type.text,document.type.html</value>
 		</init-param>

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml Mon Oct  9 14:26:09
2006
@@ -39,12 +39,18 @@
 		</init-param>
 		<load-on-startup>10</load-on-startup>
 	</servlet>
-	<!-- Define Velocity Servlet -->
 	<servlet>
 		<servlet-name>viewer</servlet-name>
 		<servlet-class>org.apache.portals.graffito.servlets.GraffitoViewerServlet</servlet-class>
 		<load-on-startup>10</load-on-startup>
 	</servlet>
+	<servlet>
+		<servlet-name>updater</servlet-name>
+		<servlet-class>org.apache.portals.graffito.servlets.browser.UpdateServlet</servlet-class>
+		<load-on-startup>10</load-on-startup>
+	</servlet>
+	
+	
 	<!-- Map *.vm files to Velocity  -->
 	<servlet-mapping>
 		<servlet-name>velocity</servlet-name>
@@ -54,6 +60,10 @@
 		<servlet-name>viewer</servlet-name>
 		<url-pattern>/viewer</url-pattern>
 	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>updater</servlet-name>
+		<url-pattern>/updater</url-pattern>
+	</servlet-mapping>	
 	<servlet-mapping>
 		<servlet-name> JetspeedContainer </servlet-name>
 		<url-pattern> /container/* </url-pattern>

Modified: incubator/graffito/trunk/applications/framework-portlets/.classpath
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/framework-portlets/.classpath?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/applications/framework-portlets/.classpath (original)
+++ incubator/graffito/trunk/applications/framework-portlets/.classpath Mon Oct  9 14:26:09
2006
@@ -45,6 +45,8 @@
   </classpathentry>
   <classpathentry kind="var" path="MAVEN_REPO/org.apache.portals.graffito/jars/graffito-api-1.0-a1-dev.jar">
   </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/org.apache.portals.graffito/jars/graffito-components-1.0-a1-dev.jar">
+  </classpathentry>
   <classpathentry kind="output" path="target/classes">
   </classpathentry>
 </classpath>

Modified: incubator/graffito/trunk/applications/framework-portlets/project.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/framework-portlets/project.xml?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/applications/framework-portlets/project.xml (original)
+++ incubator/graffito/trunk/applications/framework-portlets/project.xml Mon Oct  9 14:26:09
2006
@@ -191,14 +191,21 @@
         		<war.bundle>true</war.bundle>
       		</properties>
     	</dependency>
+    	
     	<dependency>
       		<groupId>org.apache.portals.graffito</groupId>
       		<artifactId>graffito-api</artifactId>
-		<version>${graffito.version}</version>
+		    <version>${graffito.version}</version>
       		<type>jar</type>
-   	</dependency>
+   	     </dependency>
+   	     
+         <dependency>  
+      		<id>graffito-components</id>
+		     <groupId>org.apache.portals.graffito</groupId>
+	         <version>${graffito.version}</version>
+    	</dependency> 
+  </dependencies>   	     
   
-   </dependencies>
     <build>
     <sourceDirectory>src/java</sourceDirectory>
 

Modified: incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/GraffitoPortlet.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/GraffitoPortlet.java?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/GraffitoPortlet.java
(original)
+++ incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/GraffitoPortlet.java
Mon Oct  9 14:26:09 2006
@@ -45,10 +45,12 @@
     private static final String VELOCITY_TABS = "tabs";
         
     private static final String PORTLET_PAGE_CONFIG = "PortletPageConfig";
-    private static final String VIEWER_SERVLET = "ViewerServlet";    
+    private static final String VIEWER_SERVLET = "ViewerServlet";  
+    private static final String UPDATER_SERVLET = "UpdaterServlet";
            
     protected PortletPageManager portletPageManager;
     protected String viewerServlet;
+    protected String updaterServlet;
     
     
     protected Log log = LogFactory.getLog(GraffitoPortlet.class);
@@ -77,6 +79,7 @@
         }
         
         viewerServlet = config.getInitParameter(VIEWER_SERVLET);
+        updaterServlet = config.getInitParameter(UPDATER_SERVLET);
                                  
     }
 
@@ -85,10 +88,11 @@
      */
     public void doView(RenderRequest request, RenderResponse response) throws PortletException,
IOException
     {
+    	
         portletPageManager.doView(request, response);
         Context velocityContext = this.getContext(request);
         velocityContext.put(VELOCITY_TABS, portletPageManager.getSelectedViewPage(request).getTabs());
  
-        velocityContext.put(VELOCITY_GRAFFITO_TOOLS, new GraffitoTools(request.getContextPath()
+ "/" + viewerServlet));
+        velocityContext.put(VELOCITY_GRAFFITO_TOOLS, new GraffitoTools(request.getContextPath()
+ "/" + viewerServlet, request.getContextPath() + "/" + updaterServlet ));
         
         super.doView(request, response);
     }
@@ -101,7 +105,7 @@
         portletPageManager.doEdit(request, response);  
         Context velocityContext = this.getContext(request);
         velocityContext.put(VELOCITY_TABS, portletPageManager.getSelectedEditPage(request).getTabs());

-        velocityContext.put(VELOCITY_GRAFFITO_TOOLS, new GraffitoTools(request.getContextPath()
+ "/" + viewerServlet));
+        velocityContext.put(VELOCITY_GRAFFITO_TOOLS, new GraffitoTools(request.getContextPath()
+ "/" + viewerServlet, request.getContextPath() + "/" + updaterServlet ));
         super.doEdit(request, response);
     }
 

Modified: incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/bean/BeanUtil.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/bean/BeanUtil.java?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/bean/BeanUtil.java
(original)
+++ incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/bean/BeanUtil.java
Mon Oct  9 14:26:09 2006
@@ -19,6 +19,8 @@
 import java.util.Enumeration;
 
 import javax.portlet.PortletRequest;
+import javax.servlet.http.HttpServletRequest;
+
 import org.apache.commons.beanutils.ConvertUtils;
 import org.apache.commons.beanutils.PropertyUtils;
 
@@ -59,7 +61,36 @@
          
          return bean;
          
+     }
+     
+     /**
+      * Update bean properties with the value found in the http request paramters
+      * 
+      * @param portletRequest
+      * @param bean The bean to update
+      * @return The updated bean
+      */
+     public static Object populate(HttpServletRequest request, Object bean)
+     {
+         Enumeration parameterNames = request.getParameterNames();
+         while(parameterNames.hasMoreElements())
+         {
+             String parameterName = (String) parameterNames.nextElement();
+             String parameterValue = request.getParameter(parameterName);
+             
+            try
+            {
+                PropertyUtils.setNestedProperty(bean, parameterName, ConvertUtils.convert(parameterValue,

+                                                 PropertyUtils.getPropertyDescriptor(bean,
parameterName).getPropertyType()));
+            }
+            catch (Exception e )
+            {
+                // Exception are ignored, this catch block is triggered 
+                // when a http request param doesn't match to a bean property           

+            }
+         }
          
+         return bean;
          
-     }
+     }     
 }

Modified: incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/util/GraffitoTools.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/util/GraffitoTools.java?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/util/GraffitoTools.java
(original)
+++ incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/portlets/util/GraffitoTools.java
Mon Oct  9 14:26:09 2006
@@ -32,6 +32,7 @@
 public class GraffitoTools
 {
       private String graffitoViewerServlet;
+      private String graffitoUpdaterServlet; 
       
       /**
        * Constructor 
@@ -40,9 +41,10 @@
        *        This servlet reference can be used in the href to display binary documents
like PDF, ...
        * 
        */
-      public GraffitoTools(String graffitoViewerServlet)
+      public GraffitoTools(String graffitoViewerServlet, String graffitoUpdaterServlet)
       {
            this.graffitoViewerServlet = graffitoViewerServlet;
+           this.graffitoUpdaterServlet = graffitoUpdaterServlet;
       }
       
       public Folder[] getParents(CmsObject cmsObject)
@@ -98,5 +100,14 @@
       {
           return graffitoViewerServlet;
       }
+      
+      /**
+       * 
+       * @return The Graffito Updater Servlet (used for binary documents)
+       */
+      public String getUpdaterServlet()
+      {
+          return graffitoUpdaterServlet;
+      }      
             
 }

Modified: incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/servlets/GraffitoViewerServlet.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/servlets/GraffitoViewerServlet.java?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/servlets/GraffitoViewerServlet.java
(original)
+++ incubator/graffito/trunk/applications/framework-portlets/src/java/org/apache/portals/graffito/servlets/GraffitoViewerServlet.java
Mon Oct  9 14:26:09 2006
@@ -28,7 +28,6 @@
 import org.apache.portals.graffito.exception.ContentManagementException;
 import org.apache.portals.graffito.model.dm.Document;
 import org.apache.portals.graffito.portlets.util.ServiceUtil;
-import org.apache.portals.graffito.services.core.ContentModelService;
 import org.apache.portals.graffito.services.dm.DocumentModelService;
 
 
@@ -42,6 +41,7 @@
  */
 public class GraffitoViewerServlet extends HttpServlet
 {
+	
     /** URI REQUEST PARAM */
     private static final String URI_PARAM = "uri";
     
@@ -49,18 +49,17 @@
     
     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
     {
-        
-        
-        DocumentModelService modelService = ServiceUtil.getDocumentService();    
-        if (null == modelService)
+    	
+        DocumentModelService documentService = ServiceUtil.getDocumentService();    
+        if (null == documentService)
         {
-            throw new ServletException("Failed to find the content model service");
+            throw new ServletException("Failed to find the document model service");
         }
         
         String uri = request.getParameter(URI_PARAM);
         try
         {        
-            Document document = modelService.getDocument(uri);
+            Document document = documentService.getDocument(uri);
             if (document!=null)
             {
                 response.setContentType(document.getContentType());
@@ -79,17 +78,20 @@
         }
         catch (ContentManagementException e)
         {
-            throw new ServletException("Failed to retrieve the document : " + uri);
-        }       
+            throw new ServletException("Failed to retrieve the document : " + uri, e);
+        }
+        
     }
     
+    
     /**
+     * Send the document stream to the output stream
      * 
-     * @param r
-     * @param w
-     * @throws IOException
+     * @param r the input stream matching to the document to send
+     * @param w the output stream 
+     * @throws IOException 
      */
-    public static void drain(InputStream r,OutputStream w) throws IOException
+    private static void drain(InputStream r,OutputStream w) throws IOException
     {
         byte[] bytes=new byte[BLOCK_SIZE];
         try

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/context/impl/CmsRequestContextManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/context/impl/CmsRequestContextManagerImpl.java?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/context/impl/CmsRequestContextManagerImpl.java
(original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/context/impl/CmsRequestContextManagerImpl.java
Mon Oct  9 14:26:09 2006
@@ -33,8 +33,9 @@
      * @see org.apache.portals.graffito.context.CmsRequestContextManager#getCurrentCmsRequestContext()
      */
     public CmsRequestContext getCurrentCmsRequestContext()
-    {
-        return (CmsRequestContext) threadContext.get();    
+    {    	
+        return (CmsRequestContext) threadContext.get(); 
+        
     }
     
     
@@ -45,4 +46,12 @@
     {
         threadContext.set(cmsRequestContext);
     }
+
+
+	public void cleanupCmsRequestContent()
+	{
+		threadContext.remove();
+	}
+    
+    
 }

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/CmsAccessControllerImpl.java
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/CmsAccessControllerImpl.java?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/CmsAccessControllerImpl.java
(original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/CmsAccessControllerImpl.java
Mon Oct  9 14:26:09 2006
@@ -15,15 +15,14 @@
  */
 package org.apache.portals.graffito.security.impl;
 
-import java.security.AccessController;
-import java.security.PrivilegedAction;
+import java.security.Principal;
+import java.util.Iterator;
+import java.util.Set;
 
 import javax.security.auth.Subject;
 
 import org.apache.portals.graffito.context.CmsRequestContextManager;
 import org.apache.portals.graffito.model.core.CmsObject;
-import org.apache.portals.graffito.model.permission.CmsPermission;
-import org.apache.portals.graffito.model.permission.impl.CmsPermissionImpl;
 import org.apache.portals.graffito.security.CmsAccessController;
 
 /**
@@ -75,26 +74,7 @@
         {
             return false;
         }
-
-        
-//        try
-//        {
-//        	Subject subject = cmsRequestContextManager.getCurrentCmsRequestContext().getSubject();
-//        	CmsPermission cmsPermission = new CmsPermissionImpl(uri, actions);
-//            Subject.doAsPrivileged(subject, new PrivilegedAction()                
-//            {
-//                public Object run()
-//                {
-//                    AccessController.checkPermission(cmsPermission);
-//                    return null;
-//                }
-//            }, null);
-//        }
-//        catch (Exception e)
-//        {
-//            return false;
-//        }
-//        return true;        
+   
         
     }
 }

Modified: incubator/graffito/trunk/jetspeed2-deploy/src/assembly_head/pipelines.xml
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/jetspeed2-deploy/src/assembly_head/pipelines.xml?view=diff&rev=454520&r1=454519&r2=454520
==============================================================================
--- incubator/graffito/trunk/jetspeed2-deploy/src/assembly_head/pipelines.xml (original)
+++ incubator/graffito/trunk/jetspeed2-deploy/src/assembly_head/pipelines.xml Mon Oct  9 14:26:09
2006
@@ -217,6 +217,16 @@
 		  <ref bean="org.apache.portals.graffito.context.CmsRequestContextManager" />
 	  </constructor-arg>  
   </bean>
+
+  <bean id="GraffitoCleanupContextValve"
+	class="org.apache.portals.jetspeed.valve.GraffitoCleanUpContextValve"
+	init-method="initialize"
+	>
+	  <constructor-arg>
+		  <ref bean="org.apache.portals.graffito.context.CmsRequestContextManager" />
+	  </constructor-arg>  
+  </bean>
+
   
   <bean id="jetspeed-pipeline"
         class="org.apache.jetspeed.pipeline.JetspeedPipeline"
@@ -240,6 +250,8 @@
       <ref bean="DecorationValve" />
       <ref bean="aggregatorValve"/>
       <ref bean="cleanUpValve"/>
+      <ref bean="GraffitoCleanupContextValve"/>
+      
     </list>
     </constructor-arg>
   </bean> 



Mime
View raw message