Examples of OLATResourceable


Examples of org.olat.core.id.OLATResourceable

      resId = re.getOlatResource().getResourceableId();
      businessPath = "[RepositoryEntry:" + re.getKey().toString() + "]"
        + "[CourseNode:" + publisher.getSubidentifier() + "]";
    } else {
      // resName = 'BusinessGroup' or 'FileResource.WIKI'
      OLATResourceable ores = OresHelper.createOLATResourceableInstance(publisher.getResName(), resId);
      BusinessGroup bGroup = BusinessGroupManagerImpl.getInstance().loadBusinessGroup(resId, false);
      if (bGroup==null) {
        // Wiki as Repo-Ressource
        RepositoryEntry re = RepositoryManager.getInstance().lookupRepositoryEntry(ores,false);
        if (re != null) {
View Full Code Here

Examples of org.olat.core.id.OLATResourceable

    // jump to either the forum or the folder if the business-launch-path says so.
    BusinessControl bc = getWindowControl().getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
    if ( ce != null) { // a context path is left for me
      if (isLogDebugEnabled()) logDebug("businesscontrol (for further jumps) would be: ", bc.toString());
      OLATResourceable ores = ce.getOLATResourceable();
      if (isLogDebugEnabled()) logDebug("OLATResourceable= " , ores.toString());
      Long resId = ores.getResourceableId();
      if (resId.longValue() != 0) {
        if (isLogDebugEnabled()) logDebug("messageId=" , ores.getResourceableId().toString());
        currentMsg = fm.findMessage(ores.getResourceableId());
        if (currentMsg != null) {
          showThreadView(ureq, currentMsg);
          scrollToCurrentMessage();         
        } else {
          // message not found, do nothing. Load normal start screen
          logDebug("Invalid messageId=" , ores.getResourceableId().toString());
        }
      } else {
        //FIXME:chg: Should not happen, occurs when course-node are called
        if (isLogDebugEnabled()) logDebug("Invalid messageId=" , ores.getResourceableId().toString());
      }
    }

    // Register for forum events
    CoordinatorManager.getCoordinator().getEventBus().registerFor(this, ureq.getIdentity(), forum);
View Full Code Here

Examples of org.olat.core.id.OLATResourceable

    return container;
  }

  private void adjustBusinessControlPath(UserRequest ureq, Message m) {
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrap(m));
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(Message.class,m.getKey());
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ores);
   
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());   
   
    //Simple way to "register" the new ContextEntry although only a VelocityPage was flipped.
View Full Code Here

Examples of org.olat.core.id.OLATResourceable

  public boolean checkAccess(BusinessControl businessControl, Identity identity, Roles roles) {
    if (log.isDebug()) log.debug("checkAccess for businessControl=" + businessControl + "  identity=" + identity + "  roles=" + roles);
    ContextEntry contextEntry = businessControl.popLauncherContextEntry();
    if (contextEntry != null) {
      // there is an other context-entry => go further
      OLATResourceable ores = contextEntry.getOLATResourceable();
      String type = ores.getResourceableTypeName();
      Indexer indexer = this.childIndexers.get(type);
      return indexer.checkAccess(contextEntry, businessControl, identity, roles);
    } else {
      // rearch the end context entry list
      return true;
View Full Code Here

Examples of org.olat.core.id.OLATResourceable

      Link userLink = (Link) source;
      Object userObject = userLink.getUserObject();
      if (userObject instanceof Identity) {
        Identity chosenIdentity = (Identity) userObject;
        HomePageConfigManager hpcm = HomePageConfigManagerImpl.getInstance();
        OLATResourceable ores = hpcm.loadConfigFor(chosenIdentity.getName());
        DTabs dts = (DTabs) Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
        // was brasato:: DTabs dts = getWindowControl().getDTabs();
        DTab dt = dts.getDTab(ores);
        if (dt == null) {
          // does not yet exist -> create and add
View Full Code Here

Examples of org.olat.core.id.OLATResourceable

   *
   * @return The feed cache
   */
  protected CacheWrapper initFeedCache() {
    if (feedCache == null) {
      OLATResourceable ores = OresHelper.createOLATResourceableType(this.getClass());
      CoordinatorManager.getCoordinator().getSyncer().doInSync(ores, new SyncerExecutor() {
        public void execute() {
          if (feedCache == null) {
            feedCache = CoordinatorManager.getCoordinator().getCacher().getOrCreateCache(this.getClass(), "feed");
          }
View Full Code Here

Examples of org.olat.core.id.OLATResourceable

   * @see org.olat.modules.webFeed.managers.FeedManager#acquireLock(org.olat.core.id.OLATResourceable,
   *      org.olat.modules.webFeed.models.Item, org.olat.core.id.Identity)
   */
  public LockResult acquireLock(OLATResourceable feed, Item item, Identity identity) {
    String key = itemKey(item, feed);
    OLATResourceable itemResource = OresHelper.createOLATResourceableType(key);
    LockResult lockResult = CoordinatorManager.getCoordinator().getLocker().acquireLock(itemResource, identity, key);
    return lockResult;
  }
View Full Code Here

Examples of org.olat.core.id.OLATResourceable

    try {
      // unpack
      JMSWrapper jmsWrapper = (JMSWrapper) om.getObject();
      Integer nodeId = jmsWrapper.getNodeId();     
      MultiUserEvent event = jmsWrapper.getMultiUserEvent();
      OLATResourceable ores = jmsWrapper.getOres();
      boolean fromSameNode = clusterConfig.getNodeId().equals(nodeId);

      // update nodeinfo statistics
      NodeInfo nodeInfo = getNodeInfoFor(nodeId);
      if (!nodeInfo.update(jmsWrapper)) {
        log.warn("onMessage: update failed. clustereventbus: "+this);
      }

      String recMsg = "received msg: "+(fromSameNode? "[same node]":"")+" from node:" +
      nodeId + ", olat-id:" + jmsWrapper.getMsgId() + ", ores:" + ores.getResourceableTypeName() + ":" + ores.getResourceableId() +
      ", event:"+event+"}";

      // stats
      final long jmsTimestamp = om.getJMSTimestamp();
      if (jmsTimestamp!=0) {
View Full Code Here

Examples of org.olat.core.id.OLATResourceable

      // we want a user chosen overview, so display the chosen file from the
      // material folder, otherwise display the normal overview
      // reuse the Run controller from the "Single Page" building block, since
      // we need to do exactly the same task
      Boolean allowRelativeLinks = getModuleConfiguration().getBooleanEntry(STCourseNodeEditController.CONFIG_KEY_ALLOW_RELATIVE_LINKS);
      OLATResourceable ores = OresHelper.createOLATResourceableInstance(CourseModule.class, userCourseEnv.getCourseEnvironment().getCourseResourceableId());
      SinglePageController spCtr = new SinglePageController(ureq, wControl, true, userCourseEnv.getCourseEnvironment().getCourseFolderContainer(), relPath, null, allowRelativeLinks
          .booleanValue(), ores);
      // check if user is allowed to edit the page in the run view
      CourseGroupManager cgm = userCourseEnv.getCourseEnvironment().getCourseGroupManager();
      boolean hasEditRights = (cgm.isIdentityCourseAdministrator(ureq.getIdentity()) || cgm.hasRight(ureq.getIdentity(),
View Full Code Here

Examples of org.olat.core.id.OLATResourceable

    rm.incrementLaunchCounter(re);
    RepositoryHandler handler = RepositoryHandlerFactory.getInstance().getRepositoryHandler(re);
 
   
    // build up the context path
    OLATResourceable businessOres = re;
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(businessOres);
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, wControl)
 
    MainLayoutController ctrl = handler.getLaunchController(re.getOlatResource(), initialViewIdentifier, ureq, bwControl);
    if (ctrl == null) throw new AssertException("could not create controller for repositoryEntry "+re);
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.