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

com.openshift.restclient.model.template.ITemplate Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * Copyright (c) 2015 Red Hat, Inc. Distributed under license by Red Hat, Inc.
 * All rights reserved. This program is 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: Red Hat, Inc.
 ******************************************************************************/

package com.openshift.restclient.model.template;

import java.util.Collection;
import java.util.Map;

import com.openshift.restclient.model.IResource;

/**
 * Representation of a set of pre-configured parameterized set of resources
 * 
 */
public interface ITemplate extends IResource {

    /**
     * Retrieves the list of resources this template creates
     * 
     */
    Collection getObjects();

    /**
     * Returns a map of parameter names to parameters.
     * 
     */
    Map getParameters();

    /**
     * Update the template's parameter values, with the values from the collection
     * if a parameter with the same name is found
     * 
     */
    void updateParameterValues(Collection parameters);

    /**
     * Update a parameter if it exists
     * 
     */
    void updateParameter(String key, String value);

    /**
     * Retrieves the labels that are applied to the objects of the template when it
     * is processed.
     * 
     * @return Unmodifiable map of the item labels
     */
    Map getObjectLabels();

    /**
     * Add or update a label that is applied to the objects of the template when it
     * is processed
     * 
     */
    void addObjectLabel(String key, String value);

    /**
     * Returns true if the given resource contains the given text in
     * name or tags.
     * 
     */
    public boolean isMatching(final String filterText);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy