code: public static boolean checkAddProperty(
          CmsCmisTypeManager typeManager,
          Properties properties,
          String typeId,
          Set<String> filter,
          String id) {
  
          if ((properties == null) || (properties.getProperties() == null)) {
              throw new IllegalArgumentException("Properties must not be null!");
          }
  
          if (id == null) {
              throw new IllegalArgumentException("Id must not be null!");
          }
  
          TypeDefinition type = typeManager.getType(typeId);
          if (type == null) {
              throw new IllegalArgumentException("Unknown type: " + typeId);
          }
          if (!type.getPropertyDefinitions().containsKey(id)) {
              throw new IllegalArgumentException("Unknown property: " + id);
          }
  
          String queryName = type.getPropertyDefinitions().get(id).getQueryName();
  
          if ((queryName != null) && (filter != null)) {
              if (!filter.contains(queryName)) {
                  return false;
              } else {
                  filter.remove(queryName);
              }
          }
  
          return true;
      }
docs: Checks whether a property can be added to a Properties.
  
  @param typeManager
  @param properties the properties object
  @param typeId the type id
  @param filter the property filter
  @param id the property id
  
  @return true if the property should be added