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

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


                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


                int status = deleteMethod.getStatusCode();
                if (status == 200) {
                    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

                        }
                        msg.setBody(entries.toArray(new Entry[entries.size()]));
                    }

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

            } catch (Exception e) {
View Full Code Here

                        }
                        msg.setBody(entries.toArray(new Entry[entries.size()]));
                    }

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

            } catch (Exception e) {
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

          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

                                                            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

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.