public static void touch ( final Node node , final Calendar created , final String creatingUser , final Calendar modified , final String modifyingUser ) { try { if ( created != null ) { node . setProperty ( FEDORA_CREATED , created ) ; } if ( creatingUser != null ) { node . setProperty ( FEDORA_CREATEDBY , creatingUser ) ; } if ( modified != null ) { node . setProperty ( FEDORA_LASTMODIFIED , modified ) ; } else { node . setProperty ( FEDORA_LASTMODIFIED , getInstance ( getTimeZone ( "UTC" ) ) ) ; } if ( modifyingUser != null ) { node . setProperty ( FEDORA_LASTMODIFIEDBY , modifyingUser ) ; } else { // revert to the modeshape-managed property if ( node . hasProperty ( FEDORA_LASTMODIFIEDBY ) ) { node . getProperty ( FEDORA_LASTMODIFIEDBY ) . remove ( ) ; } } } catch ( final javax . jcr . AccessDeniedException ex ) { throw new AccessDeniedException ( ex ) ; } catch ( final RepositoryException ex ) { throw new RepositoryRuntimeException ( ex ) ; } }
Updates the LAST_MODIFIED_DATE LAST_MODIFIED_BY CREATED_DATE and CREATED_BY properties to the provided values .