Examples of saveProperty()


Examples of org.apache.roller.business.PropertiesManager.saveProperty()

        prop = mgr.getProperty("site.name");
        assertNotNull(prop);
       
        // update a property
        prop.setValue("testtest");
        mgr.saveProperty(prop);
        TestUtils.endSession(true);
       
        // make sure property was updated
        prop = null;
        prop = mgr.getProperty("site.name");
View Full Code Here

Examples of org.apache.roller.model.PropertiesManager.saveProperty()

            // add "spamtest" to refererSpamWords
            PropertiesManager pmgr = RollerFactory.getRoller().getPropertiesManager();
            RollerPropertyData spamprop = pmgr.getProperty("spam.blacklist");
            this.origSpamWords = spamprop.getValue();
            spamprop.setValue(spamprop.getValue() + ", spamtest");
            pmgr.saveProperty(spamprop);
           
            // add a number of referers to play with
            RefererManager rmgr = RollerFactory.getRoller().getRefererManager();
            Calendar lCalendar = Calendar.getInstance();
            lCalendar.setTime(new Date());
View Full Code Here

Examples of org.apache.roller.planet.business.PropertiesManager.saveProperty()

        prop = mgr.getProperty("site.name");
        assertNotNull(prop);
       
        // update a property
        prop.setValue("testtest");
        mgr.saveProperty(prop);
        TestUtils.endSession(true);
       
        // make sure property was updated
        prop = null;
        prop = mgr.getProperty("site.name");
View Full Code Here

Examples of org.apache.roller.weblogger.business.PropertiesManager.saveProperty()

            // add "spamtest" to refererSpamWords
            PropertiesManager pmgr = WebloggerFactory.getWeblogger().getPropertiesManager();
            RuntimeConfigProperty spamprop = pmgr.getProperty("spam.blacklist");
            this.origSpamWords = spamprop.getValue();
            spamprop.setValue(spamprop.getValue() + ", spamtest");
            pmgr.saveProperty(spamprop);
           
            // add a number of referers to play with
            RefererManager rmgr = WebloggerFactory.getWeblogger().getRefererManager();
            Calendar lCalendar = Calendar.getInstance();
            lCalendar.setTime(new Date());
View Full Code Here

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

        if (forumKeyProperty == null) {
          // First call of forum, create new forum and save forum key as property         
          forum = fom.addAForum();
          forumKey = forum.getKey();
          forumKeyProperty = cpm.createCourseNodePropertyInstance(thisCourseNode, null, null, FORUM_KEY, null, forumKey, null, null);
          cpm.saveProperty(forumKeyProperty)
          //System.out.println("Forum added");
        } else {
          // Forum does already exist, load forum with key from properties
          forumKey = forumKeyProperty.getLongValue();
          forum = fom.loadForum(forumKey);
View Full Code Here

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

    Property statusProperty;

    statusProperty = cpm.findCourseNodeProperty(node, identity, null, PROPERTY_KEY_STATUS);
    if (statusProperty == null) {
      statusProperty = cpm.createCourseNodePropertyInstance(node, identity, null, PROPERTY_KEY_STATUS, null, null,selectedKey, null);
      cpm.saveProperty(statusProperty);
    } else {
      statusProperty.setStringValue(selectedKey);
      cpm.updateProperty(statusProperty);
    }   
  }
View Full Code Here

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

      public void execute() {
        Property attemptsProperty = cpm.findCourseNodeProperty(courseNode, assessedIdentity, null, ATTEMPTS);
        if (attemptsProperty == null) {
          attemptsProperty = cpm.createCourseNodePropertyInstance(courseNode, assessedIdentity, null, ATTEMPTS,
              null, new Long(attempts.intValue()), null, null);
          cpm.saveProperty(attemptsProperty);
        } else {
          attemptsProperty.setLongValue(new Long(attempts.intValue()));
          cpm.updateProperty(attemptsProperty);
        }
        // add to cache
View Full Code Here

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

    CoordinatorManager.getCoordinator().getSyncer().doInSync(createOLATResourceableForLocking(assessedIdentity), new SyncerExecutor(){
      public void execute() {
        Property commentProperty = cpm.findCourseNodeProperty(courseNode, assessedIdentity, null, COMMENT);
        if (commentProperty == null) {
          commentProperty = cpm.createCourseNodePropertyInstance(courseNode, assessedIdentity, null, COMMENT, null, null, null, comment);
          cpm.saveProperty(commentProperty);
        } else {
          commentProperty.setTextValue(comment);
          cpm.updateProperty(commentProperty);
        }
        // add to cache
View Full Code Here

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

    CoordinatorManager.getCoordinator().getSyncer().doInSync(createOLATResourceableForLocking(assessedIdentity), new SyncerExecutor(){
      public void execute() {
        Property commentProperty = cpm.findCourseNodeProperty(courseNode, assessedIdentity, null, COACH_COMMENT);
        if (commentProperty == null) {
          commentProperty = cpm.createCourseNodePropertyInstance(courseNode, assessedIdentity, null, COACH_COMMENT, null, null, null, comment);
          cpm.saveProperty(commentProperty);
        } else {
          commentProperty.setTextValue(comment);
          cpm.updateProperty(commentProperty);
        }
        // add to cache
View Full Code Here

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

  }

  private void setAssignedTask(Identity identity, String task) {
    CoursePropertyManager cpm = courseEnv.getCoursePropertyManager();
    Property p = cpm.createCourseNodePropertyInstance(node, identity, null, PROP_ASSIGNED, null, null, task, null);
    cpm.saveProperty(p);
  }
 
  private void markTaskAsSampled(String task) {
    CoursePropertyManager cpm = courseEnv.getCoursePropertyManager();
    Property p = cpm.createCourseNodePropertyInstance(node, null, null, PROP_SAMPLED, null, null, task, null);
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.