Class TenantServiceBase

  • All Implemented Interfaces:
    com.soffid.iam.service.TenantService
    Direct Known Subclasses:
    TenantServiceImpl

    public abstract class TenantServiceBase
    extends Object
    implements com.soffid.iam.service.TenantService

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

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

      • TenantServiceBase

        public TenantServiceBase()
    • Method Detail

      • setApplicationBootService

        public void setApplicationBootService​(com.soffid.iam.service.ApplicationBootService applicationBootService)
        Sets reference to applicationBootService.
      • getApplicationBootService

        public com.soffid.iam.service.ApplicationBootService getApplicationBootService()
        Gets reference to applicationBootService.
      • setServerEntityDao

        public void setServerEntityDao​(ServerEntityDao serverEntityDao)
        Sets reference to serverEntityDao.
      • getServerEntityDao

        public ServerEntityDao getServerEntityDao()
        Gets reference to serverEntityDao.
      • setTenantDisabledPermissionEntityDao

        public void setTenantDisabledPermissionEntityDao​(TenantDisabledPermissionEntityDao tenantDisabledPermissionEntityDao)
        Sets reference to tenantDisabledPermissionEntityDao.
      • getTenantDisabledPermissionEntityDao

        public TenantDisabledPermissionEntityDao getTenantDisabledPermissionEntityDao()
        Gets reference to tenantDisabledPermissionEntityDao.
      • setTenantEntityDao

        public void setTenantEntityDao​(TenantEntityDao tenantEntityDao)
        Sets reference to tenantEntityDao.
      • getTenantEntityDao

        public TenantEntityDao getTenantEntityDao()
        Gets reference to tenantEntityDao.
      • setTenantServerEntityDao

        public void setTenantServerEntityDao​(TenantServerEntityDao tenantServerEntityDao)
        Sets reference to tenantServerEntityDao.
      • getTenantServerEntityDao

        public TenantServerEntityDao getTenantServerEntityDao()
        Gets reference to tenantServerEntityDao.
      • importTenant

        @Transactional(rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.Tenant importTenant​(InputStream in)
                                               throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        importTenant in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • create

        @Transactional(rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.Tenant create​(com.soffid.iam.api.Tenant tenant)
                                         throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        create in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleCreate

        protected abstract com.soffid.iam.api.Tenant handleCreate​(com.soffid.iam.api.Tenant tenant)
                                                           throws Exception
        Throws:
        Exception
      • getMasterTenant

        @Transactional(rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.Tenant getMasterTenant()
                                                  throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getMasterTenant in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetMasterTenant

        protected abstract com.soffid.iam.api.Tenant handleGetMasterTenant()
                                                                    throws Exception
        Throws:
        Exception
      • getTenant

        @Transactional(rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.Tenant getTenant​(Long id)
                                            throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getTenant in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetTenant

        protected abstract com.soffid.iam.api.Tenant handleGetTenant​(Long id)
                                                              throws Exception
        Throws:
        Exception
      • getTenant

        @Transactional(rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.Tenant getTenant​(String name)
                                            throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getTenant in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetTenant

        protected abstract com.soffid.iam.api.Tenant handleGetTenant​(String name)
                                                              throws Exception
        Throws:
        Exception
      • update

        @Transactional(rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.Tenant update​(com.soffid.iam.api.Tenant tenant)
                                         throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        update in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleUpdate

        protected abstract com.soffid.iam.api.Tenant handleUpdate​(com.soffid.iam.api.Tenant tenant)
                                                           throws Exception
        Throws:
        Exception
      • listTenants

        @Transactional(rollbackFor=java.lang.Exception.class)
        public Collection<com.soffid.iam.api.Tenant> listTenants()
                                                          throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        listTenants in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • find

        @Transactional(rollbackFor=java.lang.Exception.class)
        public List<com.soffid.iam.api.Tenant> find​(com.soffid.iam.api.TenantCriteria criteria)
                                             throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        find in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFind

        protected abstract List<com.soffid.iam.api.Tenant> handleFind​(com.soffid.iam.api.TenantCriteria criteria)
                                                               throws Exception
        Throws:
        Exception
      • getDisabledPermissions

        @Transactional(rollbackFor=java.lang.Exception.class)
        public List<String> getDisabledPermissions​(com.soffid.iam.api.Tenant tenant)
                                            throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getDisabledPermissions in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetDisabledPermissions

        protected abstract List<String> handleGetDisabledPermissions​(com.soffid.iam.api.Tenant tenant)
                                                              throws Exception
        Throws:
        Exception
      • getTenantServers

        @Transactional(rollbackFor=java.lang.Exception.class)
        public List<String> getTenantServers​(com.soffid.iam.api.Tenant tenant)
                                      throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getTenantServers in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetTenantServers

        protected abstract List<String> handleGetTenantServers​(com.soffid.iam.api.Tenant tenant)
                                                        throws Exception
        Throws:
        Exception
      • addTenantServer

        @Transactional(rollbackFor=java.lang.Exception.class)
        public void addTenantServer​(com.soffid.iam.api.Tenant tenant,
                                    String server)
                             throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        addTenantServer in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleAddTenantServer

        protected abstract void handleAddTenantServer​(com.soffid.iam.api.Tenant tenant,
                                                      String server)
                                               throws Exception
        Throws:
        Exception
      • disablePermission

        @Transactional(rollbackFor=java.lang.Exception.class)
        public void disablePermission​(com.soffid.iam.api.Tenant tenant,
                                      String permission)
                               throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        disablePermission in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleDisablePermission

        protected abstract void handleDisablePermission​(com.soffid.iam.api.Tenant tenant,
                                                        String permission)
                                                 throws Exception
        Throws:
        Exception
      • enablePermission

        @Transactional(rollbackFor=java.lang.Exception.class)
        public void enablePermission​(com.soffid.iam.api.Tenant tenant,
                                     String permission)
                              throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        enablePermission in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleEnablePermission

        protected abstract void handleEnablePermission​(com.soffid.iam.api.Tenant tenant,
                                                       String permission)
                                                throws Exception
        Throws:
        Exception
      • remove

        @Transactional(rollbackFor=java.lang.Exception.class)
        public void remove​(com.soffid.iam.api.Tenant tenant)
                    throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        remove in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleRemove

        protected abstract void handleRemove​(com.soffid.iam.api.Tenant tenant)
                                      throws Exception
        Throws:
        Exception
      • removeTenantServer

        @Transactional(rollbackFor=java.lang.Exception.class)
        public void removeTenantServer​(com.soffid.iam.api.Tenant tenant,
                                       String server)
                                throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        removeTenantServer in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleRemoveTenantServer

        protected abstract void handleRemoveTenantServer​(com.soffid.iam.api.Tenant tenant,
                                                         String server)
                                                  throws Exception
        Throws:
        Exception
      • exportTenant

        @Transactional(rollbackFor=java.lang.Exception.class)
        public void exportTenant​(com.soffid.iam.api.Tenant tenant,
                                 OutputStream out)
                          throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        exportTenant in interface com.soffid.iam.service.TenantService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleExportTenant

        protected abstract void handleExportTenant​(com.soffid.iam.api.Tenant tenant,
                                                   OutputStream out)
                                            throws Exception
        Throws:
        Exception
      • getPrincipal

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