package com.vasoftware.sf.plugin;

import com.collabnet.ce.soap60.webservices.scm.RepositorySoapDO;
import com.vasoftware.sf.common.logger.Logger;
import com.vasoftware.sf.events.EventHandler60;

public class AsynchronousRepositoryCreationEventListener extends EventHandler60 {
    private static final Logger log = Logger.getLogger(AsynchronousRepositoryCreationEventListener.class);
    
    @Override
    public void processEvent() throws Exception {
        
        RepositorySoapDO repositoryData = (RepositorySoapDO) getOriginalData(); 
        
        log.warn("Repository created. Project id: " + getEventContext().getProjectId() +
                " Creator: " + getEventContext().getUsername() +
                " Repository Id: " + repositoryData.getId() +
                " Repository Title: " + repositoryData.getTitle() +
                " Repository Path: " + repositoryData.getPath() +
                " Repositry Directory: " + repositoryData.getRepositoryDirectory() +
                " Repository Adaptor: " + repositoryData.getScmAdapterName() +
                " Repository Viewer URL: " + repositoryData.getScmViewerUrl() +
                " Repository System Id: " + repositoryData.getSystemId() +
                " Repository System Title: " + repositoryData.getSystemTitle() +
                " Repository Description: " + repositoryData.getDescription());
    }
}
