Package org.olat.properties

Examples of org.olat.properties.PropertyManager.saveProperty()


      }
      if (assessmentNodes != null) {       
        if (efficiencyProperty == null) {
          // create new
          efficiencyProperty = pm.createUserPropertyInstance(identity, PROPERTY_CATEGORY, courseRepoEntryKey, null, null, null,  efficiencyStatementX);
          pm.saveProperty(efficiencyProperty);
          if (logDebug) log.debug("creating new efficiency statement property::" + efficiencyProperty.getKey() + " for id::"
                  + identity.getName() + " repoEntry::" + courseRepoEntryKey);
        } else {
          // update existing
          if (logDebug) log.debug("updatting efficiency statement property::" + efficiencyProperty.getKey() + " for id::"
View Full Code Here


      public void execute() {
        PropertyManager pm = PropertyManager.getInstance();
        Property p = pm.findProperty(null, null, null, "_o3_", INFO_MSG);
        if (p == null) {
          p =  pm.createPropertyInstance(null,  null,  null,  "_o3_", INFO_MSG, null, null, null, "");
          pm.saveProperty(p);
        }
        p.setTextValue(message);
        //set Message in RAM
        InfoMessageManager.infoMessage = message;
        pm.updateProperty(p);
View Full Code Here

      public Property execute() {
      PropertyManager pm = PropertyManager.getInstance();
      Property p = pm.findProperty(null, null, null, "_o3_", key);
      if (p == null) {
        p =  pm.createPropertyInstance(null,  null,  null,  "_o3_", key, null, null, null, "");
        pm.saveProperty(p);
      }
      return p;
      }
     
    });//end syncerCallback
View Full Code Here

  public void setInfoMessageNodeOnly(String message) {
    PropertyManager pm = PropertyManager.getInstance();
    Property p = pm.findProperty(null, null, null, "_o3_", INFO_MSG_NODE_ONLY+nodeId);
    if (p == null) {
      p =  pm.createPropertyInstance(null,  null,  null,  "_o3_", INFO_MSG_NODE_ONLY+nodeId, null, null, null, "");
      pm.saveProperty(p);
    }
    p.setTextValue(message);
    //set Message in RAM
    InfoMessageManager.infoMessageNodeOnly = message;
    pm.updateProperty(p);
View Full Code Here

    }
    PropertyManager pm = PropertyManager.getInstance();
    Property p = pm.findProperty(null, null, quotaResource, QUOTA_CATEGORY, quota.getPath());
    if (p == null) { // create new entry
      p = pm.createPropertyInstance(null, null, quotaResource, QUOTA_CATEGORY, quota.getPath(), null, null, assembleQuota(quota), null);
      pm.saveProperty(p);
    } else {
      p.setStringValue(assembleQuota(quota));
      pm.updateProperty(p);
    }
    // if the quota is a default quota, rebuild the default quota list
View Full Code Here

   * @param re
   */
  private void markAsDeployed(String courseExportPath, RepositoryEntry re) {
    PropertyManager pm = PropertyManager.getInstance();
    Property prop = pm.createPropertyInstance(null, null, null, "_o3_", "deployedCourses", null, re.getKey(), courseExportPath, null);
    pm.saveProperty(prop);
    deplyedCoursePaths.put(courseExportPath, re);
  }

  /**
   * Get the Map of deployed courses. Map contains repo entries by path keys.
View Full Code Here

   
     // save token as a property of resourceable
    PropertyManager pm = PropertyManager.getInstance();
    Property tokenProperty = pm.createPropertyInstance(identity, null,
        null, PROP_CAT_ICALTOKEN, PROP_NAME_ICALTOKEN, null, null, token, null );
    pm.saveProperty(tokenProperty);
   
    //return the generated token
    return token;
  }
 
View Full Code Here

        PropertyManager pm = PropertyManager.getInstance();
        Property p = pm.findProperty(curIdent, null, null, null, LATEST_EMAIL_USER_PROP);
        if(p == null) {
          p = pm.createUserPropertyInstance(curIdent, null, LATEST_EMAIL_USER_PROP, null, null, null, null);
          p.setLongValue(new Date().getTime());
          pm.saveProperty(p);
        } else {
          p.setLongValue(new Date().getTime());
          pm.updateProperty(p);
        }
View Full Code Here

        Property property = (Property) it.next();
        if (property.getStringValue().equals(String.valueOf(version))) {
          // yes, the version is already set... overwrite this property then
          log_.info("setLoggingVersion: overwriting existing version property for version="+version+" from starttime "+property.getLongValue()+" to "+startingTimeMillis);
          property.setLongValue(startingTimeMillis);
          pm.saveProperty(property);
          return;
        }
      }
    }
   
View Full Code Here

      }
    }
   
    log_.info("setLoggingVersion: setting version property for version="+version+" to "+startingTimeMillis);
    Property newp = pm.createPropertyInstance(null, null, null, LOGGING_PROPERTIES_CATEGORY, LOGGING_VERSION_PROPERTY_NAME, null, startingTimeMillis, String.valueOf(version), null);
    pm.saveProperty(newp);
   
  }
 
  @Override
  public long getStartingTimeForVersion(int version) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.