Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
Expand All @@ -14,7 +16,9 @@


@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@XmlRootElement
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlElement;
Expand All @@ -16,7 +18,9 @@
* Model for user directory settings in REST requests.
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@XmlRootElement
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
package com.deftdevs.bootstrapi.commons.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.EqualsExclude;
import org.apache.commons.lang3.builder.HashCodeExclude;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@XmlRootElement
public abstract class AbstractMailServerProtocolModel {

public static final Long DEFAULT_TIMEOUT = 10000L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.deftdevs.bootstrapi.commons.model;

import com.deftdevs.bootstrapi.commons.constants.BootstrAPI;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Builder;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
Expand All @@ -14,7 +16,9 @@
* Model for an application link in REST requests.
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@XmlRootElement(name = BootstrAPI.APPLICATION_LINK)
public class ApplicationLinkModel {

Expand Down Expand Up @@ -72,18 +76,15 @@ public enum ApplicationLinkStatus {

// Example instances for documentation and tests

public static final ApplicationLinkModel EXAMPLE_1;

static {
EXAMPLE_1 = new ApplicationLinkModel();
EXAMPLE_1.setUuid(UUID.randomUUID());
EXAMPLE_1.setName("Example");
EXAMPLE_1.setDisplayUrl(URI.create("http://example.com"));
EXAMPLE_1.setRpcUrl(URI.create("http://rpc.example.com"));
EXAMPLE_1.setOutgoingAuthType(ApplicationLinkAuthType.OAUTH);
EXAMPLE_1.setIncomingAuthType(ApplicationLinkAuthType.OAUTH);
EXAMPLE_1.setPrimary(true);
EXAMPLE_1.setType(ApplicationLinkType.JIRA);
}
public static final ApplicationLinkModel EXAMPLE_1 = ApplicationLinkModel.builder()
.uuid(UUID.randomUUID())
.name("Example")
.displayUrl(URI.create("http://example.com"))
.rpcUrl(URI.create("http://rpc.example.com"))
.outgoingAuthType(ApplicationLinkAuthType.OAUTH)
.incomingAuthType(ApplicationLinkAuthType.OAUTH)
.primary(true)
.type(ApplicationLinkType.JIRA)
.build();

}
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
package com.deftdevs.bootstrapi.commons.model;

import com.deftdevs.bootstrapi.commons.constants.BootstrAPI;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Collections;
import java.util.List;

@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@XmlRootElement(name = BootstrAPI.AUTHENTICATION + "-" + BootstrAPI.AUTHENTICATION_IDP + "-" + BootstrAPI.AUTHENTICATION_IDP_OIDC)
public class AuthenticationIdpOidcModel extends AbstractAuthenticationIdpModel {
Expand Down Expand Up @@ -44,24 +48,21 @@ public class AuthenticationIdpOidcModel extends AbstractAuthenticationIdpModel {

// Example instances for documentation and tests

public static final AuthenticationIdpOidcModel EXAMPLE_1;

static {
EXAMPLE_1 = new AuthenticationIdpOidcModel();
EXAMPLE_1.setId(1L);
EXAMPLE_1.setName("OIDC");
EXAMPLE_1.setEnabled(true);
EXAMPLE_1.setUrl("https://oidc.example.com");
EXAMPLE_1.setEnableRememberMe(true);
EXAMPLE_1.setButtonText("Login with OIDC");
EXAMPLE_1.setClientId("oidc");
EXAMPLE_1.setClientSecret("s3cr3t");
EXAMPLE_1.setUsernameClaim("userName");
EXAMPLE_1.setAdditionalScopes(Collections.emptyList());
EXAMPLE_1.setDiscoveryEnabled(false);
EXAMPLE_1.setAuthorizationEndpoint("https://oidc.example.com/authorization");
EXAMPLE_1.setTokenEndpoint("https://oidc.example.com/token");
EXAMPLE_1.setUserInfoEndpoint("https://oidc.example.com/userinfo");
}
public static final AuthenticationIdpOidcModel EXAMPLE_1 = AuthenticationIdpOidcModel.builder()
.id(1L)
.name("OIDC")
.enabled(true)
.url("https://oidc.example.com")
.enableRememberMe(true)
.buttonText("Login with OIDC")
.clientId("oidc")
.clientSecret("s3cr3t")
.usernameClaim("userName")
.additionalScopes(Collections.emptyList())
.discoveryEnabled(false)
.authorizationEndpoint("https://oidc.example.com/authorization")
.tokenEndpoint("https://oidc.example.com/token")
.userInfoEndpoint("https://oidc.example.com/userinfo")
.build();

}
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
package com.deftdevs.bootstrapi.commons.model;

import com.deftdevs.bootstrapi.commons.constants.BootstrAPI;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@XmlRootElement(name = BootstrAPI.AUTHENTICATION + "-" + BootstrAPI.AUTHENTICATION_IDP + "-" + BootstrAPI.AUTHENTICATION_IDP_SAML)
public class AuthenticationIdpSamlModel extends AbstractAuthenticationIdpModel {
Expand All @@ -24,18 +28,15 @@ public class AuthenticationIdpSamlModel extends AbstractAuthenticationIdpModel {

// Example instances for documentation and tests

public static final AuthenticationIdpSamlModel EXAMPLE_1;

static {
EXAMPLE_1 = new AuthenticationIdpSamlModel();
EXAMPLE_1.setId(1L);
EXAMPLE_1.setName("SAML");
EXAMPLE_1.setEnabled(true);
EXAMPLE_1.setUrl("https://saml.example.com");
EXAMPLE_1.setEnableRememberMe(true);
EXAMPLE_1.setButtonText("Login with SAML");
EXAMPLE_1.setCertificate("certificate");
EXAMPLE_1.setUsernameAttribute("username");
}
public static final AuthenticationIdpSamlModel EXAMPLE_1 = AuthenticationIdpSamlModel.builder()
.id(1L)
.name("SAML")
.enabled(true)
.url("https://saml.example.com")
.enableRememberMe(true)
.buttonText("Login with SAML")
.certificate("certificate")
.usernameAttribute("username")
.build();

}
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
package com.deftdevs.bootstrapi.commons.model;

import com.deftdevs.bootstrapi.commons.constants.BootstrAPI;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@XmlRootElement(name = BootstrAPI.AUTHENTICATION + "-" + BootstrAPI.AUTHENTICATION_SSO)
public class AuthenticationSsoModel {

Expand All @@ -23,13 +27,10 @@ public class AuthenticationSsoModel {

// Example instances for documentation and tests

public static final AuthenticationSsoModel EXAMPLE_1;

static {
EXAMPLE_1 = new AuthenticationSsoModel();
EXAMPLE_1.setShowOnLogin(true);
EXAMPLE_1.setShowOnLoginForJsm(true);
EXAMPLE_1.setEnableAuthenticationFallback(true);
}
public static final AuthenticationSsoModel EXAMPLE_1 = AuthenticationSsoModel.builder()
.showOnLogin(true)
.showOnLoginForJsm(true)
.enableAuthenticationFallback(true)
.build();

}
Loading
Loading