public abstract class AbstractLocatorsResource extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PREFERRED_PATH_VALUE |
Constructor and Description |
---|
AbstractLocatorsResource() |
Modifier and Type | Method and Description |
---|---|
protected javax.ws.rs.core.Response |
copySingle(com.github.jinahya.simple.file.back.FileContext fileContext,
String sourceLocator,
String targetLocator,
boolean distributeFlag) |
javax.ws.rs.core.Response |
copySingle(String sourceLocator,
String targetLocator,
boolean distribute) |
javax.ws.rs.core.Response |
deleteSingle(String locator,
boolean distribute) |
protected com.github.jinahya.simple.file.back.FileBack |
getFileBack()
Returns the injected backing.
|
protected List<URI> |
getFileFronts()
Returns the injected siblings.
|
protected static ByteBuffer |
key(String locator) |
protected javax.ws.rs.core.Response |
readSingle(com.github.jinahya.simple.file.back.FileContext fileContext,
String sourceLocator) |
javax.ws.rs.core.Response |
readSingle(String locator) |
protected javax.ws.rs.core.Response |
updateSingle(com.github.jinahya.simple.file.back.FileContext fileContext,
String targetLocator,
InputStream sourceStream,
boolean distributeFlag) |
javax.ws.rs.core.Response |
updateSingle(String locator,
boolean distribute,
InputStream entity) |
public static final String PREFERRED_PATH_VALUE
protected static ByteBuffer key(String locator)
protected javax.ws.rs.core.Response copySingle(com.github.jinahya.simple.file.back.FileContext fileContext, String sourceLocator, String targetLocator, boolean distributeFlag) throws IOException, com.github.jinahya.simple.file.back.FileBackException
IOException
com.github.jinahya.simple.file.back.FileBackException
@POST @Path(value="/{locator: .+}/copy") public javax.ws.rs.core.Response copySingle(@PathParam(value="locator") String sourceLocator, @QueryParam(value="locator") String targetLocator, @QueryParam(value="distribute") @DefaultValue(value="true") boolean distribute) throws IOException, com.github.jinahya.simple.file.back.FileBackException
IOException
com.github.jinahya.simple.file.back.FileBackException
@DELETE @Path(value="{locator: .+}") public javax.ws.rs.core.Response deleteSingle(@PathParam(value="locator") String locator, @QueryParam(value="distribute") @DefaultValue(value="true") boolean distribute) throws IOException, com.github.jinahya.simple.file.back.FileBackException
locator
- distribute
- IOException
- if an I/O error occurs.com.github.jinahya.simple.file.back.FileBackException
- if a file back error occurs.FileBack.operate(com.github.jinahya.simple.file.back.FileContext)
protected javax.ws.rs.core.Response readSingle(com.github.jinahya.simple.file.back.FileContext fileContext, String sourceLocator) throws IOException, com.github.jinahya.simple.file.back.FileBackException
IOException
com.github.jinahya.simple.file.back.FileBackException
@Produces(value="*/*") @GET @Path(value="{locator: .+}") public javax.ws.rs.core.Response readSingle(@PathParam(value="locator") String locator) throws IOException, com.github.jinahya.simple.file.back.FileBackException
locator
- the file locator.IOException
- if an I/O error occurs.com.github.jinahya.simple.file.back.FileBackException
- if a file back error occurs.protected javax.ws.rs.core.Response updateSingle(com.github.jinahya.simple.file.back.FileContext fileContext, String targetLocator, InputStream sourceStream, boolean distributeFlag)
@Consumes(value="*/*") @PUT @Path(value="{locator: .+}") public javax.ws.rs.core.Response updateSingle(@PathParam(value="locator") String locator, @QueryParam(value="distribute") @DefaultValue(value="true") boolean distribute, InputStream entity) throws IOException, com.github.jinahya.simple.file.back.FileBackException
locator
- file locatordistribute
- distribute flagentity
- the entity to update.IOException
- if an I/O error occurs.com.github.jinahya.simple.file.back.FileBackException
- if a file back error occusr.FileBack.operate(com.github.jinahya.simple.file.back.FileContext)
protected com.github.jinahya.simple.file.back.FileBack getFileBack()
Copyright © 2011–2015. All rights reserved.