Example usage for com.liferay.portal.kernel.util LocaleUtil ROOT

List of usage examples for com.liferay.portal.kernel.util LocaleUtil ROOT

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util LocaleUtil ROOT.

Prototype

Locale ROOT

To view the source code for com.liferay.portal.kernel.util LocaleUtil ROOT.

Click Source Link

Usage

From source file:com.liferay.dynamic.data.mapping.internal.util.DDMFormValuesToFieldsConverterImpl.java

License:Open Source License

protected void setDDMFieldUnlocalizedValue(Field ddmField, String type, Value value, Locale defaultLocale) {

    Serializable serializable = FieldConstants.getSerializable(type, value.getString(LocaleUtil.ROOT));

    ddmField.addValue(defaultLocale, serializable);
}

From source file:com.liferay.dynamic.data.mapping.io.internal.DDMFormValuesJSONSerializerImpl.java

License:Open Source License

protected void addValue(JSONObject jsonObject, DDMFormField ddmFormField, DDMFormFieldValue ddmFormFieldValue) {

    Value value = ddmFormFieldValue.getValue();

    if (value == null) {
        return;//  w w w . j a v  a  2  s .  c o m
    }

    DDMFormFieldValueJSONSerializer ddmFormFieldValueJSONSerializer = getDDMFormFieldValueJSONSerializer(
            ddmFormField);

    if (ddmFormFieldValueJSONSerializer != null) {
        jsonObject.put("value", ddmFormFieldValueJSONSerializer.serialize(ddmFormField, value));
    } else if (value.isLocalized()) {
        jsonObject.put("value", toJSONObject(value));
    } else {
        jsonObject.put("value", value.getString(LocaleUtil.ROOT));
    }
}

From source file:com.liferay.dynamic.data.mapping.model.UnlocalizedValue.java

License:Open Source License

public UnlocalizedValue(String value) {
    _values.put(LocaleUtil.ROOT, value);
}

From source file:com.liferay.dynamic.data.mapping.model.UnlocalizedValue.java

License:Open Source License

public UnlocalizedValue(UnlocalizedValue unlocalizedValue) {
    _values.put(LocaleUtil.ROOT, unlocalizedValue.getString(LocaleUtil.ROOT));
}

From source file:com.liferay.dynamic.data.mapping.model.UnlocalizedValue.java

License:Open Source License

@Override
public void addString(Locale locale, String value) {
    _values.put(LocaleUtil.ROOT, value);
}

From source file:com.liferay.dynamic.data.mapping.model.UnlocalizedValue.java

License:Open Source License

@Override
public Locale getDefaultLocale() {
    return LocaleUtil.ROOT;
}

From source file:com.liferay.dynamic.data.mapping.model.UnlocalizedValue.java

License:Open Source License

@Override
public String getString(Locale locale) {
    return _values.get(LocaleUtil.ROOT);
}