Examples of ChangeSet


Examples of org.apache.maven.scm.ChangeSet

            .changeLog( getScmRepository(), fileSet, timeBeforeSecond, currentTime, 0, new ScmBranch( "" ) );

        //Thorough assert of the last result
        assertTrue( result.getProviderMessage(), result.isSuccess() );
        assertEquals( 1, result.getChangeLog().getChangeSets().size() );
        ChangeSet changeset = result.getChangeLog().getChangeSets().get( 0 );
        assertTrue( changeset.getDate().after( timeBeforeSecond ) );
        assertEquals( COMMIT_MSG, changeset.getComment() );
    }
View Full Code Here

Examples of org.drools.ChangeSet

                                   ( (ClassPathResource) resource ).getClazz() );
        } else {
            reader.setClassLoader( this.configuration.getClassLoader(),
                                   null );
        }
        ChangeSet changeSet = reader.read( resource.getReader() );
        if (changeSet == null) {
            // @TODO should log an error
        }
        for (Resource nestedResource : changeSet.getResourcesAdded()) {
            InternalResource iNestedResourceResource = (InternalResource) nestedResource;
            if (iNestedResourceResource.isDirectory()) {
                for (Resource childResource : iNestedResourceResource.listResources()) {
                    if (( (InternalResource) childResource ).isDirectory()) {
                        continue; // ignore sub directories
View Full Code Here

Examples of org.drools.ChangeSet

            configuration.getClasses().add( cls );
        }
    }

    void addPackageFromChangeSet( final Resource resource) throws SAXException, IOException {
        ChangeSet changeSet = parseChangeSet( resource );
        if (changeSet == null) {
            results.add( new DroolsError() {
                public String getMessage() {
                    return "Unable to parse changeset " + resource;
                }
                public int[] getLines() { return new int[ 0 ]; }
            } );
        }
        for (Resource nestedResource : changeSet.getResourcesAdded()) {
            InternalResource iNestedResourceResource = (InternalResource) nestedResource;
            if (iNestedResourceResource.isDirectory()) {
                for (Resource childResource : iNestedResourceResource.listResources()) {
                    if (( (InternalResource) childResource ).isDirectory()) {
                        continue; // ignore sub directories
View Full Code Here

Examples of org.drools.ChangeSet

        }
        Reader resourceReader = null;

        try {
            resourceReader = resource.getReader();
            ChangeSet changeSet = reader.read( resourceReader );
            return changeSet;
        } finally {
            if (resourceReader != null) {
                resourceReader.close();
            }
View Full Code Here

Examples of org.drools.ChangeSet

        } else if ( ires.getResourceType() != type ) {
            this.results.add( new ResourceTypeDeclarationWarning( resource, ires.getResourceType(), type ) );
        }
        if ( ResourceType.CHANGE_SET == type ) {
            try {
                ChangeSet changeSet = parseChangeSet( resource );
                List<Resource> resources = new ArrayList<Resource>(  );
                resources.add( resource );
                for ( Resource addedRes : changeSet.getResourcesAdded() ) {
                    resources.add( addedRes );
                }
                for ( Resource modifiedRes : changeSet.getResourcesModified() ) {
                    resources.add( modifiedRes );
                }
                for ( Resource removedRes : changeSet.getResourcesRemoved() ) {
                    resources.add( removedRes );
                }
                buildResources.push( resources );
            } catch ( Exception e ) {
                results.add( new DroolsError() {
View Full Code Here

Examples of org.drools.ChangeSet

            reader.setClassLoader(((ClassPathResource) resource).getClassLoader(), null);
        } else {
            reader.setClassLoader(((AbstractRuleBase) (((KnowledgeBaseImpl) this.kbase).ruleBase)).getConfiguration().getClassLoader(), null);
        }

        ChangeSet changeSet = null;
        try {
            changeSet = reader.read(resource.getReader());
        } catch (Exception e) {
            this.listener.exception(new RuntimeException(
                    "Unable to parse ChangeSet", e));
View Full Code Here

Examples of org.drools.ChangeSet

                this.resources.remove( resource );
            }

            for ( Entry<ResourceChangeNotifier, ChangeSet> entry : notifications.entrySet() ) {
                ResourceChangeNotifier notifier = entry.getKey();
                ChangeSet changeSet = entry.getValue();
                notifier.publishChangeSet( changeSet );
            }
        }
    }
View Full Code Here

Examples of org.drools.ChangeSet

            reader.setClassLoader( ((ClassPathResource) resource).getClassLoader() );
        } else {
            reader.setClassLoader( ((AbstractRuleBase) (((KnowledgeBaseImpl) this.kbase).ruleBase)).getConfiguration().getClassLoader() );
        }

        ChangeSet changeSet = null;
        try {
            changeSet = reader.read( resource.getReader() );
        } catch ( Exception e ) {
            this.listener.exception( new RuntimeException( "Unable to parse ChangeSet",
                                                           e ) );
View Full Code Here

Examples of org.drools.ChangeSet

                        Attributes attrs,
                        ExtensibleXmlParser parser) throws SAXException {
        parser.startElementBuilder( localName,
                                    attrs );     
       
        final ChangeSet changeSet = (ChangeSet) parser.getParent();         
       
        return new ArrayList();
    }
View Full Code Here

Examples of org.drools.ChangeSet

                        Attributes attrs,
                        ExtensibleXmlParser parser) throws SAXException {
        parser.startElementBuilder( localName,
                                    attrs );     
       
        final ChangeSet changeSet = (ChangeSet) parser.getParent();         
       
        return new ArrayList();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.