Package org.guvnor.structure.repositories

Examples of org.guvnor.structure.repositories.Repository


    private ConfigurationFactory configurationFactory;

    @PostConstruct
    public void onStartup() {
        try {
            Repository jbpmRepo = repositoryService.getRepository( JBPM_REPO_PLAYGROUND );
            if ( jbpmRepo == null ) {
                jbpmRepo = repositoryService.createRepository( "git",
                                                               JBPM_REPO_PLAYGROUND,
                                                               new HashMap<String, Object>() {{
                                                                   put( "origin", JBPM_URL );
View Full Code Here


    @PostConstruct
    public void assertPlayground() {
        // TODO in case repo is not defined in system repository so we add default
        try {
            Repository repository1 = repositoryService.getRepository( DROOLS_WB_PLAYGROUND_ALIAS );
            if ( repository1 == null ) {
                repository1 = repositoryService.createRepository( DROOLS_WB_PLAYGROUND_SCHEME, DROOLS_WB_PLAYGROUND_ALIAS,
                                                                  new HashMap<String, Object>() {{
                                                                      put( "origin", DROOLS_WB_PLAYGROUND_ORIGIN );
                                                                      put( "username", DROOLS_WB_PLAYGROUND_UID );
View Full Code Here

        if (knownRepositories.containsKey(branchName+"@"+repositoryAlias)) {
            return knownRepositories.get(branchName+"@"+repositoryAlias);
        } else if (knownRepositories.size() == 1) {
            return knownRepositories.values().iterator().next();
        else {
            Repository repository = repositoryService.getRepository(repositoryAlias);
            if (repository != null) {
                return buildAndRegister(repository, branchName);
            }
        }
View Full Code Here

    @PostConstruct
    public void assertPlayground() {
        // TODO in case repo is not defined in system repository so we add default
        try {
            Repository repository1 = repositoryService.getRepository( DROOLS_WB_PLAYGROUND_ALIAS );
            if ( repository1 == null ) {
                repository1 = repositoryService.createRepository( DROOLS_WB_PLAYGROUND_SCHEME, DROOLS_WB_PLAYGROUND_ALIAS,
                                                                  new HashMap<String, Object>() {{
                                                                      put( "origin", DROOLS_WB_PLAYGROUND_ORIGIN );
                                                                      put( "username", DROOLS_WB_PLAYGROUND_UID );
View Full Code Here

    public void redirect( final Repository repo ) {
        placeManager.goTo( new DefaultPlaceRequest( "RepositoryEditor" ).addParameter( "alias", repo.getAlias() ) );
    }

    public void newRootDirectory( @Observes NewRepositoryEvent event ) {
        final Repository repository = event.getNewRepository();
        if ( repository == null ) {
            return;
        }
        if ( repositories.contains( repository ) ) {
            view.removeRepository( repository );
View Full Code Here

        view.addNewRepository( repository );
        repositories.add( repository );
    }

    public void removeRootDirectory( @Observes RepositoryRemovedEvent event ) {
        final Repository repository = event.getRepository();
        if ( repository == null ) {
            return;
        }
        if ( repositories.contains( repository ) ) {
            view.removeRepository( repository );
View Full Code Here

            repositories.remove( repository );
        }
    }

    public void updateRootDirectory( @Observes RepositoryUpdatedEvent event ) {
        final Repository repository = event.getRepository();
        final Repository updatedRepository = event.getUpdatedRepository();
        if ( repository == null ) {
            return;
        }

        if ( repositories.contains( repository ) ) {
View Full Code Here

        container.add( navigator );
    }

    private void setupContent( final List<Repository> response ) {
        for ( int i = 0; i < response.size(); i++ ) {
            final Repository repository = response.get( i );
            createElement( i, repository, IconType.BOOK, NavigatorResources.INSTANCE.css().navigatorFolderIcon(), new Command() {
                @Override
                public void execute() {
                    loadContent( repository.getRoot() );
                }
            } );
        }
        container.add( navigator );
    }
View Full Code Here

                final Object userObject = event.getSelectedItem().getUserObject();
                if ( userObject != null && userObject instanceof Path ) {
                    final Path path = (Path) userObject;
                    presenter.redirect( path );
                } else if ( userObject != null && userObject instanceof Repository ) {
                    final Repository root = (Repository) userObject;
                    presenter.redirect( root );
                } else if ( event.getSelectedItem().getUserObject() instanceof String &&
                        ( event.getSelectedItem().getUserObject() ).equals( REPOSITORY_ID ) ) {
                    presenter.redirectRepositoryList();
                }
View Full Code Here

    @PostConstruct
    public void loadRepositories() {
        final List<ConfigGroup> repoConfigs = configurationService.getConfiguration( REPOSITORY );
        if ( !( repoConfigs == null || repoConfigs.isEmpty() ) ) {
            for ( final ConfigGroup config : repoConfigs ) {
                final Repository repository = repositoryFactory.newRepository( config );
                configuredRepositories.put( repository.getAlias(), repository );
                rootToRepo.put( repository.getRoot(), repository );
            }
        }

        ioService.onNewFileSystem( new IOService.NewFileSystemListener() {
View Full Code Here

TOP

Related Classes of org.guvnor.structure.repositories.Repository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.