Package io.meeds.chat.rest
Class MatrixRest
java.lang.Object
io.meeds.chat.rest.MatrixRest
- All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer
@RestController
@RequestMapping("/matrix")
public class MatrixRest
extends Object
implements org.exoplatform.services.rest.resource.ResourceContainer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDirectMessagingRoom(jakarta.servlet.http.HttpServletRequest request, Room room) getByRoomId(String roomId) getDirectMessagingRoom(jakarta.servlet.http.HttpServletRequest request, String firstParticipant, String secondParticipant) org.springframework.http.ResponseEntity<org.exoplatform.social.rest.entity.IdentityEntity> getIdentityByUserMatrixId(jakarta.servlet.http.HttpServletRequest request, org.springframework.web.context.request.WebRequest webRequest, String userMatrixId) getMatrixRoomBySpaceId(String spaceId) org.springframework.http.ResponseEntity<RoomEntity> getRoomById(jakarta.servlet.http.HttpServletRequest request, org.springframework.web.context.request.WebRequest webRequest, String roomId) org.springframework.http.ResponseEntity<RoomEntity> getRoomBySpaceId(jakarta.servlet.http.HttpServletRequest request, org.springframework.web.context.request.WebRequest webRequest, long spaceId) booleanlinkSpaceToRoom(String spaceGroupId, String roomId, Boolean create) processRooms(RoomList roomList, String currentUserName) Process the Matrix rooms and adds the missing information of users and spacesorg.springframework.http.ResponseEntity<RoomList> processRooms(jakarta.servlet.http.HttpServletRequest request, RoomList rooms) org.springframework.http.ResponseEntity<String> syncUsersAndSpaces(jakarta.servlet.http.HttpServletRequest request, org.springframework.web.context.request.WebRequest webRequest) org.springframework.http.ResponseEntity<String> updatePresenceStatus(Presence presence)
-
Constructor Details
-
MatrixRest
public MatrixRest()
-
-
Method Details
-
getMatrixRoomBySpaceId
@GetMapping @Secured("users") public RoomEntity getMatrixRoomBySpaceId(@RequestParam(name="spaceId") String spaceId) -
getDirectMessagingRoom
@GetMapping("dmRoom") @Secured("users") public RoomEntity getDirectMessagingRoom(jakarta.servlet.http.HttpServletRequest request, @RequestParam(name="firstParticipant") String firstParticipant, @RequestParam(name="secondParticipant") String secondParticipant) -
createDirectMessagingRoom
@PostMapping @Secured("users") public RoomEntity createDirectMessagingRoom(jakarta.servlet.http.HttpServletRequest request, @RequestBody Room room) -
notify
-
linkSpaceToRoom
-
getUserDirectMessagingRooms
-
getByRoomId
-
getRoomById
@GetMapping("byRoomId") @Secured("users") public org.springframework.http.ResponseEntity<RoomEntity> getRoomById(jakarta.servlet.http.HttpServletRequest request, org.springframework.web.context.request.WebRequest webRequest, @RequestParam(name="roomId") String roomId) -
getRoomBySpaceId
@GetMapping("spaceRoom") @Secured("users") public org.springframework.http.ResponseEntity<RoomEntity> getRoomBySpaceId(jakarta.servlet.http.HttpServletRequest request, org.springframework.web.context.request.WebRequest webRequest, @RequestParam(name="spaceId") long spaceId) -
getIdentityByUserMatrixId
@GetMapping("userByMatrixId") @Secured("users") public org.springframework.http.ResponseEntity<org.exoplatform.social.rest.entity.IdentityEntity> getIdentityByUserMatrixId(jakarta.servlet.http.HttpServletRequest request, org.springframework.web.context.request.WebRequest webRequest, @RequestParam(name="userMatrixId") String userMatrixId) -
processRooms
-
updatePresenceStatus
-
syncUsersAndSpaces
@GetMapping("sync") @Secured("administrators") public org.springframework.http.ResponseEntity<String> syncUsersAndSpaces(jakarta.servlet.http.HttpServletRequest request, org.springframework.web.context.request.WebRequest webRequest) -
processRooms
Process the Matrix rooms and adds the missing information of users and spaces- Parameters:
roomList- the room list received from Matrix par sync APIcurrentUserName- the current user- Returns:
- the roo List after processing
-