Resource Menu


RE : New module
I don't understand. In the file messageresourcebean.java or threadresourcebean.java, there is not setURI(xxx). So where I have to set the uri. In the contactcontroler.java I use the method listContatAt(URI uri). And in this method :
public ContactResourceValue[] listContactsAt2(URI uri)
        throws LibresourceAdressBookException, LibresourceSecurityException, URINotExistException {
        try {
            KernelService kernelService = (KernelService) Libresource.getService("Kernel");
            LibresourceResourceValue[] pages = kernelService.listResourcesAt(uri, ContactResourceLocal.LIBRESOURCE_RESOURCE_SERVICE,
                    ContactResourceLocal.LIBRESOURCE_RESOURCE_TYPE);
            ContactResourceValue[] contactResourceValues = new ContactResourceValue"resourceLink" href="/home/community/forum/New_module/RE_New_module_50/pages.length">"error">! pages.length !;

for (int i = 0; i < contactResourceValues.length; i++) { LibresourceResourceIdentifier resourceIdentifier = pages[i].getLibresourceResourceIdentifier(); ContactResourceValue contactResourceValue = ((ContactResourceLocal) Libresource.findResource(resourceIdentifier)).getContactResourceValue();

contactResourceValue.setUri(kernelService.normalizeURI(pages[i].getUri()));

contactResourceValues[i] = new ContactResourceValue(contactResourceValue); }

return contactResourceValues; } catch (LibresourceSecurityException se) { throw se; } catch (URINotExistException se) { throw se; } catch (Exception e) { throw new LibresourceAdressBookException("Error in listContactsAt : " + e.getMessage(), e); } }

posted by reya at Mar 2, 2008 5:50 PM