package de.nbscloud.todo;

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 TodoApp implements App, InitializingBean {
    @Autowired
    private AppRegistry appRegistry;

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

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

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

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

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