Package org.olat.core.util.coordinate

Examples of org.olat.core.util.coordinate.SyncerExecutor


   * @see org.olat.group.area.BGAreaManager#deleteBGArea(org.olat.group.area.BGArea)
   */
  // o_clusterOK by:cg must be synchronized too
  public void deleteBGArea(final BGArea area) {
    final BGContext groupContext = area.getGroupContext();
    CoordinatorManager.getCoordinator().getSyncer().doInSync(groupContext, new SyncerExecutor(){
      public void execute() {
        BGArea reloadArea = findBGArea(area.getName(), groupContext);
        if (reloadArea != null) {
          // 1) delete all area - group relations
          deleteBGtoAreaRelations(reloadArea);
View Full Code Here


   * Re-activate an identity, lastLogin = now, reset deleteemaildate = null.
   * @param identity
   */
  public void setIdentityAsActiv(final Identity anIdentity) {
    CoordinatorManager.getCoordinator().getSyncer().doInSync(OresHelper.createOLATResourceableInstance(anIdentity.getClass(), anIdentity.getKey()) ,
      new SyncerExecutor(){
        public void execute() {
           //o_clusterOK by:fj : must be fast
          Identity identity = (Identity)DBFactory.getInstance().loadObject(anIdentity, true);
          if (Tracing.isDebugEnabled(this.getClass())) Tracing.logDebug("setIdentityAsActiv beginSingleTransaction identity=" + identity, this.getClass());
          identity.setLastLogin(new Date());
View Full Code Here

   * at the same time
   */
  public void setInfoMessage(final String message) { //o_clusterOK synchronized
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(INFO_MSG, KEY);
   
    CoordinatorManager.getCoordinator().getSyncer().doInSync(ores, new SyncerExecutor(){

      public void execute() {
        PropertyManager pm = PropertyManager.getInstance();
        Property p = pm.findProperty(null, null, null, "_o3_", INFO_MSG);
        if (p == null) {
View Full Code Here

      final boolean allowOverfill) {
    final DENStatus status = new DENStatus();
    ICourse course = CourseFactory.loadCourse(ores);
    final Kalendar cal = calManager.getCourseCalendar(course).getKalendar();
    OLATResourceable calRes = calManager.getOresHelperFor(cal);
    CoordinatorManager.getCoordinator().getSyncer().doInSync(calRes, new SyncerExecutor() {
      public void execute() {
        boolean error = false;
        Collection<KalendarEvent> collEvents = cal.getEvents();
        // check if date is already full
        if (!allowOverfill && isDateFull(event)) {
View Full Code Here

   *
   * @see org.olat.group.BusinessGroupManager#moveIdenitFromWaitingListToParticipant(org.olat.core.id.Identity, org.olat.core.gui.control.WindowControl, org.olat.core.gui.UserRequest, org.olat.core.gui.translator.Translator, org.olat.group.BusinessGroup, org.olat.group.ui.BGConfigFlags, org.olat.core.logging.UserActivityLogger)
   */
  public BusinessGroupAddResponse moveIdenityFromWaitingListToParticipant(final List<Identity> choosenIdentities, final Identity ureqIdentity, final BusinessGroup currBusinessGroup, final BGConfigFlags flags) {
    final BusinessGroupAddResponse response = new BusinessGroupAddResponse();
      CoordinatorManager.getCoordinator().getSyncer().doInSync(currBusinessGroup,new SyncerExecutor(){
        public void execute() {
          for (final Identity identity : choosenIdentities) {
            // check if idenity is allready in participant
            if (!securityManager.isIdentityInSecurityGroup(identity,currBusinessGroup.getPartipiciantGroup()) ) {
              // Idenity is not in participant-list => move idenity from waiting-list to participant-list
View Full Code Here

   * @see org.olat.group.BusinessGroupManager#addParticipantsAndFireEvent(org.olat.core.id.Identity, java.util.List, org.olat.group.BusinessGroup, org.olat.group.ui.BGConfigFlags, org.olat.core.logging.UserActivityLogger)
   */
  public BusinessGroupAddResponse addParticipantsAndFireEvent(final Identity ureqIdentity, final List<Identity> addIdentities, BusinessGroup acurrBusinessGroup, final BGConfigFlags flags) {
    final BusinessGroupAddResponse response = new BusinessGroupAddResponse();
    final BusinessGroup currBusinessGroup = loadBusinessGroup(acurrBusinessGroup); // reload business group
    CoordinatorManager.getCoordinator().getSyncer().doInSync(currBusinessGroup, new SyncerExecutor(){
      public void execute() {
        for (final Identity identity : addIdentities) {
          if (securityManager.isIdentityPermittedOnResourceable(identity, Constants.PERMISSION_HASROLE, Constants.ORESOURCE_GUESTONLY)) {
            response.getIdentitiesWithoutPermission().add(identity);
          }
View Full Code Here

   * @see org.olat.group.BusinessGroupManager#addToWaitingListAndFireEvent(org.olat.core.id.Identity, java.util.List, org.olat.group.BusinessGroup, org.olat.group.ui.BGConfigFlags, org.olat.core.logging.UserActivityLogger)
   */
  public BusinessGroupAddResponse addToWaitingListAndFireEvent(final Identity ureqIdentity, final List<Identity> addIdentities, BusinessGroup acurrBusinessGroup, BGConfigFlags flags) {
    final BusinessGroupAddResponse response = new BusinessGroupAddResponse();
    final BusinessGroup currBusinessGroup = loadBusinessGroup(acurrBusinessGroup); // reload business group
      CoordinatorManager.getCoordinator().getSyncer().doInSync(currBusinessGroup, new SyncerExecutor(){
        public void execute() {
          for (final Identity identity : addIdentities) { 
            if (securityManager.isIdentityPermittedOnResourceable(identity, Constants.PERMISSION_HASROLE, Constants.ORESOURCE_GUESTONLY)) {
              response.getIdentitiesWithoutPermission().add(identity);
            }
View Full Code Here

  /**
   *
   * @see org.olat.group.BusinessGroupManager#removeParticipantsAndFireEvent(org.olat.core.gui.control.WindowControl, org.olat.core.id.Identity, org.olat.core.gui.translator.Translator, java.util.List, org.olat.group.BusinessGroup, org.olat.group.ui.BGConfigFlags, org.olat.core.logging.UserActivityLogger)
   */
  public void removeParticipantsAndFireEvent(final Identity ureqIdentity, final List<Identity> identities, final BusinessGroup currBusinessGroup, final BGConfigFlags flags) {
    CoordinatorManager.getCoordinator().getSyncer().doInSync(currBusinessGroup, new SyncerExecutor(){
      public void execute() {
        for (Identity identity : identities) {
          removeParticipantAndFireEvent(ureqIdentity, identity, currBusinessGroup, flags, false);
          Tracing.logAudit("removed identiy '" + identity.getName() + "' from securitygroup with key " + currBusinessGroup.getPartipiciantGroup().getKey(), this.getClass());
        }
View Full Code Here

  /**
   *
   * @see org.olat.group.BusinessGroupManager#removeFromWaitingListAndFireEvent(org.olat.core.id.Identity, org.olat.core.gui.translator.Translator, java.util.List, org.olat.group.BusinessGroup, org.olat.group.ui.BGConfigFlags, org.olat.core.logging.UserActivityLogger)
   */
  public void removeFromWaitingListAndFireEvent(final Identity ureqIdentity, final List<Identity> identities, final BusinessGroup currBusinessGroup, final BGConfigFlags flags) {
    CoordinatorManager.getCoordinator().getSyncer().doInSync(currBusinessGroup, new SyncerExecutor(){
      public void execute() {
        for (Identity identity : identities) {
          removeFromWaitingListAndFireEvent(ureqIdentity, identity, currBusinessGroup, false);
          Tracing.logAudit("removed identiy '" + identity.getName() + "' from securitygroup with key " + currBusinessGroup.getOwnerGroup().getKey(), this.getClass());
        }
View Full Code Here

  /**
   * @see org.olat.group.BusinessGroupManager#setLastUsageFor(org.olat.group.BusinessGroup)
   */
  public void setLastUsageFor(final BusinessGroup currBusinessGroup) {
    //o_clusterOK by:cg
    CoordinatorManager.getCoordinator().getSyncer().doInSync(currBusinessGroup, new SyncerExecutor(){
      public void execute() {
        // force a reload from db loadObject(..., true) by evicting it from
        // hibernates session
        // cache to catch up on a different thread having commited the update of
        // the launchcounter
View Full Code Here

TOP

Related Classes of org.olat.core.util.coordinate.SyncerExecutor

Copyright © 2018 www.massapicom. 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.