/* * Copyright (c) 2020 - present Cloudogu GmbH * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see https://www.gnu.org/licenses/. */ import { Hit } from "@scm-manager/ui-types"; export const javaHit: Hit = { score: 2.5, fields: { content: { highlighted: true, fragments: [ "import org.slf4j.LoggerFactory;\n\nimport java.util.Date;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.concurrent.TimeUnit;\n\n/**\n * Jwt implementation of {@link <|[[--AccessTokenBuilder--]]|>}.\n * \n * @since 2.0.0\n */\npublic final class <|[[--JwtAccessTokenBuilder--]]|> implements <|[[--AccessTokenBuilder--]]|> {\n\n /**\n * the logger for <|[[--JwtAccessTokenBuilder--]]|>\n */\n private static final Logger LOG = LoggerFactory.getLogger(<|[[--JwtAccessTokenBuilder.class--]]|>);\n \n private final KeyGenerator keyGenerator; \n private final SecureKeyResolver keyResolver; \n \n private String subject;\n private String issuer;\n", " private final Map custom = Maps.newHashMap();\n \n <|[[--JwtAccessTokenBuilder--]]|>(KeyGenerator keyGenerator, SecureKeyResolver keyResolver) {\n this.keyGenerator = keyGenerator;\n this.keyResolver = keyResolver;\n }\n\n @Override\n public <|[[--JwtAccessTokenBuilder--]]|> subject(String subject) {\n", ' public <|[[--JwtAccessTokenBuilder--]]|> custom(String key, Object value) {\n Preconditions.checkArgument(!Strings.isNullOrEmpty(key), "null or empty value not allowed");\n Preconditions.checkArgument(value != null, "null or empty value not allowed");\n', ], matchesContentStart: false, matchesContentEnd: false, }, }, _links: {}, }; export const bashHit: Hit = { score: 2.5, fields: { content: { highlighted: true, fragments: [ '# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n#\n\n<|[[--getent--]]|> group scm >/dev/null || groupadd -r scm\n<|[[--getent--]]|> passwd scm >/dev/null || \\\n useradd -r -g scm -M \\\n -s /sbin/nologin -d /var/lib/scm \\\n -c "user for the scm-server process" scm\nexit 0\n\n', ], matchesContentStart: false, matchesContentEnd: true, }, }, _links: {}, }; export const markdownHit: Hit = { score: 2.5, fields: { content: { highlighted: true, fragments: [ "---\ntitle: SCM-Manager v2 Test <|[[--Cases--]]|>\n---\n\nDescribes the expected behaviour for SCMM v2 REST Resources using manual tests.\n\nThe following states general test <|[[--cases--]]|> per HTTP Method and en expected return code as well as exemplary curl calls.\nResource-specifics are stated \n\n## Test <|[[--Cases--]]|>\n\n### GET\n\n- Collection Resource (e.g. `/users`)\n - Without parameters -> 200\n - Parameters\n - `?pageSize=1` -> Only one embedded element, pageTotal reflects the correct number of pages, `last` link points to last page.\n - `?pageSize=1&page=1` -> `next` link points to page 0 ; `prev` link points to page 2\n - `?sortBy=admin` -> Sorted by `admin` field of embedded objects\n - `?sortBy=admin&desc=true` -> Invert sorting\n- Individual Resource (e.g. `/users/scmadmin`)\n - Exists -> 200\n", "\n### DELETE\n\n- existing -> 204\n- not existing -> 204\n- without permission -> 401\n\n## Exemplary calls & Resource specific test <|[[--cases--]]|>\n\nIn order to extend those tests to other Resources, have a look at the rest docs. Note that the Content Type is specific to each resource as well.\n", ], matchesContentStart: true, matchesContentEnd: false, }, }, _links: {}, }; export const filenameXmlHit: Hit = { score: 10.592262, fields: { content: { highlighted: false, value: '\n\n\n 4.0.0\n\n \n scm-clients\n sonia.scm.clients\n 2.0.0-SNAPSHOT\n \n\n scm-cli-client\n 2.0.0-SNAPSHOT\n scm-cli-client\n\n \n\n \n\n \n jakarta.servlet\n jakarta.servlet-api\n ${servlet.version}\n \n\n \n jakarta.transaction\n jta\n 1.1\n provided\n \n\n \n sonia.scm.clients\n scm-client-impl\n 2.0.0-SNAPSHOT\n \n\n \n args4j\n args4j\n 2.0.29\n \n\n \n ch.qos.logback\n logback-classic\n ${logback.version}\n \n\n \n org.freemarker\n freemarker\n 2.3.21\n \n\n \n\n \n \n\n \n com.mycila.maven-license-plugin\n maven-license-plugin\n 1.9.0\n \n
http://download.scm-manager.org/licenses/mvn-license.txt
\n \n src/**\n **/test/**\n \n \n target/**\n .hg/**\n **/*.ftl\n \n true\n
\n
\n\n \n org.apache.maven.plugins\n maven-assembly-plugin\n 2.3\n \n \n \n sonia.scm.cli.App\n \n \n \n jar-with-dependencies\n \n \n \n \n package\n \n single\n \n \n \n \n\n
\n
\n\n
\n', }, }, _links: {}, }; export const pullRequestHit: Hit = { score: 0.2837065, fields: { description: { highlighted: false, value: "The Hitchhiker's Guide to the Galaxy (sometimes referred to as **HG2G**, **HHGTTG** or **H2G2**) is a comedy science fiction series created by Douglas Adams. Originally a radio comedy broadcast on BBC Radio 4 in 1978, it was later adapted to other formats, including stage shows, novels, comic books, a 1981 TV series, a 1984 video game, and 2005 feature film.\n\nThis fixes a SQL Injection, a Race condition and a XSS\n\nA prominent series in British popular culture, The Hitchhiker's Guide to the Galaxy has become an international multi-media phenomenon; the novels are the most widely distributed, having been translated into more than 30 languages by 2005. In 2017, BBC Radio 4 announced a 40th-anniversary celebration with Dirk Maggs, one of the original producers, in charge. This sixth series of the sci-fi spoof has been based on Eoin Colfer's book And Another Thing, with additional unpublished material by Douglas Adams. The first of six new episodes was broadcast on 8 March 2018.", }, }, _links: {}, };