Class SoDRuleServiceBase

  • All Implemented Interfaces:
    com.soffid.iam.service.SoDRuleService
    Direct Known Subclasses:
    SoDRuleServiceImpl

    public abstract class SoDRuleServiceBase
    extends Object
    implements com.soffid.iam.service.SoDRuleService

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

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

      • SoDRuleServiceBase

        public SoDRuleServiceBase()
    • Method Detail

      • setInformationSystemEntityDao

        public void setInformationSystemEntityDao​(InformationSystemEntityDao aplicacioEntityDao)
        Sets reference to aplicacioEntityDao.
      • getInformationSystemEntityDao

        public InformationSystemEntityDao getInformationSystemEntityDao()
        Gets reference to aplicacioEntityDao.
      • setApplicationService

        public void setApplicationService​(com.soffid.iam.service.ApplicationService aplicacioService)
        Sets reference to aplicacioService.
      • getApplicationService

        public com.soffid.iam.service.ApplicationService getApplicationService()
        Gets reference to aplicacioService.
      • setAsyncRunnerService

        public void setAsyncRunnerService​(com.soffid.iam.service.AsyncRunnerService asyncRunnerService)
        Sets reference to asyncRunnerService.
      • getAsyncRunnerService

        public com.soffid.iam.service.AsyncRunnerService getAsyncRunnerService()
        Gets reference to asyncRunnerService.
      • setConfigurationService

        public void setConfigurationService​(com.soffid.iam.service.ConfigurationService configuracioService)
        Sets reference to configuracioService.
      • getConfigurationService

        public com.soffid.iam.service.ConfigurationService getConfigurationService()
        Gets reference to configuracioService.
      • setRoleEntityDao

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

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

        public void setSoDRoleEntityDao​(SoDRoleEntityDao soDRoleEntityDao)
        Sets reference to soDRoleEntityDao.
      • getSoDRoleEntityDao

        public SoDRoleEntityDao getSoDRoleEntityDao()
        Gets reference to soDRoleEntityDao.
      • setSoDRuleEntityDao

        public void setSoDRuleEntityDao​(SoDRuleEntityDao soDRuleEntityDao)
        Sets reference to soDRuleEntityDao.
      • getSoDRuleEntityDao

        public SoDRuleEntityDao getSoDRuleEntityDao()
        Gets reference to soDRuleEntityDao.
      • setSoDRuleMatrixEntityDao

        public void setSoDRuleMatrixEntityDao​(SoDRuleMatrixEntityDao soDRuleMatrixEntityDao)
        Sets reference to soDRuleMatrixEntityDao.
      • getSoDRuleMatrixEntityDao

        public SoDRuleMatrixEntityDao getSoDRuleMatrixEntityDao()
        Gets reference to soDRuleMatrixEntityDao.
      • setUserEntityDao

        public void setUserEntityDao​(UserEntityDao usuariEntityDao)
        Sets reference to usuariEntityDao.
      • getUserEntityDao

        public UserEntityDao getUserEntityDao()
        Gets reference to usuariEntityDao.
      • isGreater

        @Transactional(rollbackFor=java.lang.Exception.class)
        public boolean isGreater​(es.caib.seycon.ng.comu.SoDRisk first,
                                 es.caib.seycon.ng.comu.SoDRisk second)
                          throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        isGreater in interface com.soffid.iam.service.SoDRuleService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleIsGreater

        protected abstract boolean handleIsGreater​(es.caib.seycon.ng.comu.SoDRisk first,
                                                   es.caib.seycon.ng.comu.SoDRisk second)
                                            throws Exception
        Throws:
        Exception
      • findSodRuleByJsonQueryAsync

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.AsyncList<com.soffid.iam.api.SoDRule> findSodRuleByJsonQueryAsync​(String query)
                                                                                             throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                                                    es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findSodRuleByJsonQueryAsync in interface com.soffid.iam.service.SoDRuleService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindSodRuleByJsonQueryAsync

        protected abstract com.soffid.iam.api.AsyncList<com.soffid.iam.api.SoDRule> handleFindSodRuleByJsonQueryAsync​(String query)
                                                                                                               throws Exception
        Throws:
        Exception
      • create

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

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

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

        protected abstract com.soffid.iam.api.SoDRuleMatrix handleUpdate​(com.soffid.iam.api.SoDRuleMatrix role)
                                                                  throws Exception
        Throws:
        Exception
      • qualifyUser

        @Transactional(rollbackFor=java.lang.Exception.class)
        public es.caib.seycon.ng.comu.SoDRisk qualifyUser​(Collection<com.soffid.iam.api.RoleAccount> ra)
                                                   throws es.caib.seycon.ng.exception.InternalErrorException,
                                                          es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        qualifyUser in interface com.soffid.iam.service.SoDRuleService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleQualifyUser

        protected abstract es.caib.seycon.ng.comu.SoDRisk handleQualifyUser​(Collection<com.soffid.iam.api.RoleAccount> ra)
                                                                     throws Exception
        Throws:
        Exception
      • create

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

        protected abstract com.soffid.iam.api.SoDRole handleCreate​(com.soffid.iam.api.SoDRole role)
                                                            throws Exception
        Throws:
        Exception
      • create

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

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

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.SoDRule getRuleById​(Long ruleId)
                                               throws es.caib.seycon.ng.exception.InternalErrorException,
                                                      es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getRuleById in interface com.soffid.iam.service.SoDRuleService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetRuleById

        protected abstract com.soffid.iam.api.SoDRule handleGetRuleById​(Long ruleId)
                                                                 throws Exception
        Throws:
        Exception
      • isAllowed

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.SoDRule isAllowed​(com.soffid.iam.api.RoleAccount ra)
                                             throws es.caib.seycon.ng.exception.InternalErrorException,
                                                    es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        isAllowed in interface com.soffid.iam.service.SoDRuleService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleIsAllowed

        protected abstract com.soffid.iam.api.SoDRule handleIsAllowed​(com.soffid.iam.api.RoleAccount ra)
                                                               throws Exception
        Throws:
        Exception
      • update

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

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

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<com.soffid.iam.api.SoDRule> findAffectingRulesByRolAccount​(com.soffid.iam.api.RoleAccount ra)
                                                                              throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                                     es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findAffectingRulesByRolAccount in interface com.soffid.iam.service.SoDRuleService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindAffectingRulesByRolAccount

        protected abstract Collection<com.soffid.iam.api.SoDRule> handleFindAffectingRulesByRolAccount​(com.soffid.iam.api.RoleAccount ra)
                                                                                                throws Exception
        Throws:
        Exception
      • findMatrixByRule

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

        protected abstract Collection<com.soffid.iam.api.SoDRuleMatrix> handleFindMatrixByRule​(Long ruleId)
                                                                                        throws Exception
        Throws:
        Exception
      • findRolesByRule

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

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

        protected abstract Collection<com.soffid.iam.api.SoDRule> handleFindRuleByApplication​(Long applicationId)
                                                                                       throws Exception
        Throws:
        Exception
      • findSodRuleByJsonQuery

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<com.soffid.iam.api.SoDRule> findSodRuleByJsonQuery​(String query,
                                                                       Integer first,
                                                                       Integer pageSize)
                                                                throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                       es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findSodRuleByJsonQuery in interface com.soffid.iam.service.SoDRuleService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • findViolotions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<com.soffid.iam.api.RoleAccount> findViolotions​(String applicationName,
                                                                   es.caib.seycon.ng.comu.SoDRisk riskLevel)
                                                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                   es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findViolotions in interface com.soffid.iam.service.SoDRuleService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindViolotions

        protected abstract List<com.soffid.iam.api.RoleAccount> handleFindViolotions​(String applicationName,
                                                                                     es.caib.seycon.ng.comu.SoDRisk riskLevel)
                                                                              throws Exception
        Throws:
        Exception
      • internalRemovingRole

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void internalRemovingRole​(Long roleId)
                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                         es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        internalRemovingRole in interface com.soffid.iam.service.SoDRuleService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleInternalRemovingRole

        protected abstract void handleInternalRemovingRole​(Long roleId)
                                                    throws Exception
        Throws:
        Exception
      • qualifyRolAccountList

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void qualifyRolAccountList​(List<com.soffid.iam.api.RoleAccount> ra)
                                   throws es.caib.seycon.ng.exception.InternalErrorException,
                                          es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        qualifyRolAccountList in interface com.soffid.iam.service.SoDRuleService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleQualifyRolAccountList

        protected abstract void handleQualifyRolAccountList​(List<com.soffid.iam.api.RoleAccount> ra)
                                                     throws Exception
        Throws:
        Exception
      • remove

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void remove​(com.soffid.iam.api.SoDRuleMatrix role)
                    throws es.caib.seycon.ng.exception.InternalErrorException,
                           es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        remove in interface com.soffid.iam.service.SoDRuleService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleRemove

        protected abstract void handleRemove​(com.soffid.iam.api.SoDRuleMatrix role)
                                      throws Exception
        Throws:
        Exception
      • remove

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void remove​(com.soffid.iam.api.SoDRole role)
                    throws es.caib.seycon.ng.exception.InternalErrorException,
                           es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        remove in interface com.soffid.iam.service.SoDRuleService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleRemove

        protected abstract void handleRemove​(com.soffid.iam.api.SoDRole role)
                                      throws Exception
        Throws:
        Exception
      • remove

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

        protected abstract void handleRemove​(com.soffid.iam.api.SoDRule rule)
                                      throws Exception
        Throws:
        Exception
      • getPrincipal

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