package org.ovirt.engine.core.common.action;

import org.ovirt.engine.core.common.businessentities.FenceActionType;
import org.ovirt.engine.core.compat.Guid;

public class FenceVdsActionParameters extends VdsActionParameters {
    private static final long serialVersionUID = 6174371941176548263L;
    private boolean changeHostToMaintenanceOnStart=false;

    /*
     * If the power management policy is responsible for this action
     * pass true so we keep the powerManagementControlledByPolicy flag set.
     *
     * If the user triggered this action, clear the flag.
     */
    private boolean keepPolicyPMEnabled = false;

    public FenceVdsActionParameters(Guid vdsId, FenceActionType action) {
        super(vdsId);
        _action = action;
    }

    public FenceVdsActionParameters(Guid vdsId, FenceActionType action, boolean keepPolicyPMEnabled) {
        this(vdsId, action);
        this.keepPolicyPMEnabled = keepPolicyPMEnabled;
    }

    private FenceActionType _action;

    public FenceActionType getAction() {
        return _action;
    }

    public FenceVdsActionParameters() {
        _action = FenceActionType.Restart;
    }

    public boolean getKeepPolicyPMEnabled() {
        return keepPolicyPMEnabled;
    }

    public void setKeepPolicyPMEnabled(boolean _keepPolicyPMEnabled) {
        this.keepPolicyPMEnabled = _keepPolicyPMEnabled;
    }

    public boolean isChangeHostToMaintenanceOnStart() {
        return changeHostToMaintenanceOnStart;
    }

    public void setChangeHostToMaintenanceOnStart(boolean changeHostStatusOnStart) {
        this.changeHostToMaintenanceOnStart = changeHostStatusOnStart;
    }
}

@@ -618,17 +618,138 @@
 bled
- = false;
+;%0A%0A    private FenceActionType action;%0A%0A    public FenceVdsActionParameters() %7B%0A        this(null, FenceActionType.Restart);%0A    %7D
 %0A%0A  
@@ -832,46 +832,34 @@
     
-super
+this
 (vdsId
-);%0A        _action = action
+, action, false)
 ;%0A  
@@ -978,27 +978,50 @@
     
-this
+super
 (vdsId
-, action)
+);%0A        this.action = action
 ;%0A  
@@ -1085,46 +1085,8 @@
  %7D%0A%0A
-    private FenceActionType _action;%0A%0A
     
@@ -1137,17 +1137,16 @@
  return 
-_
 action;%0A
@@ -1156,98 +1156,8 @@
  %7D%0A%0A
-    public FenceVdsActionParameters() %7B%0A        _action = FenceActionType.Restart;%0A    %7D%0A%0A
     

Refactor FenceVdsActionParameters