Search in sources :

Example 1 with ExecutionWindowCreateParam

use of com.emc.vipr.model.catalog.ExecutionWindowCreateParam in project coprhd-controller by CoprHD.

the class ExecutionWindowsApi method create.

public static void create(ExecutionWindowInfo info) {
    ExecutionWindowRestRep window = new ExecutionWindowRestRep();
    copyExecutionWindowInfoToExecutionWindow(info, window);
    createForm(window).validate("executionWindowForm");
    if (validation.hasErrors()) {
        response.status = HttpStatus.SC_BAD_REQUEST;
        renderApi(getValidationErrors());
    } else {
        ExecutionWindowCreateParam createParam = new ExecutionWindowCreateParam();
        map(createParam, info);
        ExecutionWindowUtils.createExecutionWindow(createParam);
        info.setId(window.getId().toString());
        renderApi(info);
    }
}
Also used : ExecutionWindowRestRep(com.emc.vipr.model.catalog.ExecutionWindowRestRep) ExecutionWindowCreateParam(com.emc.vipr.model.catalog.ExecutionWindowCreateParam)

Aggregations

ExecutionWindowCreateParam (com.emc.vipr.model.catalog.ExecutionWindowCreateParam)1 ExecutionWindowRestRep (com.emc.vipr.model.catalog.ExecutionWindowRestRep)1