@Override public String createPath(final Resource resource) { final RepositoryFileResource repositoryFileResource = (RepositoryFileResource) resource; final String qualifiedPath = repositoryFileResource.getQualifiedPath(); final String prefix = getHomeFolderPrefix(); if (!qualifiedPath.startsWith(prefix)) { throw new IllegalArgumentException( "This RepositoryFileResourceTypeHandler can only handle repository file from home '" + prefix + "'. Got: " + qualifiedPath); } return qualifiedPath.substring(prefix.length()); }