com.openexchange.admin.storage.interfaces
Class OXResourceStorageInterface

java.lang.Object
  extended by com.openexchange.admin.storage.interfaces.OXResourceStorageInterface
Direct Known Subclasses:
OXResourceSQLStorage

public abstract class OXResourceStorageInterface
extends Object

This interface provides an abstraction to the storage of the resource information

Author:
d7, cutmasta

Constructor Summary
OXResourceStorageInterface()
           
 
Method Summary
abstract  void change(Context ctx, Resource res)
          Change resource in datastore
abstract  void changeLastModified(int resource_id, Context ctx, Connection write_ox_con)
           
abstract  int create(Context ctx, Resource res)
           
abstract  void createRecoveryData(int resource_id, Context ctx, Connection con)
          fetch data from resource and insert in del_resource
abstract  void delete(Context ctx, Resource resource)
           
abstract  void deleteAllRecoveryData(Context ctx, Connection con)
          Delete all data from del_resource for context
abstract  void deleteRecoveryData(int resource_id, Context ctx, Connection con)
          delete data from del_resource
abstract  Resource getData(Context ctx, Resource resource)
           
static OXResourceStorageInterface getInstance()
          Creates a new instance implementing the group storage interface.
abstract  Resource[] list(Context ctx, String pattern)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OXResourceStorageInterface

public OXResourceStorageInterface()
Method Detail

getInstance

public static OXResourceStorageInterface getInstance()
                                              throws StorageException
Creates a new instance implementing the group storage interface.

Returns:
an instance implementing the group storage interface.
Throws:
StorageException - Storage exception

create

public abstract int create(Context ctx,
                           Resource res)
                    throws StorageException
Throws:
StorageException

change

public abstract void change(Context ctx,
                            Resource res)
                     throws StorageException
Change resource in datastore

Throws:
StorageException

changeLastModified

public abstract void changeLastModified(int resource_id,
                                        Context ctx,
                                        Connection write_ox_con)
                                 throws StorageException
Throws:
StorageException

delete

public abstract void delete(Context ctx,
                            Resource resource)
                     throws StorageException
Throws:
StorageException

getData

public abstract Resource getData(Context ctx,
                                 Resource resource)
                          throws StorageException
Throws:
StorageException

createRecoveryData

public abstract void createRecoveryData(int resource_id,
                                        Context ctx,
                                        Connection con)
                                 throws StorageException
fetch data from resource and insert in del_resource

Throws:
StorageException

deleteRecoveryData

public abstract void deleteRecoveryData(int resource_id,
                                        Context ctx,
                                        Connection con)
                                 throws StorageException
delete data from del_resource

Throws:
StorageException

deleteAllRecoveryData

public abstract void deleteAllRecoveryData(Context ctx,
                                           Connection con)
                                    throws StorageException
Delete all data from del_resource for context

Throws:
StorageException

list

public abstract Resource[] list(Context ctx,
                                String pattern)
                         throws StorageException
Throws:
StorageException