Package org.apache.tuscany.sca.binding.atom.collection

Examples of org.apache.tuscany.sca.binding.atom.collection.NotFoundException


            entry.setUpdated(now);
            lastModified = now;
            entries.put(id, entry);
        }
        else {
            throw new NotFoundException();
        }
    }
View Full Code Here


        if(entries.containsKey(id)){
            entries.remove(id);
            lastModified = new Date();
        }
        else {
            throw new NotFoundException();
        }
    }
View Full Code Here

                        msg.setBody(entry.getData());
                    }

                } else if (status == 404) {
                    if (provider.supportsFeedEntries())
                        msg.setFaultBody(new NotFoundException());
                    else
                        msg.setFaultBody(new org.apache.tuscany.sca.data.collection.NotFoundException());
                } else {
                    msg.setFaultBody(new ServiceRuntimeException("HTTP status code: " + status));
                }
View Full Code Here

                        msg.setBody(createdEntry.getId().toString());
                    }

                } else if (status == 404) {
                    if (provider.supportsFeedEntries())
                        msg.setFaultBody(new NotFoundException());
                    else
                        msg.setFaultBody(new org.apache.tuscany.sca.data.collection.NotFoundException());
                } else {
                    msg.setFaultBody(new ServiceRuntimeException("HTTP status code: " + status));
                }
View Full Code Here

            entry.setUpdated(now);
            lastModified = now;
            entries.put(id, entry);
        }
        else {
            throw new NotFoundException();
        }
    }
View Full Code Here

        if(entries.containsKey(id)){
            entries.remove(id);
            lastModified = new Date();
        }
        else {
            throw new NotFoundException();
        }
    }
View Full Code Here

        //System.out.println(">>> MediaCollectionImpl.putMedia id=" + id + ", contentType=" + contentType );

        // Must responsd with success or not found as per Atom Pub spec (http://tools.ietf.org/html/rfc5023#section-9.6)
        // Body is null.
        if ( !id.endsWith( "0" ) )
            throw new NotFoundException( "Media at id=" + id + " not found." );

        // A true implementation would update the media in the media repository.
    }
View Full Code Here

                                                            provider.getItemXMLType(), provider.getMediator());
                        msg.setBody(entry.getData());
                    }

                } else if (status == 404) {
                    msg.setFaultBody(new NotFoundException());
                } else {
                    msg.setFaultBody(new ServiceRuntimeException("HTTP status code: " + status));
                }

            } catch (Exception e) {
View Full Code Here

                        // Returns the id of the created entry
                        msg.setBody(createdEntry.getId().toString());
                    }

                } else if (status == 404) {
                    msg.setFaultBody(new NotFoundException());
                } else {
                    msg.setFaultBody(new ServiceRuntimeException("HTTP status code: " + status));
                }

            } catch (Exception e) {
View Full Code Here

                if (status == 200 || status == 201) {

                    msg.setBody(null);

                } else if (status == 404) {
                    msg.setFaultBody(new NotFoundException());
                } else {
                    msg.setFaultBody(new ServiceRuntimeException("HTTP status code: " + status));
                }

            } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.binding.atom.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.