DOCS : Add some java docs.
Original commit: elastic/x-pack-elasticsearch@394d957364
This commit is contained in:
parent
a3259e9c62
commit
bed7ddbb01
|
@ -11,7 +11,12 @@ import org.elasticsearch.common.xcontent.XContentBuilder;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @TODO add jdocs
|
||||
* This class represents the ack (acknowleged state of an alert)
|
||||
*
|
||||
* NOT_ACKABLE : This alert cannot be ACKed
|
||||
* NOT_TRIGGERED : This alert is in the base line state. A positive trigger will cause the alert to move to the NEEDS_ACK state
|
||||
* NEEDS_ACK : This alert is in the fired state and has sent an alert action, subsequent positive triggers will cause more actions to occur
|
||||
* ACKED : This alert has been acknowleged, subsequent positive triggers will not cause actions to occur, a negative trigger will move the alert back into NOT_TRIGGERED state
|
||||
*/
|
||||
public enum AlertAckState implements ToXContent {
|
||||
NOT_ACKABLE, ///@TODO perhaps null
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.elasticsearch.common.io.stream.StreamOutput;
|
|||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* This class contains the ackState of the alert, if the alert was successfully acked this will be ACK
|
||||
*/
|
||||
public class AckAlertResponse extends ActionResponse {
|
||||
|
||||
|
@ -22,14 +23,25 @@ public class AckAlertResponse extends ActionResponse {
|
|||
public AckAlertResponse() {
|
||||
}
|
||||
|
||||
/**
|
||||
* The Constructor that takes the ack state for the alert
|
||||
* @param alertAckState
|
||||
*/
|
||||
public AckAlertResponse(@Nullable AlertAckState alertAckState) {
|
||||
this.alertAckState = alertAckState;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The ack state for the alert
|
||||
*/
|
||||
public AlertAckState getAlertAckState() {
|
||||
return alertAckState;
|
||||
}
|
||||
|
||||
public void setAlertAckState(AlertAckState alertAckState) {
|
||||
this.alertAckState = alertAckState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) throws IOException {
|
||||
super.readFrom(in);
|
||||
|
|
Loading…
Reference in New Issue