com.groiss.cal
Class SimpleEvent

java.lang.Object
  extended by com.groiss.cal.SimpleEvent
All Implemented Interfaces:
CalEvent, java.lang.Cloneable

public class SimpleEvent
extends java.lang.Object
implements CalEvent

default CalEvent implementation


Field Summary
 
Fields inherited from interface com.groiss.cal.CalEvent
DAILY, MONTHLY, NONE, WEEKLY, YEARLY
 
Constructor Summary
SimpleEvent(CalEvent evt)
          constructor creating a copy of the given event
SimpleEvent(java.lang.String subject, java.util.Date fromDate, java.util.Date untilDate)
          constructor
 
Method Summary
 java.lang.Object clone()
          
 boolean equals(java.lang.Object obj)
           
 int getCaption()
          returns the caption to use for this event.
 EventType getEventType()
          
 java.util.Date getFromDate()
          
 int getInterval()
          
 java.lang.String getLocation()
          
 Persistent getObject()
          returns the object this CalEvent was initially fetched for
 java.util.List<Persistent> getObjects()
          the objects, this event belongs to
 java.util.Date getRecEndDate()
          
 int getRecurrenceType()
          
 java.lang.String getSubject()
          
 java.lang.String getText()
          
 java.lang.String getUID()
          get the unique identifier for this event
 java.util.Date getUntilDate()
          
 boolean hasReminder()
          should a reminder be used?
 boolean isPrivateEvent()
          
 boolean isWholeDay()
          
 boolean mayEdit(User user)
          check if the given user may edit this event
 boolean mayView(User user)
          check if the given user may view this event
 java.lang.String onClick()
          
 void setCaption(int caption)
           
 void setEventType(EventType eventType)
           
 void setFromDate(java.util.Date fromDate)
           
 void setHasReminder(boolean hasReminder)
           
 void setInterval(int interval)
           
 void setLocation(java.lang.String location)
           
 void setOnClick(java.lang.String onClick)
           
 void setPrivateEvent(boolean privateEvent)
           
 void setRecEndDate(java.util.Date recEndDate)
           
 void setRecurrenceType(int recurrenceType)
           
 void setSubject(java.lang.String subject)
           
 void setText(java.lang.String text)
           
 void setUID(java.lang.String uid)
           
 void setUntilDate(java.util.Date untilDate)
           
 void setWholeDay(boolean wholeDay)
           
 void shiftTo(java.util.Date begin)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleEvent

public SimpleEvent(java.lang.String subject,
                   java.util.Date fromDate,
                   java.util.Date untilDate)
constructor

Parameters:
subject - the event's subject
fromDate - the start-date
untilDate - the end-date

SimpleEvent

public SimpleEvent(CalEvent evt)
constructor creating a copy of the given event

Parameters:
evt - the event
Method Detail

clone

public java.lang.Object clone()

Specified by:
clone in interface CalEvent
Overrides:
clone in class java.lang.Object

getCaption

public int getCaption()
returns the caption to use for this event.

Specified by:
getCaption in interface CalEvent
Returns:
the caption's index CalInfo.getCaptions()

getFromDate

public java.util.Date getFromDate()

Specified by:
getFromDate in interface CalEvent
Returns:
Returns the fromDate.

getInterval

public int getInterval()

Specified by:
getInterval in interface CalEvent
Returns:
Returns the interval.

getLocation

public java.lang.String getLocation()

Specified by:
getLocation in interface CalEvent
Returns:
Returns the location.

getRecEndDate

public java.util.Date getRecEndDate()

Specified by:
getRecEndDate in interface CalEvent
Returns:
Returns the recEndDate.

getRecurrenceType

public int getRecurrenceType()

Specified by:
getRecurrenceType in interface CalEvent
Returns:
Returns the recurrenceType.

getSubject

public java.lang.String getSubject()

Specified by:
getSubject in interface CalEvent
Returns:
Returns the subject.

getText

public java.lang.String getText()

Specified by:
getText in interface CalEvent
Returns:
Returns the text.

getUID

public java.lang.String getUID()
get the unique identifier for this event

Specified by:
getUID in interface CalEvent
Returns:
the unique identifier for this event

getUntilDate

public java.util.Date getUntilDate()

Specified by:
getUntilDate in interface CalEvent
Returns:
Returns the untilDate.

isPrivateEvent

public boolean isPrivateEvent()

Specified by:
isPrivateEvent in interface CalEvent
Returns:
Returns the privateDate.

isWholeDay

public boolean isWholeDay()

Specified by:
isWholeDay in interface CalEvent
Returns:
Returns the wholeDay.

onClick

public java.lang.String onClick()

Specified by:
onClick in interface CalEvent
Returns:
javascript-code for onclick event

setCaption

public void setCaption(int caption)

setFromDate

public void setFromDate(java.util.Date fromDate)

setInterval

public void setInterval(int interval)

setLocation

public void setLocation(java.lang.String location)

setOnClick

public void setOnClick(java.lang.String onClick)

setPrivateEvent

public void setPrivateEvent(boolean privateEvent)

setRecEndDate

public void setRecEndDate(java.util.Date recEndDate)

setRecurrenceType

public void setRecurrenceType(int recurrenceType)

setSubject

public void setSubject(java.lang.String subject)

setText

public void setText(java.lang.String text)

setUID

public void setUID(java.lang.String uid)

setUntilDate

public void setUntilDate(java.util.Date untilDate)

setWholeDay

public void setWholeDay(boolean wholeDay)

shiftTo

public void shiftTo(java.util.Date begin)

getObject

public Persistent getObject()
returns the object this CalEvent was initially fetched for

Specified by:
getObject in interface CalEvent
Returns:
the object

getObjects

public java.util.List<Persistent> getObjects()
the objects, this event belongs to

Specified by:
getObjects in interface CalEvent
Returns:
the objects

setHasReminder

public void setHasReminder(boolean hasReminder)

hasReminder

public boolean hasReminder()
should a reminder be used?

Specified by:
hasReminder in interface CalEvent
Returns:
true or false

mayEdit

public boolean mayEdit(User user)
check if the given user may edit this event

Specified by:
mayEdit in interface CalEvent
Returns:
true or false

mayView

public boolean mayView(User user)
check if the given user may view this event

Specified by:
mayView in interface CalEvent
Returns:
true or false

getEventType

public EventType getEventType()

Specified by:
getEventType in interface CalEvent
Returns:
the EventType of this event

setEventType

public void setEventType(EventType eventType)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.