Skip to content

Commit

Permalink
Create incident-response-plan.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jul 22, 2024
1 parent c314cca commit 833d5cc
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions core/incident-response/incident-response-plan.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// incident-response-plan.js
import { IncidentResponsePlan } from 'incident-response-plan-sdk';
import { IncidentResponseStrategy } from 'incident-response-strategy-sdk';

class IncidentResponsePlan {
constructor() {
this.incidentResponsePlan = new IncidentResponsePlan();
this.incidentResponseStrategy = new IncidentResponseStrategy();
}

createIncidentResponsePlan(incident) {
// Create an incident response plan for a specific incident
return this.incidentResponsePlan.createPlan(incident);
}

executeIncidentResponsePlan(planId) {
// Execute an incident response plan
const plan = this.incidentResponsePlan.getPlan(planId);
return this.incidentResponseStrategy.executePlan(plan);
}

updateIncidentResponsePlan(planId, updates) {
// Update an incident response plan
const plan = this.incidentResponsePlan.getPlan(planId);
return this.incidentResponsePlan.updatePlan(plan, updates);
}
}

export default IncidentResponsePlan;

0 comments on commit 833d5cc

Please sign in to comment.