Package org.apache.geronimo.common.propertyeditor

Examples of org.apache.geronimo.common.propertyeditor.PropertyEditorException


        public void setAsText(String text) {
            if (text != null) {
                String[] parts = text.split(",");
                if (parts.length != 5) {
                    throw new PropertyEditorException("Principal should have the form 'realm,domain,class,name,run-as'");
                }
                RealmPrincipalInfo principal = new RealmPrincipalInfo(parts[0], parts[1], parts[2], parts[3], Boolean.valueOf(parts[4]).booleanValue());
                setValue(principal);
            } else {
                setValue(null);
View Full Code Here


        public void setAsText(String text) {
            if (text != null) {
                String[] parts = text.split(",");
                if (parts.length != 3) {
                    throw new PropertyEditorException("Principal should have the form 'name,class,run-as'");
                }
                PrincipalInfo principalInfo = new PrincipalInfo(parts[0], parts[1], Boolean.valueOf(parts[2]).booleanValue());
                setValue(principalInfo);
            } else {
                setValue(null);
View Full Code Here

        } else if ("SUFFICIENT".equals(getAsText())) {
            return LoginModuleControlFlag.SUFFICIENT;
        } else if ("OPTIONAL".equals(getAsText())) {
            return LoginModuleControlFlag.OPTIONAL;
        }
        throw new PropertyEditorException("Illegal value: '" + getAsText() + "'");
    }
View Full Code Here

        CSSCompoundSecMechConfig result = new CSSCompoundSecMechConfig();

        if (mechType.isSetSSL()) {
            result.setTransport_mech(extractSSLTransport(mechType.getSSL()));
        } else if (mechType.isSetSECIOP()) {
            throw new PropertyEditorException("SECIOP processing not implemented");
        } else {
            result.setTransport_mech(new CSSNULLTransportConfig());
        }

        if (mechType.isSetGSSUPStatic()) {
View Full Code Here

        }

        if (tss.isSetSSL()) {
            tssConfig.setTransport_mech(extractSSL(tss.getSSL()));
        } else if (tss.isSetSECIOP()) {
            throw new PropertyEditorException("SECIOP processing not implemented");
        } else {
            tssConfig.setTransport_mech(new TSSNULLTransportConfig());
        }

        if (tss.isSetCompoundSecMechTypeList()) {
View Full Code Here

   
    public void setAsText(String text) throws IllegalArgumentException {
        StringTokenizer tokenizer = new StringTokenizer(text, ",");
       
        if ( !tokenizer.hasMoreElements() ) {
            throw new PropertyEditorException("<Name>,<InetAddress>,<Port>");
        }
        String name = (String) tokenizer.nextElement();
       
        if ( !tokenizer.hasMoreElements() ) {
            throw new PropertyEditorException("<Name>,<InetAddress>,<Port>");
        }
        String addressAsString = (String) tokenizer.nextElement();
        InetAddressEditor addressEditor = new InetAddressEditor();
        addressEditor.setAsText(addressAsString);
        InetAddress address = (InetAddress) addressEditor.getValue();

        if ( !tokenizer.hasMoreElements() ) {
            throw new PropertyEditorException("<Name>,<InetAddress>,<Port>");
        }
        String portAsText = (String) tokenizer.nextElement();
        int port = Integer.parseInt(portAsText);
       
        nodeInfo = new NodeInfo(name, address, port);
View Full Code Here

   
    public void setAsText(String text) throws IllegalArgumentException {
        StringTokenizer tokenizer = new StringTokenizer(text, ",");

        if ( !tokenizer.hasMoreElements() ) {
            throw new PropertyEditorException("<InetAddress>,<port>");
        }
        InetAddressEditor addressEditor = new InetAddressEditor();
        addressEditor.setAsText((String) tokenizer.nextElement());
        InetAddress address = (InetAddress) addressEditor.getValue();
       
        if ( !tokenizer.hasMoreElements() ) {
            throw new PropertyEditorException("<InetAddress>,<port>");
        }
        int port = Integer.parseInt((String) tokenizer.nextElement());
        info = new ClusterInfo(address, port);
    }
View Full Code Here

        try {
            clazz = getClass().getClassLoader().loadClass(className);
            Constructor constructor = clazz.getConstructor(null);
            manager = (TopologyManager) constructor.newInstance(null);
        } catch (Exception e) {
            throw new PropertyEditorException(e);
        }
    }
View Full Code Here

        } else if ("SUFFICIENT".equals(getAsText())) {
            return LoginModuleControlFlag.SUFFICIENT;
        } else if ("OPTIONAL".equals(getAsText())) {
            return LoginModuleControlFlag.OPTIONAL;
        }
        throw new PropertyEditorException("Illegal value: '" + getAsText() + "'");
    }
View Full Code Here

        try {
            clazz = getClass().getClassLoader().loadClass(className);
            Constructor constructor = clazz.getConstructor(null);
            manager = (TopologyManager) constructor.newInstance(null);
        } catch (Exception e) {
            throw new PropertyEditorException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.common.propertyeditor.PropertyEditorException

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.