本文整理汇总了Java中net.fortuna.ical4j.model.ParameterList类的典型用法代码示例。如果您正苦于以下问题:Java ParameterList类的具体用法?Java ParameterList怎么用?Java ParameterList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParameterList类属于net.fortuna.ical4j.model包,在下文中一共展示了ParameterList类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: loadPartyAssignment
import net.fortuna.ical4j.model.ParameterList; //导入依赖的package包/类
protected static void loadPartyAssignment(Property property, GenericValue partyAssign, Map<String, Object> context) {
getPartyUrl(property, partyAssign, context);
if (UtilValidate.isEmpty(property.getValue())) {
try {
// RFC 2445 4.8.4.1 and 4.8.4.3 Value must be a URL
property.setValue("MAILTO:[email protected]");
} catch (Exception e) {
Debug.logError(e, "Error while setting Property value: ", module);
}
}
ParameterList parameterList = property.getParameters();
if (partyAssign != null) {
replaceParameter(parameterList, toXParameter(partyIdXParamName, partyAssign.getString("partyId")));
replaceParameter(parameterList, new Cn(makePartyName(partyAssign)));
replaceParameter(parameterList, toParticipationStatus(partyAssign.getString("assignmentStatusId")));
}
}
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:18,代码来源:ICalConverter.java
示例2: fromXParameter
import net.fortuna.ical4j.model.ParameterList; //导入依赖的package包/类
protected static String fromXParameter(ParameterList parameterList, String parameterName) {
if (parameterName == null) {
return null;
}
Parameter parameter = parameterList.getParameter(parameterName);
if (parameter != null) {
return parameter.getValue();
}
return null;
}
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:11,代码来源:ICalConverter.java
示例3: replaceParameter
import net.fortuna.ical4j.model.ParameterList; //导入依赖的package包/类
protected static void replaceParameter(ParameterList parameterList, Parameter parameter) {
if (parameter == null) {
return;
}
Parameter existingParam = parameterList.getParameter(parameter.getName());
if (existingParam != null) {
parameterList.remove(existingParam);
}
parameterList.add(parameter);
}
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:11,代码来源:ICalConverter.java
示例4: evaluate
import net.fortuna.ical4j.model.ParameterList; //导入依赖的package包/类
/**
* Evaluates.
* @param params The parameter list.
* @param filter Tge text match filter.
* @return The result.
*/
private boolean evaluate(ParameterList params, TextMatchFilter filter) {
// Evaluate textmatch filter against a set of parameters.
// If any param matches, then evaluation succeeds.
// This is basically a big OR
for(Iterator<Parameter> it = params.iterator(); it.hasNext();) {
Parameter param = it.next();
if(evaluate(param,filter)==true) {
return true;
}
}
return false;
}
开发者ID:ksokol,项目名称:carldav,代码行数:19,代码来源:CalendarFilterEvaluater.java
示例5: convertAttendees
import net.fortuna.ical4j.model.ParameterList; //导入依赖的package包/类
/**
* This method returns a never null but possibly empty {@link HashSet} of {@link Attendee}s.
* This method will attempt to generate a {@link Attendee} for each {@link AttendeeType} contained within @link {@link NonEmptyArrayOfAttendeesType}.
* An a {@link Attendee} will not be generated for any {@link AttendeeType} with a missing or invalid {@link EmailAddressType}
*
* Attendee Responses are only present if you obtained CalendarItem from Exchange as organizer. @see <a href="http://office.microsoft.com/en-us/outlook-help/organize-meetings-with-outlook-RZ001166003.aspx?section=20">Attendees do not see responses</a>
*
* {@link com.microsoft.exchange.impl.ExchangeEventConverterImpl.convertEmailAddressType(EmailAddressType)} for details on how recipient EmailAddressType properties are mapped to {@link Parameter}s.
*
* @param attendees
* @param myResponseType - a {@link PartStat} parameter will be added to every {@link Attendee} if and only if myResponseType.eqals( {@link ResponseTypeType}.ORGANIZER and the corresponding {@link AttendeeType} contains a valid {@link ResponseTypeType} )
* @param requiredAttendees - Indicates which {@link Role} parameter to add to attendees. True indicates that the {@link NonEmptyArrayOfAttendeesType} represent Role.REQ_PARTICIPANT, false indicates the {@link NonEmptyArrayOfAttendeesType} are optional attendees
* @return
*/
protected Set<Attendee> convertAttendees(NonEmptyArrayOfAttendeesType attendees,ResponseTypeType myResponseType, Role role){
Set<Attendee> attendeeSet = new HashSet<Attendee>();
if(null != attendees && !CollectionUtils.isEmpty(attendees.getAttendees())){
for(AttendeeType attendeeType : attendees.getAttendees()){
if(null != attendeeType){
EmailAddressType mailbox = attendeeType.getMailbox();
Pair<ParameterList, URI> attendeePair = convertEmailAddressType(mailbox, role);
URI attendeeURI = attendeePair.getRight();
ParameterList attendeeParams = attendeePair.getLeft();
if(null != attendeeURI){
Attendee attendee = new Attendee(attendeeParams, attendeeURI);
if(null != myResponseType && myResponseType.equals(ResponseTypeType.ORGANIZER)){
//responseType should be present
ResponseTypeType responseType = attendeeType.getResponseType();
if(null != responseType){
//go ahead and add a partstat
attendee.getParameters().add(convertResponseTypeTypeToPartStat(responseType));
}
}
if(attendeeSet.add(attendee)){
log.debug("added Attendee="+attendee);
}
}
}
}
}else{
log.debug("no attendees");
}
return attendeeSet;
}
开发者ID:Bedework,项目名称:exchange-ws-client,代码行数:53,代码来源:ExchangeEventConverterImpl.java
示例6: startProperty
import net.fortuna.ical4j.model.ParameterList; //导入依赖的package包/类
public void startProperty(String property) {
// Start a new parameter list
_parameters = new ParameterList();
}
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:5,代码来源:JsonBusyTimeGenerator.java
示例7: convertExtendedPropertyType
import net.fortuna.ical4j.model.ParameterList; //导入依赖的package包/类
/**
* return a never null but possibly empty {@link Collection} of {@link XProperty}
*
* if an {@link ExtendedPropertyType} contains multiple values this method will return multiple {@link XProperty}'s.
*
* @param extendedProperty
* @return
*/
private Collection<XProperty> convertExtendedPropertyType(ExtendedPropertyType extendedProperty){
Collection<XProperty> xprops = new LinkedHashSet<XProperty>();
PathToExtendedFieldType extendedFieldURI = extendedProperty.getExtendedFieldURI();
if(null != extendedFieldURI){
String propertyName = extendedFieldURI.getPropertyName();
if(StringUtils.isBlank(propertyName)){
DistinguishedPropertySetType distinguishedPropertySetId = extendedFieldURI.getDistinguishedPropertySetId();
if(null != distinguishedPropertySetId){
propertyName = distinguishedPropertySetId.value();
}
}
ParameterList params = new ParameterList();
String exPropSetId = extendedFieldURI.getPropertySetId();
if(StringUtils.isNotBlank(exPropSetId)){
params.add(new PathToExtendedFieldTypePropertySetId(extendedFieldURI));
}
Integer exPropId = extendedFieldURI.getPropertyId();
if(StringUtils.isNotBlank(exPropId.toString())){
params.add(new PathToExtendedFieldTypePropertyId(extendedFieldURI));
}
MapiPropertyTypeType propertyType = extendedFieldURI.getPropertyType();
if(null != propertyType && StringUtils.isNotBlank(propertyType.value())){
params.add(new PathToExtendedFieldTypePropertyType(extendedFieldURI));
}
String propertyTag = extendedFieldURI.getPropertyTag();
if(StringUtils.isNotBlank(propertyTag)){
params.add(new PathToExtendedFieldTypePropertyTag(extendedFieldURI));
}
Set<String> xPropertyValues = new HashSet<String>();
if(StringUtils.isNotBlank(propertyName)){
NonEmptyArrayOfPropertyValuesType values = extendedProperty.getValues();
if(null != values && !CollectionUtils.isEmpty(values.getValues())){
xPropertyValues.addAll(values.getValues());
}else if(null != extendedProperty.getValue()){
xPropertyValues.add(extendedProperty.getValue());
}
}else{
log.error("Unable to generate XProperty(s). propertyName not found for ExtendedPropertyType="+extendedProperty);
}
if(!CollectionUtils.isEmpty(xPropertyValues)){
Integer count = 0;
for(String xValue: xPropertyValues){
xprops.add(new XProperty(propertyName, params, xValue));
propertyName+="_"+count;
count++;
}
}else{
log.error("Unable to generate XProperty(s). propertyValue(s) not found for ExtendedPropertyType="+extendedProperty);
}
}
return xprops;
}
开发者ID:Bedework,项目名称:exchange-ws-client,代码行数:62,代码来源:ExchangeEventConverterImpl.java
示例8: convertEmailAddressType
import net.fortuna.ical4j.model.ParameterList; //导入依赖的package包/类
/**
* This method will return a never null a {@link Pair}<{@link ParameterList},{@link URI}> for a given {@link EmailAddressType}
* This method will return a null URI element if the {@link EmailAddressType} does not contain a valid EmailAddress property
* This method will return a never null but possibly empty {@link ParameterList}.
*
* ParamaterList may contain the following {@link Parameter}s:
* {@link Cn}, {@link EmailAddressRoutingType}, {@link EmailAddressMailboxType}
*
* @param recipient
* @return
*/
protected Pair<ParameterList, URI> convertEmailAddressType(EmailAddressType emailAddressType, Role role){
URI uri = null;
ParameterList params = new ParameterList();
if(null != emailAddressType){
String emailAddress = emailAddressType.getEmailAddress();
if(StringUtils.isNotBlank(emailAddress)){
uri = emailToURI(emailAddress);
}else{
log.warn("convertEmailAddressType: could not generate URI.");
}
if(null != role){
params.add(role);
}
String name = emailAddressType.getName();
if(StringUtils.isNotBlank(name)){
params.add(new Cn(name));
}else{
log.debug("convertEmailAddressType: could not generate Cn");
}
String routingType = emailAddressType.getRoutingType();
if(StringUtils.isNotBlank(routingType)){
params.add(new EmailAddressRoutingType(routingType));
}else{
log.debug("convertEmailAddressType: could not generate EmailAddressRoutingType");
}
MailboxTypeType mailboxType = emailAddressType.getMailboxType();
if(null != mailboxType){
params.add(new EmailAddressMailboxType(mailboxType));
CuType cuType = convertMailboxTypeTypeToCuType(mailboxType,role);
params.add(cuType);
}else{
log.debug("convertEmailAddressType: could not generate EmailAddressMailboxType");
}
}else{
log.debug("convertEmailAddressType: EmailAddressType = null");
}
Pair<ParameterList,URI> pair = Pair.of(params, uri);
return pair;
}
开发者ID:Bedework,项目名称:exchange-ws-client,代码行数:53,代码来源:ExchangeEventConverterImpl.java
注:本文中的net.fortuna.ical4j.model.ParameterList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论