Package org.apache.directory.studio.ldapbrowser.core.jobs

Examples of org.apache.directory.studio.ldapbrowser.core.jobs.CreateValuesJob


//            }
//            IEntry entry = getSelectedAttributeHierarchies()[0].getAttribute().getEntry();
//
//            new CreateValuesJob( entry, attributeDescriptions, rawValues ).execute();
            IEntry entry = getSelectedAttributeHierarchies()[0].getAttribute().getEntry();
            new CreateValuesJob( entry, values ).execute();
        }
    }
View Full Code Here


                IAttribute attribute = entry.getAttribute( attributeDescription );
                if ( attribute != null )
                {
                    if ( attribute.getValueSize() == 0 )
                    {
                        new CreateValuesJob( attribute, newRawValue ).execute();
                    }
                    else if ( attribute.getValueSize() == 1 )
                    {
                        this.modifyValue( attribute.getValues()[0], newRawValue );
                    }
                }
            }
            else
            {
                EventRegistry.suspendEventFireingInCurrentThread();
                IAttribute attribute = new Attribute( entry, attributeDescription );
                entry.addAttribute( attribute );
                EventRegistry.resumeEventFireingInCurrentThread();

                Object newValue;
                if ( entry.getBrowserConnection().getSchema().getAttributeTypeDescription( attributeDescription )
                    .getSyntaxDescription().isString() )
                {
                    if ( newRawValue instanceof String )
                    {
                        newValue = ( String ) newRawValue;
                    }
                    else
                    {
                        newValue = LdifUtils.utf8decode( ( byte[] ) newRawValue );
                    }
                }
                else
                {
                    if ( newRawValue instanceof String )
                    {
                        newValue = LdifUtils.utf8encode( ( String ) newRawValue );
                    }
                    else
                    {
                        newValue = ( byte[] ) newRawValue;
                    }
                }

                new CreateValuesJob( attribute, newValue ).execute();
            }
        }
    }
View Full Code Here

            if ( oldValue.isEmpty() )
            {
                EventRegistry.suspendEventFireingInCurrentThread();
                attribute.deleteEmptyValue();
                EventRegistry.resumeEventFireingInCurrentThread();
                new CreateValuesJob( attribute, newRawValue ).execute();
            }
            else
            {
                new ModifyValueJob( oldValue, newRawValue ).execute();
            }
View Full Code Here

            for ( int v = 0; v < values.length; v++ )
            {
                newValues[v] = new Value( attribute, values[v].getRawValue() );
            }
           
            new CreateValuesJob( entry, newValues ).execute();
        }
    }
View Full Code Here

                IAttribute attribute = entry.getAttribute( attributeDescription );
                if ( attribute != null )
                {
                    if ( attribute.getValueSize() == 0 )
                    {
                        new CreateValuesJob( attribute, newRawValue ).execute();
                    }
                    else if ( attribute.getValueSize() == 1 )
                    {
                        this.modifyValue( attribute.getValues()[0], newRawValue );
                    }
                }
            }
            else
            {
                EventRegistry.suspendEventFireingInCurrentThread();
                IAttribute attribute = new Attribute( entry, attributeDescription );
                entry.addAttribute( attribute );
                EventRegistry.resumeEventFireingInCurrentThread();

                Object newValue;
                if ( SchemaUtils.isString( entry.getBrowserConnection().getSchema().getAttributeTypeDescription(
                    attributeDescription ), entry.getBrowserConnection().getSchema() ) )
                {
                    if ( newRawValue instanceof String )
                    {
                        newValue = ( String ) newRawValue;
                    }
                    else
                    {
                        newValue = LdifUtils.utf8decode( ( byte[] ) newRawValue );
                    }
                }
                else
                {
                    if ( newRawValue instanceof String )
                    {
                        newValue = LdifUtils.utf8encode( ( String ) newRawValue );
                    }
                    else
                    {
                        newValue = ( byte[] ) newRawValue;
                    }
                }

                new CreateValuesJob( attribute, newValue ).execute();
            }
        }
    }
View Full Code Here

            if ( oldValue.isEmpty() )
            {
                EventRegistry.suspendEventFireingInCurrentThread();
                attribute.deleteEmptyValue();
                EventRegistry.resumeEventFireingInCurrentThread();
                new CreateValuesJob( attribute, newRawValue ).execute();
            }
            else
            {
                new ModifyValueJob( oldValue, newRawValue ).execute();
            }
View Full Code Here

                attributeDescriptions[v] = attributeDescription;
                rawValues[v] = values[v].getRawValue();
            }
            IEntry entry = getSelectedAttributeHierarchies()[0].getAttribute().getEntry();

            new CreateValuesJob( entry, attributeDescriptions, rawValues ).execute();
        }
    }
View Full Code Here

            for ( int v = 0; v < values.length; v++ )
            {
                attributeNames[v] = values[v].getAttribute().getDescription();
                rawValues[v] = values[v].getRawValue();
            }
            new CreateValuesJob( entry, attributeNames, rawValues ).execute();
        }
    }
View Full Code Here

                IAttribute attribute = entry.getAttribute( attributeDescription );
                if ( attribute != null )
                {
                    if ( attribute.getValueSize() == 0 )
                    {
                        new CreateValuesJob( attribute, newRawValue ).execute();
                    }
                    else if ( attribute.getValueSize() == 1 )
                    {
                        this.modifyValue( attribute.getValues()[0], newRawValue );
                    }
                }
            }
            else
            {
                EventRegistry.suspendEventFireingInCurrentThread();
                IAttribute attribute = new Attribute( entry, attributeDescription );
                entry.addAttribute( attribute );
                EventRegistry.resumeEventFireingInCurrentThread();

                Object newValue;
                if ( entry.getBrowserConnection().getSchema().getAttributeTypeDescription( attributeDescription )
                    .getSyntaxDescription().isString() )
                {
                    if ( newRawValue instanceof String )
                    {
                        newValue = ( String ) newRawValue;
                    }
                    else
                    {
                        newValue = LdifUtils.utf8decode( ( byte[] ) newRawValue );
                    }
                }
                else
                {
                    if ( newRawValue instanceof String )
                    {
                        newValue = LdifUtils.utf8encode( ( String ) newRawValue );
                    }
                    else
                    {
                        newValue = ( byte[] ) newRawValue;
                    }
                }

                new CreateValuesJob( attribute, newValue ).execute();
            }
        }
    }
View Full Code Here

            if ( oldValue.isEmpty() )
            {
                EventRegistry.suspendEventFireingInCurrentThread();
                attribute.deleteEmptyValue();
                EventRegistry.resumeEventFireingInCurrentThread();
                new CreateValuesJob( attribute, newRawValue ).execute();
            }
            else
            {
                new ModifyValueJob( attribute, oldValue, newRawValue ).execute();
            }
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.ldapbrowser.core.jobs.CreateValuesJob

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.