Class RulesServiceBase

  • All Implemented Interfaces:
    com.soffid.iam.service.RulesService
    Direct Known Subclasses:
    RulesServiceImpl

    public abstract class RulesServiceBase
    extends Object
    implements com.soffid.iam.service.RulesService

    Spring Service base class for com.soffid.iam.service.RulesService, provides access to all services and entities referenced by this service.

    see com.soffid.iam.service.RulesService
    • Constructor Detail

      • RulesServiceBase

        public RulesServiceBase()
    • Method Detail

      • setAuditEntityDao

        public void setAuditEntityDao​(AuditEntityDao auditoriaEntityDao)
        Sets reference to auditoriaEntityDao.
      • getAuditEntityDao

        public AuditEntityDao getAuditEntityDao()
        Gets reference to auditoriaEntityDao.
      • setRoleEntityDao

        public void setRoleEntityDao​(RoleEntityDao rolEntityDao)
        Sets reference to rolEntityDao.
      • getRoleEntityDao

        public RoleEntityDao getRoleEntityDao()
        Gets reference to rolEntityDao.
      • setRuleAssignedRoleEntityDao

        public void setRuleAssignedRoleEntityDao​(RuleAssignedRoleEntityDao ruleAssignedRoleEntityDao)
        Sets reference to ruleAssignedRoleEntityDao.
      • getRuleAssignedRoleEntityDao

        public RuleAssignedRoleEntityDao getRuleAssignedRoleEntityDao()
        Gets reference to ruleAssignedRoleEntityDao.
      • setRuleEntityDao

        public void setRuleEntityDao​(RuleEntityDao ruleEntityDao)
        Sets reference to ruleEntityDao.
      • getRuleEntityDao

        public RuleEntityDao getRuleEntityDao()
        Gets reference to ruleEntityDao.
      • setRuleEvaluatorService

        public void setRuleEvaluatorService​(RuleEvaluatorService ruleEvaluatorService)
        Sets reference to ruleEvaluatorService.
      • getRuleEvaluatorService

        public RuleEvaluatorService getRuleEvaluatorService()
        Gets reference to ruleEvaluatorService.
      • applyAsync

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.AsyncProcessTracker applyAsync​(com.soffid.iam.api.Rule rule)
                                                          throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                 es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        applyAsync in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleApplyAsync

        protected abstract com.soffid.iam.api.AsyncProcessTracker handleApplyAsync​(com.soffid.iam.api.Rule rule)
                                                                            throws Exception
        Throws:
        Exception
      • queryProcessStatus

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       noRollbackFor=java.lang.Exception.class,
                       readOnly=true)
        public com.soffid.iam.api.AsyncProcessTracker queryProcessStatus​(com.soffid.iam.api.AsyncProcessTracker process)
                                                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                         es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        queryProcessStatus in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleQueryProcessStatus

        protected abstract com.soffid.iam.api.AsyncProcessTracker handleQueryProcessStatus​(com.soffid.iam.api.AsyncProcessTracker process)
                                                                                    throws Exception
        Throws:
        Exception
      • create

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.Rule create​(com.soffid.iam.api.Rule rule)
                                       throws es.caib.seycon.ng.exception.InternalErrorException,
                                              es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        create in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleCreate

        protected abstract com.soffid.iam.api.Rule handleCreate​(com.soffid.iam.api.Rule rule)
                                                         throws Exception
        Throws:
        Exception
      • update

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.Rule update​(com.soffid.iam.api.Rule rule)
                                       throws es.caib.seycon.ng.exception.InternalErrorException,
                                              es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        update in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleUpdate

        protected abstract com.soffid.iam.api.Rule handleUpdate​(com.soffid.iam.api.Rule rule)
                                                         throws Exception
        Throws:
        Exception
      • create

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.RuleAssignedRole create​(com.soffid.iam.api.RuleAssignedRole ruleAssignment)
                                                   throws es.caib.seycon.ng.exception.InternalErrorException,
                                                          es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        create in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleCreate

        protected abstract com.soffid.iam.api.RuleAssignedRole handleCreate​(com.soffid.iam.api.RuleAssignedRole ruleAssignment)
                                                                     throws Exception
        Throws:
        Exception
      • update

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.RuleAssignedRole update​(com.soffid.iam.api.RuleAssignedRole ruleAssignment)
                                                   throws es.caib.seycon.ng.exception.InternalErrorException,
                                                          es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        update in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleUpdate

        protected abstract com.soffid.iam.api.RuleAssignedRole handleUpdate​(com.soffid.iam.api.RuleAssignedRole ruleAssignment)
                                                                     throws Exception
        Throws:
        Exception
      • generateChangesReport

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       noRollbackFor=java.lang.Exception.class,
                       readOnly=true)
        public String generateChangesReport​(com.soffid.iam.api.Rule rule,
                                            Collection<com.soffid.iam.api.RuleAssignedRole> grants)
                                     throws es.caib.seycon.ng.exception.InternalErrorException,
                                            es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        generateChangesReport in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGenerateChangesReport

        protected abstract String handleGenerateChangesReport​(com.soffid.iam.api.Rule rule,
                                                              Collection<com.soffid.iam.api.RuleAssignedRole> grants)
                                                       throws Exception
        Throws:
        Exception
      • findRuleAssignments

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<com.soffid.iam.api.RuleAssignedRole> findRuleAssignments​(com.soffid.iam.api.Rule rule)
                                                                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                                   es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findRuleAssignments in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindRuleAssignments

        protected abstract Collection<com.soffid.iam.api.RuleAssignedRole> handleFindRuleAssignments​(com.soffid.iam.api.Rule rule)
                                                                                              throws Exception
        Throws:
        Exception
      • findRules

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<com.soffid.iam.api.Rule> findRules​(String description)
                                                      throws es.caib.seycon.ng.exception.InternalErrorException,
                                                             es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findRules in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • findRulesByRole

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<com.soffid.iam.api.Rule> findRulesByRole​(Long roleId)
                                                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                   es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findRulesByRole in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • apply

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void apply​(com.soffid.iam.api.Rule rule)
                   throws es.caib.seycon.ng.exception.InternalErrorException,
                          es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        apply in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleApply

        protected abstract void handleApply​(com.soffid.iam.api.Rule rule)
                                     throws Exception
        Throws:
        Exception
      • delete

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void delete​(com.soffid.iam.api.Rule rule)
                    throws es.caib.seycon.ng.exception.InternalErrorException,
                           es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        delete in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleDelete

        protected abstract void handleDelete​(com.soffid.iam.api.Rule rule)
                                      throws Exception
        Throws:
        Exception
      • delete

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void delete​(com.soffid.iam.api.RuleAssignedRole ruleAssignment)
                    throws es.caib.seycon.ng.exception.InternalErrorException,
                           es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        delete in interface com.soffid.iam.service.RulesService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleDelete

        protected abstract void handleDelete​(com.soffid.iam.api.RuleAssignedRole ruleAssignment)
                                      throws Exception
        Throws:
        Exception
      • getPrincipal

        protected Principal getPrincipal()
        Gets the current principal if one has been set, otherwise returns null.
        Returns:
        the current principal