本文整理汇总了Java中net.fortuna.ical4j.model.Property.getValue方法的典型用法代码示例。如果您正苦于以下问题:Java Property.getValue方法的具体用法?Java Property.getValue怎么用?Java Property.getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.fortuna.ical4j.model.Property
的用法示例。
在下文中一共展示了Property.getValue方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setCalendar
import net.fortuna.ical4j.model.Property; //导入方法依赖的package包/类
/**
* <p>
* Imports a calendar object containing a VAVAILABILITY.
* @param cal The calendar imported.
* @throws CosmoDavException - if something is wrong this exception is thrown.
* </p>
*/
public void setCalendar(Calendar cal) throws CosmoDavException {
AvailabilityItem availability = (AvailabilityItem) getItem();
availability.setAvailabilityCalendar(cal);
Component comp = cal.getComponent(ICalendarConstants.COMPONENT_VAVAILABLITY);
if (comp==null) {
throw new UnprocessableEntityException("VCALENDAR does not contain a VAVAILABILITY");
}
String val = null;
Property prop = comp.getProperty(Property.UID);
if (prop != null) {
val = prop.getValue();
}
if (StringUtils.isBlank(val)) {
throw new UnprocessableEntityException("VAVAILABILITY does not contain a UID");
}
availability.setIcalUid(val);
}
示例2: fromXProperty
import net.fortuna.ical4j.model.Property; //导入方法依赖的package包/类
protected static String fromXProperty(PropertyList propertyList, String propertyName) {
if (propertyName == null) {
return null;
}
Property property = propertyList.getProperty(propertyName);
if (property != null) {
return property.getValue();
}
return null;
}
示例3: getXProperty
import net.fortuna.ical4j.model.Property; //导入方法依赖的package包/类
/**
* Get X property value from component;
* @param property x property to get
* @param comp component
* @return value of xproperty, null if property does not exist
*/
public static String getXProperty(String property, Component comp) {
Property prop = comp.getProperties().getProperty(property);
if(prop!=null) {
return prop.getValue();
}
else {
return null;
}
}
示例4: getLocation
import net.fortuna.ical4j.model.Property; //导入方法依赖的package包/类
public String getLocation() {
Property p = getEvent().getProperties().
getProperty(Property.LOCATION);
if (p == null) {
return null;
}
return p.getValue();
}
示例5: getStatus
import net.fortuna.ical4j.model.Property; //导入方法依赖的package包/类
public String getStatus() {
Property p = getEvent().getProperties().
getProperty(Property.STATUS);
if (p == null) {
return null;
}
return p.getValue();
}
示例6: checkDatesForComponent
import net.fortuna.ical4j.model.Property; //导入方法依赖的package包/类
private void checkDatesForComponent(Component component){
if(component == null){
return;
}
Property dtStart = component.getProperty(Property.DTSTART);
Property dtEnd = component.getProperty(Property.DTEND);
if( dtStart instanceof DtStart && dtStart.getValue()!= null
&& dtEnd instanceof DtEnd && dtEnd.getValue() != null
&& ((DtStart)dtStart).getDate().compareTo(((DtEnd)dtEnd).getDate()) > 0 ){
throw new IllegalArgumentException("End date [" + dtEnd + " is lower than start date [" + dtStart + "]");
}
}
示例7: isTextPropertyValid
import net.fortuna.ical4j.model.Property; //导入方法依赖的package包/类
private static boolean isTextPropertyValid(Property prop, int minLength, int maxLength){
if(prop == null && minLength == 0){
return true;
}else if(prop == null){
return false;
}
String value = prop.getValue();
int valueSize = value == null ? 0 : value.length();
if(valueSize < minLength || valueSize > maxLength){
return false;
}
return true;
}
示例8: getLocation
import net.fortuna.ical4j.model.Property; //导入方法依赖的package包/类
/**
* Gets location.
* @return The location.
*/
public String getLocation() {
Property p = getEvent().getProperties().
getProperty(Property.LOCATION);
if (p == null) {
return null;
}
return p.getValue();
}
示例9: getStatus
import net.fortuna.ical4j.model.Property; //导入方法依赖的package包/类
/**
* Gets status.
* @return The status.
*/
public String getStatus() {
Property p = getEvent().getProperties().
getProperty(Property.STATUS);
if (p == null) {
return null;
}
return p.getValue();
}
示例10: storePartyAssignments
import net.fortuna.ical4j.model.Property; //导入方法依赖的package包/类
protected static ResponseProperties storePartyAssignments(String workEffortId, Component component, Map<String, Object> context) {
ResponseProperties responseProps = null;
Map<String, Object> serviceMap = FastMap.newInstance();
List<Property> partyList = FastList.newInstance();
partyList.addAll(UtilGenerics.checkList(component.getProperties("ATTENDEE"), Property.class));
partyList.addAll(UtilGenerics.checkList(component.getProperties("CONTACT"), Property.class));
partyList.addAll(UtilGenerics.checkList(component.getProperties("ORGANIZER"), Property.class));
for (Property property : partyList) {
String partyId = fromXParameter(property.getParameters(), partyIdXParamName);
if (partyId == null) {
serviceMap.clear();
String address = property.getValue();
if (address.toUpperCase().startsWith("MAILTO:")) {
address = address.substring(7);
}
serviceMap.put("address", address);
Map<String, Object> result = invokeService("findPartyFromEmailAddress", serviceMap, context);
partyId = (String) result.get("partyId");
if (partyId == null) {
continue;
}
replaceParameter(property.getParameters(), toXParameter(partyIdXParamName, partyId));
}
serviceMap.clear();
serviceMap.put("workEffortId", workEffortId);
serviceMap.put("partyId", partyId);
serviceMap.put("roleTypeId", fromRoleMap.get(property.getName()));
Delegator delegator = (Delegator) context.get("delegator");
List<GenericValue> assignments = null;
try {
assignments = EntityQuery.use(delegator).from("WorkEffortPartyAssignment").where(serviceMap).filterByDate().queryList();
if (assignments.size() == 0) {
serviceMap.put("statusId", "PRTYASGN_OFFERED");
serviceMap.put("fromDate", new Timestamp(System.currentTimeMillis()));
invokeService("assignPartyToWorkEffort", serviceMap, context);
}
} catch (GenericEntityException e) {
responseProps = ICalWorker.createPartialContentResponse(e.getMessage());
break;
}
}
return responseProps;
}
示例11: getValueIfExists
import net.fortuna.ical4j.model.Property; //导入方法依赖的package包/类
private static String getValueIfExists(final Component comp, final String key) {
final Property p = comp.getProperty(key);
return p == null ? null : p.getValue();
}
示例12: storePartyAssignments
import net.fortuna.ical4j.model.Property; //导入方法依赖的package包/类
protected static ResponseProperties storePartyAssignments(String workEffortId, Component component, Map<String, Object> context) {
ResponseProperties responseProps = null;
Map<String, Object> serviceMap = FastMap.newInstance();
List<Property> partyList = FastList.newInstance();
partyList.addAll(UtilGenerics.checkList(component.getProperties("ATTENDEE"), Property.class));
partyList.addAll(UtilGenerics.checkList(component.getProperties("CONTACT"), Property.class));
partyList.addAll(UtilGenerics.checkList(component.getProperties("ORGANIZER"), Property.class));
for (Property property : partyList) {
String partyId = fromXParameter(property.getParameters(), partyIdXParamName);
if (partyId == null) {
serviceMap.clear();
String address = property.getValue();
if (address.toUpperCase().startsWith("MAILTO:")) {
address = address.substring(7);
}
serviceMap.put("address", address);
Map<String, Object> result = invokeService("findPartyFromEmailAddress", serviceMap, context);
partyId = (String) result.get("partyId");
if (partyId == null) {
continue;
}
replaceParameter(property.getParameters(), toXParameter(partyIdXParamName, partyId));
}
serviceMap.clear();
serviceMap.put("workEffortId", workEffortId);
serviceMap.put("partyId", partyId);
serviceMap.put("roleTypeId", fromRoleMap.get(property.getName()));
Delegator delegator = (Delegator) context.get("delegator");
List<GenericValue> assignments = null;
try {
assignments = EntityUtil.filterByDate(delegator.findByAnd("WorkEffortPartyAssignment", serviceMap, null, false));
if (assignments.size() == 0) {
serviceMap.put("statusId", "PRTYASGN_OFFERED");
serviceMap.put("fromDate", new Timestamp(System.currentTimeMillis()));
invokeService("assignPartyToWorkEffort", serviceMap, context);
}
} catch (GenericEntityException e) {
responseProps = ICalWorker.createPartialContentResponse(e.getMessage());
break;
}
}
return responseProps;
}