/** The main method that fetches the Value-objects for this use-case */
  public String doDeleteProperty() throws Exception {
    validateSecurityCode();

    Map args = new HashMap();
    args.put("globalKey", "infoglue");
    PropertySet ps = PropertySetManager.getInstance("jdbc", args);

    ps.remove("serverNode_" + this.getServerNodeId() + "_" + key);

    try {
      CacheController.clearServerNodeProperty(true);
      InfoGlueAuthenticationFilter.initializeCMSProperties();
    } catch (SystemException e) {
      e.printStackTrace();
    }

    NotificationMessage notificationMessage =
        new NotificationMessage(
            "ViewServerNodePropertiesAction.doSave():",
            "ServerNodeProperties",
            this.getInfoGluePrincipal().getName(),
            NotificationMessage.SYSTEM,
            "0",
            "ServerNodeProperties");
    // ChangeNotificationController.getInstance().addNotificationMessage(notificationMessage);
    RemoteCacheUpdater.getSystemNotificationMessages().add(notificationMessage);

    return "save";
  }
Пример #2
0
 public void remove(String key) throws AtlassianCoreException {
   if (propertySet == null) {
     throw new AtlassianCoreException(ANONYMOUS_USER);
   }
   if (!propertySet.exists(key)) {
     throw new AtlassianCoreException("The property with key '" + key + "' does not exist.");
   }
   propertySet.remove(key);
 }
  public static void setExtensionPropertiesMap(Map<String, String> propertiesMap) {
    PropertySet ps = getPS();
    Set<String> inputSet = propertiesMap.keySet();

    // remove keys
    Set<String> dBSet = getExtensionPropertiesMap().keySet();
    for (String inputDB : dBSet) {
      if (!inputSet.contains(inputDB)) ps.remove(inputDB);
    }

    for (String key : propertiesMap.keySet()) {
      ps.setString(key, propertiesMap.get(key));
    }
  }
 public void remove(String s) throws PropertyException {
   ps.remove(s);
 }