7 Replies Latest reply: Dec 28, 2012 9:58 AM by Bunty RSS

    How to retrive the list of Security groups From UCM

    980743
      Hi,

      I want the list of Security groups from UCM.
      in RIDC which service should i use? is there any service which gives the list of security groups? Can you please help me with this?

      i want to prepare a excel report in which list of security groups and the number of documents in each security group is displayed.

      Thanks.
        • 1. Re: How to retrive the list of Security groups From UCM
          ryan sullivan2
          The Services doc has a very good overview of most of the available services. Have you reviewed that for related services?

          For your use case, you might be better suited with a custom query that does some simple sql aggregation.

          -ryan
          • 2. Re: How to retrive the list of Security groups From UCM
            Srinath Menon-Oracle
            Hi ,

            Try the following service :

            GET_USER_PERMISSIONS

            Also you can check the following blog to get this done : https://blogs.oracle.com/kyle/entry/getting_a_list_of_security

            Hope this helps .

            Thanks,
            Srinath
            • 3. Re: How to retrive the list of Security groups From UCM
              980743
              Hi Srinath,

              Thanks for your reply. The link is very helpful.

              But i am new to UCM and Java as well. I want to access the list of security groups using RIDC.
              where can i get a sample code for same?

              Thanks
              • 4. Re: How to retrive the list of Security groups From UCM
                Srinath Menon-Oracle
                Hi ,

                Very very basic code for this is as follows :

                public static void main(String[] args) {
                // Create a new IdcClientManager
                IdcClientManager manager = new IdcClientManager ();
                try{
                // Create a new IdcClient Connection using idc protocol (i.e. socket connection to Content Server)
                IdcClient idcClient = manager.createClient ("idc://<hostname>:<intradocserverport>");

                //for using the web connection - start
                // IdcClient idcClient = manager.createClient("http://<hostname>:<webport>/cs/idcplg");
                // IdcContext userContext = new IdcContext("weblogic", "<password>");
                //for using web connection - end

                // Create new context using the 'sysadmin' user
                IdcContext userContext = new IdcContext ("weblogic");

                // Create an HdaBinderSerializer; this is not necessary, but it allows us to serialize the request and response data binders
                HdaBinderSerializer serializer = new HdaBinderSerializer ("UTF-8", idcClient.getDataFactory ());

                // Databinder for excuting the service
                DataBinder dataBinder = idcClient.createBinder();
                dataBinder.putLocal("IdcService", "GET_USER_PERMISSIONS");

                This is code snippet that will list the entire set of data / result set for the IDC Service used .

                Hope this helps .

                Thanks,
                Srinath
                • 5. Re: How to retrive the list of Security groups From UCM
                  980743
                  Hi Srinath,

                  Thanks a lot. your code helped me a lot to start with.

                  Now when i am using GET_USER_PERMISSIONS service, in the SearchResults what will be the output?

                  example:
                  DataResultSet resultSet = binder.getResultSet ("SearchResults");

                  for (DataObject dataObject : resultSet.getRows ()) {
                  System.out.println ("Security group: " + dataObject.get (" ? "));

                  what should i write in place of ?.
                  From where will i get what are the parameters in searchresult?

                  Thanks
                  • 6. Re: How to retrive the list of Security groups From UCM
                    970471
                    For the service GET_USER_PERMISSIONS, the name of the ResultSet will be SecurityGroups (instead of SearchResults).

                    The column you are interested in is "dGroupName".

                    DataResultSet resultSet = binder.getResultSet ("SecurityGroups");

                    for (DataObject dataObject : resultSet.getRows ()) {
                    System.out.println ("Security group: " + dataObject.get ("dGroupName"));
                    }

                    Jonathan
                    http://jonathanhult.com
                    • 7. Re: How to retrive the list of Security groups From UCM
                      Bunty
                      service : GET_SEARCH_RESULTS
                      result set : SearchResultNavigationdSecurityGroup

                      if your wcc version is 11g and if you would like to look at the fields in the result set, do a search by adding IsPageDebug=1
                      - open Debug Tool bar (displayed at right bottom)
                      - response binder
                      - Result Sets --> SearchResultNavigationdSecurityGroup

                      Note: set ResultCount to a low value... so not all data is pulled.