use of org.olat.restapi.support.vo.RepositoryEntryLifecycleVO in project openolat by klemens.
the class ObjectFactory method get.
public static RepositoryEntryVO get(RepositoryEntry entry) {
RepositoryEntryVO vo = new RepositoryEntryVO();
vo.setKey(entry.getKey());
vo.setSoftkey(entry.getSoftkey());
vo.setResourcename(entry.getResourcename());
vo.setDisplayname(entry.getDisplayname());
vo.setDescription(entry.getDescription());
vo.setAuthors(entry.getAuthors());
vo.setLocation(entry.getLocation());
vo.setResourceableId(entry.getResourceableId());
vo.setResourceableTypeName(entry.getResourceableTypeName());
OLATResource resource = entry.getOlatResource();
if (resource != null) {
vo.setOlatResourceKey(resource.getKey());
vo.setOlatResourceId(resource.getResourceableId());
vo.setOlatResourceTypeName(resource.getResourceableTypeName());
}
vo.setExternalId(entry.getExternalId());
vo.setExternalRef(entry.getExternalRef());
vo.setManagedFlags(entry.getManagedFlagsString());
if (entry.getLifecycle() != null) {
vo.setLifecycle(new RepositoryEntryLifecycleVO(entry.getLifecycle()));
}
return vo;
}
use of org.olat.restapi.support.vo.RepositoryEntryLifecycleVO in project openolat by klemens.
the class ObjectFactory method get.
public static CourseVO get(RepositoryEntry re, ICourse course) {
CourseVO vo = new CourseVO();
vo.setKey(course.getResourceableId());
vo.setDisplayName(re.getDisplayname());
vo.setDescription(re.getDescription());
vo.setTitle(course.getCourseTitle());
vo.setEditorRootNodeId(course.getEditorTreeModel().getRootNode().getIdent());
vo.setSoftKey(re.getSoftkey());
vo.setRepoEntryKey(re.getKey());
OLATResource resource = re.getOlatResource();
if (resource != null) {
vo.setOlatResourceKey(resource.getKey());
vo.setOlatResourceId(resource.getResourceableId());
vo.setOlatResourceTypeName(resource.getResourceableTypeName());
}
vo.setAuthors(re.getAuthors());
vo.setLocation(re.getLocation());
vo.setExternalId(re.getExternalId());
vo.setExternalRef(re.getExternalRef());
vo.setManagedFlags(re.getManagedFlagsString());
if (re.getLifecycle() != null) {
vo.setLifecycle(new RepositoryEntryLifecycleVO(re.getLifecycle()));
}
return vo;
}
Aggregations