Search in sources :

Example 1 with TemplateDescriptorModel

use of org.guvnor.ala.ui.openshift.model.TemplateDescriptorModel in project kie-wb-common by kiegroup.

the class OpenShiftClientServiceImpl method getTemplateModel.

@Override
public TemplateDescriptorModel getTemplateModel(final String url) {
    checkNotNull("url", url);
    OpenShiftTemplate template = new OpenShiftTemplate(url);
    List<TemplateParam> params = buildTemplateParams(template);
    final TemplateDescriptorModel descriptorModel = new TemplateDescriptorModel(params);
    return descriptorModel;
}
Also used : TemplateDescriptorModel(org.guvnor.ala.ui.openshift.model.TemplateDescriptorModel) OpenShiftTemplate(org.guvnor.ala.openshift.access.OpenShiftTemplate) TemplateParam(org.guvnor.ala.ui.openshift.model.TemplateParam)

Example 2 with TemplateDescriptorModel

use of org.guvnor.ala.ui.openshift.model.TemplateDescriptorModel in project kie-wb-common by kiegroup.

the class OpenShiftClientServiceImplTest method testGetTemplateModel.

@Test
public void testGetTemplateModel() throws Exception {
    String url = getClass().getClassLoader().getResource(TEMPLATE).toString();
    TemplateDescriptorModel model = service.getTemplateModel(url);
    List<TemplateParam> expectedParams = buildExpectedParams(PARAMS_COUNT);
    assertEquals(expectedParams, model.getParams());
}
Also used : TemplateDescriptorModel(org.guvnor.ala.ui.openshift.model.TemplateDescriptorModel) TemplateParam(org.guvnor.ala.ui.openshift.model.TemplateParam) Test(org.junit.Test)

Aggregations

TemplateDescriptorModel (org.guvnor.ala.ui.openshift.model.TemplateDescriptorModel)2 TemplateParam (org.guvnor.ala.ui.openshift.model.TemplateParam)2 OpenShiftTemplate (org.guvnor.ala.openshift.access.OpenShiftTemplate)1 Test (org.junit.Test)1