/** * @since 1.2.0 */ public void setOptionalFieldNames(String... optionalFieldNames) { this.optionalFieldNames = Collections.toList(optionalFieldNames); }
/** * @since 1.2.0 */ public void setOptionalFieldNames(String... optionalFieldNames) { this.optionalFieldNames = Collections.toList(optionalFieldNames); }
public void setDisabledFieldNames(String... disabledFieldNames) { this.disabledFieldNames = Collections.toList(disabledFieldNames); }
public void setDefaultFieldNames(String... defaultFieldNames) { this.defaultFieldNames = Collections.toList(defaultFieldNames); }
public void setDisabledFieldNames(String... disabledFieldNames) { this.disabledFieldNames = Collections.toList(disabledFieldNames); }
public void setDefaultFieldNames(String... defaultFieldNames) { this.defaultFieldNames = Collections.toList(defaultFieldNames); }
/** * @since 1.0.RC8 */ private Object convertAttributeStatementMappingRulesToMap(Object object){ Set<Object> elementsSet = (Set<Object>) object; Map<String, List<Object>> map = new HashMap<String, List<Object>>(); List<Object> list = Collections.toList(elementsSet.toArray()); map.put("items", list); return map; } }
/** * @since 1.0.RC8 */ private Object convertAttributeStatementMappingRulesToMap(Object object){ Set<Object> elementsSet = (Set<Object>) object; Map<String, List<Object>> map = new HashMap<String, List<Object>>(); List<Object> list = Collections.toList(elementsSet.toArray()); map.put("items", list); return map; } }
@Override protected List<ErrorModel> toErrors(HttpServletRequest request, Form form, Exception e) { return com.stormpath.sdk.lang.Collections.toList(errorModelFactory.toError(request, e)); }
@Override protected List<ErrorModel> toErrors(HttpServletRequest request, Form form, Exception e) { return com.stormpath.sdk.lang.Collections.toList(errorModelFactory.toError(request, e)); }
@Override protected List<ErrorModel> toErrors(HttpServletRequest request, Form form, Exception e) { return Collections.toList(errorModelFactory.toError(request, e)); }
@Override protected List<ErrorModel> toErrors(HttpServletRequest request, Form form, Exception e) { return Collections.toList(errorModelFactory.toError(request, e)); }
protected void setParts(String wildcardString, boolean caseSensitive) { if (wildcardString == null || wildcardString.trim().length() == 0) { throw new IllegalArgumentException("Wildcard string cannot be null or empty. Make sure permission strings are properly formatted."); } wildcardString = wildcardString.trim(); List<String> parts = Collections.toList(wildcardString.split(PART_DIVIDER_TOKEN)); this.parts = new ArrayList<Set<String>>(); for (String part : parts) { Set<String> subparts = Collections.toSet(part.split(SUBPART_DIVIDER_TOKEN)); if (subparts.isEmpty()) { throw new IllegalArgumentException("Wildcard string cannot contain parts with only dividers. Make sure permission strings are properly formatted."); } this.parts.add(subparts); } if (this.parts.isEmpty()) { throw new IllegalArgumentException("Wildcard string cannot contain only dividers. Make sure permission strings are properly formatted."); } }
public FilterChainResolver stormpathFilterChainResolver() { PathMatchingFilterChainResolver resolver = new PathMatchingFilterChainResolver(servletContext); resolver.setFilterChainManager(stormpathFilterChainManager()); if (pathMatcher != null) { resolver.setPathMatcher(new SpringPatternMatcher(pathMatcher)); } // The account resolver filter always executes immediately after the StormpathFilter but // before any other configured filters in the chain: // // if we have a AccountResolverFilter available, use it otherwise, create one that is NOT exposed as a Spring // bean. It is used only by the PrioritizedFilterChainResolver AccountResolverFilter accountResolverFilter = this.accountResolverFilter; if (accountResolverFilter == null) { accountResolverFilter = new AccountResolverFilter(); accountResolverFilter.setEnabled(stormpathFilterEnabled); accountResolverFilter.setResolvers(stormpathAccountResolvers()); accountResolverFilter.setOauthEndpointUri(stormpathAccessTokenConfig().getAccessTokenUri()); } List<Filter> priorityFilters = Collections.<Filter>toList(accountResolverFilter); if (corsEnabled) { priorityFilters.add(newCorsFilter()); } return new PrioritizedFilterChainResolver(resolver, priorityFilters); }
public FilterChainResolver stormpathFilterChainResolver() { PathMatchingFilterChainResolver resolver = new PathMatchingFilterChainResolver(servletContext); resolver.setFilterChainManager(stormpathFilterChainManager()); if (pathMatcher != null) { resolver.setPathMatcher(new SpringPatternMatcher(pathMatcher)); } // The account resolver filter always executes immediately after the StormpathFilter but // before any other configured filters in the chain: // // if we have a AccountResolverFilter available, use it otherwise, create one that is NOT exposed as a Spring // bean. It is used only by the PrioritizedFilterChainResolver AccountResolverFilter accountResolverFilter = this.accountResolverFilter; if (accountResolverFilter == null) { accountResolverFilter = new AccountResolverFilter(); accountResolverFilter.setEnabled(stormpathFilterEnabled); accountResolverFilter.setResolvers(stormpathAccountResolvers()); accountResolverFilter.setOauthEndpointUri(stormpathAccessTokenConfig().getAccessTokenUri()); } List<Filter> priorityFilters = Collections.<Filter>toList(accountResolverFilter); if (corsEnabled) { priorityFilters.add(newCorsFilter()); } return new PrioritizedFilterChainResolver(resolver, priorityFilters); }