org.opencms.gwt.shared.rpc
Interface I_CmsCoreServiceAsync


public interface I_CmsCoreServiceAsync

Provides general core services.

Since:
8.0.0
See Also:
CmsCoreService, I_CmsCoreService, I_CmsCoreServiceAsync

Method Summary
 void createUUID(com.google.gwt.user.client.rpc.AsyncCallback<CmsUUID> callback)
          Creates a new UUID.
 void getCategories(java.lang.String fromCatPath, boolean includeSubCats, java.util.List<java.lang.String> refVfsPaths, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<CmsCategoryTreeEntry>> callback)
          Returns the categories for the given search parameters.
 void getCategoriesForSitePath(java.lang.String sitePath, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<CmsCategoryTreeEntry>> callback)
          Returns the categories for the given reference site-path.
 void getCategoryInfo(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<CmsResourceCategoryInfo> callback)
          Returns the category information for the given resource.
 void getContextMenuEntries(CmsUUID structureId, CmsCoreData.AdeContext context, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<CmsContextMenuEntryBean>> callback)
          Returns a list of menu entry beans for the context menu.
 void getLinkForReturnCode(java.lang.String returnCode, com.google.gwt.user.client.rpc.AsyncCallback<CmsReturnLinkInfo> callback)
          Given a return code, returns the link to the page which corresponds to the return code.
 void getResourceState(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<CmsResourceState> callback)
          Gets the resource state of a resource.
 void getUniqueFileName(java.lang.String parentFolder, java.lang.String baseName, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> callback)
          Returns a unique filename for the given base name and the parent folder.
 void getWorkplaceLink(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> callback)
          Returns a link for the OpenCms workplace that will reload the whole workplace, switch to the explorer view, the site of the given explorerRootPath and show the folder given in the explorerRootPath.
 void lockTemp(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> callback)
          Locks the given resource with a temporary lock.
 void lockTempAndCheckModification(CmsUUID structureId, long modification, com.google.gwt.user.client.rpc.AsyncCallback<CmsLockInfo> callback)
          Locks the given resource with a temporary lock additionally checking that the given resource has not been modified after the given timestamp.
 void ping(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
          A method which does nothing and is just used to keep the session alive.
 void prefetch(com.google.gwt.user.client.rpc.AsyncCallback<CmsCoreData> callback)
          Generates core data for prefetching in the host page.
 void setAvailabilityInfo(CmsUUID structureId, CmsAvailabilityInfoBean bean, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
          Applies the changes stored in the info bean to the vfs of OpenCms.
 void setAvailabilityInfo(java.lang.String vfsPath, CmsAvailabilityInfoBean bean, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
          Applies the changes stored in the info bean to the vfs of OpenCms.
 void setResourceCategories(CmsUUID structureId, java.util.List<java.lang.String> categories, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
          Sets the categories of the given resource.
 void setShowEditorHelp(boolean showHelp, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
          Sets the show editor help flag.
 void setToolbarVisible(boolean visible, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
          Writes the tool-bar visibility into the session cache.
 void unlock(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> callback)
          Unlocks the given resource.
 void validate(java.util.Map<java.lang.String,CmsValidationQuery> validationQueries, com.google.gwt.user.client.rpc.AsyncCallback<java.util.Map<java.lang.String,CmsValidationResult>> callback)
          Performs a batch of validations and returns the results.
 void validate(java.lang.String formValidatorClass, java.util.Map<java.lang.String,CmsValidationQuery> validationQueries, java.util.Map<java.lang.String,java.lang.String> values, java.lang.String config, com.google.gwt.user.client.rpc.AsyncCallback<java.util.Map<java.lang.String,CmsValidationResult>> callback)
          Performs a batch of validations using a custom form validator class.
 

Method Detail

createUUID

void createUUID(com.google.gwt.user.client.rpc.AsyncCallback<CmsUUID> callback)
Creates a new UUID.

Parameters:
callback - the async callback

getCategories

void getCategories(java.lang.String fromCatPath,
                   boolean includeSubCats,
                   java.util.List<java.lang.String> refVfsPaths,
                   com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<CmsCategoryTreeEntry>> callback)
Returns the categories for the given search parameters.

Parameters:
fromCatPath - the category path to start with, can be null or empty to use the root
includeSubCats - if to include all categories, or first level child categories only
refVfsPaths - the reference paths, can be null to only use the system repository
callback - the async callback

getCategoriesForSitePath

void getCategoriesForSitePath(java.lang.String sitePath,
                              com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<CmsCategoryTreeEntry>> callback)
Returns the categories for the given reference site-path.

Parameters:
sitePath - the reference site-path
callback - the async callback

getCategoryInfo

void getCategoryInfo(CmsUUID structureId,
                     com.google.gwt.user.client.rpc.AsyncCallback<CmsResourceCategoryInfo> callback)
Returns the category information for the given resource.

Parameters:
structureId - the resource structure id
callback - the callback which receives the result

getContextMenuEntries

void getContextMenuEntries(CmsUUID structureId,
                           CmsCoreData.AdeContext context,
                           com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<CmsContextMenuEntryBean>> callback)
Returns a list of menu entry beans for the context menu.

Parameters:
structureId - the structure id of the resource for which to get the context menu
context - the ade context (sitemap or containerpage)
callback - the asynchronous callback

getLinkForReturnCode

void getLinkForReturnCode(java.lang.String returnCode,
                          com.google.gwt.user.client.rpc.AsyncCallback<CmsReturnLinkInfo> callback)
Given a return code, returns the link to the page which corresponds to the return code.

Parameters:
returnCode - the return code
callback - the asynchronous callback

getResourceState

void getResourceState(CmsUUID structureId,
                      com.google.gwt.user.client.rpc.AsyncCallback<CmsResourceState> callback)
Gets the resource state of a resource.

Parameters:
structureId - the structure id of the resource
callback - the callback which receives the result

getUniqueFileName

@SynchronizedRpcRequest
void getUniqueFileName(java.lang.String parentFolder,
                                              java.lang.String baseName,
                                              com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> callback)
Returns a unique filename for the given base name and the parent folder.

This is executed in a synchronized request.

Parameters:
parentFolder - the parent folder of the file
baseName - the proposed file name
callback - the callback which receives the result

getWorkplaceLink

void getWorkplaceLink(CmsUUID structureId,
                      com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> callback)
Returns a link for the OpenCms workplace that will reload the whole workplace, switch to the explorer view, the site of the given explorerRootPath and show the folder given in the explorerRootPath.

Parameters:
structureId - the structure id of the resource for which to open the workplace
callback - the callback which receives the result

lockTemp

@SynchronizedRpcRequest
void lockTemp(CmsUUID structureId,
                                     com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> callback)
Locks the given resource with a temporary lock.

Parameters:
structureId - the resource structure id
callback - the async callback

lockTempAndCheckModification

@SynchronizedRpcRequest
void lockTempAndCheckModification(CmsUUID structureId,
                                                         long modification,
                                                         com.google.gwt.user.client.rpc.AsyncCallback<CmsLockInfo> callback)
Locks the given resource with a temporary lock additionally checking that the given resource has not been modified after the given timestamp.

Parameters:
structureId - the resource structure id
modification - the timestamp to check
callback - the async callback

ping

void ping(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
A method which does nothing and is just used to keep the session alive.

Parameters:
callback - the asynchronous callback

prefetch

void prefetch(com.google.gwt.user.client.rpc.AsyncCallback<CmsCoreData> callback)
Generates core data for prefetching in the host page.

Parameters:
callback - the async callback

setAvailabilityInfo

void setAvailabilityInfo(CmsUUID structureId,
                         CmsAvailabilityInfoBean bean,
                         com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Applies the changes stored in the info bean to the vfs of OpenCms.

Parameters:
structureId - the structure id of the modified resource
bean - the bean with the information of the dialog
callback - the asynchronous callback

setAvailabilityInfo

void setAvailabilityInfo(java.lang.String vfsPath,
                         CmsAvailabilityInfoBean bean,
                         com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Applies the changes stored in the info bean to the vfs of OpenCms.

Parameters:
vfsPath - the vfs path of the modified resource
bean - the bean with the information of the dialog
callback - the asynchronous callback

setResourceCategories

void setResourceCategories(CmsUUID structureId,
                           java.util.List<java.lang.String> categories,
                           com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Sets the categories of the given resource. Will remove all other categories.

Parameters:
structureId - the resource structure id
categories - the categories to set
callback - the callback which receives the result

setShowEditorHelp

void setShowEditorHelp(boolean showHelp,
                       com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Sets the show editor help flag.

Parameters:
showHelp - the show help flag
callback - the asynchronous callback

setToolbarVisible

void setToolbarVisible(boolean visible,
                       com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Void> callback)
Writes the tool-bar visibility into the session cache.

Parameters:
visible - true if the tool-bar is visible
callback - the call-back executed on response

unlock

@SynchronizedRpcRequest
void unlock(CmsUUID structureId,
                                   com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> callback)
Unlocks the given resource.

Parameters:
structureId - the resource structure id
callback - the async callback

validate

void validate(java.util.Map<java.lang.String,CmsValidationQuery> validationQueries,
              com.google.gwt.user.client.rpc.AsyncCallback<java.util.Map<java.lang.String,CmsValidationResult>> callback)
Performs a batch of validations and returns the results.

Parameters:
validationQueries - a map from field names to validation queries
callback - the asynchronous callback

validate

void validate(java.lang.String formValidatorClass,
              java.util.Map<java.lang.String,CmsValidationQuery> validationQueries,
              java.util.Map<java.lang.String,java.lang.String> values,
              java.lang.String config,
              com.google.gwt.user.client.rpc.AsyncCallback<java.util.Map<java.lang.String,CmsValidationResult>> callback)
Performs a batch of validations using a custom form validator class.

Parameters:
formValidatorClass - the class name of the form validator
validationQueries - a map from field names to validation queries
values - the map of all field values
config - the form validator configuration string
callback - the asynchronous callback