Keel 2.1RC2

org.keel.apps.poll.helpers
Class CategoryHelper

java.lang.Object
  extended byorg.keel.services.persist.AbstractHelper
      extended byorg.keel.apps.poll.helpers.CategoryHelper
All Implemented Interfaces:
Helper

public class CategoryHelper
extends AbstractHelper

Custom methods that are associated with an instance of the Category persistent.

Version:
$Revision: 1.4 $ $Date: 2003/07/03 16:19:25 $
Author:
Michael Nash

Field Summary
 
Fields inherited from class org.keel.services.persist.AbstractHelper
 
Constructor Summary
CategoryHelper()
           
 
Method Summary
 boolean allowedAdd(int uid)
          See if a user is allowed to Add a new category.
 boolean allowedForUser(int uid, java.lang.String operation)
           
 int numPolls()
           
 
Methods inherited from class org.keel.services.persist.AbstractHelper
afterAdd, afterDelete, afterQuery, afterSetField, afterUpdate, beforeAdd, beforeClear, beforeDelete, beforeQuery, beforeSetField, beforeUpdate, getPersistent, setPersistent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CategoryHelper

public CategoryHelper()
Method Detail

allowedForUser

public boolean allowedForUser(int uid,
                              java.lang.String operation)
                       throws PersistenceException
Throws:
PersistenceException

allowedAdd

public boolean allowedAdd(int uid)
                   throws PersistenceException
See if a user is allowed to Add a new category. They can add a new category if they have any permission to "Add" polls to any *existing* category. Initially (by default), only the administrative user will have this - but the initial data can be modified to set this up as required

Throws:
PersistenceException

numPolls

public int numPolls()
             throws PersistenceException
Throws:
PersistenceException

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.