All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.larksuite.oapi.core.card.IHandler Maven / Gradle / Ivy

Go to download

Larksuite open platform facilitates the integration of enterprise applications and larksuite, making collaboration and management more efficient

There is a newer version: 1.0.18-rc8
Show newest version
package com.larksuite.oapi.core.card;

import com.larksuite.oapi.core.Config;
import com.larksuite.oapi.core.Context;
import com.larksuite.oapi.core.card.mode.Card;

import java.util.HashMap;
import java.util.Map;

public interface IHandler {

    Object handle(Context context, Card card) throws Exception;

    class Hub {
        public static final Map appID2Handler = new HashMap<>();

        public static void register(Config config, IHandler handler) {
            appID2Handler.put(config.getAppSettings().getAppID(), handler);
        }

        public static IHandler getHandler(Config config) {
            return appID2Handler.get(config.getAppSettings().getAppID());
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy