public String trim(final Object target) { if (target == null) { return null; } return StringUtils.trim(target); }
public String trim(final Object target) { return StringUtils.trim(target); }
public static boolean hasAnyRoles(final Collection<String> roles) { if (SecurityUtils.getSubject() != null) { final Subject subject = SecurityUtils.getSubject(); for (final String role : roles) { if (subject.hasRole(StringUtils.trim(role))) { return true; } } } return false; }
public static boolean hasAnyRoles(final Collection<String> roles) { if (SecurityUtils.getSubject() != null) { final Subject subject = SecurityUtils.getSubject(); for (final String role : roles) { if (subject.hasRole(StringUtils.trim(role))) { return true; } } } return false; }
public static boolean hasAllRoles(final String... roles) { if (SecurityUtils.getSubject() != null) { final Subject subject = SecurityUtils.getSubject(); for (final String role : roles) { if (!subject.hasRole(StringUtils.trim(role))) { return false; } } return true; } return false; }
public static boolean hasAnyRoles(final String... roles) { if (SecurityUtils.getSubject() != null) { final Subject subject = SecurityUtils.getSubject(); for (final String role : roles) { if (subject.hasRole(StringUtils.trim(role))) { return true; } } } return false; }
public static boolean hasAllRoles(final Collection<String> roles) { if (SecurityUtils.getSubject() != null) { if (roles.isEmpty()) { return false; } final Subject subject = SecurityUtils.getSubject(); for (final String role : roles) { if (!subject.hasRole(StringUtils.trim(role))) { return false; } } return true; } return false; }
public static boolean hasAllRoles(final Collection<String> roles) { if (SecurityUtils.getSubject() != null) { if (roles.isEmpty()) { return false; } final Subject subject = SecurityUtils.getSubject(); for (final String role : roles) { if (!subject.hasRole(StringUtils.trim(role))) { return false; } } return true; } return false; }
public static String getRawValue(final IProcessableElementTag element, final String attributeName) { notNull(element, "element must not be null"); notEmpty(attributeName, "attributeName must not be empty"); final String rawValue = trim(element.getAttributeValue(attributeName)); notEmpty(rawValue, "value of '" + attributeName + "' must not be empty"); return rawValue; }
public static String getRawValue(final IProcessableElementTag element, final String attributeName) { notNull(element, "element must not be null"); notEmpty(attributeName, "attributeName must not be empty"); final String rawValue = trim(element.getAttributeValue(attributeName)); notEmpty(rawValue, "value of '" + attributeName + "' must not be empty"); return rawValue; }
public static String getRawValue(final Element element, final String attributeName) { Validate.notNull(element, "element must not be null"); Validate.notEmpty(attributeName, "attributeName must not be empty"); final String rawValue = StringUtils.trim(element.getAttributeValue(attributeName)); Validate.notEmpty(rawValue, "value of '" + attributeName + "' must not be empty"); return rawValue; } }
public static String getRawValue(final IProcessableElementTag element, final AttributeName attributeName) { notNull(element, "element must not be null"); notNull(attributeName, "attributeName must not be empty"); final String rawValue = trim(element.getAttributeValue(attributeName)); notEmpty(rawValue, "value of '" + attributeName + "' must not be empty"); return rawValue; }
public static String getRawValue(final IProcessableElementTag element, final AttributeName attributeName) { notNull(element, "element must not be null"); notNull(attributeName, "attributeName must not be empty"); final String rawValue = trim(element.getAttributeValue(attributeName)); notEmpty(rawValue, "value of '" + attributeName + "' must not be empty"); return rawValue; }