Search in sources :

Example 6 with IRepositoryManager

use of com.gitblit.manager.IRepositoryManager in project gitblit by gitblit.

the class FileTicketServiceTest method getService.

@Override
protected ITicketService getService(boolean deleteAll) throws Exception {
    IStoredSettings settings = getSettings(deleteAll);
    XssFilter xssFilter = new AllowXssFilter();
    IRuntimeManager runtimeManager = new RuntimeManager(settings, xssFilter).start();
    IPluginManager pluginManager = new PluginManager(runtimeManager).start();
    INotificationManager notificationManager = new NotificationManager(settings).start();
    IUserManager userManager = new UserManager(runtimeManager, pluginManager).start();
    IRepositoryManager repositoryManager = new RepositoryManager(runtimeManager, pluginManager, userManager).start();
    FileTicketService service = (FileTicketService) new FileTicketService(runtimeManager, pluginManager, notificationManager, userManager, repositoryManager).start();
    if (deleteAll) {
        service.deleteAll(getRepository());
    }
    return service;
}
Also used : NotificationManager(com.gitblit.manager.NotificationManager) INotificationManager(com.gitblit.manager.INotificationManager) IUserManager(com.gitblit.manager.IUserManager) IStoredSettings(com.gitblit.IStoredSettings) IRuntimeManager(com.gitblit.manager.IRuntimeManager) RuntimeManager(com.gitblit.manager.RuntimeManager) IRepositoryManager(com.gitblit.manager.IRepositoryManager) IRuntimeManager(com.gitblit.manager.IRuntimeManager) IPluginManager(com.gitblit.manager.IPluginManager) PluginManager(com.gitblit.manager.PluginManager) INotificationManager(com.gitblit.manager.INotificationManager) IUserManager(com.gitblit.manager.IUserManager) UserManager(com.gitblit.manager.UserManager) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) XssFilter(com.gitblit.utils.XssFilter) FileTicketService(com.gitblit.tickets.FileTicketService) IPluginManager(com.gitblit.manager.IPluginManager) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) IRepositoryManager(com.gitblit.manager.IRepositoryManager) RepositoryManager(com.gitblit.manager.RepositoryManager)

Example 7 with IRepositoryManager

use of com.gitblit.manager.IRepositoryManager in project gitblit by gitblit.

the class GitBlitSuite method showRemoteBranches.

private static void showRemoteBranches(String repositoryName) {
    try {
        IRepositoryManager repositoryManager = GitblitContext.getManager(IRepositoryManager.class);
        RepositoryModel model = repositoryManager.getRepositoryModel(repositoryName);
        model.showRemoteBranches = true;
        repositoryManager.updateRepositoryModel(model.name, model, false);
    } catch (GitBlitException g) {
        g.printStackTrace();
    }
}
Also used : IRepositoryManager(com.gitblit.manager.IRepositoryManager) GitBlitException(com.gitblit.GitBlitException) RepositoryModel(com.gitblit.models.RepositoryModel)

Example 8 with IRepositoryManager

use of com.gitblit.manager.IRepositoryManager in project gitblit by gitblit.

the class GitBlitSuite method automaticallyTagBranchTips.

private static void automaticallyTagBranchTips(String repositoryName) {
    try {
        IRepositoryManager repositoryManager = GitblitContext.getManager(IRepositoryManager.class);
        RepositoryModel model = repositoryManager.getRepositoryModel(repositoryName);
        model.useIncrementalPushTags = true;
        repositoryManager.updateRepositoryModel(model.name, model, false);
    } catch (GitBlitException g) {
        g.printStackTrace();
    }
}
Also used : IRepositoryManager(com.gitblit.manager.IRepositoryManager) GitBlitException(com.gitblit.GitBlitException) RepositoryModel(com.gitblit.models.RepositoryModel)

Aggregations

IRepositoryManager (com.gitblit.manager.IRepositoryManager)8 IRuntimeManager (com.gitblit.manager.IRuntimeManager)6 RepositoryManager (com.gitblit.manager.RepositoryManager)6 RuntimeManager (com.gitblit.manager.RuntimeManager)6 XssFilter (com.gitblit.utils.XssFilter)6 AllowXssFilter (com.gitblit.utils.XssFilter.AllowXssFilter)6 IStoredSettings (com.gitblit.IStoredSettings)4 INotificationManager (com.gitblit.manager.INotificationManager)4 IPluginManager (com.gitblit.manager.IPluginManager)4 IUserManager (com.gitblit.manager.IUserManager)4 NotificationManager (com.gitblit.manager.NotificationManager)4 PluginManager (com.gitblit.manager.PluginManager)4 UserManager (com.gitblit.manager.UserManager)4 BranchTicketService (com.gitblit.tickets.BranchTicketService)4 RepositoryModel (com.gitblit.models.RepositoryModel)3 GitBlitException (com.gitblit.GitBlitException)2 FileTicketService (com.gitblit.tickets.FileTicketService)2 ITicketService (com.gitblit.tickets.ITicketService)2 RedisTicketService (com.gitblit.tickets.RedisTicketService)2 CmdLineException (org.kohsuke.args4j.CmdLineException)2