本文整理汇总了Java中net.fortuna.ical4j.model.property.Action类的典型用法代码示例。如果您正苦于以下问题:Java Action类的具体用法?Java Action怎么用?Java Action使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Action类属于net.fortuna.ical4j.model.property包,在下文中一共展示了Action类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getDisplayAlarm
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
/**
* Find and return the first DISPLAY VALARM in a comoponent
* @param component VEVENT or VTODO
* @return first DISPLAY VALARM, null if there is none
*/
public static VAlarm getDisplayAlarm(Component component) {
ComponentList<VAlarm> alarms = null;
if(component instanceof VEvent) {
alarms = ((VEvent) component).getAlarms();
}
else if(component instanceof VToDo) {
alarms = ((VToDo) component).getAlarms();
}
if(alarms==null || alarms.size()==0) {
return null;
}
for(Iterator<VAlarm> it = alarms.iterator();it.hasNext();) {
VAlarm alarm = it.next();
if(Action.DISPLAY.equals(alarm.getAction())) {
return alarm;
}
}
return null;
}
开发者ID:1and1,项目名称:cosmo,代码行数:29,代码来源:ICalendarUtils.java
示例2: updateNoteModification
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
/**
* Updates note modification.
* @param noteMod The note item modified.
* @param event The event.
*/
private void updateNoteModification(NoteItem noteMod,
VEvent event) {
EventExceptionStamp exceptionStamp =
StampUtils.getEventExceptionStamp(noteMod);
exceptionStamp.setExceptionEvent(event);
// copy VTIMEZONEs to front if present
ComponentList<VTimeZone> vtimezones = exceptionStamp.getMasterStamp()
.getEventCalendar().getComponents(Component.VTIMEZONE);
for(VTimeZone vtimezone : vtimezones) {
exceptionStamp.getEventCalendar().getComponents().add(0, vtimezone);
}
noteMod.setClientModifiedDate(new Date());
noteMod.setLastModifiedBy(noteMod.getModifies().getLastModifiedBy());
noteMod.setLastModification(ContentItem.Action.EDITED);
setCalendarAttributes(noteMod, event);
}
开发者ID:1and1,项目名称:cosmo,代码行数:25,代码来源:EntityConverter.java
示例3: removeDisplayAlarm
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
/**
* Removes display alarm.
*/
public void removeDisplayAlarm() {
VEvent event = getEvent();
if (event == null) {
return;
}
for(@SuppressWarnings("rawtypes")
Iterator it = event.getAlarms().iterator();it.hasNext();) {
VAlarm alarm = (VAlarm) it.next();
if (alarm.getProperties().getProperty(Property.ACTION).equals(
Action.DISPLAY)) {
it.remove();
}
}
}
开发者ID:1and1,项目名称:cosmo,代码行数:20,代码来源:MockBaseEventStamp.java
示例4: getDisplayAlarm
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
protected VAlarm getDisplayAlarm(VEvent event) {
ComponentList<VAlarm> alarmsList = event.getAlarms();
for(VAlarm alarm: alarmsList) {
if (alarm.getProperties().getProperty(Property.ACTION).equals(
Action.DISPLAY)) {
return alarm;
}
}
return null;
}
开发者ID:1and1,项目名称:cosmo,代码行数:12,代码来源:HibBaseEventStamp.java
示例5: removeDisplayAlarm
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
public void removeDisplayAlarm() {
VEvent event = getEvent();
if(event==null) {
return;
}
ComponentList<VAlarm> alarmsList = event.getAlarms();
for(VAlarm alarm: alarmsList) {
if (alarm.getProperties().getProperty(Property.ACTION).equals(
Action.DISPLAY)) {
alarmsList.remove(alarm);
}
}
}
开发者ID:1and1,项目名称:cosmo,代码行数:16,代码来源:HibBaseEventStamp.java
示例6: getDisplayAlarm
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
/**
* Gets display alarm.
* @param event The event.
* @return The alarm.
*/
private VAlarm getDisplayAlarm(VEvent event) {
for(VAlarm alarm : event.getAlarms()) {
if (alarm.getProperties().getProperty(Property.ACTION).equals(Action.DISPLAY)) {
return alarm;
}
}
return null;
}
开发者ID:1and1,项目名称:cosmo,代码行数:15,代码来源:EntityConverter.java
示例7: setBaseContentAttributes
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
/**
* Sets base content attributes.
* @param item The content item.
*/
private void setBaseContentAttributes(ContentItem item) {
TriageStatus ts = entityFactory.createTriageStatus();
TriageStatusUtil.initialize(ts);
item.setClientCreationDate(new Date());
item.setClientModifiedDate(item.getClientCreationDate());
item.setTriageStatus(ts);
item.setLastModification(ContentItem.Action.CREATED);
item.setSent(Boolean.FALSE);
item.setNeedsReply(Boolean.FALSE);
}
开发者ID:1and1,项目名称:cosmo,代码行数:18,代码来源:EntityConverter.java
示例8: getDisplayAlarm
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
/**
* Display alarm.
* @param event The event.
* @return The alarm.
*/
protected VAlarm getDisplayAlarm(VEvent event) {
for(@SuppressWarnings("rawtypes")
Iterator it = event.getAlarms().iterator();it.hasNext();) {
VAlarm alarm = (VAlarm) it.next();
if (alarm.getProperties().getProperty(Property.ACTION).equals(Action.DISPLAY)) {
return alarm;
}
}
return null;
}
开发者ID:1and1,项目名称:cosmo,代码行数:16,代码来源:MockBaseEventStamp.java
示例9: creatDisplayAlarm
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
/**
* Creates display alarm.
*/
public void creatDisplayAlarm() {
VAlarm alarm = new VAlarm();
alarm.getProperties().add(Action.DISPLAY);
getEvent().getAlarms().add(alarm);
setDisplayAlarmDescription("Event Reminder");
}
开发者ID:1and1,项目名称:cosmo,代码行数:10,代码来源:MockBaseEventStamp.java
示例10: extractAndParseReminder
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
public static void extractAndParseReminder(VEvent newEvent, Task newTask,
java.util.Calendar reminderTime) {
VAlarm reminder = new VAlarm(new DateTime(reminderTime.getTime()));
reminder.getProperties().add(Action.DISPLAY);
reminder.getProperties().add(new Description(newTask.getTaskTitle()));
newEvent.getAlarms().add(reminder);
}
开发者ID:MohitShridhar,项目名称:TASCA,代码行数:9,代码来源:Exporter.java
示例11: addDisplayAction
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
private void addDisplayAction(EventEntity event, VAlarm reminder) {
reminder.getProperties().add(Action.DISPLAY);
reminder.getProperties().add(new Description(event.getDescription()));
}
开发者ID:adrobisch,项目名称:putput,代码行数:5,代码来源:EventsResource.java
示例12: creatDisplayAlarm
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
public void creatDisplayAlarm() {
VAlarm alarm = new VAlarm();
alarm.getProperties().add(Action.DISPLAY);
getEvent().getAlarms().add(alarm);
setDisplayAlarmDescription("Event Reminder");
}
开发者ID:1and1,项目名称:cosmo,代码行数:7,代码来源:HibBaseEventStamp.java
示例13: makeDummyEvent
import net.fortuna.ical4j.model.property.Action; //导入依赖的package包/类
/**
* Makes dummy event.
* @return The event.
*/
public VEvent makeDummyEvent() {
String serial = Integer.toString(++eseq);
String summary = "dummy" + serial;
// tomorrow
java.util.Calendar start = java.util.Calendar.getInstance();
start.add(java.util.Calendar.DAY_OF_MONTH, 1);
start.set(java.util.Calendar.HOUR_OF_DAY, 9);
start.set(java.util.Calendar.MINUTE, 30);
// 1 hour duration
Dur duration = new Dur(0, 1, 0, 0);
VEvent event = new VEvent(new Date(start.getTime()), duration, summary);
event.getProperties().add(new Uid(serial));
// add timezone information
VTimeZone tz = TimeZoneRegistryFactory.getInstance().createRegistry().
getTimeZone("America/Los_Angeles").getVTimeZone();
String tzValue =
tz.getProperties().getProperty(Property.TZID).getValue();
net.fortuna.ical4j.model.parameter.TzId tzParam =
new net.fortuna.ical4j.model.parameter.TzId(tzValue);
event.getProperties().getProperty(Property.DTSTART).
getParameters().add(tzParam);
// add an alarm for 5 minutes before the event with an xparam
// on the description
Dur trigger = new Dur(0, 0, -5, 0);
VAlarm alarm = new VAlarm(trigger);
alarm.getProperties().add(Action.DISPLAY);
Description description = new Description("Meeting at 9:30am");
XParameter xparam = new XParameter("X-COSMO-TEST-PARAM", "deadbeef");
description.getParameters().add(xparam);
alarm.getProperties().add(description);
alarm.getProperties().add(new Description("Meeting at 9:30am"));
event.getAlarms().add(alarm);
// add an x-property with an x-param
XProperty xprop = new XProperty("X-COSMO-TEST-PROP", "abc123");
xprop.getParameters().add(xparam);
event.getProperties().add(xprop);
return event;
}
开发者ID:1and1,项目名称:cosmo,代码行数:50,代码来源:TestHelper.java
注:本文中的net.fortuna.ical4j.model.property.Action类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论