Package org.apache.directory.ldapstudio.browser.core.model

Examples of org.apache.directory.ldapstudio.browser.core.model.IEntry


                Schema schema = editor.getConnection() != null ? editor.getConnection().getSchema()
                    : Schema.DEFAULT_SCHEMA;
                IConnection dummyConnection = new DummyConnection( schema );

                IEntry dummyEntry = null;
                if ( containers[0] instanceof LdifContentRecord )
                {
                    dummyEntry = ModelConverter.ldifContentRecordToEntry( ( LdifContentRecord ) containers[0],
                        dummyConnection );
                }
View Full Code Here


            String dn = "";
            boolean enabled = true;

            if ( newInput != null && newInput instanceof IEntry )
            {
                IEntry entry = ( IEntry ) newInput;
                dn = "DN: " + entry.getDn().toString();
            }
            else if ( newInput != null && newInput instanceof AttributeHierarchy )
            {
                AttributeHierarchy ah = ( AttributeHierarchy ) newInput;
                dn = "DN: " + ah.getAttribute().getEntry().getDn().toString();
View Full Code Here

    public Object[] getElements( Object inputElement )
    {

        if ( inputElement != null && inputElement instanceof IEntry )
        {
            IEntry entry = ( IEntry ) inputElement;

            if ( !entry.isAttributesInitialized() && entry.isDirectoryEntry() )
            {
                boolean soa = BrowserUIPlugin.getDefault().getPreferenceStore().getBoolean(
                    BrowserUIConstants.PREFERENCE_ENTRYEDITOR_SHOW_OPERATIONAL_ATTRIBUTES );
                InitializeAttributesJob job = new InitializeAttributesJob( new IEntry[]
                    { entry }, soa );
                job.execute();
                return new Object[0];
            }
            else
            {
                IAttribute[] attributes = entry.getAttributes();
                Object[] values = getValues( attributes );
                return values;
            }
        }
        else if ( inputElement != null && inputElement instanceof AttributeHierarchy )
View Full Code Here

    {
        public Object[] getElements( Object inputElement )
        {
            if ( inputElement instanceof IEntry )
            {
                IEntry entry = ( IEntry ) inputElement;
                if ( !entry.isAttributesInitialized() && entry.isDirectoryEntry() )
                {
                    return new Object[]
                        {};
                }
                else
                {
                    IAttribute[] attributes = entry.getAttributes();
                    List valueList = new ArrayList();
                    for ( int i = 0; attributes != null && i < attributes.length; i++ )
                    {
                        IValue[] values = attributes[i].getValues();
                        for ( int j = 0; j < values.length; j++ )
View Full Code Here

        {
            return ( ( BrowserEntryPage ) child ).getParent();
        }
        else if ( child instanceof IEntry )
        {
            IEntry parentEntry = ( ( IEntry ) child ).getParententry();
            if ( parentEntry == null )
            {
                if ( connectionToCategoriesMap.get( ( ( IEntry ) child ).getConnection() ) != null )
                {
                    return connectionToCategoriesMap.get( ( ( IEntry ) child ).getConnection() )[0];
View Full Code Here

                return objects;
            }
        }
        else if ( parent instanceof IEntry )
        {
            final IEntry parentEntry = ( IEntry ) parent;

            if ( !parentEntry.isChildrenInitialized() && parentEntry.isDirectoryEntry() )
            {
                new InitializeChildrenJob( new IEntry[]
                    { parentEntry } ).execute();
                return new String[]
                    { "Fetching Entries..." };
            }

            int childrenCount = parentEntry.getChildrenCount();
            if ( childrenCount <= preferences.getFoldingSize() || !preferences.isUseFolding() )
            {
                if ( entryToEntryPagesMap.containsKey( parentEntry ) )
                {
                    entryToEntryPagesMap.remove( parentEntry );
                }

                IEntry[] entries = parentEntry.getChildren();
                if ( entries == null )
                {
                    return new String[]
                        { "Fetching Entries..." };
                }
View Full Code Here

     */
    public boolean hasChildren( Object parent )
    {
        if ( parent instanceof IEntry )
        {
            IEntry parentEntry = ( IEntry ) parent;
            return parentEntry.hasChildren()
                || ( BrowserCorePlugin.getDefault().getPluginPreferences().getBoolean(
                    BrowserCoreConstants.PREFERENCE_SHOW_ALIAS_AND_REFERRAL_OBJECTS ) && ( parentEntry.isAlias() || parentEntry
                    .isReferral() ) );
        }
        else if ( parent instanceof BrowserEntryPage )
        {
            return true;
View Full Code Here

            objectToSelect = bookmark;
        }
        if ( obj instanceof IEntry )
        {
            IEntry entry = ( IEntry ) obj;

            universalListener.setInput( entry.getConnection() );

            List<IEntry> entryList = new ArrayList<IEntry>();
            IEntry tempEntry = entry;
            while ( tempEntry.getParententry() != null )
            {
                IEntry parentEntry = tempEntry.getParententry();
                entryList.add( parentEntry );
                tempEntry = parentEntry;
            }

            IEntry[] parentEntries = ( IEntry[] ) entryList.toArray( new IEntry[0] );
View Full Code Here

                    StructuredSelection selection = ( StructuredSelection ) context.getSelection();
                    Object obj = selection.getFirstElement();
                    if ( obj instanceof IValue )
                    {
                        IValue value = ( IValue ) obj;
                        IEntry entry = value.getAttribute().getEntry();
                        select( entry );
                    }
                    else if ( obj instanceof IAttribute )
                    {
                        IAttribute attribute = ( IAttribute ) obj;
                        IEntry entry = attribute.getEntry();
                        select( entry );

                    }
                    else if ( obj instanceof ISearchResult )
                    {
View Full Code Here

        viewer.setSorter( new InnerViewerSorter() );
        viewer.setContentProvider( new InnerContentProvider() );
        viewer.setLabelProvider( new InnerLabelProvider() );
        if ( connection != null )
        {
            IEntry entry = connection.getRootDSE();
            viewer.setInput( entry );
        }
        this.rawTab = new TabItem( this.tabFolder, SWT.NONE );
        this.rawTab.setText( "Raw" );
        this.rawTab.setControl( rawComposite );
View Full Code Here

TOP

Related Classes of org.apache.directory.ldapstudio.browser.core.model.IEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.