Moved creation of GerritPersonIdent to a separate provider.

It's first step to make GerritServer focused on providing one specific
functionality.

Since now classes that need PersonIdent that represents Gerrit itself can
ask for it using @GerritPersonIdent annotation or by depending on Provider
instance and calling get() method.

Change-Id: I9be482c6afdfc5cf4ab44efcb9262a04b3a543a5
Signed-off-by: Grzegorz Kossakowski <grek@google.com>
This commit is contained in:
Grzegorz Kossakowski
2009-09-09 19:09:26 -07:00
parent 43b3d1a9ad
commit 5490b1c037
7 changed files with 100 additions and 26 deletions

View File

@@ -0,0 +1,30 @@
// Copyright (C) 2009 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.server;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import com.google.inject.BindingAnnotation;
import java.lang.annotation.Retention;
/**
* Marker on a {@link org.spearce.jgit.lib.PersonIdent} pointing to the identity representing Gerrit
* server itself.
*/
@Retention(RUNTIME)
@BindingAnnotation
public @interface GerritPersonIdent {
}