Author: anil.saldhana(a)jboss.com
Date: 2011-01-24 21:03:02 -0500 (Mon, 24 Jan 2011)
New Revision: 646
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLAssertionWriter.java
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/PicketLinkSTSUnitTestCase.java
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/SAML20TokenProviderUnitTestCase.java
federation/trunk/picketlink-xmlsec-model/src/main/java/org/picketlink/identity/xmlsec/w3/xmldsig/X509DataType.java
Log:
refactor method name
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLAssertionWriter.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLAssertionWriter.java 2011-01-24
23:24:18 UTC (rev 645)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLAssertionWriter.java 2011-01-25
02:03:02 UTC (rev 646)
@@ -501,11 +501,11 @@
else if (content instanceof X509DataType)
{
X509DataType type = (X509DataType) content;
- if (type.getX509IssuerSerialOrX509SKIOrX509SubjectName().size() == 0)
+ if (type.getDataObjects().size() == 0)
throw new ProcessingException("X509Data cannot be empy");
StaxUtil.writeStartElement(this.writer,
WSTrustConstants.XMLDSig.DSIG_PREFIX,
WSTrustConstants.XMLDSig.X509DATA, WSTrustConstants.XMLDSig.DSIG_NS);
- Object obj = type.getX509IssuerSerialOrX509SKIOrX509SubjectName().get(0);
+ Object obj = type.getDataObjects().get(0);
if (obj instanceof Element)
{
Element element = (Element) obj;
Modified:
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/PicketLinkSTSUnitTestCase.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/PicketLinkSTSUnitTestCase.java 2011-01-24
23:24:18 UTC (rev 645)
+++
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/PicketLinkSTSUnitTestCase.java 2011-01-25
02:03:02 UTC (rev 646)
@@ -1256,8 +1256,8 @@
{
X509DataType x509Data = (X509DataType) keyInfo.getContent().get(0);
assertEquals("Unexpected X509 data content size", 1, x509Data
- .getX509IssuerSerialOrX509SKIOrX509SubjectName().size());
- Object content =
x509Data.getX509IssuerSerialOrX509SKIOrX509SubjectName().get(0);
+ .getDataObjects().size());
+ Object content = x509Data.getDataObjects().get(0);
assertTrue("Unexpected X509 data content type", content instanceof
X509CertificateType);
byte[] encodedCertificate = ((X509CertificateType)
content).getEncodedCertificate();
Modified:
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/SAML20TokenProviderUnitTestCase.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/SAML20TokenProviderUnitTestCase.java 2011-01-24
23:24:18 UTC (rev 645)
+++
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/SAML20TokenProviderUnitTestCase.java 2011-01-25
02:03:02 UTC (rev 646)
@@ -241,9 +241,9 @@
// key info should contain a X509Data section with the encoded certificate.
X509DataType x509Data = (X509DataType) keyInfo.getContent().get(0);
- assertEquals("Unexpected X509 data content size", 1,
x509Data.getX509IssuerSerialOrX509SKIOrX509SubjectName()
+ assertEquals("Unexpected X509 data content size", 1,
x509Data.getDataObjects()
.size());
- X509CertificateType cert = (X509CertificateType)
x509Data.getX509IssuerSerialOrX509SKIOrX509SubjectName().get(0);
+ X509CertificateType cert = (X509CertificateType) x509Data.getDataObjects().get(0);
// certificate should have been encoded to Base64, so we need to decode it first.
byte[] encodedCert = Base64.decode(new String(cert.getEncodedCertificate()));
Modified:
federation/trunk/picketlink-xmlsec-model/src/main/java/org/picketlink/identity/xmlsec/w3/xmldsig/X509DataType.java
===================================================================
---
federation/trunk/picketlink-xmlsec-model/src/main/java/org/picketlink/identity/xmlsec/w3/xmldsig/X509DataType.java 2011-01-24
23:24:18 UTC (rev 645)
+++
federation/trunk/picketlink-xmlsec-model/src/main/java/org/picketlink/identity/xmlsec/w3/xmldsig/X509DataType.java 2011-01-25
02:03:02 UTC (rev 646)
@@ -77,7 +77,7 @@
* {@link Element }
* {@link Object }
*/
- public List<Object> getX509IssuerSerialOrX509SKIOrX509SubjectName()
+ public List<Object> getDataObjects()
{
return Collections.unmodifiableList(
this.x509IssuerSerialOrX509SKIOrX509SubjectName );
}
Show replies by date