Class RegistryService


  • @Service
    public class RegistryService
    extends Object
    • Constructor Detail

      • RegistryService

        @Autowired
        public RegistryService​(HttpUtils httpUtils,
                               JsonUtils jsonUtils)
    • Method Detail

      • getCoPersonIdsByEmail

        public List<Integer> getCoPersonIdsByEmail​(String email,
                                                   String identifier)
        1.1 Get CoPersonId by Email
      • getCoPersonIdsByEmail

        public List<Integer> getCoPersonIdsByEmail​(String email)
      • getCoPersonIdByIdentifier

        public Integer getCoPersonIdByIdentifier()
        1.2 Get CoPersonId by AAI identifier
      • getCoPersonIdByIdentifier

        public Integer getCoPersonIdByIdentifier​(String sub)
      • getIdentifierByCoPersonId

        public String getIdentifierByCoPersonId​(Integer coPersonId)
        2 Get AAI identifier by CoPersonId
      • getCous

        public com.google.gson.JsonArray getCous​(String name)
        3.1 Get OpenAIRE cous with a specific name(or substring)
      • getCous

        public com.google.gson.JsonArray getCous()
        3.2 Get all OpenAIRE cous
      • getCouId

        public Integer getCouId​(String name)
        4.1 Get a couId by name
        Parameters:
        name -
        Returns:
      • getRoles

        public com.google.gson.JsonArray getRoles​(Integer coPersonId)
        5. Get User non admin roles
      • getRoleId

        public Integer getRoleId​(Integer coPersonId,
                                 Integer couId)
        6. Get Role id of User base on couId.
      • getUserGroups

        public com.google.gson.JsonArray getUserGroups​(Integer coPersonId)
        7. Get User Groups
      • getUserAdminGroup

        public com.google.gson.JsonObject getUserAdminGroup​(Integer coPersonId,
                                                            Integer couId)
        8. Get User Admin Group of a Cou
      • getCouGroups

        public com.google.gson.JsonArray getCouGroups​(Integer couId)
        9. Get Groups of a Cou
      • getCouAdminGroup

        public com.google.gson.JsonObject getCouAdminGroup​(Integer couId)
        10. Get Admin Group of a Cou
      • getGroupMembers

        public com.google.gson.JsonArray getGroupMembers​(Integer coGroupId)
        11. Get users of a group
      • getUserEmailByCouId

        public com.google.gson.JsonArray getUserEmailByCouId​(Integer couId,
                                                             boolean admin)
        12. Get Users' email of a Cou
      • getUserNamesByCouId

        public com.google.gson.JsonArray getUserNamesByCouId​(Integer couId,
                                                             boolean admin)
        13. Get Users' names of a Cou
      • getUserIdByCouId

        public com.google.gson.JsonArray getUserIdByCouId​(Integer couId,
                                                          boolean admin)
        14. Get Users' identifiers of a Cou
      • assignMemberRole

        public void assignMemberRole​(Integer coPersonId,
                                     Integer couId)
        15. Assign a member role to a User
      • removeMemberRole

        public void removeMemberRole​(Integer coPersonId,
                                     Integer couId,
                                     Integer id)
        16. Remove a member role from a User
      • createRole

        public Integer createRole​(String name,
                                  String description)
        17. Create a new role
      • getUserEmail

        public String getUserEmail​(Integer coPersonId)
        18. Get User's email
      • getUserNames

        public String getUserNames​(Integer coPersonId)
        19. Get User's names
      • getUserId

        public String getUserId​(Integer coPersonId)
        20. Get User's identifier
      • assignAdminRole

        public void assignAdminRole​(Integer coPersonId,
                                    Integer couId)
        21. Assign an admin role to a User
      • removeAdminRole

        public void removeAdminRole​(Integer coPersonId,
                                    Integer couId)
        22. Remove an admin role from a User