/** * Check if this repository can be served. * <p> * The default implementation of this method returns true only if either * {@link #isExportAll()} is true, or the {@code git-daemon-export-ok} file * is present in the repository's directory. * * @param req * the current HTTP request. * @param repositoryName * name of the repository, as present in the URL. * @param db * the opened repository instance. * @return true if the repository is accessible; false if not. * @throws java.io.IOException * the repository could not be accessed, the caller will claim * the repository does not exist. */ protected boolean isExportOk(C req, String repositoryName, Repository db) throws IOException { if (isExportAll()) return true; else if (db.getDirectory() != null) return new File(db.getDirectory(), "git-daemon-export-ok").exists(); //$NON-NLS-1$ else return false; }
/** * Check if this repository can be served. * <p> * The default implementation of this method returns true only if either * {@link #isExportAll()} is true, or the {@code git-daemon-export-ok} file * is present in the repository's directory. * * @param req * the current HTTP request. * @param repositoryName * name of the repository, as present in the URL. * @param db * the opened repository instance. * @return true if the repository is accessible; false if not. * @throws IOException * the repository could not be accessed, the caller will claim * the repository does not exist. */ protected boolean isExportOk(C req, String repositoryName, Repository db) throws IOException { if (isExportAll()) return true; else if (db.getDirectory() != null) return new File(db.getDirectory(), "git-daemon-export-ok").exists(); //$NON-NLS-1$ else return false; }
/** * Check if this repository can be served. * <p> * The default implementation of this method returns true only if either * {@link #isExportAll()} is true, or the {@code git-daemon-export-ok} file * is present in the repository's directory. * * @param req * the current HTTP request. * @param repositoryName * name of the repository, as present in the URL. * @param db * the opened repository instance. * @return true if the repository is accessible; false if not. * @throws java.io.IOException * the repository could not be accessed, the caller will claim * the repository does not exist. */ protected boolean isExportOk(C req, String repositoryName, Repository db) throws IOException { if (isExportAll()) return true; else if (db.getDirectory() != null) return new File(db.getDirectory(), "git-daemon-export-ok").exists(); //$NON-NLS-1$ else return false; }