blob: 4de73ade26ffb90bafb7e09b8a2b1b1dc078c050 [file] [log] [blame]
/*-
* ============LICENSE_START=======================================================
* OSAM
* ================================================================================
* Copyright (C) 2018 AT&T
* ================================================================================
* 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.
* ============LICENSE_END=========================================================
*/
package org.onap.osam.job.command.demo;
import com.google.common.collect.ImmutableMap;
import lombok.extern.slf4j.Slf4j;
import org.onap.osam.job.dao.job.JobStatus;
import org.onap.osam.job.IJobCommand;
import org.onap.osam.job.NextCommand;
import org.onap.osam.job.command.CommandBase;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.util.Map;
@Slf4j
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class OLTCommand extends CommandBase implements IJobCommand {
@Override
public Map<String, Object> getData() {
return ImmutableMap.of();
}
@Override
public NextCommand call() {
log.debug("OLTCreation Command - for this demo, I'm always successful!!");
return new NextCommand(JobStatus.COMPLETED);
}
}