FileDescriptors in SAAS setup


I’ve looked through the SAAS sample project and that all makes sense. I see how Entities are restricted by way of a mappedsuperclasss, access groups etc.

My SAAS application needs to make use of uploading files and this obviously needs to be SAAS safe.

This is a system Entity and I can’t restrict it using a mappedsuperclass and I can’t see what constrains I might apply to the Entity either.

Is there a way to restrict FileDescriptors that would fit with the SAAS sample?

My only idea is to add a column for Client and the @PostConstruct method in the same way as the generic MappedSuperClass as in the SAAS Sample.

Any help?


1 Like


The idea suggested looks like it might be working.

Would it be a suitable solution?

hi John,

yes, this will work. You can extend FileDescriptor, add a column to it and assign it at @PostConstruct.

However, there is another (oftentimes a more simple) approach. Use “delegation” instead of inheritance. In this case, you would create a business entity, let’s call it “Attachement” and you’ll make this entity SaaSable with the column e.g. And then you assign a One-To-One association to it to the actual FileDescriptor.

This has to upside that you can easily customize / define the UI for this thing, since you don’t have to extend the default FileDescriptor. Additionally you might want do execute some business logic when a Attachement is created etc.


1 Like

Thanks Mario. I’ll look at the idea you mention too.