com.engiweb.profilemanager.common.interfaces

Interface IRightsDirect

  • All Superinterfaces:
    common.direct.IDirect


    public interface IRightsDirect
    extends common.direct.IDirect
    The Interface IRightsDirect.
    • Method Detail

      • findProfileRights

        com.engiweb.pm.entity.BeanList<ServiceAttributeBean> findProfileRights(ServiceAttributeBean serviceBean,
                                                                               EntitlementBean profileBean,
                                                                               com.engiweb.pm.entity.Paging paging,
                                                                               com.engiweb.pm.dao.db.DAO dao)
                                                                        throws com.engiweb.toolkit.common.BackendException
        Return all rights of a given profile. You will obtain as result all the user's serviceAttributes connected by the given entitlement. WARNING: EntitlementBean has to be univocally defined. Only PROFILE Entitlements are accepted.
        Parameters:
        serviceBean - ServiceAttributeBean the rights, if null no filter is applied, otherwise the passed object is used as filter
        profileBean - EntitlementBean the profile (mandatory)
        paging - Paging the paging
        dao - DAO the connection dao
        Returns:
        BeanList of ServiceAttributeBean
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • findPersonRights

        com.engiweb.pm.entity.BeanList<ServiceAttributeBean> findPersonRights(ServiceAttributeBean serviceAttributeBean,
                                                                              EntitlementBean profileBean,
                                                                              UserBean userBean,
                                                                              com.engiweb.pm.entity.Paging paging,
                                                                              com.engiweb.pm.dao.db.DAO dao)
                                                                       throws com.engiweb.toolkit.common.BackendException
        Return all rights of a given User. Filter by either serviceAttribute or by Entitlement. If the EntitlementBean parameter is not null than you will obtain as result all the user's serviceAttributes connected by the given entitlement. WARNING: if you provide an EntitlementBean, it has to be univocally defined. Only PROFILE Entitlements are accepted.
        Parameters:
        serviceAttributeBean - ServiceAttributeBean the rights, if null no filter is applied, otherwise the passed object is used as filter
        profileBean - EntitlementBean the profile
        userBean - UserBean the user (mandatory)
        paging - Paging the paging
        dao - DAO the connection dao
        Returns:
        BeanList of ServiceAttributeBean
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • findServiceAttrLookup

        com.engiweb.pm.entity.BeanList<RightsLookupBean> findServiceAttrLookup(java.lang.String key,
                                                                               com.engiweb.pm.entity.Paging paging,
                                                                               com.engiweb.pm.dao.db.DAO dao)
                                                                        throws com.engiweb.toolkit.common.BackendException
        Deprecated. Return rights lookup filter by the content passed with the parameter.
        Parameters:
        key - String the key
        paging - Paging the paging
        dao - DAO the connection dao
        Returns:
        BeanList of RightsLookupBean
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • findServiceAttrLookup

        com.engiweb.pm.entity.BeanList<RightsLookupBean> findServiceAttrLookup(ServiceAttributeBean sab,
                                                                               com.engiweb.pm.entity.Paging paging,
                                                                               com.engiweb.pm.dao.db.DAO dao)
                                                                        throws com.engiweb.toolkit.common.BackendException
        Throws:
        com.engiweb.toolkit.common.BackendException
      • checkService

        java.util.HashMap<EntitlementBean,com.engiweb.pm.entity.BeanList<ServiceAttributeBean>> checkService(UserBean userBean,
                                                                                                             com.engiweb.pm.entity.BeanList<EntitlementBean> entBeanBL,
                                                                                                             com.engiweb.pm.dao.db.DAO dao)
                                                                                                      throws com.engiweb.toolkit.common.BackendException
        Given a user and a list of permission, return the rights associated.
        Parameters:
        userBean - UserBean the user (mandatory)
        entBeanBL - BeanList of EntitlementBean the list of profile (mandatory)
        dao - DAO the connection dao
        Returns:
        HashMap where the key is the EntitlementBean profile and the value is the BeanList of ServiceAttributeBean the associated rights.
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • insertOrUpdateRight

        void insertOrUpdateRight(com.engiweb.pm.entity.BeanList<ServiceAttributeBean> rightsList,
                                 EntitlementBean entitlementBean,
                                 com.engiweb.pm.dao.db.DAO dao)
                          throws com.engiweb.toolkit.common.BackendException
        Insert or update right.
        Parameters:
        rightsList - BeanList of ServiceAttributeBean the rights list
        entitlementBean - EntitlementBean the entitlement is mandatory and has to be unique.
        dao - DAO the connection dao
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • insertOrUpdateUserRight

        void insertOrUpdateUserRight(com.engiweb.pm.entity.BeanList<UserRightsBean> rightsList,
                                     UserBean userBean,
                                     com.engiweb.pm.dao.db.DAO dao)
                              throws com.engiweb.toolkit.common.BackendException
        Insert or update all user right. Substitute the attributes keys and values with the list provided for the given Profile. * If rightsList is an empty list, all User Rights will be removed!
        Parameters:
        rightsList - BeanList of UserRightsBean the rights list
        userBean - UserBean the user (mandatory)
        dao - DAO the connection dao
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • deleteRights

        void deleteRights(com.engiweb.pm.entity.BeanList<ServiceAttributeBean> rightsList,
                          EntitlementBean entitlementBean,
                          com.engiweb.pm.dao.db.DAO dao)
                   throws com.engiweb.toolkit.common.BackendException
        Delete a list of rights.
        Parameters:
        rightsList - BeanList of ServiceAttributeBean the rights list (have to be unique).
        entitlementBean - EntitlementBean the entitlement (mandatory and ha to be unique).
        dao - DAO the connection dao
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • findUserProfiles

        com.engiweb.pm.entity.BeanList<EntitlementBean> findUserProfiles(EntitlementBean profileBean,
                                                                         UserBean userBean,
                                                                         com.engiweb.pm.entity.Paging pag,
                                                                         com.engiweb.pm.dao.db.DAO dao)
                                                                  throws com.engiweb.toolkit.common.BackendException
        Find user profiles.
        Parameters:
        profileBean - EntitlementBean the profile. if null no filter is applied, otherwise the passed object is used as filter
        userBean - UserBean the user (mandatory)
        pag - Paging the pag
        dao - DAO the connection dao
        Returns:
        BeanList of EntitlementBean
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • findPwdCfgRights

        com.engiweb.pm.entity.BeanList<ServiceAttributeBean> findPwdCfgRights(ServiceAttributeBean rightBean,
                                                                              PwdCfgBean pwdCfgBean,
                                                                              com.engiweb.pm.entity.Paging paging,
                                                                              com.engiweb.pm.dao.db.DAO dao)
                                                                       throws com.engiweb.toolkit.common.BackendException
        Find all rights of a given account.
        Parameters:
        rightBean - the right. if null no filter is applied, otherwise the passed object is used as filter
        pwdCfgBean - PwdCfgBean the account (mandatory)
        paging - Paging the paging
        dao - DAO the connection dao
        Returns:
        BeanList of ServiceAttributeBean
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • insertOrUpdateRight

        void insertOrUpdateRight(com.engiweb.pm.entity.BeanList<ServiceAttributeBean> rightsList,
                                 PwdCfgBean pwdCfgBean,
                                 com.engiweb.pm.dao.db.DAO dao)
                          throws com.engiweb.toolkit.common.BackendException
        Insert or update right.
        Parameters:
        rightsList - BeanList of ServiceAttributeBean the rights list
        pwdCfgBean - PwdCfgBean the account (mandatory and has to be unique).
        dao - DAO the connection dao
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • deleteRights

        void deleteRights(com.engiweb.pm.entity.BeanList<ServiceAttributeBean> rightsList,
                          PwdCfgBean pwdCfgBean,
                          com.engiweb.pm.dao.db.DAO dao)
                   throws com.engiweb.toolkit.common.BackendException
        Delete rights.
        Parameters:
        rightsList - BeanList of ServiceAttributeBean the rights list (has to be unique)
        pwdCfgBean - PwdCfgBean the account (mandatory and has to be unique)
        dao - DAO the connection dao
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • findAccountRights

        com.engiweb.pm.entity.BeanList<ServiceAttributeBean> findAccountRights(ServiceAttributeBean serviceAttributeBean,
                                                                               PwdCfgBean pwdCfgBean,
                                                                               UserBean userBean,
                                                                               com.engiweb.pm.entity.Paging paging,
                                                                               com.engiweb.pm.dao.db.DAO dao)
                                                                        throws com.engiweb.toolkit.common.BackendException
        Find rights of the given user, filter by either serviceAttribute or by account. If the PwdCfgBean parameter is not null than you will obtain as result all the user's serviceAttributes connected by the given entitlement. WARNING: if you provide an PwdCfgBean, it has to be univocally defined. Only PROFILE Pwdcfgs are accepted.
        Parameters:
        serviceAttributeBean - ServiceAttributeBean the right. if null no filter is applied, otherwise the passed object is used as filter
        pwdCfgBean - PwdCfgBean the account
        userBean - UserBean the user (mandatory)
        paging - Paging the paging
        dao - DAO the connection dao
        Returns:
        BeanList of ServiceAttributeBean
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • insertOrUpdateUserRight

        void insertOrUpdateUserRight(com.engiweb.pm.entity.BeanList<ServiceAttributeBean> rightsList,
                                     PwdCfgBean pwdCfgBean,
                                     UserBean userBean,
                                     com.engiweb.pm.dao.db.DAO dao)
                              throws com.engiweb.toolkit.common.BackendException
        Insert or update user right. Substitute the attributes keys and values with the list provided for the given Profile. If rightsList is an empty list, all User Rights will be removed!
        Parameters:
        rightsList - BeanList of ServiceAttributeBean the rights list
        pwdCfgBean - PwdCfgBeanthe account
        userBean - UserBean the user (mandatory)
        dao - DAO the connection dao
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • insertEntitlementRights

        void insertEntitlementRights(EntitlementBean roleBean,
                                     com.engiweb.pm.entity.BeanList<EntitlementServiceBean> eServList,
                                     com.engiweb.pm.dao.db.DAO dao)
                              throws com.engiweb.toolkit.common.BackendException
        Add Rights to a Role. When a Profile with rights associated is assigned to a role, it is possible to give values to the rights over the role. These values can be either vaue_type FIXED (users will inheritate that values with no choice) or value_type RESTRICT LOOKUP (these values will filter over serviceLookup values for this right, restricting the possible choices)
        Parameters:
        roleBean - EntitlementBean the entitlement (mandatory)
        eServList - BeanList of EntitlementServiceBean the list of rights to add to entitlement
        dao - DAO the connection dao
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • deleteEntitlementRights

        void deleteEntitlementRights(ServiceAttributeBean sab,
                                     EntitlementBean roleBean,
                                     com.engiweb.pm.dao.db.DAO dao)
                              throws com.engiweb.toolkit.common.BackendException
        Delete entitlement rights.
        Parameters:
        sab - ServiceAttributeBean the rights
        roleBean - EntitlementBean the entitlement (mandatory)
        dao - DAO the connection dao
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • findEntitlementRightsValues

        com.engiweb.pm.entity.BeanList<EntitlementServiceBean> findEntitlementRightsValues(ServiceAttributeBean serviceAttributeBean,
                                                                                           EntitlementBean roleBean,
                                                                                           com.engiweb.pm.entity.Paging paging,
                                                                                           com.engiweb.pm.dao.db.DAO dao)
                                                                                    throws com.engiweb.toolkit.common.BackendException
        Find entitlement rights values.
        Parameters:
        serviceAttributeBean - ServiceAttributeBean the right
        roleBean - EntitlementBean the entitlement (mandatory)
        paging - Paging the paging
        dao - DAO the connection dao
        Returns:
        BeanList of EntitlementServiceBean
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • insertRightsLookup

        void insertRightsLookup(java.lang.String content,
                                java.lang.String value,
                                com.engiweb.pm.dao.db.DAO dao)
                         throws com.engiweb.toolkit.common.BackendException
        Insert rights lookup.
        Parameters:
        content - String the content (mandatory)
        value - String the value
        dao - DAO the connection dao
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • insertRightsLookup

        void insertRightsLookup(com.engiweb.pm.entity.BeanList<RightsLookupBean> rightsLookupList,
                                com.engiweb.pm.dao.db.DAO dao)
                         throws com.engiweb.toolkit.common.BackendException
        Insert rights lookup.
        Parameters:
        rightsLookupList - BeanList of RightsLookupBean the rights lookup list. Field "content" for each RightsLookupBean is mandatory.
        dao - DAO the connection dao
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception BeanList of RightsLookupBean the rights lookup list
      • deleteRightsLookup

        void deleteRightsLookup(java.lang.String content,
                                java.lang.String value,
                                com.engiweb.pm.dao.db.DAO dao)
                         throws com.engiweb.toolkit.common.BackendException
        Delete rights lookup.
        Parameters:
        content - String the content (mandatory)
        value - String the value
        dao - DAO the dao
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • findContentLookup

        com.engiweb.pm.entity.BeanList<RightsLookupBean> findContentLookup(RightsLookupBean rlbean,
                                                                           com.engiweb.pm.entity.Paging paging,
                                                                           com.engiweb.pm.dao.db.DAO dao)
                                                                    throws com.engiweb.toolkit.common.BackendException
        Find content lookup.
        Parameters:
        rlbean - RightsLookupBean the rlbean
        paging - Paging the paging
        dao - DAO the connection dao
        Returns:
        BeanList of RightsLookupBean
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception
      • insertContentLookup

        RightsLookupBean insertContentLookup(java.lang.String content,
                                             com.engiweb.pm.dao.db.DAO dao)
                                      throws com.engiweb.toolkit.common.BackendException
        Insert content lookup.
        Parameters:
        content - String the content (mandatory)
        dao - DAO the connection dao
        Returns:
        RightsLookupBean
        Throws:
        com.engiweb.toolkit.common.BackendException - the backend exception