Search in sources :

Example 1 with ServerInfo

use of com.redhat.cloud.notifications.routers.internal.models.ServerInfo in project notifications-backend by RedHatInsights.

the class InternalResource method getServerInfo.

@GET
@Path("/serverInfo")
@Produces(APPLICATION_JSON)
@RolesAllowed(ConsoleIdentityProvider.RBAC_INTERNAL_USER)
public ServerInfo getServerInfo() {
    ServerInfo info = new ServerInfo();
    String environmentName = System.getenv("ENV_NAME");
    info.environment = ServerInfo.Environment.valueOf(environmentName == null ? "LOCAL_SERVER" : environmentName.toUpperCase());
    return info;
}
Also used : ServerInfo(com.redhat.cloud.notifications.routers.internal.models.ServerInfo) Path(javax.ws.rs.Path) RolesAllowed(javax.annotation.security.RolesAllowed) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Aggregations

ServerInfo (com.redhat.cloud.notifications.routers.internal.models.ServerInfo)1 RolesAllowed (javax.annotation.security.RolesAllowed)1 GET (javax.ws.rs.GET)1 Path (javax.ws.rs.Path)1 Produces (javax.ws.rs.Produces)1