Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
feat: VOL-4635 remove docman support (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilindsay authored Jun 18, 2024
1 parent 5f941af commit 952360c
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 1,064 deletions.
4 changes: 0 additions & 4 deletions config/autoload/config.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@
// Document service
'document_share' => [
'client' => [
// Document service URI *Environment specific*
'baseuri' => "%olcs_docman%",
// Document service user ID *Environment specific*
'uuid' => 'uD12345',
// Document service workspace "olcs"
'workspace' => 'olcs',
'webdav_baseuri' => '%olcs_webdav%',
Expand Down
1 change: 0 additions & 1 deletion config/autoload/local.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ return [
],
'document_share' => [
'client' => [
'baseuri' => "http://docman.qa.olcs.dev-dvsacloud.uk:8080/hfs/",
'webdav_baseuri' => 'http://webdav.qa.olcs.dev-dvsacloud.uk:8080/documents/',
'password' => ''
],
Expand Down
15 changes: 0 additions & 15 deletions module/Api/src/Domain/Command/MyAccount/UpdateMyAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,6 @@ final class UpdateMyAccount extends AbstractCommand
*/
protected $contactDetails;

/**
* @Transfer\Filter("Laminas\Filter\StringTrim")
* @Transfer\Validator("Laminas\Validator\InArray", options={"haystack": {"windows_7", "windows_10"}})
* @Transfer\Optional
*/
protected $osType = null;

/**
* @return mixed
*/
public function getOsType()
{
return $this->osType;
}

/**
* @return int
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ final class CreateDocumentSpecific extends AbstractCommandHandler implements Aut
use CacheAwareTrait;
use AuthAwareTrait;

public const DEFAULT_OS = 'windows_7';

/**
* @var string
*/
Expand Down Expand Up @@ -119,10 +117,6 @@ private function setDocumentDetails(Document $document, Cmd $command)
if ($command->getMetadata() !== null) {
$document->setMetadata($command->getMetadata());
}

$osType = $this->getCurrentUser()->getOsType() ??
$this->getRepo()->getRefdataReference(static::DEFAULT_OS);
$document->setOsType($osType);
}

/**
Expand Down
6 changes: 0 additions & 6 deletions module/Api/src/Domain/QueryHandler/Document/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@
use Dvsa\Olcs\Api\Domain\Exception\NotFoundException;
use Dvsa\Olcs\Transfer\Query\QueryInterface;
use Laminas\Http\Response;
use Laminas\ServiceManager\ServiceLocatorInterface;

/**
* Download
*
* @author Rob Caiger <rob@clocal.co.uk>
*/
class Download extends AbstractDownload
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ final class PendingList extends AbstractQueryHandler

public function handleQuery(QueryInterface $query)
{
$userOsType = $this->getCurrentUser()->getOsType();
/**
* @var PublicationRepo $repo
*/
Expand All @@ -34,7 +33,6 @@ public function handleQuery(QueryInterface $query)
'document'
]
),
'userOsType' => $userOsType,
'count' => $result['count']
];
}
Expand Down
4 changes: 0 additions & 4 deletions module/Api/src/Domain/Repository/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@ public function populateRefDataReference(array $data)
);
}

if (isset($data['osType'])) {
$data['osType'] = $this->getRefdataReference($data['osType']);
}

return $data;
}

Expand Down
35 changes: 0 additions & 35 deletions module/Api/src/Entity/Doc/AbstractDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
* @ORM\Index(name="ix_document_last_modified_by", columns={"last_modified_by"}),
* @ORM\Index(name="ix_document_licence_id", columns={"licence_id"}),
* @ORM\Index(name="ix_document_operating_centre_id", columns={"operating_centre_id"}),
* @ORM\Index(name="ix_document_os_type", columns={"os_type"}),
* @ORM\Index(name="ix_document_statement_id", columns={"statement_id"}),
* @ORM\Index(name="ix_document_sub_category_id", columns={"sub_category_id"}),
* @ORM\Index(name="ix_document_submission_id", columns={"submission_id"}),
Expand Down Expand Up @@ -330,16 +329,6 @@ abstract class AbstractDocument implements BundleSerializableInterface, JsonSeri
*/
protected $operatingCentre;

/**
* Os type
*
* @var \Dvsa\Olcs\Api\Entity\System\RefData
*
* @ORM\ManyToOne(targetEntity="Dvsa\Olcs\Api\Entity\System\RefData", fetch="LAZY")
* @ORM\JoinColumn(name="os_type", referencedColumnName="id", nullable=true)
*/
protected $osType;

/**
* Size
*
Expand Down Expand Up @@ -1108,30 +1097,6 @@ public function getOperatingCentre()
return $this->operatingCentre;
}

/**
* Set the os type
*
* @param \Dvsa\Olcs\Api\Entity\System\RefData $osType entity being set as the value
*
* @return Document
*/
public function setOsType($osType)
{
$this->osType = $osType;

return $this;
}

/**
* Get the os type
*
* @return \Dvsa\Olcs\Api\Entity\System\RefData
*/
public function getOsType()
{
return $this->osType;
}

/**
* Set the size
*
Expand Down
4 changes: 0 additions & 4 deletions module/Api/src/Entity/System/RefData.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ class RefData extends AbstractRefData
public const INTER_JOURNEY_60_90 = 'inter_journey_60_90';
public const INTER_JOURNEY_MORE_90 = 'inter_journey_more_90';

// user operating system
public const USER_OS_TYPE_WINDOWS_7 = 'windows_7';
public const USER_OS_TYPE_WINDOWS_10 = 'windows_10';

// journey
public const JOURNEY_SINGLE = 'journey_single';
public const JOURNEY_MULTIPLE = 'journey_multiple';
Expand Down
35 changes: 0 additions & 35 deletions module/Api/src/Entity/User/AbstractUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
* @ORM\Index(name="ix_user_created_by", columns={"created_by"}),
* @ORM\Index(name="ix_user_last_modified_by", columns={"last_modified_by"}),
* @ORM\Index(name="ix_user_local_authority_id", columns={"local_authority_id"}),
* @ORM\Index(name="ix_user_os_type", columns={"os_type"}),
* @ORM\Index(name="ix_user_partner_contact_details_id",
* columns={"partner_contact_details_id"}),
* @ORM\Index(name="ix_user_team_id", columns={"team_id"}),
Expand Down Expand Up @@ -147,16 +146,6 @@ abstract class AbstractUser implements BundleSerializableInterface, JsonSerializ
*/
protected $loginId;

/**
* Os type
*
* @var \Dvsa\Olcs\Api\Entity\System\RefData
*
* @ORM\ManyToOne(targetEntity="Dvsa\Olcs\Api\Entity\System\RefData", fetch="LAZY")
* @ORM\JoinColumn(name="os_type", referencedColumnName="id", nullable=true)
*/
protected $osType;

/**
* Partner contact details
*
Expand Down Expand Up @@ -520,30 +509,6 @@ public function getLoginId()
return $this->loginId;
}

/**
* Set the os type
*
* @param \Dvsa\Olcs\Api\Entity\System\RefData $osType entity being set as the value
*
* @return User
*/
public function setOsType($osType)
{
$this->osType = $osType;

return $this;
}

/**
* Get the os type
*
* @return \Dvsa\Olcs\Api\Entity\System\RefData
*/
public function getOsType()
{
return $this->osType;
}

/**
* Set the partner contact details
*
Expand Down
9 changes: 0 additions & 9 deletions module/Api/src/Entity/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ class User extends AbstractUser implements OrganisationProviderInterface
public const ERROR_ADMIN_USER_ALREADY_EXISTS = 'err_admin_user_already_exists';
public const ERR_ANON_USERNAME = 'ERR_ANON_USERNAME';

// user operating system
public const USER_OS_TYPE_WINDOWS_7 = 'windows_7';
public const USER_OS_TYPE_WINDOWS_10 = 'windows_10';
public const USER_OS_TYPE_NORTHERN_I = 'northern_i';

public const ANON_USERNAME = 'anon';

/**
Expand Down Expand Up @@ -336,10 +331,6 @@ private function updateInternal(array $data)
$this->team = $data['team'];
}

if (isset($data['osType'])) {
$this->osType = $data['osType'];
}

return $this;
}

Expand Down
1 change: 0 additions & 1 deletion module/DocumentShare/config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
'document_share' => [
'http' => [],
'client' => [
'baseuri' => '',
'workspace' => '',
'username' => '',
'password' => '',
Expand Down
Loading

0 comments on commit 952360c

Please sign in to comment.