Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

ReadPermissionsSubscriptionUtil Class Reference

Static Public Member Functions

static buildTables ()
static recreateTable ($modelSubscriptionTableName)
static getSubscriptionTableName ($modelClassName)
static updateAllReadSubscriptionTables (MessageLogger $messageLogger)
static updateReadSubscriptionTableByModelClassNameAndUser ($modelClassName, User $user, $updateStartTimestamp, $onlyOwnedModels=false, MessageLogger $messageLogger)
static getAddedOrDeletedModelsFromReadSubscriptionTable ($serviceName, $modelClassName, $lastUpdateTimestamp, $type, $user, $checkIfModelCreationApiSyncUtilIsNull=true)
static getAddedModelNamesAndIdsFromReadSubscriptionTable ($serviceName, $modelClassName, $lastUpdateTimestamp, $user)
static getReadSubscriptionUpdateDetails ()
static setReadSubscriptionUpdateDetails ($readSubscriptionUpdateDetails)
static getLastReadPermissionUpdateTimestamp ()
static setTimeReadPermissionUpdateTimestamp ($lastReadPermissionUpdateTimestamp)
static setReadPermissionUpdateStatus ($status)
static getReadPermissionUpdateStatus ()
static isReadPermissionSubscriptionUpdateCompleted ()

Data Fields

const TYPE_ADD = 1
const TYPE_DELETE = 2
const STATUS_STARTED = 1
const STATUS_COMPLETED = 2

Static Protected Member Functions

static getReadSubscriptionTableSchemaByName ($tableName)
static getModelTableName ($modelClassName)

Detailed Description

Definition at line 37 of file ReadPermissionsSubscriptionUtil.php.


Member Function Documentation

static buildTables (  )  [static]

Rebuild read permission subscription table

Definition at line 48 of file ReadPermissionsSubscriptionUtil.php.

static recreateTable ( modelSubscriptionTableName  )  [static]

Public for testing only. Need to manually create test model tables that would not be picked up normally.

Parameters:
$modelSubscriptionTableName 

Definition at line 63 of file ReadPermissionsSubscriptionUtil.php.

static updateAllReadSubscriptionTables ( MessageLogger messageLogger  )  [static]

Update read subscription table for all users and models

Parameters:
MessageLogger $messageLogger
Returns:
bool

Definition at line 136 of file ReadPermissionsSubscriptionUtil.php.

static updateReadSubscriptionTableByModelClassNameAndUser ( modelClassName,
User user,
updateStartTimestamp,
onlyOwnedModels = false,
MessageLogger messageLogger 
) [static]

Update models in read subscription table based on modelId and userId(userId is used implicitly in getSubsetIds)

Parameters:
string $modelClassName
User $user
bool $onlyOwnedModels
int $updateStartTimestamp
MessageLogger $messageLogger

Definition at line 188 of file ReadPermissionsSubscriptionUtil.php.

static getAddedOrDeletedModelsFromReadSubscriptionTable ( serviceName,
modelClassName,
lastUpdateTimestamp,
type,
user,
checkIfModelCreationApiSyncUtilIsNull = true 
) [static]

Get all added or deleted models from read permission subscription table

Parameters:
$serviceName 
$modelClassName 
$lastUpdateTimestamp 
$type 
$user 
$checkIfModelCreationApiSyncUtilIsNull 
Returns:
array

Definition at line 283 of file ReadPermissionsSubscriptionUtil.php.

static getAddedModelNamesAndIdsFromReadSubscriptionTable ( serviceName,
modelClassName,
lastUpdateTimestamp,
user 
) [static]

Get all added model names and ids from read permission subscription table

Parameters:
$serviceName 
$modelClassName 
$lastUpdateTimestamp 
$user 
Returns:
array

Definition at line 334 of file ReadPermissionsSubscriptionUtil.php.

static getReadSubscriptionUpdateDetails (  )  [static]

Get details about read subscription update details from configuration(global metadata)

Returns:
array

Definition at line 370 of file ReadPermissionsSubscriptionUtil.php.

static setReadSubscriptionUpdateDetails ( readSubscriptionUpdateDetails  )  [static]

Set read subscription update details from configuration(global metadata)

Parameters:
array $readSubscriptionUpdateDetails

Definition at line 381 of file ReadPermissionsSubscriptionUtil.php.

static getLastReadPermissionUpdateTimestamp (  )  [static]

Get last read permission update timestamp in read subscription update details(stored in configuration)

Returns:
int

Definition at line 391 of file ReadPermissionsSubscriptionUtil.php.

static setTimeReadPermissionUpdateTimestamp ( lastReadPermissionUpdateTimestamp  )  [static]

Set last read permission update timestamp in read subscription update details(stored in configuration)

Parameters:
int $lastReadPermissionUpdateTimestamp

Definition at line 408 of file ReadPermissionsSubscriptionUtil.php.

static setReadPermissionUpdateStatus ( status  )  [static]

Set status of ReadPermissionSubscription update(stored in configuration)

Parameters:
int $status

Definition at line 419 of file ReadPermissionsSubscriptionUtil.php.

static getReadPermissionUpdateStatus (  )  [static]

Get status of ReadPermissionSubscription update(stored in configuration)

Returns:
int

Definition at line 430 of file ReadPermissionsSubscriptionUtil.php.

static isReadPermissionSubscriptionUpdateCompleted (  )  [static]

Check if ReadPermissionSubscription

Returns:
bool

Definition at line 447 of file ReadPermissionsSubscriptionUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Tue Jan 22 07:10:27 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8