Class DuplicateRuleService
- java.lang.Object
-
- fr.paris.lutece.plugins.identitystore.service.duplicate.DuplicateRuleService
-
public class DuplicateRuleService extends java.lang.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(java.lang.Integer id)Deletes aDuplicateRuleby its id in the database and cachejava.util.List<DuplicateRule>findAll()java.util.List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.duplicate.DuplicateRuleSummaryDto>findSummaries(java.lang.Integer priority)Find all summaries of rules having priority or higherDuplicateRuleget(java.lang.String ruleCode)GetDuplicateRulefrom cache by its code.static DuplicateRuleServiceinstance()DuplicateRulesafeGet(java.lang.String ruleCode)GetDuplicateRulefrom cache by its code.DuplicateRuleupdate(DuplicateRule duplicateRule)Update an existingDuplicateRule(if possible).
-
-
-
Method Detail
-
instance
public static DuplicateRuleService instance()
-
findAll
public java.util.List<DuplicateRule> findAll() throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceNotFoundException
- Returns:
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.ResourceNotFoundException
-
findSummaries
public java.util.List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.duplicate.DuplicateRuleSummaryDto> findSummaries(java.lang.Integer priority) throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceNotFoundExceptionFind all summaries of rules having priority or higher- Parameters:
priority- the min priority- Returns:
- a list of rule summaries
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.ResourceNotFoundException
-
get
public DuplicateRule get(java.lang.String ruleCode) throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceNotFoundException
GetDuplicateRulefrom cache by its code.- Parameters:
ruleCode- the rule code- Returns:
- DuplicateRule
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.ResourceNotFoundException- if the rule is not found for the provided code
-
safeGet
public DuplicateRule safeGet(java.lang.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(java.lang.Integer id)
Deletes aDuplicateRuleby its id in the database and cache- Parameters:
id-
-
-