How can I recover the modules (phone, email, company, etc.) using UserProfile?

Hello.

I am using Ldap.

How can I recover the modules (phone, email, company, etc.) using UserProfile?

I used this code () .getSecurityContext () .getUserProfile () ADFContext.getCurrent with methods to get, but it will always return null.

Kingsley_R , rohanwalia

Guys I found how do!

Copy the following code


IdentityStore idmStore = null;

SecurityContext secContext is ADFContext.getCurrent () .getSecurityContext ();.

try {}

JpsContextFactory ctxf = JpsContextFactory.getContextFactory ();

JpsContext ctx = ctxf.getContext ();

LdapIdentityStore ldapStore = (LdapIdentityStore) ctx.getServiceInstance (IdentityStoreService.class);

idmStore = ldapStore.getIdmStore ();

SimpleSearchFilter userNameSearchFilter = idmStore.getSimpleSearchFilter ("Username", 1, null);

String userNamePattern = ' * ';

System.out.println (replaceWildCardChar (userNamePattern, userNameSearchFilter.getWildCardChar ()));

userNameSearchFilter.setValue (replaceWildCardChar (userNamePattern,

(userNameSearchFilter.getWildCardChar ()));

SearchParameters sp = new SearchParameters (userNameSearchFilter, SearchParameters.SEARCH_USERS_ONLY);

SearchResponse sr = idmStore.searchUsers (sp);

If (sr! = null) {}

User user = null;

While (sr.hasNext ()) {}

user = (User) sr.next ();

If (user.getName () .equals (secCntx.getUserName ())) {}

System.out.Print ("User is" + user.getUserProfile () .getUserName () + "user undertaking is" +)

(String) user.getUserProfile () .getPropertyVal ('company') + "user Department is" + (String) user.getUserProfile () .getPropertyVal ("department")); "."

}

}

}

} catch (JpsException ex) {}

System.out.println ("Impossible to establish the context of jps!" + ex.getMessage ());

} catch (IMException iex) {}

System.out.println ("Impossible to establish the context of jps!" + iex.getMessage ());

Logger.getLogger (Grnt_page.class.getName ()) .log (Level.SEVERE, null, iex);

}

Tags: Java

Similar Questions

  • How can I recover the modules and their data from a failed HARD drive (the lost BONE areas, but data files are readable)?

    The HARD drive that was my OS (Windows XP Pro SP3) failed and lost quite a few areas which are essential for the operating system running. Other data is still readable. A got another HARD drive and installed Windows XP SP2, Firefox and other programs. I was able to retrieve the bookmarks, security certificates, and other profile information using the information found in bandages.

    None of them addressed how do to recover the modules or their data. Specifically, there are several large, elegant scripts that took months to develop and customize.

    Articles related to migration and other do not work for me because they require the old copy of FF is functional, that is not because the OS on this HARD drive is damaged. Is it possible to recover these data, similar (or not) about how I could get the other profile info?

    Have you copied the entire folder C:\Documents and Settings\username \Application Data\Mozilla\Firefox\ on the old drive?
    If this is not the case, can you?
    If so, make a copy and save this folder just in case.

    If so, you could replace this folder on the new facility by \Profiles\ [with your profiles inside] folder and the profiles.ini file [delete all other files / folders that may also be in the folder "Firefox"] -and then replace with the same folder named from the old failed drive. Note that you will lose what you already have with the new installation / profile!
    Your profile folder contains all your personal data and customizations, including looking for plugins, themes, extensions and their data / customizations - but no plugins.
    But if the user logon name is different on the new facility that the former, any extension that uses an absolute path to the file in its prefs will be problems. Easily rectified, by changing the path to the file in the file prefs, js - keep the brake line formatting intact. The extensions created after the era of Firefox 2.0 or 3.0, due to changes in the 'rules' for creating extensions usually are not a problem, but some real old extensions that need only "minor" since that time can still use absolute paths - even though I have not seen myself since Firefox Firefox 3.6 or 4.0.

    View instead of 'Modules' I mentioned the 4 types of 'Modules' separately - Plugins are seen as 'Add-ons', but they are not installed in the profile [except those mislabelled as a "plugin", when they are installed via an XPI file], but rather in the operating system where Firefox 'find' through the registry.

    Note: Migration articles can tell you do not re - use the prefs.js file, due to an issue that I feel is easily fixed with a little inspection and editing. I think you can manage that my perception is that you have a small shovel in your tool box, if you encounter a problem you are able to do a little digging and fixing problems with the paths to files - once you have been warned.

    Overall, if you go Firefox 35 35 or even Firefox 34 to 35, I don't think you will run in all the problems that you can not handle [that I cross my fingers and "hope" that I'm not on what it is obvious].

    With regard to the recovery of the 'data' for individual extensions - there are many ways that extension developers used to store their data and pref. The original way should save in prefs.js or their own file RDF in the profile folder. While Firefox has been developed more, developers started using their own files in the profile folder. And because Mozilla has started using sqlite database files in Firefox 3.0, Mozilla extended their own use of sqlite, as have extension developers.
    Elegant uses the file stylish.sqlite to store 'styles', but something in the back of my mine tells me that 'the index' maybe not in this file with the data. But then again, I can be confusing myself a question I had with GreaseMonkey awhile back where I copied the gm_scripts folder in a new profile and with already installed GreaseMonkey but with no script. These GM scripts worked, but I could not see them or modify them - they do not appear in the user GM extension interface window in Firefox.

  • BlackBerry smartphones, how can I recover the password reset email to Blackberry ID

    I am currently locked for access applications to a blackberry ID. I used the links to reset the password and got a message to say that an email was sent to my e-mail address of blackberry but for safety it will not be sent to my phone. I don't know how I can retrieve this e-mail message. I just want to reset my password ID, all the solutions?

    Yes, is not good, because those email accounts are not available on the smart phone BlackBerry itself; in other words, you cannot connect to an account webmail from a PC and a view.

    It must be remembered the BlackBerryID password or secret answer to the question. Without either, you're stuck.
    Your choice is:
    -Use a different e-mail account to create a new BlackBerryID (with which you will lose access to all apps purchased using the 'forgotten' first BlackBerryID, or)
    -Find the initial email you have been sent to confirm the initial BlackBerryID and there are a link to click to cancel and delete the account. Click on this, delete the account and then you can use that same e-mail to create a new account.
    Good luck.

  • How can I recover the Basic tab when in the develop module

    How can I recover the Basic tab when in the develop module

    Right-click on one of the other tabs and make sure that there is a checkmark in basic. This is a common problem that is mentioned here often.

  • How can I change the amount of emails display in ios9?

    How can I change the amount of emails display in ios9?

    jamesfromsherman wrote:

    How can I change the amount of emails display in ios9?

    The last iOS is no longer necessary for the former limits to be implemented since older versions of iOS where you would choose Show only recent 500, etc. You are now free to see your full Inbox. If you are using a POP account and see a bunch of messages that display as unread when you already read, you can access this mailbox on your iPhone, tap on edit and then Mark All > mark as read. Might also trash them if you wish.

  • Tecra M10 - How can I recover the XP PRO key product?

    My TECRA died with the BSoD and it has been well used for the label of the product key as well as the brand and model, and labels it S/N are all well carried away and not readable... I have the product details and s/n of the Bill, BUT how can I get back the XP PRO key product?

    >.... BUT how can I recover the XP PRO key product?
    What do you do exactly?
    You want to reinstall Windows XP Home on your Tecra?
    You want to use the original Toshiba recovery or clean operating system installation disc?

  • How can I recover the previous games loaded (Freecell, Spider, Pinball, etc.) on Win XP/SP3 in the start menu

    How can I recover the previous games loaded (Freecell, Spider, Pinball, etc.) on Win XP/SP3 in the games from the start menu. Somehow they must be deleted. If I go to the disc cleaner and click on games to again install it says for me to show the way to C:\i386 and something zclientm. I hope you understand my explanation.

    Hello

    I'm happy to help.

    See you soon!

  • How can I move the outlook express emails from an XP PC to an another XP PC that has the same e-mail address without overwriting existing messages on this second PC?

    How can I move the outlook express emails from an XP PC to an another XP PC that has the same e-mail address without overwriting existing messages on this second PC?

    I need to group together all messages from e-mail in a PC and to retire the first PC.

    This could be problematic. I guess or OE is over? This would make it easy.
     
    One thing you could do requires some manual work, but much less removal of dupes. For example, the Inbox. In the machine, you are going to scrap, create a new folder and move all messages in your Inbox to it. After you import on the other machine, you can drag the messages you need this folder in the Inbox, and then remove the user created the folder.
     
    And then there are tools to remove the dupes. This one for example.
     

     
     
  • Accidentally erased administrator account. How can I recover the account?

    Administrator account

    I accidentally delete my administrator account. How can I recover the account?

    Hi desmondlau,

    ·         Did you completely remove the account?

    ·         Do you have any other user account on the computer?

    ·         If so, is that a Director or a limited account?

    Try the following.

    Step 1: Try to start in safe mode. Check if you can login as administrator.

    Step 2: If you are able to connect, and then create a new administrator account and other changes. Restart the computer in normal mode to see if you can connect.

    Microsoft Windows XP - overview of user accounts

    Microsoft Windows XP - Types of user accounts

  • How can I recover the missing titles C:\Windows\system32?

    How can I recover the missing documents?

    My problem is with silverlught. I get the error 0x64C code when you try to install the updates to silverlight.

  • How can I recover the files and programs before a system restore? my document folders are all empty and my programs will not open!

    How can I recover the files and programs before a system restore?  my document folders are all empty and my programs will not open!

    I know they are there and hidden somewhere, but this restoration took my settings of the computer to 2004! We lost all our data, our software that we use to operate our company at home, our quickbooks that has all our financial data, family photos, videos, Outlook will work not so no e-mail, all turned in time and 6 years ' worth of documents have disappeared.

    What happeneded was that I was trying to upgrade to quickbooks software when I got an error, I cancelled out of the facility, then restarted and that's when I got an error hal.dll something? I thought about a system restore would allow me to go back in time to just before when the error occurred, but he basically took my computer back to factory settings, so all the programs that I installed and paid hundreds of dollars for the past six years has disappeared, Microsoft Office and very expensive construction estimating software that we wil have to pay once AGAIN for If I can't get this program working properly.

    I am a fool! I can't believe what's happening.

    Someone at - it instructions on how I can retrieve either the programs and data that I need specifically or how to go and seek shade from the files I read online on and restore my computer for about 12 hours ago?

    Thank you all!

    Sally in Georgia

    Looks like you did a system rather than a system restore recovery.  If you have inserted a disc supplied with your machine and booted from it, you probably erased the disc and installed the original operating system provided with your computer.  Usually, a step in this recovery is to do a full format or quick of your drive.  If you did a full format, your data is permanently lost.  With a quick format, your data may still be there, somewhere but inaccessible by normal means.  Applications must generally be installed, in order to recover the files probably will not help unless you have the original installation media.  Your other data files (images, videos, financial data) may be salvageable, but at this point, it would be advisable to take your computer or your disk to a business/professional who is experienced with data disc recovery.  It will be cheap and there is no guarantee.

    Impatient, remember investigate you a backup strategy for your computer and critical data.  Hard drives can go wrong with little or no warning.

    HTH,
    JW

  • How can I recover the Vista operating system?

    I have a tablet that is using Windows Vista. Hard to drive tablets erased clean with Vista. How can I recover the Vista operating system? I hope that I don't need to go out and buy a new OS, because the Tablet is worth only a few dollars and can be lower than the price of a new operating system.

    Hello

    Contact the manufacturer of the tablet on the way to reinstall the operating system.

    If it was a desktop computer or a laptop we could help you more.

    See you soon.

  • I accidentally deleted a volume in Windows 7! How can I recover the data?

    I accidentally deleted a volume in Windows 7! How can I recover the data?

    I created a retractable partion on "D" Drive and later to try to remove it and accidentally I clicked on "D" drive instead of the new partition! "."
    Any ideas to recover data?
    Thank you
    Amal

    Hello

    You can try this free program; no warranty if.

    http://www.Piriform.com/Recuva

    See you soon.

  • How can I recover the files from my USB Flash drive before it will be deleted?

    My USB Flash drive has files on it from another computer and only the files that have been stored on the flash drive which cannot be recreated. How can I recover the files? The Flash Player is telling me that it must be reformatted and the files will be deleted. It's two computers I use. Help, please

    Hello

    Looks like it might be a problem with the flash player.

    Step 1: Try to use the USB stick on another computer or a different USB port.

  • How can I recover the files from the windows.old folder

    original title: had for Vista downloaded again and lost all my files, which are not on "windows.old".  How can I recover the files to the appropriate programs

    be found Windows Mail, including contacts, etc., but only can bring them into the program.

    Hello

    «who are not on «windows.old "»

    you mean now about windows.old?

    If Yes, read this:

    How to restore your personal files after you perform a custom Windows Vista or Windows 7 installation

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

Maybe you are looking for

  • Assign different commands to keyboard shortcuts in collage

    I would like to use keyboard shortcuts in different expressions paste commonly used in documents. Thus, for example, "command + x + y" would paste expression 1... and 'Ctrl + x + y' would paste the sentence 2. Is there a way to do it, or there at - t

  • Problem mit Kennfelddarstellung/Interpolation

    Hallo, Combi DIADEM-Neuling (Version 2012) bin und habe zwei problem: Dazu: Die representation meines efficiency-Kennfeldes mit dem Diadem Viewer values ranges erzeugt, die're enter kann nicht (rote Beriech über 100% Max-Wert bei obwohl ~ 92%), see 1

  • Lenovo Y400 issues, include freezing at startup, not closing, etc.

    Hi, my name is Julian and I would appreciate much all the advice of someone who could help me with my computer problem. I had this Y400 about 3 to 4 months. I had a lot of problems with it recently. First whenever I start it after about a minute, it

  • The list of all the steps in a sequence file

    Hi guys,. I'm new on the forum of NI Teststand, so this my first topic here. The situation is the following: Currently I develop a LV operator interface and I need to have a list of all the test step in a sequence file. I am able to list all the step

  • Laptop HP 15-d002tx - Win 8.1 "unknown device"?

    After you install all the drivers available for my laptop HP 15-d002tx, I still have an unknown device on the Device Manager list. Someone can help me find what it is and where can I get the driver for it? Hardware ID ACPI\VEN_HPQ & DEV_6001 ACPI\HPQ