Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
TRIM_Common Class Reference

Static Public Member Functions

static constructTrimRequest ()
 
static constructRecordSearchClauseGroupedXml ($search_clause=Array(), $classifications)
 
static constructRecordSearch ($search_clauses=Array(), $record_search_options)
 
static constructShortcutRecordUri ($uri)
 
static constructShortcutRecordUris ($uris)
 
static constructDownload ($download_limit='4194304')
 
static constructUpload ($base64PayLoad)
 
static constructFetch ($record_properties=Array(), $search_limit)
 
static constructCreate ($container, $title, $author, $security_level, $additional_fields)
 
static getURIFromRecordNumber ($connection, $record_number)
 
static getURIsFromClassification ($connection, $classification)
 
static getRecordTypeNamesFromUris ($connection, $uris)
 
static getAllRecordTypes ($connection)
 
static constructRecordContainerAltClause ($container_uri)
 
static getDocumentListUnderContainer ($container_uri)
 
static getRecordSearchTypes ()
 
static getRecordBehaviours ()
 
static getRecordStringSearchClauseType ()
 
static getRecordDateRangeSearchClauseType ()
 
static getRecordProperties ()
 
static getRecordSortProperties ()
 
static getSecurityLevel ()
 
static getDefaultRecordSearchOptions ()
 
static getPackagedFiles ($object_list, $hash_key, &$final_file_path)
 
static executeRequest ($connection, $operations=Array(), $display_type='Fetch', $search_clause_xml= '', $hash_key='', &$final_file_path='')
 
static executeGetAssigneeRequest ($connection, $assignee_name)
 
static executeCreateRequest ($connection, $username, $new_record_info)
 
static SwapElement ($xml, $ele_1, $ele_2)
 
static test_trim_connection ($connection)
 
static getRecordPropertiesFromUri ($connection, $uri, $record_properties)
 

Detailed Description

+-----------------------------------------------------------------—+ | This MySource Matrix CMS file is Copyright (c) Squiz Pty Ltd | | ACN 084 670 600 | +-----------------------------------------------------------------—+ | IMPORTANT: Your use of this Software is subject to the terms of | | the Licence provided in the file licence.txt. If you cannot find | | this file please contact Squiz (www.squiz.com.au) so we may provide| | you a copy. | +-----------------------------------------------------------------—+

Id:
trim_common.inc,v 1.21 2012/08/30 00:59:28 ewang Exp

Definition at line 31 of file trim_common.inc.

Member Function Documentation

static constructCreate (   $container,
  $title,
  $author,
  $security_level,
  $additional_fields 
)
static

This function is used to create new TRIM record

Returns
array public

Definition at line 300 of file trim_common.inc.

static constructDownload (   $download_limit = '4194304')
static

construct an array to represent the Download object in the WSDL

Parameters
string$trans_limitThe maximum transfer limit in bytes
Returns
void public

Definition at line 224 of file trim_common.inc.

static constructFetch (   $record_properties = Array(),
  $search_limit 
)
static

construct an array to represent the Upload object in the WSDL

Parameters
string$record_propertiesThe base64 encoded content of the file.
Returns
void public

Definition at line 271 of file trim_common.inc.

static constructRecordContainerAltClause (   $container_uri)
static

This function return

Parameters
int$container_uriThe URI of the container
Returns
array public

Definition at line 513 of file trim_common.inc.

static constructRecordSearch (   $search_clauses = Array(),
  $record_search_options 
)
static

construct an array represent the RecordSearch object in the WSDL.

Parameters
string$keywordthe search term to be searched for
string$fieldthe field to be search in
array$filetypesfile types
int$limitlimit to how many record returned
Returns
array public

Definition at line 141 of file trim_common.inc.

static constructRecordSearchClauseGroupedXml (   $search_clause = Array(),
  $classifications 
)
static

Construct an xml string representing a serial of logic grouped RecordStringSearchClause

Parameters
array$search_clauseThe search clauses which will be converted to xml
array$classificationsThe classifications uris. Search will be restricted to those uris.
Returns
string public

Definition at line 63 of file trim_common.inc.

static constructShortcutRecordUri (   $uri)
static

construct an array to represent the ShortcutRecordUri object in the WSDL

Parameters
int$uriThe Unique Resource Identifier of each record
Returns
array public

Definition at line 181 of file trim_common.inc.

static constructShortcutRecordUris (   $uris)
static

construct an array to represent the ShortcutRecordUris object in the WSDL

Parameters
array$urisThe array containing Unique Resource Identifier of each record
Returns
array public

Definition at line 203 of file trim_common.inc.

static constructTrimRequest ( )
static

Construct an array represent the TRIMRequest object being sent

Returns
unknown public

Definition at line 40 of file trim_common.inc.

static constructUpload (   $base64PayLoad)
static

construct an array to represent the Upload object in the WSDL

Parameters
string$base64PayLoadThe base64 encoded content of the file.
Returns
void public

Definition at line 249 of file trim_common.inc.

static executeCreateRequest (   $connection,
  $username,
  $new_record_info 
)
static

This function create a record in TRIM.

Parameters
string$usernameThe username of the user who is creating the TRIM document
array&$linkinformation used to create the initial link
Array (
       'record_title'       => [The title of the new record]
       'record_type'    => [some kind of record type (document)],
       'parent_container'   => [15331],
         'securiry_level'   => [The security level of the new document],
       )
Returns
void public

Definition at line 1074 of file trim_common.inc.

static executeGetAssigneeRequest (   $connection,
  $assignee_name 
)
static

This function find the Location URI of the a particular user based on username in TRIM.

Parameters
string$assignee_nameThe name of the current user who is creating the record
Returns
int public

Definition at line 992 of file trim_common.inc.

static executeRequest (   $connection,
  $operations = Array(),
  $display_type = 'Fetch',
  $search_clause_xml = '',
  $hash_key = '',
$final_file_path = '' 
)
static

function to execute the web service request once all the internal objects have been set up properly

Parameters
array$operationsthe operations that can be perform (search, fetch, download, upload, getaccess)
string$display_typethe major operation that need to be achieved, so the object know how to parse the returned XML.
string$search_clause_xmlthe search clauses xml grouped by logical operator.
Returns
array|void public

Definition at line 898 of file trim_common.inc.

static getAllRecordTypes (   $connection)
static

This function returns the Record Type names from the uris of Record Types

Returns
array public

Definition at line 471 of file trim_common.inc.

static getDefaultRecordSearchOptions ( )
static

This function return a default record search options array

Returns
array public

Definition at line 834 of file trim_common.inc.

static getDocumentListUnderContainer (   $container_uri)
static

This function return all the records lie under a file/folder

Returns
array puclic

Definition at line 531 of file trim_common.inc.

static getPackagedFiles (   $object_list,
  $hash_key,
$final_file_path 
)
static

this function download the file into the specified folder

Parameters
array$object_listThe array contain the information about the file and its content.
Returns
boolean public

Definition at line 859 of file trim_common.inc.

static getRecordBehaviours ( )
static

this function return the record behaviours

Returns
array public

Definition at line 576 of file trim_common.inc.

static getRecordDateRangeSearchClauseType ( )
static

this function return the record date range search clause types() available for searching

Returns
array public

Definition at line 623 of file trim_common.inc.

static getRecordProperties ( )
static

this function return the record properties available for searching

Returns
array public

Definition at line 652 of file trim_common.inc.

static getRecordPropertiesFromUri (   $connection,
  $uri,
  $record_properties 
)
static

This function return specific properties of a record based on URI

Parameters
array$connection- details
string$uri- uri of desired subject
array$record_properties- array of return properties
Returns
array public

Definition at line 1374 of file trim_common.inc.

static getRecordSearchTypes ( )
static

this function return the record search types() available for searching

Returns
array public

Definition at line 557 of file trim_common.inc.

static getRecordSortProperties ( )
static

this function return the record properties available for sorting

Returns
array public

Definition at line 784 of file trim_common.inc.

static getRecordStringSearchClauseType ( )
static

this function return the record string search clause types() available for searching

Returns
array public

Definition at line 599 of file trim_common.inc.

static getRecordTypeNamesFromUris (   $connection,
  $uris 
)
static

This function returns the Record Type names from the uris of Record Types

Returns
array public

Definition at line 435 of file trim_common.inc.

static getSecurityLevel ( )
static

This function return all the available security levels in TRIM

Returns
array public

Definition at line 814 of file trim_common.inc.

static getURIFromRecordNumber (   $connection,
  $record_number 
)
static

This function return the Unique Resource Identifier for a particular Record Number

Returns
int public

Definition at line 365 of file trim_common.inc.

static getURIsFromClassification (   $connection,
  $classification 
)
static

This function return the Unique Resource Identifiers of a classification and all its sub-classifications

Returns
array public

Definition at line 402 of file trim_common.inc.

static SwapElement (   $xml,
  $ele_1,
  $ele_2 
)
static

swap the two XML element that are adjacent to each other if ele_1 occurs after to ele_2 The reason why we need this function is because sometimes RecordSearch need to be sent before Fetch, so Fetch know where to fetch results from.

Parameters
string$xmlThe TrimRequest object converted to XML
string$ele_1First element (fetch)
string$ele_2Second element (recordsearch)
Returns
string void

Definition at line 1219 of file trim_common.inc.

static test_trim_connection (   $connection)
static

This function test whether a connection is valid

Returns
boolean public

Definition at line 1327 of file trim_common.inc.


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