Folder Events

EventNames:

  • AddFolder_Restrictions

  • AddFolder_Pre

  • AddFolder_Post

Parameters

Type

Name

Description

Folder

folder

The folder which should get / is added.

Restrictions and Pre:
In Restrictions and Pre you have the very limited data set on this object like _NewName and _NewLibrary.

Post:
In POST its an usual powerVaultFolder object, because at this point the folder exists.

Folder

parentFolder

The parent folder where the new folder will be / is added.

bool

successful

Post:
The information whether the Web Service call was successful or not is only available in Post events.

Examples:
AddFolder_Restrictions:

Register-VaultEvent -EventName AddFolder_Restrictions -Action 'RestrictAddFolder'

function RestrictAddFolder($folder, $parentFolder) {
	#Write event code here
}

AddFolder_Pre:

Register-VaultEvent -EventName AddFolder_Pre -Action 'PreAddFolder'

function PreAddFolder($folder, $parentFolder) {
	#Write event code here
}

AddFolder_Post:

Register-VaultEvent -EventName AddFolder_Post -Action 'PostAddFolder'

function PostAddFolder($folder, $parentFolder, $successful) {
	#Write event code here
}

EventNames:

  • MoveFolder_Restrictions

  • MoveFolder_Pre

  • MoveFolder_Post

Parameters

Type

Name

Description

Folder

folder

The folder which should get / is moved.

Restrictions and Pre:
In Restrictions and Pre you have the future data set on this object like _NewFullPath.

Post:
In POST you can retrieve the previous information by using the properties _OldFullPath.

Folder

parentFolder

The new parent folder where the folder should / is moved

bool

successful

Post:
The information whether the Web Service call was successful or not is only available in Post events.

Examples:
MoveFolder_Restrictions:

Register-VaultEvent -EventName MoveFolder_Restrictions -Action 'RestrictMoveFolder'

function RestrictMoveFolder($folder, $parentFolder) {
	#Write event code here
}

MoveFolder_Pre:

Register-VaultEvent -EventName MoveFolder_Pre -Action 'PreMoveFolder'

function PreMoveFolder($folder, $parentFolder) {
	#Write event code here
}

MoveFolder_Post:

Register-VaultEvent -EventName MoveFolder_Post -Action 'PostMoveFolder'

function PostMoveFolder($folder, $parentFolder, $successful) {
	#Write event code here
}

EventNames:

  • DeleteFolder_Restrictions

  • DeleteFolder_Pre

  • DeleteFolder_Post

Parameters

Type

Name

Description

Folder

folder (deletedFolder in POST)

The folder which should get / is deleted.

bool

successful

Post:
The information whether the Web Service call was successful or not is only available in Post events.

Examples:
DeleteFolder_Restrictions:

Register-VaultEvent -EventName DeleteFolder_Restrictions -Action 'RestrictDeleteFolder'

function RestrictDeleteFolder($folder) {
	#Write event code here
}

DeleteFolder_Pre:

Register-VaultEvent -EventName DeleteFolder_Pre -Action 'PreDeleteFolder'

function PreDeleteFolder($folder) {
	#Write event code here
}

DeleteFolder_Post:

Register-VaultEvent -EventName DeleteFolder_Post -Action 'PostDeleteFolder'

function PostDeleteFolder($deletedFolder, $successful) {
	#Write event code here
}

EventNames:

  • UpdateFolderStates_Restrictions

  • UpdateFolderStates_Pre

  • UpdateFolderStates_Post

Parameters

Type

Name

Description

Folder[]

folders

The folders in Vault for which the lifefycle status changes/was changed.

Restrictions and Pre:
In these events you can get the future changes through the special properties _NewState, _NewLifeCycleDefinition and _NewComment.

Post:
In this event you can retrieve the information from previous events by using the properties _OldState and _OldLifeCycleDefinition.

Note: The Vault API doesn’t currently support folder comments, so _OldComment is always empty. Autodesk reserved this functionality for future use.

bool

successful

Post:
The information whether the Web Service call was successful or not is only available in the _Post event.

Examples:
UpdateFolderStates_Restrictions:

Register-VaultEvent -EventName UpdateFolderStates_Restrictions -Action 'RestrictUpdateFolderStates'

function RestrictUpdateFolderStates($folders) {
	#Write event code here
}

UpdateFolderStates_Pre:

Register-VaultEvent -EventName UpdateFolderStates_Pre -Action 'PreUpdateFolderStates'

function PreUpdateFolderStates($folders) {
	#Write event code here
}

UpdateFolderStates:

Register-VaultEvent -EventName UpdateFolderStates_Post -Action 'PostUpdateFolderStates'

function PostUpdateFolderStates($folders, $successful) {
	#Write event code here
}