[ 
https://issues.apache.org/jira/browse/DIRSTUDIO-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16892707#comment-16892707
 ] 

Raju commented on DIRSTUDIO-1232:
---------------------------------

Hi [~elecharny],

I am able to get all the groups finally with below method, Pease let me know if 
am doing in any wrong in design-wise.

    @SuppressWarnings("unchecked")
        public static List getAllGroups(NewEntryWizard ibr) {   
    
                ExportLdifRunnable exLdif = new ExportLdifRunnable("Test", 
ibr.getSelectedConnection(), new SearchParameter());
                StudioProgressMonitor dummyMonitor = new 
StudioProgressMonitor(new MemberOfStudioProgress());
                SearchParameter sp = new SearchParameter();

                // set default parameter
                sp.setName(BrowserCoreMessages.model__quick_search_name);
                
sp.setSearchBase(ibr.getSelectedEntry().getDn().getParent().getParent());
                sp.setReturningAttributes(ISearch.NO_ATTRIBUTES);
                
sp.setAliasesDereferencingMethod(ibr.getSelectedConnection().getAliasesDereferencingMethod());
                
sp.setReferralsHandlingMethod(ibr.getSelectedConnection().getReferralsHandlingMethod());
                sp.setCountLimit(ibr.getSelectedConnection().getCountLimit());
                sp.setTimeLimit(ibr.getSelectedConnection().getTimeLimit());
                sp.setFilter("(objectClass=groupOfUniqueNames)");
                sp.setScope(SearchScope.SUBTREE);

                StudioSearchResultEnumeration ne = 
SearchRunnable.search(ibr.getSelectedConnection(), sp, dummyMonitor);
                DefaultLdifEnumeration LdifEnumeration = new 
DefaultLdifEnumeration(ne, ibr.getSelectedConnection(), sp,
                                dummyMonitor);
                List<String> allGroups = new ArrayList<String>();
                try {
                        // add the records
                        while (LdifEnumeration.hasNext()) {
                                LdifContainer container = 
LdifEnumeration.next();

                                LdifContentRecord record = (LdifContentRecord) 
container;
                                LdifDnLine dnLine = record.getDnLine();
                                LdifSepLine sepLine = record.getSepLine();

                                System.out.println("each Record" + 
dnLine.getRawValue());
                                allGroups.add(dnLine.getRawValue());
                        }
                } catch (LdapException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
                // SearchRunnable.search( browserConnection, searchParameter, 
dummyMonitor );

                return allGroups;

    }

Thanks,
RajuG

> Issue in confuring MultiValueEditor 
> ------------------------------------
>
>                 Key: DIRSTUDIO-1232
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-1232
>             Project: Directory Studio
>          Issue Type: Outage
>          Components: dio-template-editor, studio-ldapbrowser
>    Affects Versions: 2.0.0-M14
>         Environment: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
>            Reporter: Raju
>            Priority: Major
>             Fix For: 2.0.0
>
>         Attachments: Emmanuel Lecharny.url, Membership Wizard.png, 
> multiValueEditor.error, screenshot-1.png
>
>
> Hi Team,
> I am trying to create a new value editor by taking existing MultiValueEditor 
> but somehow I am getting an error while instantiating MultiValueEditor class.
> Steps I have followed :
> 1) Copied DN editor source and configuration and replica the DN editor as 
> MultiValue editor
> 2) in plugin.xml of value editors package, I have modified like below
>      <valueEditor
>         
> class="org.apache.directory.studio.valueeditors.multi.MultivaluedValueEditor"
>         icon="resources/icons/dneditor.gif"
>         name="%ValueEditor_MultiValueEditor_name">
>       <syntax syntaxOID="1.3.6.1.4.1.1466.115.122.1.12"/>
>     </valueEditor>
> 3) I am able to see new editor in edit value preferences but when choose and 
> edit the value I am getting attached error.
> I understand one thing in plugin.xml of value editors supporting only 
> AbstractDialogStringValueEditor its throwing error if try to extend 
> CellEditor. could you please explain to me how to use multivlauededitor to 
> edit multi values.
> Thanks,
> Raju Garaga 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org
For additional commands, e-mail: dev-h...@directory.apache.org

Reply via email to