refactor: improvemets
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -720,34 +720,21 @@ class PersonalService implements ServiceBaseInterface, ServiceCollectionMutableI
|
||||
|
||||
// Node operations
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function nodeList(string|int|null $location = null, bool $recursive = false, ?IFilter $filter = null, ?ISort $sort = null, ?IRange $range = null): array {
|
||||
// null location is root
|
||||
if ($location === null) {
|
||||
$location = self::ROOT_ID;
|
||||
public function nodeList(string|int|null $collection = null, bool $recursive = false, ?IFilter $filter = null, ?ISort $sort = null, ?IRange $range = null, ?array $properties = null): array {
|
||||
if ($collection === null) {
|
||||
$collection = self::ROOT_ID;
|
||||
}
|
||||
return $this->metaStore->nodeList($this->serviceTenantId, $this->serviceUserId, $location, $recursive, $filter, $sort, $range);
|
||||
return $this->metaStore->nodeList($this->serviceTenantId, $this->serviceUserId, $collection, $recursive, $filter, $sort, $range, $properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function nodeListFilter(): IFilter {
|
||||
return new Filter($this->serviceAbilities[self::CAPABILITY_COLLECTION_LIST_FILTER] ?? []);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function nodeListSort(): ISort {
|
||||
return new Sort($this->serviceAbilities[self::CAPABILITY_COLLECTION_LIST_SORT] ?? []);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function nodeListRange(RangeType $type): IRange {
|
||||
if ($type !== RangeType::TALLY) {
|
||||
throw new InvalidParameterException("Invalid: Node range of type '{$type->value}' is not supported");
|
||||
@@ -755,11 +742,8 @@ class PersonalService implements ServiceBaseInterface, ServiceCollectionMutableI
|
||||
return new RangeTally();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function nodeDelta(string|int|null $location, string $signature, bool $recursive = false, string $detail = 'ids'): array {
|
||||
return $this->metaStore->nodeDelta($this->serviceTenantId, $this->serviceUserId, $location, $signature, $recursive, $detail);
|
||||
public function nodeDelta(string|int|null $collection, string $signature, string $detail = 'ids'): Delta {
|
||||
return new Delta();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user