Package javax.naming.directory

Examples of javax.naming.directory.Attribute


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

        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 getOrdering( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "m-ordering" );

        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 getSubstr( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "m-substr" );

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

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

        Attribute at = sr.getAttributes().get( "m-supObjectClass" );
        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 ObjectClassTypeEnum getType( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "m-typeObjectClass" );

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

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

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

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

        Attribute at = sr.getAttributes().get( "m-must" );
        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 boolean isHumanReadable( SearchResult sr ) throws NamingException
    {
        Attribute at = sr.getAttributes().get( "x-humanReadable" );

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

        if (attrId == null || attrs == null) {
            return null;
        }

        Attribute attr = attrs.get(attrId);
        if (attr == null) {
            return (null);
        }
        Object value = attr.get();
        if (value == null) {
            return (null);
        }
        String valueString = null;
        if (value instanceof byte[]) {
View Full Code Here

            return values;
        }
        if (values == null) {
            values = new ArrayList();
        }
        Attribute attr = attrs.get(attrId);
        if (attr == null) {
            return (values);
        }
        NamingEnumeration e = attr.getAll();
        while (e.hasMore()) {
            String value = (String) e.next();
            values.add(value);
        }
        return values;
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.