LDAP: Recommended way to add new objectclass to existing entries?

Can anyone help me with the preferred way to add a new objectclass (with attrributes) to existing entries within a directory (via the javax.naming API)?
I have an application that uses a directory of users. Each user has objectclasses "top", "person", and "inetOrgPerson" with usual attributes.
The application needs to change to add a custom objectclass, say "ourAppClass" (and its attributes), to each existing entry within the directory. I have already successfully defined the schema for the objectclass within the directory.
I cannot find examples showing how to add an objectclass to existing entries. Creating brand new entries with custom objectclassess is straightforward.
When using DirContext.modifyAttributes must I define all the objectclasses again, or is there a way to send only the new objectclass and its attributes only?
Attributes attrs = new BasicAttributes();
Attribute classes = new BasicAttribute("objectclass");
classes.add("top");  // do I need these?
classes.add("person"); // do I need these?
classes.add("inetOrgPerson"); // do I need these?
classes.add("ourAppClass"); // in-house class
attrs.put(classes);
attrs.put("ourCustAtribute", "value1"); //
DirContext.modifyAttributes(dn, LdapContext.REPLACE_ATTRIBUTE, attrs);Does someone have a good example to follow?

I think I have answered my own question. I think I need to use a ModificationItem to add an attribute to the objectclass.
final ModificationItem[] classModification= new ModificationItem[1];
classModification[0] = new ModificationItem(DirContext.ADD_ATTRIBUTE,
            new BasicAttribute("objectclass", "ourAppClass"));
dirContext.modifyAttributes(dn, classModification);

Similar Messages

  • Whether there is a simple way to add new Mapping operators on a mapping?

    Whether there is a simple way to add new Mapping operators on existing mapping?
    For example I have a mapping, but now I need to add new Filter or Aggregator operator, so I must delete all connections between attributes, then add new operator, connect source attributes to the input attribute for the operator and so on.
    Is there way to turn down this operations, simply drop new operator on source object or on a connection between two objects, and necessary operations will be automatically executed.
    As I remember in OWB2 something similar existed in a way to add new Filter operator.

    Dmitry,
    Unfortunately there is not. What you should aim for, is to use the group-by-group mapping using match by name (with some additional options, such as ignore source/target prefix, suffix, etc.).
    I.e. if you want to insert another operator, then I recommend you first populate attributes based on an operator that is currently on the mapping delete the old operator (to delete all connections), map into the new operator and add another operator in order to re-create what you previously had. I know it is not ideal... but in my experience it is the most productive way to work.
    Thanks,
    Mark.

  • __ Is there a way to add new art boards to an existing document?

    Is there a way to add new art boards to an existing document (same dimensions and same space betwen artboards)?
    What I do now is I have to create a new file (with new number of artboards) and cut & paste - is there another way to do this?
    Thanks.

    What Illy version?
    File > Document Setup > "Edit Artboards" button (top, right)
    Before entering Edit Artboard mode though, draw boxes at the right size and at the right locations as your desired new artboards so you can snap to them. While in Edit Artboard, anything other drawing boxes will cause you to exit it.
    Tip: Alt+Left Click to convert a slected shape to an Artboard, while in Edit Artboard mode.
    EVEN EASIER:
    Draw out your new Artboards in normal mode, select them > Object > Artboards > Convert to Artboards.
    *EDIT   Larry's a ninja.

  • Recommended way to add "EULA" screen to DMG generated by JavaFX Packager

    Hello,
    What's the recommended way to add a "EULA" screen to the DMG generated by the JavaFXPackager?
    Does JavaFXPackager support addition of a "EULA" screen or I need to post process the DMG some how?
    What's the recommended solution(s)?
    Thanks.

    It is mentioned in the docs but may be example will help.
    Search http://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm#BCGIBBCI for license.
    Basically you need to add resource of type "license" to your fx:deploy and then it should be injected as long as it is plain text file.
    Use of RTF is possible if you customize .plist but this area is poorly documented by Apple and customization may be tricky (you need to know how to inject RTF styles into plist.
    One workable approach is to use external tool to create DMG once, then extract .plist from it and merge it into template to build your package.

  • Add new depreciation to existing assets

    hi experts
    can we add new depreciation to existing assets , while creating new assets i can see the depreciation that i have created recently. but for the existing assets i want to add this new depreciation.
    venkat

    Hi
    Yes u can change the depreication
    but keep in mind note the date when u chnage the depreciation of existing asset
    and check any invoice not pending of asset PO at the time of change the depreciation
    Suppose u create a PO with asset, whc\ich is creatd ( suppose machinary rate is 10%)
    then u comlete the cycle first this means invoce entry ( MIRO)
    then u chnage the depreciation
    if any query revert back
    Regards
    Roobal

  • How do I add an objectclass to existing LDAP server entry using an ldif file?

    I am trying to fix an LDAP server that has been operating with schema check off. I need to add an objectclass to the groups so that some attributes that have been added to the groups will be "legal." From the documentation, the changetype: modify will allow the changing/adding of attributes that are already a part of the schema objects that define the entry. It does not look like I can add an objectclass with the modify operation.
    If this is the case, then how do I add an objectclass to an existing entry? Using the GUI is not possible since the directory server in question is not being managed with an admin server. Please tell me that I do not have to delete the groups and import them again with an LDIF file that has the new objectclass added.
    Kent

    See this post:
    http://softwareforum.sun.com/servlet/ProcessRequest?RHIVEID=181&RPAGEID=135&HOID=50B500000008000000636B0000&USEARCHCONTEXT_CATEGORY_0=_21_%24_7_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_21_%24_7_&UCATEGORY_S=0

  • Best way to add new post link

    What would be the best way to add a "new post" link on the main homepage that links to the appropriate blog page. Ideally, I'd like to put a small photo too.
    Is the only way to manually add it every time I update, or is there a better way?
    Thanks, Jill

    You can do it any number of ways. Link a shape, link text, or link a photo to the appropriate blog page, using the Inspector from the tool bar at the bottom of the iWeb window.
    You are correct that the only way is to manually update each time. I don't know of any method to get the blog entries to auto update an indicator on the Home page in iWeb.
    I have a site for a current project I'm on that has a "Shot of the Day" link on the Home page. As the site has gotten large, I have a duplicate of the Domain file for this site that contains nothing but this Home page. I update the page and then simply swap out the files on the server with the updated ones. Makes opening, editing, and saving the changes faster and easier than publishing the entire site each time. Here's an example of how I placed the link on the Home page...
    Mark

  • Is there a way to add new objects to object changeability list?

    My production system is locked and I need to change object type RSFO (formula). I looked at the object changeability list and it does not contain RSFO. Is there a way to add this object to this list so I can change it directly in production? Thanks.

    hi,
    I hope you can create similar formula in the production. as in the production we can change the reports,proces chain,aggregates, infopackages.
    Ramesh

  • Add new Column to existing Primary Key

    Hi,
    I have a Primary key consisting of 6 columns. Now i want to add new 7th column to that existing key.
    Do i need to drop the existing primary key and then recreate agian with 7th field or is there any other way?
    Regards,
    Jayesh

    I think what Joel was really saying is that dropping/recreating a PK is the only way to change the PK column list in version 6 - 9. Who knows about in 10g? Though I doubt that this has changed.
    If the table only has one or two more columns that are not part of the key you might consider converting the table to being an IOT (indexed organized table).
    HTH -- Mark D Powell --

  • How to add new infoobject to existing cube or dso?

    Hi all,
    Can we add new infoobject to exixting cube in BW 3.5 ver? if yes how can we add? Please provide me steps.
    Thank you.
    Sunil

    Hi Sunil,
    If you want to add new info object to the IC or DSO which is already holding data - then you need to make a copy of that particular DSO/IC and load the data into dummy.
    Now delete the data from the IC/DSO to which you want to add the new info object. once the data is deleted it will allow you to add new info object to you IC/DSO.
    save it and activate the IC/DSO
    load the data from Dummy DSO and from new run on wards the newly updated info object will also get updated(historical data will not be updated if its newly added to DS as well).
    If you want the historical data for the newly added field then you need to drop the compelte data and need to extract from source.
    Note: You can't include the new info objects are change the existing info objects if there is data exist in the IC/DSO
    Regards
    KP
    Edited by: prashanthk on Dec 31, 2010 10:54 AM

  • How to add new class to existing DC (Web Dynpro project)

    Hi,
    How can I add new class to an existing DC (Web Dynpro project)?
    I tried adding it using File - New - Other - Java - Class, but after a build of the DC the new class (and its contents    ) was completely removed.
    Then I created a new DC (java project) and created a new class in that DC. This went fine, but I got into problems because of circular referencing between the new & the old DC, so no build was possible.
    This can't be difficult, does somebody knows how to do it?
    My temporary solution is to add the classdefinition to an exisiting .java file. Very ugly.
    Thanks,
    Jeroen

    Hi Jeroen,
    where did you create the class? If the *.java file is placed in the src/packages folder it should not be deleted by a build. (I suspect you created it in the gen_wdp folder?)
    Regards,
    Marc

  • Add new elements to existing document

    I have a table with an xmltype column. Is there a way to add additional elements to a document in the database using the built-in SQL functions like updatexml? In the documentation I just see examples of updating the text between elements.

    Hi,
    Similar to an updateXML() in PLSQL, there is something called insertXML() too. I think this is what you are looking for.
    Thanks,
    Rajat

  • Add new batch during count entry (for cycle count by quant LICC)

    Hi! We are using LICC for cycle counting by quant as we have mixed storage and do not want to count all the materials in a single bin. Most of the materials involved are batch-managed. One issue we have is we may discover other batches during stock take. In this case, how can we add this to the stock adjustment since we cannot add new item when we use cycle counting by quant?
    Appreciate your suggestion in this case.
    Cheers!
    SF

    Hi,
    Whenever you find discrappancies, in this case founds, you will note these down and first do an analysis whether this particular batch has been written off in the past as lost. When not, you will make a MB1À or MIGO booking to add this found batch to stock. When yes, you could do a reversal of the issue or do a new receipt.
    MdZ

  • How do you add new songs to existing playlist on iphone 5?

    Before the update a few months ago I was able to add new songs to an existing playlist by hitting the Edit button.  Now I can only delete songs off of a playlist.  Has anyone figured out how to add new songs or do I just have to create a new playlist?  I really hope I don't because they will all be the same then.

    What could I do to be able to add more pages to a document?

  • Best way to add new dual band Extreme to existing b/g network

    I've been using a Snow Extreme and b/g Express, but have recently been having dropped/slow connection issues. I think this may be at least partially caused from the many other networks and other wireless devices in the neighborhood - I can see 30 or more networks at times. I've also gotten a new Mini and MacBook, both with n wireless, so I decided to get a new dual band Extreme.
    The faster connection speed of the new Extreme is very noticeable on my n capable machines. It also looks like the connection issues I was previously having may have been resolved, but its a bit early to tell for sure.
    First problem I've had is with setting up the guest network. If I attempt to set it up wirelessly, I get as far as changing the settings and restarting the Extreme. Once I do, it does restart, but then Airport Utility is not able to find it after restart. I am able to see the main and guest network in my available networks, but I am unable to join either. Once I turn guest off (via ethernet since Utility isn't able to see it wirelessly) I am again able to see it in Utility and connect to the main network. If I try to turn on guest via ethernet, I get an error and it does not restart.
    Originally the Snow Extreme was the main and the Express was used for wireless printing. My plan was to use the new dual-band as the main, move the Snow to the printer, and use the Express for AirTunes. But now I realize that I'm only able to print and use Airtunes on the main and not the guest network. Since the Snow and Express are b/g, are they going to slow down the main network? I am seeing these as clients in Airport Utility, which I didn't expect. If so, is there a better way to set this up than what I am attempting to do?
    I've got the radio mode set to 802.11n only (5GHz) - 802.11b/g/n. Am I able to set it up so that the n capable clients use the 5GHz band and the b/g clients use the 2.4GHz band so that they don't slow down the n connection, or would I even want to do this?
    Thanks!!!

    The jre is 14,872 KB (j2re-1_4_2_03-windows-i586-p.exe).
    If you silently install the JRE then then licensing doesn't appear to be an issue (no dialogs appear). See http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/silent.html. Silent installation is perfect for us since our customers are very nontechnical and would be very confused about the JRE installation dialogs.
    My main question remains: what is the best way to incorporate the installation of the JRE into an existing product. I solved the above-mentioned error 1500 problem by asynchronously starting the silent JRE installation after my product is installed, i.e., after the InstallFinalize step. This results in a bad human interface: the user is prompted with the final dialog with a "finish" button. However the mouse cursor is showing an hourglass intermittenly (kind of like when you logon to Windows after a reboot), for 25-40 seconds after this dialog first appears, until the JRE is installed. I have got to figure out a way to synchronously install the JRE while the user waits.
    I chose to do a private install (search for "private" in http://java.sun.com/j2se/1.4/pdf/plugin-dev-guide-1.4.2.pdf), which works, but I haven't yet figured out the best way to uninstall this JRE -- it appears that simply deleting the directory tree might be the correct way to uninstall.
    I have searched a lot of newsgroups for the "generally accepted" method to incorporate some Java programs into a product (i.e., how to install the JRE). I have not found anything. My conclusion is that I must be doing something that isn't done that often, either that or I've taken a wrong turn.

Maybe you are looking for

  • Mac mini with W7 only

    I have Leonard Snow and W7 dual boot in my Mac mini. What should I do to have W7 as the only OS? Should I just format the OS X partition? Will this cause problems when booting (as it now gives me the option to choose the OS)?. Thanks

  • IMac to print to "shared" printer on Windows XP Home

    I have just returned to the Mac world. My first MAC was one of the first MACs ever made (1984) - it's in the basement and it still works. I have a new iMac G5. I was able to transfer all the files I wanted from my laptop (Windows XP Home) to my iMac

  • Project management resp

    I have created responsibility for project management . But in Search project i am not able to view all tabs there like projects , workplan, etc . Can any body plpease help ??

  • Entries missing in excel sheet when sent as an attachmt in email in ECC6.0

    Hi All, When I am sending an email with excel attachment from SAP , email functionality is working fine. But when I try to open excel sheet it is giving a warning that "Incompatible format" and when I click on "OK" button excel sheet is opened bu som

  • Adding Facebook, Twitter links to index.cfm

    Hey all, Brand new to CFM and need to add the Facebook sharer and twitter links to .cfm page and was wondering if anyone can point me in the right direction? Thanks.