@Produces(value={"application/xml","application/json"})
@Consumes(value={"application/xml","application/json"})
public interface SourceDocResource
| Modifier and Type | Field and Description |
|---|---|
static String |
RESOURCE_NAME_REGEX |
static String |
RESOURCE_SLUG_REGEX |
static String |
RESOURCE_SLUG_TEMPLATE |
static String |
SERVICE_PATH |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
deleteResource(String idNoSlash)
Delete a Document.
|
javax.ws.rs.core.Response |
get(Set<String> extensions)
Retrieve the List of Documents (Resources) belonging to a Project
iteration.
|
javax.ws.rs.core.Response |
getResource(String idNoSlash,
Set<String> extensions)
Retrieves information for a Document.
|
javax.ws.rs.core.Response |
getResourceMeta(String idNoSlash,
Set<String> extensions)
Retrieves meta-data information for a Document.
|
javax.ws.rs.core.Response |
head()
Returns header information for a Project's iteration translations.
|
javax.ws.rs.core.Response |
post(Resource resource,
Set<String> extensions,
boolean copytrans)
Creates a new Document.
|
javax.ws.rs.core.Response |
putResource(String idNoSlash,
Resource resource,
Set<String> extensions,
boolean copytrans)
Creates or modifies a Document.
|
javax.ws.rs.core.Response |
putResourceMeta(String idNoSlash,
ResourceMeta messageBody,
Set<String> extensions)
Modifies an existing document's meta-data.
|
static final String SERVICE_PATH
static final String RESOURCE_SLUG_REGEX
static final String RESOURCE_NAME_REGEX
static final String RESOURCE_SLUG_TEMPLATE
@HEAD javax.ws.rs.core.Response head()
@GET
javax.ws.rs.core.Response get(@QueryParam(value="ext")
Set<String> extensions)
extensions - The document extensions to fetch along with the documents
(e.g. "gettext", "comment"). This parameter allows multiple
values e.g. "ext=gettext&ext=comment".@POST javax.ws.rs.core.Response post(Resource resource, @QueryParam(value="ext") Set<String> extensions, @QueryParam(value="copyTrans") @DefaultValue(value="true") boolean copytrans)
resource - The document information.extensions - The document extensions to save with the new document (e.g.
"gettext", "comment"). This parameter allows multiple values
e.g. "ext=gettext&ext=comment".copytrans - Boolean value that indicates whether reasonably close
translations from other projects should be found to initially
populate this document's translations.@GET
@Path(value="/{id:[a-zA-Z0-9]+([a-zA-Z0-9_\\-,{.}]*[a-zA-Z0-9]+)?}")
javax.ws.rs.core.Response getResource(@PathParam(value="id")
String idNoSlash,
@QueryParam(value="ext")
Set<String> extensions)
idNoSlash - The document identifier. Some document ids could have forward
slashes ('/') in them which would cause conflicts with the
browser's own url interpreter. For this reason, the supplied
id must have all its '/' characters replaced with commas
(',').extensions - The document extensions to fetch along with the document (e.g.
"gettext", "comment"). This parameter allows multiple values
e.g. "ext=gettext&ext=comment".@PUT
@Path(value="/{id:[a-zA-Z0-9]+([a-zA-Z0-9_\\-,{.}]*[a-zA-Z0-9]+)?}")
javax.ws.rs.core.Response putResource(@PathParam(value="id")
String idNoSlash,
Resource resource,
@QueryParam(value="ext")
Set<String> extensions,
@QueryParam(value="copyTrans") @DefaultValue(value="true")
boolean copytrans)
idNoSlash - The document identifier. Some document ids could have forward
slashes ('/') in them which would cause conflicts with the
browser's own url interpreter. For this reason, the supplied
id must have all its '/' characters replaced with commas
(',').resource - The document information.extensions - The document extensions to save with the document (e.g.
"gettext", "comment"). This parameter allows multiple values
e.g. "ext=gettext&ext=comment".copytrans - Boolean value that indicates whether reasonably close
translations from other projects should be found to initially
populate this document's translations.@DELETE
@Path(value="/{id:[a-zA-Z0-9]+([a-zA-Z0-9_\\-,{.}]*[a-zA-Z0-9]+)?}")
javax.ws.rs.core.Response deleteResource(@PathParam(value="id")
String idNoSlash)
idNoSlash - The document identifier. Some document ids could have forward
slashes ('/') in them which would cause conflicts with the
browser's own url interpreter. For this reason, the supplied
id must have all its '/' characters replaced with commas
(',').@GET
@Path(value="/{id:[a-zA-Z0-9]+([a-zA-Z0-9_\\-,{.}]*[a-zA-Z0-9]+)?}/meta")
javax.ws.rs.core.Response getResourceMeta(@PathParam(value="id")
String idNoSlash,
@QueryParam(value="ext")
Set<String> extensions)
idNoSlash - The document identifier. Some document ids could have forward
slashes ('/') in them which would cause conflicts with the
browser's own url interpreter. For this reason, the supplied
id must have all its '/' characters replaced with commas
(',').extensions - The document extensions to retrieve with the document's
meta-data (e.g. "gettext", "comment"). This parameter allows
multiple values e.g. "ext=gettext&ext=comment".@PUT
@Path(value="/{id:[a-zA-Z0-9]+([a-zA-Z0-9_\\-,{.}]*[a-zA-Z0-9]+)?}/meta")
javax.ws.rs.core.Response putResourceMeta(@PathParam(value="id")
String idNoSlash,
ResourceMeta messageBody,
@QueryParam(value="ext")
Set<String> extensions)
idNoSlash - The document identifier. Some document ids could have forward
slashes ('/') in them which would cause conflicts with the
browser's own url interpreter. For this reason, the supplied
id must have all its '/' characters replaced with commas
(',').messageBody - The document's meta-data.extensions - The document extensions to save with the document (e.g.
"gettext", "comment"). This parameter allows multiple values
e.g. "ext=gettext&ext=comment".Copyright © 2015 Zanata Project. All rights reserved.