cancel
Showing results for 
Search instead for 
Did you mean: 

Noderef properties

ucf
Champ on-the-rise
Champ on-the-rise
Hello,

I want to know how to get a document porperty such as the date when this document is posted, I guess I'm gonna use nodeservice but don't know how, and one more question, can I plan to run a java class as a scheduled action in my context.xml, I use maven structure with alfresco community.
ps: I'm a beginner in alfresco Smiley Wink

thank you
4 REPLIES 4

mitpatoliya
Star Collaborator
Star Collaborator
You can capture properties once content is created. Question is where you want to capture it and where you want to pass it or store it?

Now for scheduled actions with java class you need to create cron-job in alfresco you can refer following link to get details on that.
http://blog.arvixe.com/tag/alfresco-cron-jobs/

ucf
Champ on-the-rise
Champ on-the-rise
thank you for your help, in fact documents are posted via a portal, but let's consider that the document is being posted in alfresco, and I want to store the date in a java class to use it to check the expiration date of a document using a scheduled job to make a reminder

sanket
Champ on-the-rise
Champ on-the-rise
To get the date, you can use :

Date createdDate = (Date) this.nodeService.getProperty(nodeRef, ContentModel.PROP_CREATED);

Yes, you can run a java class as a scheduled action. You need to make entry in scheduled-jobs-context.xml file.

Refer these links :
http://wiki.alfresco.com/wiki/Scheduled_Actions
https://forums.alfresco.com/forum/general/non-technical-alfresco-discussion/scheduled-action-service...

ucf
Champ on-the-rise
Champ on-the-rise
thank you for your help