org.mycore.access.mcrimpl
Class MCRRuleStore

java.lang.Object
  extended by org.mycore.access.mcrimpl.MCRRuleStore
Direct Known Subclasses:
MCRHIBRuleStore

public abstract class MCRRuleStore
extends Object

The purpose of this interface is to make the choice of the persistence layer configurable. Any concrete database-class which stores MyCoRe Access control must implement this interface. Which database actually will be used can then be configured by reading the value MCR.Persistence.Rule.Store_Class from mycore.properties.access

Author:
Arne Seifert

Field Summary
static Logger logger
           
protected static String ruletablename
           
protected static String sqlDateformat
           
 
Constructor Summary
MCRRuleStore()
           
 
Method Summary
abstract  void createRule(MCRAccessRule rule)
           
abstract  void deleteRule(String ruleid)
           
abstract  boolean existsRule(String ruleid)
           
static MCRRuleStore getInstance()
           
abstract  int getNextFreeRuleID(String prefix)
           
abstract  MCRAccessRule getRule(String ruleid)
           
abstract  Collection<String> retrieveAllIDs()
           
abstract  MCRAccessRule retrieveRule(String ruleid)
           
abstract  Collection<String> retrieveRuleIDs(String ruleExpression, String description)
           
abstract  void updateRule(MCRAccessRule rule)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static Logger logger

sqlDateformat

protected static final String sqlDateformat
See Also:
Constant Field Values

ruletablename

protected static final String ruletablename
Constructor Detail

MCRRuleStore

public MCRRuleStore()
Method Detail

createRule

public abstract void createRule(MCRAccessRule rule)

updateRule

public abstract void updateRule(MCRAccessRule rule)

deleteRule

public abstract void deleteRule(String ruleid)

getRule

public abstract MCRAccessRule getRule(String ruleid)

existsRule

public abstract boolean existsRule(String ruleid)

retrieveAllIDs

public abstract Collection<String> retrieveAllIDs()

retrieveRuleIDs

public abstract Collection<String> retrieveRuleIDs(String ruleExpression,
                                                   String description)

getNextFreeRuleID

public abstract int getNextFreeRuleID(String prefix)

retrieveRule

public abstract MCRAccessRule retrieveRule(String ruleid)

getInstance

public static MCRRuleStore getInstance()