2019-06-02 05:03:08 +03:00
|
|
|
package pro.gravit.launchserver.manangers;
|
2019-04-20 01:03:06 +03:00
|
|
|
|
|
|
|
import com.google.gson.GsonBuilder;
|
2019-06-03 10:58:10 +03:00
|
|
|
|
2019-06-02 05:03:08 +03:00
|
|
|
import pro.gravit.launcher.managers.GsonManager;
|
|
|
|
import pro.gravit.launchserver.auth.handler.AuthHandler;
|
|
|
|
import pro.gravit.launchserver.auth.hwid.HWIDHandler;
|
|
|
|
import pro.gravit.launchserver.auth.permissions.PermissionsHandler;
|
|
|
|
import pro.gravit.launchserver.auth.protect.ProtectHandler;
|
|
|
|
import pro.gravit.launchserver.auth.provider.AuthProvider;
|
|
|
|
import pro.gravit.launchserver.auth.texture.TextureProvider;
|
|
|
|
import pro.gravit.launchserver.components.Component;
|
2019-07-01 11:22:48 +03:00
|
|
|
import pro.gravit.launchserver.dao.provider.DaoProvider;
|
2019-06-02 05:03:08 +03:00
|
|
|
import pro.gravit.utils.UniversalJsonAdapter;
|
2019-04-20 01:03:06 +03:00
|
|
|
|
|
|
|
public class LaunchServerGsonManager extends GsonManager {
|
|
|
|
@Override
|
|
|
|
public void registerAdapters(GsonBuilder builder) {
|
|
|
|
super.registerAdapters(builder);
|
2019-04-20 01:58:59 +03:00
|
|
|
builder.registerTypeAdapter(AuthProvider.class, new UniversalJsonAdapter<>(AuthProvider.providers));
|
|
|
|
builder.registerTypeAdapter(TextureProvider.class, new UniversalJsonAdapter<>(TextureProvider.providers));
|
|
|
|
builder.registerTypeAdapter(AuthHandler.class, new UniversalJsonAdapter<>(AuthHandler.providers));
|
|
|
|
builder.registerTypeAdapter(PermissionsHandler.class, new UniversalJsonAdapter<>(PermissionsHandler.providers));
|
|
|
|
builder.registerTypeAdapter(HWIDHandler.class, new UniversalJsonAdapter<>(HWIDHandler.providers));
|
|
|
|
builder.registerTypeAdapter(Component.class, new UniversalJsonAdapter<>(Component.providers));
|
|
|
|
builder.registerTypeAdapter(ProtectHandler.class, new UniversalJsonAdapter<>(ProtectHandler.providers));
|
2019-07-01 11:22:48 +03:00
|
|
|
builder.registerTypeAdapter(DaoProvider.class, new UniversalJsonAdapter<>(DaoProvider.providers));
|
2019-04-20 01:03:06 +03:00
|
|
|
}
|
|
|
|
}
|