Add the group with the ES2 Java API

Hi all

There is an example that shows how to create a new group using the ES2 API here:

http://help.Adobe.com/en_US/LiveCycle/9.0/programLC/help/index.htm

However, if you run the code to create a group, the code works fine and a new OID is returned. But if you go in the /AdminUI ES2 and the list of all groups, you don't see the 'AdobeGroup' group here! Also if you are looking to the /AdminUI for the group 'AdobeGroup' it is not found.

If the code does not work or the Admin UI does not show the newly created group.

What's not here?

Thank you.
Paul.

After the code snippet should work for you

public String createSampleGroup() throws UMException{        String groupOid = checkGroupExist(groupName);

        if(groupOid != null){            return groupOid;        }        String groupCanonicalName = groupName;

        GroupImpl group = new GroupImpl();        group.setCanonicalName(groupCanonicalName);        group.setDomainName(domainName);        group.setGroupType(Group.GROUPTYPE_PRINCIPALS);        group.setLocal(true);        group.setPrincipalType(Principal.PRINCIPALTYPE_GROUP);

        groupOid = directoryManager.createLocalGroup(group);        log("Sample group created with name %s",groupName);

        return groupOid;    }

    /**     * Search the groupwith the given name in the sample domain      */    private String checkGroupExist(String groupName) throws UMException{        PrincipalSearchFilter psf = new PrincipalSearchFilter();        psf.setCommonName(groupName);        psf.setSpecificDomainName(domainName);

        //By default the filter causes like search unless you are using the absolute version        //Setting this ensures that search is exact        psf.setMatchExactCriteria(true);

        //By default search returns obsolete users also. Set this to ensure that        //only active users are returned        psf.setRetrieveOnlyActive(); 

        //PrincipalReference are lightweight user objects and searching for them would be more performant        //compared to the User search. If you do not require any other user attribute then prefer this        //mode of search        List result = directoryManager.findPrincipalReferences(psf);        if(result.isEmpty()){            log("Sample group with name [%s] does not exist",groupName);            return null;        }else{            String oid = result.get(0).getOid();             log("Sample group with name [%s] already exist",groupName);            return oid;        }    }

Tags: Adobe LiveCycle

Similar Questions

  • problem installing with berkeley db java api

    Hello
    I have a problem to start Berkeley db 4.7 with java api.
    I followed the installation procedure described here http://www.oracle.com/technology/documentation/berkeley-db/db/ref/build_unix/intro.html
    and provided the - enable-java option during configuration.
    I've also updated the following configuration on the file .bashrc in the linux machine

    export CLASSPATH=/usr/local/BerkeleyDB.4.7/lib:$CLASSPATH
    export LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.7/lib

    When you try to run the sample db. AccessExample (which is packed with berkley db) I get the following error:

    Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/BerkeleyDB.4.7/lib/libdb_java-4.7.so: /usr/local/BerkeleyDB.4.7/lib/libdb_java-4.7.so: evil class ELF: ELFCLASS64 (Possible cause: incompatibility of width for the word architecture)

    The linux machine is a 64-bit computer java-version gives:
    Java version "1.6.0_03".
    Java (TM) SE Runtime Environment (build 1.6.0_03 - b05)
    Java hotspot Server VM (build 1.6.0_03 - b05, mixed mode)

    How can this problem be fixed?
    If it is related to 32 bit or 64 bit issues, is there a way to compile the berkeley db code with different config params?

    Thank you!

    Hello. -m32 is an indicator of compiler, you can tell BDB that signals to use by setting CFLAGS for configuration stage. There is a documentation on how to do it here:
    http://www.Oracle.com/technology/documentation/Berkeley-DB/DB/ref/build_unix/flags.html

    Ben Schmeckpeper

  • Error with TaskSearchFilter using Java API by calling custom

    I created a Java component customized for use in LC process Mgr.

    On invoke the process containing the component, the component will fail with the following message:

    2011-02-28 16:28:31, 260 ERROR [com.adobe.workflow.AWS] cannot force the object: com.adobe.idp.taskmanager.dsc.client.query.TaskSearchFilter@cf7e441 type: com.adobe.idp.taskmanager.dsc.client.query.TaskSearchFilter type: com.adobe.idp.taskmanager.dsc.client.query.TaskSearchFilter of the class

    Code is pretty basic:

    ServiceClientFactory myFactory = ServiceClientFactory.createInstance ();

    TaskManagerQueryService queryManager = TaskManagerClientFactory.getQueryManager (myFactory);

    TaskSearchFilter filter = new TaskSearchFilter();
    filter.addCondition (TaskSearchingConstants.pSTATUS, Operator.EQUALS, "3");

    The list of result < TaskRow > = queryManager.taskSearch (filter);

    Error seems to happen with the creation of the list. This code works fine when run as a standalone file in Eclipse or Netbeans, but not in the component.

    All required jars are included and are listed in the component.xml class path.

    Someone at - it ideas?

    Thank you

    David

    Looks like a problem of ClassLoader.  Usually this is caused by the presence of a class (TaskSearchFilte) in your component on the server.   In other words, there are two copies of the class of TaskSearchFilte - yours and already in LiveCycle - and they are in conflict.

    If this is the case, the solution is simple:

    • remove the jar files containing the TaskSearchFilte (and LiveCycle customers) jar of your device file.  You may need in the way of construction, so your code can compile - but you don't need them in the jar of the final element.
    • remove references to these jars of the class-path of the component.xml file entry
    • Add a section import-package to your component.xml file.  This will not reference the jar files, but the package names.  For example:

    com.adobe.idp.taskmanager.dsc.client.query.TaskSearchFilter

  • How to get the attributes of node when you query the TQL via java API

    Hello

    I'm trying to pick up a hierarchy of IC using a TQL. I created a TQL on uCMDB and am now questioning him through the uCMDB java API. The TQL is simple and queires a hierarchy containing a Node (Server) containing the disks, file systems, interfaces and IP addresses.

    My code snippet is:

        UcmdbService ucmdbService = CMDBConnection.createCMDBService();
        TopologyQueryService queryService = ucmdbService.getTopologyQueryService();
        Topology topology = queryService.executeNamedQuery("BasicTopologyView");
        Collection allCIs = topology.getAllCIs();

        for (TopologyCI node : allCIs) {
                 System.out.println("Node is " + node.getPropertyValue("display_label") + "(" +node.getId().getAsString() + ") ... " + node.getPropertyValue("display_label")
                         + " ... " + node.getPropertyValue("TenantOwner")+ " ... " + node.getPropertyValue("discovered_os_name"));
             }

    The output I get is

    The node is/usr (18de9fd759680f10b4f1d3567fb0f5e5)... / usr... null null
    The node is/tmp (18eaac5d8ec14e45874029f25011a13c)... / tmp... null null

    Whatever properties I question are coming as null. Is there a way I can say uCMDB what I expect from each node to the execution of the attributes.

    Thanks in advance.

    Peyrot

    This problem is now resolved. The correct way to proceed, queryProperties method is used when querying of the node.

    node.queryProperties(props);
    

    When the accessories is a string containing all of the appropriate properties you want to take to uCMDB.

  • Is there a successor to the BlackBerry Java platform?

    Hello.

    It's been a while since RIM announced that API Java only be supported in BB10. Since then, they have released software development kits for:

    • SDK native (C/C++) and waterfalls (C + c++ / Qt)
    • HTML5 Webworks
    • Adobe AIR
    • Runtime Android

    So, what would be the most similar to the current Java API platform for BB10? I think about things like:

    • Camera
    • NFC
    • Bluetooth
    • SQLite
    • A GUI Framework (screens, components, etc.)
    • Autorun at startup, background applications feature
    • GPS (listeners, geofencing)

    Thanks in advance.

    RIM seems focused on the main platform being the NDK + waterfalls.

    Adobe Air seems to be the red headed daughter-in-law who is left behind.

    Android is the popular kid they keep around to look at more cost.

    WebWorks seems to be more than a side project.

    So yes, go with the NDK.

  • Add the checkbox next to another?

    Hello again.  How can I go on the placement of one checkbox next to each other who is going to open the changes for all documents?  I will paste a picture below to show what I mean.

     w.tabs[1]= w.tabGroup.add ('group');
                w.tabs[1].add('statictext {text: "Select a change to make"}');
                w.tabs[1].add ('panel');
      
            var RunCH1= w.tabs[1].add ('checkbox {text: "Find and Replace"}');
            var RunCH2= w.tabs[1].add ('checkbox {text: "???"}');
            var RunCH3= w.tabs[1].add ('checkbox {text: "???"}'); 
    

    The foregoing it activates.  After the ok button is checked.

    myResult = w.show(); 
          
           if(myResult == 1 && (RunCH1.value==true)){      
              Replace_TXT(" <CR> ", "^p");    
              Replace_TXT(" <CR>", "^p");
    

    I want the a checkbox to add corresponding to the Cyan box on or directly next to the find and replace text.  Either or.  I want to make it another check box so that when clicked and the search and replace is clicked executes the command for all documents.

    Screen Shot 2016-06-10 at 11.27.58 AM.jpg

    By using the ratings of your first message, it could be like this:

    var gr1 = w.tabs[1].add ("group{orientation: 'row', alignment: ['fill', 'top']}");
    var gr2 = w.tabs[1].add ("group{orientation: 'row', alignment: ['fill', 'top']}");
    
    var RunCH1 = gr1.add ('checkbox {text: "Find and Replace"}');
    var RunCH2 = gr1.add ('checkbox {text: "???"}');
    var RunCH3 = gr2.add ('checkbox {text: "???"}');
    

    (Add empty groups with a focus on line - there are 2, gr1 and gr2, then nothing added to this group will be queued on the same line).

    Xavier

    ==============================

    Edit: If you start with scriptui, ScriptUI for Dummies (Peter Kahrel) is a very good source of information with many examples.

  • Applications using Java API 11 g MRI are precarious?

    Hello

    I was reading "Developers Guide for Oracle 11g IRM server" and I found this:

    Cryptography keys: an application that uses the Java API of MRI has the ability to get sealed content Cryptography keys. The MRI Java API stores these keys in memory of the calling process, so that they are used. The MRI Java API debugging, or do a memory dump could compromise the key material. Do not use MRI Java API if the environment in which the application runs is loose or not reliable (for example, a laptop).

    HotFolders and IRM Wrapper using MRI Java API, aren't they? Does this mean that these applications are not secure? I install these applications in a real environment. However, provide advice to guide doubt me.

    Thanks in advance.

    The documentation is currently fairly conservative.

    Re: Hot issues. If HF is configured to use the Java API, then it is true that the keys will be temporarily stored in its memory and Java is more susceptible to reverse engineering, say, C++. But the hot issues in use of production will generally be an application on the server side and not work on laptops to the end user. So the access to this application of HF running (and its own encrypted cache) can be fixed by using normal operating system access controls. If you are always worried about it, then do not use the API, use default web services. In this case no key material is always sent to the HF and all the sealing is made by the IRM server.

    Re: Wrapper. It does not use the Java API if never receives or hiding of key material.

    HTH,

    Martin

  • Get members of the group with the Java API in LiveCycle

    I work with the Java API in LiveCycle (LiveCycle 8.2) and I am looking


    an example of how read the members of a group.

    I am able to get a group (Type GroupImpl) using the PrincipalSearchFilter.


    But how do I get the members of this group. I checked the
    DirectoryManagerServiceClient and classes of different search filters
    without success?

    As a solution, I can retrieve all users of my application area and
    check their membership to see if they are in the group concerned. But this
    is a dirty hack, I really don't want to use.

    Any ideas?

    Hello!

    I know you mentioned that you were watching in this without success, but it should work really.

    First make a GroupMemebershipSearchFilter, defining the groupoid be the ID of the group itself.  Using the DirectoryManagerServiceClient you can then call findGroupMembers using the searchFilter that will return a list of, as follows:

    DirectoryManager DirectoryManagerServiceClient = new DirectoryManagerServiceClient (serviceConnection.getFactory ());

    List userList = new ArrayList ();

    Try
    {
    userList = directoryManager.findGroupMembers (searchFilter);
    }
    catch (System.Exception e)
    {

    Animals mistake
    }

    return userList;

  • Help with Essbase 9 and the Java API

    Hi, I am trying to connect to Essbase to a Java desktop app and I'm unable to do so. I need to know if I'm in principle do the right things and if I have the good environment set up.

    We have a server with Essbase version 9.3.1. We normally use essbase through the Excel add-in, and I already wrote it Excel applications that can use both the add-in and the Essbase API in VB. Now, I need to connect to Essbase but out of Excel and using the Java API. I have no idea what is APS don't my Essbase administrator.

    My request has the following (adapted from a post on this forum)-
    Public Shared Sub main (String [] args) {}
    String s_userName = 'user ';
    String s_password = "password";
    String s_olapSvrName = "ustca111";
    String s_provider = "http://localhost:13080/aps/JAPI ';
    try {}
    ESS IEssbase = IEssbase.Home.create (IEssbase.JAPI_VERSION);
    DOM IEssDomain = ess.signOn (s_userName s_password, s_provider, null, false);
    IEssOlapServer olapSvr = (s_olapSvrName) dom.getOlapServer;
    olapSvr.connect ();
    System.out.println ("connection to the server Analyic '" + olapSvr.getName () + "' has been a success.");
    olapSvr.disconnect ();
    } catch (EssException exp) {}
    System.out.println (exp.getMessage ());
    } }

    I'm running my app on my computer, not on the Essbase server, and the user name that I use is the same one I use (as a user of Essbase) through the Essbase Addin in Excel, not an admin login.

    When I run the application, I get:
    "Cannot connect to the Server.Make provider ensure that access code settings are correct and the server of the provider is running."

    Please can you confirm:
    (1) do I need an admin login for my client application to connect to the Essbase server or can I use a dial-up connection in normal play, like the one I use in Excel?
    (2) is the same provider regardless of the computer, i.e. "http://localhost:13080/aps/JAPI '; How can I know what this could be? Where can I get this information?
    (3) how can I make sure that the server is running the server needed 'provider', it's just a service that appears on the server services.msc? What should I ask the Essbase administrator for him to tell me what I need?

    Thank you very much.

    Leo

    Leo,

    You have APS and Shared Services running on your server? It would be the first question to answer. If you put in the url (http://localhost:13080/aps/JAPI, in your program) in a browser, you get a generic APS screen, or you get an error "page is not available. Unless you connect to APS that is running on the same computer that is running your Java application, the section 'localhost' should be the name of your APS Server.

    (1) for this Java program, you connect just to read only access that ID is OK
    (2) the supplier would be the same for every customer. The provider is the URL of your APS Server. Unless you run in embedded mode, you must APS to connect with the Essbase server. In embedded mode, you talk with the Essbase server, see [this thread | http://forums.oracle.com/forums/thread.jspa?messageID=3314485?].

    (3) APS - Analytic Provider Services, I'm not sure what it would show on a Windows Server. I suppose it would be something on Hyperion System 9 Analytic Provider Services. If you have installed APS, I would try the embedded road because it's the only way you will get to work.

    Published by: rjgideon on June 2, 2010 16:18

  • How to add the AD security group in each virtual machine with a name corresponding in VCenter?

    Hi all

    I would like to know if it is possible with VMware PowerCLI v4.1, I created the universal security group called 'Local administrators on %ComputerName%' for each server I have in UO computers by location OR separate and that he manually add members of the Local, but I want to attribute this security group in each computer virtual with the same name if possible.

    Basically, it's something like this:

    In the ad, here are computer objects:
    DOMAIN.com/Computers/ mailserver1-VM
    DOMAIN.com/Computers/ DBServer1-VM
    DOMAIN.com/Computers/ ApplicationServer1-VM

    In the ad's local security group objects:
    DOMAIN.com/SecureProductionOU/ 'Administrator locally on mailserver1-VM'
    DOMAIN.com/SecureProductionOU/ 'Local on DBServer1-VM administrator.
    DOMAIN.com/SecureProductionOU/ 'Local on ApplicationServer1-VM administrator.

    So I want to affect these security group in each respective name of VMS in VCenter:

    VCenter01.domain.com
    Datacenter1
    HighPerformanceCluster1
    Mailserver1-VM - Local Administrator on mailserver1-VM - role: read-only
    DBServer1-VM - Local Administrator on DBServer1-VM - role: read-only
    ApplicationServer1-VM - Local Administrator on ApplicationServer1-VM - role: read-only

    Any kind of aid and assistance would be appreciated grgeatly.

    Thank you.

    Hi Albert,

    I don't know what you want to check exactly, so I give 2 possible solutions.

    (1) you have a fixed number of names known to virtual machines for which you want to add this permission.

    $targetVM = "MailServer1-VM","DBServer1-VM","ApplicationServer1-VM"
    
    Get-Cluster -Name HighPerformanceCluster1 | Get-VM | `    where {$targetVM -contains $_.Name} | %{    New-VIPermission -Entity $_ -Principal ("DOMAIN\Local Administrator on " + $_.Name) `       -Role (Get-VIRole -Name ReadOnly) -Confirm:$false   }
    

    (2) you want to check for each virtual computer if the security group exist and then add the authorization.

    Get-Cluster -Name HighPerformanceCluster1 | Get-VM | `    Where{Get-QADObject ("DOMAIN\Local Administrator on " + $_.Name) `        -DontUseDefaultIncludedProperties -WarningAction SilentlyContinue `        -ErrorAction SilentlyContinue -SizeLimit 1} | %{    New-VIPermission -Entity $_ -Principal ("DOMAIN\Local Administrator on " + $_.Name) `        -Role (Get-VIRole -Name ReadOnly) -Confirm:$false} 
    

    Note that this requires the Quest AD snap-in must be installed. If you have a version without the Quest AD snap let me know.

  • 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

  • Add the user to the users group in the Users.ini file using c#

    Hello

    Using a c# application, we strive to add/remove a user from the TestStand Users.ini file.

    The CreateDeleteUsers.seq file in the samples of TestStand is used as a reference.

    We have seen that we are able to add the user to the list of user help file

    engine. UsersFile.UserList.SetPropertyObjectByOffset (0, 0 x 1, newUser.AsPropertyObject ());

    However, when we try to add the user to the user group, the sample file CreateDeleteUsers.seq said

    RunState.Engine.GetUserGroup (Locals.GroupName). Members.SetPropertyObjectByOffset (0, 0 x 1, Locals.User.AsUser.LoginName)

    If we try to replicate this in c#, the API seeks the last parameter (which is LoginName in the CreateDeleteUsers.seq file) as an object of property

    engine. GetUserGroup (this.) GroupName). Members.SetPropertyObjectByOffset (0, 0 x 1, newUser.AsPropertyObject ());

    This causes an exception of object reference when we run the application.

    Please advise on how to proceed.

    Thank you

    Arun-

    The members property is an array of string, so the 3rd parameter to SetPropertyObjectByOffset requires a string property object, IE. the user name and not of the user object. From the will of the user object error with '-17308; Specified value is not the expected type. ». The example should really be using SetValStringByOffset to be clearer so that you only specify the user name of the actual string.

  • Add the user to the Group DIO in SOA Suite

    Hi all

    I want to add users in the groups of the OID of a SOA (BPEL process) application, is there a way to do this?

    Thank you

    It has the functions add: use this function of the Group class.

    addUniquemember

    public void addUniquemember(javax.naming.directory.DirContext ctx, java.lang.String dn) throws UtilException
    
    Add the DN as a uniquemember in this group
    Parameters:
    ctx -a DirContext valid
    dn -the DN that represents the object to add
    reference links:-
    LDAPGroup (reference the API Oracle Internet Directory)
    Group (reference the API Oracle Internet Directory)
  • Watch does not recognize the weight class as exercise-how can you add the duration of activity manually because none of the presets eg elliptical etc. is appropriate. Also does not count calories for example 35 when the rest of the group is around 500

    Look does not recognize the weight class as exercise-how can you add the duration of activity manually because none of the presets etc for example elliptical is appropriate and therefore do not count toward the daily goal. Also does not count calories for example 35 when the average of the others in the group is around 500.

    Hello

    When you use the application of the training session, choose the type of activity that best fits your business. For anything else - like weight - select the other category.

    During the follow-up of one year to the next helps:

    • Activity app will credit the ring of progress of exercise with one minute for every minute of the workout.
    • Active calories will be based on the data recorded by the heart rate sensor or a brisk walk, whichever is greater.

    Note, however, that the heart rate sensor is likely to give better results for the workouts that involve rhythmic (for example running) rather than the irregular movements.

    More information:

    Use of the workout on your Apple Watch - Apple Support

  • Photo constantly order of photos in a slideshow changes no matter how many times the movements of the user the photo back to the good look at an order. Example: Bathroom Plans eventually grouped with pictures of kitchen! I have found no way to stop this o

    Apple Photo 1.3 serious problems - how can I SOLVE all these problems?

    (1) breaks down without rhyme or reason no matter where I am in the workflow.

    (2) pictures will not be Shut Down Every Time, even after several days of waiting.

    (3) aPhoto frequently badly chooses picture in the EDIT picture option, I get a picture different than the one I clicked on which is on a 100 pictures in a row.

    (4) picture constantly order of photos in a slideshow changes no matter how many times the movements of the end user the photo back to the good look at an order. Example: Bathroom Plans eventually grouped with pictures of kitchen! I have found no way to stop this weird behavior! Is there a way to stop this? If I drag the photo again some 7 additional photos in the slide show, after a minute or less, he appears again to where it was it not. !@#$%$#

    (5) If you make any CHANGES to a photo, it often changes the appearance of your complete slideshow of this picture with impatience. So you lose all this not work fix your configuration of the slide show. Even changing the order of photos once more that I had put back where they should be. !@#$$#@

    (6) photo identifies often shades of lamps and long door handles as the faces of the people.

    (7) photo made bad decisions when it comes to brightness, contrast and colors effortlessly around other than to use other software, where as with iPhoto there was a lot of workarounds. I could continue, but will save one who might be reading of this.

    I am up to date on all updates for my Mac. If anyone have REAL answers so please spilling the beans, but according to me, it's the only truth is that Apple has rolled out a product inferrer to replace an exceptional product, called iPhoto, which does not work on my new iMac computer 5K of 27 ".   If I knew what I would have chosen another computer that I use iPhoto to prepare more of fifty to sixty thousand photos in a given year and I use iPhoto to make hundreds of slideshows from it.  Are there plugins for Photo 1.3? I ask because I see where there could be Add-ons, but I can't find.

    Apple has taken a serious decision by turning his back to iPhoto and tens of millions of loyal users.

    Thanks in advance to anyone brave enough to tackle this job.

    James

    First, back up your library of Photos and hold down the command and option keys while launching Photos - repair your database - you have a corrupted database

    LN

Maybe you are looking for