Enum SandboxApp
- java.lang.Object
-
- java.lang.Enum<SandboxApp>
-
- de.adorsys.opba.protocol.xs2a.testsandbox.internal.SandboxApp
-
- All Implemented Interfaces:
Serializable,Comparable<SandboxApp>
public enum SandboxApp extends Enum<SandboxApp>
This class launches spring-fat jar in its own class loader (we assumerunnable(StarterContext)is called in own thread). This way all services are launched in same JVM and we can easily manipulate their state. Shared context (except system classes!) is not a problem, because it is shaded by Spring - each application has its own class loader and context. Each application will receive spring profile based on its lowercase name. I.e. LEDGERS_GATEWAY assumes to have sandbox/application-test-ledgers-gateway.yml as well as common sandbox/application-test-common.yml property files on resources path. You can specify database type using System property / Environment variable (in order of precedence) `DB_TYPE`: 1. DB_TYPE = LOCAL_POSTGRES - will connect to local postgres db on port 5432 2. (DEFAULT) DB_TYPE = TEST_CONTAINERS_POSTGRES - will start Postgres using TestContainers and use port 15432 for it (you need to prepare schema and users - see prepare-postgres.sql) Startup order is roughly adherent to: https://github.com/adorsys/XS2A-Sandbox/blob/master/docker-compose.yml
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASPSP_PROFILECERT_GENERATORCONSENT_MGMTLEDGERS_APPLEDGERS_GATEWAYONLINE_BANKINGONLINE_BANKING_UITPP_REST
-
Field Summary
Fields Modifier and Type Field Description static StringDB_TYPEstatic StringSANDBOX_LOG_LEVELstatic StringTEST_CONTAINERS_POSTGRES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanallReadyToUse(StarterContext ctx)static longcountReadyToUse(StarterContext ctx)Set<String>extraProfiles()booleanisReadyToUse(StarterContext ctx)Runnablerunnable(StarterContext ctx)static SandboxAppvalueOf(String name)Returns the enum constant of this type with the specified name.static SandboxApp[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ONLINE_BANKING_UI
public static final SandboxApp ONLINE_BANKING_UI
-
LEDGERS_APP
public static final SandboxApp LEDGERS_APP
-
LEDGERS_GATEWAY
public static final SandboxApp LEDGERS_GATEWAY
-
ASPSP_PROFILE
public static final SandboxApp ASPSP_PROFILE
-
CONSENT_MGMT
public static final SandboxApp CONSENT_MGMT
-
ONLINE_BANKING
public static final SandboxApp ONLINE_BANKING
-
TPP_REST
public static final SandboxApp TPP_REST
-
CERT_GENERATOR
public static final SandboxApp CERT_GENERATOR
-
-
Field Detail
-
SANDBOX_LOG_LEVEL
public static final String SANDBOX_LOG_LEVEL
- See Also:
- Constant Field Values
-
DB_TYPE
public static final String DB_TYPE
- See Also:
- Constant Field Values
-
TEST_CONTAINERS_POSTGRES
public static final String TEST_CONTAINERS_POSTGRES
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static SandboxApp[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SandboxApp c : SandboxApp.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SandboxApp valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
runnable
public Runnable runnable(StarterContext ctx)
-
isReadyToUse
public boolean isReadyToUse(StarterContext ctx)
-
allReadyToUse
public static boolean allReadyToUse(StarterContext ctx)
-
countReadyToUse
public static long countReadyToUse(StarterContext ctx)
-
-