@Override public String toString() { return getDirectTypeNames().toString(); }
@Override public String toString() { return getDirectTypeNames().toString(); }
@Override public String toString() { return getDirectTypeNames().toString(); }
/** * Throws or logs the specified constraint violation. * * @param code code of this violation * @param message description of the violation * @throws CommitFailedException the constraint violation */ private void constraintViolation(int code, String message) throws CommitFailedException { List<String> nodeTypeNames = effective != null ? effective.getDirectTypeNames() : Collections.emptyList(); callback.onConstraintViolation(getPath(), nodeTypeNames, code, message); }
/** * Throws or logs the specified constraint violation. * * @param code code of this violation * @param message description of the violation * @throws CommitFailedException the constraint violation */ private void constraintViolation(int code, String message) throws CommitFailedException { List<String> nodeTypeNames = effective != null ? effective.getDirectTypeNames() : Collections.emptyList(); callback.onConstraintViolation(getPath(), nodeTypeNames, code, message); }
/** * Throws or logs the specified constraint violation. * * @param code code of this violation * @param message description of the violation * @throws CommitFailedException the constraint violation */ private void constraintViolation(int code, String message) throws CommitFailedException { List<String> nodeTypeNames = effective != null ? effective.getDirectTypeNames() : Collections.emptyList(); callback.onConstraintViolation(getPath(), nodeTypeNames, code, message); }
@Test(expected = CommitFailedException.class) public void removeMandatoryChildNode() throws CommitFailedException { EffectiveType effective = createControl().createMock(EffectiveType.class); expect(effective.isMandatoryChildNode("mandatory")).andReturn(true); expect(effective.getDirectTypeNames()).andReturn(Collections.emptyList()); replay(effective); TypeEditor editor = new TypeEditor(effective); editor.childNodeDeleted("mandatory", EMPTY_NODE); }
@Test(expected = CommitFailedException.class) public void removeMandatoryProperty() throws CommitFailedException { EffectiveType effective = createControl().createMock(EffectiveType.class); expect(effective.isMandatoryProperty("mandatory")).andReturn(true); expect(effective.getDirectTypeNames()).andReturn(Collections.emptyList()); replay(effective); TypeEditor editor = new TypeEditor(effective); editor.propertyDeleted(PropertyStates.createProperty("mandatory", "")); }