[jboss-cvs] JBossAS SVN: r71640 - projects/security/security-xacml/trunk/jboss-xacml-saml/src/main/java/org/jboss/security/xacml/saml/integration/opensaml/request.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Apr 2 18:01:19 EDT 2008
Author: anil.saldhana at jboss.com
Date: 2008-04-02 18:01:19 -0400 (Wed, 02 Apr 2008)
New Revision: 71640
Added:
projects/security/security-xacml/trunk/jboss-xacml-saml/src/main/java/org/jboss/security/xacml/saml/integration/opensaml/request/JBossSAMLRequest.java
Removed:
projects/security/security-xacml/trunk/jboss-xacml-saml/src/main/java/org/jboss/security/xacml/saml/integration/opensaml/request/SAMLRequest.java
Log:
rename the class to JBossSAMLRequest
Copied: projects/security/security-xacml/trunk/jboss-xacml-saml/src/main/java/org/jboss/security/xacml/saml/integration/opensaml/request/JBossSAMLRequest.java (from rev 71518, projects/security/security-xacml/trunk/jboss-xacml-saml/src/main/java/org/jboss/security/xacml/saml/integration/opensaml/request/SAMLRequest.java)
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml-saml/src/main/java/org/jboss/security/xacml/saml/integration/opensaml/request/JBossSAMLRequest.java (rev 0)
+++ projects/security/security-xacml/trunk/jboss-xacml-saml/src/main/java/org/jboss/security/xacml/saml/integration/opensaml/request/JBossSAMLRequest.java 2008-04-02 22:01:19 UTC (rev 71640)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.security.xacml.saml.integration.opensaml.request;
+
+import java.io.File;
+import java.io.InputStream;
+
+import org.jboss.security.xacml.saml.integration.opensaml.util.DOMUtil;
+import org.jboss.security.xacml.saml.integration.opensaml.util.SAML2Util;
+import org.opensaml.common.SAMLObject;
+import org.opensaml.xml.io.UnmarshallingException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Represents a SAML Request
+ * @author Anil.Saldhana at redhat.com
+ * @since Mar 27, 2008
+ * @version $Revision$
+ */
+public class JBossSAMLRequest
+{
+ public SAMLObject getSAMLRequest(String requestFile) throws Exception
+ {
+ Document document = DOMUtil.parse(new File(requestFile), true);
+ return getSAMLObject(document);
+ }
+
+ public SAMLObject getSAMLRequest(InputStream requestStream)
+ throws Exception
+ {
+ Document document = DOMUtil.parse(requestStream, true);
+ return getSAMLObject(document);
+ }
+
+ private SAMLObject getSAMLObject(Document document) throws UnmarshallingException
+ {
+ if(document == null)
+ throw new IllegalStateException("Document parsed is null");
+
+ SAML2Util util = new SAML2Util();
+ Element docElement = document.getDocumentElement();
+ if(docElement == null)
+ throw new IllegalStateException("Document Element is null");
+ return (SAMLObject) util.toXMLObject(docElement);
+ }
+}
\ No newline at end of file
Deleted: projects/security/security-xacml/trunk/jboss-xacml-saml/src/main/java/org/jboss/security/xacml/saml/integration/opensaml/request/SAMLRequest.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml-saml/src/main/java/org/jboss/security/xacml/saml/integration/opensaml/request/SAMLRequest.java 2008-04-02 21:58:33 UTC (rev 71639)
+++ projects/security/security-xacml/trunk/jboss-xacml-saml/src/main/java/org/jboss/security/xacml/saml/integration/opensaml/request/SAMLRequest.java 2008-04-02 22:01:19 UTC (rev 71640)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.security.xacml.saml.integration.opensaml.request;
-
-import java.io.File;
-
-import org.jboss.security.xacml.saml.integration.opensaml.util.DOMUtil;
-import org.jboss.security.xacml.saml.integration.opensaml.util.SAML2Util;
-import org.opensaml.common.SAMLObject;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * Represents a SAML Request
- * @author Anil.Saldhana at redhat.com
- * @since Mar 27, 2008
- * @version $Revision$
- */
-public class SAMLRequest
-{
- public SAMLObject getSAMLRequest(String requestFile) throws Exception
- {
- Document document = DOMUtil.parse(new File(requestFile), true);
- if(document == null)
- throw new IllegalStateException("Document parsed is null");
-
- SAML2Util util = new SAML2Util();
- Element docElement = document.getDocumentElement();
- if(docElement == null)
- throw new IllegalStateException("Document Element is null");
- return (SAMLObject) util.toXMLObject(docElement);
- }
-}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list