Package org.olat.properties

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


        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();
      timeWithoutTransction = endTime - startTime;
      Tracing.logInfo("testDbPerf without transaction takes :" + timeWithoutTransction + "ms", this.getClass());
    } catch (Exception ex) {
View Full Code Here


        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);
      }
      long endTime = System.currentTimeMillis();
      long timeWithTransction = endTime - startTime;
      Tracing.logInfo("testDbPerf with transaction takes :" + timeWithTransction + "ms", this.getClass());
      Tracing.logInfo("testDbPerf diff between transaction and without transaction :" + (timeWithTransction - timeWithoutTransction) + "ms", this.getClass());
View Full Code Here

   * @param courseNodeId
   */
  public void deleteProperty(Long courseId, String courseNodeId) {
    Property prop = findProperty(courseId, courseNodeId);
    PropertyManager propMrg = PropertyManager.getInstance();
    if (prop != null) propMrg.deleteProperty(prop);
  }
 
}
View Full Code Here

    if (p == null) throw new AssertException("could not release lock: no lock in db, " + derivedLockString);
    Identity ident = le.getOwner();
    Long ownerKey = p.getLongValue();
    if (!ownerKey.equals(ident.getKey())) throw new AssertException("user " + ident.getName()
        + " cannot release lock belonging to user with key " + ownerKey + " on resourcestring " + derivedLockString);
    pm.deleteProperty(p);
  }

  /**
   * Delete all persisting-locks for certain identity.
   * @see org.olat.user.UserDataDeletable#deleteUserData(org.olat.core.id.Identity)
View Full Code Here

      } else {
        if (efficiencyProperty != null) {
          // remove existing since now empty empty efficiency statements
          if (logDebug) log.debug("removing efficiency statement property::" + efficiencyProperty.getKey() + " for id::"
                  + identity.getName() + " repoEntry::" + courseRepoEntryKey + " since empty");
          pm.deleteProperty(efficiencyProperty);
        }
        // else nothing to create and nothing to delete
      }         
     
      // send modified event to everybody
View Full Code Here

    if (quota.getPath().startsWith(QuotaConstants.IDENTIFIER_DEFAULT)) {
      return false;
    }
    PropertyManager pm = PropertyManager.getInstance();
    Property p = pm.findProperty(null, null, quotaResource, QUOTA_CATEGORY, quota.getPath());
    if (p != null) pm.deleteProperty(p);
    return true;
  }

  /**
   * Get a list of all objects which have an individual quota.
View Full Code Here

    } else {
      PropertyManager pm = PropertyManager.getInstance();
      Property tokenProperty = pm.findProperty(identity, null, null,
          PROP_CAT_ICALTOKEN, PROP_NAME_ICALTOKEN);
      if (tokenProperty != null) {
        pm.deleteProperty(tokenProperty);
      }
    }
  }
 
  private static void destroyIcalAuthToken(Identity identity) {
View Full Code Here

    PropertyManager pm = PropertyManager.getInstance();
    Property tokenProperty = pm.findProperty(identity, null, null,
        PROP_CAT_ICALTOKEN, PROP_NAME_ICALTOKEN);
   
    // return the string value of the property
    pm.deleteProperty(tokenProperty);
  }
 
  private static Identity getIdentity (String userName) {
    Identity identity = ManagerFactory.getManager().findIdentityByName(userName);
    if (identity == null) {
View Full Code Here

  public static void deleteCalendar(String calendarID, UserRequest ureq) {
    String calendarName = getImportedCalendarNameFromID(ureq.getIdentity(), calendarID);
    // remove the entry from the database
    PropertyManager pm = PropertyManager.getInstance();
    Property p = pm.findUserProperty(ureq.getIdentity(), PROP_CATEGORY, calendarName);
    pm.deleteProperty(p);

    // delete the calendar file
    CalendarManager calManager = CalendarManagerFactory.getInstance().getCalendarManager();
    String importedCalendarID = getImportedCalendarID(ureq, calendarName);
    String importedCalendarType = getImportedCalendarType();
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.