Ejemplo 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;
 }
Ejemplo n.º 2
0
 @Override
 public Map<String, String> getEnvironmentProperties(CallingContext context) {
   EnvironmentInfo info = getEnvInfo(context);
   return info.getProperties();
 }
Ejemplo n.º 3
0
 @Override
 public void setEnvironmentProperties(CallingContext context, Map<String, String> properties) {
   EnvironmentInfo info = getEnvInfo(context);
   info.getProperties().putAll(properties);
   putEnvInfo(context, info);
 }