@Path(value="/projects/p/{projectSlug:[a-zA-Z0-9]+([a-zA-Z0-9_\\-{.}]*[a-zA-Z0-9]+)?}/iterations/i/{iterationSlug:[a-zA-Z0-9]+([a-zA-Z0-9_\\-{.}]*[a-zA-Z0-9]+)?}")
public class MockSourceDocResource
extends Object
implements SourceDocResource
DOCID_RESOURCE_PATH, RESOURCE_NAME_REGEX, RESOURCE_PATH, RESOURCE_SLUG_REGEX, RESOURCE_SLUG_TEMPLATE, SERVICE_PATH| Constructor and Description |
|---|
MockSourceDocResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
deleteResource(String idNoSlash)
Deprecated.
|
javax.ws.rs.core.Response |
deleteResourceWithDocId(String docId)
Delete a source 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)
Deprecated.
|
javax.ws.rs.core.Response |
getResourceMeta(String idNoSlash,
Set<String> extensions)
Deprecated.
|
javax.ws.rs.core.Response |
getResourceMetaWithDocId(String docId,
Set<String> extensions)
Retrieves meta-data information for a source Document.
|
javax.ws.rs.core.Response |
getResourceWithDocId(String docId,
Set<String> extensions)
Retrieves information for a source Document.
|
javax.ws.rs.core.Response |
head()
Returns header information for a Project's iteration source strings.
|
javax.ws.rs.core.Response |
post(Resource resource,
Set<String> extensions,
boolean copyTrans)
Creates a new source Document.
|
javax.ws.rs.core.Response |
putResource(String idNoSlash,
Resource resource,
Set<String> extensions,
boolean copyTrans)
Deprecated.
|
javax.ws.rs.core.Response |
putResourceMeta(String idNoSlash,
ResourceMeta resourceMeta,
Set<String> extensions)
Deprecated.
|
javax.ws.rs.core.Response |
putResourceMetaWithDocId(ResourceMeta messageBody,
String docId,
Set<String> extensions)
Modifies an existing source document's meta-data.
|
javax.ws.rs.core.Response |
putResourceWithDocId(Resource resource,
String docId,
Set<String> extensions,
boolean copytrans)
Creates or modifies a source Document.
|
public javax.ws.rs.core.Response head()
SourceDocResourcehead in interface SourceDocResourcepublic javax.ws.rs.core.Response get(Set<String> extensions)
SourceDocResourceget in interface SourceDocResourceextensions - The document extensions to fetch along with the documents
(e.g. "gettext", "comment"). This parameter allows multiple
values e.g. "ext=gettext&ext=comment".public javax.ws.rs.core.Response post(Resource resource, Set<String> extensions, @DefaultValue(value="true") boolean copyTrans)
SourceDocResourcepost in interface SourceDocResourceresource - 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.@Deprecated public javax.ws.rs.core.Response getResource(String idNoSlash, Set<String> extensions)
SourceDocResourcegetResource in interface SourceDocResourceidNoSlash - 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".SourceDocResource.getResourceWithDocId(java.lang.String, java.util.Set<java.lang.String>)public javax.ws.rs.core.Response getResourceWithDocId(String docId, Set<String> extensions)
SourceDocResourcegetResourceWithDocId in interface SourceDocResourcedocId - The document identifier.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".@Deprecated public javax.ws.rs.core.Response putResource(String idNoSlash, Resource resource, Set<String> extensions, @DefaultValue(value="true") boolean copyTrans)
SourceDocResourceputResource in interface SourceDocResourceidNoSlash - 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.SourceDocResource.putResourceWithDocId(org.zanata.rest.dto.resource.Resource, java.lang.String, java.util.Set<java.lang.String>, boolean)public javax.ws.rs.core.Response putResourceWithDocId(Resource resource, String docId, Set<String> extensions, boolean copytrans)
SourceDocResourceputResourceWithDocId in interface SourceDocResourceresource - The document information.docId - The document identifier.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.@Deprecated public javax.ws.rs.core.Response deleteResource(String idNoSlash)
SourceDocResourcedeleteResource in interface SourceDocResourceidNoSlash - 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
(',').SourceDocResource.deleteResourceWithDocId(java.lang.String)public javax.ws.rs.core.Response deleteResourceWithDocId(String docId)
SourceDocResourcedeleteResourceWithDocId in interface SourceDocResourcedocId - The document identifier.@Deprecated public javax.ws.rs.core.Response getResourceMeta(String idNoSlash, Set<String> extensions)
SourceDocResourcegetResourceMeta in interface SourceDocResourceidNoSlash - 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".SourceDocResource.getResourceMetaWithDocId(java.lang.String, java.util.Set<java.lang.String>)public javax.ws.rs.core.Response getResourceMetaWithDocId(String docId, Set<String> extensions)
SourceDocResourcegetResourceMetaWithDocId in interface SourceDocResourcedocId - The document identifier.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".@Deprecated public javax.ws.rs.core.Response putResourceMeta(String idNoSlash, ResourceMeta resourceMeta, Set<String> extensions)
SourceDocResourceputResourceMeta in interface SourceDocResourceidNoSlash - 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
(',').resourceMeta - 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".SourceDocResource.putResourceMetaWithDocId(org.zanata.rest.dto.resource.ResourceMeta, java.lang.String, java.util.Set<java.lang.String>)public javax.ws.rs.core.Response putResourceMetaWithDocId(ResourceMeta messageBody, String docId, Set<String> extensions)
SourceDocResourceputResourceMetaWithDocId in interface SourceDocResourcemessageBody - The document's meta-data.docId - The document identifier.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 © 2018 Zanata Project. All rights reserved.