private Collection<OnmsResourceType> getAvailableResourceTypes() { return m_resourceDao.getResourceTypes().stream() .filter(t -> t.isResourceTypeOnParent(m_parent)) .collect(Collectors.toList()); } }
/** * Used to determine whether or not the given (parent) resource * has any child resources. */ protected boolean hasAnyChildResources(OnmsResource resource) { // The order of the resource types matter here since we want to // check for the types are most likely occur first. return getResourceTypes().stream() .anyMatch(t -> t.isResourceTypeOnParent(resource)); }