Package javax.naming.directory

Examples of javax.naming.directory.Attribute


     */
    private static String[] getNames( SearchResult sr ) throws NamingException
    {
        List<String> names = new ArrayList<String>();

        Attribute at = sr.getAttributes().get( "m-name" );
        if ( at != null )
        {
            NamingEnumeration<?> ne = at.getAll();
            while ( ne.hasMore() )
            {
                names.add( ( String ) ne.next() );
            }
        }
View Full Code Here


     * @throws NamingException
     *      if an error occurrs when searching in the SearchResult
     */
    private static String getDescription( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "m-description" );

        if ( at == null )
        {
            return null;
        }
        else
        {
            return ( String ) at.get();
        }
    }
View Full Code Here

     * @throws NamingException
     *      if an error occurrs when searching in the SearchResult
     */
    private static String getSuperior( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "m-supAttributeType" );

        if ( at == null )
        {
            return null;
        }
        else
        {
            return ( String ) at.get();
        }
    }
View Full Code Here

     * @throws NamingException
     *      if an error occurrs when searching in the SearchResult
     */
    private static UsageEnum getUsage( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "m-usage" );

        if ( at == null )
        {
            return UsageEnum.USER_APPLICATIONS;
        }
        else
        {
            try
            {
                return Enum.valueOf( UsageEnum.class, ( String ) at.get() );
            }
            catch ( IllegalArgumentException e )
            {
                return UsageEnum.USER_APPLICATIONS;
            }
View Full Code Here

     * @throws NamingException
     *      if an error occurrs when searching in the SearchResult
     */
    private static String getSyntax( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "m-syntax" );

        if ( at == null )
        {
            return null;
        }
        else
        {
            return ( String ) at.get();
        }
    }
View Full Code Here

     * @throws NamingException
     *      if an error occurrs when searching in the SearchResult
     */
    private static int getSyntaxLength( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "m-length" );

        if ( at == null )
        {
            return -1;
        }
        else
        {
            try
            {
                return Integer.parseInt( ( String ) at.get() );
            }
            catch ( NumberFormatException e )
            {
                return -1;
            }
View Full Code Here

     * @throws NamingException
     *      if an error occurrs when searching in the SearchResult
     */
    private static boolean isObsolete( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "m-obsolete" );

        if ( at == null )
        {
            return false;
        }
        else
        {
            return Boolean.parseBoolean( ( String ) at.get() );
        }
    }
View Full Code Here

     * @throws NamingException
     *      if an error occurrs when searching in the SearchResult
     */
    private static boolean isCollective( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "m-collective" );

        if ( at == null )
        {
            return false;
        }
        else
        {
            return Boolean.parseBoolean( ( String ) at.get() );
        }
    }
View Full Code Here

     * @throws NamingException
     *      if an error occurrs when searching in the SearchResult
     */
    private static boolean isSingleValue( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "m-singleValue" );

        if ( at == null )
        {
            return false;
        }
        else
        {
            return Boolean.parseBoolean( ( String ) at.get() );
        }
    }
View Full Code Here

     * @throws NamingException
     *      if an error occurrs when searching in the SearchResult
     */
    private static boolean isCanUserModify( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "m-noUserModification" );

        if ( at == null )
        {
            return true;
        }
        else
        {
            return !Boolean.parseBoolean( ( String ) at.get() );
        }
    }
View Full Code Here

TOP

Related Classes of javax.naming.directory.Attribute

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.