Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all class docblocks #156

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lib/Service/BroadcastService.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
use OCA\OpenCatalogi\Service\ObjectService;

/**
* Service class for handling directory-related operations
* Service for broadcasting this OpenCatalogi directory to other instances.
*
* Provides functionality to notify external instances about this directory
* through HTTP POST requests, either to a specific URL or to all known directories.
*/
class BroadcastService
{
Expand Down Expand Up @@ -73,10 +76,10 @@ public function broadcast(?string $url = null): void {
'directory' => $directoryUrl
]
]);

// Log successful broadcast
\OC::$server->getLogger()->info('Successfully broadcasted to ' . $hook);

} catch (\Exception $e) {
// Throw a warning since broadcasting failure shouldn't break the application flow
// but we still want to notify about the issue
Expand Down
6 changes: 5 additions & 1 deletion lib/Service/DirectoryService.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
use Symfony\Component\Uid\Uuid;

/**
* Service class for handling directory-related operations
* Service for managing and synchronizing directories and listings.
*
* This service facilitates operations related to directories, catalogs, and listings.
* It supports synchronization with external directories, validation and updates
* of listings, and integration with publication types.
*/
class DirectoryService
{
Expand Down
6 changes: 5 additions & 1 deletion lib/Service/DownloadService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
use Exception;

/**
* Service class for handling download-related operations
* Service for managing download-related operations.
*
* Provides functionality to create and manage publication files and archives, including
* generating PDFs and ZIP files containing metadata and attachments, and storing files
* in NextCloud.
*/
class DownloadService
{
Expand Down
7 changes: 5 additions & 2 deletions lib/Service/ElasticSearchClientAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
use Elastic\Elasticsearch\Client;

/**
* Adapter class for Elasticsearch client operations
* Adapter for Elasticsearch client operations.
*
* Provides a wrapper around the Elasticsearch client to facilitate search, indexing,
* retrieval, updating, and deletion of documents.
*/
class ElasticSearchClientAdapter
{
Expand Down Expand Up @@ -83,4 +86,4 @@ public function delete(array $params)
// Delete the document and return the response
return $this->client->delete($params);
}
}
}
7 changes: 7 additions & 0 deletions lib/Service/ElasticSearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
use Elastic\Elasticsearch\ClientBuilder;
use Symfony\Component\Uid\Uuid;

/**
* Service for managing interactions with Elasticsearch.
*
* Provides functionality for indexing, updating, deleting, and searching objects in Elasticsearch,
* as well as processing and formatting query results and aggregations.
*/

class ElasticSearchService
{

Expand Down
6 changes: 5 additions & 1 deletion lib/Service/FileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@
use ZipArchive;

/**
* Service class for handling file operations in OpenCatalogi
* Service for handling file operations in OpenCatalogi.
*
* Provides functionalities for managing files and folders in NextCloud, creating and managing
* share links, handling uploaded files, generating PDF and ZIP files, and managing temporary files.
*/

class FileService
{
/**
Expand Down
6 changes: 5 additions & 1 deletion lib/Service/ObjectService.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@
use OCA\OpenCatalogi\Db\ThemeMapper;

/**
* Service class for handling object-related operations
* Service for handling object-related operations.
*
* Provides functionality for retrieving, saving, updating, and deleting objects,
* as well as extending entities with related data and managing object mappings.
*/

class ObjectService
{
/** @var string $appName The name of the app */
Expand Down
19 changes: 11 additions & 8 deletions lib/Service/SearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
use Symfony\Component\Uid\Uuid;

/**
* Class SearchService
*
* This service handles search operations and related functionalities.
* Service for managing search operations and related functionalities.
*
* Provides methods for performing search queries, merging search results and aggregations,
* and creating database-specific filters and sort parameters. Handles both local and
* distributed search queries across multiple directories.
*/

class SearchService
{
/** @var Client */
Expand All @@ -25,7 +28,7 @@ class SearchService

/**
* SearchService constructor.
*
*
* @param ElasticSearchService $elasticService
* @param DirectoryService $directoryService
* @param IURLGenerator $urlGenerator
Expand All @@ -40,7 +43,7 @@ public function __construct(

/**
* Merge facets from existing and new aggregations.
*
*
* @param array $existingAggregation
* @param array $newAggregation
* @return array Merged facets
Expand Down Expand Up @@ -75,7 +78,7 @@ public function mergeFacets(array $existingAggregation, array $newAggregation):

/**
* Merge existing and new aggregations.
*
*
* @param array|null $existingAggregations
* @param array|null $newAggregations
* @return array Merged aggregations
Expand All @@ -98,7 +101,7 @@ private function mergeAggregations(?array $existingAggregations, ?array $newAggr

/**
* Comparison function for sorting result arrays.
*
*
* @param array $a
* @param array $b
* @return int
Expand All @@ -110,7 +113,7 @@ public function sortResultArray(array $a, array $b): int

/**
* Perform a search operation.
*
*
* @param array $parameters Search parameters
* @param array $elasticConfig Elasticsearch configuration
* @param array $dbConfig Database configuration
Expand Down
7 changes: 5 additions & 2 deletions lib/Service/ValidationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
use Symfony\Component\Uid\Uuid;

/**
* Class ValidationService
* Service for validating catalogs and publications.
*
* This service handles validation of catalogs and publications.
* Provides methods to validate publications against the schema defined in their associated
* publication types, ensuring data consistency and integrity. Handles default values and
* reports validation errors.
*/

class ValidationService
{

Expand Down