Collects widget information for a given content value.<p>

@param value a content value

@return the widget information for the given value
352914
public static WidgetInfo collectWidgetInfo(I_CmsXmlContentValue value) {

        CmsXmlContentDefinition contentDef = value.getDocument().getContentDefinition();
        String path = value.getPath();
        return collectWidgetInfo(contentDef, path);
    }
1284724
private String getHelp(I_CmsXmlSchemaType value) {

        StringBuffer result = new StringBuffer(64);
        I_CmsXmlContentHandler handler = value.getContentDefinition().getContentHandler();
        if (handler instanceof CmsDefaultXmlContentHandler) {
            CmsDefaultXmlContentHandler defaultHandler = (CmsDefaultXmlContentHandler)handler;
            String help = defaultHandler.getFieldHelp().get(value.getName());
            if (help != null) {
                CmsMacroResolver resolver = new CmsMacroResolver();
                resolver.setKeepEmptyMacros(true);
                resolver.setMessages(m_messages);
                return resolver.resolveMacros(help);
            }
        }
        result.append(A_CmsWidget.LABEL_PREFIX);
        result.append(getTypeKey(value));
        result.append(A_CmsWidget.HELP_POSTFIX);
        return m_messages.keyDefault(result.toString(), null);
    }
752235
public void setFormValueAsString(String value) {

        if (!CmsStringUtil.isEmpty(value)) {
            try {
                long time = Long.parseLong(value);
                setValue(new Date(time));
            } catch (NumberFormatException e) {
                // if the String value is none long number make the field empty
                setValue(null);
            }
        } else {
            // if the value is <code>null</code> make the field empty
            setValue(null);
        }
    }
899371
public static boolean getBooleanValue(CmsObject cms, I_CmsWidgetParameter value) {

        boolean result;
        if (value instanceof CmsXmlBooleanValue) {
            // this is a "native" boolean type
            result = ((CmsXmlBooleanValue)value).getBooleanValue();
        } else {
            // get the boolean value from the String value
            result = getBooleanValue(value.getStringValue(cms));
        }
        return result;
    }
581754
public void setValue(String value) {
		contents = new ArrayList();
		contents.add(value);
		if (value.trim().length() > 0) {
			containsSingleString = true;
		}
	}
689205
@NonNull public CMARichText setValue(@NonNull CharSequence value) {
    if (value == null) {
      throw new NullPointerException("value is null.");
    }
    this.value = value;
    return this;
  }
387120
public void setUserManagementEnabled(String value) {

        m_showUserGroupIcon = Boolean.valueOf(value).booleanValue();
        if (CmsLog.INIT.isInfoEnabled()) {
            if (m_showUserGroupIcon) {
                CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_USER_MANAGEMENT_ICON_ENABLED_0));
            } else {
                CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_USER_MANAGEMENT_ICON_DISABLED_0));
            }
        }
    }
857485
public void addNewAttributeValue(String value) {

        // make sure not to add more values than allowed
        int maxOccurrence = getEntityType().getAttributeMaxOccurrence(m_attributeName);
        CmsEntityAttribute attribute = m_entity.getAttribute(m_attributeName);
        boolean mayHaveMore = ((attribute == null) || (attribute.getValueCount() < maxOccurrence));
        if (mayHaveMore && getAttributeType().isSimpleType()) {
            I_CmsFormEditWidget widget = m_widgetService.getAttributeFormWidget(m_attributeName);
            m_entity.addAttributeValue(m_attributeName, value);
            int valueCount = m_entity.getAttribute(m_attributeName).getValueCount();
            String defaultValue = m_widgetService.getDefaultAttributeValue(
                m_attributeName,
                getSimplePath(valueCount - 1));
            CmsAttributeValueView valueView = null;
            if ((m_attributeValueViews.size() == 1) && !m_attributeValueViews.get(0).hasValue()) {
                valueView = m_attributeValueViews.get(0);
                valueView.setActive();
                // setActive may have reset the value, so we set it again
                m_entity.setAttributeValue(m_attributeName, value, valueCount - 1);
                valueView.getValueWidget().setValue(value);
            } else {
                valueView = new CmsAttributeValueView(
                    this,
                    m_widgetService.getAttributeLabel(m_attributeName),
                    m_widgetService.getAttributeHelp(m_attributeName));
                if (m_widgetService.isDisplaySingleLine(m_attributeName)) {
                    valueView.setCompactMode(CmsAttributeValueView.COMPACT_MODE_SINGLE_LINE);
                }
                ((FlowPanel)m_attributeValueViews.get(0).getParent()).add(valueView);
                valueView.setValueWidget(widget, value, defaultValue, true);
            }
            CmsUndoRedoHandler handler = CmsUndoRedoHandler.getInstance();
            if (handler.isIntitalized()) {
                handler.addChange(
                    m_entity.getId(),
                    m_attributeName,
                    m_entity.getAttribute(m_attributeName).getValueCount() - 1,
                    ChangeType.add);
            }
            updateButtonVisisbility();
        }
    }
1366625
public void setFormValue(Object value) {

        if (value == null) {
            value = "";
        }

        if (value instanceof String) {
            String strValue = (String)value;
            if (strValue.equals("")) {
                // interpret empty string as "no radio button selected"
                reset();
            } else {
                CmsRadioButton button = m_radioButtons.get(value);
                m_group.selectButton(button);
            }
        }
    }
115657
protected void addContentValue(CmsXmlContent content, Locale locale, String path, String value) {

        boolean hasValue = content.hasValue(path, locale);
        if (!hasValue) {
            String[] pathElements = path.split("/");
            String currentPath = pathElements[0];
            for (int i = 0; i < pathElements.length; i++) {
                if (i > 0) {
                    currentPath = CmsStringUtil.joinPaths(currentPath, pathElements[i]);
                }
                while (!content.hasValue(currentPath, locale)) {
                    content.addValue(m_cms, currentPath, locale, CmsXmlUtils.getXpathIndexInt(currentPath) - 1);
                }
            }
        }
        content.getValue(path, locale).setStringValue(m_cms, value);

    }
1013300
public String set(final int i, final String value) {
		final ConfigBlock block = this.blocks.get(i);
		if (block instanceof ConfigItem) {
			final ConfigItem item = (ConfigItem) block;
			final String previousValue = item.getValue();
			item.setValue(value);
			return previousValue;
		}
		return null;
	}
1003501
@Override
	public KriptonContentValues contentValuesForContentProvider(ContentValues values) {
		KriptonContentValues content = contentValues.get();
		content.clear(values);

		return content;
	}
131639
public static <T extends Comparable<T>> T cmpEq(T value) {
        reportMatcher(new CompareEqual<T>(value));
        return null;
    }
463773
public I_CmsFormWidget createFormWidget(
        String key,
        Map<String, String> widgetParams,
        Optional<String> defaultValue) {

        if (key == null) {
            key = "";
        }
        I_CmsFormWidgetFactory factory = m_widgetFactories.get(key);
        if (factory == null) {
            // if the given widget type is not found, fall back to text box widget
            factory = m_widgetFactories.get(CmsTextBox.WIDGET_TYPE);
        }
        return factory.createWidget(widgetParams, defaultValue);

    }
1111865
public static String nullIfEmpty(String value) {
		return value==null || value.isEmpty() ? null : value;
	}
419646
public void add(String name, Iterable<?> value) {
		if (value != null) {
			this.content.put(name, value);
		}
	}
393099
public T getAndSet(T value) {
        T t = this.value;
        this.value = value;
        return t;
    }