package de.nbscloud.files;

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

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

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

    @Override
    public String getStartPath() {
        return this.getId() + "/browse";
    }

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

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