Package org.olat.core.util.notifications

Examples of org.olat.core.util.notifications.SubscriptionContext


 
  /**
   * Unsubscribe to notifications of new identity created
   */
  public void unsubscribe(Identity identity) {
    SubscriptionContext context = getNewUsersSubscriptionContext();
    NotificationsManager.getInstance().unsubscribe(identity, context)
  }
View Full Code Here


 
  /**
   * Call this method if there is new identities
   */
  public void markPublisherNews() {
    SubscriptionContext context = getNewUsersSubscriptionContext();
    NotificationsManager.getInstance().markPublisherNews(context, null);
  }
View Full Code Here

    DialogPropertyElements findDialogElements = depm.findDialogElements(course.getResourceableId(), getIdent());
    if(findDialogElements != null){
      List<DialogElement> dialogElments = findDialogElements.getDialogPropertyElements();
      for (DialogElement dialogElement : dialogElments) {
        Long forumKey = dialogElement.getForumKey();
        SubscriptionContext subsContext = CourseModule.createSubscriptionContext(course.getCourseEnvironment(), this, forumKey.toString());
        NotificationsManager.getInstance().delete(subsContext);
        //also delete forum -> was archived in archiveNodeData step
        ForumManager.getInstance().deleteForum(forumKey);
      }
    }
View Full Code Here

        // FileResourceManager.getInstance().unzipFileResource(re.getOlatResource());
        Identity ident = ureq.getIdentity();
        boolean isOlatAdmin = ureq.getUserSession().getRoles().isOLATAdmin();
        boolean isResourceOwner = RepositoryManager.getInstance().isOwnerOfRepositoryEntry(ident, re);
        CourseEnvironment cenv = course.getCourseEnvironment();
        SubscriptionContext subsContext = WikiManager.createTechnicalSubscriptionContextForCourse(cenv, wikiCourseNode);
        WikiSecurityCallback callback = new WikiSecurityCallbackImpl(null, isOlatAdmin, false, false, isResourceOwner,subsContext);
        wikiCtr = WikiManager.getInstance().createWikiMainController(ureq, getWindowControl(), re.getOlatResource(), callback, null);
        cmcWikiCtr = new CloseableModalController(getWindowControl(), translate("command.close"), wikiCtr.getInitialComponent());       
        this.listenTo(cmcWikiCtr);
        cmcWikiCtr.insertHeaderCss();
View Full Code Here

   
    // Check for jumping to certain wiki page
    BusinessControl bc = wControl.getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
   
    SubscriptionContext subsContext = WikiManager.createTechnicalSubscriptionContextForCourse(cenv, wikiCourseNode);
    WikiSecurityCallback callback = new WikiSecurityCallbackImpl(ne, isOLatAdmin, isGuestOnly, false, isResourceOwner, subsContext);
   
    if ( ce != null ) { //jump to a certain context
      OLATResourceable ores = ce.getOLATResourceable();
      String typeName = ores.getResourceableTypeName();
View Full Code Here

   * @param ce
   * @param cn
   * @return the generated SubscriptionContext
   */
  public static SubscriptionContext createSubscriptionContext(CourseEnvironment ce, CourseNode cn) {
    SubscriptionContext sc = new SubscriptionContext(getCourseTypeName(), ce.getCourseResourceableId(), cn.getIdent());
    return sc;
  }
View Full Code Here

   * @param cn
   * @return a subscriptioncontext with no translations for the user, but only
   *         to be able to cleanup/obtain
   */
  public static SubscriptionContext createTechnicalSubscriptionContext(CourseEnvironment ce, CourseNode cn) {
    SubscriptionContext sc = new SubscriptionContext(getCourseTypeName(), ce.getCourseResourceableId(), cn.getIdent());
    return sc;
  }
View Full Code Here

   * @param cn
   * @param subsubId
   * @return
   */
  public static SubscriptionContext createSubscriptionContext(CourseEnvironment ce, CourseNode cn, String subsubId) {
    SubscriptionContext sc = new SubscriptionContext(getCourseTypeName(), ce.getCourseResourceableId(), cn.getIdent() + ":" + subsubId);
    return sc;
  }
View Full Code Here

          calWrapper = (KalendarRenderWrapper) calWrapperObj;
          if(affectedCal == calWrapper.getKalendar()) break;
        }
        if(calWrapper != null) {
          SubscriptionProvider provider = new SubscriptionProviderImpl(calWrapper);
          SubscriptionContext tmpSubsContext = provider.getSubscriptionContext();
          NotificationsManager.getInstance().markPublisherNews(tmpSubsContext, ureq.getIdentity());
        }
      }
    }
  }
View Full Code Here

  public Controller createWikiController(UserRequest ureq, WindowControl wControl) {
    // Check for jumping to certain wiki page
    BusinessControl bc = wControl.getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
   
    SubscriptionContext subContext = new SubscriptionContext(ores, WikiManager.WIKI_RESOURCE_FOLDER_NAME);
    boolean isOlatAdmin = ureq.getUserSession().getRoles().isOLATAdmin();
    boolean isGuestOnly = ureq.getUserSession().getRoles().isGuestOnly();
    boolean isResourceOwner = ManagerFactory.getManager().isIdentityPermittedOnResourceable(ureq.getIdentity(), Constants.PERMISSION_ACCESS, ores);
    WikiSecurityCallback callback = new WikiSecurityCallbackImpl(null, isOlatAdmin, isGuestOnly, true, isResourceOwner, subContext);
    if ( ce != null ) { //jump to a certain context
View Full Code Here

TOP

Related Classes of org.olat.core.util.notifications.SubscriptionContext

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.