@ Override public MatchResponse getMatchResponse ( SecurityConstraint securityConstraint , String resourceName , String method ) { CollectionMatch collectionMatch = getCollectionMatch ( securityConstraint . getWebResourceCollections ( ) , resourceName , method ) ; if ( CollectionMatch . RESPONSE_NO_MATCH . equals ( collectionMatch ) || ( collectionMatch == null && securityConstraint . getRoles ( ) . isEmpty ( ) && securityConstraint . isAccessPrecluded ( ) == false ) ) { return MatchResponse . NO_MATCH_RESPONSE ; } else if ( collectionMatch == null ) { return MatchResponse . CUSTOM_NO_MATCH_RESPONSE ; } return new MatchResponse ( securityConstraint . getRoles ( ) , securityConstraint . isSSLRequired ( ) , securityConstraint . isAccessPrecluded ( ) , collectionMatch ) ; }
Gets the response object that contains the roles the SSL required and access precluded indicators . Gets the response using the custom method algorithm . If the collection match returned from the collection is null then response must be CUSTOM_NO_MATCH_RESPONSE .