Changes
Created page with "For [[SYSCLS_EXCLUSIVE_ACCESS|certain content]], it is necessary to prevent multiple users from editing the same content at the same time. This is exactly what this feature is..."
For [[SYSCLS_EXCLUSIVE_ACCESS|certain content]], it is necessary to prevent multiple users from editing the same content at the same time. This is exactly what this feature is about, namely to allow one user to gain exclusive access to some content so that it remains locked to other users until that access is released.
== Exclusive access state ==
For content that is exclusive access related, you should see some indicator (icon or icon with text) in the content page or content item view. It's possible to have the following states:
* Disabled - Impossible to check out or release the content for exclusive access. This doesn't necessarily affect the lock status of the content, though;
* Not checked out - The object is locked but can be checked out, and it gets unlocked once the check out is accepted by the server;
* Checked out by me - The object is unlocked only to the current user because they have exclusive access to it;
* Checked out by others - The object is locked and can not be checked out, because another user has exclusive access to it.
{{Hint|The exclusive access aspect of a content object only contributes in the overall locking status (combined with other factors, e.g. [[User_Rights]] using logic or). In other words, an object can still be locked when you have exclusive access to it.}}
== Check out and release ==
Two basic options are provided regarding exclusive access.
* Check out - Checks out the content so that you can exclusively edit it;
* Release - Gives back the exclusive access to the content so other users can request it.
=== Applied conditions ===
The check out and release options are only possible under the following conditions.
* The app is in Online sync mode;
* The content is exclusive access related and it's not disabled;
* There are no local changes on the content to be checked out or released; (It shouldn't be possible before checking out anyway.)
* (Only for check out) The content is not yet checked out by anyone;
* (Only for release) The content is already checked out by the current user. Here, the current user must be known and it's not enough to just be successfully logged in. The login must have a unique identifier, see [[Login_View#Login_details|login details]].
{{Attention|Fulfilling these conditions does not necessarily guarantee the success of a check out or release. Eventually the server decides whether exclusive access can be granted or not. Example reasons of failure can be multiple users requested exclusive access in parallel and only the first one gains it, or server side customizings can add more condition checks.}}
== Branch download and check out ==
When downloading a branch, there is now a second option to check out all downloaded content afterwards. Note that the previously mentioned [[#Applied_conditions|conditions]] still apply, those that do not fulfill them will simply be skipped.
== XAML customizing ==
CheckOutContentCommand and ReleaseContentCommand are available on a ContentViewModel. Both accept different types of parameters.
* No parameter: The context object is assumed;
* A single instance of an object or ContentViewModel: That object or the context object of that ContentViewModel is to be checked out or released;
* A collection of objects or ContentViewModels: The given objects are to be checked out or released. This case is demonstrated in the example below, in which the current level of child objects are to be checked out.
<source lang = "xml">
<Button...
Command="{Binding CheckOutContentCommand}"
CommandParameter="{Binding Children.Items}">
</Button>
</source>
{{Hint|It's possible to supply a [[XAML_Changes_in_UBIK_WinX_3.5#Filtering_by_expressions|filtered collection of objects]] as the parameter for these commands.}}
Details of exclusive access related information of the context object are available in ContentViewModel.ExclusiveAccessInfo, and can be inspected using the [[Developer_Mode#Browsing_the_ViewModel.2FContext|developer mode]].
==See also==
* [[SYSCLS_EXCLUSIVE_ACCESS]]
[[Category:Client|Exclusive Access Content (Client)]]
[[Category:WinX|Exclusive Access Content (Client)]]
[[Category:Xamarin|Exclusive Access Content (Client)]]
[[Category:Version 4.1|Exclusive Access Content (Client)]]
== Exclusive access state ==
For content that is exclusive access related, you should see some indicator (icon or icon with text) in the content page or content item view. It's possible to have the following states:
* Disabled - Impossible to check out or release the content for exclusive access. This doesn't necessarily affect the lock status of the content, though;
* Not checked out - The object is locked but can be checked out, and it gets unlocked once the check out is accepted by the server;
* Checked out by me - The object is unlocked only to the current user because they have exclusive access to it;
* Checked out by others - The object is locked and can not be checked out, because another user has exclusive access to it.
{{Hint|The exclusive access aspect of a content object only contributes in the overall locking status (combined with other factors, e.g. [[User_Rights]] using logic or). In other words, an object can still be locked when you have exclusive access to it.}}
== Check out and release ==
Two basic options are provided regarding exclusive access.
* Check out - Checks out the content so that you can exclusively edit it;
* Release - Gives back the exclusive access to the content so other users can request it.
=== Applied conditions ===
The check out and release options are only possible under the following conditions.
* The app is in Online sync mode;
* The content is exclusive access related and it's not disabled;
* There are no local changes on the content to be checked out or released; (It shouldn't be possible before checking out anyway.)
* (Only for check out) The content is not yet checked out by anyone;
* (Only for release) The content is already checked out by the current user. Here, the current user must be known and it's not enough to just be successfully logged in. The login must have a unique identifier, see [[Login_View#Login_details|login details]].
{{Attention|Fulfilling these conditions does not necessarily guarantee the success of a check out or release. Eventually the server decides whether exclusive access can be granted or not. Example reasons of failure can be multiple users requested exclusive access in parallel and only the first one gains it, or server side customizings can add more condition checks.}}
== Branch download and check out ==
When downloading a branch, there is now a second option to check out all downloaded content afterwards. Note that the previously mentioned [[#Applied_conditions|conditions]] still apply, those that do not fulfill them will simply be skipped.
== XAML customizing ==
CheckOutContentCommand and ReleaseContentCommand are available on a ContentViewModel. Both accept different types of parameters.
* No parameter: The context object is assumed;
* A single instance of an object or ContentViewModel: That object or the context object of that ContentViewModel is to be checked out or released;
* A collection of objects or ContentViewModels: The given objects are to be checked out or released. This case is demonstrated in the example below, in which the current level of child objects are to be checked out.
<source lang = "xml">
<Button...
Command="{Binding CheckOutContentCommand}"
CommandParameter="{Binding Children.Items}">
</Button>
</source>
{{Hint|It's possible to supply a [[XAML_Changes_in_UBIK_WinX_3.5#Filtering_by_expressions|filtered collection of objects]] as the parameter for these commands.}}
Details of exclusive access related information of the context object are available in ContentViewModel.ExclusiveAccessInfo, and can be inspected using the [[Developer_Mode#Browsing_the_ViewModel.2FContext|developer mode]].
==See also==
* [[SYSCLS_EXCLUSIVE_ACCESS]]
[[Category:Client|Exclusive Access Content (Client)]]
[[Category:WinX|Exclusive Access Content (Client)]]
[[Category:Xamarin|Exclusive Access Content (Client)]]
[[Category:Version 4.1|Exclusive Access Content (Client)]]