code: public boolean canSetProperty(String propertyName, Value value)
     {
        try
        {
           InternalQName pname = locationFactory.parseJCRName(propertyName).getInternalName();
  
           PropertyDefinitionDatas pdefs = nodeTypeDataManager.getPropertyDefinitions(pname, nodeTypeData.getName());
           if (pdefs != null)
           {
              PropertyDefinitionData pd = pdefs.getDefinition(false);
              if (pd != null)
              {
                 if (pd.isProtected())
                 {
                    // can set (edit)
                    return false;
                 }
                 else if (value != null)
                 {
                    // can set (add or edit)
                    return canSetPropertyForType(pd.getRequiredType(), value, pd.getValueConstraints());
                 }
                 else
                 {
                    // can remove
                    return !pd.isMandatory();
                 }
              }
           }
           return false;
        }
        catch (RepositoryException e)
        {
           LOG.error("canSetProperty value " + e, e);
           return false;
        }
     }
docs: {@inheritDoc}