org.jboss.identity.federation.api.wstrust
Class WSTrustJAXBFactory

java.lang.Object
  extended by org.jboss.identity.federation.api.wstrust.WSTrustJAXBFactory

public class WSTrustJAXBFactory
extends java.lang.Object

This factory implements utility methods for converting between JAXB model objects and XML source.

Author:
Stefan Guilhen

Method Summary
static WSTrustJAXBFactory getInstance()
           Gets a reference to the singleton instance.
 javax.xml.transform.Source marshallRequestSecurityToken(BaseRequestSecurityToken request)
           Creates a javax.xml.transform.Source from the specified request object.
 javax.xml.transform.Source marshallRequestSecurityTokenResponse(BaseRequestSecurityTokenResponse response)
           Creates a javax.xml.transform.Source from the specified response object.
 BaseRequestSecurityToken parseRequestSecurityToken(javax.xml.transform.Source request)
           Creates a BaseRequestSecurityToken from the specified XML source.
 BaseRequestSecurityTokenResponse parseRequestSecurityTokenResponse(javax.xml.transform.Source response)
           Creates a BaseRequestSecurityTokenResponse from the specified XML source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static WSTrustJAXBFactory getInstance()

Gets a reference to the singleton instance.

Returns:
a reference to the WSTrustJAXBFactory instance.

parseRequestSecurityToken

public BaseRequestSecurityToken parseRequestSecurityToken(javax.xml.transform.Source request)

Creates a BaseRequestSecurityToken from the specified XML source.

Parameters:
request - the XML source containing the security token request message.
Returns:
the constructed BaseRequestSecurityToken instance. It will be an instance of RequestSecurityToken the message contains a single token request, and an instance of RequestSecurityTokenCollection if multiples requests are being made in the same message.

parseRequestSecurityTokenResponse

public BaseRequestSecurityTokenResponse parseRequestSecurityTokenResponse(javax.xml.transform.Source response)

Creates a BaseRequestSecurityTokenResponse from the specified XML source.

Parameters:
response - the XML source containing the security token response message.
Returns:
the constructed BaseRequestSecurityTokenResponse instance. It should return an instance of RequestSecurityTokenResponseCollection according to the specification, but we allow a single response to be returned in the form of a RequestSecurityTokenResponse instance.

marshallRequestSecurityToken

public javax.xml.transform.Source marshallRequestSecurityToken(BaseRequestSecurityToken request)

Creates a javax.xml.transform.Source from the specified request object.

Parameters:
request - a BaseRequestSecurityToken representing the object model of the security token request.
Returns:
the constructed Source instance.

marshallRequestSecurityTokenResponse

public javax.xml.transform.Source marshallRequestSecurityTokenResponse(BaseRequestSecurityTokenResponse response)

Creates a javax.xml.transform.Source from the specified response object.

Parameters:
response - a BaseRequestSecurityTokenResponse representing the object model of the security token response.
Returns:
the constructed Source instance.


Copyright © 2009 JBoss Inc.. All Rights Reserved.