package de.nbscloud.pastebin;

import de.nbscloud.webcontainer.registry.App;
import de.nbscloud.webcontainer.registry.AppRegistry;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class PastebinApp implements App, InitializingBean {
    @Autowired
    private AppRegistry appRegistry;

    @Override
    public String getId() {
        return "pastebin";
    }

    @Override
    public String getIcon() {
        return null;
    }

    @Override
    public String getStartPath() {
        return this.getId();
    }

    @Override
    public int getIndex() {
        return 50;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        this.appRegistry.registerApp(this);
    }
}
