/** * Returns {@code true} if the repository is healthy. * * * @return {@code true} if the repository is healthy * * @since 1.36 */ public boolean isHealthy() { return Util.isEmpty(healthCheckFailures); }
/** * Returns {@code true} if the repository is healthy. * * * @return {@code true} if the repository is healthy * * @since 1.36 */ public boolean isHealthy() { return Util.isEmpty(healthCheckFailures); }
/** * Method description * * * @param revision * * @return */ public static String getRevision(String revision) { return Util.isEmpty(revision) ? REVISION_TIP : revision; }
/** * Method description * * * @param array */ public static void assertIsNotEmpty(Object[] array) { if (Util.isEmpty(array)) { throw new IllegalStateException("array is empty"); } }
/** * Method description * * * @param array */ public static void assertIsNotEmpty(Object[] array) { if (Util.isEmpty(array)) { throw new IllegalStateException("array is empty"); } }
/** * Returns true if the given directory is empty. * * * @param directory directory to check * * @return true if the directory is empty * @since 1.16 */ public static boolean isEmpty(File directory) { return Util.isEmpty(directory.listFiles()); }
/** * Method description * * * @param collection */ public static void assertIsNotEmpty(Collection<?> collection) { if (Util.isEmpty(collection)) { throw new IllegalStateException("collection is empty"); } }
/** * Method description * * * @param value */ public static void assertIsNotEmpty(String value) { if (Util.isEmpty(value)) { throw new IllegalStateException("value is empty"); } }
/** * Returns true if the given directory is empty. * * * @param directory directory to check * * @return true if the directory is empty * @since 1.16 */ public static boolean isEmpty(File directory) { return Util.isEmpty(directory.listFiles()); }
/** * Method description * * * @param value */ public static void assertIsNotEmpty(String value) { if (Util.isEmpty(value)) { throw new IllegalStateException("value is empty"); } }
/** * Method description * * * @param collection */ public static void assertIsNotEmpty(Collection<?> collection) { if (Util.isEmpty(collection)) { throw new IllegalStateException("collection is empty"); } }
private List<String> appendBranches(Builder<String> builder, Changeset c) { List<String> branches = c.getBranches(); if (Util.isEmpty(branches)) { builder.add(AbstractChangesetCommand.BRANCH_DEFAULT); } else { builder.addAll(branches); } return branches; }
@Override public boolean isPathMatching(Repository repository, String path) { String repositoryName = repository.getName(); if (path.startsWith(repositoryName)) { String pathPart = path.substring(repositoryName.length()); // git repository may also be named <<repo-name>>.git by convention if (pathPart.startsWith(GitRepositoryHandler.DOT_GIT)) { // if this is the case, just also cut it away pathPart = pathPart.substring(GitRepositoryHandler.DOT_GIT.length()); } return Util.isEmpty(pathPart) || pathPart.startsWith(HttpUtil.SEPARATOR_PATH); } return false; }
/** * Returns true if the person is valid. * * * @return true if the person is valid */ @Override public boolean isValid() { return Util.isNotEmpty(name) && (Util.isEmpty(mail) || ValidationUtil.isMailAddressValid(mail)); }
/** * Returns true if the person is valid. * * * @return true if the person is valid */ @Override public boolean isValid() { return Util.isNotEmpty(name) && (Util.isEmpty(mail) || ValidationUtil.isMailAddressValid(mail)); }
/** * Returns true if the {@link Repository} is valid. * <ul> * <li>The name is not empty and contains only A-z, 0-9, _, -, /</li> * <li>The type is not empty</li> * <li>The contact is empty or contains a valid email address</li> * </ul> * * * @return true if the {@link Repository} is valid */ @Override public boolean isValid() { return ValidationUtil.isRepositoryNameValid(name) && Util.isNotEmpty(type) && ((Util.isEmpty(contact)) || ValidationUtil.isMailAddressValid(contact)); }
/** * Method description * * * @param context * @param groups * * @return */ private boolean isPermitted(WebSecurityContext context, Set<String> groups) { Collection<String> userGroups = context.getGroups(); return Util.isEmpty(groups) || (Util.isNotEmpty(userGroups) && Util.containsOne(userGroups, groups)); }
/** * Returns true if the {@link Repository} is valid. * <ul> * <li>The name is not empty and contains only A-z, 0-9, _, -, /</li> * <li>The type is not empty</li> * <li>The contact is empty or contains a valid email address</li> * </ul> * * * @return true if the {@link Repository} is valid */ @Override public boolean isValid() { return ValidationUtil.isRepositoryNameValid(name) && Util.isNotEmpty(type) && ((Util.isEmpty(contact)) || ValidationUtil.isMailAddressValid(contact)); }
/** * Method description * * * @return */ @Override public boolean isValid() { return ValidationUtil.isUsernameValid(name) && Util.isNotEmpty(displayName) && Util.isNotEmpty(type) && ((Util.isEmpty(mail)) || ValidationUtil.isMailAddressValid(mail)); }
/** * Method description * * * @return */ @Override public boolean isValid() { return ValidationUtil.isUsernameValid(name) && Util.isNotEmpty(displayName) && Util.isNotEmpty(type) && ((Util.isEmpty(mail)) || ValidationUtil.isMailAddressValid(mail)); }