final String ownerInfo =
makeOwnerInfo( JcrTenantUtils.getTenantedUser( PentahoSessionHolder.getSession().getName() ), Calendar
.getInstance().getTime(), message );
Node fileNode = session.getNodeByIdentifier( fileId.toString() );
Assert.isTrue( fileNode.isNodeType( pentahoJcrConstants.getMIX_LOCKABLE() ) );
Lock lock = lockManager.lock( fileNode.getPath(), isDeep, isSessionScoped, timeoutHint, ownerInfo );
addLockToken( session, pentahoJcrConstants, lock );
}
private String makeOwnerInfo( final String lockOwner, final Date lockDate, final String lockMessage ) {
return escape( lockOwner ) + LOCK_OWNER_INFO_SEPARATOR + lockDate.getTime() + LOCK_OWNER_INFO_SEPARATOR