TeszCoreApi

Β Β 
TypeπŸ”΅ Class
Packageio.github.mrtesz.teszcore.api
GitHubTeszCoreApi.java
ImplementsCopyable<TeszCoreApi>
SubclassesTeszCoreApi.Initializer

Description

The API class of the project


Initializing

To initialize the API you have to execute TeszCoreApi#initialize with a TeszCoreApi.Initializer instance


Methods

initialize

static TeszCoreApi initialize(TeszCoreInitializer teszCoreInitializer) throws DuplicateInitializationException, IllegalArgumentException;

Initialize the TeszCoreApi

ParameterTypeAnnotationsDescription
teszCoreInitializerTeszCoreInitializerΒ The options the API will initialize with

Returns: TeszCoreApi β€” the new TeszCoreApi instance (you can also get this through TeszCoreApi#getInstance())

Throws: DuplicateInitializationException when a TeszCoreApi instance was already initialized (can be bypassed with option TeszCoreInitializer#overwrite on true) Throws: IllegalArgumentException when the TeszCoreApi.Initializer.InitializerBuilder#loggerFilePath is not null and doesn’t end with a β€˜/’


getInstance

static TeszCoreApi getInstance();

Get the last initialized TeszCoreApi instance

Returns: TeszCoreApi β€” the last initialized TeszCoreApi instance

Throws: NullPointerException if no instance was initialized before with TeszCoreApi#initialize


logException

void logException(@NotNull Throwable throwable);

Logs a throwable by calling TeszCoreLogger#printStackTrace

ParameterTypeAnnotationsDescription
throwableThrowable@NotNullThe throwable to log

getLogger

TeszCoreLogger getLogger(@NotNull DebugLevel debugLevel);
TeszCoreLogger getLogger(@NotNull DebugLevel debugLevel, @Nullable String projectName);

Get a TeszCoreLogger

ParameterTypeAnnotationsDescription
debugLevelDebugLevel@NotNullThe level to send messages at
projectNameString@Nullable(optional) The name of the project, using the logger

Returns: TeszCoreLogger β€” a TeszCoreLogger to use for logging


createMariaDBManager

MariaDBManager createMariaDBManager(@Nullable String projectName, boolean infoWhenCredentialsAreNull, @Nullable String name, @Nullable String url, @Nullable String user, @Nullable String password);

Create a MariaDBManager

ParameterTypeAnnotationsDescription
projectNameString@NullableThe name of the project, using the manager
infoWhenCredentialsAreNullbooleanΒ If connect() should throw a NullPointerException if url, user or passwort are null or blank
nameString@NullableThe name of the database manager
urlString@NullableThe url database, connecting to
userString@NullableThe username of the user, connecting with
passwordString@NullableThe password of the user, connecting with

Returns: MariaDBManager β€” a MariaDBManager


createSqliteManager

SqliteManager createSqliteManager(@Nullable String projectName, @Nullable String path, @NotNull String name);

Create a SqliteManager

ParameterTypeAnnotationsDescription
projectNameString@NullableThe name of the project, using the manager
pathString@NullableThe path, the .db file β€” null uses the default location
nameString@NotNullThe name of the .db file

Returns: SqliteManager β€” a SqliteManager


getLog4jLogger

Logger getLog4jLogger();

Get the org.apache.logging.log4j.Logger, TeszCore uses internally

Returns: Logger β€” the log4j logger, TeszCore uses internally


getInitializedWith

TeszCoreApi.TeszCoreInitializer getInitializedWith();

Get the TeszCoreApi.TeszCoreInitializer, the API was latest initialized with

Returns: Logger β€” the log4j logger, TeszCore uses internally


copy

implemented from Copyable

TeszCoreApi copy() throws DuplicatInitializationException, IllegalArgumentException;

Initialize a copy of the current TeszCoreApi by executing initialize(TeszCoreInitializer) with initializedWith

Returns: See initialize(TeszCoreInitializer)

Throws: See initialize(TeszCoreInitializer)



Table of contents


Back to top

Copyright © 2026 Mr_Tesz. All rights reserved

This site uses Just the Docs, a documentation theme for Jekyll.