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.ModifiableAmetysObject; 022import org.ametys.plugins.repository.MovableAmetysObject; 023import org.ametys.plugins.repository.RemovableAmetysObject; 024import org.ametys.plugins.repository.data.ametysobject.ModifiableModelLessDataAwareAmetysObject; 025import org.ametys.plugins.repository.data.holder.ModifiableModelAwareDataHolder; 026 027/** 028 * A zone item that can is modifiable 029 */ 030public interface ModifiableZoneItem extends ZoneItem, ModifiableModelLessDataAwareAmetysObject, ModifiableAmetysObject, RemovableAmetysObject, MovableAmetysObject 031{ 032 /** 033 * Set the type.<br> 034 * @param type the type. 035 * @throws AmetysRepositoryException if an error occurs. 036 * @see ZoneItem.ZoneType 037 */ 038 public void setType(ZoneType type) throws AmetysRepositoryException; 039 040 /** 041 * Set the content reference. 042 * @param <C> the actual type of {@link Content}. 043 * @param content the content. 044 * @throws AmetysRepositoryException if an error occurs. 045 */ 046 public <C extends Content> void setContent(C content) throws AmetysRepositoryException; 047 048 /** 049 * Set the Content metadata set name. 050 * @param metadataSetName the metadata set name. 051 * @throws AmetysRepositoryException if an error occurs. 052 * @deprecated Use {@link #setViewName(String)} instead 053 */ 054 @Deprecated 055 public void setMetadataSetName(String metadataSetName) throws AmetysRepositoryException; 056 057 /** 058 * Set the Content view name. 059 * @param viewName the view name. 060 * @throws AmetysRepositoryException if an error occurs. 061 */ 062 public void setViewName(String viewName) throws AmetysRepositoryException; 063 064 /** 065 * Set the service id. 066 * @param serviceId the service id. 067 * @throws AmetysRepositoryException if an error occurs. 068 */ 069 public void setServiceId(String serviceId) throws AmetysRepositoryException; 070 071 @Override 072 public ModifiableModelAwareDataHolder getServiceParameters() throws AmetysRepositoryException; 073}