It's often useful to be able to run code as the system user (for instance when calling methods that do access checks like directories).
Create Framework.doPrivileged taking a Runnable to do that.
For Nuxeo versions supporting only Java 8 (so, not for 6.0), another signature taking a Supplier is also available, in order to return values.