Class ICalConverter
java.lang.Object
org.apache.ofbiz.workeffort.workeffort.ICalConverter
iCalendar converter class. This class uses the
iCal4J library.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static net.fortuna.ical4j.model.component.VAlarm
createAlarm
(GenericValue workEffortEventReminder) protected static net.fortuna.ical4j.model.property.Attendee
createAttendee
(GenericValue partyValue, Map<String, Object> context) protected static net.fortuna.ical4j.model.property.Organizer
createOrganizer
(GenericValue partyValue, Map<String, Object> context) protected static ICalWorker.ResponseProperties
createWorkEffort
(net.fortuna.ical4j.model.Component component, Map<String, Object> context) protected static String
fromClazz
(net.fortuna.ical4j.model.PropertyList propertyList) protected static Timestamp
fromCompleted
(net.fortuna.ical4j.model.PropertyList propertyList) protected static String
fromDescription
(net.fortuna.ical4j.model.PropertyList propertyList) protected static Timestamp
fromDtEnd
(net.fortuna.ical4j.model.PropertyList propertyList) protected static Timestamp
fromDtStart
(net.fortuna.ical4j.model.PropertyList propertyList) protected static Double
fromDuration
(net.fortuna.ical4j.model.PropertyList propertyList) protected static Timestamp
fromLastModified
(net.fortuna.ical4j.model.PropertyList propertyList) protected static String
fromLocation
(net.fortuna.ical4j.model.PropertyList propertyList) protected static String
fromParticipationStatus
(net.fortuna.ical4j.model.Parameter status) protected static Long
fromPercentComplete
(net.fortuna.ical4j.model.PropertyList propertyList) protected static Double
fromPriority
(net.fortuna.ical4j.model.PropertyList propertyList) protected static String
fromStatus
(net.fortuna.ical4j.model.PropertyList propertyList) protected static String
fromSummary
(net.fortuna.ical4j.model.PropertyList propertyList) protected static String
fromUid
(net.fortuna.ical4j.model.PropertyList propertyList) protected static String
fromXParameter
(net.fortuna.ical4j.model.ParameterList parameterList, String parameterName) protected static String
fromXProperty
(net.fortuna.ical4j.model.PropertyList propertyList, String propertyName) protected static void
getAlarms
(GenericValue workEffort, net.fortuna.ical4j.model.ComponentList alarms) getICalendar
(String workEffortId, Map<String, Object> context) Returns a calendar derived from a Work Effort calendar publish point.protected static void
getPartyUrl
(net.fortuna.ical4j.model.Property property, GenericValue partyAssign, Map<String, Object> context) protected static List<GenericValue>
getRelatedWorkEfforts
(GenericValue workEffort, Map<String, Object> context) protected static boolean
invokeService
(String serviceName, Map<String, ? extends Object> serviceMap, Map<String, Object> context) protected static boolean
isCalendarPublished
(GenericValue publishProperties) protected static void
loadPartyAssignment
(net.fortuna.ical4j.model.Property property, GenericValue partyAssign, Map<String, Object> context) protected static void
loadRelatedParties
(List<GenericValue> relatedParties, net.fortuna.ical4j.model.PropertyList componentProps, Map<String, Object> context) protected static void
loadWorkEffort
(net.fortuna.ical4j.model.PropertyList componentProps, GenericValue workEffort) protected static net.fortuna.ical4j.model.Calendar
makeCalendar
(GenericValue workEffort, Map<String, Object> context) protected static String
makePartyName
(GenericValue partyAssign) protected static void
replaceParameter
(net.fortuna.ical4j.model.ParameterList parameterList, net.fortuna.ical4j.model.Parameter parameter) protected static void
replaceProperty
(net.fortuna.ical4j.model.PropertyList propertyList, net.fortuna.ical4j.model.Property property) protected static void
protected static void
setPartyIdFromUrl
(net.fortuna.ical4j.model.Property property, Map<String, Object> context) protected static void
setWorkEffortServiceMap
(net.fortuna.ical4j.model.Component component, Map<String, Object> serviceMap) storeCalendar
(InputStream is, Map<String, Object> context) Updates work efforts from an incoming iCalendar request.protected static ICalWorker.ResponseProperties
storePartyAssignments
(String workEffortId, net.fortuna.ical4j.model.Component component, Map<String, Object> context) protected static ICalWorker.ResponseProperties
storeWorkEffort
(net.fortuna.ical4j.model.Component component, Map<String, Object> context) protected static ICalWorker.ResponseProperties
toCalendarComponent
(net.fortuna.ical4j.model.ComponentList components, GenericValue workEffort, Map<String, Object> context) protected static net.fortuna.ical4j.model.property.Clazz
protected static net.fortuna.ical4j.model.property.Completed
toCompleted
(Timestamp javaObj) protected static net.fortuna.ical4j.model.property.Created
protected static net.fortuna.ical4j.model.property.Description
toDescription
(String javaObj) protected static net.fortuna.ical4j.model.property.DtEnd
protected static net.fortuna.ical4j.model.property.DtStart
protected static net.fortuna.ical4j.model.property.Duration
toDuration
(Double javaObj) protected static net.fortuna.ical4j.model.property.LastModified
toLastModified
(Timestamp javaObj) protected static net.fortuna.ical4j.model.property.Location
toLocation
(String javaObj) protected static net.fortuna.ical4j.model.parameter.PartStat
toParticipationStatus
(String statusId) protected static net.fortuna.ical4j.model.property.PercentComplete
toPercentComplete
(Long javaObj) protected static net.fortuna.ical4j.model.property.Priority
toPriority
(Long javaObj) protected static net.fortuna.ical4j.model.property.Status
protected static net.fortuna.ical4j.model.property.Summary
protected static net.fortuna.ical4j.model.property.Uid
protected static net.fortuna.ical4j.model.parameter.XParameter
toXParameter
(String name, String value) protected static net.fortuna.ical4j.model.property.XProperty
toXProperty
(String name, String value)
-
Field Details
-
MODULE
-
PARTY_ID_X_PARAM_NAME
- See Also:
-
PROD_ID
protected static final net.fortuna.ical4j.model.property.ProdId PROD_ID -
UID_PREFIX
- See Also:
-
WORKEFFORT_ID_X_PROP_NAME
- See Also:
-
REMINDER_X_PROP_NAME
- See Also:
-
FROM_STATUS_MAP
-
TO_STATUS_MAP
-
TO_PARTY_STATUS_MAP
-
FROM_PART_STATUS_MAP
-
FROM_ROLE_MAP
-
-
Constructor Details
-
ICalConverter
public ICalConverter()
-
-
Method Details
-
createAlarm
protected static net.fortuna.ical4j.model.component.VAlarm createAlarm(GenericValue workEffortEventReminder) -
createAttendee
protected static net.fortuna.ical4j.model.property.Attendee createAttendee(GenericValue partyValue, Map<String, Object> context) -
createOrganizer
protected static net.fortuna.ical4j.model.property.Organizer createOrganizer(GenericValue partyValue, Map<String, Object> context) -
createWorkEffort
protected static ICalWorker.ResponseProperties createWorkEffort(net.fortuna.ical4j.model.Component component, Map<String, Object> context) -
fromClazz
-
fromCompleted
-
fromDescription
-
fromDtEnd
-
fromDtStart
-
fromDuration
-
fromLastModified
-
fromLocation
-
fromParticipationStatus
-
fromPercentComplete
-
fromPriority
-
fromStatus
-
fromSummary
-
fromUid
-
fromXParameter
-
fromXProperty
-
getAlarms
protected static void getAlarms(GenericValue workEffort, net.fortuna.ical4j.model.ComponentList alarms) throws GenericEntityException - Throws:
GenericEntityException
-
getICalendar
public static ICalWorker.ResponseProperties getICalendar(String workEffortId, Map<String, Object> context) throws GenericEntityExceptionReturns a calendar derived from a Work Effort calendar publish point.- Parameters:
workEffortId
- ID of a work effort withworkEffortTypeId
equal toPUBLISH_PROPS
.context
- The conversion context- Returns:
- An iCalendar as a
String
, ornull
ifworkEffortId
is invalid. - Throws:
GenericEntityException
- if communications with the database failed
-
getPartyUrl
protected static void getPartyUrl(net.fortuna.ical4j.model.Property property, GenericValue partyAssign, Map<String, Object> context) -
getRelatedWorkEfforts
protected static List<GenericValue> getRelatedWorkEfforts(GenericValue workEffort, Map<String, Object> context) -
hasPermission
-
invokeService
-
isCalendarPublished
-
loadPartyAssignment
protected static void loadPartyAssignment(net.fortuna.ical4j.model.Property property, GenericValue partyAssign, Map<String, Object> context) -
loadRelatedParties
protected static void loadRelatedParties(List<GenericValue> relatedParties, net.fortuna.ical4j.model.PropertyList componentProps, Map<String, Object> context) -
loadWorkEffort
protected static void loadWorkEffort(net.fortuna.ical4j.model.PropertyList componentProps, GenericValue workEffort) -
makeCalendar
protected static net.fortuna.ical4j.model.Calendar makeCalendar(GenericValue workEffort, Map<String, Object> context) throws GenericEntityException- Throws:
GenericEntityException
-
makePartyName
-
replaceParameter
protected static void replaceParameter(net.fortuna.ical4j.model.ParameterList parameterList, net.fortuna.ical4j.model.Parameter parameter) -
replaceProperty
protected static void replaceProperty(net.fortuna.ical4j.model.PropertyList propertyList, net.fortuna.ical4j.model.Property property) -
setMapElement
-
setPartyIdFromUrl
-
setWorkEffortServiceMap
-
storeCalendar
public static ICalWorker.ResponseProperties storeCalendar(InputStream is, Map<String, Object> context) throws IOException, net.fortuna.ical4j.data.ParserException, GenericEntityException, GenericServiceExceptionUpdates work efforts from an incoming iCalendar request.- Parameters:
is
- the input feeding the calendar parsercontext
- parameters from the execution environment- Returns:
- the response from the ICalWorker
- Throws:
IOException
- if there is an issue withis
net.fortuna.ical4j.data.ParserException
- if the calendar build process failedGenericEntityException
- if communications with the database failedGenericServiceException
- ifcreateWorkEffortICalData
orupdateWorkEffortICalData
service invocation failed
-
storePartyAssignments
protected static ICalWorker.ResponseProperties storePartyAssignments(String workEffortId, net.fortuna.ical4j.model.Component component, Map<String, Object> context) -
storeWorkEffort
protected static ICalWorker.ResponseProperties storeWorkEffort(net.fortuna.ical4j.model.Component component, Map<String, Object> context) throws GenericEntityException- Throws:
GenericEntityException
-
toCalendarComponent
protected static ICalWorker.ResponseProperties toCalendarComponent(net.fortuna.ical4j.model.ComponentList components, GenericValue workEffort, Map<String, Object> context) throws GenericEntityException- Throws:
GenericEntityException
-
toClazz
-
toCompleted
-
toCreated
-
toDescription
-
toDtEnd
-
toDtStart
-
toDuration
-
toLastModified
-
toLocation
-
toParticipationStatus
-
toPercentComplete
-
toPriority
-
toStatus
-
toSummary
-
toUid
-
toXParameter
-
toXProperty
-