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

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


                {

                    Object o = entryEditor.getMainWidget().getViewer().getInput();
                    if ( o != null && o instanceof IEntry )
                    {
                        IEntry entry = ( IEntry ) o;
                        IAttribute[] attributes = entry.getAttributes();

                        List selectionList = new ArrayList();

                        Iterator it = ( ( IStructuredSelection ) event.getSelection() ).iterator();
                        while ( it.hasNext() )
View Full Code Here


                EntryEditor editor = ( EntryEditor ) part;
                IEditorInput input = editor.getEditorInput();
                if ( input != null && input instanceof EntryEditorInput )
                {
                    EntryEditorInput eei = ( EntryEditorInput ) input;
                    IEntry entry = eei.getResolvedEntry();
                    if ( entry != null )
                    {
                        objectToSelect = entry.getConnection();
                    }
                }
            }
            else if ( part instanceof SearchResultEditor )
            {
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

        {
            return null;
        }
        else if ( attributeHierarchy.size() == 1 && attributeHierarchy.getAttribute().getValueSize() == 0 )
        {
            IEntry entry = attributeHierarchy.getAttribute().getEntry();
            IConnection connection = entry.getConnection();
            return new ACIItemValueWithContext( connection, entry, "" ); //$NON-NLS-1$
        }
        else if ( attributeHierarchy.size() == 1 && attributeHierarchy.getAttribute().getValueSize() == 1 )
        {
            IEntry entry = attributeHierarchy.getAttribute().getEntry();
            IConnection connection = entry.getConnection();
            String value = getDisplayValue( attributeHierarchy );
            return new ACIItemValueWithContext( connection, entry, value );
        }
        else
        {
View Full Code Here

    public Object getRawValue( IValue value )
    {
        Object o = super.getRawValue( value );
        if ( o != null && o instanceof String )
        {
            IEntry entry = value.getAttribute().getEntry();
            IConnection connection = entry.getConnection();
            String v = (String) o;
            return new ACIItemValueWithContext( connection, entry, v );
        }

        return null;
View Full Code Here

     * @param values
     *      the Values to paste
     */
    private void pasteValues( IValue[] values )
    {
        IEntry entry = null;
        if ( getSelectedAttributes().length > 0 )
        {
            entry = getSelectedAttributes()[0].getEntry();
        }
        else if ( getSelectedValues().length > 0 )
View Full Code Here

    {
        if ( preferences.isLeafEntriesFirst() || preferences.isMetaEntriesLast() )
        {
            if ( element instanceof IEntry )
            {
                IEntry entry = ( IEntry ) element;
                if ( ( entry instanceof DirectoryMetadataEntry || entry instanceof RootDSE || entry.isAlias() || entry
                    .isReferral() )
                    && preferences.isMetaEntriesLast() )
                {
                    return 3;
                }
                else if ( entry.isSubentry() && preferences.isLeafEntriesFirst() )
                {
                    return 0;
                }
                else if ( !entry.hasChildren() && preferences.isLeafEntriesFirst() )
                {
                    return 1;
                }
                else
                {
View Full Code Here

            {
                return greaterThan();
            }
            else
            {
                IEntry entry1 = ( IEntry ) o1;
                IEntry entry2 = ( IEntry ) o2;

                int cat1 = category( entry1 );
                int cat2 = category( entry2 );
                if ( cat1 != cat2 )
                {
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

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.