Skip to Content
author's profile photo Former Member
Former Member

Copy or Create PCD Role Programmatically

Hello all,

I am trying to figure out if there is a way to either copy an existing PCD role to a new role name or whether it is possible to create a PCD role programmatically and also have it create the corresponding UME role. I have code that creates a UME role, but that does not create the corresponding PCD role which means that I cannot programmatically delta link pages to the role.

Seems as if the PCD API to modify/create roles is deprecated. I am working in 7.3 at the moment.

Any help would be appreciated.

Thanks.

Curtis

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2011 at 01:10 PM

    Nobody has tried doing this or is doing this? Is there a way to remove pages from a role once it is assigned to a user?

    Thanks.

    Curtis

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Curtis,

      Just stumbled over this, as I was looking for this myself. At least I can show you now how to copy an existing role:

      Hashtable envAdm = new Hashtable();envAdm.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);envAdm.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_ADMINISTRATION);envAdm.put(Context.SECURITY_PRINCIPAL, user);IAdminBase roleToCopy = (IAdminBase) admCtx.lookup(fullPath);PcmInteractiveDirOperations op = (PcmInteractiveDirOperations) roleToCopy.getImplementation(IAdminBase.INTERACTIVE_DIR_OPERATION);op.copy(fullTargetPathWithID, null);

      Hope it helps

      Detlev

  • Posted on Jul 29, 2012 at 05:13 AM

    Hi Curtis,

    this is a code for creating an iview but I belive this is the way to create a role as well:


    Picture1.png (138.9 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.