You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by pr...@apache.org on 2002/03/12 07:02:46 UTC

cvs commit: jakarta-commons-sandbox/periodicity/src/xml periodicity-schema.xml

prickett    02/03/11 22:02:46

  Modified:    periodicity build.xml
               periodicity/src/java/org/apache/commons/periodicity/vobjects
                        VEvent.java
               periodicity/src/xml periodicity-schema.xml
  Log:
  1. Added organizer_sentby field to the vevent database table, probably, also
  need to add this to the vtodo table.
  2. Fixed the javadocs build task to work with the new package structure
  3. Changed RecurID Time Zone ID field from BIGINT to VARCHAR. It should have
  been varchar as the type of a time zone id is a string.
  4. Changed the duration field to a BIGINT from an INTEGER.
  5. Added save functionality to the VEvent object... Now its time for testing.5. Added save functionality to the VEvent object... Now its time for testing.5. Added save functionality to the VEvent object... Now its time for testing.5. Added save functionality to the VEvent object... Now its time for testing.5. Added save functionality to the VEvent object... Now its time for testing.
  
  Revision  Changes    Path
  1.3       +1 -1      jakarta-commons-sandbox/periodicity/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml	14 Feb 2002 03:38:45 -0000	1.2
  +++ build.xml	12 Mar 2002 06:02:46 -0000	1.3
  @@ -29,6 +29,6 @@
       <delete dir="${build.dir}"/>
     </target>  
     <target name="javadoc">
  -          <javadoc sourcepath="src/java" destdir="docs/api" packagenames="org.apache.icalendar.*"/>
  +     <javadoc sourcepath="src/java" destdir="docs/api" packagenames="org.apache.commons/periodicity.*"/>
     </target>  
   </project>  
  
  
  
  1.2       +250 -0    jakarta-commons-sandbox/periodicity/src/java/org/apache/commons/periodicity/vobjects/VEvent.java
  
  Index: VEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/src/java/org/apache/commons/periodicity/vobjects/VEvent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VEvent.java	28 Feb 2002 04:57:17 -0000	1.1
  +++ VEvent.java	12 Mar 2002 06:02:46 -0000	1.2
  @@ -59,6 +59,7 @@
   import org.apache.commons.periodicity.properties.Dtend;
   import org.apache.commons.periodicity.properties.Status;
   import org.apache.commons.periodicity.util.ICalendarException;
  +import org.apache.commons.periodicity.om.PeriodicityVevents;
   
   public class VEvent extends EventToDo 
   {
  @@ -240,6 +241,255 @@
               throw new ICalendarException("wrt == null");
           }
           */
  +    }    
  +
  +    public void save() throws Exception
  +    {
  +        PeriodicityVevents evt = new PeriodicityVevents();
  +        if(getStartProp() != null)
  +        {
  +            if(getStartProp().getDate() != null)
  +            {
  +                evt.setDtstartDate(getStartProp().getDate().getTime()
  +                       .getTime());
  +            }
  +            if(getStartProp().getDateTime() != null)
  +            {
  +                evt.setDtstartDateTime(getStartProp().getDateTime()
  +                       .getTime().getTime());
  +            }
  +            if(getStartProp().getDate() != null || 
  +                   getStartProp().getDateTime() != null)
  +            {       
  +                if(getStartProp().getTimeZoneIDVal() != null)
  +                {
  +                    evt.setDtstartTzid(getStartProp().getTimeZoneIDVal());
  +                }
  +                else
  +                {
  +                    evt.setDtstartTzid(null);
  +                }
  +            }
  +            else
  +            {
  +                evt.setDtstartTzid(null);
  +            }    
  +        }
  +        if(getOrganizerProp() != null && getOrganizerProp().getValue() != null)
  +        {
  +            evt.setOrganizer(getOrganizerProp().getValue());
  +            if(getOrganizerProp().getCommonNameVal() != null)
  +            {
  +                evt.setOrganizerName(getOrganizerProp().getCommonNameVal());
  +            }
  +            else
  +            {
  +                evt.setOrganizerName(null);
  +            }
  +            if(getOrganizerProp().getDirectoryParameterVal() != null)
  +            {
  +                evt.setOrganizerDir(
  +                       getOrganizerProp().getDirectoryParameterVal());
  +            }
  +            else
  +            {
  +                evt.setOrganizerDir(null);
  +            }
  +            if(getOrganizerProp().getSentByParameterVal() != null)
  +            {
  +                evt.setOrganizerSentby(
  +                       getOrganizerProp().getSentByParameterVal());
  +            }
  +            else
  +            {
  +                evt.setOrganizerSentby(null);
  +            }
  +            if(getOrganizerProp().getLanguageParameterVal() != null)
  +            {
  +                evt.setOrganizerLang(getOrganizerProp()
  +                       .getLanguageParameterVal());
  +            }
  +            else
  +            {
  +                evt.setOrganizerName(null);
  +                evt.setOrganizerDir(null);
  +                evt.setOrganizerSentby(null);
  +                evt.setOrganizerLang(null);
  +            }    
  +        }    
  +        if(getTimeStampProp() != null && 
  +               getTimeStampProp().getValue() != null)
  +        {
  +            evt.setDtstamp(getTimeStampProp().getValue().getTime()
  +                   .getTime());
  +        }
  +        if(getUIDProp() != null && getUIDProp().getValue() != null)
  +        {
  +            evt.setUniqueId(getUIDProp().getValue());
  +        }
  +        else
  +        {
  +            evt.setUniqueId(null);
  +        }    
  +        if(getURLProp() != null && getURLProp().getValue() != null)
  +        {
  +            evt.setUrl(getURLProp().getValue());
  +        }
  +        else
  +        {
  +            evt.setUrl(null);
  +        }
  +        if(getClassificationProp() != null && 
  +               getClassificationProp().getValue() != null)
  +        {
  +            evt.setClassification(getClassificationProp().getValue());
  +        }
  +        else
  +        {
  +            evt.setClassification(null);
  +        }
  +        if(getCreationDateProp() != null && 
  +               getCreationDateProp().getValue() != null)
  +        {
  +            evt.setDateCreated(getCreationDateProp().getValue()
  +                   .getTime().getTime());
  +        }
  +        if(getDescProp() != null && getDescProp().getValue() != null)
  +        {
  +            evt.setDescription(getDescProp().getValue());
  +            if(getDescProp().getAltRepVal() != null)
  +            {
  +                evt.setDescAltRep(getDescProp().getAltRepVal());
  +            }
  +            else
  +            {
  +                evt.setDescAltRep(null);
  +            }
  +            if(getDescProp().getLanguageParameterVal() != null)
  +            {
  +                evt.setDescLang(getDescProp().getLanguageParameterVal());
  +            }
  +            else
  +            {
  +                evt.setDescLang(null);
  +            }
  +        }
  +        else
  +        {
  +            evt.setDescAltRep(null);
  +            evt.setDescLang(null);
  +        }    
  +        if(getLastModProp() != null && getLastModProp().getValue() != null)
  +        {
  +            evt.setLastModified(getLastModProp().getValue().getTime()
  +                   .getTime());
  +        }
  +        if(getRecurID() != null)
  +        {
  +            if(getRecurID().getDateTime() != null)
  +            {
  +                evt.setRecurIdDateTime(getRecurID().getDateTime().getTime()
  +                       .getTime());
  +            }
  +            if(getRecurID().getDate() != null)
  +            {
  +                evt.setRecurIdDate(getRecurID().getDate().getTime()
  +                       .getTime());
  +            }
  +            if(getRecurID().getDate() != null || 
  +                   getRecurID().getDateTime() != null)
  +            {
  +                evt.setRecurIdRange(getRecurID().getRangeParameterVal());
  +                evt.setRecurIdTzid(getRecurID().getTimeZoneIDVal());
  +            }
  +            else
  +            {
  +                evt.setRecurIdRange(null);
  +                evt.setRecurIdTzid(null);
  +            }
  +        }
  +        else
  +        {
  +            evt.setRecurIdRange(null);
  +            evt.setRecurIdTzid(null);
  +        }
  +        if(getSequenceProp() != null)
  +        {
  +            evt.setSequence(getSequenceProp().getValue());
  +        }
  +        if(getStatusProp() != null && getStatusProp().getValue() != null)
  +        {
  +            evt.setStatus(getStatusProp().getValue());
  +        }
  +        else
  +        {
  +            evt.setStatus(null);
  +        }
  +        if(getSummaryProp() != null && getSummaryProp().getValue() != null)
  +        {
  +            evt.setSummary(getSummaryProp().getValue());
  +            evt.setSummaryAltRep(getSummaryProp().getAltRepVal());
  +            evt.setSummaryLang(getSummaryProp().getLanguageParameterVal());
  +        }
  +        else
  +        {
  +            evt.setSummary(null);
  +            evt.setSummaryAltRep(null);
  +            evt.setSummaryLang(null);
  +        }
  +        if(getDurationProp() != null && getDurationProp().getValue() != null)
  +        {
  +            evt.setDuration(getDurationProp().getValue().getDuration());
  +        }
  +        if(getGeoProp() != null)
  +        {
  +            evt.setGeoLatitude(getGeoProp().getLatitude());
  +            evt.setGeoLongitude(getGeoProp().getLongitude());
  +        }
  +        if(getLocationProp() != null && 
  +               getLocationProp().getValue() != null)
  +        {
  +            evt.setLocation(getLocationProp().getValue());
  +            evt.setLocationAltRep(getLocationProp().getAltRepVal());
  +            evt.setLocationLang(getLocationProp().getLanguageParameterVal());
  +        }
  +        else
  +        {
  +            evt.setLocation(null);
  +            evt.setLocationAltRep(null);
  +            evt.setLocationLang(null);
  +        }
  +        if(getPriorityProp() != null)
  +        {
  +            evt.setPriority(getPriorityProp().getValue());
  +        }
  +        if(getEndTimeProp() != null)
  +        {
  +            if(getEndTimeProp().getDateTime() != null)
  +            {
  +                evt.setDtendDateTime(getEndTimeProp().getDateTime()
  +                      .getTime().getTime());
  +            }
  +            if(getEndTimeProp().getDate() != null)
  +            {
  +                evt.setDtendDate(getEndTimeProp().getDate().getTime()
  +                       .getTime());
  +            }
  +            if(getEndTimeProp().getDateTime() != null &&
  +                   getEndTimeProp().getDate() != null)
  +            {
  +                evt.setDtendTzid(getEndTimeProp().getTimeZoneIDVal());
  +            }
  +            else
  +            {
  +                evt.setDtendTzid(null);
  +            }
  +        }    
  +        else
  +        {
  +            evt.setDtendTzid(null);
  +        }
  +        evt.save();
       }    
   
       private void checkStatus(String newval)
  
  
  
  1.3       +7 -2      jakarta-commons-sandbox/periodicity/src/xml/periodicity-schema.xml
  
  Index: periodicity-schema.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/src/xml/periodicity-schema.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- periodicity-schema.xml	28 Feb 2002 04:57:18 -0000	1.2
  +++ periodicity-schema.xml	12 Mar 2002 06:02:46 -0000	1.3
  @@ -83,7 +83,7 @@
                 type="BIGINT"
                 description="End Date"/>
         <column name="duration"
  -              type="INTEGER"
  +              type="BIGINT"
                 description="Duration"/>
         <column name="desc_alt_rep"
                 type="VARCHAR"
  @@ -113,6 +113,10 @@
                 type="VARCHAR"
                 size="80"
                 description="Organizer's Directory"/>
  +      <column name="organizer_sentby"
  +              type="VARCHAR"
  +              size="80"
  +              description="Organizer Sent By"/>
         <column name="organizer_lang"
                 type="VARCHAR"
                 size="10"
  @@ -126,7 +130,8 @@
                 size="10"
                 description="The Language of the Summary"/>
         <column name="recur_id_tzid"
  -              type="BIGINT"
  +              type="VARCHAR"
  +              size="80"
                 description="Recurrence ID Time Zone ID"/>
         <column name="recur_id_range"
                 type="VARCHAR"
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>