Example code to check if a particular resource is implemented in OIM11g

Hello

I would check whether or not resources AD is put into service for a given user. If so, I would like to add a group to it.

Can you please provide me a sample code for this scenario. I use oim 11g.

Hello

Here is a code example:

tcResultSet userSet = userAPI.findUsers (userSearchMap);
If (userSet.getRowCount)<= 0)="">

System.out.println ("found user in IOM:-" + userID);
continue;
}

userSet.goToRow (0);
Take long = userSet.getLongValue ("Users.Key");

tcResultSet userObjSet = userAPI.getObjects (take);

for (int i = 0; i)< userobjset.getrowcount();="" i++)="">
userObjSet.goToRow (i);

If (roName.equalsIgnoreCase (userObjSet
{.getStringValue ("Objects.Name")))}

objStatus = userObjSet
.getStringValue ("Objects.Object Status.Status");
oiu_key long = userObjSet
.getLongValue ("object Instance.Key");
If (!) ("Provisioned".equalsIgnoreCase (objStatus))
|| "Disabled".equalsIgnoreCase (objStatus) "| Active. "
{.equalsIgnoreCase (objStatus)))}

continue;
}
}
}

Concerning
user12841694

Tags: Fusion Middleware

Similar Questions

  • Example code to find if a resource is put in service or not in OIM11g

    Gurus,

    I'm new to IOM.

    I would check whether or not resources AD is put into service for a given user. If provided, I would like to add that user to a group.
    Can you please provide me a sample code for this scenario. I use oim 11g.

    Here is the sample code snippet.

    tcUserOperationsIntf usrIntf = (tcUserOperationsIntf.class) Platform.getService;
    tcResultSet provisionedObjects = usrIntf.getObjects (Long.valueOf (sourceUserKey));
    "String objectKey =" ", objectStatus =" ", processInstance =" "', objectName =" ";"
    List of the entityAttrList;
    RequestBeneficiaryEntity entity = null;
    entityAttrList = new ArrayList ();
    entity = new RequestBeneficiaryEntity();
    for (int i = 0; i)< provisionedobjects.getrowcount();="">
    {
    entityAttrList = null;
    provisionedObjects.goToRow (i);

    objectStatus = provisionedObjects.getStringValue ("Objects.Object Status.Status");
    objectName = provisionedObjects.getStringValue ("Objects.Name");

    System.out.println ("processing:" + ObjectName);

    If (objectName.equalsIgnoreCase ("AD Account") & objectStatus.equalsIgnoreCase ("Provisioned"))
    System.out.println ("provisioned");
    }

    And to give a role to a user

    String take = "101".
    String roleKey = "10".

    RoleManager roleMgr = oimClient.getService (RoleManager.class);
    UserKeys value = new HashSet();
    userKeys.add (take);
    Result = roleMgr.grantRole (roleKey, userKeys) RoleManagerResult;
    System.out.println("Status:"+result.getStatus());)

  • Example code to create a new role as well as its class

    Friends,

    I'm looking for the example code snippet create a role as well as its class.

    Can you please help.

    Try this.

    private String getCategoryKey (String CategoryName) {}
    CategoryManager oimClient.getService (RoleCategoryManager.class) = RoleCategoryManager;
    RoleCategory str = null;
    try {}
    = categoryManager.getDetails Str (null, "name of the role category", CategoryName),
    } catch (SearchKeyNotUniqueException e) {}
    e.printStackTrace ();
    } catch (NoSuchRoleCategoryException e) {}
    e.printStackTrace ();
    } catch (RoleCategoryLookupException e) {}
    e.printStackTrace ();
    }
    System.out.println ("CreateCategory.Process ()" + str.getEntityId ());
    String categoryKey = str.getEntityId ();
    CategoryKey return;
    }

    ' Private Sub createRoleWithCategory (String RoleName, String CategoryName) {}
    HashMap mapAttrs = null;
    RoleManager roleManager = oimClient.getService (RoleManager.class);
    Result RoleManagerResult = null;
    Role = null;
    int categoryKey = Integer.parseInt (getCategoryKey (CategoryName));

    mapAttrs = new HashMap ();
    mapAttrs.put (RoleManagerConstants.ROLE_NAME, RoleName);
    mapAttrs.put (RoleManagerConstants.ROLE_CATEGORY_KEY, categoryKey);
    mapAttrs.put (RoleManagerConstants.ROLE_DISPLAY_NAME, "TESTROLE2 test");
    mapAttrs.put (RoleManagerConstants.ROLE_DESCRIPTION, "OIMClient API testMigration");
    role = new Role (mapAttrs);
    try {}
    result = roleManager.create (role);
    } catch (ValidationFailedException e) {}
    e.printStackTrace ();
    } catch (RoleAlreadyExistsException e) {}
    e.printStackTrace ();
    } catch (RoleCreateException e) {}
    e.printStackTrace ();
    }
    System.out.println ("State of creation: '" + result.getStatus () + "'");
    }

  • new code of checking vender for item 12

    How do I get a new code of checking vender for 12 items?    the one I have is for centurytel.net and what I understand that I must use hotmail so I can send pictures

    Any help is greatly appreciated as I get at my wits end.  Wonder why no phone support?  Think I need to use scid in charge of the bottom next time. way to hard for a guy something old 60.

    Standard in Arkansas

    You must apply again in the Organizer.  See my previous post in which I explained briefly how this is done:

    http://forums.Adobe.com/message/6075206#6075206>

    Good luck.

  • OIM 11 g: search query for users with a particular resource

    I have a custom resource that has a search on this query to find a list of users. It works very well. I can find the user by username, email or name and first name.

    Existing query:

    Lookup column name: = usr_login
    Column names: usr_key
    Legends of the column: key, username, Email, name and first name
    The width of the columns: 10, 100, 100, 100
    Search query: select usr_key, usr_login, usr_full_name, usr_email usr

    What I want to do is limit the scope of the search query to find only provisioned users with a specific resource. I want to choose users have the MS Exchange resource assigned to them.

    Can someone help me with the creation of the search query that allows you to search for users who have a particular resource put into service? This table contains a list of the resources allocated to a user?

    Thank you.

    use under request

    SELECT USR. USR_KEY, USR. USR_LOGIN, USR. USR_FIRST_NAME, USR. USR_LAST_NAME, OBJ. OBJ_NAME, OST. THE USR, OUEDRAOGO, OST, OBJ OST_STATUS
    Where USR. USR_KEY = OUEDRAOGO. USR_KEY
    AND OUÉDRAOGO. OST_KEY = OST. OST_KEY
    AND OST. OBJ_KEY = OBJ. OBJ_KEY
    AND OST. OST_STATUS IN ('Provisioned', 'Disabled', 'Enabled')
    AND higher (OBJ. OBJ_NAME) = upper ("name of your resource object")

    update status, name of the resource object, and then select the attribute accordingly

    -nayan

  • How can I check if a certain resource u3d is attached to a 3D (JavaScript) annotation?

    I have a number of u3d files attached to a 3D annotation.

    Can I insert one of them in the scene by:

    var u3dResource = new Resource("pdf://" + <theName> + ".u3d");
    scene.addModel(u3dResource);
    

    If there is no such resource, u3dResource is not undefined or null or... but a resource of type object.

    Using this object translates the message Line: 02: Code: 45 (0x2d): object is not valid but there is no exception to be caught.

    How can I check if the resource exists or if u3dResource is a valid purpose?

    Example:

    U3D = new resource ("pdf://example.u3d");

    If {(u3d.type===undefined)}

    Console.println ("the model is missing or corrupted");

    } else {}

    do your other stuff

    }

    Exceptions are still echo to the console - it's why we call it the console debugger - but unless they are deadly, that it is not serious.

  • IPhone does not accept the code to check for text messages

    II phone does not accept the code verification for the transfer of messages text imac

    Maybe these articles will help:

    Get a verification code and connect with authentication to two factors - Apple Support

    If you don't receive your check or reset email - Apple Support

    If this is not the case, can you explain a little more detail what exactly is your problem?  Or see the 'Contact us' at the bottom of the second article.

  • Help with the NOR-DAQ example Code

    Hello. I just started to work with the NI IBS-6211. It's the first ADC I have ever used, so I'm farily to this news. I have some programming knowledge. After a search in the installation files, I found some examples of C Code that runs in the command prompt. I changed an a bit to get it to do what I want. My question is...

    Now, I have a few problems. I am trying to print a voltage in the command prompt. I hooked up everything and I used labview to make sure that everything works as it should (it does!). When I compile the C program and the run, instead of returning a voltage that is just acquired points and I really have no idea what are these 'points '.

    Here is the main part of the code example:

    DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
                DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",DAQmx_Val_Cfg_Default,1.0,10.0,DAQmx_Val_Volts,NULL));
                DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",10000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,1000));
    
                /*********************************************/
                // DAQmx Start Code
                /*********************************************/
                DAQmxErrChk (DAQmxStartTask(taskHandle));
    
                /*********************************************/
                // DAQmx Read Code
                /*********************************************/
    
                DAQmxErrChk (DAQmxReadAnalogF64(taskHandle,1000,10.0,DAQmx_Val_GroupByChannel,data,1000,&read,NULL));
    
                printf("Acquired %d points\n",read);
    
    Error:
    

    And then he moves right down to the exit clause. Is there documentation anywhere that tells me what DAQ command should I use to print a voltage continuously updated reading? (As a decimal number, such as 5.21V for example).

    Thanks to you all

    John

    John,

    The data acquired by DAQmx are written in the array called "data".  The number of points DAQmx wrote in this table is stored in the variable 'read' which was adopted by reference in.  To print the values returned, you need to loop through the array of 'data' and print each value.  See this help topic for an explanation of DAQmxReadAnalogF64.

    Dan

  • Example code to read an ER3000 continuousy pressure

    I working on a program to control an ER3000 and am tring to use a waveform chart to keep up the pressure. Also, I want to be able to use the current pressure to calculate the rate of Exchange to a new setting of pressure because the ships that we are in charge cannot take quick pressure changes. Does anyone have the sample code specifically for the reading of the pressure on tescoms ER3000.

    Tim,

    Taking a brief look at the llb linked above it seems as if the "fully ER Command.vi, this is what you want. This vi is read/write vi. But it runs only once. Therefore, there is not a surprise that you have a program that reads and writes to the ER3000. To "read the continuous pressure" you want to make your own vi that has the part 'read' of the 'fully ER Command.vi loop within a certain time. If find you examples in labview for VISA it should help you get started.

    Don't forget that if you want to always read the Session VISA will be 'locked '. Which means that you can't write while he performs a continuous reading of the session VISA. You can either programmatically explain this or (if RS232) you can install a sniffer that can interrogate another COM port WITHOUT interfering with your current session of VISA to the device permanently.

    Hope that it becomes at least to get started in the right direction.

    Best regards

    -chazzzmd

  • example code for NI9411

    Hello

    I'm looking for a simple example of code for NI9411 (FPGA code and the host). I searched in the examples that come with LabView but I have not achieved anything.

    Thanks in advance.

    Here is an example that you can use with the NOR-9411.  If you are looking for 9401 in the Finder for example of OR, you can also find other examples that were not written for the 9411 specifically, but you can modify it to work with her.

    Brandon Treece

    Technical sales engineer

    National Instruments

  • Find a feature / example code in VB to activate channnels to support USB-9472

    Hi all, we have bought support USB-9472 to be used in an RF test Set up. 4 of the 8 channels are connected to 4 switches (2 States) that are connected to several Instruments of measurement. I'll try to find a NI DAQmx C API function (or set of functions) to use in a VB application that will allow me to change / activate 1 or 2 (24 V) channels to the NI USB-9472 carrier - which is connected via USB with PC. Can someone help me with this? Thank you, Dan

    Hi Wallace,

    I used the DAQmxWriteDigitalLines function.

    Initially, I tried with the parameter: DAQmx_Val_ChanForAllLines and created the 1 task for all lines. But the param. writeArray (which is of type Byte) accepts - VB - only the values 0 or 1 (it should be between 0 and 255) i.e.:

    Dim ByteArray As Byte

    DAQmxErrChk DAQmxCreateTask("", TaskHandle)

    DAQmxErrChk DAQmxResetBufInputBufSize (TaskHandle)

    DAQmxErrChk DAQmxCreateDOChan(TaskHandle, "Dev1/port0/line0:7", "", DAQmx_Val_ChanForAllLines)

    ByteArray = 2

    DAQmxErrChk DAQmxWriteDigitalLines(TaskHandle, 1, True, 5000, DAQmx_Val_GroupByChannel, ByteArray, 0, 0)

    DAQmxErrChk DAQmxStartTask (TaskHandle)

    StopTask (a subroutine to stop and cancel the task)

    For example, when I assign Val. 2 (which equals '00000010' in binary), I get the following error message:

    DAQmx =-200562 error code

    Error message = side = attempt to write digital data which are not supported.

    If I assigned the values 0 or 1 to ByteArray, then everything is OK, except that I can activate the line 1 (when ByteArray = 1)

    For example, instead of using the param. DAQmx_Val_ChanForAllLines, I used DAQmx_Val_ChanPerLine and I created 4 spots - 1 for each of the 4 lines that I use to connect to the switches.

    In this way, I only need to use 0 (OFF) or 1 (ENABLED) for each line - and it works.

    The issue should be considered to be resolved.

    Thank you and best regards,

  • Error 80072EFE code when checking for updates

    I run Windows 7 Home Premium, I updated April 11, 2010, when everything worked correctly.

    I checked again today and was unable to run Windows Update. I got the following error: 80072EFE.

    My computer works fine apart from this error of update. My internet connection is working properly.

    I realized the remedies proposed by different people in this forum, I googled the code error and verified as required account various suggestions.

    Can anyone help please.

    Hello

    I now doscovered that my computer has been infected by a "rootkit."

    After running 'One care Safety Scanner' once again he has found an infection called "Win32/Alureon.H.

    It was impossible to remove this infection, and I discovered a small specialized program to do this.

    Removing this infection which enabled my Windows Update program work.

    Thank you for your time with this question.

  • Code to check the browser history and name

    Hi all

    Y does it have a code for the control of the number of browser history is available.
    And I want to get the name or the link on the page to the browser history.

    I want to check if the link is available in the browser history, so I extracted this link of the Webworks Smartphone browser history.

    Visit this link to the story about the function.

    http://www.java2s.com/code/JavaScript/window-browser/history.htm

  • Example Code for HelloCameraApp camera

    void HelloCameraApp::onWindowAttached(screen_window_t win,
                                              const QString &group,
                                              const QString &id)
    {
        qDebug() << "onWindowAttached: " << win << ", " << group << ", " << id;
        // set screen properties to mirror if this is the front-facing camera
        int i = (mCameraUnit == CAMERA_UNIT_FRONT);
        screen_set_window_property_iv(win, SCREEN_PROPERTY_MIRROR, &i);
        // put the viewfinder window behind the cascades window
        i = -1;
        screen_set_window_property_iv(win, SCREEN_PROPERTY_ZORDER, &i);
    #ifdef WORKAROUND_FWC
        // seems we still need a workaround in R9 for a potential race due to
        // ForeignWindowControl updating/flushing the window's properties in
        // parallel with the execution of the onWindowAttached() handler.
        mViewfinderWindow->setVisible(false);
        mViewfinderWindow->setVisible(true);
    #endif
    }
    

    Hi, the above code was copied from the sample project HelloCameraApp.

    The example works fine but I have a question for the code in bold above.

    What does it mean by these? Thank you

    // seems we still need a workaround in R9 for a potential race due to
        // ForeignWindowControl updating/flushing the window's properties in
        // parallel with the execution of the onWindowAttached() handler
    

    Hello

    This means that there is a bug in the 10.0.9 current version of the software for devices where there is a race condition between the update thread libscreen in onWindowAttached() properties and the Cascades UI thread that executes code ForeignWindowControl in parallel.  If I do not include this work around, the window can stay invisible while it explicitly visible value by the thread of Cascades.

    I'm still this debugging with the team of Cascades and the graphical team.  For now, workaround in the #ifdef will cause a re-synchronization with the interface user of waterfalls thread.  Once it is fixed, this workaround solution (visibility toggling) won't be necessary.

    An alternative would be to say Cascades do not update THE properties of the window by initializing the window with mViewfinderWindow-> setUpdateProperties (0), but then you will have to respond appropriately to all the layout changes and do a manual update of all associated properties libscreen.

    See you soon,.

    Sean

  • ADF tree example Code

    I work with a WSDL where one of the operations returns a mammoth collections response nested about five levels deep. In addition, the answer requires some massage here and there. That said, I have created a Web Service Proxy and can invoke the operation successfully.

    A test, I created a WSDL data control and tried to drag / drop a tree on the page; However, JDeveloper is unable to build iterators successfully but with elegance. When I try to add rules, JDeveloper outright crashes.

    So here's the question. Does anyone have examples of code to programmatically create a tree of the ADF? My requirement is to display master shapes / detail such that as I drill down to the main shaft, the data of the respective collection are displayed in the detailed form.

    There is a patch for JDeveloper available on MOS that solves the problem of not being able to drag & drop a tree on a page.

    Patch 14022488: ADF TREE TABLE CONTROL BLANK during a DROP ATTEMPT ON JSPX OR JSF PAGE

Maybe you are looking for