All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fivefaces.cloud.Utils Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.fivefaces.cloud;

import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.rekognition.AmazonRekognition;
import com.amazonaws.services.rekognition.AmazonRekognitionClientBuilder;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
import com.amazonaws.services.simpleemail.AmazonSimpleEmailService;
import com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClientBuilder;
import com.amazonaws.services.sns.AmazonSNS;
import com.amazonaws.services.sns.AmazonSNSClientBuilder;
import com.amazonaws.services.sqs.AmazonSQS;
import com.amazonaws.services.sqs.AmazonSQSClientBuilder;
import com.amazonaws.services.stepfunctions.AWSStepFunctions;
import com.amazonaws.services.stepfunctions.AWSStepFunctionsClientBuilder;
import com.fivefaces.setting.service.SettingService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;

import static com.fivefaces.common.setting.SettingConstants.*;

@AllArgsConstructor
@Component
public class Utils {

    private final SettingService settingService;

    public String getOnPremiseFunctions() {
        return settingService.getSettingByName("Workflow AWS onPremise").getValue();
    }

    public String parseOnPremiseFunction(final String machineDefinitions, final String functionName) {
        final String stringSprintToStartOfFunction = machineDefinitions.substring(machineDefinitions.indexOf("resource \"aws_sfn_state_machine\" \"" + functionName + "\""));
        final String stringStartOfFunctionEOF = stringSprintToStartOfFunction.substring(stringSprintToStartOfFunction.indexOf("<




© 2015 - 2024 Weber Informatics LLC | Privacy Policy