cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl MapProfileLS.java AuthenticationProfileManager.java
Date Wed, 10 Dec 2003 17:02:04 GMT
cziegeler    2003/12/10 09:02:04

  Modified:    src/blocks/portal/java/org/apache/cocoon/portal/transformation
                        NewEventLinkTransformer.java
               src/blocks/portal/java/org/apache/cocoon/components/persistence
                        CastorSourceConverter.java
               src/blocks/portal/java/org/apache/cocoon/portal/profile/impl
                        MapProfileLS.java AuthenticationProfileManager.java
  Log:
  Saving profiles now works (again)
  
  Revision  Changes    Path
  1.4       +3 -3      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java
  
  Index: NewEventLinkTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NewEventLinkTransformer.java	21 Oct 2003 12:39:16 -0000	1.3
  +++ NewEventLinkTransformer.java	10 Dec 2003 17:02:04 -0000	1.4
  @@ -73,9 +73,9 @@
    * 
    * <pre>
    * &lt;root xmlns:ev="http://apache.org/cocoon/portal/eventlink/1.0"&gt;
  - *   &lt;ev:eventlink href="http://eventlinkexample" element="a" attribute"href"&gt;linktext&lt;/ev:eventlink&gt;
  + *   &lt;ev:eventlink href="http://eventlinkexample" element="a" attribute="href"&gt;linktext&lt;/ev:eventlink&gt;
    * &lt;/root&gt;<br></pre>
  - * 
  + *
    * will be replaced with something like:<br><br>
    * 
    * <pre>
  
  
  
  1.3       +2 -2      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/components/persistence/CastorSourceConverter.java
  
  Index: CastorSourceConverter.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/components/persistence/CastorSourceConverter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CastorSourceConverter.java	20 Oct 2003 13:36:41 -0000	1.2
  +++ CastorSourceConverter.java	10 Dec 2003 17:02:04 -0000	1.3
  @@ -122,7 +122,7 @@
           Writer writer = new OutputStreamWriter(stream);
   		try {
   			Marshaller marshaller = new Marshaller( writer );
  -			marshaller.setMapping((Mapping)this.mappings.get(parameters.get(parameters.get("profiletype"))));
  +			marshaller.setMapping((Mapping)this.mappings.get(parameters.get("profiletype")));
   			marshaller.marshal(object);
   			writer.close();
   		} catch (MappingException e) {
  
  
  
  1.5       +8 -15     cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/MapProfileLS.java
  
  Index: MapProfileLS.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/MapProfileLS.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MapProfileLS.java	20 Oct 2003 13:37:10 -0000	1.4
  +++ MapProfileLS.java	10 Dec 2003 17:02:04 -0000	1.5
  @@ -94,7 +94,7 @@
           this.manager = manager;
       }
   
  -    protected String getURI(Map keyMap, Map parameters) 
  +    protected String getURI(Map keyMap) 
       throws Exception {
           final StringBuffer buffer = new StringBuffer();
           Iterator iter = keyMap.entrySet().iterator();
  @@ -133,16 +133,9 @@
           return buffer.toString();
       }
       
  -    protected StringBuffer getSaveURI(Map keyMap, Map parameters)
  +    protected StringBuffer getSaveURI(Map keyMap)
       throws Exception {
  -        final StringBuffer buffer = new StringBuffer((String)parameters.get("baseURI"));
  -        Iterator iter = keyMap.values().iterator();
  -        while ( iter.hasNext() ) {
  -            final Object value = iter.next();
  -            buffer.append('/');
  -            buffer.append(value.toString());
  -        }
  -                
  +        final StringBuffer buffer = new StringBuffer(this.getURI(keyMap));
           return buffer;
       }
       
  @@ -153,7 +146,7 @@
       throws Exception {
   		final Map keyMap = (Map) key;
           
  -        final String uri = this.getURI( keyMap, parameters );
  +        final String uri = this.getURI( keyMap );
           
   		Source source = null;
   		CastorSourceConverter converter = null;
  @@ -178,7 +171,7 @@
       public void saveProfile(Object key, Map parameters, Object profile) throws Exception
{
           final Map keyMap = (Map) key;
           
  -        final String uri = this.getURI( keyMap, parameters );
  +        final String uri = this.getURI( keyMap );
   
           // first test: modifiable source?
           SourceResolver resolver = null;
  @@ -204,7 +197,7 @@
               resolver = null;
           }
           
  -        final StringBuffer buffer = this.getSaveURI( keyMap, parameters );
  +        final StringBuffer buffer = this.getSaveURI( keyMap );
   
   		SAXParser parser = null;
   		try {
  @@ -245,7 +238,7 @@
   		try {
               final Map keyMap = (Map) key;
           
  -            final String uri = this.getURI( keyMap, parameters );
  +            final String uri = this.getURI( keyMap );
   
   			resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
   			source = resolver.resolveURI(uri);
  
  
  
  1.13      +6 -6      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
  
  Index: AuthenticationProfileManager.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- AuthenticationProfileManager.java	7 Nov 2003 13:36:51 -0000	1.12
  +++ AuthenticationProfileManager.java	10 Dec 2003 17:02:04 -0000	1.13
  @@ -189,21 +189,21 @@
   
   			HashMap parameters = new HashMap();
   			parameters.put("type", "user");
  -            parameters.put("config", state.getApplicationConfiguration().getConfiguration("portal"));
  +            parameters.put("config", state.getApplicationConfiguration().getConfiguration("portal").getChild("profiles"));
               parameters.put("handler", handler);
               parameters.put("profiletype", "copletinstancedata");
   
   			Map key = this.buildKey(service, parameters, layoutKey, false);
   	
   			// save coplet instance data
  -			Object profile = ((Object[])service.getAttribute("CopletInstanceData:" + layoutKey))[0];
  -			adapter.saveProfile(key, parameters, profile);
  +            CopletInstanceDataManager profileManager = ((CopletInstanceDataManager)service.getAttribute("CopletInstanceData:"
+ layoutKey));
  +			adapter.saveProfile(key, parameters, profileManager);
   
   			// save coplet instance data
   			parameters.put("profiletype", "layout");
               key = this.buildKey(service, parameters, layoutKey, false);
  -			profile = ((Object[])service.getAttribute("Layout:" + layoutKey))[0];
  -			adapter.saveProfile(key, parameters, profile);
  +			Layout layout = (Layout)service.getAttribute("Layout:" + layoutKey);
  +			adapter.saveProfile(key, parameters, layout);
               
   		} catch (Exception e) {
   			// TODO
  
  
  

Mime
View raw message