org.opensubsystems.blog.logic
Interface BlogController

All Superinterfaces:
org.opensubsystems.core.logic.BasicDataController, org.opensubsystems.core.logic.DataController, org.opensubsystems.core.logic.ModifiableDataController, org.opensubsystems.core.logic.StatelessController
All Known Implementing Classes:
BlogControllerImpl

public interface BlogController
extends org.opensubsystems.core.logic.ModifiableDataController

This interface define business logic related to blogs.

Version:
$Id: BlogController.java,v 1.4 2007/01/07 06:04:32 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
Initial revision

Method Summary
 void deleteEntry(int iId)
          Delete entry.
 Blog get(java.lang.String strFolder)
          Get blog knowing just the folder where it's entries are displayed.
 java.util.List getAll()
          Get all blogs.
 java.util.List getEntries(int iBlogId)
          Get all entries for a given blog.
 java.lang.Object[] getWithEntries(java.lang.String strFolder)
          Get blog and its entries knowing just the folder where it's entries are displayed.
 java.lang.Object[] getWithEntry(int iBlogId, int iEntryId)
          Get blog and entry knowing just the id of the blog and the id of the entry.
 java.lang.Object[] getWithEntry(java.lang.String strFolder, int iEntryId)
          Get blog and entry knowing just the folder where the entry are displayed and the id of the entry.
 
Methods inherited from interface org.opensubsystems.core.logic.ModifiableDataController
save
 
Methods inherited from interface org.opensubsystems.core.logic.BasicDataController
create, delete
 
Methods inherited from interface org.opensubsystems.core.logic.DataController
get
 
Methods inherited from interface org.opensubsystems.core.logic.StatelessController
constructor
 

Method Detail

get

Blog get(java.lang.String strFolder)
         throws org.opensubsystems.core.error.OSSException,
                java.rmi.RemoteException
Get blog knowing just the folder where it's entries are displayed.

Parameters:
strFolder - - folder where entries for given folder are displayed
Returns:
Blog - specified blog or null if not found
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
java.rmi.RemoteException - - required since this method can be called remotely

getEntries

java.util.List getEntries(int iBlogId)
                          throws org.opensubsystems.core.error.OSSException,
                                 java.rmi.RemoteException
Get all entries for a given blog.

Parameters:
iBlogId - - id of a blog to get entries for
Returns:
List - list of Entry objects or null if blog doesn't contain any entries
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
java.rmi.RemoteException - - required since this method can be called remotely

getWithEntries

java.lang.Object[] getWithEntries(java.lang.String strFolder)
                                  throws org.opensubsystems.core.error.OSSException,
                                         java.rmi.RemoteException
Get blog and its entries knowing just the folder where it's entries are displayed.

Parameters:
strFolder - - folder where entries for given folder are displayed
Returns:
Object[] - index 0 is blog and index 1 is list of its entries
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
java.rmi.RemoteException - - required since this method can be called remotely

getWithEntry

java.lang.Object[] getWithEntry(java.lang.String strFolder,
                                int iEntryId)
                                throws org.opensubsystems.core.error.OSSException,
                                       java.rmi.RemoteException
Get blog and entry knowing just the folder where the entry are displayed and the id of the entry.

Parameters:
strFolder - - folder where entries for given folder are displayed
iEntryId - - id of the blog entry to load
Returns:
Object[] - index 0 is blog and index 1 is the entry
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
java.rmi.RemoteException - - required since this method can be called remotely

getWithEntry

java.lang.Object[] getWithEntry(int iBlogId,
                                int iEntryId)
                                throws org.opensubsystems.core.error.OSSException,
                                       java.rmi.RemoteException
Get blog and entry knowing just the id of the blog and the id of the entry.

Parameters:
iBlogId - - id of the blog to load
iEntryId - - id of the blog entry to load
Returns:
Object[] - index 0 is blog and index 1 is the entry
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
java.rmi.RemoteException - - required since this method can be called remotely

getAll

java.util.List getAll()
                      throws org.opensubsystems.core.error.OSSException,
                             java.rmi.RemoteException
Get all blogs.

Returns:
List - list of blogs objects sorted alphabetically
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
java.rmi.RemoteException - - required since this method can be called remotely

deleteEntry

void deleteEntry(int iId)
                 throws org.opensubsystems.core.error.OSSException,
                        java.rmi.RemoteException
Delete entry. We have to define separate method for this operation since the default data type for this controller is blog and therefore the default implementation will just delete blogs.

Parameters:
iId - - id of the entry to delete
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
java.rmi.RemoteException - - required since this method can be called remotely


Copyright © 2003 - 2007 OpenSubsystems s.r.o.