Class DuplicateRuleService
- java.lang.Object
-
- fr.paris.lutece.plugins.identitystore.service.duplicate.DuplicateRuleService
-
public class DuplicateRuleService extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DuplicateRulecreate(DuplicateRule duplicateRule)Creates a newDuplicateRuleand adds it to cache.voiddelete(Integer id)Deletes aDuplicateRuleby its id in the database and cacheList<DuplicateRule>findAll()List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.duplicate.DuplicateRuleSummaryDto>findSummaries(Integer priority)Find all summaries of rules having priority or higherDuplicateRuleget(String ruleCode)GetDuplicateRulefrom cache by its code.static DuplicateRuleServiceinstance()DuplicateRulesafeGet(String ruleCode)GetDuplicateRulefrom cache by its code.DuplicateRuleupdate(DuplicateRule duplicateRule)Update an existingDuplicateRule(if possible).
-
-
-
Method Detail
-
instance
public static DuplicateRuleService instance()
-
findAll
public List<DuplicateRule> findAll() throws DuplicateRuleNotFoundException
- Returns:
- Throws:
DuplicateRuleNotFoundException
-
findSummaries
public List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.duplicate.DuplicateRuleSummaryDto> findSummaries(Integer priority) throws DuplicateRuleNotFoundException
Find all summaries of rules having priority or higher- Parameters:
priority- the min priority- Returns:
- a list of rule summaries
- Throws:
DuplicateRuleNotFoundException
-
get
public DuplicateRule get(String ruleCode) throws DuplicateRuleNotFoundException
GetDuplicateRulefrom cache by its code.- Parameters:
ruleCode- the rule code- Returns:
- DuplicateRule
- Throws:
DuplicateRuleNotFoundException- if the rule is not found for the provided code
-
safeGet
public DuplicateRule safeGet(String ruleCode)
GetDuplicateRulefrom cache by its code.- Parameters:
ruleCode- the rule code- Returns:
DuplicateRule, or null if the rule is not found for the provided code
-
create
public DuplicateRule create(DuplicateRule duplicateRule)
Creates a newDuplicateRuleand adds it to cache.- Parameters:
duplicateRule-- Returns:
-
update
public DuplicateRule update(DuplicateRule duplicateRule)
Update an existingDuplicateRule(if possible).- Parameters:
duplicateRule-- Returns:
-
delete
public void delete(Integer id)
Deletes aDuplicateRuleby its id in the database and cache- Parameters:
id-
-
-