class ServiceInstances extends AbstractRestHandler {

    protected Actions handleReplaceInstance(Actions action, ServiceInstancesRequest sir) {
        if (action != null && action.equals(Action.replaceInstance)
                && sir.getRequestDetails().getRequestParameters().getRetainAssignments() != null
                && sir.getRequestDetails().getRequestParameters().getRetainAssignments()) {
            action = Action.replaceInstanceRetainAssignments;
        }
        return action;
    }

}