use of org.olat.core.id.context.StateEntry in project OpenOLAT by OpenOLAT.
the class OrdersAdminController method addSearchToHistory.
protected void addSearchToHistory(UserRequest ureq) {
StateEntry state = searchForm == null ? null : searchForm.getStateEntry();
ContextEntry currentEntry = getWindowControl().getBusinessControl().getCurrentContextEntry();
if (currentEntry != null) {
currentEntry.setTransientState(state);
}
addToHistory(ureq, getWindowControl());
}
use of org.olat.core.id.context.StateEntry in project OpenOLAT by OpenOLAT.
the class CatalogNodeManagerController method activate.
@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
if (entries == null || entries.isEmpty()) {
return;
}
ContextEntry entry = entries.get(0);
String type = entry.getOLATResourceable().getResourceableTypeName();
if ("CatalogEntry".equalsIgnoreCase(type)) {
Long entryKey = entry.getOLATResourceable().getResourceableId();
if (entryKey != null && entryKey.longValue() > 0) {
activateRoot(ureq, entryKey);
}
} else if ("Node".equalsIgnoreCase(type)) {
// the "Node" is only for internal usage
StateEntry stateEntry = entry.getTransientState();
if (stateEntry instanceof CatalogStateEntry) {
CatalogEntry catEntry = ((CatalogStateEntry) stateEntry).getEntry();
CatalogNodeManagerController nextCtrl = selectCatalogEntry(ureq, catEntry);
if (nextCtrl != null && entries.size() > 1) {
nextCtrl.activate(ureq, entries.subList(1, entries.size()), null);
}
}
}
}
use of org.olat.core.id.context.StateEntry in project OpenOLAT by OpenOLAT.
the class CatalogNodeController method activate.
@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
if (entries == null || entries.isEmpty()) {
return;
}
ContextEntry entry = entries.get(0);
String type = entry.getOLATResourceable().getResourceableTypeName();
if ("CatalogEntry".equalsIgnoreCase(type)) {
Long entryKey = entry.getOLATResourceable().getResourceableId();
if (entryKey != null && entryKey.longValue() > 0) {
activateRoot(ureq, entryKey);
}
} else if ("Node".equalsIgnoreCase(type)) {
// the "Node" is only for internal usage
StateEntry stateEntry = entry.getTransientState();
if (stateEntry instanceof CatalogStateEntry) {
CatalogEntry catalogEntry = ((CatalogStateEntry) stateEntry).getEntry();
CatalogNodeController nextCtrl = selectCatalogEntry(ureq, catalogEntry);
if (nextCtrl != null && entries.size() > 1) {
nextCtrl.activate(ureq, entries.subList(1, entries.size()), null);
}
}
}
}
use of org.olat.core.id.context.StateEntry in project OpenOLAT by OpenOLAT.
the class AssessmentCourseTreeController method processSelectCourseNodeWithMemory.
private void processSelectCourseNodeWithMemory(UserRequest ureq, TreeNode tn, CourseNode cn) {
StateEntry listState = null;
if (currentCtrl != null && currentCtrl == identityListCtrl) {
listState = identityListCtrl.getListState();
}
Controller ctrl = doSelectCourseNode(ureq, tn, cn);
if (ctrl instanceof Activateable2) {
((Activateable2) ctrl).activate(ureq, null, listState);
}
}
use of org.olat.core.id.context.StateEntry in project openolat by klemens.
the class CatalogNodeController method activate.
@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
if (entries == null || entries.isEmpty()) {
return;
}
ContextEntry entry = entries.get(0);
String type = entry.getOLATResourceable().getResourceableTypeName();
if ("CatalogEntry".equalsIgnoreCase(type)) {
Long entryKey = entry.getOLATResourceable().getResourceableId();
if (entryKey != null && entryKey.longValue() > 0) {
activateRoot(ureq, entryKey);
}
} else if ("Node".equalsIgnoreCase(type)) {
// the "Node" is only for internal usage
StateEntry stateEntry = entry.getTransientState();
if (stateEntry instanceof CatalogStateEntry) {
CatalogEntry catalogEntry = ((CatalogStateEntry) stateEntry).getEntry();
CatalogNodeController nextCtrl = selectCatalogEntry(ureq, catalogEntry);
if (nextCtrl != null && entries.size() > 1) {
nextCtrl.activate(ureq, entries.subList(1, entries.size()), null);
}
}
}
}
Aggregations