DDMFormTaglibUtil { public static DDMForm getDDMForm( long ddmStructureId, long ddmStructureVersionId) { if (ddmStructureVersionId > 0) { DDMStructureVersion ddmStructureVersion = _ddmStructureVersionLocalService.fetchDDMStructureVersion( ddmStructureVersionId); if (ddmStructureVersion != null) { return ddmStructureVersion.getDDMForm(); } } if (ddmStructureId > 0) { DDMStructure ddmStructure = _ddmStructureLocalService.fetchDDMStructure(ddmStructureId); if (ddmStructure != null) { return ddmStructure.getDDMForm(); } } return new DDMForm(); }  static DDMFormValues createDDMFormValues(
		HttpServletRequest httpServletRequest, DDMForm ddmForm); static DDMForm getDDMForm(
		long ddmStructureId, long ddmStructureVersionId); static DDMFormBuilderSettingsResponse getDDMFormBuilderSettings(
		DDMFormBuilderSettingsRequest ddmFormBuilderSettingsRequest); static JSONArray getDDMFormFieldTypesJSONArray(); static DDMFormInstance getDDMFormInstance(long ddmFormInstanceId); static DDMFormInstanceRecord getDDMFormInstanceRecord(
		long ddmFormInstanceRecordId); static DDMFormInstanceRecordVersion getDDMFormInstanceRecordVersion(
		long ddmFormInstanceRecordVersionId); static DDMFormInstanceVersion getDDMFormInstanceVersion(
		long ddmFormInstanceVersionId); static String getFormBuilderContext(
		long ddmStructureId, long ddmStructureVersionId,
		HttpServletRequest httpServletRequest); static Group getGroup(long groupId); static DDMFormInstanceVersion getLatestDDMFormInstanceVersion(
			long ddmFormInstanceId, int status); static String getNPMResolvedPackageName(); static boolean hasWorkflowDefinitionLink(
		long companyId, long groupId, String name, long ddmFormInstanceId); static DDMFormValues mergeDDMFormValues(
		DDMFormValues newDDMFormValues, DDMFormValues existingDDMFormValues); static String renderForm(
			DDMForm ddmForm, DDMFormLayout ddmFormLayout,
			DDMFormRenderingContext ddmFormRenderingContext);  }
@Test public void testGetDDMFormFromDDMStructure() { DDMForm ddmForm = _ddmStructure.getDDMForm(); Assert.assertTrue( ddmForm.equals( _ddmFormTaglibUtil.getDDMForm( _ddmStructure.getStructureId(), 0))); }
@Test public void testGetDDMFormFromDDMStructureVersion1() { DDMForm ddmForm = _ddmStructureVersion.getDDMForm(); Assert.assertTrue( ddmForm.equals( _ddmFormTaglibUtil.getDDMForm( 0, _ddmStructureVersion.getStructureId()))); }
@Test public void testGetDDMFormFromDDMStructureVersion2() { DDMForm ddmForm = _ddmStructureVersion.getDDMForm(); Assert.assertTrue( ddmForm.equals( _ddmFormTaglibUtil.getDDMForm( _ddmStructure.getStructureId(), _ddmStructureVersion.getStructureId()))); }
@Test public void testGetEmptyDDMFormTest() { Assert.assertEquals(new DDMForm(), _ddmFormTaglibUtil.getDDMForm(0, 0)); }