Search in sources :

Example 1 with CapabilityType

use of eu.europa.ec.fisheries.schema.exchange.service.v1.CapabilityType in project midpoint by Evolveum.

the class AddCapabilityDialog method initLayout.

private void initLayout(WebMarkupContainer container) {
    List<IColumn<CapabilityDto<CapabilityType>, String>> columns = initColumns();
    TablePanel<CapabilityDto<CapabilityType>> table = new TablePanel<>(ID_TABLE, createProvider(), columns);
    table.setOutputMarkupId(true);
    table.setShowPaging(false);
    container.add(table);
    AjaxButton cancelButton = new AjaxButton(ID_CANCEL, createStringResource("addCapabilityDialog.button.cancel")) {

        @Override
        public void onClick(AjaxRequestTarget ajaxRequestTarget) {
            cancelPerformed(ajaxRequestTarget);
        }
    };
    container.add(cancelButton);
    AjaxButton addButton = new AjaxButton(ID_ADD, createStringResource("addCapabilityDialog.button.Add")) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            addPerformed(target);
        }
    };
    container.add(addButton);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) CapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.CapabilityType) AjaxButton(com.evolveum.midpoint.web.component.AjaxButton) IColumn(org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn) CapabilityDto(com.evolveum.midpoint.web.component.wizard.resource.dto.CapabilityDto) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Example 2 with CapabilityType

use of eu.europa.ec.fisheries.schema.exchange.service.v1.CapabilityType in project UVMS-ExchangeModule-APP by UnionVMS.

the class MockData method getCapabilityList.

public static CapabilityListType getCapabilityList() {
    CapabilityListType dto = new CapabilityListType();
    CapabilityType capability = new CapabilityType();
    capability.setType(CapabilityTypeType.POLLABLE);
    capability.setValue("TRUE");
    dto.getCapability().add(capability);
    return dto;
}
Also used : CapabilityListType(eu.europa.ec.fisheries.schema.exchange.service.v1.CapabilityListType) CapabilityType(eu.europa.ec.fisheries.schema.exchange.service.v1.CapabilityType)

Example 3 with CapabilityType

use of eu.europa.ec.fisheries.schema.exchange.service.v1.CapabilityType in project UVMS-ExchangeModule-APP by UnionVMS.

the class ServiceMapper method toCapabilityModel.

private static CapabilityType toCapabilityModel(ServiceCapability capability) {
    CapabilityType model = new CapabilityType();
    model.setType(capability.getCapability());
    model.setValue(capability.getValue());
    return model;
}
Also used : CapabilityType(eu.europa.ec.fisheries.schema.exchange.service.v1.CapabilityType)

Example 4 with CapabilityType

use of eu.europa.ec.fisheries.schema.exchange.service.v1.CapabilityType in project UVMS-ExchangeModule-APP by UnionVMS.

the class ServiceMapper method toModel.

public static CapabilityType toModel(ServiceCapability entity) {
    CapabilityType type = new CapabilityType();
    type.setType(entity.getCapability());
    type.setValue(entity.getValue());
    return type;
}
Also used : CapabilityType(eu.europa.ec.fisheries.schema.exchange.service.v1.CapabilityType)

Example 5 with CapabilityType

use of eu.europa.ec.fisheries.schema.exchange.service.v1.CapabilityType in project midpoint by Evolveum.

the class AddCapabilityDialog method loadModel.

private List<CapabilityDto<CapabilityType>> loadModel(IModel<CapabilityStepDto> capabilityModel) {
    List<Class<? extends CapabilityType>> existingCapabilityClasses = new ArrayList<>();
    for (CapabilityDto cap : capabilityModel.getObject().getCapabilities()) {
        existingCapabilityClasses.add(cap.getCapability().getClass());
    }
    List<CapabilityDto<CapabilityType>> rv = new ArrayList<>();
    for (Capability supportedCapability : Capability.values()) {
        if (!existingCapabilityClasses.contains(supportedCapability.getClazz())) {
            // 'among natives' doesn't matter here
            rv.add(new CapabilityDto<>(CapabilityStep.fillDefaults(supportedCapability.newInstance()), false));
        }
    }
    return rv;
}
Also used : CapabilityType(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.CapabilityType) Capability(com.evolveum.midpoint.web.component.wizard.resource.dto.Capability) CapabilityDto(com.evolveum.midpoint.web.component.wizard.resource.dto.CapabilityDto) ArrayList(java.util.ArrayList)

Aggregations

CapabilityType (eu.europa.ec.fisheries.schema.exchange.service.v1.CapabilityType)4 CapabilityDto (com.evolveum.midpoint.web.component.wizard.resource.dto.CapabilityDto)2 CapabilityType (com.evolveum.midpoint.xml.ns._public.resource.capabilities_3.CapabilityType)2 ArrayList (java.util.ArrayList)2 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)1 TablePanel (com.evolveum.midpoint.web.component.data.TablePanel)1 Capability (com.evolveum.midpoint.web.component.wizard.resource.dto.Capability)1 CapabilityListType (eu.europa.ec.fisheries.schema.exchange.service.v1.CapabilityListType)1 ServiceCapability (eu.europa.ec.fisheries.uvms.exchange.entity.serviceregistry.ServiceCapability)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1 IColumn (org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn)1