AEM Experience Flashcards

1
Q

Workflow step to move an asset
What was the problem?
Solution including APIs you used

A

The client required a workflow to move a pdf file to different locations in the DAM without any interaction. The pdf’s filename had underscore separated codes, which identified the destination folder for the file.

Solution:
Created a workflow that is launched when a file is created under /content/dam/mosaic
Go to Tools>Workflow>Model>create new model
Tools>Workflow>Launcher > create a launcher for when a file is created event
Add a Process step to the workflow model and select your custom process step.

Created a custom workflow step by implementing the granite WorkflowProcess class and implementing the execute method.
In the execute method I used the granite AssetManager api’s move method to move the asset from source to destination.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Customized site admin tools menu by adding a generate feed button

A

Copied site admin from /libs/cq/ui to /apps/cq/ui
Copied exiting button.
Created a new function in JS.
This function is called using a property on button node.
Explain Ajax call to servlet-> servlet Checks current user
JS -> Calls servlet -> Checks if current user is admin -> return json with true or false
JS Checks json string and displays accordingly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Custom replication agent to call Akamai and clear the cache

A

Replication in aem allows you to move content across servers.
To create a custom replication agent:

Replication Agent UI: copy the replication agent from cq/replication/components/agent

Implement Content builder: creates the content that will be sent in the body of the request by the transport handler. (Select as serialization type)

Implement Transport handler: handles communication with the server
Call akami using Apache http client.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly