Search in sources :

Example 16 with CPResource

use of org.olat.ims.cp.objects.CPResource in project openolat by klemens.

the class CPPage method getResource.

protected CPResource getResource() {
    CPResource resource = null;
    CPManager mgr = CPManager.getInstance();
    DefaultElement resElement = mgr.getElementByIdentifier(cp, idRef);
    if (resElement instanceof CPResource) {
        resource = (CPResource) resElement;
    }
    return resource;
}
Also used : DefaultElement(org.dom4j.tree.DefaultElement) CPManager(org.olat.ims.cp.CPManager) CPResource(org.olat.ims.cp.objects.CPResource)

Aggregations

CPResource (org.olat.ims.cp.objects.CPResource)16 DefaultElement (org.dom4j.tree.DefaultElement)14 CPItem (org.olat.ims.cp.objects.CPItem)10 CPOrganization (org.olat.ims.cp.objects.CPOrganization)8 OLATRuntimeException (org.olat.core.logging.OLATRuntimeException)6 CPManager (org.olat.ims.cp.CPManager)4 CPDependency (org.olat.ims.cp.objects.CPDependency)4 CPFile (org.olat.ims.cp.objects.CPFile)4 Logger (java.util.logging.Logger)2 VFSLeaf (org.olat.core.util.vfs.VFSLeaf)2 CPMetadata (org.olat.ims.cp.objects.CPMetadata)2 CPOrganizations (org.olat.ims.cp.objects.CPOrganizations)2 CPResources (org.olat.ims.cp.objects.CPResources)2