Package org.mycore.backend.jpa.access
Class MCRJPARuleStore
java.lang.Object
org.mycore.access.mcrimpl.MCRRuleStore
org.mycore.backend.jpa.access.MCRJPARuleStore
JPA implementation for RuleStore, storing access rules
- Author:
- Arne Seifert, Thomas Scheffler (yagee)
-
Field Summary
Fields inherited from class org.mycore.access.mcrimpl.MCRRuleStore
RULETABLENAME, SQL_DATE_FORMAT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createRule
(MCRAccessRule rule) Method creates new rule in database by given rule-objectvoid
deleteRule
(String ruleid) Method deletes accessrule for given ruleidboolean
existsRule
(String ruleid) Method checks existance of rule in dbint
getNextFreeRuleID
(String prefix) Method returns MCRAccessRule by given idretrieveRuleIDs
(String ruleExpression, String description) Method retrieves the ruleIDs of rules, whose string-representation starts with given datavoid
updateRule
(MCRAccessRule rule) Method updates accessrule by given rule. internal: get rule object from session set values, update via sessionMethods inherited from class org.mycore.access.mcrimpl.MCRRuleStore
getInstance
-
Constructor Details
-
MCRJPARuleStore
public MCRJPARuleStore()
-
-
Method Details
-
createRule
Method creates new rule in database by given rule-object- Specified by:
createRule
in classMCRRuleStore
- Parameters:
rule
- as MCRAccessRule
-
retrieveRuleIDs
Method retrieves the ruleIDs of rules, whose string-representation starts with given data- Specified by:
retrieveRuleIDs
in classMCRRuleStore
-
updateRule
Method updates accessrule by given rule. internal: get rule object from session set values, update via session- Specified by:
updateRule
in classMCRRuleStore
-
deleteRule
Method deletes accessrule for given ruleid- Specified by:
deleteRule
in classMCRRuleStore
-
getRule
Method returns MCRAccessRule by given id- Specified by:
getRule
in classMCRRuleStore
- Parameters:
ruleid
- as string- Returns:
- MCRAccessRule
-
retrieveAllIDs
- Specified by:
retrieveAllIDs
in classMCRRuleStore
-
existsRule
Method checks existance of rule in db- Specified by:
existsRule
in classMCRRuleStore
- Parameters:
ruleid
- id as string- Returns:
- boolean value
- Throws:
MCRException
-
getNextFreeRuleID
- Specified by:
getNextFreeRuleID
in classMCRRuleStore
-