Verified Commit 92fa6a0c authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: Feat(Audit) - first commit

First audit commit logic as plugin
Showing with 75 additions and 0 deletions
+75 -0
<?php
class Audit implements EndpointInterface
{
private TaskGateway $gateway;
public function __construct (TaskGateway $gateway)
{
$this->gateway = $gateway;
}
/**
* @return array
* Part of the interface of orchestrator plugin to treat GET method
*/
public function processEndPointGet (): array
{
return [];
}
/**
* @param array|null $data
* @return array
*/
public function processEndPointPost (array $data = NULL): array
{
return [];
}
/**
* @param array|NULL $data
* @return array
* @throws Exception
*/
public function processEndPointPatch (array $data = NULL): array
{
return $this->processAuditDeletion($this->gateway->getObjectTypeTask('audit'));
}
/**
* @param array|NULL $data
* @return array
*/
public function processEndPointDelete (array $data = NULL): array
{
return [];
}
/**
* @param array $auditSubTasks
* @return array
* @throws Exception
*/
public function processAuditDeletion (array $auditSubTasks): array
{
$result = [];
// todo - Logic to iterate through audit timestamp and delete passed time.
return $result;
}
/**
* @param string $mainTaskDn
* @return array
*/
public function getAuditMainTask (string $mainTaskDn): array
{
// Retrieve data from the main task
return $this->gateway->getLdapTasks('(objectClass=fdTasksNotifications)', ['attr1',
'attr2', 'attr3'], '', $mainTaskDn);
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment