Package org.olat.properties

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


          if (log.isDebug()) {
            log.debug("created new forum in collab tools: foid::" + forumKey.longValue() + " for ores::"
                + ores.getResourceableTypeName() + "/" + ores.getResourceableId());
          }
          forumKeyProperty = npm.createPropertyInstance(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_FORUM, null, forumKey, null, null);
          npm.saveProperty(forumKeyProperty);
        } else {
          // Forum does already exist, load forum with key from properties
          forumKey = forumKeyProperty.getLongValue();
          aforum = fom.loadForum(forumKey);
          if (aforum == null) { throw new AssertException("Unable to load forum with key " + forumKey.longValue() + " for ores "
View Full Code Here

  public void saveNews(String news) {
    NarrowedPropertyManager npm = NarrowedPropertyManager.getInstance(ores);
    Property property = npm.findProperty(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_NEWS);
    if (property == null) { // create a new one
      Property nP = npm.createPropertyInstance(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_NEWS, null, null, null, news);
      npm.saveProperty(nP);
    } else { // modify the existing one
      property.setTextValue(news);
      npm.updateProperty(property);
    }
  }
View Full Code Here

  public void saveCalendarAccess(Long calendarAccess) {
    NarrowedPropertyManager npm = NarrowedPropertyManager.getInstance(ores);
    Property property = npm.findProperty(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_CALENDAR_ACCESS);
    if (property == null) { // create a new one
      Property nP = npm.createPropertyInstance(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_CALENDAR_ACCESS, null, calendarAccess, null, null);
      npm.saveProperty(nP);
    } else { // modify the existing one
      property.setLongValue(calendarAccess);
      npm.updateProperty(property);
    }
  }
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.