Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jersey-dev] which storage example

Hi,

I did a search to find the example being referred  to from the  jakarta jersey examples but my search  negative.

$ grep -RiIl 'MemoryStore.MS.hasContainer(c))'
docs/src/main/docbook/jaxrs-resources.xml

which  strorage service example  is being to referred in the sentence below ?

The following example is an extract from the storage service sample that shows the use of the PUT method to create or update a storage container:

Example 3.3. PUT method

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
@PUT
public Response putContainer() {
    System.out.println("PUT CONTAINER " + container);
 
    URI uri = uriInfo.getAbsolutePath();
    Container c = new Container(container, uri.toString());
 
    Response r;
    if (!MemoryStore.MS.hasContainer(c)) {
        r = Response.created(uri).build();
    } else {
        r = Response.noContent().build();
    }
 
    MemoryStore.MS.createContainer(c);
    return r;
}

 


Back to the top