cancel
Showing results for 
Search instead for 
Did you mean: 

Content Validation

alexv
Champ in-the-making
Champ in-the-making
Is it possible to validate uploaded content somehow and perform particular actions (create rules) based on the result?
E.g. for XML: validate it using XSD and refuse to store if it was incorrect?
6 REPLIES 6

rogier_oudshoor
Champ in-the-making
Champ in-the-making
It is, but it depends on the method of storing. You can create your own custom action in the JSF Web Client to handle it, or do so in a potential custom interface. This however will not block uploads through CIFS, FTP or WebDAV …

alexv
Champ in-the-making
Champ in-the-making
It is, but it depends on the method of storing. You can create your own custom action in the JSF Web Client to handle it, or do so in a potential custom interface. This however will not block uploads through CIFS, FTP or WebDAV …

Thanks for your reply.
Good idea, but not an option for me. I'd like to do that on the repository side, since I'm going to use both Java Web Services API and Web Scripts API for content management.

Any others ideas?

rogier_oudshoor
Champ in-the-making
Champ in-the-making
In that case, you'll have to write your own Web Scripts & Web Services to do the validation.

alexv
Champ in-the-making
Champ in-the-making
In that case, you'll have to write your own Web Scripts & Web Services to do the validation.

Maybe. But common services will still exist and allow skipping of validation step…

rogier_oudshoor
Champ in-the-making
Champ in-the-making
Maybe. But common services will still exist and allow skipping of validation step…

Yup. Alternatively you could place an inheriting Content Rule on the root where you want this behaviour (or on every folder), in which you specify that you want to execute a script in the context of the transaction. You can have this script call a Java class, and have the Java class rollback the transaction. This will not give the user any feedback on why something happened, but it will block the upload / edit.

I would normally only use such methods if there are no alternatives, because you are hiding behaviour from the end user - who will think the system is broken if he can copy a file, but will not see it show up.

alexv
Champ in-the-making
Champ in-the-making
Maybe. But common services will still exist and allow skipping of validation step…

Yup. Alternatively you could place an inheriting Content Rule on the root where you want this behaviour (or on every folder), in which you specify that you want to execute a script in the context of the transaction. You can have this script call a Java class, and have the Java class rollback the transaction. This will not give the user any feedback on why something happened, but it will block the upload / edit.

I would normally only use such methods if there are no alternatives, because you are hiding behaviour from the end user - who will think the system is broken if he can copy a file, but will not see it show up.

I got the idea. Thanks a lot. I will take this into account.