portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pau...@apache.org
Subject cvs commit: jakarta-jetspeed/webapp/WEB-INF/conf psml-mapping.xml
Date Wed, 05 Jun 2002 03:37:02 GMT
paulsp      2002/06/04 20:37:02

  Modified:    src/java/org/apache/jetspeed/om/profile/psml Tag:
                        security_14 PsmlReference.java PsmlPortlets.java
                        PsmlParameter.java PsmlEntry.java
               src/java/org/apache/jetspeed/om/profile Tag: security_14
                        Portlets.java Parameter.java Entry.java
               src/java/org/apache/jetspeed/services/psmlmanager Tag:
                        security_14 TestMarshalPsml.java
               webapp/WEB-INF/conf Tag: security_14 psml-mapping.xml
  Log:
  o Added securityRef support for PSML
  o Added test case securityRef in PSML
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +21 -1     jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/psml/PsmlReference.java
  
  Index: PsmlReference.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/psml/PsmlReference.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- PsmlReference.java	4 Apr 2002 18:39:49 -0000	1.1
  +++ PsmlReference.java	5 Jun 2002 03:37:02 -0000	1.1.2.1
  @@ -55,9 +55,12 @@
   package org.apache.jetspeed.om.profile.psml;
   
   
  +// Java imports
   import java.util.Vector;
   import java.util.Iterator;
   
  +// Jetspeed imports
  +import org.apache.jetspeed.om.SecurityReference;
   import org.apache.jetspeed.om.profile.*;
   import org.apache.jetspeed.services.PortalToolkit;
   import org.apache.jetspeed.om.profile.Portlets;
  @@ -70,7 +73,7 @@
    * sure wish I could figure out how to use Proxies with Castor...
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: PsmlReference.java,v 1.1 2002/04/04 18:39:49 taylor Exp $
  + * @version $Id: PsmlReference.java,v 1.1.2.1 2002/06/05 03:37:02 paulsp Exp $
    */
   public class PsmlReference extends PsmlPortlets implements Reference, java.io.Serializable
                                               
   {
  @@ -78,6 +81,9 @@
   
       protected PsmlPortlets ref = new PsmlPortlets();
   
  +    /** Holds value of property securityRef. */
  +    private SecurityReference securityRef;
  +    
       public Portlets getPortletsReference()
       {
           return ref;
  @@ -370,7 +376,21 @@
           return ref.getReferenceArray();
       }
   
  +    /** Getter for property securityRef.
  +     * @return Value of property securityRef.
  +     */
  +    public SecurityReference getSecurityRef()
  +    {
  +        return securityRef;
  +    }    
   
  +    /** Setter for property securityRef.
  +     * @param securityRef New value of property securityRef.
  +     */
  +    public void setSecurityRef(SecurityReference securityRef)
  +    {
  +        this.securityRef = securityRef;
  +    }    
   
   
   
  
  
  
  1.4.2.1   +22 -2     jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/psml/PsmlPortlets.java
  
  Index: PsmlPortlets.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/psml/PsmlPortlets.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- PsmlPortlets.java	6 Apr 2002 01:52:11 -0000	1.4
  +++ PsmlPortlets.java	5 Jun 2002 03:37:02 -0000	1.4.2.1
  @@ -54,9 +54,12 @@
   
   package org.apache.jetspeed.om.profile.psml;
   
  +// Java imports
   import java.util.Vector;
   import java.util.Iterator;
   
  +// Jetspeed imports
  +import org.apache.jetspeed.om.SecurityReference;
   import org.apache.jetspeed.om.profile.*;
   
   /**
  @@ -64,7 +67,7 @@
    * suitable for Castor XML serialization.
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: PsmlPortlets.java,v 1.4 2002/04/06 01:52:11 taylor Exp $
  + * @version $Id: PsmlPortlets.java,v 1.4.2.1 2002/06/05 03:37:02 paulsp Exp $
    */
   public class PsmlPortlets extends PsmlIdentityElement implements Portlets, java.io.Serializable
                                               
   {
  @@ -78,6 +81,8 @@
   
       private Vector refs = new Vector();
       
  +    /** Holds value of property securityRef. */
  +    private SecurityReference securityRef = null;    
   
       public PsmlPortlets()
       {}
  @@ -290,5 +295,20 @@
           return mArray;
       }
   
  -
  +    /** Getter for property securityRef.
  +     * @return Value of property securityRef.
  +     */
  +    public SecurityReference getSecurityRef()
  +    {
  +        return securityRef;
  +    }    
  +
  +    /** Setter for property securityRef.
  +     * @param securityRef New value of property securityRef.
  +     */
  +    public void setSecurityRef(SecurityReference securityRef)
  +    {
  +        this.securityRef = securityRef;
  +    }
  +    
   }
  
  
  
  1.2.2.1   +23 -1     jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/psml/PsmlParameter.java
  
  Index: PsmlParameter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/psml/PsmlParameter.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- PsmlParameter.java	22 Mar 2002 18:38:36 -0000	1.2
  +++ PsmlParameter.java	5 Jun 2002 03:37:02 -0000	1.2.2.1
  @@ -54,8 +54,11 @@
   
   package org.apache.jetspeed.om.profile.psml;
   
  +// Java imports
   import java.util.Vector;
   
  +// Jetspeed imports
  +import org.apache.jetspeed.om.SecurityReference;
   import org.apache.jetspeed.om.profile.Parameter;
   
   /**
  @@ -64,7 +67,7 @@
    * 
    * @see org.apache.jetspeed.om.registry.PsmlParameter
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: PsmlParameter.java,v 1.2 2002/03/22 18:38:36 taylor Exp $
  + * @version $Id: PsmlParameter.java,v 1.2.2.1 2002/06/05 03:37:02 paulsp Exp $
    */
   public class PsmlParameter implements Parameter, java.io.Serializable
   {
  @@ -72,6 +75,9 @@
       private String name;
       private String value;
   
  +    /** Holds value of property securityRef. */
  +    private SecurityReference securityRef;
  +    
       public PsmlParameter()
       {}
       
  @@ -103,4 +109,20 @@
           this.value = value;
       }
   
  +    /** Getter for property securityRef.
  +     * @return Value of property securityRef.
  +     */
  +    public SecurityReference getSecurityRef()
  +    {
  +        return securityRef;
  +    }
  +    
  +    /** Setter for property securityRef.
  +     * @param securityRef New value of property securityRef.
  +     */
  +    public void setSecurityRef(SecurityReference securityRef)
  +    {
  +        this.securityRef = securityRef;
  +    }
  +    
   }
  
  
  
  1.2.2.1   +23 -2     jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/psml/PsmlEntry.java
  
  Index: PsmlEntry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/psml/PsmlEntry.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- PsmlEntry.java	22 Mar 2002 18:38:36 -0000	1.2
  +++ PsmlEntry.java	5 Jun 2002 03:37:02 -0000	1.2.2.1
  @@ -54,25 +54,31 @@
   
   package org.apache.jetspeed.om.profile.psml;
   
  -import org.apache.jetspeed.om.profile.*;
  +// Java imports
   import java.util.Vector;
   import java.util.Iterator;
   import java.util.Map;
   import java.util.Hashtable;
   
  +// Jetspeed imports
  +import org.apache.jetspeed.om.SecurityReference;
  +import org.apache.jetspeed.om.profile.*;
  +
   /**
    * Default bean like implementation of the Entry interface
    * suitable for serialization with Castor
    * 
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: PsmlEntry.java,v 1.2 2002/03/22 18:38:36 taylor Exp $
  + * @version $Id: PsmlEntry.java,v 1.2.2.1 2002/06/05 03:37:02 paulsp Exp $
    */
   public class PsmlEntry extends PsmlIdentityElement implements Entry
   {
   
       private String parent = null;
   
  +    /** Holds value of property securityRef. */
  +    private SecurityReference securityRef;    
       
       /** @return the entry name from which this one is derived */
       public String getParent()
  @@ -90,7 +96,22 @@
           this.parent = parent;
       }
                
  +    /** Getter for property securityRef.
  +     * @return Value of property securityRef.
  +     */
  +    public SecurityReference getSecurityRef()
  +    {
  +        return securityRef;
  +    }    
   
  +    /** Setter for property securityRef.
  +     * @param securityRef New value of property securityRef.
  +     */
  +    public void setSecurityRef(SecurityReference securityRef)
  +    {
  +        this.securityRef = securityRef;
  +    }
  +    
       /** This method recreates the paramter name index for quick retrieval
        *  of parameters by name. Shoule be called whenever a complete index
        *  of parameter should be rebuilt (eg removing a parameter or setting 
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.1   +14 -1     jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Portlets.java
  
  Index: Portlets.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Portlets.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- Portlets.java	4 Apr 2002 18:39:49 -0000	1.3
  +++ Portlets.java	5 Jun 2002 03:37:02 -0000	1.3.2.1
  @@ -54,14 +54,18 @@
   
   package org.apache.jetspeed.om.profile;
   
  +// Java imports
   import java.util.Iterator;
   
  +// Jetspeed imports
  +import org.apache.jetspeed.om.SecurityReference;
  +
   /**
    * Portlets is collection of portlet entries and other portlet sets
    * within a configuration Document.
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: Portlets.java,v 1.3 2002/04/04 18:39:49 taylor Exp $
  + * @version $Id: Portlets.java,v 1.3.2.1 2002/06/05 03:37:02 paulsp Exp $
    */
   public interface Portlets extends IdentityElement
   {
  @@ -115,5 +119,14 @@
   
       public Reference[] getReferenceArray();
   
  +    /** Getter for property securityRef.
  +     * @return Value of property securityRef.
  +     */
  +    public SecurityReference getSecurityRef();    
     
  +    /** Setter for property securityRef.
  +     * @param securityRef New value of property securityRef.
  +     */
  +    public void setSecurityRef(SecurityReference securityRef);
  +    
   }
  
  
  
  1.2.2.1   +14 -1     jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Parameter.java
  
  Index: Parameter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Parameter.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- Parameter.java	22 Mar 2002 18:38:35 -0000	1.2
  +++ Parameter.java	5 Jun 2002 03:37:02 -0000	1.2.2.1
  @@ -54,12 +54,15 @@
   
   package org.apache.jetspeed.om.profile;
   
  +// Jetspeed imports
  +import org.apache.jetspeed.om.SecurityReference;
  +
   /**
    * Interface for parameters in psml
    *
    * 
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: Parameter.java,v 1.2 2002/03/22 18:38:35 taylor Exp $
  + * @version $Id: Parameter.java,v 1.2.2.1 2002/06/05 03:37:02 paulsp Exp $
    */
   public interface Parameter
   {
  @@ -79,4 +82,14 @@
        */
       public void setValue( String value );
   
  +    /** Getter for property securityRef.
  +     * @return Value of property securityRef.
  +     */
  +    public SecurityReference getSecurityRef();
  +    
  +    /** Setter for property securityRef.
  +     * @param securityRef New value of property securityRef.
  +     */
  +    public void setSecurityRef(SecurityReference securityRef);
  +    
   }
  
  
  
  1.2.2.1   +15 -1     jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Entry.java
  
  Index: Entry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/profile/Entry.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- Entry.java	22 Mar 2002 18:38:35 -0000	1.2
  +++ Entry.java	5 Jun 2002 03:37:02 -0000	1.2.2.1
  @@ -54,6 +54,10 @@
   
   package org.apache.jetspeed.om.profile;
   
  +// Jetspeed imports
  +import org.apache.jetspeed.om.SecurityReference;
  +
  +
   /**
    * An Entry is a representation of a Portlet within a configuration
    * Document.
  @@ -61,7 +65,7 @@
    * some layout constraints and local parameters if required.
    * 
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  - * @version $Id: Entry.java,v 1.2 2002/03/22 18:38:35 taylor Exp $
  + * @version $Id: Entry.java,v 1.2.2.1 2002/06/05 03:37:02 paulsp Exp $
    */
   public interface Entry extends IdentityElement
   {
  @@ -76,4 +80,14 @@
        */
       public void setParent( String parent );
           
  +    /** Getter for property securityRef.
  +     * @return Value of property securityRef.
  +     */
  +    public SecurityReference getSecurityRef();
  +    
  +    /** Setter for property securityRef.
  +     * @param securityRef New value of property securityRef.
  +     */
  +    public void setSecurityRef(SecurityReference securityRef);
  +    
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.2   +44 -1     jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/TestMarshalPsml.java
  
  Index: TestMarshalPsml.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/TestMarshalPsml.java,v
  retrieving revision 1.6.2.1
  retrieving revision 1.6.2.2
  diff -u -r1.6.2.1 -r1.6.2.2
  --- TestMarshalPsml.java	26 May 2002 15:33:35 -0000	1.6.2.1
  +++ TestMarshalPsml.java	5 Jun 2002 03:37:02 -0000	1.6.2.2
  @@ -27,6 +27,7 @@
   import org.apache.xml.serialize.XMLSerializer;
   import org.apache.xml.serialize.OutputFormat;
   
  +import org.apache.jetspeed.om.SecurityReference;
   import org.apache.jetspeed.om.profile.*;
   
   import org.apache.turbine.services.TurbineServices;
  @@ -40,7 +41,7 @@
    * TestMarshalPsml
    *
    * @author <a href="taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: TestMarshalPsml.java,v 1.6.2.1 2002/05/26 15:33:35 taylor Exp $
  + * @version $Id: TestMarshalPsml.java,v 1.6.2.2 2002/06/05 03:37:02 paulsp Exp $
    */
   //public class TestMarshalPsml extends ServletTestCase {
   public class TestMarshalPsml extends TestCase {    
  @@ -381,6 +382,48 @@
      
       }
   
  +    /**
  +     * Tests unmarshaling security
  +     * @throws Exception
  +     */
  +    public void testUnmarshalSecurityRef() throws Exception 
  +    {
  +        System.out.println("Testing marshalling of PSML on base *** Security-ref ***");
  +
  +        String psmlFile = "../webapp/WEB-INF/psml/test/testcase_securityref.psml";
  +
  +        Mapping mapping = null;
  +        String mapFile = getMappingFileName();
  +        File map = new File(mapFile);
  +        if (map.exists() && map.isFile() && map.canRead())
  +        {
  +            FileReader reader = new FileReader(psmlFile);
  +            mapping = new Mapping();
  +            InputSource is = new InputSource( new FileReader(map) );
  +            is.setSystemId( mapFile );
  +            mapping.loadMapping( is );
  +
  +            System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++");
  +            Unmarshaller unmarshaller = new Unmarshaller(mapping);
  +            Portlets rootset = (Portlets)unmarshaller.unmarshal(reader);
  +            System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++");
  +            
  +            assertTrue(rootset.getName().equals("theRootSet"));
  +            assertTrue(rootset.getId().equals("01"));
  +            
  +            SecurityReference securityRef = rootset.getSecurityRef();
  +            assertNotNull("got SecurityRef", securityRef);
  +            assertEquals( "Name of parent", "all_users", securityRef.getParent());
  +                
  +        }
  +        else
  +        {
  +            String errmsg = "PSML Mapping not found or not a file or unreadable.";
  +            System.err.println(errmsg);
  +            assertNotNull(errmsg, null);
  +        }
  +   
  +    }
     /*
       Configuration object to run Turbine outside a servlet container
       ( uses turbine.properties )
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.2   +21 -0     jakarta-jetspeed/webapp/WEB-INF/conf/psml-mapping.xml
  
  Index: psml-mapping.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/psml-mapping.xml,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- psml-mapping.xml	26 May 2002 15:33:35 -0000	1.4.2.1
  +++ psml-mapping.xml	5 Jun 2002 03:37:02 -0000	1.4.2.2
  @@ -21,6 +21,10 @@
         <bind-xml name="security"/>
       </field>
   
  +    <field name="securityRef" type="org.apache.jetspeed.om.BaseSecurityReference">
  +      <bind-xml name="security-ref"/>
  +    </field>
  +
       <field name="skin"
              type="org.apache.jetspeed.om.profile.psml.PsmlSkin">
         <bind-xml name="skin"/>
  @@ -92,6 +96,10 @@
         <bind-xml name="metainfo"/>
       </field>
   
  +    <field name="securityRef" type="org.apache.jetspeed.om.BaseSecurityReference">
  +      <bind-xml name="security-ref"/>
  +    </field>
  +    
       <field name="skin"
              type="org.apache.jetspeed.om.profile.psml.PsmlSkin">
         <bind-xml name="skin"/>
  @@ -134,6 +142,10 @@
       <field name="value" type="java.lang.String">
         <bind-xml name="value" node="attribute"/>
       </field>
  +    <field name="securityRef" type="org.apache.jetspeed.om.BaseSecurityReference">
  +      <bind-xml name="security-ref"/>
  +    </field>
  +    
    </class>
   
     <class name="org.apache.jetspeed.om.profile.psml.PsmlSkin">
  @@ -243,5 +255,14 @@
         <bind-xml name="security"/>
       </field>
   	</class>
  +
  +  <class name="org.apache.jetspeed.om.BaseSecurityReference">
  +    <map-to xml="security-ref"/>
  +
  +    <field name="parent" type="java.lang.String">
  +      <bind-xml name="parent" node="attribute"/>
  +    </field>
  +  
  +  </class>
   
   </mapping>
  
  
  

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message