Search in sources :

Example 1 with Client

use of org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Client in project kie-wb-common by kiegroup.

the class NestedFormsBPMNVFSFormDefinitionGeneratorServiceTest method getClientDataObject.

protected DataObject getClientDataObject() {
    DataObject client = new DataObjectImpl(Client.class.getPackage().toString(), Client.class.getSimpleName());
    client.addProperty("id", Long.class.getName(), false, null);
    client.addProperty("name", String.class.getName(), false, null);
    client.addProperty("lastName", String.class.getName(), false, null);
    return client;
}
Also used : DataObjectImpl(org.kie.workbench.common.services.datamodeller.core.impl.DataObjectImpl) DataObject(org.kie.workbench.common.services.datamodeller.core.DataObject) Matchers.anyString(org.mockito.Matchers.anyString) Client(org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Client)

Example 2 with Client

use of org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Client in project kie-wb-common by kiegroup.

the class AbstractBPMNFormGeneratorServiceTest method testExpenseForm.

protected void testExpenseForm(FormDefinition form) {
    assertEquals(4, form.getFields().size());
    IntegerBoxFieldDefinition id = (IntegerBoxFieldDefinition) form.getFieldByBinding("id");
    assertNotNull(id);
    assertEquals(Long.class.getName(), id.getStandaloneClassName());
    DatePickerFieldDefinition date = (DatePickerFieldDefinition) form.getFieldByBinding("date");
    assertNotNull(date);
    assertEquals(Date.class.getName(), date.getStandaloneClassName());
    SubFormFieldDefinition client = (SubFormFieldDefinition) form.getFieldByBinding("client");
    assertNotNull(client);
    assertNotNull(client.getNestedForm());
    assertEquals(Client.class.getName(), client.getStandaloneClassName());
    MultipleSubFormFieldDefinition lines = (MultipleSubFormFieldDefinition) form.getFieldByBinding("lines");
    assertNotNull(lines);
    assertNotNull(lines.getCreationForm());
    assertNotNull(lines.getEditionForm());
    assertEquals(lines.getEditionForm(), lines.getCreationForm());
    assertFalse(lines.getColumnMetas().isEmpty());
    assertEquals(Line.class.getName(), lines.getStandaloneClassName());
}
Also used : Line(org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Line) SubFormFieldDefinition(org.kie.workbench.common.forms.fields.shared.fieldTypes.relations.subForm.definition.SubFormFieldDefinition) MultipleSubFormFieldDefinition(org.kie.workbench.common.forms.fields.shared.fieldTypes.relations.multipleSubform.definition.MultipleSubFormFieldDefinition) DatePickerFieldDefinition(org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.datePicker.definition.DatePickerFieldDefinition) Client(org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Client) Date(java.util.Date) MultipleSubFormFieldDefinition(org.kie.workbench.common.forms.fields.shared.fieldTypes.relations.multipleSubform.definition.MultipleSubFormFieldDefinition) IntegerBoxFieldDefinition(org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.integerBox.definition.IntegerBoxFieldDefinition)

Example 3 with Client

use of org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Client in project kie-wb-common by kiegroup.

the class NestedFormsBPMNVFSFormDefinitionGeneratorServiceTest method getExpenseDataObject.

protected DataObject getExpenseDataObject() {
    DataObject expense = new DataObjectImpl(Expense.class.getPackage().toString(), Expense.class.getSimpleName());
    expense.addProperty("id", Long.class.getName(), false, null);
    expense.addProperty("date", Date.class.getName(), false, null);
    expense.addProperty("client", Client.class.getName(), false, null);
    expense.addProperty("lines", Line.class.getName(), true, List.class.getName());
    return expense;
}
Also used : DataObjectImpl(org.kie.workbench.common.services.datamodeller.core.impl.DataObjectImpl) Line(org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Line) DataObject(org.kie.workbench.common.services.datamodeller.core.DataObject) Expense(org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Expense) List(java.util.List) Client(org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Client) Date(java.util.Date)

Aggregations

Client (org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Client)3 Date (java.util.Date)2 Line (org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Line)2 DataObject (org.kie.workbench.common.services.datamodeller.core.DataObject)2 DataObjectImpl (org.kie.workbench.common.services.datamodeller.core.impl.DataObjectImpl)2 List (java.util.List)1 DatePickerFieldDefinition (org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.datePicker.definition.DatePickerFieldDefinition)1 IntegerBoxFieldDefinition (org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.integerBox.definition.IntegerBoxFieldDefinition)1 MultipleSubFormFieldDefinition (org.kie.workbench.common.forms.fields.shared.fieldTypes.relations.multipleSubform.definition.MultipleSubFormFieldDefinition)1 SubFormFieldDefinition (org.kie.workbench.common.forms.fields.shared.fieldTypes.relations.subForm.definition.SubFormFieldDefinition)1 Expense (org.kie.workbench.common.forms.jbpm.server.service.formGeneration.model.Expense)1 Matchers.anyString (org.mockito.Matchers.anyString)1