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
FieldsModifier and TypeFieldDescriptionprotected PegaseTokenManagerThe Pégase token managerstatic final StringRole -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfr.pcscol.pegase.cof.api.ArbresApiGetter for ArbresApifr.pcscol.pegase.cof.api.FormationsApiGetter for FormationsApifr.pcscol.pegase.cof.api.GroupementsApiGetter for GroupementsApifr.pcscol.pegase.cof.api.ObjetsFormationApiGetter for ObjetsFormationApifr.pcscol.pegase.cof.api.ObjetsMaquetteApiGetter for objetsMaquetteApivoidvoidservice(ServiceManager manager) protected voidupdateApiClient(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:
servicein interfaceServiceable- Throws:
ServiceException
-
initialize
- Specified by:
initializein 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
-