Change the shared user using Java API Service

Hi Experts,

I have successfully run the example of classes Java from here: http://docs.oracle.com/cd/E17236_01/epm.1112/epm_security_api/frameset.htm?ch01s03.html
And I need to change the code of UserFunctions.Java.

UserFunctions.Java, I can create, edit, and delete a user.
But in this sample program, when I want to edit a user, I should create a new user first.

My requirement is I want to change the existing user passing the parameter when you run the program.
So, when I want to launch the program, it should be like this:
Java UserFunctions 'method' 'username', 'password', 'email', 'first name', 'last name '.

FYI, I can create a user in passing the parameter as I mentioned above.
But to edit a user, I still can't do it.

Please find my codes below:

public CSSNativeUserIF createUser (String username, String desc, String firstname, String lastname, String email, String pass) throws CSSException
{
The user CSSNativeUserIF = null;
HashMap context = new HashMap();
user = cssDMAPI.getNativeUserInstance (context, main);
user.setLoginName (username);
user.setDescription (desc);
user.setFirstName (firstname);
user.setLastName (lastname);
user.setEmailAddress (email);
user.setPassword (pass);
cssDMAPI.addNativeUser (main user, context);

return the user;
}

' public void modifyUser (String username, String desc, String firstname, String lastname, String email, String pass) throws CSSException
{
The user CSSNativeUserIF = null;
HashMap context = new HashMap();

System.out.println ("Edit description user...");
user = cssDMAPI.getNativeUserInstance (context, main);
user.setLoginName (username);
user.setDescription (desc);
user.setFirstName (firstname);
user.setLastName (lastname);
user.setEmailAddress (email);
user.setPassword (pass);
cssDMAPI.updateNativeUser (main user, context);

}

-------

in the Sub main():

If (method.equals ("create"))
{
/ * Create a native user * /.
cu.printMsg (System.out, "- creating a user-" "");
user = cu.createUser (username, desc, firstname, lastname, email, pass);
cu.dumpUsers (System.out, "the user is created successfully," new CSSNativeUserIF [] {user});
}
ElseIf (method.equals ("update"))
{
/ * Change native user * /.
cu.printMsg (System.out, "- update a user-");
cu.modifyUser (user name, desc, firstname, lastname, email, pass);
cu.dumpUsers (System.out, "the user is updated", new CSSNativeUserIF [] {user});
}

Could you please help me with this?

Thank you and best regards,

Christophe

Try this

CSSUserIF [] usrs to = cssAPI.getUsers (context, principal, sLoginName);

If (usrs.length > 0) {}
CSSNativeUserIF natUser1 = (CSSNativeUserIF) usrs to [0];
natUser1.setLoginName (sLoginName);
natUser1.setFirstName (sFirstName);
natUser1.setLastName (sLastName);
natUser1.setEmailAddress (sEmail);
natUser1.setDescription (sDescription);
natUser1.setPassword (sPassword);

cssDMAPI.updateNativeUser (context, principal, natUser1);
}

Tags: Business Intelligence

Similar Questions

  • Search for users using java API IOM 11 with the value of null field

    Hello

    I find user using java api findUsers (HashMap hash), but I need get all users where a custom field is equal to null

    Example:

    HashMap userHash = new HashMap();
    userHash.put ("USR_UDF_CUSTOM", "NULL");
    userData tcResultSet = userOps.findUsers (userHash);

    Someone help me?

    Do not use this search functionality. The user that:

    UserManager usermgr = Platform.getService (UserManager.class);
    Criteria of SearchCriteria = new SearchCriteria ("Custom Label", null, SearchCriteria.Operator.EQUAL); Suppose USR_UDF_CUSTOM label is personalized
    List of users of = usermgr.search (null, null, criteria);
    for (user: user) {}
    perform the action here
    }

    -Kevin

  • Set the member formula using java api

    Hello

    I'm trying to define the formula by member using the java code and here is the code snippet I use. But some how, the formula is somewhere in cache, but not updated in the server of the ESS. I have appropriate privileges to update the data in Essbase. Any thoughts would be helpful. Thank you.

    try {}

    IEssCube = formulaCube

    olapSvr.getApplication (appName) .getCube (cube);

    IEssCubeOutline outline = formulaCube.openOutline (false, false, true);

    If (contour! = null) {}

    IEssMember requiredMember = outline.findMember (member);

    If (requiredMember! = null) {}

    System.out.println ("formula:" + requiredMember.getFormula ());

    requiredMember.setFormula ("[RL. LTV. CSE] + [RL. LTV. OPEX.0071]");

    System.out.println ("value according to formula:" + requiredMember.getFormula ());

    requiredMember.refreshPropertyValues ();

    requiredMember.updatePropertyValues ();

    System.out.println ("after updatevalues:" + requiredMember.getFormula ());

    }

    Outline.Save ();

    Outline.Verify ();

    outline.updatePropertyValues ();

    }

    It works if you restructure prior to closing.

    Outline.Save ();

    outline.restructureCube (IEssCube.EEssRestructureOption.KEEP_ALL_DATA);

    Outline.Close ();

    In theory, it should only do a restructuring outline only.

    See you soon

    John

  • custom at the request of task-java api

    Hello
    I use IOM view OID APIs.

    I changed the definition of Attr.Lookup.Recon.Map as: user id: employeeNumber (instead of user id: cn, where employeeNumber is an optional attribute of OID) now the employeeNumber is reconciled as UserID IOM... Into account other words for cn = xyz and employeeNumber = 199 OID is related to the UserID IOM = 199.

    I have a requirement as follows:
    I need to write a custom scheduled task that takes two parameters IOM user login (mean 199) and respective OID cn = xyz, and sets the State of the user as revoked OID resources.
    Suppose that for an IOM account, I have two instances of user OID with cn different values. I'll switch IOM user login and a value of cn to present schedule... and for the given connection of IOM user task... It will compare cn given with list of ad for this connection of IOM user. How can I get this list of ad (OID accounts) for a given account of IOM using java API

    See this, it's purely java:

    http://www.Java-tips.org/Java-SE-tips/Java.IO/how-to-read-file-in-Java.html

    http://www.roseindia.NET/Java/beginners/Java-read-file-line-by-line.shtml

  • Not able to change the password by using the query. Select APPS.fnd_web_sec

    Not able to change the password by using the query.
    Select APPS.fnd_web_sec.change_password ('username', 'password') 'RES' double;

    Can someone tell why and what privileges and subsidies have flexibility to the user non-apps while it can change the password using fnd_web_sec.change_password.



    Concerning

    the information above does not solve my problem, I get the message

    Because you do not have permission on all objects that are referenced by the API (see below).

    Select FND_WEB_SEC. CHANGE_PASSWORD ('MARSHAD', 'mohammad @123') "RES" of the double

    *

    ERROR on line 1:

    ORA-00942: table or view does not exist

    ORA-06512: at the 'APPS '. FND_CORE_LOG', line 25

    ORA-06512: at the 'APPS '. FND_CORE_LOG', line 432

    ORA-06512: at the 'APPS '. FND_PROFILE', line 110

    ORA-06512: at the 'APPS '. FND_SSO_MANAGER", line 227

    ORA-06512: at the 'APPS '. FND_WEB_SEC', line 1425

    ORA-06512: at line 1...

    can you please list me what are the grants and other Jules Destrooper I should give to a user so that he can change password.

    I don't have the list of objects and you should get yourself by consulting the site code and eTRM API.

    by changing the DDT in the user non-apps after the grant, will, it may be able to change the password.please tell this syntax is correct or not.
    Select applications. FND_WEB_SEC. CHANGE_PASSWORD ('user', 'pwd') "RES" of the double

    What is the point of using 'FND_WEB_SEC. CHANGE_PASSWORD' and not FNDCPASS or FND_USER_PKG API?

    Thank you
    Hussein

  • In XP, cannot change the way users log on and outside, getting the error "a recently installed program has disabled the Welcome screen and the user fast switching.

    The switch on my fast computer of user function has been disabled on my computer. When I try to use this function. I get the following message.

    A recently installed program has disabled the Welcome screen and the fast user switching. To restore these features, you must uninstall the program

    . The following file can help you identify the program that made the change. GT Gina.dll

    * original title - I have a windows xp. Under user accounts, choose a task. Under change the way users log on and outside.  I get a message that the function of the Welcome screen has been blocked *.

    Hello

    You can try the steps outlined in the article below and check out them.

    The logon screen "Welcome to Windows" does not appear when you start the computer
    http://support.Microsoft.com/kb/817142

  • = > Windows XP: change the way users log on or off < =.

    Using Windows XP.  I'm trying to "changes the way users connect or offshore."  When I click on this option, I get the error message * a recently installed program has disabled the Welcome screen and the fast user switching.  To restore these features, you must uninstall the program.  The following file name can help you identify the program that made the change: SGGINA. DLL * the computer belonged to my brother... can someone help me please?  I just want to be able to have 2 separate user accounts.  Thank you.  Oh yes, when I turn on the computer, I get the newspaper protected password on screen and am not able to view both of my user accounts!

    Using Windows XP.  I'm trying to "changes the way users connect or offshore."  When I click on this option, I get the error message * a recently installed program has disabled the Welcome screen and the fast user switching.  To restore these features, you must uninstall the program.  The following file name can help you identify the program that made the change: SGGINA. DLL * the computer belonged to my brother... can someone help me please?  I just want to be able to have 2 separate user accounts.  Thank you.  Oh yes, when I turn on the computer, I get the newspaper protected password on screen and am not able to view both of my user accounts!

    SGGINA. DLL is Sophos SafeGuard Disk Encryption.  You have to be careful to play with disk encryption, or you may end up not being able to access your drive at all.

    See the following article from Sophos to disable the SGGINA, but I had read up on Sophos SafeGuard Disk Encryption first to see if it has been set to encrypt anything and if so how to make sure you have the decryption key (or ask your brother):http://www.sophos.com/support/knowledgebase/article/109231.html

  • The difference between the ADR green vs JAVA API usage? It's confusing

    Can u clarify the difference between the ADR green vs JAVA API usage? It's confusing. If I want to create a custom algorithm, what should I use. Is it Java APIs or green Marl

    Thanks in advance,

    Akhil

    Hi Akhil,

    Thank you for your interest in the PGX! If you want to write a custom algorithm, you should do it in green-Marl. Marno-Green is a custom DSL specially designed for writing of graph algorithms. You can then use the Java API of PGX to compile and run your algorithm. Find a detailed tutorial: http://docs.oracle.com/cd/E56133_01/tutorials/compile.html

    PGX is delivered with a set of built-in algorithms, each available as a convenient Java method. Internally, all algorithms are written in green-Marl as well. The signature of the Java method aligns with the signature of the underlying green-ADR procedure. Find information about the algorithms here: http://docs.oracle.com/cd/E56133_01/tutorials/builtins.html

  • Creation of posts of Siebel using JAVA API in IOM

    Hi Experts,

    I need to create positions of Siebel using JAVA API.

    I try to incorporate OIM 11 g-Siebel connector, but this connector is not able to create new positions of siebel.

    Please tell me where to find the info/examples of use of the api or how to best integrate?

    Thanks in advance

    Kiran

    This is useful.

    I was able to create a post of siebel using the model given here,

    Creating New position in Siebel using Siebel DataBean

  • After that I changed the Duplex parameter on NIC's Service console, I am not able to connect the ESX host

    Hi all

    Please help solve my problem.

    After that I changed the Duplex parameter on NIC's Service console, I am unable to connect the ESX host. How can I reset the 100 MB NETWORK card duplex. Can someone help me please.

    Concerning

    Vijay

    Hello

    As the bulb you have two problems that are not related.

    (1) duplex setting, your switch and NIC must match. If one is assigned to auto-negotiation, then the other must be set to auto-negotiation. Personally, I tend to let auto-negotiation unless there is an absolute reason to spend. If you then turn on the both sides of the interface, the switch port and esxcfg-NICS allows you to change the duplex, etc.

    (2) passwords for root are not related to the network unless you have also run esxcfg-auth authentication remote.  The only time I saw what you have here is when the system is configured to try to authenticate remote and not locally.

    The two problems are fixable by booting into single-user mode, set the duplex and reset the password.

    Best regards
    Edward L. Haletky
    VMware communities user moderator
    ====
    Author of the book ' VMWare ESX Server in the enterprise: planning and securing virtualization servers, Copyright 2008 Pearson Education.
    Blue gears and SearchVMware Pro items - top of page links of security virtualization - Security Virtualization Round Table Podcast

  • You can change the font size using the form in the preview (not with the text box). Having also arrow drawing trouble in preview.

    You can change the font size using the form in the preview (not with the text box). Having also arrow drawing trouble in preview.

    What problems are you having with the arrow? You go to Tools-> annotate-> arrow and an arrow appears. Then you can drag around the head and tail to make it to the desired location.

  • I want to change the password I use to access MS Answers. How to do his?

    I want to change the password I use to access MS Answers. How to do his?

    Hello

    1. How are you to access MS Answers site? Is it through Windows Live ID, Hotmail?

    2. what version of Windows operating system is installed on the computer?

    You can check the following items and check if it helps to solve the problem.

    How can I change my password?: http://Windows.Microsoft.com/en-us/Messenger/change-password-FAQ

    Reset your password: https://account.live.com/ResetPassword.aspx

  • Cannot change the language by using the keyboard shortcut

    Original title: I've added a new language on the language bar, but I can't change the language using my keyboard, I can do only by using the mouse. Any idea?

    I've added a new language on the language bar, but I can't change the language using my keyboard 'shift alt', I can only do this by using the mouse. Any idea?

    Hello

    1. what happens when you try to change the language by using the keyboard?

    2. which version of the Windows operating system is installed? Is - this Home Premium, professional or ultimate edition?

    3. have you activated switch between different languages using the language bar?

    To please review the article:

    The language bar (overview)

    http://Windows.Microsoft.com/en-us/Windows7/the-language-bar-overview

    Hotkey to switch between keyboard layouts, press ALT + SHIFT.

    See also:

    How to change your keyboard type

    http://support.Microsoft.com/kb/258824

    Keyboard shortcuts

    http://Windows.Microsoft.com/en-us/Windows7/keyboard-shortcuts

  • Address book - blackBerry Smartphones change the field "synchronize using.

    Hello world

    I recently changed my primary Gmail account on my blackberry (from [email protected] to [email protected]).

    I have a problem with sync'ing with my address book.

    All of my old contacts are synchronized via [email protected]

    And now, I would have them Sync with [email protected]

    In every Contact form, I discovered there is a synchronization field to aid which is filled with the google account. Unfortunately, you cannot change this field.

    Y at - it an easy and fast way to mass - change (the field sync using) all my old contacts sync with my new gmail account?

    I tried with importers and exporters of gmail to gmail, but I lose my contacts photos. I cannot accept this solution because I have more than 500 contacts and 90% of them have an image.

    So I'm asking if someone has an idea to solve this problem.

    Thanks in advance

    Thanks for your reply.

    But I decided I'm going to do it by hand and transfer between gmail via vcf file transfer account.

    It's a real pain in the * because I know that have to redo all the links between linkedin/facebook and my address book. And also photos of contacts. It would have been very happy to be able to mass change the field "to sync using"

    There is therefore no real solution to solve my problem except to waste a lot of time by hand.

    But I'll post another topic for a question than a problem with the synchronization of contacts and photos

  • Create the new virtual machine using Java API vCloud

    Hi guys,.

    I am trying to create the new virtual machine in TIME, but I've stuck here. The API I'm using is vcloud-java-sdk - 1.0.jar.

    Could you please show me a code snippet how to do this?

    For now I do it like this:

    RecomposeVAppParamsType recomposeVAppParamsType = new RecomposeVAppParamsType();

    List the items < CompositionItemParamType > = recomposeVAppParamsType.getItem ();
    ReferenceType vappTemplateVMRef = new ReferenceType();

    // ??? seems that new reference to the new virtual machine should be here. But how to create this VM
    CompositionItemParamType compositionItemParamType = new CompositionItemParamType();
    compositionItemParamType.setSource (vappTemplateVMRef);

    Items.Add (compositionItemParamType);
    ReferenceType vAppRef is Vdc.getVdcByReference (vcloudClient, vdcRef) .getVappRefByName ("vApp_Websrv");.

    Vapp.getVappByReference (vcloudClient, vAppRef) .recomposeVapp (recomposeVAppParamsType);

    One day before I played with Web Services SDK, which is much easier to understand. I was able to create the vApp and VMs in vSphere. Is it possible to import machines virtual vSphere to vCloud? Should what API I use for this?

    Thank you

    Hello

    You cannot add a new empty virtual machine in a paralytic.

    Instead, you can add a virtual machine from an existing vapp, vapptemplate.

    To import a vsphere vm to vcloud.

    Import vsphere vm as VAPP in vcloud. VMWVimserver-> importVmAsVApp()

    The importation of vsphere vm, as vAppTemplate, in vcloud. VMWVimserver-> importVmAsVAppTemplate()

    See also the example of ImportVmAsvAppTemplate.java, which is part of the vcloudjavasdk group.

    Kind regards

    Rajesh Kamal.

Maybe you are looking for

  • Can not get the music in the music player of Touchpad

    I'm having a problem getting my music library to my windows xp pc pro in the default music player. I tried syncing with HP play and eject the device, tried to sync with Media Player 11, tried to copy the files directly on the touchpad in USB mode. I

  • Charger only up to 80%

    I have a samsung laptop. Recently one of my friends borrowed. She said she changed her settings, but do not remember where or what. Now my laptop only charges that up to 80% and then stops. How or where to undo what she did?

  • bthserv missing service

    bthserv service is missing. I have the bthserv.dll of archive in the system32 folder... I try to install the service through the cmd with this line: regsvr32 bthserv.dll, but I get this error msg: "" bthserv.dll"module was loaded, but the DllRegister

  • top of page desktop icons do not work, but startup icons work Windows Vista

    my desktop icons do not work, but if I go to the start menu they will activate for their

  • A simple question on request authorization prompts

    It's true that to get rid of the authorization request guests must be involved with the intervention of the user? He can't get around by average program or signature file COD? Currently I have a midlet with registry application to push, when the midl