Examples of findProperty()


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

  public static void destroyIcalAuthToken(String calendarType, String calendarID, Identity identity) {
    if (!calendarType.equals(ICalFileCalendarManager.TYPE_USER)) {
      // find the property for the resourceable
      OLATResourceable resourceable = getResourceable(calendarType, calendarID);
      NarrowedPropertyManager npm = NarrowedPropertyManager.getInstance(resourceable);
      Property tokenProperty = npm.findProperty(identity, null,
          PROP_CAT_ICALTOKEN, PROP_NAME_ICALTOKEN);
      if (tokenProperty != null) {
        npm.deleteProperty(tokenProperty);
      }
    } else {
View Full Code Here

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

    Property tokenProperty = null;
    if (!calendarType.equals(ICalFileCalendarManager.TYPE_USER)) {
      // find the property for the resourceable
      OLATResourceable resourceable = getResourceable(calendarType, calendarID);
      NarrowedPropertyManager npm = NarrowedPropertyManager.getInstance(resourceable);
      tokenProperty = npm.findProperty(identity, null, PROP_CAT_ICALTOKEN, PROP_NAME_ICALTOKEN);
    } else {
      PropertyManager pm = PropertyManager.getInstance();
      tokenProperty = pm.findProperty(identity, null, null, PROP_CAT_ICALTOKEN, PROP_NAME_ICALTOKEN);
    }
    return tokenProperty != null;
View Full Code Here

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

        Codepoint.codepoint(CollaborationTools.class, "sync_enter");
       
        //was: synchronized (CollaborationTools.class) {
        Forum aforum;
        Long forumKey;
        Property forumKeyProperty = npm.findProperty(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_FORUM);
        if (forumKeyProperty == null) {
          // First call of forum, create new forum and save
          aforum = fom.addAForum();
          forumKey = aforum.getKey();
          if (log.isDebug()) {
View Full Code Here

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

    NarrowedPropertyManager npm = NarrowedPropertyManager.getInstance(ores);
    /*
     * delete the forum, if existing
     */
    ForumManager fom = ForumManager.getInstance();
    Property forumKeyProperty = npm.findProperty(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_FORUM);
    if (forumKeyProperty != null) {
      // if there was a forum, delete it
      Long forumKey = forumKeyProperty.getLongValue();
      if (forumKey == null) throw new AssertException("property had no longValue, prop:" + forumKeyProperty);
      fom.deleteForum(forumKey);
View Full Code Here

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

  /**
   * @return the news; if there is no news yet: return null;
   */
  public String lookupNews() {
    NarrowedPropertyManager npm = NarrowedPropertyManager.getInstance(ores);
    Property property = npm.findProperty(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_NEWS);
    if (property == null) { // no entry
      return null;
    }
    // read the text value of the existing property
    String text = property.getTextValue();
View Full Code Here

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

  /**
   * @param news
   */
  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);
View Full Code Here

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

    }
  }
 
  public Long lookupCalendarAccess() {
    NarrowedPropertyManager npm = NarrowedPropertyManager.getInstance(ores);
    Property property = npm.findProperty(null, null, PROP_CAT_BG_COLLABTOOLS, KEY_CALENDAR_ACCESS);
    if (property == null) { // no entry
      return null;
    }
    // read the long value of the existing property
    return property.getLongValue();
View Full Code Here

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

  }

 
  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);
View Full Code Here

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

  /**
   * @see org.olat.user.UserManager#setUserCharset(org.olat.core.id.Identity, java.lang.String)
   */
  public void setUserCharset(Identity identity, String charset){
      PropertyManager pm = PropertyManager.getInstance();
      Property p = pm.findProperty(identity, null, null, null, CHARSET);
     
      if(p != null){
          p.setStringValue(charset);
          pm.updateProperty(p);
    } else {
View Full Code Here

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

   */
  public String getUserCharset(Identity identity){
     String charset;
     charset = WebappHelper.getDefaultCharset();
     PropertyManager pm = PropertyManager.getInstance();
     Property p = pm.findProperty(identity, null, null, null, CHARSET);
     if(p != null){
         charset = p.getStringValue();
      // if after migration the system does not support the charset choosen by a
      // user
         // (a rather rare case)
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.