IScellApiResolver - SCell dependency container

IScellApiResolver resolves different API Interface implementations required for the user's project code.

To use the IScellApiResolver you should connect the API and make the following calls:

import com.intechcore.scomponents.scell.api.IScellApiResolver;
import com.intechcore.scomponents.scell.api.init.ScellApiEntryPoint;

import java.util.concurrent.CompletableFuture;

public class TestApp {
    public static void main(String[] args) {
        ScellApiEntryPoint.getApiResolverAsync().thenAccept(resolver -> {
            // you have access to the IScellApiResolver implementation here
        }).whenComplete((unused, throwable) -> {
            if (throwable != null) {
                System.out.println(throwable.getMessage());
            }
        }).join();
    }
}

Use IScellApiResolver to get the fallowing main parts of the SCell API:

“Main entry point” means the fallowing functionality:

  • core - to manage the xlsx content
  • UI - to have JavaFX UI spreadsheet processor.

Also, the IScellApiResolver is used to get the IRangeAddressBuilder.

An example of getting implementations:

import com.intechcore.scomponents.scell.api.IScellApiResolver;
import com.intechcore.scomponents.scell.api.init.ScellApiEntryPoint;
import com.intechcore.scomponents.scell.api.spreadsheet.IScellCoreApiFactory;
import com.intechcore.scomponents.scell.api.spreadsheet.service.builder.IRangeAddressBuilder;
import com.intechcore.scomponents.scell.api.fx.IScellUiFxApiBuilder;
import com.intechcore.scomponents.scell.api.spreadsheet.model.IWorkbook;

import java.io.File;
import java.util.concurrent.CompletableFuture;

public class TestApp {
    public static void main(String[] args) {
        ScellApiEntryPoint.getApiResolverAsync().thenAccept(resolver -> {
            IScellCoreApiFactory coreApiProvider = resolver.resolve(IScellCoreApiFactory.class); // Core API entry point
            IScellUiFxApiBuilder uiApiProvider = resolver.resolve(IScellUiFxApiBuilder.class); // JavaFX UI control entry point
            IRangeAddressBuilder addressBuilder = resolver.resolve(IRangeAddressBuilder.class); // IRangeAddressBuilder implementation

        }).whenComplete((unused, throwable) -> {
            if (throwable != null) {
                System.out.println(throwable.getMessage());
            }
        }).join();
    }
}

Next (Core API)

Next (UI API)

See also

IRangeAddressBuilder