Currently we have getRelatedChildren and getRelatedParents, but we do have scenarios where we want to just know if a relation exists (folder tree for annotations is one of those). This will require the following code changes:
RESTContent: Two new endpoints that take in the same params as getRelatedChildren and getRelatedParents, but will return a boolean instead of an array of objects. It will call the new hasRelatedChildren and hasRelatedParents.
IExtendedContent: Add hasRelatedChildren and hasRelatedParents methods, with javadocs. They will take the same params as getRelatedChildren and getRelatedParents, but will return a boolean
DCTMExtendedContentImpl, AlfrescoEmbExtendedContentImpl, FilesystemExtendedContentImpl, SharepointExtendedContentImpl. SolrExtendedContentImpl: Add hasRelatedChildren and hasRelatedParents methods. If the impls have getRelatedChildren and getRelatedParents implemented, code the methods. The content will be very similar to the getRelatedChildren and getRelatedParents methods, but instead of getting the actual children, we stop after checking if there are any children/parents and return a boolean.
After this is done, we will want to update the AJAX call in foldertree.js to use the new hasRelatedChildren endpoint.
Currently we have getRelatedChildren and getRelatedParents, but we do have scenarios where we want to just know if a relation exists (folder tree for annotations is one of those). This will require the following code changes:
RESTContent: Two new endpoints that take in the same params as getRelatedChildren and getRelatedParents, but will return a boolean instead of an array of objects. It will call the new hasRelatedChildren and hasRelatedParents.
IExtendedContent: Add hasRelatedChildren and hasRelatedParents methods, with javadocs. They will take the same params as getRelatedChildren and getRelatedParents, but will return a boolean
DCTMExtendedContentImpl, AlfrescoEmbExtendedContentImpl, FilesystemExtendedContentImpl, SharepointExtendedContentImpl. SolrExtendedContentImpl: Add hasRelatedChildren and hasRelatedParents methods. If the impls have getRelatedChildren and getRelatedParents implemented, code the methods. The content will be very similar to the getRelatedChildren and getRelatedParents methods, but instead of getting the actual children, we stop after checking if there are any children/parents and return a boolean.
After this is done, we will want to update the AJAX call in foldertree.js to use the new hasRelatedChildren endpoint.