001/* 002 * Copyright 2017 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 */ 016package org.ametys.odf.catalog; 017 018import java.util.List; 019import java.util.Map; 020 021import org.ametys.cms.repository.Content; 022import org.ametys.odf.CopyODFUpdater; 023 024/** 025 * Interface to update contents after a copy of ODF catalog 026 */ 027public interface CopyCatalogUpdater extends CopyODFUpdater 028{ 029 /** 030 * Get the additional contents of the catalog 031 * @param catalogName the catalog name 032 * @return additional contents managed by the updater 033 */ 034 public default List<Content> getAdditionalContents(String catalogName) 035 { 036 return List.of(); 037 } 038 039 /** 040 * Copy additional contents from the initial to the new catalog 041 * @param initialCatalogName the name of initial catalog 042 * @param newCatalogName the name of new catalog 043 * @param copiedContents the initial contents with their copied content 044 */ 045 public default void copyAdditionalContents(String initialCatalogName, String newCatalogName, Map<Content, Content> copiedContents) 046 { 047 // Nothing to do by default 048 } 049}