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


Java Transp类代码示例

本文整理汇总了Java中net.fortuna.ical4j.model.property.Transp的典型用法代码示例。如果您正苦于以下问题:Java Transp类的具体用法?Java Transp怎么用?Java Transp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Transp类属于net.fortuna.ical4j.model.property包,在下文中一共展示了Transp类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSimpleContentItem

import net.fortuna.ical4j.model.property.Transp; //导入依赖的package包/类
/**
 * Creates a simple item which will be checked with simpleCheckCallExpectedHandler.
 *  
 * @param user
 * @return
 * @throws URISyntaxException
 */
private ContentItem createSimpleContentItem(User user) throws URISyntaxException {
    //call service
    ContentItem contentItem = testHelper.makeDummyContent(user);


    HibEventStamp eventStamp = new HibEventStamp();
    VEvent vEvent = new VEvent();
    vEvent.getProperties().add(Method.REQUEST);
    vEvent.getProperties().add(Version.VERSION_2_0);
    
    Attendee dev1 = new Attendee(URI.create("MAILTO:" + ATTENDEE_1));
    dev1.getParameters().add(Role.REQ_PARTICIPANT);
    dev1.getParameters().add(PartStat.NEEDS_ACTION);
    dev1.getParameters().add(Rsvp.TRUE);
    vEvent.getProperties().add(dev1);
            
    Organizer  organizer = new Organizer("MAILTO:" + ORGANIZER);        
    vEvent.getProperties().add(organizer);
    vEvent.getProperties().add(Status.VEVENT_CONFIRMED);
    vEvent.getProperties().add(Transp.OPAQUE);
        
    Calendar calendar = new Calendar();
    calendar.getComponents().add(vEvent);
        
    eventStamp.setEventCalendar(calendar);        
    contentItem.addStamp(eventStamp);
    return contentItem;
}
 
开发者ID:1and1,项目名称:cosmo,代码行数:36,代码来源:ContextServiceExtensionsAdviceTest.java

示例2: findOrCreateEventCRM

import net.fortuna.ical4j.model.property.Transp; //导入依赖的package包/类
@Transactional
protected Event findOrCreateEventCRM(VEvent vEvent) {

	String uid = vEvent.getUid().getValue();
	DtStart dtStart = vEvent.getStartDate();
	DtEnd dtEnd = vEvent.getEndDate();

	EventRepository repo = Beans.get(EventRepository.class);
	Event event = repo.all().filter("self.uid = ?1", uid).fetchOne();
	if (event == null) {
		event = new Event();
		event.setUid(uid);
	}
	if(event.getTypeSelect() == null || event.getTypeSelect() == 0){
		event.setTypeSelect(EventRepository.TYPE_EVENT);
	}
	event.setStartDateTime(new LocalDateTime(dtStart.getDate()));
	event.setEndDateTime(new LocalDateTime(dtEnd.getDate()));
	event.setAllDay(!(dtStart.getDate() instanceof DateTime));

	event.setSubject(getValue(vEvent, Property.SUMMARY));
	event.setDescription(getValue(vEvent, Property.DESCRIPTION));
	event.setLocation(getValue(vEvent, Property.LOCATION));
	event.setGeo(getValue(vEvent, Property.GEO));
	event.setUrl(getValue(vEvent, Property.URL));
	event.setSubjectTeam(event.getSubject());
	if(Clazz.PRIVATE.getValue().equals(getValue(vEvent, Property.CLASS))){
		event.setVisibilitySelect(ICalendarEventRepository.VISIBILITY_PRIVATE);
	}
	else{
		event.setVisibilitySelect(ICalendarEventRepository.VISIBILITY_PUBLIC);
	}
	if(Transp.TRANSPARENT.getValue().equals(getValue(vEvent, Property.TRANSP))){
		event.setDisponibilitySelect(ICalendarEventRepository.DISPONIBILITY_AVAILABLE);
	}
	else{
		event.setDisponibilitySelect(ICalendarEventRepository.DISPONIBILITY_BUSY);
	}
	if(event.getVisibilitySelect() == ICalendarEventRepository.VISIBILITY_PRIVATE){
		event.setSubjectTeam(I18n.get("Available"));
		if(event.getDisponibilitySelect() == ICalendarEventRepository.DISPONIBILITY_BUSY){
			event.setSubjectTeam(I18n.get("Busy"));
		}
	}
	ICalendarUser organizer = findOrCreateUser(vEvent.getOrganizer(), event);
	if (organizer != null) {
		event.setOrganizer(organizer);
		iCalendarUserRepository.save(organizer);
	}

	for (Object item : vEvent.getProperties(Property.ATTENDEE)) {
		ICalendarUser attendee = findOrCreateUser((Property) item, event);
		if (attendee != null) {
			event.addAttendee(attendee);
			iCalendarUserRepository.save(attendee);
		}
	}

	return event;
}
 
开发者ID:axelor,项目名称:axelor-business-suite,代码行数:61,代码来源:CalendarService.java


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