/** * Creates a field from the configuration and the provided content.<p> * * The configured name of the field as provided by {@link #getName()} is used.<p> * * If no valid content is provided (that is the content is either <code>null</code> or * only whitespace), then no field is created and <code>null</code> is returned.<p> * * @param content the content to create the field with * * @return a field created from the configuration and the provided content */ public Field createField(String content) { return createField(getName(), content); }
/** * @see org.opencms.search.I_CmsSearchDocument#addSearchField(org.opencms.search.fields.CmsSearchField, java.lang.String) */ public void addSearchField(CmsSearchField field, String value) { if (field instanceof CmsLuceneField) { add(((CmsLuceneField)field).createField(value)); } else { throw (new CmsRuntimeException( Messages.get().container(Messages.LOG_INVALID_FIELD_CLASS_1, field.getClass().getName()))); } }