Examples of saveProperty()


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

      // inside of transaction
      Property p2 = pm.createPropertyInstance(null, null, null, null, propertyKey2, null, null, testValue2, null);
      pm.saveProperty(p2);
      // name is null => generated DB error => rollback
      Property p3 = pm.createPropertyInstance(null, null, null, null, null, null, null, testValue3, null);
      pm.saveProperty(p3);
      fail("Should generate error for rollback.");
      db.closeSession();
    } catch (Exception ex) {
      db.closeSession();
    }
View Full Code Here

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

      // no persistent lock acquired yet
      // save a property: cat = o_lock, key = derivedLockString, Longvalue = key
      // of identity acquiring the lock
      Property newp = pm.createPropertyInstance(null, null, null, CATEGORY_PERSISTENTLOCK, derivedLockString, null, ident.getKey(), null,
          null);
      pm.saveProperty(newp);
      aqTime = System.currentTimeMillis();
      lockOwner = ident;
      success = true;
    } else {
      // already acquired, but check on reaquiring
View Full Code Here

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

     */
    PropertyManager pm = PropertyManager.getInstance();
    Property p = pm.findProperty(null, null, null, "_o3_", "InfoMsg");
    if (p == null) {
      p =  pm.createPropertyInstance(null,  null,  null,  "_o3_", "InfoMsg", null, null, null, InfoMessageManager.EMPTY_MESSAGE);
      pm.saveProperty(p);
    }
    /*
     * ensure that the GlobalStickyMessage is initialized and registered to listen
     * -> OLAT-4168
     */
 
View Full Code Here

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

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

      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

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

      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

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

  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

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

    }
    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

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

   * @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

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

   
     // 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
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.