com.openexchange.api
Class OXFolder

java.lang.Object
  extended by com.openexchange.api.OXObject
      extended by com.openexchange.api.OXSqlObject
          extended by com.openexchange.api.OXFolder
All Implemented Interfaces:
java.lang.Cloneable

public class OXFolder
extends OXSqlObject

OXFolder

Author:
Sebastian Kauss

Nested Class Summary
 class OXFolder.Permission
           
 
Field Summary
static int CALENDAR
           
static int CONTACT
           
static java.lang.String CREATED_BY
           
static java.lang.String CREATOR
           
static java.lang.String DEFAULTFOLDER
           
static java.lang.String FOLDER_ID
           
static int GLOBALADDRESSBOOK
           
static int INTERNALUSERS
           
static java.lang.String LAST_MODIFIED
           
static java.lang.String MODIFIED_BY
           
static java.lang.String MODULE
           
static java.lang.String OWNER
           
static java.lang.String PERMISSIONS
           
static int PRIVATE
           
static int PUBLIC
           
static int SHARED
           
static int TASK
           
static java.lang.String TITLE
           
static java.lang.String TYPE
           
static int UNBOUND
           
 
Fields inherited from class com.openexchange.api.OXSqlObject
DELETED, NEW_AND_MODIFIED
 
Fields inherited from class com.openexchange.api.OXObject
CREATION_TIME, OBJECT_ID
 
Method Summary
 boolean canDelete()
          is the folder "deleteable"
 boolean canRead()
          is the folder readable
 boolean canWrite()
          is the folder writeable
 java.lang.Object clone()
           
 OXObject create(java.lang.Object internalobject)
          returns a new instance of the OXObject
static OXFolder createOXFolder(java.lang.Object internalobject)
          creates a new Instance of OXFolder
 void delete()
          delete the folder
 int getFolderID()
          return the folder id
 int getModule()
          return the module
 OXFolder.Permission getPermission()
          return the Permission Object
 OXSearchQuery getSearchQuery()
          return the OXSearchQuery
 java.lang.String getTitle()
          return the title
 int getType()
          return the type
 boolean isDefaultFolder()
          return true if this folder is an default folder or else otherwise
 void load()
          load the folder
 void reset()
          reset the object to the default values
 void save()
          save the folder
 void setDeleteQuery(java.util.Date since)
          creates a Query to get all deleted folders since the given date
 void setFolderID(int folder_id)
          set the folder id
 void setModule(int module)
          set the module
 void setPermission(OXFolder.Permission permission)
          set the permission
 void setSimpleQuery(java.util.Date since, int type)
          creates a Query to get all folders since the given date and the given type
 void setTitle(java.lang.String title)
          set the title
 void setType(int type)
          set the type
 
Methods inherited from class com.openexchange.api.OXSqlObject
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

CREATED_BY

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

LAST_MODIFIED

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

MODIFIED_BY

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

OWNER

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

CREATOR

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

FOLDER_ID

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

MODULE

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

TYPE

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

TITLE

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

DEFAULTFOLDER

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

PERMISSIONS

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

PRIVATE

public static final int PRIVATE
See Also:
Constant Field Values

PUBLIC

public static final int PUBLIC
See Also:
Constant Field Values

SHARED

public static final int SHARED
See Also:
Constant Field Values

GLOBALADDRESSBOOK

public static final int GLOBALADDRESSBOOK
See Also:
Constant Field Values

INTERNALUSERS

public static final int INTERNALUSERS
See Also:
Constant Field Values

TASK

public static final int TASK
See Also:
Constant Field Values

CALENDAR

public static final int CALENDAR
See Also:
Constant Field Values

CONTACT

public static final int CONTACT
See Also:
Constant Field Values

UNBOUND

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

create

public OXObject create(java.lang.Object internalobject)
Description copied from class: OXObject
returns a new instance of the OXObject


createOXFolder

public static OXFolder createOXFolder(java.lang.Object internalobject)
creates a new Instance of OXFolder

Parameters:
internalobject -
Returns:
oxfolder

setDeleteQuery

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

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

setSimpleQuery

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

Parameters:
since -
type -
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

load

public void load()
          throws java.lang.Exception,
                 OXConflictException,
                 OXPermissionException
load the folder

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

canRead

public boolean canRead()
                throws java.lang.Exception
is the folder readable

Overrides:
canRead in class OXSqlObject
Returns:
canread
Throws:
java.lang.Exception

canWrite

public boolean canWrite()
                 throws java.lang.Exception
is the folder writeable

Overrides:
canWrite in class OXSqlObject
Returns:
canwrite
Throws:
java.lang.Exception

canDelete

public boolean canDelete()
is the folder "deleteable"

Overrides:
canDelete in class OXSqlObject
Returns:
candelete

isDefaultFolder

public boolean isDefaultFolder()
return true if this folder is an default folder or else otherwise

Returns:
isdefaultfolder

getFolderID

public int getFolderID()
return the folder id

Returns:
folder_id

getModule

public int getModule()
return the module

Returns:
module

getType

public int getType()
return the type

Returns:
type

getTitle

public java.lang.String getTitle()
return the title

Returns:
title

getPermission

public OXFolder.Permission getPermission()
return the Permission Object

Returns:
permission

getSearchQuery

public OXSearchQuery getSearchQuery()
return the OXSearchQuery

Specified by:
getSearchQuery in class OXSqlObject
Returns:
oxsearchquery

setFolderID

public void setFolderID(int folder_id)
set the folder id

Parameters:
folder_id -

setModule

public void setModule(int module)
set the module

Parameters:
module -

setType

public void setType(int type)
set the type

Parameters:
type -

setTitle

public void setTitle(java.lang.String title)
set the title

Parameters:
title -

setPermission

public void setPermission(OXFolder.Permission permission)
set the permission

Parameters:
permission -

save

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

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

delete

public void delete()
            throws java.lang.Exception,
                   OXConflictException,
                   OXPermissionException
delete the folder

Specified by:
delete in class OXObject
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

reset

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

Overrides:
reset in class OXSqlObject

clone

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