Changeset 569

Show
Ignore:
Timestamp:
06/09/06 17:01:31
Author:
douglm
Message:

Dump preferred calendars.
Add a couple of elements to help in restore to 3.1

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/REL-3.0/calendar3/dumprestore/src/org/bedework/dumprestore/dump/dumpling/DumpAuthUsers.java

    r49 r569  
    2929package org.bedework.dumprestore.dump.dumpling; 
    3030 
     31import org.bedework.calfacade.BwCalendar; 
    3132import org.bedework.calfacade.BwCategory; 
    3233import org.bedework.calfacade.BwLocation; 
     
    3536import org.bedework.calfacade.svc.BwAuthUserPrefs; 
    3637import org.bedework.dumprestore.dump.DumpGlobals; 
    37  
    38  
    3938 
    4039import java.util.Iterator; 
     
    129128        tagEnd("preferredSponsors"); 
    130129      } 
     130 
     131      s = aup.getPreferredCalendars(); 
     132      if ((s != null) && (s.size() > 0)) { 
     133        tagStart("preferredCalendars"); 
     134 
     135        Iterator si = s.iterator(); 
     136 
     137        while (si.hasNext()) { 
     138          BwCalendar p = (BwCalendar)si.next(); 
     139 
     140          taggedVal("preferredCalendar", p.getPath()); 
     141        } 
     142 
     143        tagEnd("preferredCalendars"); 
     144      } 
    131145    } 
    132146 
  • branches/REL-3.0/calendar3/dumprestore/src/org/bedework/dumprestore/dump/dumpling/Dumpling.java

    r50 r569  
    196196 
    197197    taggedEntityId("calendar", entity.getCalendar()); 
     198 
     199    /* For 3.1 conversion */ 
     200    if (entity.getCalendar() != null) { 
     201      taggedVal("calendar-path", entity.getCalendar().getPath()); 
     202    } 
    198203  } 
    199204 
  • branches/REL-3.0/calendar3/dumprestore/src/org/bedework/dumprestore/restore/rules/EntityFieldRule.java

    r247 r569  
    179179    } 
    180180 
     181    if (name.equals("calendar-path")) { 
     182      /* Ignore - a 3.1 tag */ 
     183      return true; 
     184    } 
     185 
    181186    return false; 
    182187  }