Package org.globus.wsrf

Examples of org.globus.wsrf.InvalidResourceKeyException


     * @throws InvalidResourceKeyException missing/invalid
     */
    public String convertKey(ResourceKey key) throws InvalidResourceKeyException {

        if (key == null) {
            throw new InvalidResourceKeyException("resource key is missing");
        }

        if (!this.keyTypeName.equals(key.getName())) {
            throw new InvalidResourceKeyException("key is wrong QName, " +
                    "must be '" + this.keyTypeName.toString() + "'");
        }

        final String id = (String) key.getValue();
        if (id == null || id.trim().length() == 0) {
            throw new InvalidResourceKeyException("empty group ID in EPR");
        }

        return id;
    }
View Full Code Here


     * @throws InvalidResourceKeyException missing/invalid
     */
    public Integer convertKey(ResourceKey key) throws InvalidResourceKeyException {

        if (key == null) {
            throw new InvalidResourceKeyException("resource key is missing");
        }

        if (!this.keyTypeName.equals(key.getName())) {
            throw new InvalidResourceKeyException("key is wrong QName, " +
                    "must be '" + this.keyTypeName.toString() + "'");
        }

        try {
            return new Integer((String) key.getValue());
        } catch (NumberFormatException e) {
            throw new InvalidResourceKeyException(
                    "key value is not integer based");
        }
    }
View Full Code Here

     * @throws InvalidResourceKeyException missing/invalid
     */
    public String convertKey(ResourceKey key) throws InvalidResourceKeyException {

        if (key == null) {
            throw new InvalidResourceKeyException("resource key is missing");
        }

        if (!this.keyTypeName.equals(key.getName())) {
            throw new InvalidResourceKeyException("key is wrong QName, " +
                    "must be '" + this.keyTypeName.toString() + "'");
        }

        final String id = (String) key.getValue();
        if (id == null || id.trim().length() == 0) {
            throw new InvalidResourceKeyException("empty ensemble ID in EPR");
        }

        return id;
    }
View Full Code Here

TOP

Related Classes of org.globus.wsrf.InvalidResourceKeyException

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.