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 view name. 050 * @param viewName the view name. 051 * @throws AmetysRepositoryException if an error occurs. 052 */ 053 public void setViewName(String viewName) throws AmetysRepositoryException; 054 055 /** 056 * Set the service id. 057 * @param serviceId the service id. 058 * @throws AmetysRepositoryException if an error occurs. 059 */ 060 public void setServiceId(String serviceId) throws AmetysRepositoryException; 061 062 @Override 063 public ModifiableModelAwareDataHolder getServiceParameters() throws AmetysRepositoryException; 064 065 @Override 066 public ModifiableModelAwareDataHolder getZoneItemParametersHolder() throws AmetysRepositoryException; 067 068 @Override 069 public ModifiableModelAwareDataHolder getContentViewParametersHolder(String contentViewName) throws AmetysRepositoryException; 070 071 @Override 072 public ModifiableModelAwareDataHolder getServiceViewParametersHolder(String serviceViewName) throws AmetysRepositoryException; 073}