File Events
EventNames:
AddFile_Restrictions
AddFile_Pre
AddFile_Post
Parameters
Type |
Name |
Description |
---|---|---|
file |
The file which is / was added. |
|
parentFolder |
The folder where the new file is located. |
|
dependencies |
The file dependencies what this new file has. |
|
attachments |
The attached files what this new file has. |
|
fileBom |
The Bill of Materials of the newly checked-in file. |
|
bool |
successful |
Post: |
Examples:
AddFile_Restrictions:
Register-VaultEvent -EventName AddFile_Restrictions -Action 'RestrictAddFile'
function RestrictAddFile($file, $parentFolder, $dependencies, $attachments, $fileBom) {
#Write event code here
}
AddFile_Pre:
Register-VaultEvent -EventName AddFile_Pre -Action 'PreAddFile'
function PreAddFile($file, $parentFolder, $dependencies, $attachments, $fileBom) {
#Write event code here
}
AddFile_Post:
Register-VaultEvent -EventName AddFile_Post -Action 'PostAddFile'
function PostAddFile($file, $parentFolder, $dependencies, $attachments, $fileBom, $successful) {
#Write event code here
}
EventNames:
CheckinFile_Restrictions
CheckinFile_Pre
CheckinFile_Post
Parameters
Type |
Name |
Description |
---|---|---|
file |
The file which is / was checked in. |
|
dependencies |
The file dependencies what this new checked-in file has. |
|
attachments |
The attachments what this new checked-in file has. |
|
fileBom |
The Bill of Materials of the checked-in file. |
|
bool |
successful |
Post: |
Unexpected Behaviour
CheckinFile event is not raised when a file is added to Vault for the first time. Instead the AddFile event is raised.
Examples:
CheckinFile_Restrictions:
Register-VaultEvent -EventName CheckinFile_Restrictions -Action 'RestrictCheckinFile'
function RestrictCheckinFile($file, $dependencies, $attachments, $fileBom) {
#Write event code here
}
CheckinFile_Pre:
Register-VaultEvent -EventName CheckinFile_Pre -Action 'PreCheckinFile'
function PreCheckinFile($file, $dependencies, $attachments, $fileBom) {
#Write event code here
}
CheckinFile_Post:
Register-VaultEvent -EventName CheckinFile_Post -Action 'PostCheckinFile'
function PostCheckinFile($file, $dependencies, $attachments, $fileBom, $successful) {
#Write event code here
}
EventNames:
CheckoutFile_Restrictions
CheckoutFile_Pre
CheckoutFile_Post
Parameters
Type |
Name |
Description |
---|---|---|
file |
The file which should get / is checked=out. |
|
string |
localPath |
The local path where the file should / is checked=out |
bool |
successful |
Post: |
Examples:
CheckoutFile_Restrictions:
Register-VaultEvent -EventName CheckoutFile_Restrictions -Action 'RestrictCheckoutFile'
function RestrictCheckoutFile($file, $localPath) {
#Write event code here
}
CheckoutFile_Pre:
Register-VaultEvent -EventName CheckoutFile_Pre -Action 'PreCheckoutFile'
function PreCheckoutFile($file, $localPath) {
#Write event code here
}
CheckoutFile_Post:
Register-VaultEvent -EventName CheckoutFile_Post -Action 'PostCheckoutFile'
function PostCheckoutFile($file, $localPath, $successful) {
#Write event code here
}
EventNames:
DeleteFiles_Restrictions
DeleteFiles_Pre
DeleteFiles_Post
Parameters
Type |
Name |
Description |
---|---|---|
files (deletedFiles in POST) |
The files which should be deleted or are already deleted. |
|
bool |
successful |
Post: |
Examples:
DeleteFiles_Restrictions:
Register-VaultEvent -EventName DeleteFiles_Restrictions -Action 'RestrictDeleteFiles'
function RestrictDeleteFiles($files) {
#Write event code here
}
DeleteFiles_Pre:
Register-VaultEvent -EventName DeleteFiles_Pre -Action 'PreDeleteFiles'
function PreDeleteFiles($files) {
#Write event code here
}
DeleteFiles_Post:
Register-VaultEvent -EventName DeleteFiles_Post -Action 'PostDeleteFiles'
function PostDeleteFiles($deletedFiles, $successful) {
#Write event code here
}
EventNames:
DownloadFiles_Restrictions
DownloadFiles_Pre
DownloadFiles_Post
Parameters
Type |
Name |
Description |
---|---|---|
files |
The files which should get / are downloaded. |
|
bool |
successful |
Post: |
Examples:
DownloadFiles_Restrictions:
Register-VaultEvent -EventName DownloadFiles_Restrictions -Action 'RestrictDownloadFiles'
function RestrictDownloadFiles($files) {
#Write event code here
}
DownloadFiles_Pre:
Register-VaultEvent -EventName DownloadFiles_Pre -Action 'PreDownloadFiles'
function PreDownloadFiles($files) {
#Write event code here
}
DownloadFiles_Post:
Register-VaultEvent -EventName DownloadFiles_Post -Action 'PostDownloadFiles'
function PostDownloadFiles($files, $successful) {
#Write event code here
}
EventNames:
MoveFile_Restrictions
MoveFile_Pre
MoveFile_Post
Parameters
Type |
Name |
Description |
---|---|---|
file |
The file which should get / are moved. |
|
parentFolder |
The parent folder where the file should get / is moved. |
|
bool |
successful |
Post: |
Examples:
MoveFile_Restrictions:
Register-VaultEvent -EventName MoveFile_Restrictions -Action 'RestrictMoveFile'
function RestrictMoveFile($file, $parentFolder) {
#Write event code here
}
MoveFile_Pre:
Register-VaultEvent -EventName MoveFile_Pre -Action 'PreMoveFile'
function PreMoveFile($file, $parentFolder) {
#Write event code here
}
MoveFile_Post:
Register-VaultEvent -EventName MoveFile_Post -Action 'PostMoveFile'
function PostMoveFile($file, $parentFolder, $successful) {
#Write event code here
}
EventNames:
UpdateFileStates_Restrictions
UpdateFileStates_Pre
UpdateFileStates_Post
Parameters
Type |
Name |
Description |
---|---|---|
files |
The files in Vault for which the lifefycle status changes/was changed. |
|
bool |
successful |
Post: |
Examples:
UpdateFileStates_Restrictions:
Register-VaultEvent -EventName UpdateFileStates_Restrictions -Action 'RestrictUpdateFileStates'
function RestrictUpdateFileStates($files) {
#Write event code here
}
UpdateFileStates_Pre:
Register-VaultEvent -EventName UpdateFileStates_Pre -Action 'PreUpdateFileStates'
function PreUpdateFileStates($files) {
#Write event code here
}
UpdateFileStates_Post:
Register-VaultEvent -EventName UpdateFileStates_Post -Action 'PostUpdateFileStates'
function PostUpdateFileStates($files, $successful) {
#Write event code here
}