Class DuplicateRuleService

java.lang.Object
fr.paris.lutece.plugins.identitystore.service.duplicate.DuplicateRuleService

public class DuplicateRuleService extends Object
  • Method Details

    • instance

      public static DuplicateRuleService instance()
    • findAll

      public List<DuplicateRule> findAll() throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceNotFoundException
      Returns:
      Throws:
      fr.paris.lutece.plugins.identitystore.web.exception.ResourceNotFoundException
    • findSummaries

      public List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.duplicate.DuplicateRuleSummaryDto> findSummaries(Integer priority) throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceNotFoundException
      Find 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(String ruleCode) throws fr.paris.lutece.plugins.identitystore.web.exception.ResourceNotFoundException
      Get DuplicateRule from 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(String ruleCode)
      Get DuplicateRule from 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 new DuplicateRule and adds it to cache.
      Parameters:
      duplicateRule -
      Returns:
    • update

      public DuplicateRule update(DuplicateRule duplicateRule)
      Update an existing DuplicateRule (if possible).
      Parameters:
      duplicateRule -
      Returns:
    • delete

      public void delete(Integer id)
      Deletes a DuplicateRule by its id in the database and cache
      Parameters:
      id -