1 package org.simantics.modeling.requests;
3 import java.util.Collection;
5 import org.simantics.db.Resource;
6 import org.simantics.db.WriteGraph;
7 import org.simantics.db.exception.DatabaseException;
8 import org.simantics.diagram.stubs.DiagramResource;
11 * @author Tuukka Lehtonen
13 public class SetFlagExternal {
15 Collection<Resource> flags;
18 public SetFlagExternal(Collection<Resource> flags, boolean external) {
20 this.external = external;
23 public void perform(WriteGraph graph) throws DatabaseException {
24 DiagramResource DIA = DiagramResource.getInstance(graph);
25 for (Resource flag : flags) {
27 graph.claim(flag, DIA.ExternalFlag, DIA.ExternalFlag, flag);
29 graph.deny(flag, DIA.ExternalFlag);