contactResourceValues[i] = new ContactResourceValue(contactResourceValue);
it doesn't work;
contactResourceValues[i] = contactResourceValue;
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); } }
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); } }]]>