-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change REST method to fetch plugin information
- Loading branch information
Showing
4 changed files
with
69 additions
and
68 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
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 |
---|---|---|
|
@@ -13,18 +13,21 @@ | |
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
|
||
/** | ||
* @author Gabriel Barros <[email protected]> | ||
*/ | ||
public class CertificateInfo implements Serializable { | ||
@Serial | ||
private static final long serialVersionUID = 5755199988566186742L; | ||
|
||
public enum CertificateStatus { | ||
INTERNAL, VERIFIED, NOT_VERIFIED | ||
} | ||
|
||
private CertificateStatus certificateStatus = CertificateStatus.INTERNAL; | ||
private Set<Certificate> certificates = new HashSet<>(); | ||
private boolean notVerified = false; | ||
|
||
public CertificateStatus getCertificateStatus() { | ||
return certificateStatus; | ||
|
@@ -42,6 +45,7 @@ public void setCertificates(Set<Certificate> certificates) { | |
this.certificates = certificates; | ||
} | ||
|
||
@JsonIgnore | ||
public void addCertificates(String issuer, String subject, Date notBefore, Date notAfter) { | ||
Certificate certificate = new Certificate(); | ||
certificate.setIssuerDN(issuer); | ||
|
@@ -51,12 +55,8 @@ public void addCertificates(String issuer, String subject, Date notBefore, Date | |
this.certificates.add(certificate); | ||
} | ||
|
||
public boolean isNotVerified(){ | ||
@JsonIgnore | ||
public boolean isNotVerified() { | ||
return getCertificateStatus().equals(CertificateStatus.NOT_VERIFIED); | ||
} | ||
|
||
public void setNotVerified(boolean notVerified) { | ||
this.notVerified = notVerified; | ||
} | ||
|
||
} |
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