All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hudson.model.ViewDescriptor Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 *
 * Copyright (c) 2004-2009 Oracle Corporation.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 * 
 *    Kohsuke Kawaguchi
 *
 *
 *******************************************************************************/ 

package hudson.model;

/**
 * {@link Descriptor} for {@link View}.
 *
 * @author Kohsuke Kawaguchi
 * @since 1.269
 */
public abstract class ViewDescriptor extends Descriptor {

    /**
     * Returns the human-readable name of this type of view. Used in the view
     * creation screen. The string should look like "Abc Def Ghi".
     */
    public abstract String getDisplayName();

    /**
     * Some special views are not instantiable, and for those this method
     * returns false.
     */
    public boolean isInstantiable() {
        return true;
    }

    /**
     * Jelly fragment included in the "new view" page.
     */
    public final String getNewViewDetailPage() {
        return '/' + clazz.getName().replace('.', '/').replace('$', '/') + "/newViewDetail.jelly";
    }

    protected ViewDescriptor(Class clazz) {
        super(clazz);
    }

    protected ViewDescriptor() {
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy