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 != 4) {
                    throw new PropertyEditorException("Principal should have the form 'realm,domain,class,name'");
                }
                RealmPrincipalInfo principal = new RealmPrincipalInfo(parts[0], parts[1], parts[2], parts[3]);
                setValue(principal);
            } else {
                setValue(null);
View Full Code Here


        public void setAsText(String text) {
            if (text != null) {
                String[] parts = text.split(",");
                if (parts.length != 2) {
                    throw new PropertyEditorException("Principal should have the form 'name,class'");
                }
                PrincipalInfo principalInfo = new PrincipalInfo(parts[0], parts[1]);
                setValue(principalInfo);
            } 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 'domain,class,name'");
                }
                LoginDomainPrincipalInfo principal = new LoginDomainPrincipalInfo(parts[0], parts[1], parts[2]);
                setValue(principal);
            } else {
                setValue(null);
View Full Code Here

                        Set values = new HashSet(Arrays.asList(((String) entry.getValue()).split(",")));
                        result.put(entry.getKey(), values);
                    }
                    setValue(result);
                } catch (IOException e) {
                    throw new PropertyEditorException(e);
                }
            } else {
                setValue(null);
            }
        }
View Full Code Here

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

        public void setAsText(String text) {
            if (text != null) {
                String[] parts = text.split(",");
                if (parts.length != 2) {
                    throw new PropertyEditorException("Principal should have the form 'name,class'");
                }
                PrincipalInfo principalInfo = new PrincipalInfo(parts[0], parts[1]);
                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

        } 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

   
    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

        } 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

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.