@ComponentSpecification public interface EnvironmentDetector
Development
, Test
,
Acceptance
, and the Production
. However,
also other more fine-grained environment setups are supported. system properties
, etc. The
default implementation is using spring profiles so you have to replace it if you choose a different setup.Modifier and Type | Field and Description |
---|---|
static String |
ENVIRONMENT_TYPE_ACCEPTANCE
The
environment type for the acceptance environment. |
static String |
ENVIRONMENT_TYPE_DEVELOPMENT
The
environment type for the development environment. |
static String |
ENVIRONMENT_TYPE_PRE_PRODUCTION
The
environment type for the pre-production environment. |
static String |
ENVIRONMENT_TYPE_PRODUCTION
The
environment type for the production environment. |
static String |
ENVIRONMENT_TYPE_STAGING
The
environment type for the staging environment. |
static String |
ENVIRONMENT_TYPE_TEST
The
environment type for the test environment. |
Modifier and Type | Method and Description |
---|---|
String |
getEnvironmentType() |
boolean |
isDevelopmentEnvironment() |
boolean |
isEnvironmentCloseToProduction() |
boolean |
isProductionEnvironment() |
static final String ENVIRONMENT_TYPE_DEVELOPMENT
environment type
for the development environment.isDevelopmentEnvironment()
,
Constant Field Valuesstatic final String ENVIRONMENT_TYPE_TEST
environment type
for the test environment.static final String ENVIRONMENT_TYPE_ACCEPTANCE
environment type
for the acceptance environment.static final String ENVIRONMENT_TYPE_PRODUCTION
environment type
for the production environment.isProductionEnvironment()
,
Constant Field Valuesstatic final String ENVIRONMENT_TYPE_STAGING
environment type
for the staging environment.static final String ENVIRONMENT_TYPE_PRE_PRODUCTION
environment type
for the pre-production environment.String getEnvironmentType()
ENVIRONMENT_TYPE_DEVELOPMENT
, ENVIRONMENT_TYPE_TEST
,
ENVIRONMENT_TYPE_ACCEPTANCE
, ENVIRONMENT_TYPE_PRODUCTION
, or any other custom kind of
environment.boolean isDevelopmentEnvironment()
getEnvironmentType()
.equals(
ENVIRONMENT_TYPE_DEVELOPMENT
)
.boolean isProductionEnvironment()
getEnvironmentType()
.equals(
ENVIRONMENT_TYPE_PRODUCTION
)
.boolean isEnvironmentCloseToProduction()
true
if the environment type
is ENVIRONMENT_TYPE_PRODUCTION
or close to production such as ENVIRONMENT_TYPE_PRE_PRODUCTION
,
ENVIRONMENT_TYPE_ACCEPTANCE
, or ENVIRONMENT_TYPE_STAGING
.Copyright © 2001–2016 mmm-Team. All rights reserved.