Resource Menu


RE : New module
Code sample of the file: LS_ROOT/Src/LS-Server/wiki/src/org/libresource/wiki/ejb/LibresourceWikiServiceBean.java

public PageResourceValue getPage(URI uri) throws LibresourceWikiException, LibresourceSecurityException, URINotExistException {
        try {
            KernelService kernelService = (KernelService) Libresource.getService(KernelConstants.SERVICE);
            LibresourceResourceIdentifier resourceIdentifier = kernelService.lookup(uri);
            PageResourceLocal pageResourceLocal = (PageResourceLocal) Libresource.findResource(resourceIdentifier, PageResourceLocal.class);
            PageResourceValue resourceValue = pageResourceLocal.getPageResourceValue();
            resourceValue.setUri(kernelService.normalizeURI(uri));

return resourceValue; } catch (LibresourceSecurityException se) { throw se; } catch (URINotExistException se) { throw se; } catch (Exception e) { throw new LibresourceWikiException("Error in getPage : " + e.getMessage(), e); } }

posted by Sebastien Jourdain at Mar 2, 2008 8:26 PM