public void setConstraint(final Connection connection, final Constraint constraint) { if ( this.type == TYPE_OR || this.type == TYPE_XOR ) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if (!getDefaultOutgoingConnections().contains(connection)) { throw new IllegalArgumentException("connection is unknown:" + connection); } addConstraint( new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()), constraint); } else { throw new UnsupportedOperationException( "Constraints are " + "only supported with XOR or OR split types, not with type:" + getType() ); } }
public SplitFactory constraint(long toNodeId, String name, String type, String dialect, String constraint, int priority) { ConstraintImpl constraintImpl = new ConstraintImpl(); constraintImpl.setName(name); constraintImpl.setType(type); constraintImpl.setDialect(dialect); constraintImpl.setConstraint(constraint); constraintImpl.setPriority(priority); getSplit().addConstraint( new ConnectionRef(toNodeId, Node.CONNECTION_DEFAULT_TYPE), constraintImpl); return this; }
Split split = (Split) source; Constraint constraint = buildConstraint(connection, split); split.addConstraint( new ConnectionRef(target.getId(), NodeImpl.CONNECTION_DEFAULT_TYPE), constraint);
Split split = (Split) source; Constraint constraint = buildConstraint(connection, split); split.addConstraint( new ConnectionRef(connection.getId(), target.getId(), NodeImpl.CONNECTION_DEFAULT_TYPE), constraint);
public void setConstraint(final Connection connection, final Constraint constraint) { if ( this.type == TYPE_OR || this.type == TYPE_XOR ) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if (!getDefaultOutgoingConnections().contains(connection)) { throw new IllegalArgumentException("connection is unknown:" + connection); } addConstraint( new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()), constraint); } else { throw new UnsupportedOperationException( "Constraints are " + "only supported with XOR or OR split types, not with type:" + getType() ); } }
public SplitFactory constraint(long toNodeId, String name, String type, String dialect, String constraint, int priority) { ConstraintImpl constraintImpl = new ConstraintImpl(); constraintImpl.setName(name); constraintImpl.setType(type); constraintImpl.setDialect(dialect); constraintImpl.setConstraint(constraint); constraintImpl.setPriority(priority); getSplit().addConstraint( new ConnectionRef(toNodeId, Node.CONNECTION_DEFAULT_TYPE), constraintImpl); return this; }
Split split = (Split) source; Constraint constraint = buildConstraint(connection, split); split.addConstraint( new ConnectionRef(connection.getId(), target.getId(), NodeImpl.CONNECTION_DEFAULT_TYPE), constraint);
Split split = (Split) source; Constraint constraint = buildConstraint(connection, split); split.addConstraint( new ConnectionRef(target.getId(), NodeImpl.CONNECTION_DEFAULT_TYPE), constraint);