package org.uberfire.workbench.events;

import java.util.Set;

import org.jboss.errai.common.client.api.annotations.Portable;
import org.kie.commons.validation.PortablePreconditions;

/**
 * An Event indicating a various changes to various Resources
 */
@Portable
public class ResourceBatchChangesEvent {

    private Set<ResourceChange> batch;

    public ResourceBatchChangesEvent() {
        //Empty constructor for Errai marshalling
    }

    public ResourceBatchChangesEvent( final Set<ResourceChange> batch ) {
        this.batch = PortablePreconditions.checkNotNull( "batch",
                                                         batch );
    }

    public Set<ResourceChange> getBatch() {
        return this.batch;
    }

}

@@ -33,16 +33,42 @@
 vents;%0A%0A
+import java.util.HashSet;%0A
 import j
@@ -362,16 +362,48 @@
 e%3E batch
+ = new HashSet%3CResourceChange%3E()
 ;%0A%0A    p

Initialise a batch in case getBatch() is used to add items