// Path: src/main/java/io/pivotal/strepsirrhini/chaosloris/data/ChaosRepository.java
// @Repository
// public interface ChaosRepository extends JpaRepository<Chaos, Long> {
// 
//     /**
//      * Find all of the {@link Chaos}es related to an {@link Application}
//      *
//      * @param application the {@link Application} that {@link Chaos}es are related to
//      * @return a collection of {@link Chaos}es related to the {@link Application}
//      */
//     @Transactional(readOnly = true)
//     List<Chaos> findByApplication(Application application);
// 
//     /**
//      * Find all of the {@link Chaos}es related to a {@link Schedule}
//      *
//      * @param schedule the {@link Schedule} that {@link Chaos}es are related to
//      * @return a collection of {@link Chaos}es related to the {@link Schedule}
//      */
//     @Transactional(readOnly = true)
//     List<Chaos> findBySchedule(Schedule schedule);
// 
//     /**
//      * Find all of the {@link Chaos}es related to a {@link Schedule}
//      *
//      * @param id the id of {@link Schedule} that {@link Chaos}es are related to
//      * @return a collection of {@link Chaos}es related to the {@link Schedule}
//      */
//     @Transactional(readOnly = true)
//     List<Chaos> findByScheduleId(Long id);
// 
// }
// 
// Path: src/main/java/io/pivotal/strepsirrhini/chaosloris/data/EventRepository.java
// @Repository
// public interface EventRepository extends JpaRepository<Event, Long> {
// 
//     /**
//      * Find all of the {@link Event}s related to a {@link Chaos}
//      *
//      * @param chaos the {@link Chaos} that {@link Event}s are related to
//      * @return a collection of {@link Event}s related to the {@link Chaos}
//      */
//     @Transactional(readOnly = true)
//     List<Event> findByChaos(Chaos chaos);
// 
//     /**
//      * Find all of the {@link Event}s that occurred before an {@link Instant}
//      *
//      * @param instant the {@link Instant} to find {@link Event}s before
//      * @return a collection {@link Event}s that occurred before the {@link Instant}
//      */
//     @Transactional(readOnly = true)
//     List<Event> findByExecutedAtBefore(Instant instant);
// 
// }


import io.pivotal.strepsirrhini.chaosloris.data.ChaosRepository;
import io.pivotal.strepsirrhini.chaosloris.data.EventRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/*
 * Copyright 2015-2018 the original author or authors.
 *
 * 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 io.pivotal.strepsirrhini.chaosloris.destroyer;


@Component
final class StandardDestroyerFactory implements DestroyerFactory {

    private final ChaosRepository chaosRepository;

    private final EventRepository eventRepository;

    private final FateEngine fateEngine;

    private final Platform platform;

    @Autowired
// Path: src/main/java/io/pivotal/strepsirrhini/chaosloris/data/ChaosRepository.java
// @Repository
// public interface ChaosRepository extends JpaRepository<Chaos, Long> {
// 
//     /**
//      * Find all of the {@link Chaos}es related to an {@link Application}
//      *
//      * @param application the {@link Application} that {@link Chaos}es are related to
//      * @return a collection of {@link Chaos}es related to the {@link Application}
//      */
//     @Transactional(readOnly = true)
//     List<Chaos> findByApplication(Application application);
// 
//     /**
//      * Find all of the {@link Chaos}es related to a {@link Schedule}
//      *
//      * @param schedule the {@link Schedule} that {@link Chaos}es are related to
//      * @return a collection of {@link Chaos}es related to the {@link Schedule}
//      */
//     @Transactional(readOnly = true)
//     List<Chaos> findBySchedule(Schedule schedule);
// 
//     /**
//      * Find all of the {@link Chaos}es related to a {@link Schedule}
//      *
//      * @param id the id of {@link Schedule} that {@link Chaos}es are related to
//      * @return a collection of {@link Chaos}es related to the {@link Schedule}
//      */
//     @Transactional(readOnly = true)
//     List<Chaos> findByScheduleId(Long id);
// 
// }
// 
// Path: src/main/java/io/pivotal/strepsirrhini/chaosloris/data/EventRepository.java
// @Repository
// public interface EventRepository extends JpaRepository<Event, Long> {
// 
//     /**
//      * Find all of the {@link Event}s related to a {@link Chaos}
//      *
//      * @param chaos the {@link Chaos} that {@link Event}s are related to
//      * @return a collection of {@link Event}s related to the {@link Chaos}
//      */
//     @Transactional(readOnly = true)
//     List<Event> findByChaos(Chaos chaos);
// 
//     /**
//      * Find all of the {@link Event}s that occurred before an {@link Instant}
//      *
//      * @param instant the {@link Instant} to find {@link Event}s before
//      * @return a collection {@link Event}s that occurred before the {@link Instant}
//      */
//     @Transactional(readOnly = true)
//     List<Event> findByExecutedAtBefore(Instant instant);
// 
// }


// Path: src/main/java/io/pivotal/strepsirrhini/chaosloris/destroyer/StandardDestroyerFactory.java
import io.pivotal.strepsirrhini.chaosloris.data.ChaosRepository;
import io.pivotal.strepsirrhini.chaosloris.data.EventRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/*
 * Copyright 2015-2018 the original author or authors.
 *
 * 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 io.pivotal.strepsirrhini.chaosloris.destroyer;


@Component
final class StandardDestroyerFactory implements DestroyerFactory {

    private final ChaosRepository chaosRepository;

    private final EventRepository eventRepository;

    private final FateEngine fateEngine;

    private final Platform platform;

    @Autowired
    StandardDestroyerFactory(ChaosRepository chaosRepository, EventRepository eventRepository, FateEngine fateEngine, Platform platform) {