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.CmsGalleryActionInfo; 031import org.opencms.ade.galleries.shared.CmsGalleryConfiguration; 032import org.opencms.ade.galleries.shared.CmsGalleryDataBean; 033import org.opencms.ade.galleries.shared.CmsGalleryFolderBean; 034import org.opencms.ade.galleries.shared.CmsGallerySearchBean; 035import org.opencms.ade.galleries.shared.CmsResultItemBean; 036import org.opencms.ade.galleries.shared.CmsSitemapEntryBean; 037import org.opencms.ade.galleries.shared.CmsVfsEntryBean; 038import org.opencms.util.CmsUUID; 039 040import java.util.List; 041import java.util.Set; 042 043import com.google.gwt.user.client.rpc.AsyncCallback; 044 045/** 046 * Handles all RPC services related to the gallery dialog.<p> 047 * 048 * @since 8.0.0 049 * 050 * @see org.opencms.ade.galleries.CmsGalleryService 051 * @see org.opencms.ade.galleries.shared.rpc.I_CmsGalleryService 052 * @see org.opencms.ade.galleries.shared.rpc.I_CmsGalleryServiceAsync 053 */ 054public interface I_CmsGalleryServiceAsync { 055 056 /** 057 * Gets gallery upload information. 058 * 059 * @param sitePath the site path of a folder 060 * @param info the gallery upload information, or null if no folder with that path is found 061 */ 062 public void getGalleryActionInfo(String sitePath, AsyncCallback<CmsGalleryActionInfo> info); 063 064 /** 065 * Deletes the given resource.<p> 066 * 067 * @param resourcePath the resource path of the resource to delete 068 * @param callback the callback 069 */ 070 void deleteResource(String resourcePath, AsyncCallback<Void> callback); 071 072 /** 073 * Loads the gallery configuration for the adeView mode.<p> 074 * 075 * @param callback the callback for the result 076 */ 077 void getAdeViewModeConfiguration(AsyncCallback<CmsGalleryConfiguration> callback); 078 079 /** 080 * Returns the available galleries depending on the given resource types.<p> 081 * @param context the current subsite 082 * @param resourceTypes the resource types 083 * @param callback the callback 084 */ 085 void getGalleries(String context, List<String> resourceTypes, AsyncCallback<List<CmsGalleryFolderBean>> callback); 086 087 /** 088 * Returns the resource info for a single resource.<p> 089 * 090 * @param path the resource path 091 * @param locale the content locale 092 * @param callback the callback 093 */ 094 void getInfoForResource(String path, String locale, AsyncCallback<CmsResultItemBean> callback); 095 096 /** 097 * Returns the initial data for the given gallery mode.<p> 098 * 099 * @param conf the gallery configuration 100 * @param callback the callback 101 */ 102 void getInitialSettings(CmsGalleryConfiguration conf, AsyncCallback<CmsGalleryDataBean> callback); 103 104 /** 105 * Performs an initial search based on the given data bean and the available parameters of the request.<p> 106 * 107 * @param data the data bean 108 * @param callback the callback 109 */ 110 void getSearch(CmsGalleryDataBean data, AsyncCallback<CmsGallerySearchBean> callback); 111 112 /** 113 * Returns the gallery search object containing search results and the currant search parameter.<p> 114 * 115 * @param searchObj the current search object 116 * @param callback the callback 117 */ 118 void getSearch(CmsGallerySearchBean searchObj, AsyncCallback<CmsGallerySearchBean> callback); 119 120 /** 121 * Returns the sub entries to the given sitemap path.<p> 122 * 123 * @param rootPath the root path 124 * @param isRoot <code>true</code> if the requested entry is the root entry 125 * @param filter the search filter, only relevant when isRoot is true 126 * @param callback the asynchronous callback 127 */ 128 void getSubEntries( 129 String rootPath, 130 boolean isRoot, 131 String filter, 132 AsyncCallback<List<CmsSitemapEntryBean>> callback); 133 134 /** 135 * Gets the sub-folders of a folder.<p> 136 * 137 * @param path the path of a folder 138 * @param callback the asynchronous callback 139 */ 140 void getSubFolders(String path, AsyncCallback<List<CmsVfsEntryBean>> callback); 141 142 /** 143 * Loads the root VFS entry bean for the given site root.<p> 144 * 145 * @param path the site root 146 * @param filter the search filter 147 * 148 * @param resultCallback the callback for the result 149 * */ 150 void loadVfsEntryBean(String path, String filter, AsyncCallback<CmsVfsEntryBean> resultCallback); 151 152 /** 153 * Stores the result view type with the user.<p> 154 * 155 * @param resultViewType the result view type 156 * @param callback the callback 157 */ 158 void saveResultViewType(String resultViewType, AsyncCallback<Void> callback); 159 160 /** 161 * Saves the tree open state.<p> 162 * 163 * @param treeName the tree name 164 * @param treeToken the tree token 165 * @param siteRoot the site root 166 * @param openItems the open items 167 * @param callback the result callback 168 */ 169 void saveTreeOpenState( 170 String treeName, 171 String treeToken, 172 String siteRoot, 173 Set<CmsUUID> openItems, 174 AsyncCallback<Void> callback); 175 176 /** 177 * Updates the offline indices.<p> 178 * 179 * @param callback the callback 180 */ 181 void updateIndex(AsyncCallback<Void> callback); 182}