001/*
002 *  Copyright 2010 Anyware Services
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
017package org.ametys.web.repository.page;
018
019import org.ametys.cms.repository.Content;
020import org.ametys.plugins.repository.AmetysRepositoryException;
021import org.ametys.plugins.repository.MovableAmetysObject;
022import org.ametys.plugins.repository.RemovableAmetysObject;
023import org.ametys.plugins.repository.metadata.ModifiableCompositeMetadata;
024import org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject;
025
026/**
027 * A zone item that can is modifiable
028 */
029public interface ModifiableZoneItem extends ZoneItem, ModifiableMetadataAwareAmetysObject, RemovableAmetysObject, MovableAmetysObject
030{
031    /**
032     * Set the type.<br>
033     * @param type the type.
034     * @throws AmetysRepositoryException if an error occurs.
035     * @see ZoneItem.ZoneType
036     */
037    public void setType(ZoneType type) throws AmetysRepositoryException;
038
039    /**
040     * Set the content reference.
041     * @param <C> the actual type of {@link Content}.
042     * @param content the content.
043     * @throws AmetysRepositoryException if an error occurs.
044     */
045    public <C extends Content> void setContent(C content) throws AmetysRepositoryException;
046    
047    /**
048     * Set the Content metadata set name.
049     * @param metadataSetName the metadata set name.
050     * @throws AmetysRepositoryException if an error occurs.
051     */
052    public void setMetadataSetName(String metadataSetName) throws AmetysRepositoryException;
053    
054    /**
055     * Set the service id.
056     * @param serviceId the service id.
057     * @throws AmetysRepositoryException if an error occurs.
058     */
059    public void setServiceId(String serviceId) throws AmetysRepositoryException;
060    
061    @Override
062    public ModifiableCompositeMetadata getServiceParameters () throws AmetysRepositoryException;
063}