当前位置: 首页>>代码示例>>Java>>正文


Java VEvent.setStatus方法代码示例

本文整理汇总了Java中biweekly.component.VEvent.setStatus方法的典型用法代码示例。如果您正苦于以下问题:Java VEvent.setStatus方法的具体用法?Java VEvent.setStatus怎么用?Java VEvent.setStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在biweekly.component.VEvent的用法示例。


在下文中一共展示了VEvent.setStatus方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: printExam

import biweekly.component.VEvent; //导入方法依赖的package包/类
private void printExam(Exam exam, ICalendar ical) throws IOException {
	if (exam.getAssignedPeriod() == null) return;

       VEvent vevent = new VEvent();
       vevent.setSequence(0);
       vevent.setUid(exam.getUniqueId().toString());
   	DateStart dstart = new DateStart(exam.getAssignedPeriod().getStartTime(), true);
   	vevent.setDateStart(dstart);
       Calendar endTime = Calendar.getInstance(); endTime.setTime(exam.getAssignedPeriod().getStartTime());
       endTime.add(Calendar.MINUTE, exam.getLength());
   	DateEnd dend = new DateEnd(endTime.getTime(), true);
   	vevent.setDateEnd(dend);
   	vevent.setSummary(exam.getLabel()+" ("+exam.getExamType().getLabel()+" Exam)");
       if (!exam.getAssignedRooms().isEmpty()) {
           String rooms = "";
           for (Iterator i=new TreeSet(exam.getAssignedRooms()).iterator();i.hasNext();) {
               Location location = (Location)i.next();
               if (rooms.length()>0) rooms+=", ";
               rooms+=location.getLabel();
           }
           vevent.setLocation(rooms);
       }
       vevent.setStatus(Status.confirmed());
       ical.addEvent(vevent);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:26,代码来源:CalendarServlet.java

示例2: example1

import biweekly.component.VEvent; //导入方法依赖的package包/类
@Test
public void example1() throws Throwable {
	ICalendar ical = new ICalendar();
	ical.getProperties().clear();
	ical.setProductId("-//xyz Corp//NONSGML PDA Calendar Version 1.0//EN");
	{
		VEvent event = new VEvent();
		event.getProperties().clear();
		event.setDateTimeStamp(utc("1996-07-04 12:00:00"));
		event.setUid("[email protected]");
		event.setOrganizer("[email protected]");
		event.setDateStart(utc("1996-09-18 14:30:00"));
		event.setDateEnd(utc("1996-09-20 22:00:00"));
		event.setStatus(Status.confirmed());
		event.addCategories("CONFERENCE");
		event.setSummary("Networld+Interop Conference");
		event.setDescription("Networld+Interop Conferenceand Exhibit\nAtlanta World Congress Center\nAtlanta, Georgia");
		ical.addEvent(event);
	}

	assertValidate(ical).versions(V2_0_DEPRECATED, V2_0).run();
	assertExample(ical, "rfc5545-example1.ics", V2_0);
}
 
开发者ID:mangstadt,项目名称:biweekly,代码行数:24,代码来源:ICalWriterTest.java

示例3: vcal_example1

import biweekly.component.VEvent; //导入方法依赖的package包/类
@Test
public void vcal_example1() throws Throwable {
	ICalendar ical = new ICalendar();
	ical.getProperties().clear();
	{
		VEvent event = new VEvent();
		event.getProperties().clear();
		event.addCategories("MEETING");
		event.setStatus(Status.tentative());
		event.setDateStart(utc("1996-04-01 03:30:00"));
		event.setDateEnd(utc("1996-04-01 04:30:00"));
		event.setSummary("Your Proposal Review");
		event.setDescription("Steve and John to review newest proposal material");
		event.setClassification(Classification.private_());

		ical.addEvent(event);
	}

	assertValidate(ical).versions(V1_0).run();
	assertExample(ical, "vcal-example1.vcs", V1_0);
}
 
开发者ID:mangstadt,项目名称:biweekly,代码行数:22,代码来源:ICalWriterTest.java

示例4: toVEventObject

import biweekly.component.VEvent; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public VEvent toVEventObject() {

	VEvent event = new VEvent();

	if (uid != null)
           event.setUid(uid);

	event.setDateStart(dtStart);
	if (dtEnd != null)
		event.setDateEnd(dtEnd);
	if (duration != null)
		event.setDuration(duration);
	
	if (rrule != null)
		event.setRecurrenceRule(rrule);
	if (rdate != null && !rdate.isEmpty()) {
           for (RecurrenceDates rd : rdate) {
               event.addRecurrenceDates(rd);
           }
       }
	if (exrule != null && !exrule.isEmpty()) {
           for (ExceptionRule exr : exrule) {
               event.addExceptionRule(exr);
           }
       }
	if (exdate != null && !exdate.isEmpty()) {
           for (ExceptionDates exd: exdate) {
               event.addExceptionDates(exd);
           }
       }
	
	if (summary != null && !summary.isEmpty())
		event.setSummary(summary);
	if (location != null && !location.isEmpty())
           event.setLocation(location);
	if (description != null && !description.isEmpty())
		event.setDescription(description);
	
	if (status != null)
		event.setStatus(status);
	if (!opaque)
		event.setTransparency(true);
	
	if (organizer != null)
		event.setOrganizer(organizer);

       for (Attendee attendee: attendees) {
           event.addAttendee(attendee);
       }

	if (forPublic != null)
		event.setClassification(forPublic ? "public" : "private");
	
	for (VAlarm alarm: alarms) {
           event.addAlarm(alarm);
       }

	event.setLastModified(new Date());

       return event;
}
 
开发者ID:eXfio,项目名称:CucumberSync,代码行数:63,代码来源:Event.java


注:本文中的biweekly.component.VEvent.setStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。