blob: c506fe0bc8013ef3908a080087e4ef730562d7ae [file] [log] [blame]
Andrew Bonventre199efc42017-05-10 13:57:39 -07001// 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
15package com.google.gitiles;
16
Andrew Bonventre199efc42017-05-10 13:57:39 -070017import org.eclipse.jgit.lib.ObjectId;
18
19class FileJsonData {
20 static class File {
21 String id;
22 String repo;
23 String revision;
24 String path;
25 }
26
David Pursehouse4f2d63c2017-05-30 10:35:54 +090027 static File toJsonData(ObjectId id, String repo, String revision, String path) {
Andrew Bonventre199efc42017-05-10 13:57:39 -070028 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}