// Path: src/main/java/com/cisco/cta/taxii/adapter/NonWindowsCondition.java
// public class NonWindowsCondition implements Condition {
// 
//     public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
//         return ! SystemUtils.IS_OS_WINDOWS;
//     }
// }
// 
// Path: src/main/java/com/cisco/cta/taxii/adapter/settings/SettingsConfiguration.java
// @Configuration
// @EnableConfigurationProperties
// public class SettingsConfiguration {
// 
//     @Bean
//     public TaxiiServiceSettings taxiiServiceSettings() {
//         return new TaxiiServiceSettings();
//     }
// 
//     @Bean
//     public TransformSettings transformSettings() {
//         return new TransformSettings();
//     }
// 
//     @Bean
//     public ScheduleSettings scheduleSettings() {
//         return new ScheduleSettings();
//     }
//     
//     @Bean
//     public ProxySettings proxySettings() {
//         return new ProxySettings();
//     }
// 
// }
// 
// Path: src/main/java/com/cisco/cta/taxii/adapter/settings/TaxiiServiceSettings.java
// @ConfigurationProperties(prefix="taxii-service")
// @Data
// @Validated
// public class TaxiiServiceSettings {
// 
//     private static final Charset UTF8 = Charset.forName("UTF-8");
// 
//     @NotNull
//     private URL pollEndpoint;
// 
//     @NotNull
//     private String username;
// 
//     @NotNull
//     private String password;
// 
//     private List<String> feeds;
// 
//     private File feedNamesFile;
// 
//     private File statusFile = new File("taxii-status.xml");
// 
//     @PostConstruct
//     public void loadFeedNames() throws IOException {
//         Preconditions.checkState(
//             feeds != null ^ feedNamesFile != null,
//             "taxii-service.feeds or taxii-service.feedNamesFile must be set");
//         if (feedNamesFile != null) {
//             feeds = Files.readLines(feedNamesFile, UTF8);
//         }
//     }
// }


import org.dellroad.stuff.pobj.PersistentObject;
import org.dellroad.stuff.pobj.PersistentObjectDelegate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import com.cisco.cta.taxii.adapter.NonWindowsCondition;
import com.cisco.cta.taxii.adapter.settings.SettingsConfiguration;
import com.cisco.cta.taxii.adapter.settings.TaxiiServiceSettings;
/*
   Copyright 2015 Cisco Systems

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package com.cisco.cta.taxii.adapter.persistence;



/**
 * Unix/Linux specific part of the {@link PersistenceConfiguration}.
 */
@Configuration
@Conditional(NonWindowsCondition.class)
@Import(SettingsConfiguration.class)
public class LinuxPersistenceConfiguration {

    @Autowired
// Path: src/main/java/com/cisco/cta/taxii/adapter/NonWindowsCondition.java
// public class NonWindowsCondition implements Condition {
// 
//     public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
//         return ! SystemUtils.IS_OS_WINDOWS;
//     }
// }
// 
// Path: src/main/java/com/cisco/cta/taxii/adapter/settings/SettingsConfiguration.java
// @Configuration
// @EnableConfigurationProperties
// public class SettingsConfiguration {
// 
//     @Bean
//     public TaxiiServiceSettings taxiiServiceSettings() {
//         return new TaxiiServiceSettings();
//     }
// 
//     @Bean
//     public TransformSettings transformSettings() {
//         return new TransformSettings();
//     }
// 
//     @Bean
//     public ScheduleSettings scheduleSettings() {
//         return new ScheduleSettings();
//     }
//     
//     @Bean
//     public ProxySettings proxySettings() {
//         return new ProxySettings();
//     }
// 
// }
// 
// Path: src/main/java/com/cisco/cta/taxii/adapter/settings/TaxiiServiceSettings.java
// @ConfigurationProperties(prefix="taxii-service")
// @Data
// @Validated
// public class TaxiiServiceSettings {
// 
//     private static final Charset UTF8 = Charset.forName("UTF-8");
// 
//     @NotNull
//     private URL pollEndpoint;
// 
//     @NotNull
//     private String username;
// 
//     @NotNull
//     private String password;
// 
//     private List<String> feeds;
// 
//     private File feedNamesFile;
// 
//     private File statusFile = new File("taxii-status.xml");
// 
//     @PostConstruct
//     public void loadFeedNames() throws IOException {
//         Preconditions.checkState(
//             feeds != null ^ feedNamesFile != null,
//             "taxii-service.feeds or taxii-service.feedNamesFile must be set");
//         if (feedNamesFile != null) {
//             feeds = Files.readLines(feedNamesFile, UTF8);
//         }
//     }
// }


// Path: src/main/java/com/cisco/cta/taxii/adapter/persistence/LinuxPersistenceConfiguration.java
import org.dellroad.stuff.pobj.PersistentObject;
import org.dellroad.stuff.pobj.PersistentObjectDelegate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import com.cisco.cta.taxii.adapter.NonWindowsCondition;
import com.cisco.cta.taxii.adapter.settings.SettingsConfiguration;
import com.cisco.cta.taxii.adapter.settings.TaxiiServiceSettings;

/*
   Copyright 2015 Cisco Systems

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

package com.cisco.cta.taxii.adapter.persistence;



/**
 * Unix/Linux specific part of the {@link PersistenceConfiguration}.
 */
@Configuration
@Conditional(NonWindowsCondition.class)
@Import(SettingsConfiguration.class)
public class LinuxPersistenceConfiguration {

    @Autowired
    private TaxiiServiceSettings taxiiServiceSettings;