File tree Expand file tree Collapse file tree
resource-management/resource-management-service/src/main/java/com/itgura/service/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,40 +304,7 @@ private String signPolicyWithPrivateKey(String base64EncodedPolicy) throws Excep
304304
305305 return Base64 .getEncoder ().encodeToString (signedBytes );
306306 }
307- @ Override
308- public MaterialResponseDto getMaterialById (UUID materialId ) {
309- try {
310- UserResponseDto loggedUserDetails = userDetailService .getLoggedUserDetails (UserUtil .extractToken ());
311-
312- if (loggedUserDetails == null ) {
313- throw new ValueNotExistException ("User not found" );
314- }else {
315- Material material = materialRepository .findById (materialId ).orElseThrow (()
316- -> new ValueNotExistException ("Material not found with id " + materialId ));
317- MaterialResponseDto dto = MaterialMapper .INSTANCE .toDto (material );
318- return dto ;
319- }
320- }catch (Exception e ) {
321- throw new RuntimeException (e );
322- }
323- }
324307
325- @ Override
326- public List <MaterialResponseDto > getAllMaterialBySessionId (UUID sessionId ) {
327- try {
328- UserResponseDto loggedUserDetails = userDetailService .getLoggedUserDetails (UserUtil .extractToken ());
329-
330- if (loggedUserDetails == null ) {
331- throw new ValueNotExistException ("User not found" );
332- }else {
333- List <Material > allBySessionContentId = materialRepository .findAllBySession_ContentId (sessionId );
334- List <MaterialResponseDto > dtos = MaterialMapper .INSTANCE .toDtoList (allBySessionContentId );
335- return dtos ;
336- }
337- }catch (Exception e ) {
338- throw new RuntimeException (e );
339- }
340- }
341308
342309 private String urlEncode (String value ) {
343310
You can’t perform that action at this time.
0 commit comments