class BatchRepositoryServiceImpl implements BatchRepositoryService {

            public void deleteResources(List<String> uris) throws AccessDeniedException, ResourceNotFoundException {
        for (String uri: uris){
            if(uriHardModifyProtectionChecker.isHardModifyProtected(uri)){
                throw new AccessDeniedException(uri);
            }
            try{
                Resource resource = service.getResource(null, uri);
                if (resource != null){
                    List<ResourceLookup> dependentResources = service.getDependentResources(null, uri, searchCriteriaFactory, 0, 0);
                    if (dependentResources == null || dependentResources.isEmpty()){
                        service.deleteResource(null, uri);
                    } else {
                        throw new ResourceInUseException(dependentResources);
                    }
                } else {
                    resource = service.getFolder(null, uri);
                    if (resource != null){
                        service.deleteFolder(null, uri);
                    }
                }
            } catch (org.springframework.security.access.AccessDeniedException sse) {
                throw new AccessDeniedException(uri);
            } catch (JSExceptionWrapper w) {
                throw SingleRepositoryServiceImpl.getRootException(w);
                    }
                }
            }

}