Package org.apache.tuscany.sca.implementation.data.collection

Examples of org.apache.tuscany.sca.implementation.data.collection.NotFoundException


        logger.info("get " + key);

        // Return the specified VM
        SCANodeVM vm = vm(key);
        if (vm == null) {
            throw new NotFoundException();
        }
       
        return item(vm);
    }
View Full Code Here


        File directory = new File(directoryName);
        File file = new File(directory, key);
        if (file.exists()) {
            file.delete();
        } else {
            throw new NotFoundException(key);
        }
    }
View Full Code Here

            Statement statement = connection.createStatement();
            ResultSet results = statement.executeQuery("select * from Cart where id = '" + key + "'");
            if (results.next()) {
                return new Item(results.getString("name"), results.getString("price"));
            } else {
                throw new NotFoundException(key);
            }
        } catch (SQLException e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here

            Statement statement = connection.createStatement();
            String query = "update into Cart set name = '" + item.getName() + "', price = '" + item.getPrice() + "' where id = '" + key + "'";
            System.out.println(query);
            int count = statement.executeUpdate(query);
            if (count == 0)
                throw new NotFoundException(key);
        } catch (SQLException e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here

            } else {
                String query = "delete from Cart where id = '" + key + "'";
                System.out.println(query);
                int count = statement.executeUpdate(query);
                if (count == 0)
                    throw new NotFoundException(key);
            }
        } catch (SQLException e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here

        // Read the contribution
        Contribution contribution;
        try {
            contribution = contribution(contributionURI, contributionItem.getAlternate());
        } catch (ContributionReadException e) {
            throw new NotFoundException(key);
        }

        // Find the specified deployable composite
        QName qname = compositeQName(key);
        for (Composite deployable: contribution.getDeployables()) {
            if (qname.equals(deployable.getName())) {
                if (deployable.isUnresolved()) {
                    throw new NotFoundException(key);
                }
               
                // Return an item describing the deployable composite
                return item(contribution, deployable);
            }
        }

        throw new NotFoundException(key);
    }
View Full Code Here

        for (Contribution contribution: workspace.getContributions()) {
            if (key.equals(contribution.getURI())) {
                return item(workspace, contribution);
            }
        }
        throw new NotFoundException(key);
    }
View Full Code Here

                // Write the workspace
                writeWorkspace(workspace);
                return;
            }
        }
        throw new NotFoundException(key);
    }
View Full Code Here

                // Write the workspace
                writeWorkspace(workspace);
                return;
            }
        }
        throw new NotFoundException(key);
    }
View Full Code Here

        logger.info("get " + key);

        // Return the specified VM
        SCANodeVM vm = vm(key);
        if (vm == null) {
            throw new NotFoundException();
        }
       
        return item(vm);
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.implementation.data.collection.NotFoundException

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.