Spring Extensions

com.myjeeva.spring.security.util
Class CrossDomainMapperImpl

java.lang.Object
  extended by com.myjeeva.spring.security.util.CrossDomainMapperImpl
All Implemented Interfaces:
CrossDomainMapper

public class CrossDomainMapperImpl
extends Object
implements CrossDomainMapper

Concrete implementation of CrossDomainMapper that obtains HTTP domain:HTTPS domain pairs from the application context.

So map the all the cross domain name entry in the application context for respective ports defined in the PortMapper

Author:
Jeevanandam ([email protected])

Constructor Summary
CrossDomainMapperImpl()
           
 
Method Summary
 Map getTranslatedPortMappings()
          Returns the translated (cross domain name -> cross domain name) version of the respective cross domain name mapping specified via setCrossDomainMappings(Map)
 String lookupHttpCrossDomain(String httpsDomainName)
          returns the HTTP domain Name
 String lookupHttpsCrossDomain(String httpDomainName)
          returns the HTTPS domain name
 void setCrossDomainMappings(Map newCrossDomainMappings)
          Set to map the cross domain respectively to port mappings defined in the PortMapper In a Spring XML ApplicationContext, a definition would look something like this:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CrossDomainMapperImpl

public CrossDomainMapperImpl()
Method Detail

getTranslatedPortMappings

public Map getTranslatedPortMappings()
Returns the translated (cross domain name -> cross domain name) version of the respective cross domain name mapping specified via setCrossDomainMappings(Map)


lookupHttpCrossDomain

public String lookupHttpCrossDomain(String httpsDomainName)
returns the HTTP domain Name

Specified by:
lookupHttpCrossDomain in interface CrossDomainMapper
Parameters:
httpsDomainName - a String object.
Returns:
the HTTP cross domain name or null if unknown

lookupHttpsCrossDomain

public String lookupHttpsCrossDomain(String httpDomainName)
returns the HTTPS domain name

Specified by:
lookupHttpsCrossDomain in interface CrossDomainMapper
Parameters:
httpDomainName - a String object.
Returns:
the HTTPS cross domain name or null if unknown

setCrossDomainMappings

public void setCrossDomainMappings(Map newCrossDomainMappings)
Set to map the cross domain respectively to port mappings defined in the PortMapper In a Spring XML ApplicationContext, a definition would look something like this:
  <property name="crossDomainMappings">
      <map>
          <entry key="company.com"><value>sso.company.com</value></entry>
          <entry key="internal.company.com"><value>auth.internal.company.com</value></entry>
      </map>
 </property>

Parameters:
newCrossDomainMappings - - A Map consisting of String keys and String values, where for each entry the key is the string representation of an HTTP cross domain, and the value is the string representation of the corresponding integer HTTPS cross domain.
Throws:
IllegalArgumentException - if input map does not consist of String keys and values.

Spring Extensions

Copyright © 2010-2012 www.myjeeva.com, All rights reserved.

The copyright of the pages and contents on this website is with myjeeva.com and the content is licensed under Creative Commons Attribution-Share Alike 3.0 Unported License. Libraries and code snippets on myjeeva.com has license information.