use of org.ovirt.engine.core.common.interfaces.BackendLocal in project ovirt-engine by oVirt.
the class BackendResource method doNonBlockingAction.
protected void doNonBlockingAction(final ActionType task, final ActionParametersBase params) {
BackendLocal backend = getBackend();
setCorrelationId(params);
setJobOrStepId(params);
backend.runAction(ActionType.RunAsyncAction, sessionize(new RunAsyncActionParameters(task, sessionize(params))));
}
use of org.ovirt.engine.core.common.interfaces.BackendLocal in project ovirt-engine by oVirt.
the class BackendResource method doAction.
protected ActionReturnValue doAction(ActionType task, ActionParametersBase params) throws BackendFailureException {
BackendLocal backend = getBackend();
setJobOrStepId(params);
setCorrelationId(params);
ActionReturnValue result = backend.runAction(task, sessionize(params));
if (result != null && !result.isValid()) {
backendFailure(result.getValidationMessages());
} else if (result != null && !result.getSucceeded()) {
backendFailure(result.getExecuteFailedMessages());
}
assert result != null;
return result;
}
use of org.ovirt.engine.core.common.interfaces.BackendLocal in project ovirt-engine by oVirt.
the class BackendResource method runQuery.
public QueryReturnValue runQuery(QueryType queryType, QueryParametersBase queryParams) {
BackendLocal backend = getBackend();
setCorrelationId(queryParams);
queryParams.setFiltered(isFiltered());
return backend.runQuery(queryType, sessionize(queryParams));
}
use of org.ovirt.engine.core.common.interfaces.BackendLocal in project ovirt-engine by oVirt.
the class BaseBackendResource method localize.
protected String localize(String error) {
BackendLocal backend = getBackend();
Locale locale = getEffectiveLocale();
return locale != null ? backend.getErrorsTranslator().translateErrorTextSingle(error, locale) : backend.getErrorsTranslator().translateErrorTextSingle(error);
}
use of org.ovirt.engine.core.common.interfaces.BackendLocal in project ovirt-engine by oVirt.
the class BaseBackendResource method localize.
protected String localize(List<String> errors) {
BackendLocal backend = getBackend();
Locale locale = getEffectiveLocale();
return locale != null ? backend.getErrorsTranslator().translateErrorText(errors, locale).toString() : backend.getErrorsTranslator().translateErrorText(errors).toString();
}
Aggregations