001/* 002 * This library is part of OpenCms - 003 * the Open Source Content Management System 004 * 005 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com) 006 * 007 * This library is free software; you can redistribute it and/or 008 * modify it under the terms of the GNU Lesser General Public 009 * License as published by the Free Software Foundation; either 010 * version 2.1 of the License, or (at your option) any later version. 011 * 012 * This library is distributed in the hope that it will be useful, 013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 015 * Lesser General Public License for more details. 016 * 017 * For further information about Alkacon Software, please see the 018 * company website: http://www.alkacon.com 019 * 020 * For further information about OpenCms, please see the 021 * project website: http://www.opencms.org 022 * 023 * You should have received a copy of the GNU Lesser General Public 024 * License along with this library; if not, write to the Free Software 025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 026 */ 027 028package org.opencms.ade.galleries.shared.rpc; 029 030import org.opencms.ade.galleries.shared.CmsGalleryConfiguration; 031import org.opencms.ade.galleries.shared.CmsGalleryDataBean; 032import org.opencms.ade.galleries.shared.CmsGalleryFolderBean; 033import org.opencms.ade.galleries.shared.CmsGallerySearchBean; 034import org.opencms.ade.galleries.shared.CmsResultItemBean; 035import org.opencms.ade.galleries.shared.CmsSitemapEntryBean; 036import org.opencms.ade.galleries.shared.CmsVfsEntryBean; 037import org.opencms.util.CmsUUID; 038 039import java.util.List; 040import java.util.Set; 041 042import com.google.gwt.user.client.rpc.AsyncCallback; 043 044/** 045 * Handles all RPC services related to the gallery dialog.<p> 046 * 047 * @since 8.0.0 048 * 049 * @see org.opencms.ade.galleries.CmsGalleryService 050 * @see org.opencms.ade.galleries.shared.rpc.I_CmsGalleryService 051 * @see org.opencms.ade.galleries.shared.rpc.I_CmsGalleryServiceAsync 052 */ 053public interface I_CmsGalleryServiceAsync { 054 055 /** 056 * Deletes the given resource.<p> 057 * 058 * @param resourcePath the resource path of the resource to delete 059 * @param callback the callback 060 */ 061 void deleteResource(String resourcePath, AsyncCallback<Void> callback); 062 063 /** 064 * Loads the gallery configuration for the adeView mode.<p> 065 * 066 * @param callback the callback for the result 067 */ 068 void getAdeViewModeConfiguration(AsyncCallback<CmsGalleryConfiguration> callback); 069 070 /** 071 * Returns the available galleries depending on the given resource types.<p> 072 * 073 * @param resourceTypes the resource types 074 * @param callback the callback 075 */ 076 void getGalleries(List<String> resourceTypes, AsyncCallback<List<CmsGalleryFolderBean>> callback); 077 078 /** 079 * Returns the resource info for a single resource.<p> 080 * 081 * @param path the resource path 082 * @param locale the content locale 083 * @param callback the callback 084 */ 085 void getInfoForResource(String path, String locale, AsyncCallback<CmsResultItemBean> callback); 086 087 /** 088 * Returns the initial data for the given gallery mode.<p> 089 * 090 * @param conf the gallery configuration 091 * @param callback the callback 092 */ 093 void getInitialSettings(CmsGalleryConfiguration conf, AsyncCallback<CmsGalleryDataBean> callback); 094 095 /** 096 * Performs an initial search based on the given data bean and the available parameters of the request.<p> 097 * 098 * @param data the data bean 099 * @param callback the callback 100 */ 101 void getSearch(CmsGalleryDataBean data, AsyncCallback<CmsGallerySearchBean> callback); 102 103 /** 104 * Returns the gallery search object containing search results and the currant search parameter.<p> 105 * 106 * @param searchObj the current search object 107 * @param callback the callback 108 */ 109 void getSearch(CmsGallerySearchBean searchObj, AsyncCallback<CmsGallerySearchBean> callback); 110 111 /** 112 * Returns the sub entries to the given sitemap path.<p> 113 * 114 * @param rootPath the root path 115 * @param isRoot <code>true</code> if the requested entry is the root entry 116 * @param filter the search filter, only relevant when isRoot is true 117 * @param callback the asynchronous callback 118 */ 119 void getSubEntries( 120 String rootPath, 121 boolean isRoot, 122 String filter, 123 AsyncCallback<List<CmsSitemapEntryBean>> callback); 124 125 /** 126 * Gets the sub-folders of a folder.<p> 127 * 128 * @param path the path of a folder 129 * @param callback the asynchronous callback 130 */ 131 void getSubFolders(String path, AsyncCallback<List<CmsVfsEntryBean>> callback); 132 133 /** 134 * Loads the root VFS entry bean for the given site root.<p> 135 * 136 * @param path the site root 137 * @param filter the search filter 138 * 139 * @param resultCallback the callback for the result 140 * */ 141 void loadVfsEntryBean(String path, String filter, AsyncCallback<CmsVfsEntryBean> resultCallback); 142 143 /** 144 * Stores the result view type with the user.<p> 145 * 146 * @param resultViewType the result view type 147 * @param callback the callback 148 */ 149 void saveResultViewType(String resultViewType, AsyncCallback<Void> callback); 150 151 /** 152 * Saves the tree open state.<p> 153 * 154 * @param treeName the tree name 155 * @param treeToken the tree token 156 * @param siteRoot the site root 157 * @param openItems the open items 158 * @param callback the result callback 159 */ 160 void saveTreeOpenState( 161 String treeName, 162 String treeToken, 163 String siteRoot, 164 Set<CmsUUID> openItems, 165 AsyncCallback<Void> callback); 166 167 /** 168 * Updates the offline indices.<p> 169 * 170 * @param callback the callback 171 */ 172 void updateIndex(AsyncCallback<Void> callback); 173}