com.fivefaces.structureclient.config.SetupEssentialStructures Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-structure-client Show documentation
Show all versions of common-structure-client Show documentation
structure Client for Five Faces
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;
}
}