private boolean isProtectedProperty(Node objectNode, FieldDescriptor fieldDescriptor, String jcrName) throws RepositoryException, PathNotFoundException { // Return true if the property is defined as protected in the mapping file if (fieldDescriptor.isJcrProtected()) { return true; } // Check if the property is defined as protected in the JCR repo // 1. Check if the property already exists and may be queried if (objectNode.hasProperty(jcrName)) { return objectNode.getProperty(jcrName).getDefinition().isProtected(); } // 2. Find a definition for the property and checks its protected status PropertyDefinition definition = getPropertyDefinition(objectNode, jcrName); if (definition != null) { return definition.isProtected(); } // This property is not defined in one of the node types return false; }
private boolean isProtectedProperty(Node objectNode, FieldDescriptor fieldDescriptor, String jcrName) throws RepositoryException, PathNotFoundException { // Return true if the property is defined as protected in the mapping file if (fieldDescriptor.isJcrProtected()) { return true; } // Check if the property is defined as protected in the JCR repo // 1. Check if the property already exists and may be queried if (objectNode.hasProperty(jcrName)) { return objectNode.getProperty(jcrName).getDefinition().isProtected(); } // 2. Find a definition for the property and checks its protected status PropertyDefinition definition = getPropertyDefinition(objectNode, jcrName); if (definition != null) { return definition.isProtected(); } // This property is not defined in one of the node types return false; }
PropertyDefinition propDef = getPropertyDefinition(nt, propertyName); for (int i = 0; mixins != null && i < mixins.length; i++) PropertyDefinition candidate = getPropertyDefinition(mixins[i], propertyName);
PropertyDefinition propDef = getPropertyDefinition(nt, propertyName); for (int i = 0; mixins != null && i < mixins.length; i++) PropertyDefinition candidate = getPropertyDefinition(mixins[i], propertyName);
PropertyDefinition propDef = getPropertyDefinition(node, propertyName);
PropertyDefinition propDef = getPropertyDefinition(node, propertyName);
private void checkProperty(Node objectNode, FieldDescriptor fieldDescriptor, Value value) throws RepositoryException { if (value == null) { PropertyDefinition definition = getPropertyDefinition(objectNode, fieldDescriptor.getJcrName()); if (definition != null) { if (definition.isMandatory() && !definition.isAutoCreated()) { throw new ObjectContentManagerException("Class of type:" + fieldDescriptor.getClassDescriptor().getClassName() + " has property: " + fieldDescriptor.getFieldName() + " declared as JCR property: " + fieldDescriptor.getJcrName() + " This property is mandatory but property in bean has value null"); } } } }
private void checkProperty(Node objectNode, FieldDescriptor fieldDescriptor, Value value) throws RepositoryException { if (value == null) { PropertyDefinition definition = getPropertyDefinition(objectNode, fieldDescriptor.getJcrName()); if (definition != null) { if (definition.isMandatory() && !definition.isAutoCreated()) { throw new ObjectContentManagerException("Class of type:" + fieldDescriptor.getClassDescriptor().getClassName() + " has property: " + fieldDescriptor.getFieldName() + " declared as JCR property: " + fieldDescriptor.getJcrName() + " This property is mandatory but property in bean has value null"); } } } }