Examples of ObjectAlreadyExistsException


Examples of org.talend.esb.auxiliary.storage.common.exception.ObjectAlreadyExistsException

       if (Status.BAD_REQUEST.getStatusCode() == responseStatus) {
           throw new IllegalParameterException("Bad request server error");
       } else if (Status.NOT_FOUND.getStatusCode() == responseStatus) {
           throw new ObjectNotFoundException("Object not found in auxiliary storage");
       } else if (Status.CONFLICT.getStatusCode() == responseStatus) {
           throw new ObjectAlreadyExistsException("Object already exists in auxiliary storage");
       } else if (Status.INTERNAL_SERVER_ERROR.getStatusCode() == responseStatus) {
           throw new AuxiliaryStorageException("Internal server error");
       } else {
           throw new AuxiliaryStorageException("Unknown server error");
       }
View Full Code Here

Examples of org.talend.esb.auxiliary.storage.common.exception.ObjectAlreadyExistsException

            try {
                session = getSession();
                rootNode = session.getRootNode();

                if (rootNode.hasNode(key)) {
                    throw new ObjectAlreadyExistsException("Dublicated object with key {" + key + "}");
                }

                node = rootNode.addNode(key);
                node.setProperty(CONTEXT_DATA_PROPERTY_NAME, context);
                session.save();
View Full Code Here

Examples of org.talend.esb.auxiliary.storage.common.exception.ObjectAlreadyExistsException

        if (Status.BAD_REQUEST.getStatusCode() == r.getStatus()) {
            return new IllegalParameterException("This is one");
        } else if (Status.NOT_FOUND.getStatusCode() == r.getStatus()) {
            return new ObjectNotFoundException("Object was not found in auxiliary storage");
        } else if (Status.CONFLICT.getStatusCode() == r.getStatus()) {
            return new ObjectAlreadyExistsException("Object already exists in auxiliary storage");
        } else if (Status.INTERNAL_SERVER_ERROR.getStatusCode() == r.getStatus()) {
            return new AuxiliaryStorageException("Auxiliary storage error occured");
        } else {
            return new AuxiliaryStorageException("An error occured");
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.