ADF: Cloning personalizations between users – read and write MDS Customization documents

Lucas Jellema 1
0 0
Read Time:2 Minute, 38 Second

In a recent post I wrote how wonderful the ADF support for user level customizations or personalizations is, and then I went on to explain how the user can be enabled to remove her own personalizations (https://technology.amis.nl/2012/09/27/adf-undo-the-users-page-personalizations-query-and-manipulate-mds/). This article a sequel to that story. It will introduce the capability for one user to clone the personalizations from another user. This means at the background that the document that contains the customizations for a page for the ‘source user’ is read and a new document with the exact same contents is written for the ‘target user’ who will then have personalizations that are at that time exactly the same as those of the source user. There is no link between the two documents – they are both on their own. Any pre-existing personalizations for the target user are lost in this process.

Note: I do not talk about the privileges that you want to define in order to not have anyone copying from just anyone else. Also note that I discuss cloning the personalizations for a single page only. Copying all personalizations from one user to another however is a very simple extension of what is discussed below.

The steps for implementing this clone capability in an application that is already personalization enabled are remarkably simple.

The starting point is user SKING who has applied a number of personalizations to the following page:

image

User AHUNOLD
image
did not apply any personalization, so the page to him looks as the developers created it:

image

Alexander Hunold saw the page when his colleague Steven King was working with it, and he thought that amazing! Those superb personalizations had turned the page into a beauty, easy to use and addictive to look at. So Alexander wants his page to look the same as SKING’s. He uses the cloning mechanism:
image

and is informed:

image

After refreshing the page, now for AHUNOLD it too looks like:
image

In the MDS Repository, the document with personal customizations for SKING was copied for AHUNOLD. On the MDS File implementation that looks simply as follows:
image

Note: since both users have their own copy, any additional personalization made by one of them is invisible to the other. At any time though they can again close each other’s personalizations.

Implementation

Using the groundwork described in the previous article – https://technology.amis.nl/2012/09/27/adf-undo-the-users-page-personalizations-query-and-manipulate-mds/ – it is not a lot of work to implement the cloning. It primarily requires details on the MDS API functionality – by and large found here: http://idmclub.wikidot.com/metadata-store.

In the page itself, I have introduced an inputText and a slightly differently configured commandLink:

image

The Java Code in the MDSCoordinator class is as follows:
image

The last lines write the message for the user:
image

Resources

The class MDSCoordinator.

IDMClub Wiki on accessing the MDS API: http://idmclub.wikidot.com/metadata-store

Andreas Koop – ADF: MDS power user layer and “How to control MDS customizations at runtime” – http://multikoop.blogspot.com/2012/01/adf-mds-power-user-layer-and-to-control.html

About Post Author

Lucas Jellema

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director and Oracle Developer Champion. Solution architect and developer on diverse areas including SQL, JavaScript, Kubernetes & Docker, Machine Learning, Java, SOA and microservices, events in various shapes and forms and many other things. Author of the Oracle Press book Oracle SOA Suite 12c Handbook. Frequent presenter on user groups and community events and conferences such as JavaOne, Oracle Code, CodeOne, NLJUG JFall and Oracle OpenWorld.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

One thought on “ADF: Cloning personalizations between users – read and write MDS Customization documents

Comments are closed.

Next Post

OOW 2012 - It will be a great Conference...

For me it all started out very stressful. I overslept yesterday, or the day before, and noticed that it already was 08.25 AM. My flight would leave at 09.50, so the rush to the airport was very painful. Seriously hope I won’t have too many speeding tickets in my attempt […]
%d bloggers like this: