Nextcloud Circles API

SyncService
in package
Uses TStringTools, TNCLogger

Class SyncService

Table of Contents

SYNC_ALL  = 63
SYNC_APPS  = 1
SYNC_CONTACTS  = 32
SYNC_GLOBALSCALE  = 8
SYNC_GROUPS  = 4
SYNC_REMOTES  = 16
SYNC_USERS  = 2
$ALERT  : mixed
$CRITICAL  : mixed
$DEBUG  : mixed
$EMERGENCY  : mixed
$ERROR  : mixed
$INFO  : mixed
$NOTICE  : mixed
$WARNING  : mixed
$circleRequest  : CircleRequest
$circleService  : CircleService
$configService  : ConfigService
$federatedEventService  : federatedEventService
$federatedUserService  : FederatedUserService
$groupManager  : IGroupManager
$memberRequest  : MemberRequest
$membershipService  : MembershipService
$outputService  : OutputService
$userManager  : IUserManager
__construct()  : mixed
SyncService constructor.
alert()  : void
debug()  : void
e()  : void
emergency()  : void
exception()  : void
generateRandomSentence()  : string
generateRandomWord()  : string
getDateDiff()  : string
groupDeleted()  : void
groupMemberAdded()  : void
groupMemberRemoved()  : void
humanReadable()  : string
log()  : void
logger()  : LoggerInterface
notice()  : void
sync()  : void
syncApps()  : void
syncContacts()  : void
syncGlobalScale()  : void
syncNextcloudGroup()  : Circle
syncNextcloudGroups()  : void
syncNextcloudUser()  : FederatedUser
syncNextcloudUsers()  : void
syncRemote()  : void
syncRemoteCircle()  : void
t()  : void
throwable()  : void
userDeleted()  : void
warning()  : void
commonPart()  : string
cut()  : string
feedStringWithParams()  : string
isUuid()  : bool
token()  : string
uuid()  : string
Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80
generateGroupMember()  : Member
shouldSync()  : bool

Constants

Properties

$EMERGENCY

public static mixed $EMERGENCY = 4

$federatedEventService

private federatedEventService $federatedEventService

Methods

__construct()

SyncService constructor.

public __construct(IUserManager $userManager, IGroupManager $groupManager, CircleRequest $circleRequest, MemberRequest $memberRequest, FederatedUserService $federatedUserService, federatedEventService $federatedEventService, CircleService $circleService, MembershipService $membershipService, OutputService $outputService, ConfigService $configService) : mixed
Parameters
$userManager : IUserManager
$groupManager : IGroupManager
$circleRequest : CircleRequest
$memberRequest : MemberRequest
$federatedUserService : FederatedUserService
$federatedEventService : federatedEventService
$circleService : CircleService
$membershipService : MembershipService
$outputService : OutputService
$configService : ConfigService
Return values
mixed —

alert()

public alert(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$message : string
$trace : bool = false
$serializable : array<string|int, mixed> = []
Return values
void —

debug()

public debug(string $message[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$message : string
$serializable : array<string|int, mixed> = []
Return values
void —

e()

public e(Exception $e[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$e : Exception
$serializable : array<string|int, mixed> = []
Return values
void —

emergency()

public emergency(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$message : string
$trace : bool = false
$serializable : array<string|int, mixed> = []
Return values
void —

exception()

public exception(Exception $e[, int|array<string|int, mixed> $level = 3 ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$e : Exception
$level : int|array<string|int, mixed> = 3
$serializable : array<string|int, mixed> = []
Return values
void —

generateRandomSentence()

public generateRandomSentence([int $words = 5 ]) : string
Parameters
$words : int = 5
Return values
string —

generateRandomWord()

public generateRandomWord([int $length = 8 ]) : string
Parameters
$length : int = 8
Return values
string —

getDateDiff()

public getDateDiff(int $first, int $second[, bool $short = false ][, array<string|int, mixed> $words = [] ]) : string
Parameters
$first : int
$second : int
$short : bool = false
$words : array<string|int, mixed> = []
Tags
throws
Exception
Return values
string —

groupMemberAdded()

public groupMemberAdded(string $groupId, string $userId) : void
Parameters
$groupId : string
$userId : string
Tags
throws
ContactAddressBookNotFoundException
throws
ContactFormatException
throws
ContactNotFoundException
throws
FederatedEventException
throws
FederatedItemException
throws
FederatedUserException
throws
FederatedUserNotFoundException
throws
GroupNotFoundException
throws
InitiatorNotConfirmedException
throws
InvalidIdException
throws
OwnerNotFoundException
throws
RemoteInstanceException
throws
RemoteNotFoundException
throws
RemoteResourceNotFoundException
throws
RequestBuilderException
throws
SingleCircleNotFoundException
throws
UnknownRemoteException
Return values
void —

groupMemberRemoved()

public groupMemberRemoved(string $groupId, string $userId) : void
Parameters
$groupId : string
$userId : string
Tags
throws
FederatedEventException
throws
FederatedItemException
throws
FederatedUserException
throws
FederatedUserNotFoundException
throws
GroupNotFoundException
throws
InitiatorNotConfirmedException
throws
InvalidIdException
throws
OwnerNotFoundException
throws
RemoteInstanceException
throws
RemoteNotFoundException
throws
RemoteResourceNotFoundException
throws
RequestBuilderException
throws
SingleCircleNotFoundException
throws
UnknownRemoteException
Return values
void —

humanReadable()

public humanReadable(int $bytes) : string
Parameters
$bytes : int
Return values
string —

log()

public log(int $level, string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$level : int
$message : string
$trace : bool = false
$serializable : array<string|int, mixed> = []
Return values
void —

logger()

public logger() : LoggerInterface
Return values
LoggerInterface —

notice()

public notice(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$message : string
$trace : bool = false
$serializable : array<string|int, mixed> = []
Return values
void —

sync()

public sync([int $sync = self::SYNC_ALL ]) : void
Parameters
$sync : int = self::SYNC_ALL
Return values
void —

syncApps()

public syncApps() : void
Return values
void —

syncContacts()

public syncContacts() : void
Return values
void —

syncGlobalScale()

public syncGlobalScale() : void
Return values
void —

syncNextcloudGroup()

public syncNextcloudGroup(string $groupId) : Circle
Parameters
$groupId : string
Tags
throws
FederatedUserException
throws
FederatedUserNotFoundException
throws
GroupNotFoundException
throws
InvalidIdException
throws
SingleCircleNotFoundException
throws
FederatedEventException
throws
FederatedItemException
throws
InitiatorNotConfirmedException
throws
OwnerNotFoundException
throws
RemoteInstanceException
throws
RemoteNotFoundException
throws
RemoteResourceNotFoundException
throws
UnknownRemoteException
throws
RequestBuilderException
Return values
Circle —

syncNextcloudGroups()

public syncNextcloudGroups() : void
Return values
void —

syncNextcloudUsers()

public syncNextcloudUsers() : void
Return values
void —

syncRemote()

public syncRemote() : void
Return values
void —

syncRemoteCircle()

public syncRemoteCircle(string $circleId) : void
Parameters
$circleId : string
Return values
void —

t()

public t(Throwable $t[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$t : Throwable
$serializable : array<string|int, mixed> = []
Return values
void —

throwable()

public throwable(Throwable $t[, int $level = 3 ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$t : Throwable
$level : int = 3
$serializable : array<string|int, mixed> = []
Return values
void —

warning()

public warning(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$message : string
$trace : bool = false
$serializable : array<string|int, mixed> = []
Return values
void —

commonPart()

protected commonPart(string $str1, string $str2[, bool $cs = true ]) : string
Parameters
$str1 : string
$str2 : string
$cs : bool = true

case sensitive ?

Return values
string —

cut()

protected cut(string $line, int $length) : string
Parameters
$line : string
$length : int
Return values
string —

feedStringWithParams()

protected feedStringWithParams(string $line, array<string|int, mixed> $params) : string
Parameters
$line : string
$params : array<string|int, mixed>
Return values
string —

isUuid()

protected isUuid(string $uuid) : bool
Parameters
$uuid : string
Return values
bool —

token()

protected token([int $length = 15 ]) : string
Parameters
$length : int = 15
Return values
string —

uuid()

Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80

protected uuid(int $length) : string
Parameters
$length : int
Return values
string —

shouldSync()

private shouldSync(int $item, int $all) : bool
Parameters
$item : int
$all : int
Return values
bool —

Search results