I presume you mean you have inherited from cm:content not cmbject and it's the former that has the 'content' property. In this scenario the 'content' property won't be undefined it will be available but set to null. Any attempt to access the content will result in a warning about there being no content. I think this will be OK.
You may be able to use the notion of policies to check for the availability, it will really depend on what you want to happen if the resource becomes unavailable.
Adding the other features as aspects is the way to go.
urlCheckable - You are right with the scheduled actions, this is the best way to implement a 'job' in Alfresco. Have a look in scheduled-jobs-context.xml for examples of built-in jobs. It's fairly easy to run a query to get all the objects with a certain aspect within the job and process them. Yes, having a last check date may be useful for this. Also being Spring configured this would make it easy to provide a custom implementation if desired.
urlCachable - I think your first suggested approach is the best. The reason for this is that if you inherit from sys:base then the nodes will not show up in any of our clients as they are looking for subtypes of cm:content!!
urlMonitorable - Same as checkable, a 'job' could be defined for this. Yes, Alfresco does support the dependent aspects i.e. adding 'cachable' when 'monitorable' is added. As for checking whether the url content has changed, is there a reason why you couldn't use the last modified date of the resource?
Suppose I have an aspect 'visitable' which adds as a property a URL leading to the node's website. (For instance, my node could represent an organization and therefore I add the aspect 'visitable', specifying therein the URL to the organization's website.) I want this website URL to be checked for availability from time to time.
How are we going to handle such a situation? We cannot 'add aspects to aspects' (add the 'urlCheckable' aspect to the 'visitable' aspect). So I see two ways out:
It seems obvious to me that the first approach is the way to go. Do you agree?
The only question I have is about user-friendliness in the GUI. To the user, the 1-to-1 child-association should be hidden (he/she for sure does not want to be bothered with such an implementation detail -- it's composition and should be brought to the user in this way!). Does the current Alfresco Web Client GUI handle this? I guess not!
(My little toe tells me that this is a Alfresco-beginner's question; please excuse me, if this is the case!) Hbf
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.