privatestaticfinalStringALARM_QUERY_ASSIGNEE_DESCRIPTION="A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
privatestaticfinalStringALARM_QUERY_TEXT_SEARCH_DESCRIPTION="The case insensitive 'substring' filter based on of next alarm fields: type, severity or status";
privatestaticfinalStringALARM_QUERY_START_TIME_DESCRIPTION="The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.";
privatestaticfinalStringALARM_QUERY_END_TIME_DESCRIPTION="The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.";
@ -93,12 +102,8 @@ public class AlarmController extends BaseController {
protectedstaticfinalStringPAGE_DATA_PARAMETERS="You can specify parameters to filter the results. "+
"The result is wrapped with PageData object that allows you to iterate over result set using pagination. "+
"See the 'Model' tab of the Response Class for more details. ";
@ -44,6 +45,7 @@ public class ControllerConstants {
protectedstaticfinalStringUSER_ID_PARAM_DESCRIPTION="A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedstaticfinalStringASSET_ID_PARAM_DESCRIPTION="A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedstaticfinalStringALARM_ID_PARAM_DESCRIPTION="A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedstaticfinalStringASSIGN_ID_PARAM_DESCRIPTION="A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedstaticfinalStringALARM_COMMENT_ID_PARAM_DESCRIPTION="A string value representing the alarm comment id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
protectedstaticfinalStringENTITY_ID_PARAM_DESCRIPTION="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'";
@ApiModelProperty(position=11,value="Alarm assignee user id")
privateUserIdassigneeId;
@ApiModelProperty(position=12,value="Timestamp of the alarm start time, in milliseconds",example="1634058704565")
privatelongstartTs;
@ApiModelProperty(position=11,value="Timestamp of the alarm end time(last time update), in milliseconds",example="1634111163522")
@ApiModelProperty(position=13,value="Timestamp of the alarm end time(last time update), in milliseconds",example="1634111163522")
privatelongendTs;
@ApiModelProperty(position=12,value="Timestamp of the alarm acknowledgement, in milliseconds",example="1634115221948")
@ApiModelProperty(position=14,value="Timestamp of the alarm acknowledgement, in milliseconds",example="1634115221948")
privatelongackTs;
@ApiModelProperty(position=13,value="Timestamp of the alarm clearing, in milliseconds",example="1634114528465")
@ApiModelProperty(position=15,value="Timestamp of the alarm clearing, in milliseconds",example="1634114528465")
privatelongclearTs;
@ApiModelProperty(position=14,value="JSON object with alarm details")
@ApiModelProperty(position=16,value="Timestamp of the alarm assignment, in milliseconds",example="1634115928465")
privatelongassignTs;
@ApiModelProperty(position=17,value="JSON object with alarm details")
privatetransientJsonNodedetails;
@ApiModelProperty(position=15,value="Propagation flag to specify if alarm should be propagated to parent entities of alarm originator",example="true")
@ApiModelProperty(position=18,value="Propagation flag to specify if alarm should be propagated to parent entities of alarm originator",example="true")
privatebooleanpropagate;
@ApiModelProperty(position=16,value="Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator",example="true")
@ApiModelProperty(position=19,value="Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator",example="true")
privatebooleanpropagateToOwner;
@ApiModelProperty(position=17,value="Propagation flag to specify if alarm should be propagated to the tenant entity",example="true")
@ApiModelProperty(position=20,value="Propagation flag to specify if alarm should be propagated to the tenant entity",example="true")
privatebooleanpropagateToTenant;
@ApiModelProperty(position=18,value="JSON array of relation types that should be used for propagation. "+
@ApiModelProperty(position=21,value="JSON array of relation types that should be used for propagation. "+
"By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. "+
"This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored.")
privateList<String>propagateRelationTypes;
@ -97,11 +108,14 @@ public class Alarm extends BaseData<AlarmId> implements HasName, HasTenantId, Ha
this.type=alarm.getType();
this.originator=alarm.getOriginator();
this.severity=alarm.getSeverity();
this.status=alarm.getStatus();
this.assigneeId=alarm.getAssigneeId();
this.startTs=alarm.getStartTs();
this.endTs=alarm.getEndTs();
this.acknowledged=alarm.isAcknowledged();
this.ackTs=alarm.getAckTs();
this.clearTs=alarm.getClearTs();
this.cleared=alarm.isCleared();
this.assignTs=alarm.getAssignTs();
this.details=alarm.getDetails();
this.propagate=alarm.isPropagate();
this.propagateToOwner=alarm.isPropagateToOwner();
@ -119,7 +133,7 @@ public class Alarm extends BaseData<AlarmId> implements HasName, HasTenantId, Ha
@ApiModelProperty(position=1,value="JSON object with the alarm Id. "+
"Specify this field to update the alarm. "+
"Referencing non-existing alarm Id will cause error. "+
"Omit this field to create new alarm.")
"Omit this field to create new alarm.")
@Override
publicAlarmIdgetId(){
returnsuper.getId();
@ -132,4 +146,19 @@ public class Alarm extends BaseData<AlarmId> implements HasName, HasTenantId, Ha
@ApiModelProperty(position=1,value="Propagation flag to specify if alarm should be propagated to parent entities of alarm originator",example="true")
privatebooleanpropagate;
@ApiModelProperty(position=2,value="Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator",example="true")
privatebooleanpropagateToOwner;
@ApiModelProperty(position=3,value="Propagation flag to specify if alarm should be propagated to the tenant entity",example="true")
privatebooleanpropagateToTenant;
@NoXss
@ApiModelProperty(position=4,value="JSON array of relation types that should be used for propagation. "+
"By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. "+
"This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored.")