FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\UI\Api\Controllers\LicenseController Class Reference

Controller for licenses. More...

Inheritance diagram for Fossology\UI\Api\Controllers\LicenseController:
Inheritance graph
Collaboration diagram for Fossology\UI\Api\Controllers\LicenseController:
Collaboration graph

Public Member Functions

 __construct ($container)
 
 getLicense ($request, $response, $args)
 
 getAllLicenses ($request, $response, $args)
 
 createLicense ($request, $response, $args)
 
 updateLicense ($request, $response, $args)
 
 getAllAdminAcknowledgements ($request, $response, $args)
 
 handleAdminLicenseAcknowledgement ($request, $response, $args)
 
 getAllLicenseStandardComments ($request, $response, $args)
 
 handleLicenseStandardComment ($request, $response, $args)
 
 exportAdminLicenseToCSV ($request, $response, $args)
 
 exportAdminLicenseToJSON ($request, $response, $args)
 

Public Attributes

const PAGE_PARAM = "page"
 
const LIMIT_PARAM = "limit"
 
const ACTIVE_PARAM = "active"
 
const LICENSE_FETCH_LIMIT = 100
 

Private Member Functions

 isNewLicense ($shortName, $groupId=0)
 

Private Attributes

 $licenseDao
 
 $adminLicenseAckDao
 
 $licenseStdCommentDao
 

Additional Inherited Members

- Protected Member Functions inherited from Fossology\UI\Api\Controllers\RestController
 getParsedBody (ServerRequestInterface $request)
 Parse request body as JSON and return associative PHP array. More...
 
 throwNotAdminException ()
 
 uploadAccessible ($id)
 
 isItemExists (int $uploadId, int $itemId)
 
- Protected Attributes inherited from Fossology\UI\Api\Controllers\RestController
 $container
 
 $restHelper
 
 $dbHelper
 

Detailed Description

Controller for licenses.

Definition at line 44 of file LicenseController.php.

Constructor & Destructor Documentation

◆ __construct()

Fossology\UI\Api\Controllers\LicenseController::__construct (   $container)
Parameters
ContainerInterface$container

Reimplemented from Fossology\UI\Api\Controllers\RestController.

Definition at line 84 of file LicenseController.php.

Member Function Documentation

◆ createLicense()

Fossology\UI\Api\Controllers\LicenseController::createLicense (   $request,
  $response,
  $args 
)

Create a new license

Parameters
Request$request
ResponseHelper$response
array$args
Returns
ResponseHelper
Exceptions
HttpErrorException

Definition at line 239 of file LicenseController.php.

◆ exportAdminLicenseToCSV()

Fossology\UI\Api\Controllers\LicenseController::exportAdminLicenseToCSV (   $request,
  $response,
  $args 
)

Export licenses to CSV file

Parameters
Request$request
ResponseHelper$response
array$args
Returns
ResponseHelper
Exceptions
HttpErrorException

Definition at line 858 of file LicenseController.php.

◆ exportAdminLicenseToJSON()

Fossology\UI\Api\Controllers\LicenseController::exportAdminLicenseToJSON (   $request,
  $response,
  $args 
)

Export licenses to JSON file

Parameters
Request$request
ResponseHelper$response
array$args
Returns
ResponseHelper
Exceptions
HttpErrorException

Definition at line 895 of file LicenseController.php.

◆ getAllAdminAcknowledgements()

Fossology\UI\Api\Controllers\LicenseController::getAllAdminAcknowledgements (   $request,
  $response,
  $args 
)

Get all admin license acknowledgements

Parameters
Request$request
ResponseHelper$response
array$args
Returns
ResponseHelper
Exceptions
HttpErrorException

Definition at line 480 of file LicenseController.php.

◆ getAllLicenses()

Fossology\UI\Api\Controllers\LicenseController::getAllLicenses (   $request,
  $response,
  $args 
)

Get list of all licenses, paginated upon request params

Parameters
Request$request
ResponseHelper$response
array$args
Returns
ResponseHelper
Exceptions
HttpErrorException

Definition at line 155 of file LicenseController.php.

◆ getAllLicenseStandardComments()

Fossology\UI\Api\Controllers\LicenseController::getAllLicenseStandardComments (   $request,
  $response,
  $args 
)

Get all license standard comments

Parameters
Request$request
ResponseHelper$response
array$args
Returns
ResponseHelper

Definition at line 589 of file LicenseController.php.

◆ getLicense()

Fossology\UI\Api\Controllers\LicenseController::getLicense (   $request,
  $response,
  $args 
)

Get the license information based on the provided parameters

Parameters
Request$request
ResponseHelper$response
array$args
Returns
ResponseHelper
Exceptions
HttpErrorException

Definition at line 101 of file LicenseController.php.

◆ handleAdminLicenseAcknowledgement()

Fossology\UI\Api\Controllers\LicenseController::handleAdminLicenseAcknowledgement (   $request,
  $response,
  $args 
)

Add, Edit & toggle admin license acknowledgement.

Parameters
Request$request
ResponseHelper$response
array$args
Returns
ResponseHelper
Exceptions
HttpErrorException

Definition at line 504 of file LicenseController.php.

◆ handleLicenseStandardComment()

Fossology\UI\Api\Controllers\LicenseController::handleLicenseStandardComment (   $request,
  $response,
  $args 
)

Add, Edit & toggle license standard comment.

Parameters
Request$request
ResponseHelper$response
array$args
Returns
ResponseHelper
Exceptions
HttpErrorException

Definition at line 610 of file LicenseController.php.

◆ isNewLicense()

Fossology\UI\Api\Controllers\LicenseController::isNewLicense (   $shortName,
  $groupId = 0 
)
private

Check if the given shortname already exists in DB.

Parameters
string$shortNameShortname to check
integer$groupIdGroup ID if candidate license

Definition at line 361 of file LicenseController.php.

◆ updateLicense()

Fossology\UI\Api\Controllers\LicenseController::updateLicense (   $request,
  $response,
  $args 
)

Update a license

Parameters
Request$request
ResponseHelper$response
array$args
Returns
ResponseHelper
Exceptions
HttpErrorException

Definition at line 300 of file LicenseController.php.

Member Data Documentation

◆ $adminLicenseAckDao

LicenseAcknowledgementDao Fossology\UI\Api\Controllers\LicenseController::$adminLicenseAckDao
private

LicenseAcknowledgementDao object

Definition at line 72 of file LicenseController.php.

◆ $licenseDao

LicenseDao Fossology\UI\Api\Controllers\LicenseController::$licenseDao
private

License Dao object

Definition at line 66 of file LicenseController.php.

◆ $licenseStdCommentDao

LicenseStdCommentDao Fossology\UI\Api\Controllers\LicenseController::$licenseStdCommentDao
private

License Dao object

Definition at line 78 of file LicenseController.php.

◆ ACTIVE_PARAM

const Fossology\UI\Api\Controllers\LicenseController::ACTIVE_PARAM = "active"

Get header parameter name for active licenses

Definition at line 57 of file LicenseController.php.

◆ LICENSE_FETCH_LIMIT

const Fossology\UI\Api\Controllers\LicenseController::LICENSE_FETCH_LIMIT = 100

Limit of licenses in get query

Definition at line 61 of file LicenseController.php.

◆ LIMIT_PARAM

const Fossology\UI\Api\Controllers\LicenseController::LIMIT_PARAM = "limit"

Get header parameter name for limiting listing

Definition at line 53 of file LicenseController.php.

◆ PAGE_PARAM

const Fossology\UI\Api\Controllers\LicenseController::PAGE_PARAM = "page"

Get header parameter name for page listing

Definition at line 49 of file LicenseController.php.


The documentation for this class was generated from the following file: