Class PegaseApiManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.odfsync.pegase.ws.PegaseApiManager
- All Implemented Interfaces:
LogEnabled
,Initializable
,Component
,Serviceable
public class PegaseApiManager
extends AbstractLogEnabled
implements Component, Serviceable, Initializable
Manager for Pégase API.
Get or create API objects and configure it.
-
Field Summary
Modifier and TypeFieldDescriptionprotected PegaseTokenManager
The Pégase token managerstatic final String
Role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfr.pcscol.pegase.cof.api.ArbresApi
Getter for ArbresApifr.pcscol.pegase.cof.api.FormationsApi
Getter for FormationsApifr.pcscol.pegase.cof.api.GroupementsApi
Getter for GroupementsApifr.pcscol.pegase.cof.api.ObjetsFormationApi
Getter for ObjetsFormationApifr.pcscol.pegase.cof.api.ObjetsMaquetteApi
Getter for objetsMaquetteApivoid
void
service
(ServiceManager manager) protected void
updateApiClient
(fr.pcscol.pegase.cof.ApiClient apiClient) Update the API client to set server URL and token.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Role -
_pegaseTokenManager
The Pégase token manager
-
-
Constructor Details
-
PegaseApiManager
public PegaseApiManager()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
updateApiClient
Update the API client to set server URL and token.- Parameters:
apiClient
- The API client to update- Throws:
IOException
- if an error occurs
-
getObjetsMaquetteApi
Getter for objetsMaquetteApi- Returns:
- objetsMaquetteApi
- Throws:
IOException
- If an error occurs while retrieving the token
-
getFormationsApi
Getter for FormationsApi- Returns:
- FormationsApi
- Throws:
IOException
- If an error occurs while retrieving the token
-
getGroupementsApi
Getter for GroupementsApi- Returns:
- GroupementsApi
- Throws:
IOException
- If an error occurs while retrieving the token
-
getObjetsFormationApi
Getter for ObjetsFormationApi- Returns:
- ObjetsFormationApi
- Throws:
IOException
- If an error occurs while retrieving the token
-
getArbresApi
Getter for ArbresApi- Returns:
- arbresApi
- Throws:
IOException
- If an error occurs while retrieving the token
-