Examples of UsageEnum


Examples of org.apache.directory.api.ldap.model.schema.UsageEnum

     */
    public void decorate( Object element, IDecoration decoration )
    {
        if ( element instanceof AttributeTypeWrapper )
        {
            UsageEnum usage = ( ( AttributeTypeWrapper ) element ).getAttributeType().getUsage();
            if ( usage == UsageEnum.USER_APPLICATIONS )
            {
                decoration.addOverlay( Activator.getDefault().getImageDescriptor(
                    PluginConstants.IMG_ATTRIBUTE_TYPE_OVERLAY_USER_APPLICATION ), IDecoration.BOTTOM_RIGHT );
            }
            else if ( ( usage == UsageEnum.DIRECTORY_OPERATION ) || ( usage == UsageEnum.DISTRIBUTED_OPERATION )
                || ( usage == UsageEnum.DSA_OPERATION ) )
            {
                decoration.addOverlay( Activator.getDefault().getImageDescriptor(
                    PluginConstants.IMG_ATTRIBUTE_TYPE_OVERLAY_OPERATION ), IDecoration.BOTTOM_RIGHT );
            }
        }
        else if ( element instanceof ObjectClassWrapper )
        {
            ObjectClassTypeEnum classType = ( ( ObjectClassWrapper ) element ).getObjectClass().getType();
            if ( classType == ObjectClassTypeEnum.ABSTRACT )
            {
                decoration.addOverlay( Activator.getDefault().getImageDescriptor(
                    PluginConstants.IMG_OBJECT_CLASS_OVERLAY_ABSTRACT ), IDecoration.BOTTOM_RIGHT );
            }
            else if ( classType == ObjectClassTypeEnum.STRUCTURAL )
            {
                decoration.addOverlay( Activator.getDefault().getImageDescriptor(
                    PluginConstants.IMG_OBJECT_CLASS_OVERLAY_STRUCTURAL ), IDecoration.BOTTOM_RIGHT );
            }
            else if ( classType == ObjectClassTypeEnum.AUXILIARY )
            {
                decoration.addOverlay( Activator.getDefault().getImageDescriptor(
                    PluginConstants.IMG_OBJECT_CLASS_OVERLAY_AUXILIARY ), IDecoration.BOTTOM_RIGHT );
            }
        }
        else if ( element instanceof AttributeType )
        {
            UsageEnum usage = ( ( AttributeType ) element ).getUsage();
            if ( usage == UsageEnum.USER_APPLICATIONS )
            {
                decoration.addOverlay( Activator.getDefault().getImageDescriptor(
                    PluginConstants.IMG_ATTRIBUTE_TYPE_OVERLAY_USER_APPLICATION ), IDecoration.BOTTOM_RIGHT );
            }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.schema.UsageEnum

    /**
     * Fills the Usage Combo from the attribute type value
     */
    private void fillInUsageCombo()
    {
        UsageEnum usage = getModifiedAttributeType().getUsage();

        switch ( usage )
        {
            case DIRECTORY_OPERATION:
                usageCombo.select( 0 );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.schema.UsageEnum

        {
            atNode.addElement( SUPERIOR_TAG ).setText( superior );
        }

        // Usage
        UsageEnum usage = at.getUsage();
        if ( usage != null )
        {
            atNode.addElement( USAGE_TAG ).setText( usage.toString() );
        }

        // Syntax
        String syntax = at.getSyntaxOid();
        if ( ( syntax != null ) && ( !syntax.equals( "" ) ) ) //$NON-NLS-1$
View Full Code Here

Examples of org.apache.directory.api.ldap.model.schema.UsageEnum

        {
            sb.append( "\tNO-USER-MODIFICATION \n" ); //$NON-NLS-1$
        }

        // USAGE
        UsageEnum usage = at.getUsage();
        if ( usage != null )
        {
            if ( usage == UsageEnum.DIRECTORY_OPERATION )
            {
                sb.append( "\tUSAGE directoryOperation \n" ); //$NON-NLS-1$
View Full Code Here

Examples of org.apache.directory.api.ldap.model.schema.UsageEnum

     *      the entry
     * @throws LdapException
     */
    private static void addUsageValue( AttributeType attributeType, Entry entry ) throws LdapException
    {
        UsageEnum usage = attributeType.getUsage();
        if ( usage != UsageEnum.USER_APPLICATIONS )
        {
            Attribute attribute = new DefaultAttribute( M_USAGE, usage.render() );
            entry.add( attribute );
        }
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.schema.UsageEnum

     * @return
     *      the 'Usage' difference between the two AttributeType Objects
     */
    private static PropertyDifference getUsageDifference( AttributeType at1, AttributeType at2 )
    {
        UsageEnum at1Usage = at1.getUsage();
        UsageEnum at2Usage = at2.getUsage();

        if ( at1Usage != at2Usage )
        {
            PropertyDifference diff = new UsageDifference( at1, at2 );
            diff.setOldValue( at1Usage );
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.UsageEnum

        {
            atNode.addElement( SUPERIOR_TAG ).setText( superior );
        }

        // Usage
        UsageEnum usage = at.getUsage();
        if ( usage != null )
        {
            atNode.addElement( USAGE_TAG ).setText( usage.toString() );
        }

        // Syntax
        String syntax = at.getSyntaxOid();
        if ( ( syntax != null ) && ( !syntax.equals( "" ) ) ) //$NON-NLS-1$
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.UsageEnum

        {
            sb.append( "\tNO-USER-MODIFICATION \n" ); //$NON-NLS-1$
        }

        // USAGE
        UsageEnum usage = at.getUsage();
        if ( usage != null )
        {
            if ( usage == UsageEnum.DIRECTORY_OPERATION )
            {
                sb.append( "\tUSAGE directoryOperation \n" ); //$NON-NLS-1$
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.UsageEnum

            {
                dependenciesMap.put( superiorAT, at );
                dependsOnMap.put( at, superiorAT );

                // Checking Usage with superior's
                UsageEnum usage = at.getUsage();
                UsageEnum superiorATUsage = superiorAT.getUsage();
                if ( !usage.equals( superiorATUsage ) )
                {
                    SchemaError error = new DifferentUsageAsSuperiorError( at, superiorAT );
                    errorsList.add( error );
                    errorsMap.put( at, error );
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.UsageEnum

        {
            sb.append( "\tNO-USER-MODIFICATION \n" ); //$NON-NLS-1$
        }

        // USAGE
        UsageEnum usage = literal.getUsage();
        if ( usage != null )
        {
            if ( usage == UsageEnum.DIRECTORY_OPERATION )
            {
                sb.append( "\tUSAGE directoryOperation \n" ); //$NON-NLS-1$
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.