Package org.mycore.backend.jpa.access
Class MCRJPAAccessStore
java.lang.Object
org.mycore.access.mcrimpl.MCRAccessStore
org.mycore.backend.jpa.access.MCRJPAAccessStore
JPA implementation of acceess store to manage access rights
- Author:
- Arne Seifert, Thomas Scheffler (yagee)
-
Field Summary
Fields inherited from class org.mycore.access.mcrimpl.MCRAccessStore
ACCESS_POOLS, SQL_DATEFORMAT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createAccessDefinition
(MCRRuleMapping rulemapping) method creates a new AccessDefinition in dbvoid
deleteAccessDefinition
(MCRRuleMapping rulemapping) delete given definition in dbboolean
existsRule
(String objid, String pool) getAccessDefinition
(String pool, String objid) method returns AccessDefinition for given key valuesgetMappedObjectId
(String pool) getPoolsForObject
(String objid) boolean
isRuleInUse
(String ruleid) Checks if a rule mappings uses the rule.void
updateAccessDefinition
(MCRRuleMapping rulemapping) update AccessDefinition in db for given MCRAccessDataMethods inherited from class org.mycore.access.mcrimpl.MCRAccessStore
getDefinition, getInstance, getPools, getRules
-
Constructor Details
-
MCRJPAAccessStore
public MCRJPAAccessStore()
-
-
Method Details
-
getRuleID
- Specified by:
getRuleID
in classMCRAccessStore
-
createAccessDefinition
method creates a new AccessDefinition in db- Specified by:
createAccessDefinition
in classMCRAccessStore
- Parameters:
rulemapping
- with values
-
existsRule
- Specified by:
existsRule
in classMCRAccessStore
-
deleteAccessDefinition
delete given definition in db- Specified by:
deleteAccessDefinition
in classMCRAccessStore
- Parameters:
rulemapping
- rule to be deleted
-
updateAccessDefinition
update AccessDefinition in db for given MCRAccessData- Specified by:
updateAccessDefinition
in classMCRAccessStore
-
getAccessDefinition
method returns AccessDefinition for given key values- Specified by:
getAccessDefinition
in classMCRAccessStore
- Parameters:
pool
- name of accesspoolobjid
- objectid of MCRObject- Returns:
- MCRAccessData
-
getMappedObjectId
- Specified by:
getMappedObjectId
in classMCRAccessStore
-
getPoolsForObject
- Specified by:
getPoolsForObject
in classMCRAccessStore
-
getDatabasePools
- Specified by:
getDatabasePools
in classMCRAccessStore
-
getDistinctStringIDs
- Specified by:
getDistinctStringIDs
in classMCRAccessStore
- Returns:
- a collection of all String IDs an access rule is assigned to
-
isRuleInUse
Checks if a rule mappings uses the rule.- Specified by:
isRuleInUse
in classMCRAccessStore
- Parameters:
ruleid
- the rule id to check- Returns:
- true if the rule exists and is used, otherwise false
-