iTx Technologies offre gratuitement
cet espace pour SugarCRM !

title

Body

[fermer]

/soap/ -> SoapSugarUsers.php (sommaire)

(aucune description)

Taille du fichier: 2323 lignes (76 kb)
Inclus ou requis: 1 fois
Réferencé: 1 fois
Inclus ou requis: 5 fichiers
 modules/Documents/DocumentSoap.php
 modules/Notes/NoteSoap.php
 soap/SoapTypes.php
 modules/Campaigns/utils.php
 soap/SoapHelperFunctions.php

Defines 38 functions

  is_user_admin()
  login()
  is_loopback()
  validate_authenticated()
  is_valid_ip_address()
  seamless_login()
  get_entry_list()
  get_entry()
  get_entries()
  set_entry()
  set_entries()
  set_note_attachment()
  get_note_attachment()
  relate_note_to_module()
  get_related_notes()
  logout()
  get_module_fields()
  get_available_modules()
  update_portal_user()
  get_user_id()
  get_user_team_id()
  get_server_time()
  get_gmt_time()
  get_sugar_flavor()
  get_server_version()
  get_relationships()
  set_relationship()
  set_relationships()
  handle_set_relationship()
  set_document_revision()
  search_by_module()
  get_mailmerge_document()
  get_mailmerge_document2()
  get_document_revision()
  set_campaign_merge()
  get_entries_count()
  set_entries_details()
  handle_set_entries()

Fonctions
Fonctions qui ne font pas partie d'une classe :

is_user_admin($session)   X-Ref
Return if the user is an admin or not

param: String $session -- Session ID returned by a previous call to login.
return: int 1 or 0 depending on if the user is an admin

login($user_auth, $application)   X-Ref
Log the user into the application

param: UserAuth array $user_auth -- Set user_name and password (password needs to be
param: String $application -- The name of the application you are logging in from.  (Currently unused).
return: Array(session_id, error) -- session_id is the id of the session that was

is_loopback()   X-Ref
Check to see if the soap server and client are on the same machine.
We don't allow a server to sync to itself.

return: true -- if the SOAP server and client are on the same machine
return: false -- if the SOAP server and client are not on the same machine.

validate_authenticated($session_id)   X-Ref
Validate the provided session information is correct and current.  Load the session.

param: String $session_id -- The session ID that was returned by a call to login.
return: true -- If the session is valid and loaded.
return: false -- if the session is not valid.

is_valid_ip_address($session_var)   X-Ref
Use the same logic as in SugarAuthenticate to validate the ip address

param: string $session_var
return: bool - true if the ip address is valid, false otherwise.

seamless_login($session)   X-Ref
Perform a seamless login.  This is used internally during the sync process.

param: String $session -- Session ID returned by a previous call to login.
return: true -- if the session was authenticated
return: false -- if the session could not be authenticated

get_entry_list($session, $module_name, $query, $order_by,$offset, $select_fields, $max_results, $deleted )   X-Ref
Retrieve a list of beans.  This is the primary method for getting list of SugarBeans from Sugar using the SOAP API.

param: String $session -- Session ID returned by a previous call to login.
param: String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
param: String $query -- SQL where clause without the word 'where'
param: String $order_by -- SQL order by clause without the phrase 'order by'
param: String $offset -- The record offset to start from.
param: Array  $select_fields -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.
param: String $max_results -- The maximum number of records to return.  The default is the sugar configuration value for 'list_max_entries_per_page'
param: Number $deleted -- false if deleted records should not be include, true if deleted records should be included.
return: Array 'result_count' -- The number of records returned

get_entry($session, $module_name, $id,$select_fields )   X-Ref
Retrieve a single SugarBean based on ID.

param: String $session -- Session ID returned by a previous call to login.
param: String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
param: String $id -- The SugarBean's ID value.
param: Array  $select_fields -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.
return: unknown

get_entries($session, $module_name, $ids,$select_fields )   X-Ref
Retrieve a list of SugarBean's based on provided IDs.

param: String $session -- Session ID returned by a previous call to login.
param: String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
param: Array $ids -- An array of SugarBean IDs.
param: Array $select_fields -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.
return: Array 'field_list' -- Var def information about the returned fields

set_entry($session,$module_name, $name_value_list)   X-Ref
Update or create a single SugarBean.

param: String $session -- Session ID returned by a previous call to login.
param: String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
param: Array $name_value_list -- The keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.
return: Array    'id' -- the ID of the bean that was written to (-1 on error)

set_entries($session,$module_name, $name_value_lists)   X-Ref
Update or create a list of SugarBeans

param: String $session -- Session ID returned by a previous call to login.
param: String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
param: Array $name_value_lists -- Array of Bean specific Arrays where the keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.
return: Array    'ids' -- Array of the IDs of the beans that was written to (-1 on error)

set_note_attachment($session,$note)   X-Ref
Add or replace the attachment on a Note.

param: String $session -- Session ID returned by a previous call to login.
param: Binary $note -- The flie contents of the attachment.
return: Array 'id' -- The ID of the new note or -1 on error

get_note_attachment($session,$id)   X-Ref
Retrieve an attachment from a note

param: String $session -- Session ID returned by a previous call to login.
param: Binary $note -- The flie contents of the attachment.
param: String $session -- Session ID returned by a previous call to login.
param: String $id -- The ID of the appropriate Note.
return: Array 'id' -- The ID of the new note or -1 on error
return: Array 'note_attachment' -- Array String 'id' -- The ID of the Note containing the attachment

relate_note_to_module($session,$note_id, $module_name, $module_id)   X-Ref
Attach a note to another bean.  Once you have created a note to store an
attachment, the note needs to be related to the bean.

param: String $session -- Session ID returned by a previous call to login.
param: String $note_id -- The ID of the note that you want to associate with a bean
param: String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
param: String $module_id -- The ID of the bean that you want to associate the note with
return: no error for success, error for failure

get_related_notes($session,$module_name, $module_id, $select_fields)   X-Ref
Retrieve the collection of notes that are related to a bean.

param: String $session -- Session ID returned by a previous call to login.
param: String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
param: String $module_id -- The ID of the bean that you want to associate the note with
param: Array  $select_fields -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.
return: Array    'result_count' -- The number of records returned (-1 on error)

logout($session)   X-Ref
Log out of the session.  This will destroy the session and prevent other's from using it.

param: String $session -- Session ID returned by a previous call to login.
return: Empty error on success, Error on failure

get_module_fields($session, $module_name)   X-Ref
Retrieve vardef information on the fields of the specified bean.

param: String $session -- Session ID returned by a previous call to login.
param: String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
return: Array    'module_fields' -- The vardef information on the selected fields.

get_available_modules($session)   X-Ref
Retrieve the list of available modules on the system available to the currently logged in user.

param: String $session -- Session ID returned by a previous call to login.
return: Array    'modules' -- An array of module names

update_portal_user($session,$portal_name, $name_value_list)   X-Ref
Update the properties of a contact that is portal user.  Add the portal user name to the user's properties.

param: String $session -- Session ID returned by a previous call to login.
param: String $portal_name -- The portal user_name of the contact
param: Array $name_value_list -- collection of 'name'=>'value' pairs for finding the contact
return: Empty error on success, Error on failure

get_user_id($session)   X-Ref
Return the user_id of the user that is logged into the current session.

param: String $session -- Session ID returned by a previous call to login.
return: String -- the User ID of the current session

get_user_team_id($session)   X-Ref
Return the ID of the default team for the user that is logged into the current session.

param: String $session -- Session ID returned by a previous call to login.
return: String -- the Team ID of the current user's default team

get_server_time()   X-Ref
Return the current time on the server in the format 'Y-m-d H:i:s'.  This time is in the server's default timezone.

return: String -- The current date/time 'Y-m-d H:i:s'

get_gmt_time()   X-Ref
Return the current time on the server in the format 'Y-m-d H:i:s'.  This time is in GMT.

return: String -- The current date/time 'Y-m-d H:i:s'

get_sugar_flavor()   X-Ref
Retrieve the specific flavor of sugar.

return: String   'CE' -- For Community Edition

get_server_version()   X-Ref
Retrieve the version number of Sugar that the server is running.

return: String -- The current sugar version number.

get_relationships($session, $module_name, $module_id, $related_module, $related_module_query, $deleted)   X-Ref
Retrieve a collection of beans tha are related to the specified bean.
As of 4.5.1c, all combinations of related modules are supported

param: String $session -- Session ID returned by a previous call to login.
param: String $module_name -- The name of the module that the primary record is from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
param: String $module_id -- The ID of the bean in the specified module
param: String $related_module -- The name of the related module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
param: String $related_module_query -- A portion of the where clause of the SQL statement to find the related items.  The SQL query will already be filtered to only include the beans that are related to the specified bean.
param: Number $deleted -- false if deleted records should not be include, true if deleted records should be included.
return: unknown

set_relationship($session, $set_relationship_value)   X-Ref
Set a single relationship between two beans.  The items are related by module name and id.

param: String $session -- Session ID returned by a previous call to login.
param: Array $set_relationship_value --
return: Empty error on success, Error on failure

set_relationships($session, $set_relationship_list)   X-Ref
Setup several relationships between pairs of beans.  The items are related by module name and id.

param: String $session -- Session ID returned by a previous call to login.
param: Array $set_relationship_list -- One for each relationship to setup.  Each entry is itself an array.
return: Empty error on success, Error on failure

handle_set_relationship($set_relationship_value)   X-Ref
(Internal) Create a relationship between two beans.

param: Array $set_relationship_value --
return: Empty error on success, Error on failure

set_document_revision($session,$document_revision)   X-Ref
Enter description here...

param: String $session -- Session ID returned by a previous call to login.
param: unknown_type $document_revision
return: unknown

search_by_module($user_name, $password, $search_string, $modules, $offset, $max_results)   X-Ref
Given a list of modules to search and a search string, return the id, module_name, along with the fields
as specified in the $query_array

param: string $user_name         - username of the Sugar User
param: string $password            - password of the Sugar User
param: string $search_string     - string to search
param: string[] $modules            - array of modules to query
param: int $offset                - a specified offset in the query
param: int $max_results            - max number of records to return
return: get_entry_list_result     - id, module_name, and list of fields from each record

get_mailmerge_document($session, $file_name, $fields)   X-Ref
Enter description here...

param: String $session -- Session ID returned by a previous call to login.
param: unknown_type $file_name
param: unknown_type $fields
return: unknown

get_mailmerge_document2($session, $file_name, $fields)   X-Ref
Enter description here...

param: String $session -- Session ID returned by a previous call to login.
param: unknown_type $file_name
param: unknown_type $fields
return: unknown

get_document_revision($session,$id)   X-Ref
This method is used as a result of the .htaccess lock down on the cache directory. It will allow a
properly authenticated user to download a document that they have proper rights to download.

param: String $session -- Session ID returned by a previous call to login.
param: String $id      -- ID of the document revision to obtain
return: return_document_revision - this is a complex type as defined in SoapTypes.php

set_campaign_merge($session,$targets, $campaign_id)   X-Ref
Once we have successfuly done a mail merge on a campaign, we need to notify Sugar of the targets
and the campaign_id for tracking purposes

param: session        the session id of the authenticated user
param: targets        a string array of ids identifying the targets used in the merge
param: campaign_id    the campaign_id used for the merge
return: error_value

get_entries_count($session, $module_name, $query, $deleted)   X-Ref
Retrieve number of records in a given module

param: session        the session id of the authenticated user
param: module_name    module to retrieve number of records from
param: query          allows webservice user to provide a WHERE clause
param: deleted        specify whether or not to include deleted records

set_entries_details($session, $module_name, $name_value_lists, $select_fields)   X-Ref
Update or create a list of SugarBeans, returning details about the records created/updated

param: String $session -- Session ID returned by a previous call to login.
param: String $module_name -- The name of the module to return records from.  This name should be the name the module was developed under (changing a tab name is studio does not affect the name that should be passed into this method)..
param: Array $name_value_lists -- Array of Bean specific Arrays where the keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.
param: Array  $select_fields -- A list of the fields to be included in the results. This optional parameter allows for only needed fields to be retrieved.
return: Array    'name_value_lists' --  Array of Bean specific Arrays where the keys of the array are the SugarBean attributes, the values of the array are the values the attributes should have.

handle_set_entries($module_name, $name_value_lists, $select_fields = FALSE)   X-Ref
Aucune description



Generé en: Thu Mar 4 09:44:50 2010 | Cross-referenced par PHPXref 0.7