-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/connect-page' into TRIB-244
- Loading branch information
Showing
18 changed files
with
704 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...ibeapp/controllers/annotations/controllers/ConnectAPIController/GetAllCosignsForUser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.savvato.tribeapp.controllers.annotations.controllers.ConnectAPIController; | ||
|
||
import com.savvato.tribeapp.controllers.annotations.responses.BadRequest; | ||
import com.savvato.tribeapp.controllers.annotations.responses.Success; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
|
||
import java.lang.annotation.*; | ||
|
||
/** Documentation for getting all cosigns for a user */ | ||
@Target({ElementType.METHOD, ElementType.TYPE, ElementType.ANNOTATION_TYPE}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Documented | ||
@Operation( | ||
summary = "Get all cosigners of attributes for a given attribute for a user", | ||
description = "Provided a user ID, get cosigns and attribute ids for that user. ") | ||
@Success(description = "", example = "") | ||
@BadRequest(description = "", noContent = true) | ||
public @interface GetAllCosignsForUser {} |
17 changes: 17 additions & 0 deletions
17
...ontrollers/annotations/controllers/ConnectAPIController/GetCosignersForUserAttribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.savvato.tribeapp.controllers.annotations.controllers.ConnectAPIController; | ||
|
||
import com.savvato.tribeapp.controllers.annotations.responses.BadRequest; | ||
import com.savvato.tribeapp.controllers.annotations.responses.Success; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import java.lang.annotation.*; | ||
|
||
/** Documentation for getting cosigns for a user attribute */ | ||
@Target({ElementType.METHOD, ElementType.TYPE, ElementType.ANNOTATION_TYPE}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Documented | ||
@Operation( | ||
summary = "Get all cosigners for a given attribute for a user", | ||
description = "Provided a user ID and attribute ID, get cosigns for that user and attribute. ") | ||
@Success(description = "", example = "") | ||
@BadRequest(description = "", noContent = true) | ||
public @interface GetCosignersForUserAttribute {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/com/savvato/tribeapp/dto/CosignsForUserDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.savvato.tribeapp.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
|
||
import java.util.List; | ||
|
||
@Schema(description = "All Cosigns for user DTO") | ||
@Builder | ||
public class CosignsForUserDTO { | ||
|
||
@Schema(example = "1") | ||
public long phraseId; | ||
|
||
@Schema(example = "[{\"userId\": 1, \"username\": \"testuser\"}]") | ||
public List<UsernameDTO> listOfCosigners; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.savvato.tribeapp.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public class UsernameDTO { | ||
@Schema(example = "1") | ||
public Long userId; | ||
|
||
@Schema(example = "John Doe") | ||
public String username; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 7 additions & 1 deletion
8
src/main/java/com/savvato/tribeapp/services/CosignService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
package com.savvato.tribeapp.services; | ||
|
||
import com.savvato.tribeapp.dto.CosignDTO; | ||
import com.savvato.tribeapp.dto.CosignsForUserDTO; | ||
import com.savvato.tribeapp.dto.UsernameDTO; | ||
|
||
import java.util.Optional; | ||
import java.util.List; | ||
|
||
public interface CosignService { | ||
|
||
Optional<CosignDTO> saveCosign(Long userIdIssuing, Long userIdReceiving, Long phraseId); | ||
boolean deleteCosign(Long userIdIssuing, Long userIdReceiving, Long phraseId); | ||
|
||
List<UsernameDTO> getCosignersForUserAttribute(Long userReceivingId, Long phraseId); | ||
|
||
List<CosignsForUserDTO> getAllCosignsForUser(Long userIdReceiving); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.