test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditorTest.java
test_class.identifier: TypeEditorTest
test_case.body: @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", ""));
      }
test_case.class_method_signature: TypeEditorTest.removeMandatoryProperty()
test_case.full_signature: @Test(expected = CommitFailedException.class) public void removeMandatoryProperty()
test_case.identifier: removeMandatoryProperty
test_case.invocations: createMock createControl andReturn expect isMandatoryProperty andReturn expect getDirectTypeNames emptyList replay propertyDeleted createProperty
test_case.modifiers: @Test(expected = CommitFailedException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void removeMandatoryProperty()
focal_class.declarator: THROW_ON_CONSTRAINT_VIOLATION = new ConstraintViolationCallback() {
          
          @Override
          public void onConstraintViolation(String path, List<String> nodeTypeNames, int code, String message) throws CommitFailedException {
              
              String fullPath =  path + '[' + nodeTypeNames.toString() + ']';
  
              throw new CommitFailedException(CONSTRAINT, code, fullPath + ": " + message);
          }
      }
focal_class.modifier: public static final
focal_class.original_string: public static final ConstraintViolationCallback THROW_ON_CONSTRAINT_VIOLATION = new ConstraintViolationCallback() {
          
          @Override
          public void onConstraintViolation(String path, List<String> nodeTypeNames, int code, String message) throws CommitFailedException {
              
              String fullPath =  path + '[' + nodeTypeNames.toString() + ']';
  
              throw new CommitFailedException(CONSTRAINT, code, fullPath + ": " + message);
          }
      };
focal_class.type: ConstraintViolationCallback
focal_class.var_name: THROW_ON_CONSTRAINT_VIOLATION
focal_class.declarator: WARN_ON_CONSTRAINT_VIOLATION = new ConstraintViolationCallback() {
          
          @Override
          public void onConstraintViolation(String path, List<String> nodeTypeNames, int code, String message ) {
              
              String fullPath =  path + '[' + nodeTypeNames.toString() + ']';
  
              log.warn(new CommitFailedException(CONSTRAINT, code, fullPath + ": " + message).getMessage());
  
          }
      }
focal_class.modifier: public static final
focal_class.original_string: public static final ConstraintViolationCallback WARN_ON_CONSTRAINT_VIOLATION = new ConstraintViolationCallback() {
          
          @Override
          public void onConstraintViolation(String path, List<String> nodeTypeNames, int code, String message ) {
              
              String fullPath =  path + '[' + nodeTypeNames.toString() + ']';
  
              log.warn(new CommitFailedException(CONSTRAINT, code, fullPath + ": " + message).getMessage());
  
          }
      };
focal_class.type: ConstraintViolationCallback
focal_class.var_name: WARN_ON_CONSTRAINT_VIOLATION
focal_class.declarator: log = LoggerFactory.getLogger(TypeEditor.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(TypeEditor.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: valueFactory
focal_class.modifier: private final
focal_class.original_string: private final PartialValueFactory valueFactory;
focal_class.type: PartialValueFactory
focal_class.var_name: valueFactory
focal_class.declarator: typesToCheck
focal_class.modifier: private final
focal_class.original_string: private final Set<String> typesToCheck;
focal_class.type: Set<String>
focal_class.var_name: typesToCheck
focal_class.declarator: checkThisNode
focal_class.modifier: private
focal_class.original_string: private boolean checkThisNode;
focal_class.type: boolean
focal_class.var_name: checkThisNode
focal_class.declarator: callback
focal_class.modifier: private final
focal_class.original_string: private final ConstraintViolationCallback callback;
focal_class.type: ConstraintViolationCallback
focal_class.var_name: callback
focal_class.declarator: parent
focal_class.modifier: private final
focal_class.original_string: private final TypeEditor parent;
focal_class.type: TypeEditor
focal_class.var_name: parent
focal_class.declarator: nodeName
focal_class.modifier: private final
focal_class.original_string: private final String nodeName;
focal_class.type: String
focal_class.var_name: nodeName
focal_class.declarator: types
focal_class.modifier: private final
focal_class.original_string: private final NodeState types;
focal_class.type: NodeState
focal_class.var_name: types
focal_class.declarator: effective
focal_class.modifier: private final
focal_class.original_string: private final EffectiveType effective;
focal_class.type: EffectiveType
focal_class.var_name: effective
focal_class.declarator: builder
focal_class.modifier: private final
focal_class.original_string: private final NodeBuilder builder;
focal_class.type: NodeBuilder
focal_class.var_name: builder
focal_class.declarator: validate
focal_class.modifier: private final
focal_class.original_string: private final boolean validate;
focal_class.type: boolean
focal_class.var_name: validate
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditor.java
focal_class.identifier: TypeEditor
focal_class.class_method_signature: TypeEditor.create(@NotNull ConstraintViolationCallback callback, Set<String> typesToCheck,
              @NotNull NodeState types, String primary, Iterable<String> mixins, 
              @NotNull NodeBuilder builder)
focal_class.full_signature: public static TypeEditor create(@NotNull ConstraintViolationCallback callback, Set<String> typesToCheck,
              @NotNull NodeState types, String primary, Iterable<String> mixins, 
              @NotNull NodeBuilder builder)
focal_class.identifier: create
focal_class.modifiers: public static
focal_class.parameters: (@NotNull ConstraintViolationCallback callback, Set<String> typesToCheck,
              @NotNull NodeState types, String primary, Iterable<String> mixins, 
              @NotNull NodeBuilder builder)
focal_class.return: TypeEditor
focal_class.signature: TypeEditor create(@NotNull ConstraintViolationCallback callback, Set<String> typesToCheck,
              @NotNull NodeState types, String primary, Iterable<String> mixins, 
              @NotNull NodeBuilder builder)
focal_class.class_method_signature: TypeEditor.TypeEditor(
              ConstraintViolationCallback callback, Set<String> typesToCheck, NodeState types,
              String primary, Iterable<String> mixins, NodeBuilder builder)
focal_class.full_signature:   TypeEditor(
              ConstraintViolationCallback callback, Set<String> typesToCheck, NodeState types,
              String primary, Iterable<String> mixins, NodeBuilder builder)
focal_class.identifier: TypeEditor
focal_class.parameters: (
              ConstraintViolationCallback callback, Set<String> typesToCheck, NodeState types,
              String primary, Iterable<String> mixins, NodeBuilder builder)
focal_class.signature:  TypeEditor(
              ConstraintViolationCallback callback, Set<String> typesToCheck, NodeState types,
              String primary, Iterable<String> mixins, NodeBuilder builder)
focal_class.class_method_signature: TypeEditor.TypeEditor(
              @NotNull TypeEditor parent, @NotNull String name,
              @Nullable String primary, @NotNull Iterable<String> mixins, @NotNull NodeBuilder builder,
              boolean validate)
focal_class.full_signature: private  TypeEditor(
              @NotNull TypeEditor parent, @NotNull String name,
              @Nullable String primary, @NotNull Iterable<String> mixins, @NotNull NodeBuilder builder,
              boolean validate)
focal_class.identifier: TypeEditor
focal_class.modifiers: private
focal_class.parameters: (
              @NotNull TypeEditor parent, @NotNull String name,
              @Nullable String primary, @NotNull Iterable<String> mixins, @NotNull NodeBuilder builder,
              boolean validate)
focal_class.signature:  TypeEditor(
              @NotNull TypeEditor parent, @NotNull String name,
              @Nullable String primary, @NotNull Iterable<String> mixins, @NotNull NodeBuilder builder,
              boolean validate)
focal_class.class_method_signature: TypeEditor.TypeEditor(EffectiveType effective)
focal_class.full_signature:   TypeEditor(EffectiveType effective)
focal_class.identifier: TypeEditor
focal_class.parameters: (EffectiveType effective)
focal_class.signature:  TypeEditor(EffectiveType effective)
focal_class.class_method_signature: TypeEditor.constraintViolation(int code, String message)
focal_class.full_signature: private void constraintViolation(int code, String message)
focal_class.identifier: constraintViolation
focal_class.modifiers: private
focal_class.parameters: (int code, String message)
focal_class.return: void
focal_class.signature: void constraintViolation(int code, String message)
focal_class.class_method_signature: TypeEditor.getPath()
focal_class.full_signature: private String getPath()
focal_class.identifier: getPath
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPath()
focal_class.class_method_signature: TypeEditor.propertyAdded(PropertyState after)
focal_class.full_signature: @Override public void propertyAdded(PropertyState after)
focal_class.identifier: propertyAdded
focal_class.modifiers: @Override public
focal_class.parameters: (PropertyState after)
focal_class.return: void
focal_class.signature: void propertyAdded(PropertyState after)
focal_class.class_method_signature: TypeEditor.propertyChanged(PropertyState before, PropertyState after)
focal_class.full_signature: @Override public void propertyChanged(PropertyState before, PropertyState after)
focal_class.identifier: propertyChanged
focal_class.modifiers: @Override public
focal_class.parameters: (PropertyState before, PropertyState after)
focal_class.return: void
focal_class.signature: void propertyChanged(PropertyState before, PropertyState after)
focal_class.class_method_signature: TypeEditor.propertyDeleted(PropertyState before)
focal_class.full_signature: @Override public void propertyDeleted(PropertyState before)
focal_class.identifier: propertyDeleted
focal_class.modifiers: @Override public
focal_class.parameters: (PropertyState before)
focal_class.return: void
focal_class.signature: void propertyDeleted(PropertyState before)
focal_class.class_method_signature: TypeEditor.enter(NodeState before, NodeState after)
focal_class.full_signature: @Override public void enter(NodeState before, NodeState after)
focal_class.identifier: enter
focal_class.modifiers: @Override public
focal_class.parameters: (NodeState before, NodeState after)
focal_class.return: void
focal_class.signature: void enter(NodeState before, NodeState after)
focal_class.class_method_signature: TypeEditor.childNodeAdded(String name, NodeState after)
focal_class.full_signature: @Override public Editor childNodeAdded(String name, NodeState after)
focal_class.identifier: childNodeAdded
focal_class.modifiers: @Override public
focal_class.parameters: (String name, NodeState after)
focal_class.return: Editor
focal_class.signature: Editor childNodeAdded(String name, NodeState after)
focal_class.class_method_signature: TypeEditor.childNodeChanged(
              String name, NodeState before, NodeState after)
focal_class.full_signature: @Override public TypeEditor childNodeChanged(
              String name, NodeState before, NodeState after)
focal_class.identifier: childNodeChanged
focal_class.modifiers: @Override public
focal_class.parameters: (
              String name, NodeState before, NodeState after)
focal_class.return: TypeEditor
focal_class.signature: TypeEditor childNodeChanged(
              String name, NodeState before, NodeState after)
focal_class.class_method_signature: TypeEditor.childNodeDeleted(String name, NodeState before)
focal_class.full_signature: @Override public Editor childNodeDeleted(String name, NodeState before)
focal_class.identifier: childNodeDeleted
focal_class.modifiers: @Override public
focal_class.parameters: (String name, NodeState before)
focal_class.return: Editor
focal_class.signature: Editor childNodeDeleted(String name, NodeState before)
focal_class.class_method_signature: TypeEditor.createEffectiveType(
              @Nullable EffectiveType parent, @Nullable String name,
              @Nullable String primary, @NotNull Iterable<String> mixins)
focal_class.full_signature: @NotNull private EffectiveType createEffectiveType(
              @Nullable EffectiveType parent, @Nullable String name,
              @Nullable String primary, @NotNull Iterable<String> mixins)
focal_class.identifier: createEffectiveType
focal_class.modifiers: @NotNull private
focal_class.parameters: (
              @Nullable EffectiveType parent, @Nullable String name,
              @Nullable String primary, @NotNull Iterable<String> mixins)
focal_class.return: EffectiveType
focal_class.signature: EffectiveType createEffectiveType(
              @Nullable EffectiveType parent, @Nullable String name,
              @Nullable String primary, @NotNull Iterable<String> mixins)
focal_class.class_method_signature: TypeEditor.getEffective()
focal_class.full_signature: @NotNull private EffectiveType getEffective()
focal_class.identifier: getEffective
focal_class.modifiers: @NotNull private
focal_class.parameters: ()
focal_class.return: EffectiveType
focal_class.signature: EffectiveType getEffective()
focal_class.class_method_signature: TypeEditor.getRequiredType(NodeState definition)
focal_class.full_signature: private static int getRequiredType(NodeState definition)
focal_class.identifier: getRequiredType
focal_class.modifiers: private static
focal_class.parameters: (NodeState definition)
focal_class.return: int
focal_class.signature: int getRequiredType(NodeState definition)
focal_class.class_method_signature: TypeEditor.checkRequiredType(PropertyState property, int requiredType)
focal_class.full_signature: private void checkRequiredType(PropertyState property, int requiredType)
focal_class.identifier: checkRequiredType
focal_class.modifiers: private
focal_class.parameters: (PropertyState property, int requiredType)
focal_class.return: void
focal_class.signature: void checkRequiredType(PropertyState property, int requiredType)
focal_class.class_method_signature: TypeEditor.checkValueConstraints(NodeState definition, PropertyState property, int requiredType)
focal_class.full_signature: private void checkValueConstraints(NodeState definition, PropertyState property, int requiredType)
focal_class.identifier: checkValueConstraints
focal_class.modifiers: private
focal_class.parameters: (NodeState definition, PropertyState property, int requiredType)
focal_class.return: void
focal_class.signature: void checkValueConstraints(NodeState definition, PropertyState property, int requiredType)
focal_class.class_method_signature: TypeEditor.primaryChanged(NodeState before, String after)
focal_class.full_signature: private static boolean primaryChanged(NodeState before, String after)
focal_class.identifier: primaryChanged
focal_class.modifiers: private static
focal_class.parameters: (NodeState before, String after)
focal_class.return: boolean
focal_class.signature: boolean primaryChanged(NodeState before, String after)
focal_class.class_method_signature: TypeEditor.mixinsChanged(NodeState before, Iterable<String> after)
focal_class.full_signature: private static boolean mixinsChanged(NodeState before, Iterable<String> after)
focal_class.identifier: mixinsChanged
focal_class.modifiers: private static
focal_class.parameters: (NodeState before, Iterable<String> after)
focal_class.return: boolean
focal_class.signature: boolean mixinsChanged(NodeState before, Iterable<String> after)
focal_class.class_method_signature: TypeEditor.checkNodeTypeConstraints(NodeState after)
focal_class.full_signature: private void checkNodeTypeConstraints(NodeState after)
focal_class.identifier: checkNodeTypeConstraints
focal_class.modifiers: private
focal_class.parameters: (NodeState after)
focal_class.return: void
focal_class.signature: void checkNodeTypeConstraints(NodeState after)
focal_class.class_method_signature: TypeEditor.checkPropertyTypeConstraints(PropertyState after)
focal_class.full_signature: private void checkPropertyTypeConstraints(PropertyState after)
focal_class.identifier: checkPropertyTypeConstraints
focal_class.modifiers: private
focal_class.parameters: (PropertyState after)
focal_class.return: void
focal_class.signature: void checkPropertyTypeConstraints(PropertyState after)
focal_class.superclass: extends DefaultEditor
focal_method.body: @Override
      public void propertyDeleted(PropertyState before)
              throws CommitFailedException {
          String name = before.getName();
          if (checkThisNode && effective.isMandatoryProperty(name)) {
              constraintViolation(
                      22, "Mandatory property " + name + " can not be removed");
          }
      }
focal_method.class_method_signature: TypeEditor.propertyDeleted(PropertyState before)
focal_method.full_signature: @Override public void propertyDeleted(PropertyState before)
focal_method.identifier: propertyDeleted
focal_method.invocations: getName isMandatoryProperty constraintViolation
focal_method.modifiers: @Override public
focal_method.parameters: (PropertyState before)
focal_method.return: void
focal_method.signature: void propertyDeleted(PropertyState before)