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.plugins.repository.AmetysObject; 020import org.ametys.plugins.repository.AmetysRepositoryException; 021import org.ametys.plugins.repository.ModifiableTraversableAmetysObject; 022import org.ametys.plugins.repository.RemovableAmetysObject; 023import org.ametys.plugins.repository.data.ametysobject.ModifiableModelLessDataAwareAmetysObject; 024import org.ametys.plugins.repository.tag.TaggableAmetysObject; 025 026/** 027 * {@link AmetysObject} for storing page informations. <p> 028 */ 029public interface ModifiablePage extends Page, ModifiableSitemapElement, ModifiableModelLessDataAwareAmetysObject, ModifiableTraversableAmetysObject, RemovableAmetysObject, TaggableAmetysObject 030{ 031 /** 032 * Set the template name. 033 * @param template the template name. 034 * @throws AmetysRepositoryException if an error occurs. 035 */ 036 void setTemplate(String template) throws AmetysRepositoryException; 037 038 /** 039 * Set the title. 040 * @param title the title. 041 * @throws AmetysRepositoryException if an error occurs. 042 */ 043 void setTitle(String title) throws AmetysRepositoryException; 044 045 /** 046 * Set the long title. 047 * @param title the title. 048 * @throws AmetysRepositoryException if an error occurs. 049 */ 050 void setLongTitle(String title) throws AmetysRepositoryException; 051 052 /** 053 * Set the sitemap name. 054 * @param sitemapName the sitemap name. 055 * @throws AmetysRepositoryException if an error occurs. 056 */ 057 public void setSitemapName(String sitemapName) throws AmetysRepositoryException; 058 059 /** 060 * Set the site name. 061 * @param siteName the site name. 062 * @throws AmetysRepositoryException if an error occurs. 063 */ 064 public void setSiteName(String siteName) throws AmetysRepositoryException; 065 066 /** 067 * Set the type.<br> 068 * @param type the type. 069 * @throws AmetysRepositoryException if an error occurs. 070 * @see Page.PageType 071 */ 072 void setType(PageType type) throws AmetysRepositoryException; 073 074 /** 075 * Set the linked URL. 076 * @param type the type of link 077 * @param url the linked URL (depending on the type) 078 * @throws AmetysRepositoryException if an error occurs. 079 */ 080 void setURL(LinkType type, String url) throws AmetysRepositoryException; 081 082 /** 083 * Add a new {@link AmetysObject} referencing this page. 084 * @param ametysObjectId the {@link AmetysObject} ids referencing this page. 085 * @throws AmetysRepositoryException if an error occurs. 086 */ 087 void addReferer(String ametysObjectId) throws AmetysRepositoryException; 088 089 /** 090 * Removes an {@link AmetysObject} referencing this page. 091 * @param ametysObjectId the {@link AmetysObject} ids referencing this page. 092 * @throws AmetysRepositoryException if an error occurs. 093 */ 094 void removeReferer(String ametysObjectId) throws AmetysRepositoryException; 095 096 /** 097 * Set the visibility of the page 098 * @param isVisible the page visibility. 099 * @throws AmetysRepositoryException if an error occurs. 100 */ 101 void setVisible(boolean isVisible) throws AmetysRepositoryException; 102}