IScellApiResolver - SCell dependency container

IScellApiResolver resolve different API Interfaces implementations to the user 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.ScellApiEntryPoint;
import com.intechcore.scomponents.scell.api.spreadsheet.IScellCoreApiFactory;
import com.intechcore.scomponents.scell.api.spreadsheet.model.IWorkbook;

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

public class TestApp {
    private static final CompletableFuture<IScellApiResolver> apiResolverFuture = ScellApiEntryPoint.getApiResolverAsync();
    public static void main(String[] args) {
        apiResolverFuture.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 next main parts of the SCell API:

Main entry point here means next functionality:

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

Also, IScellApiResolver is used to get the IRangeAddressBuilder.

Getting implementations example:

public class CustomerExamples {
    private static final CompletableFuture<Optional<IScellApiResolver>> apiResolverFuture = ScellApiEntryPoint.getApiResolverAsync();

    public static void main(String[] args) {
        apiResolverFuture.thenAccept(apiResolverOpt -> apiResolverOpt.ifPresent(apiResolver -> {

            IScellCoreApiFactory coreApiProvider = apiResolver.resolve(IScellCoreApiFactory.class); // Core API entry point

            IScellUiFxApiBuilder uiApiProvider = apiResolver.resolve(IScellUiFxApiBuilder.class); // JavaFX UI control entry point

            IRangeAddressBuilder addressBuilder = apiResolver.resolve(IRangeAddressBuilder.class); // IRangeAddressBuilder implementation
            
        })).join();
    }
}

Next (Core API)

Next (UI API)

See also

IRangeAddressBuilder