Package org.olat.core.id

Examples of org.olat.core.id.OLATResourceable


    RepositoryEntry re = rm.lookupRepositoryEntry(repoKey);
    if (re == null) { // no repoentry with this key found
      return null;
    }
    String displayName = re.getDisplayname();
    OLATResourceable ores = re.getOlatResource();
    return new RepoJumpInReceptionist(displayName, ores, re);

  }
View Full Code Here


    ContextEntry ce = bc.popLauncherContextEntry();
    SubscriptionContext subsContext = new SubscriptionContext(res, WikiManager.WIKI_RESOURCE_FOLDER_NAME);
    WikiSecurityCallback callback = new WikiSecurityCallbackImpl(null, isOLatAdmin, isGuestOnly, false, isResourceOwner, subsContext);
   
    if ( ce != null ) { //jump to a certain context
      OLATResourceable ores = ce.getOLATResourceable();
      String typeName = ores.getResourceableTypeName();
      String page = typeName.substring("page=".length());
      controller = WikiManager.getInstance().createWikiMainControllerDisposeOnOres(ureq, wControl, res, callback, page);
    } else {
      controller = WikiManager.getInstance().createWikiMainControllerDisposeOnOres(ureq, wControl, res, callback, null);
    }
View Full Code Here

    VFSContainer wikiContainer = WikiManager.getInstance().getWikiContainer(res, WikiManager.WIKI_RESOURCE_FOLDER_NAME);
    if(wikiContainer==null) {
      //if the wiki container is null, let the WikiManager to create one
      WikiManager.getInstance().getOrLoadWiki(res);
    }
    OLATResourceable copy = frm.createCopy(res, WikiManager.WIKI_RESOURCE_FOLDER_NAME);
    VFSContainer rootContainer = frm.getFileResourceRootImpl(copy);
    //reset properties files to default values
    VFSContainer wikiCont = (VFSContainer)rootContainer.resolve(WikiManager.WIKI_RESOURCE_FOLDER_NAME);
    List leafs = wikiCont.getItems(new VFSItemSuffixFilter(new String[]{WikiManager.WIKI_PROPERTIES_SUFFIX}));
    for (Iterator iter = leafs.iterator(); iter.hasNext();) {
View Full Code Here

   
    // Activate child controllers if a usable context entry is found
    BusinessControl bc = getWindowControl().getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
    if (ce != null) { // a context path is left for me
      OLATResourceable ores = ce.getOLATResourceable();
      if (OresHelper.equals(ores, BUSINESS_CONTROL_TYPE_FOLDER)) {
        // Activate folder controller
        menuTree.setSelectedNode(tm.findNodeByUserObject(CMD_FOLDER));
        main.setContent(createComponent(ureq, CMD_FOLDER, chosenIdentity));
      }
View Full Code Here

  public SubscriptionContext getNewUsersSubscriptionContext() {
    return new SubscriptionContext(RES_NAME, RES_ID, NEW);
  }
 
  public PublisherData getNewUsersPublisherData() {
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(new OLATResourceable() {
      @Override
      public Long getResourceableId() { return 0l; }
      @Override
      public String getResourceableTypeName() { return "NewIdentityCreated"; }
    });
View Full Code Here

  public String getTitle() {
    return translator.translate("notifications.header");
  }
 
  public OLATResourceable getOLATResourceable() {
    return new OLATResourceable() {
      public Long getResourceableId() {
        return new Long(0);
      }
      public String getResourceableTypeName() {
        return UserAdminSite.class.getName();
View Full Code Here

  public void setUp() throws Exception {/***/}

  public void testWikiStuff() {
    WikiManager wikiMgr = WikiManager.getInstance();
    OLATResourceable ores = wikiMgr.createWiki();
    Wiki wiki = wikiMgr.getOrLoadWiki(ores);
   
    // add pages
    WikiPage page1 = new WikiPage("test-ä");
    page1.setContent(WIKI_CONTENT);
View Full Code Here

  public void testDoInSyncWithSyncerExecutor() {

    final List<Exception> exceptionHolder = Collections.synchronizedList(new ArrayList<Exception>(1));
    final List<Boolean> statusList = Collections.synchronizedList(new ArrayList<Boolean>(1));
 
    final OLATResourceable ores = OresHelper.createOLATResourceableInstance("testDoInSync", new Long("123"));
    // thread 1
    new Thread(new Runnable() {
      public void run() {
        try {
          // do something in sync
View Full Code Here

  public void testDoInSyncWithSyncerCallback() {

    final List<Exception> exceptionHolder = Collections.synchronizedList(new ArrayList<Exception>(1));
    final List<Boolean> statusList = Collections.synchronizedList(new ArrayList<Boolean>(1));
 
    final OLATResourceable ores = OresHelper.createOLATResourceableInstance("testDoInSync", new Long("123"));
    // thread 1
    new Thread(new Runnable() {
      public void run() {
        try {
          // do something in sync
View Full Code Here

    }
  }
 

  public void testNestedAssertExceptionInDoInSync() {
    final OLATResourceable ores = OresHelper.createOLATResourceableInstance("testNestedAssertExceptionInDoInSync", new Long("123"));
   
    try {
      CoordinatorManager.getCoordinator().getSyncer().doInSync(ores, new SyncerCallback<Boolean>(){
        public Boolean execute() {
          System.out.println("testNestedAssertExceptionInDoInSync: execute doInSync 1");
View Full Code Here

TOP

Related Classes of org.olat.core.id.OLATResourceable

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.