com.openexchange.api
Class OXAppointment

java.lang.Object
  extended bycom.openexchange.api.OXObject
      extended bycom.openexchange.api.OXSqlObject
          extended bycom.openexchange.api.OXCommon
              extended bycom.openexchange.api.OXCalendar
                  extended bycom.openexchange.api.OXAppointment
All Implemented Interfaces:
java.lang.Cloneable

public class OXAppointment
extends OXCalendar

OXAppointment

Author:
Sebastian Kauss

Nested Class Summary
 class OXAppointment.SearchQuery
           
 
Field Summary
static int ABSENT
           
static java.lang.String CHANGE_EXCEPTIONS
           
static int DEFAULTFOLDER
           
static java.lang.String DELETE_EXCEPTIONS
           
static int FREE
           
static java.lang.String FULL_TIME
           
static java.lang.String LOCATION
           
static int RESERVED
           
static java.lang.String RESOURCES
           
static java.lang.String SHOWN_AS
           
static int TEMPORARY
           
 
Fields inherited from class com.openexchange.api.OXCalendar
ACCEPT, ALARM, APRIL, AUGUST, DAILY, DAY, DAY_IN_MONTH, DAYS, DECEMBER, DECLINE, END_DATE, FEBRUARY, FRIDAY, INTERVAL, JANUARY, JULY, JUNE, MARCH, MAY, MONDAY, MONTH, MONTHLY, NONE, NOTE, NOTIFICATION, NOVEMBER, OCTOBER, PARTICIPANTS, PRIVATE, RECURRENCE_DATE_POSITION, RECURRENCE_ID, RECURRENCE_POSITION, RECURRENCE_TYPE, SATURDAY, SEPTEMBER, START_DATE, SUNDAY, THURSDAY, TITLE, TUESDAY, UNTIL, WEDNESDAY, WEEK_DAY, WEEKEND_DAY, WEEKLY, YEARLY
 
Fields inherited from class com.openexchange.api.OXCommon
ATTACHMENT_FLAG, CATEGORIES, CREATED_BY, FOLDER_ID, MODIFIED_BY, PERSONAL_FOLDER_ID
 
Fields inherited from class com.openexchange.api.OXSqlObject
DELETED, NEW_AND_MODIFIED
 
Fields inherited from class com.openexchange.api.OXObject
CREATION_TIME, LAST_MODIFIED, OBJECT_ID
 
Method Summary
 void addParticipantResource(java.lang.String name)
          add resource to this appointment
 java.lang.Object clone()
           
 OXObject create(java.lang.Object internalobject)
           
static OXAppointment createOXAppointment(java.lang.Object internalobject)
          creates a new Instance of OXAppointment
 void createQuery(OXAppointment.SearchQuery oxsearch)
          creates a extended Query with the given SearchQuery
 void delete()
          delete this appointment
 int getDoublicateID()
          return the id of the object with the same attributes.
 java.lang.String getLocation()
          return the location
 java.util.Iterator getParticipantResources()
          return an iterator with all resource in this appointment
 java.util.Date[] getRecurrenceChangeExceptions()
          return the recurrence change exceptions
 java.util.Date[] getRecurrenceDeleteExceptions()
          return the recurrence delete exceptions
 OXSearchQuery getSearchQuery()
          get a new Instance of OXSearchQuery
 int getShownAs()
          return shown_as (RESERVED, TEMPORARY, ABSENT, FREE)
 boolean isFullTime()
          return if this appointment is fulltime or not
 void load()
          load the object with all informations
 void removeParticipantResource(java.lang.String name)
          removes a resource from this appointment
 void reset()
          reset the object to the default values
 void save()
          save the appointment
 void saveConfirm(int confirm)
          saves the confirmation to this appointment for the current user
 void saveConfirm(java.lang.String confirm_user, int confirm)
          saves the confirmation to this appointment for a specified user
 void setDeleteQuery(java.util.Date since)
          creates a Query to get private deleted objects since the given date
 void setDeleteQuery(java.util.Date since, int folder_id)
          creates a Query to get all deleted objects since the given date in folder
 void setFullTime(boolean fulltime)
          set the fulltime boolean param boolean fulltime
 void setLocation(java.lang.String location)
          set the location
 void setShownAs(int shown_as)
          set shownas (RESERVED, TEMPORARY, ABSENT, FREE)
 void setSimpleQuery(java.util.Date since)
          creates a Query to get all private objects since the given date
 void setSimpleQuery(java.util.Date since, int folder_id)
          creates a Query to get all objects in the specified folder
 
Methods inherited from class com.openexchange.api.OXCalendar
addParticipantGroup, addParticipantUser, addParticipantUser, getAlarm, getEnd, getInterval, getNote, getParticipantConfirm, getParticipantGroups, getParticipantUsers, getRecurrenceDayInMonth, getRecurrenceDays, getRecurrenceID, getRecurrenceMonth, getRecurrencePosition, getRecurrenceType, getStart, getTitle, getUntil, isPrivate, removeParticipantGroup, removeParticipantUser, setAlarm, setDailyRecurrence, setDailyRecurrence, setEnd, setInterval, setMonthlyRecurrence, setMonthlyRecurrence, setMonthlyRecurrence, setMonthlyRecurrence, setNote, setNotification, setRecurrenceDay, setRecurrenceMonth, setRecurrenceMonthDay, setRecurrenceType, setStart, setTitle, setUntil, setWeeklyRecurrence, setWeeklyRecurrence, setYearlyRecurrence, setYearlyRecurrence, setYearlyRecurrence, setYearlyRecurrence
 
Methods inherited from class com.openexchange.api.OXCommon
delete, delete, getCreatedBy, getFolderID, getModifiedBy, hasAttachments, load, setFolderID, setReturnnames
 
Methods inherited from class com.openexchange.api.OXSqlObject
canDelete, canRead, canWrite, destroy, getNext, getSQL_ORDER, getSQL_SELECT, getSQL_WHERE, getSQL, insert, load, setSQL_ORDER, setSQL_WHERE, setSQL
 
Methods inherited from class com.openexchange.api.OXObject
contains, get, getConnection, getCreationTime, getInternalFieldname, getLastModified, getMandatoryFields, getMappedField, getObjectID, getPassword, getReadableFields, getUser, getWriteableFields, isNull, iterator, put, remove, set, setInternalObject, setObjectID, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DELETE_EXCEPTIONS

public static final java.lang.String DELETE_EXCEPTIONS
See Also:
Constant Field Values

CHANGE_EXCEPTIONS

public static final java.lang.String CHANGE_EXCEPTIONS
See Also:
Constant Field Values

FULL_TIME

public static final java.lang.String FULL_TIME
See Also:
Constant Field Values

LOCATION

public static final java.lang.String LOCATION
See Also:
Constant Field Values

SHOWN_AS

public static final java.lang.String SHOWN_AS
See Also:
Constant Field Values

RESOURCES

public static final java.lang.String RESOURCES
See Also:
Constant Field Values

RESERVED

public static final int RESERVED
See Also:
Constant Field Values

TEMPORARY

public static final int TEMPORARY
See Also:
Constant Field Values

ABSENT

public static final int ABSENT
See Also:
Constant Field Values

FREE

public static final int FREE
See Also:
Constant Field Values

DEFAULTFOLDER

public static final int DEFAULTFOLDER
See Also:
Constant Field Values
Method Detail

create

public OXObject create(java.lang.Object internalobject)

createOXAppointment

public static OXAppointment createOXAppointment(java.lang.Object internalobject)
                                         throws OXPermissionException
creates a new Instance of OXAppointment

Parameters:
internalobject -
Returns:
oxappointment
Throws:
OXPermissionException

setDeleteQuery

public void setDeleteQuery(java.util.Date since)
                    throws java.lang.Exception,
                           OXPermissionException
creates a Query to get private deleted objects since the given date

Specified by:
setDeleteQuery in class OXCommon
Parameters:
since -
Throws:
java.lang.Exception
OXPermissionException

setDeleteQuery

public void setDeleteQuery(java.util.Date since,
                           int folder_id)
                    throws java.lang.Exception,
                           OXPermissionException
creates a Query to get all deleted objects since the given date in folder

Parameters:
since -
folder_id -
Throws:
java.lang.Exception
OXPermissionException

setSimpleQuery

public void setSimpleQuery(java.util.Date since)
                    throws java.lang.Exception,
                           OXConflictException,
                           OXPermissionException
creates a Query to get all private objects since the given date

Specified by:
setSimpleQuery in class OXCommon
Parameters:
since -
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

setSimpleQuery

public void setSimpleQuery(java.util.Date since,
                           int folder_id)
                    throws java.lang.Exception,
                           OXConflictException,
                           OXPermissionException
creates a Query to get all objects in the specified folder

Specified by:
setSimpleQuery in class OXCommon
Parameters:
since -
folder_id -
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

createQuery

public void createQuery(OXAppointment.SearchQuery oxsearch)
                 throws java.lang.Exception,
                        OXConflictException
creates a extended Query with the given SearchQuery

Parameters:
oxsearch -
Throws:
java.lang.Exception
OXConflictException

load

public void load()
          throws java.lang.Exception,
                 OXConflictException,
                 OXPermissionException
load the object with all informations

Specified by:
load in class OXSqlObject
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

getRecurrenceChangeExceptions

public java.util.Date[] getRecurrenceChangeExceptions()
return the recurrence change exceptions

Returns:
recurrence change exceptions

getRecurrenceDeleteExceptions

public java.util.Date[] getRecurrenceDeleteExceptions()
return the recurrence delete exceptions

Returns:
recurrence delete exceptions

getShownAs

public int getShownAs()
return shown_as (RESERVED, TEMPORARY, ABSENT, FREE)

Returns:
shown_as (RESERVED, TEMPORARY, ABSENT, FREE)

setShownAs

public void setShownAs(int shown_as)
set shownas (RESERVED, TEMPORARY, ABSENT, FREE)

Parameters:
shown_as -

isFullTime

public boolean isFullTime()
return if this appointment is fulltime or not

Returns:
boolean

setFullTime

public void setFullTime(boolean fulltime)
set the fulltime boolean param boolean fulltime


getLocation

public java.lang.String getLocation()
return the location

Returns:
location

setLocation

public void setLocation(java.lang.String location)
set the location

Parameters:
location -

getSearchQuery

public OXSearchQuery getSearchQuery()
get a new Instance of OXSearchQuery

Specified by:
getSearchQuery in class OXSqlObject
Returns:
searchquery

getParticipantResources

public java.util.Iterator getParticipantResources()
return an iterator with all resource in this appointment

Returns:
resources

addParticipantResource

public void addParticipantResource(java.lang.String name)
add resource to this appointment

Parameters:
name -

removeParticipantResource

public void removeParticipantResource(java.lang.String name)
removes a resource from this appointment

Parameters:
name -

save

public void save()
          throws OXConflictException,
                 OXMandatoryFieldException,
                 OXPermissionException,
                 java.lang.Exception
save the appointment

Specified by:
save in class OXSqlObject
Throws:
OXConflictException
OXMandatoryFieldException
OXPermissionException
java.lang.Exception

delete

public void delete()
            throws java.lang.Exception,
                   OXConflictException,
                   OXPermissionException
delete this appointment

Specified by:
delete in class OXObject
Returns:
true if delete was successful
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

saveConfirm

public void saveConfirm(int confirm)
                 throws java.lang.Exception,
                        OXConflictException,
                        OXPermissionException
saves the confirmation to this appointment for the current user

Parameters:
confirm - (NONE, ACCEPT, DECLINE)
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

saveConfirm

public void saveConfirm(java.lang.String confirm_user,
                        int confirm)
                 throws java.lang.Exception,
                        OXConflictException,
                        OXPermissionException
saves the confirmation to this appointment for a specified user

Parameters:
confirm_user -
confirm - (NONE, ACCEPT, DECLINE)
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

reset

public void reset()
reset the object to the default values

Overrides:
reset in class OXSqlObject

getDoublicateID

public int getDoublicateID()
return the id of the object with the same attributes. Returns -1 if no equal object found.

Specified by:
getDoublicateID in class OXCommon

clone

public java.lang.Object clone()
Overrides:
clone in class OXCalendar