Expand my Community achievements bar.

SOLVED

Correct way of handling dialog save operation on backend for AEMaaCS

Avatar

Level 2

We migrate our project from On Prem to Cloud. On Prem used a feature called "protected areas" where specific pages were protected by password. In order to set this password on specific page properties we had a custom PostOperation service to get that password from request parameter and store it in CRX after CryptoSupport encryption. In current AEM SDK I can see that I cannot compile my custom class implementing PostOperation due to

 

[ERROR] cannot access org.apache.sling.servlets.post.exceptions.PreconditionViolatedPersistenceException

[ERROR] class file for org.apache.sling.servlets.post.exceptions.PreconditionViolatedPersistenceException not found

[ERROR] cannot access org.apache.sling.servlets.post.exceptions.TemporaryPersistenceException

[ERROR] class file for org.apache.sling.servlets.post.exceptions.TemporaryPersistenceException not found

 

and in fact those exception classes are not available in AEM SDK jar. Moreover it seems like Abstract for this PostOperation interface is deprecated.

 

What is a current approach of listening to dialog changes in order to process those parameters before saving to CRX?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @MikołajBuda,

Assuming that you are using OOTB way of handling dialogs via SlingPostServlet, you can consider to use SlingPostProcessor as an alternative. I think it should cover your case.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @MikołajBuda,

Assuming that you are using OOTB way of handling dialogs via SlingPostServlet, you can consider to use SlingPostProcessor as an alternative. I think it should cover your case.

Avatar

Employee Advisor

Can you please doublecheck that these classes are not included in the SDK? What's version of the SDK are you using? If this is a problem on the SDK for the latest AEM release, please report it with support. These classes should definitely be included.

Thanks!