本文整理汇总了Java中net.fortuna.ical4j.model.parameter.XParameter类的典型用法代码示例。如果您正苦于以下问题:Java XParameter类的具体用法?Java XParameter怎么用?Java XParameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XParameter类属于net.fortuna.ical4j.model.parameter包,在下文中一共展示了XParameter类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setMissing
import net.fortuna.ical4j.model.parameter.XParameter; //导入依赖的package包/类
protected void setMissing(Property prop, boolean missing) {
Parameter parameter =
prop.getParameters().getParameter(PARAM_OSAF_MISSING);
if (missing) {
if (parameter == null) {
prop.getParameters().add(
new XParameter(PARAM_OSAF_MISSING, VALUE_TRUE));
}
} else {
if (parameter != null) {
prop.getParameters().remove(parameter);
}
}
}
开发者ID:1and1,项目名称:cosmo,代码行数:16,代码来源:HibEventExceptionStamp.java
示例2: setMissing
import net.fortuna.ical4j.model.parameter.XParameter; //导入依赖的package包/类
/**
* Sets missing.
* @param prop The property.
* @param missing boolean.
*/
protected void setMissing(Property prop, boolean missing) {
Parameter parameter =
prop.getParameters().getParameter(PARAM_OSAF_MISSING);
if (missing) {
if (parameter == null) {
prop.getParameters().add(new XParameter(PARAM_OSAF_MISSING, VALUE_TRUE));
}
} else {
if (parameter != null) {
prop.getParameters().remove(parameter);
}
}
}
开发者ID:1and1,项目名称:cosmo,代码行数:20,代码来源:MockEventExceptionStamp.java
示例3: toXParameter
import net.fortuna.ical4j.model.parameter.XParameter; //导入依赖的package包/类
protected static XParameter toXParameter(String name, String value) {
if (name == null || value == null) {
return null;
}
return new XParameter(name, value);
}
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:7,代码来源:ICalConverter.java
示例4: getAnyTimeXParam
import net.fortuna.ical4j.model.parameter.XParameter; //导入依赖的package包/类
protected Parameter getAnyTimeXParam() {
return new XParameter(PARAM_X_OSAF_ANYTIME, VALUE_TRUE);
}
开发者ID:1and1,项目名称:cosmo,代码行数:4,代码来源:HibBaseEventStamp.java
示例5: getInheritedAnyTimeXParam
import net.fortuna.ical4j.model.parameter.XParameter; //导入依赖的package包/类
private Parameter getInheritedAnyTimeXParam() {
return new XParameter(PARAM_X_OSAF_ANYTIME, VALUE_MISSING);
}
开发者ID:1and1,项目名称:cosmo,代码行数:4,代码来源:HibEventExceptionStamp.java
示例6: makeDummyEvent
import net.fortuna.ical4j.model.parameter.XParameter; //导入依赖的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
示例7: getAnyTimeXParam
import net.fortuna.ical4j.model.parameter.XParameter; //导入依赖的package包/类
/**
* Gets any time x param.
* @return The parameter.
*/
private Parameter getAnyTimeXParam() {
return new XParameter(ICalendarConstants.PARAM_X_OSAF_ANYTIME, ICalendarConstants.VALUE_TRUE);
}
开发者ID:1and1,项目名称:cosmo,代码行数:8,代码来源:EntityConverter.java
示例8: getAnyTimeXParam
import net.fortuna.ical4j.model.parameter.XParameter; //导入依赖的package包/类
/**
* Gets any time param.
* @return The parameter.
*/
protected Parameter getAnyTimeXParam() {
return new XParameter(PARAM_X_OSAF_ANYTIME, VALUE_TRUE);
}
开发者ID:1and1,项目名称:cosmo,代码行数:8,代码来源:MockBaseEventStamp.java
注:本文中的net.fortuna.ical4j.model.parameter.XParameter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论