[Yanel-dev] set last modified

Michael Wechner michael.wechner at wyona.com
Wed Mar 9 10:47:12 EST 2016


Hello Simon

Great that you got it working!

In case you are looking for the content of the previous email, then
please see here

http://lists.wyona.org/pipermail/yanel-development/2016-March/006333.html

All the best

Michael

Am 09.03.16 um 16:32 schrieb simon:
> Hello Michi
>
> unfortunately i lost the last message. That's why i answer on this old
> one.
>
> But i just wanted to say that this is working:
>
> Repository repository = manager.getRealm().getRepository();
> Node node = repository.getNode(yarepPath);
> node.setProperty(AbstractNode.PROPERTY_LAST_MODIFIED,System.currentTimeMillis());
>
>
> I made another stupid mistake.
> Thank you for your help.
>
> Cheers
> Simon
>
> Am 08.03.2016 um 17:35 schrieb Michael Wechner:
>> Dear Simon
>>
>> What Repository/Node implementation do you use?
>>
>> I can see the following existing implementations
>>
>> grep -rl getLastModified src/impl/*
>> src/impl/java/org/wyona/yarep/core/impl/fs/FileSystemStorage.java
>> src/impl/java/org/wyona/yarep/core/impl/svn/SVNStorage.java
>> src/impl/java/org/wyona/yarep/core/impl/vfs/VFileSystemStorage.java
>> src/impl/java/org/wyona/yarep/impl/AbstractNode.java
>> src/impl/java/org/wyona/yarep/impl/DefaultRepository.java
>> src/impl/java/org/wyona/yarep/impl/DummyNode.java
>> src/impl/java/org/wyona/yarep/impl/repo/dummy/DummyRepository.java
>> src/impl/java/org/wyona/yarep/impl/repo/fs/FileSystemNode.java
>> src/impl/java/org/wyona/yarep/impl/repo/fs/FileSystemRepository.java
>> src/impl/java/org/wyona/yarep/impl/repo/jcr/JCRNode.java
>> src/impl/java/org/wyona/yarep/impl/repo/jcr/JCRRepository.java
>> src/impl/java/org/wyona/yarep/impl/repo/orm/ORMRepositoryImpl.java
>> src/impl/java/org/wyona/yarep/impl/repo/orm/ORMStorage.java
>> src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemNode.java
>> src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemRepository.java
>>
>> src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemRevision.java
>>
>> src/impl/java/org/wyona/yarep/impl/repo/xmldb/XMLDBStorage.java
>>
>>
>> For example
>>
>> src/impl/java/org/wyona/yarep/impl/AbstractNode.java
>>
>> uses the property
>>
>> Property lastModified = getProperty(PROPERTY_LAST_MODIFIED);
>>
>> which means if you overwrite this, then you should be able to change it.
>>
>> Just being curious, what is your actual usecase to for "touching" nodes?
>>
>> HTH
>>
>> Michael
>>
>>
>> Am 08.03.16 um 09:18 schrieb simon:
>>> Dear all
>>>
>>> I'm looking for some way to implement something like 'touch'. I would
>>> like to programmatically update a nodes last modified.
>>> i actually thought it could work like this:
>>>
>>>              Repository repository =
>>> manager.getRealm().getRepository();
>>>              Node node = repository.getNode(yarepPath);
>>>              node.setProperty(AbstractNode.PROPERTY_CHECKIN_DATE, new
>>> Date());
>>>
>>> But this doesn't seem to work.
>>> could someone give me a hint how to do this.
>>>
>>> Thanks in advance.
>>>
>>> Cheers
>>> Simon
>>>
>>
>
>



More information about the Yanel-development mailing list