Constants

REGISTRY_NO_DB_ENTRY

REGISTRY_NO_DB_ENTRY

REGISTRY_NO_MANIFEST

REGISTRY_NO_MANIFEST

Properties

$rightname

$rightname : string

The right name for this class

Type

string

Methods

getTypes()

getTypes() : array

Get the 2 types to add files

Returns

array

displayForm()

displayForm(object  $package, array  $request_data, string  $rand, string  $mode) 

Display form

Parameters

object $package

PluginFusioninventoryDeployPackage instance

array $request_data
string $rand

unique element id used to identify/update an element

string $mode

possible values: init|edit|create

displayList()

displayList(object  $package, array  $datas, string  $rand) 

Display list of files

Parameters

object $package

PluginFusioninventoryDeployPackage instance

array $datas

array converted of 'json' field in DB where stored actions

string $rand

unique element id used to identify/update an element

displayDropdownType()

displayDropdownType(array  $config, string  $rand, string  $mode) 

Display the dropdown to select type of file

Parameters

array $config

order item configuration

string $rand

unique element id used to identify/update an element

string $mode

mode in use (create, edit...)

displayAjaxValues()

displayAjaxValues(array  $config, array  $request_data, string  $rand, string  $mode) : boolean

Display different fields relative the file selected

Parameters

array $config
array $request_data
string $rand

unique element id used to identify/update an element

string $mode

mode in use (create, edit...)

Returns

boolean

showServerFileTree()

showServerFileTree(string  $rand) 

Show files / directory on server.

This is used when get a file on the server

Parameters

string $rand

unique element id used to identify/update an element

getServerFileTree()

getServerFileTree(string  $node) 

Get files / directories on server

Parameters

string $node

add_item()

add_item(array  $params) 

Add a new item in files of the package

Parameters

array $params

list of fields with value of the file

remove_item()

remove_item(array  $params) : boolean

Remove an item

Parameters

array $params

Returns

boolean

move_item()

move_item(array  $params) 

Move an item

Parameters

array $params

save_item()

save_item(array  $params) 

Save the item in files

Parameters

array $params

list of fields with value of the file

uploadFileFromComputer()

uploadFileFromComputer(array  $params) : boolean

Upload file from user computer

Parameters

array $params

Returns

boolean

uploadFileFromServer()

uploadFileFromServer(array  $params) : boolean

Upload file from temp folder in server

Parameters

array $params

Returns

boolean

getDirBySha512()

getDirBySha512(string  $sha512) : string

Get directories based on sha512

Parameters

string $sha512

Returns

string —

the directories based on sha512

registerFilepart()

registerFilepart(string  $repoPath, string  $filePath, boolean  $skip_creation = FALSE) : string

Move uploaded file part in right/final directory

Parameters

string $repoPath

path of the repository

string $filePath

path of the file + filename

boolean $skip_creation

Returns

string

addFileInRepo()

addFileInRepo(array  $params) : boolean

Add file in the fusioninventory repository

Parameters

array $params

Returns

boolean

removeFileInRepo()

removeFileInRepo(string  $sha512, integer  $packages_id) : boolean

Remove file from the repository

Parameters

string $sha512

sha512 of the file

integer $packages_id

id of the package

Returns

boolean

checkPresenceManifest()

checkPresenceManifest(string  $sha512) : boolean

Check if the manifest relative to the sha512 exist

Parameters

string $sha512

sha512 of the file

Returns

boolean

checkPresenceFile()

checkPresenceFile(string  $sha512) : boolean

Check if the file relative to the sha512 exist

Parameters

string $sha512

sha512 of the file

Returns

boolean

getMaxUploadSize()

getMaxUploadSize() : string

Get the maximum size the php can accept for upload file

Returns

string

processFilesize()

processFilesize(integer  $filesize) : string

Get the size of file

Parameters

integer $filesize

Returns

string

numberUnusedFiles()

numberUnusedFiles() 

List number of files not used in packages

deleteUnusedFiles()

deleteUnusedFiles() 

Delete the files not used in packages