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

com.fivefaces.structureclient.config.SetupEssentialStructures Maven / Gradle / Ivy

There is a newer version: 1.0.62
Show newest version
package com.fivefaces.structureclient.config;

import com.fivefaces.structure.schema.FieldType;
import com.fivefaces.structure.schema.StructureFieldSchema;
import com.fivefaces.structure.schema.StructureSchema;
import com.fivefaces.structure.service.EssentialStructuresDescriptor;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;

@Component
@RequiredArgsConstructor
@Slf4j
public class SetupEssentialStructures implements EssentialStructuresDescriptor {

    @Override
    public List essentialStructures() {
        return List.of(applicationSchema());
    }

    private StructureSchema applicationSchema() {
        StructureSchema structureSchema = new StructureSchema();
        structureSchema.setType("application");
        structureSchema.setWarehouse(true);
        structureSchema.setFields(new HashMap<>() {{
            put("application", new StructureFieldSchema(FieldType.OBJECT, null, null, true, false, false, false, null, false));
        }});
        return structureSchema;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy