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

org.xlcloud.service.api.LayerBlueprintsApi Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2012 AMG.lab, a Bull Group Company
 * 
 * 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 org.xlcloud.service.api;

import org.xlcloud.rest.exception.ObjectNotFoundException;
import org.xlcloud.service.LayerBlueprint;
import org.xlcloud.service.LayerBlueprints;

/**
 * Interface for {@link LayerBlueprints} ReST resource.
 * 
 * @author Tomek Adamczewski, AMG.net
 * @author Krzysztof Szafrański, AMG.net
 */
public interface LayerBlueprintsApi {
    
    /**
     * Returns a list of all public {@link LayerBlueprints}
     * 
     * @return list of all public {@link LayerBlueprints}
     * @throws ObjectNotFoundException
     *             if not found matching {@link LayerBlueprint}
     */
    LayerBlueprints list() throws ObjectNotFoundException;

    /**
     * Get details of layer blueprint
     *
     * @param id
     *      id of the {@link LayerBlueprint}
     * @return {@link LayerBlueprint} details
     * @throws ObjectNotFoundException
     *             if no blueprint exists with specified id
     */
    LayerBlueprint get(Long id) throws ObjectNotFoundException;

    /**
     * Removes layer blueprint along with the related file.
     *
     * @param id
     *      id of the {@link LayerBlueprint}
     */
    void remove(Long id);
    
    /**
     * Exports a stack blueprint layer to a separate and independent layer
     * blueprint.
     * 
     * @param id
     *      id of the {@link LayerBlueprint}
     * @param blueprint
     *      {@link LayerBlueprint} details
     * @return newly created {@link LayerBlueprint}
     */
    LayerBlueprint export(Long id, LayerBlueprint blueprint);
    
    /**
     * Promotes layer with the specified id to a public layer blueprint. Given
     * blueprint specifies name, type, author, license and copyright.
     * 
     * @param layerId
     *      id of the {@link LayerBlueprint}
     * @param blueprint
     *      {@link LayerBlueprint} details
     * @return created {@link LayerBlueprint}
     */
    LayerBlueprint promote(Long layerId, LayerBlueprint blueprint);

    /**
     * 
     * @param id
     * @param layer
     * @return
     */
    LayerBlueprint update(Long id, LayerBlueprint layer);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy