| Andrew Bonventre | 199efc4 | 2017-05-10 13:57:39 -0700 | [diff] [blame] | 1 | // Copyright (C) 2017 Google Inc. All Rights Reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package com.google.gitiles; |
| 16 | |
| Andrew Bonventre | 199efc4 | 2017-05-10 13:57:39 -0700 | [diff] [blame] | 17 | import org.eclipse.jgit.lib.ObjectId; |
| 18 | |
| 19 | class FileJsonData { |
| 20 | static class File { |
| 21 | String id; |
| 22 | String repo; |
| 23 | String revision; |
| 24 | String path; |
| 25 | } |
| 26 | |
| David Pursehouse | 4f2d63c | 2017-05-30 10:35:54 +0900 | [diff] [blame] | 27 | static File toJsonData(ObjectId id, String repo, String revision, String path) { |
| Andrew Bonventre | 199efc4 | 2017-05-10 13:57:39 -0700 | [diff] [blame] | 28 | File file = new File(); |
| 29 | file.id = id.name(); |
| 30 | file.repo = repo; |
| 31 | file.revision = revision; |
| 32 | file.path = path; |
| 33 | return file; |
| 34 | } |
| 35 | |
| 36 | private FileJsonData() {} |
| 37 | } |