001/*
002 * The contents of this file are subject to the license and copyright
003 * detailed in the LICENSE and NOTICE files at the root of the source
004 * tree.
005 */
006package org.fcrepo.camel.service;
007
008import org.fcrepo.camel.FcrepoComponent;
009import org.fcrepo.camel.common.config.BasePropsConfig;
010import org.springframework.context.annotation.Bean;
011import org.springframework.context.annotation.Configuration;
012
013/**
014 * @author dbernstein
015 */
016@Configuration
017public class FcrepoCamelConfig extends BasePropsConfig {
018
019    @Bean("fcrepo")
020    public FcrepoComponent fcrepoComponent() {
021        final var fcrepoComponent = new FcrepoComponent();
022        fcrepoComponent.setBaseUrl(getFcrepoBaseUrl());
023        fcrepoComponent.setAuthUsername(getFcrepoUsername());
024        fcrepoComponent.setAuthPassword(getFcrepoPassword());
025        fcrepoComponent.setAuthHost(getFcrepoAuthHost());
026        return fcrepoComponent;
027    }
028
029}
030