Esempio n. 1
0
 private EnvironmentInfo getEnvInfo(CallingContext context) {
   EnvironmentInfo info = EnvironmentInfoStorage.readByFields();
   if (info == null) {
     info = new EnvironmentInfo();
     info.setMotd("Welcome to Rapture");
     info.setName("Rapture");
     info.getProperties().put("BANNER_COLOR", "blue");
   }
   return info;
 }
Esempio n. 2
0
 @Override
 public Map<String, String> getEnvironmentProperties(CallingContext context) {
   EnvironmentInfo info = getEnvInfo(context);
   return info.getProperties();
 }
Esempio n. 3
0
 @Override
 public String getEnvironmentName(CallingContext context) {
   EnvironmentInfo info = getEnvInfo(context);
   return info.getName();
 }
Esempio n. 4
0
 @Override
 public void setEnvironmentProperties(CallingContext context, Map<String, String> properties) {
   EnvironmentInfo info = getEnvInfo(context);
   info.getProperties().putAll(properties);
   putEnvInfo(context, info);
 }
Esempio n. 5
0
 @Override
 public void setEnvironmentName(CallingContext context, String name) {
   EnvironmentInfo info = getEnvInfo(context);
   info.setName(name);
   putEnvInfo(context, info);
 }
Esempio n. 6
0
 @Override
 public void setMOTD(CallingContext context, String message) {
   EnvironmentInfo info = getEnvInfo(context);
   info.setMotd(message);
   putEnvInfo(context, info);
 }