Search in sources :

Example 1 with BinderRef

use of org.olat.modules.portfolio.BinderRef in project openolat by klemens.

the class PortfolioHomeController method activate.

@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
    if (entries == null || entries.isEmpty())
        return;
    List<ContextEntry> subEntries = entries.subList(1, entries.size());
    String resName = entries.get(0).getOLATResourceable().getResourceableTypeName();
    if ("Binder".equalsIgnoreCase(resName)) {
        BinderRef binder = new BinderRefImpl(entries.get(0).getOLATResourceable().getResourceableId());
        if (portfolioService.isMember(binder, getIdentity(), PortfolioRoles.owner.name())) {
            doOpenMyBinders(ureq).activate(ureq, entries, entries.get(0).getTransientState());
        } else {
            doOpenSharedWithMe(ureq).activate(ureq, entries, entries.get(0).getTransientState());
        }
    } else if ("MyBinders".equalsIgnoreCase(resName)) {
        doOpenMyBinders(ureq).activate(ureq, subEntries, entries.get(0).getTransientState());
    } else if ("MediaCenter".equalsIgnoreCase(resName)) {
        doOpenMediaCenter(ureq).activate(ureq, subEntries, entries.get(0).getTransientState());
    } else if ("SharedWithMe".equalsIgnoreCase(resName)) {
        doOpenSharedWithMe(ureq).activate(ureq, subEntries, entries.get(0).getTransientState());
    } else if ("MySharedItems".equalsIgnoreCase(resName)) {
        doOpenMySharedItems(ureq).activate(ureq, subEntries, entries.get(0).getTransientState());
    } else if ("MyPages".equalsIgnoreCase(resName)) {
        doOpenMyPages(ureq).activate(ureq, subEntries, entries.get(0).getTransientState());
    }
}
Also used : ContextEntry(org.olat.core.id.context.ContextEntry) BinderRefImpl(org.olat.modules.portfolio.model.BinderRefImpl) BinderRef(org.olat.modules.portfolio.BinderRef)

Example 2 with BinderRef

use of org.olat.modules.portfolio.BinderRef in project OpenOLAT by OpenOLAT.

the class PortfolioHomeController method activate.

@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
    if (entries == null || entries.isEmpty())
        return;
    List<ContextEntry> subEntries = entries.subList(1, entries.size());
    String resName = entries.get(0).getOLATResourceable().getResourceableTypeName();
    if ("Binder".equalsIgnoreCase(resName)) {
        BinderRef binder = new BinderRefImpl(entries.get(0).getOLATResourceable().getResourceableId());
        if (portfolioService.isMember(binder, getIdentity(), PortfolioRoles.owner.name())) {
            doOpenMyBinders(ureq).activate(ureq, entries, entries.get(0).getTransientState());
        } else {
            doOpenSharedWithMe(ureq).activate(ureq, entries, entries.get(0).getTransientState());
        }
    } else if ("MyBinders".equalsIgnoreCase(resName)) {
        doOpenMyBinders(ureq).activate(ureq, subEntries, entries.get(0).getTransientState());
    } else if ("MediaCenter".equalsIgnoreCase(resName)) {
        doOpenMediaCenter(ureq).activate(ureq, subEntries, entries.get(0).getTransientState());
    } else if ("SharedWithMe".equalsIgnoreCase(resName)) {
        doOpenSharedWithMe(ureq).activate(ureq, subEntries, entries.get(0).getTransientState());
    } else if ("MySharedItems".equalsIgnoreCase(resName)) {
        doOpenMySharedItems(ureq).activate(ureq, subEntries, entries.get(0).getTransientState());
    } else if ("MyPages".equalsIgnoreCase(resName)) {
        doOpenMyPages(ureq).activate(ureq, subEntries, entries.get(0).getTransientState());
    }
}
Also used : ContextEntry(org.olat.core.id.context.ContextEntry) BinderRefImpl(org.olat.modules.portfolio.model.BinderRefImpl) BinderRef(org.olat.modules.portfolio.BinderRef)

Aggregations

ContextEntry (org.olat.core.id.context.ContextEntry)2 BinderRef (org.olat.modules.portfolio.BinderRef)2 BinderRefImpl (org.olat.modules.portfolio.model.BinderRefImpl)2