Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AD56510B65 for ; Tue, 16 Jul 2013 10:12:55 +0000 (UTC) Received: (qmail 37741 invoked by uid 500); 16 Jul 2013 10:12:55 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 37698 invoked by uid 500); 16 Jul 2013 10:12:55 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 37691 invoked by uid 99); 16 Jul 2013 10:12:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jul 2013 10:12:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jul 2013 10:12:54 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id EA6E82388860; Tue, 16 Jul 2013 10:12:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1503645 - /cxf/trunk/rt/security/src/main/java/org/apache/cxf/rt/security/xacml/DefaultXACMLRequestBuilder.java Date: Tue, 16 Jul 2013 10:12:33 -0000 To: commits@cxf.apache.org From: coheigea@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130716101233.EA6E82388860@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: coheigea Date: Tue Jul 16 10:12:33 2013 New Revision: 1503645 URL: http://svn.apache.org/r1503645 Log: Send the Resources as a single Attribute Modified: cxf/trunk/rt/security/src/main/java/org/apache/cxf/rt/security/xacml/DefaultXACMLRequestBuilder.java Modified: cxf/trunk/rt/security/src/main/java/org/apache/cxf/rt/security/xacml/DefaultXACMLRequestBuilder.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/security/src/main/java/org/apache/cxf/rt/security/xacml/DefaultXACMLRequestBuilder.java?rev=1503645&r1=1503644&r2=1503645&view=diff ============================================================================== --- cxf/trunk/rt/security/src/main/java/org/apache/cxf/rt/security/xacml/DefaultXACMLRequestBuilder.java (original) +++ cxf/trunk/rt/security/src/main/java/org/apache/cxf/rt/security/xacml/DefaultXACMLRequestBuilder.java Tue Jul 16 10:12:33 2013 @@ -72,12 +72,27 @@ public class DefaultXACMLRequestBuilder private ResourceType createResourceType(List resources) { List attributes = new ArrayList(); + + List resourceAttributes = new ArrayList(); for (String resource : resources) { if (resource != null) { - attributes.add(createAttribute(XACMLConstants.RESOURCE_ID, XACMLConstants.XS_STRING, null, - resource)); + AttributeValueType resourceAttributeValue = + RequestComponentBuilder.createAttributeValueType(resource); + resourceAttributes.add(resourceAttributeValue); } } + + if (!resourceAttributes.isEmpty()) { + AttributeType resourceAttribute = + createAttribute( + XACMLConstants.RESOURCE_ID, + XACMLConstants.XS_STRING, + null, + resourceAttributes + ); + attributes.add(resourceAttribute); + } + return RequestComponentBuilder.createResourceType(attributes, null); }