package de.nbscloud.notes;

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

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

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

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

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

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