Package fr.sandro642.github
Class ConnectLib
java.lang.Object
fr.sandro642.github.ConnectLib
ConnectLib is the main class of the ConnectorAPI library for Standard API.
It provides methods to initialize the library with resource types, routes, and schemas,
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the route associated with the given route name.Get the routes map.Return the instance of HookManager.init(ResourceType resourceType, LangType langType, Class<? extends Enum<?>>... routes) Init the ConnectLib with the specified resource type and routes.booleanCheck if the ConnectLib is initialized.Return an instance of JobGetInfos.Return the instance of LangManager.Return the instance of LangSupport.Logger()Return the instance of Logger.Return the instance of Logs.Return the instance of Application.Return the instance of StoreAndRetrieve.voidwanImplement(String urlServ, String nameComponent) Implement WAN connectivity using the provided server URL and component name.Return the instance of YamlUtils.
-
Constructor Details
-
ConnectLib
public ConnectLib()
-
-
Method Details
-
init
public ConnectLib init(ResourceType resourceType, LangType langType, Class<? extends Enum<?>>... routes) Init the ConnectLib with the specified resource type and routes.- Parameters:
resourceType- the type of resource to initializeroutes- the routes to be used in the ConnectLib
-
getRoutesMap
Get the routes map.- Returns:
- a map of route names to their corresponding paths
-
wanImplement
Implement WAN connectivity using the provided server URL and component name. This method performs HTTP requests to establish a connection and retrieve necessary information.- Parameters:
urlServ- the URL of the server to connect tonameComponent- the name of the component to be used in the connection
-
isInitialized
public boolean isInitialized()Check if the ConnectLib is initialized.- Returns:
- true if initialized, false otherwise
-
getRoute
Return the route associated with the given route name.- Parameters:
routeName- the name of the route to retrieve- Returns:
- the route as a String
-
JobGetInfos
Return an instance of JobGetInfos.- Returns:
- JobGetInfos instance
-
Logger
Return the instance of Logger.- Returns:
- Logger instance
-
StoreAndRetrieve
Return the instance of StoreAndRetrieve.- Returns:
- StoreAndRetrieve instance
-
YamlUtils
Return the instance of YamlUtils.- Returns:
- YamlUtils instance
-
MCSupport
Return the instance of Logs.- Returns:
- Logs instance
-
HookManager
Return the instance of HookManager.- Returns:
- HookManager instance
-
LangSupport
Return the instance of LangSupport.- Returns:
- LangSupport instance²
-
LangManager
Return the instance of LangManager.- Returns:
- LangManager instance
-
SpringApp
Return the instance of Application.- Returns:
- Application instance
-