All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.camunda.application.Profile Maven / Gradle / Ivy

There is a newer version: 8.7.0-alpha1
Show newest version
/*
 * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under
 * one or more contributor license agreements. See the NOTICE file distributed
 * with this work for additional information regarding copyright ownership.
 * Licensed under the Camunda License 1.0. You may not use this file
 * except in compliance with the Camunda License 1.0.
 */
package io.camunda.application;

import java.util.Set;

/**
 * A fixed set of Spring profiles. Some are application specific (broker, gateway), and others
 * environment specific (dev, test ,prod). Here to avoid littering the code base with different hard
 * coded strings, leading to potential errors.
 */
public enum Profile {
  // application specific profiles
  BROKER("broker"),
  GATEWAY("gateway"),
  RESTORE("restore"),
  OPERATE("operate"),
  TASKLIST("tasklist"),
  IDENTITY("identity"),

  // environment profiles
  TEST("test"),
  DEVELOPMENT("dev"),
  PRODUCTION("prod"),

  // authentication profiles
  AUTH_BASIC("auth-basic"),
  IDENTITY_AUTH("identity-auth"),
  SSO_AUTH("sso-auth"),
  DEFAULT_AUTH_PROFILE("auth"),
  LDAP_AUTH_PROFILE("ldap-auth"),

  // indicating legacy standalone application
  STANDALONE("standalone");

  private final String id;

  Profile(final String id) {
    this.id = id;
  }

  public String getId() {
    return id;
  }

  public static Set getAuthProfiles() {
    return Set.of(AUTH_BASIC, DEFAULT_AUTH_PROFILE, IDENTITY_AUTH, LDAP_AUTH_PROFILE, SSO_AUTH);
  }

  public static Set getWebappProfiles() {
    return Set.of(TASKLIST, IDENTITY, OPERATE);
  }

  @Override
  public String toString() {
    return "Profiles{ordinal='" + ordinal() + "', name='" + name() + "', id='" + id + '\'' + "}";
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy