org.sakaiproject.component.legacy.calendar
Class GenericCalendarImporter.PrototypeEvent

java.lang.Object
  extended byorg.sakaiproject.component.legacy.calendar.GenericCalendarImporter.PrototypeEvent
All Implemented Interfaces:
AttachmentContainer, AttachmentContainerEdit, CalendarEvent, CalendarEventEdit, Comparable, Edit, Entity
Enclosing class:
GenericCalendarImporter

public class GenericCalendarImporter.PrototypeEvent
extends Object
implements CalendarEventEdit


Field Summary
 
Fields inherited from interface org.sakaiproject.service.legacy.entity.Entity
SEPARATOR
 
Constructor Summary
GenericCalendarImporter.PrototypeEvent()
          Default constructor
 
Method Summary
 void addAttachment(Reference arg0)
          Add an attachment.
 void clearAttachments()
          Clear all attachments.
 int compareTo(Object o)
           
 List getAttachments()
          Access the attachments.
 String getCalendarReference()
          Gets the containing calendar's reference.
 String getDescription()
          Access the description property as plain text (cover for PROP_DESCRIPTION).
 String getDescriptionFormatted()
          Access the description property as formatted text (cover for PROP_DESCRIPTION).
 String getDisplayEndTime()
          Get the end time of the event formatted for display.
 String getDisplayName()
          Access the display name property (cover for PROP_DISPLAY_NAME).
 String getDisplayStartDate()
          Get the start date formatted for display.
 String getDisplayStartTime()
          Get the start time formatted for display.
 String getField(String fieldName)
          Get the value of an "extra" event field.
 String getId()
          Access the id of the entity.
 int getLineNumber()
          Get the line number on which this event occurs.
 String getLocation()
          Access the location property (cover for PROP_CALENDAR_LOCATION).
 ResourceProperties getProperties()
          Access the entity's properties.
 ResourcePropertiesEdit getPropertiesEdit()
          Access the resource's properties for modification
 TimeRange getRange()
          Access the time range
 RecurrenceRule getRecurrenceRule()
          Gets the recurrence rule, if any.
 String getReference()
          Access the internal reference which can be used to access the entity from within the system.
 String getReference(String rootProperty)
          Access the alternate internal reference which can be used to access the entity from within the system.
 String getType()
          Access the type (cover for PROP_CALENDAR_TYPE).
 String getUrl()
          Access the URL which can be used to access the entity.
 String getUrl(String rootProperty)
          Access the alternate URL which can be used to access the entity.
 boolean isActiveEdit()
          Check to see if the edit is still active, or has already been closed.
 void removeAttachment(Reference arg0)
          Remove an attachment.
 void replaceAttachments(List arg0)
          Replace the attachment set.
 void setDescription(String description)
          Set the description property as plain text (cover for PROP_DESCRIPTION).
 void setDescriptionFormatted(String description)
          Set the description property as formatted text (cover for PROP_DESCRIPTION).
 void setDisplayName(String displayName)
          Set the display name property (cover for PROP_DISPLAY_NAME).
 void setField(String key, String value)
          Set the value of an "extra" event field.
 void setLineNumber(int i)
          Set the line number on which this event occurs.
 void setLocation(String location)
          Set the location (cover for PROP_CALENDAR_LOCATION).
 void setRange(TimeRange timeRange)
          Replace the time range
 void setRecurrenceRule(RecurrenceRule recurrenceRule)
          Sets the recurrence rule.
 void setType(String type)
          Set the type (cover for PROP_CALENDAR_TYPE).
 Element toXml(Document arg0, Stack arg1)
          Serialize the entity into XML, adding an element to the doc under the top of the stack element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericCalendarImporter.PrototypeEvent

public GenericCalendarImporter.PrototypeEvent()
Default constructor

Method Detail

getRange

public TimeRange getRange()
Description copied from interface: CalendarEvent
Access the time range

Specified by:
getRange in interface CalendarEvent
Returns:
The event time range

getDisplayName

public String getDisplayName()
Description copied from interface: CalendarEvent
Access the display name property (cover for PROP_DISPLAY_NAME).

Specified by:
getDisplayName in interface CalendarEvent
Returns:
The event's display name property.

getDescription

public String getDescription()
Description copied from interface: CalendarEvent
Access the description property as plain text (cover for PROP_DESCRIPTION).

Specified by:
getDescription in interface CalendarEvent
Returns:
The event's description property.

getType

public String getType()
Description copied from interface: CalendarEvent
Access the type (cover for PROP_CALENDAR_TYPE).

Specified by:
getType in interface CalendarEvent
Returns:
The event's type property.

getLocation

public String getLocation()
Description copied from interface: CalendarEvent
Access the location property (cover for PROP_CALENDAR_LOCATION).

Specified by:
getLocation in interface CalendarEvent
Returns:
The event's location property.

getField

public String getField(String fieldName)
Description copied from interface: CalendarEvent
Get the value of an "extra" event field.

Specified by:
getField in interface CalendarEvent
Parameters:
fieldName - The name of the field.
Returns:
the value of the "extra" event field.

getCalendarReference

public String getCalendarReference()
Description copied from interface: CalendarEvent
Gets the containing calendar's reference.

Specified by:
getCalendarReference in interface CalendarEvent
Returns:
The containing calendar reference.

getRecurrenceRule

public RecurrenceRule getRecurrenceRule()
Description copied from interface: CalendarEvent
Gets the recurrence rule, if any.

Specified by:
getRecurrenceRule in interface CalendarEvent
Returns:
The recurrence rule, or null if none.

getUrl

public String getUrl()
Description copied from interface: Entity
Access the URL which can be used to access the entity.

Specified by:
getUrl in interface Entity
Returns:
The URL which can be used to access the entity.

getReference

public String getReference()
Description copied from interface: Entity
Access the internal reference which can be used to access the entity from within the system.

Specified by:
getReference in interface Entity
Returns:
The the internal reference which can be used to access the entity from within the system.

getReference

public String getReference(String rootProperty)
Description copied from interface: Entity
Access the alternate internal reference which can be used to access the entity from within the system.

Specified by:
getReference in interface Entity
Parameters:
rootProperty - The name of the entity property whose value controls which alternate reference is requested. If null, the native 'raw' reference is requested.
Returns:
The the alternate internal reference which can be used to access the entity from within the system.

getUrl

public String getUrl(String rootProperty)
Description copied from interface: Entity
Access the alternate URL which can be used to access the entity.

Specified by:
getUrl in interface Entity
Parameters:
rootProperty - The name of the entity property whose value controls which alternate reference URL is requested. If null, the native 'raw' URL is requested.
Returns:
The alternate URL which can be used to access the entity.

getId

public String getId()
Description copied from interface: Entity
Access the id of the entity.

Specified by:
getId in interface Entity
Returns:
The id.

getProperties

public ResourceProperties getProperties()
Description copied from interface: Entity
Access the entity's properties.

Specified by:
getProperties in interface Entity
Returns:
The entity's properties.

toXml

public Element toXml(Document arg0,
                     Stack arg1)
Description copied from interface: Entity
Serialize the entity into XML, adding an element to the doc under the top of the stack element.

Specified by:
toXml in interface Entity
Parameters:
arg0 - The DOM doc to contain the XML (or null for a string return).
arg1 - The DOM elements, the top of which is the containing element of the new "entity" element.
Returns:
The newly added element.

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

getAttachments

public List getAttachments()
Description copied from interface: AttachmentContainer
Access the attachments.

Specified by:
getAttachments in interface AttachmentContainer
Returns:
An copy of the List of attachments (containing Reference objects) (may be empty).

setRange

public void setRange(TimeRange timeRange)
Description copied from interface: CalendarEventEdit
Replace the time range

Specified by:
setRange in interface CalendarEventEdit

setDisplayName

public void setDisplayName(String displayName)
Description copied from interface: CalendarEventEdit
Set the display name property (cover for PROP_DISPLAY_NAME).

Specified by:
setDisplayName in interface CalendarEventEdit
Parameters:
displayName - The event's display name property.

setDescription

public void setDescription(String description)
Description copied from interface: CalendarEventEdit
Set the description property as plain text (cover for PROP_DESCRIPTION).

Specified by:
setDescription in interface CalendarEventEdit
Parameters:
description - The event's description property.

setType

public void setType(String type)
Description copied from interface: CalendarEventEdit
Set the type (cover for PROP_CALENDAR_TYPE).

Specified by:
setType in interface CalendarEventEdit
Parameters:
type - The event's type property.

setLocation

public void setLocation(String location)
Description copied from interface: CalendarEventEdit
Set the location (cover for PROP_CALENDAR_LOCATION).

Specified by:
setLocation in interface CalendarEventEdit
Parameters:
location - The event's location property.

setField

public void setField(String key,
                     String value)
Description copied from interface: CalendarEventEdit
Set the value of an "extra" event field.

Specified by:
setField in interface CalendarEventEdit
Parameters:
key - The "extra" field name
value - The value to set, or null to remove the field.

setRecurrenceRule

public void setRecurrenceRule(RecurrenceRule recurrenceRule)
Description copied from interface: CalendarEventEdit
Sets the recurrence rule.

Specified by:
setRecurrenceRule in interface CalendarEventEdit
Parameters:
recurrenceRule - The recurrence rule, or null to clear out the rule.

isActiveEdit

public boolean isActiveEdit()
Description copied from interface: Edit
Check to see if the edit is still active, or has already been closed.

Specified by:
isActiveEdit in interface Edit
Returns:
true if the edit is active, false if it's been closed.

getPropertiesEdit

public ResourcePropertiesEdit getPropertiesEdit()
Description copied from interface: Edit
Access the resource's properties for modification

Specified by:
getPropertiesEdit in interface Edit
Returns:
The resource's properties.

addAttachment

public void addAttachment(Reference arg0)
Description copied from interface: AttachmentContainerEdit
Add an attachment.

Specified by:
addAttachment in interface AttachmentContainerEdit
Parameters:
arg0 - The attachment Reference.

removeAttachment

public void removeAttachment(Reference arg0)
Description copied from interface: AttachmentContainerEdit
Remove an attachment.

Specified by:
removeAttachment in interface AttachmentContainerEdit
Parameters:
arg0 - The attachment Reference to remove (the one removed will equal this, they need not be ==).

replaceAttachments

public void replaceAttachments(List arg0)
Description copied from interface: AttachmentContainerEdit
Replace the attachment set.

Specified by:
replaceAttachments in interface AttachmentContainerEdit
Parameters:
arg0 - A ReferenceVector that will become the new set of attachments.

clearAttachments

public void clearAttachments()
Description copied from interface: AttachmentContainerEdit
Clear all attachments.

Specified by:
clearAttachments in interface AttachmentContainerEdit

getDisplayStartDate

public String getDisplayStartDate()
Get the start date formatted for display.


getDisplayStartTime

public String getDisplayStartTime()
Get the start time formatted for display.


getDisplayEndTime

public String getDisplayEndTime()
Get the end time of the event formatted for display. This handles the fact that events that end at a given time actually end about a minute earlier.


getLineNumber

public int getLineNumber()
Get the line number on which this event occurs.


setLineNumber

public void setLineNumber(int i)
Set the line number on which this event occurs.

Parameters:
i -

setDescriptionFormatted

public void setDescriptionFormatted(String description)
Set the description property as formatted text (cover for PROP_DESCRIPTION).

Specified by:
setDescriptionFormatted in interface CalendarEventEdit
Parameters:
description - The event's description property.

getDescriptionFormatted

public String getDescriptionFormatted()
Access the description property as formatted text (cover for PROP_DESCRIPTION).

Specified by:
getDescriptionFormatted in interface CalendarEvent
Returns:
The event's description property.