Examples of saveProperty()


Examples of org.olat.course.properties.CoursePropertyManager.saveProperty()

  }
 
  private void markTaskAsSampled(String task) {
    CoursePropertyManager cpm = courseEnv.getCoursePropertyManager();
    Property p = cpm.createCourseNodePropertyInstance(node, null, null, PROP_SAMPLED, null, null, task, null);
    cpm.saveProperty(p);
  }
 
  private void unmarkAllSampledTasks() {
    courseEnv.getCoursePropertyManager().deleteNodeProperties(node, PROP_SAMPLED);
  }
View Full Code Here

Examples of org.olat.course.properties.CoursePropertyManager.saveProperty()

    sb.append("User: ").append(identity.getName()).append("\n");
    sb.append(logText).append("\n");
    Property logProperty = cpm.findCourseNodeProperty(courseNode, assessedIdentity, null, LOG_IDENTIFYER);
    if (logProperty == null) {
      logProperty = cpm.createCourseNodePropertyInstance(courseNode, assessedIdentity, null, LOG_IDENTIFYER, null, null, null, sb.toString());
      cpm.saveProperty(logProperty);
    } else {
      String newLog = logProperty.getTextValue() + sb.toString();
      String limitedLogContent = createLimitedLogContent(newLog,60000);
      logProperty.setTextValue(limitedLogContent);
      cpm.updateProperty(logProperty);
View Full Code Here

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

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

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

      if(p != null){
          p.setStringValue(charset);
          pm.updateProperty(p);
    } else {
          Property newP = pm.createUserPropertyInstance(identity, null, CHARSET, null, null, charset, null);
          pm.saveProperty(newP);
      }
  }

  /**
   * @see org.olat.user.UserManager#getUserCharset(org.olat.core.id.Identity)
View Full Code Here

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

    PropertyManager pm = PropertyManager.getInstance();
    Property p = pm.findProperty(null, null, null, SYSTEM_PROPERTY_CATEGORY, tokenPropertyName);
    if (p == null) {
      String token = RandomStringUtils.randomAlphanumeric(8);
      p = pm.createPropertyInstance(null, null, null, SYSTEM_PROPERTY_CATEGORY, tokenPropertyName, null, null, token, null);
      pm.saveProperty(p);
    }
  }

  /**
   * @see org.olat.core.configuration.OLATModule#destroy()
View Full Code Here

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

    String propertyKey3 = "testNonTransactional-3";
    String testValue3 = "testNonTransactional-3";
    try {
      PropertyManager pm = PropertyManager.getInstance();
      Property p1 = pm.createPropertyInstance(null, null, null, null, propertyKey1, null, null, testValue1, null);
      pm.saveProperty(p1);
      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);
View Full Code Here

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

    try {
      PropertyManager pm = PropertyManager.getInstance();
      Property p1 = pm.createPropertyInstance(null, null, null, null, propertyKey1, null, null, testValue1, null);
      pm.saveProperty(p1);
      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();
View Full Code Here

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

      pm.saveProperty(p1);
      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()

        String propertyKey = "testDbPerfKey-" + loopCounter;
        DB db = DBFactory.getInstance();
        PropertyManager pm = PropertyManager.getInstance();
        String testValue = "testDbPerfValue-" + loopCounter;
        Property p = pm.createPropertyInstance(null, null, null, null, propertyKey, null, null, testValue, null);
        pm.saveProperty(p);
        // forget session cache etc.
        db.closeSession();
        pm.deleteProperty(p);
      }
      long endTime = System.currentTimeMillis();
View Full Code Here

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

        String propertyKey = "testDbPerfKey-" + loopCounter;
        DB db = DBFactory.getInstance();
        PropertyManager pm = PropertyManager.getInstance();
        String testValue = "testDbPerfValue-" + loopCounter;
        Property p = pm.createPropertyInstance(null, null, null, null, propertyKey, null, null, testValue, null);
        pm.saveProperty(p);
        // forget session cache etc.
        db.closeSession();
        db = DBFactory.getInstance();
        pm.deleteProperty(p);
      }
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.