2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.restconf.rest.services.impl;
10 import com.google.common.base.Preconditions;
11 import java.util.Date;
12 import org.opendaylight.yangtools.yang.model.api.Module;
13 import org.opendaylight.yangtools.yang.model.api.ModuleImport;
16 * Fake {@link ModuleImport} implementation used to attach corrent prefix mapping to fake RPCs.
18 * @author Robert Varga
20 final class FakeModuleImport implements ModuleImport {
21 private final Module module;
23 FakeModuleImport(final Module module) {
24 this.module = Preconditions.checkNotNull(module);
28 public String getModuleName() {
29 return module.getName();
33 public Date getRevision() {
34 return module.getRevision();
38 public String getPrefix() {
39 return module.getName();