001/*
002 * (C) Copyright 2014 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     Anahide Tchertchian
018 */
019package org.nuxeo.targetplatforms.api.impl;
020
021import org.nuxeo.targetplatforms.api.Target;
022
023/**
024 * {@link Target} implementation relying on an original implementation, useful for override when adding additional
025 * metadata.
026 *
027 * @since 5.7.1
028 */
029public class TargetExtension extends TargetInfoExtension implements Target {
030
031    private static final long serialVersionUID = 1L;
032
033    protected Target origTarget;
034
035    // needed by GWT serialization
036    protected TargetExtension() {
037        super();
038    }
039
040    public TargetExtension(Target orig) {
041        super(orig);
042        origTarget = orig;
043    }
044
045    @Override
046    public boolean isAfterVersion(String version) {
047        return origTarget.isAfterVersion(version);
048    }
049
050    @Override
051    public boolean isStrictlyBeforeVersion(String version) {
052        return origTarget.isStrictlyBeforeVersion(version);
053    }
054
055    @Override
056    public boolean isVersion(String version) {
057        return origTarget.isVersion(version);
058    }
059
060    @Override
061    public boolean isStrictlyBeforeVersion(Target version) {
062        return origTarget.isStrictlyBeforeVersion(version);
063    }
064
065    @Override
066    public boolean isAfterVersion(Target version) {
067        return origTarget.isAfterVersion(version);
068    }
069
070    @Override
071    public boolean isVersion(Target version) {
072        return origTarget.isAfterVersion(version);
073    }
074
075}