DLEditFileEntryTypeDisplayContext { public String getFieldsJSONArrayString() { if (_fieldsJSONArrayString != null) { return _fieldsJSONArrayString; } DDMStructure ddmStructure = _getDDMStructure(); long ddmStructureId = BeanParamUtil.getLong( ddmStructure, _liferayPortletRequest, "structureId"); String definition = BeanParamUtil.getString( ddmStructure, _liferayPortletRequest, "definition"); _fieldsJSONArrayString = Optional.ofNullable( _ddm.getDDMFormFieldsJSONArray( _ddmStructureLocalService.fetchDDMStructure(ddmStructureId), definition) ).map( JSONArray::toString ).orElse( StringPool.BLANK ); return _fieldsJSONArrayString; } DLEditFileEntryTypeDisplayContext(
		DDM ddm, DDMStorageLinkLocalService ddmStorageLinkLocalService,
		DDMStructureLocalService ddmStructureLocalService, Language language,
		LiferayPortletRequest liferayPortletRequest,
		LiferayPortletResponse liferayPortletResponse); List<Map<String, Object>> getAdditionalPanels(
		String npmResolvedPackageName); String getAvailableFields(); Locale[] getAvailableLocales(); String getAvailableLocalesString(); String getDefaultLanguageId(); String getFieldsJSONArrayString(); String getLocalesMapString(); boolean isChangeableDefaultLanguage(); boolean isFieldNameEditionDisabled(); boolean useDataEngineEditor();  }
@Test public void testGetFieldsJSONArrayString() { DLEditFileEntryTypeDisplayContext dlEditFileEntryTypeDisplayContext = new DLEditFileEntryTypeDisplayContext( _ddm, _ddmStorageLinkLocalService, _ddmStructureLocalService, _language, new MockLiferayPortletRenderRequest( new MockHttpServletRequestBuilder().withAttribute( WebKeys.DOCUMENT_LIBRARY_DYNAMIC_DATA_MAPPING_STRUCTURE, _getRandomDDMStructure() ).build()), null); Assert.assertEquals( StringPool.BLANK, dlEditFileEntryTypeDisplayContext.getFieldsJSONArrayString()); }