DLEditFileEntryTypeDisplayContext { public String getDefaultLanguageId() throws PortalException { return Optional.ofNullable( _getDDMForm() ).map( ddmForm -> LocaleUtil.toLanguageId(ddmForm.getDefaultLocale()) ).orElseGet( () -> LocaleUtil.toLanguageId(LocaleUtil.getSiteDefault()) ); } 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 testGetDefaultLanguageId() throws Exception { DLEditFileEntryTypeDisplayContext dlEditFileEntryTypeDisplayContext = new DLEditFileEntryTypeDisplayContext( _ddm, _ddmStorageLinkLocalService, _ddmStructureLocalService, _language, new MockLiferayPortletRenderRequest( new MockHttpServletRequestBuilder().withAttribute( WebKeys.DOCUMENT_LIBRARY_DYNAMIC_DATA_MAPPING_STRUCTURE, _getRandomDDMStructure() ).withParameter( "definition", RandomTestUtil.randomString() ).build()), null); Assert.assertEquals( "pt_BR", dlEditFileEntryTypeDisplayContext.getDefaultLanguageId()); }