Changeset 5


Ignore:
Timestamp:
09/26/11 17:26:27 (8 years ago)
Author:
philsmart
Message:
 
Location:
wayfless-url-generator/trunk/src/main
Files:
3 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • wayfless-url-generator/trunk/src/main/java/uk/ac/cardiff/wayf/urlgenerator/metadata/SamlMetadataHandler.java

    r4 r5  
    1414import org.slf4j.LoggerFactory; 
    1515 
    16 public class SamlMetadataHandler { 
     16public interface SamlMetadataHandler { 
    1717 
    18     /** class logger */ 
    19     private final Logger log = LoggerFactory.getLogger(SamlMetadataHandler.class); 
    20  
    21     /** Parser manager used to parse XML. */ 
    22     protected static BasicParserPool parser; 
    23  
    24     /** Registered providers. */ 
    25     private List<MetadataProvider> providers; 
    26  
    27     public SamlMetadataHandler(List<String> SAMLMetadataURIs) { 
    28         try { 
    29             loadSAMLMetadata(SAMLMetadataURIs); 
    30         } catch (MetadataProviderException e) { 
    31             log.error("Could not load SAML metadata ", e); 
    32         } catch (ConfigurationException e) { 
    33             log.error("Could not load SAML metadata, configuration exception ", e); 
    34         } 
    35     } 
    36  
    37     private void loadSAMLMetadata(List<String> SAMLMetadataURIs) throws MetadataProviderException, 
    38             ConfigurationException { 
    39         DefaultBootstrap.bootstrap(); 
    40         parser = new BasicParserPool(); 
    41         parser.setNamespaceAware(true); 
    42  
    43         for (String metadataURI : SAMLMetadataURIs) { 
    44             FilesystemMetadataProvider provider = new FilesystemMetadataProvider(new File(metadataURI)); 
    45             provider.setParserPool(parser); 
    46             provider.initialize(); 
    47             providers.add(provider); 
    48             log.debug("Loaded SAML metatada {}", metadataURI); 
    49         } 
    50     } 
     18    
    5119 
    5220} 
  • wayfless-url-generator/trunk/src/main/webapp/WEB-INF/config/generator-servlet.xml

    r3 r5  
    3030        <import resource="webflow-config.xml" /> 
    3131 
     32    <!-- Database configuration --> 
    3233         <import resource="database.xml" /> 
     34          
     35         <!-- General Wugen bean configuration --> 
     36         <import resource="wugen-core.xml"/> 
    3337 
    3438</beans> 
Note: See TracChangeset for help on using the changeset viewer.