org.opencms.gwt.shared.rpc
Interface I_CmsCoreService

All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
All Known Implementing Classes:
CmsCoreService

public interface I_CmsCoreService
extends com.google.gwt.user.client.rpc.RemoteService

Provides general core services.

Since:
8.0.0
See Also:
CmsCoreService, I_CmsCoreService, I_CmsCoreServiceAsync

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

Method Detail

createUUID

CmsUUID createUUID()
                   throws CmsRpcException
Creates a new UUID.

Returns:
the created UUID
Throws:
CmsRpcException - if something goes wrong

getCategories

java.util.List<CmsCategoryTreeEntry> getCategories(java.lang.String fromCatPath,
                                                   boolean includeSubCats,
                                                   java.util.List<java.lang.String> refVfsPaths)
                                                   throws CmsRpcException
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
Returns:
the resource categories
Throws:
CmsRpcException - if something goes wrong

getCategoriesForSitePath

java.util.List<CmsCategoryTreeEntry> getCategoriesForSitePath(java.lang.String sitePath)
                                                              throws CmsRpcException
Returns the categories for the given reference site-path.

Parameters:
sitePath - the reference site-path
Returns:
the categories for the given reference site-path
Throws:
CmsRpcException - if something goes wrong

getCategoryInfo

CmsResourceCategoryInfo getCategoryInfo(CmsUUID structureId)
                                        throws CmsRpcException
Returns the category information for the given resource.

Parameters:
structureId - the resource structure id
Returns:
the category information
Throws:
CmsRpcException - if something goes wrong

getContextMenuEntries

java.util.List<CmsContextMenuEntryBean> getContextMenuEntries(CmsUUID structureId,
                                                              CmsCoreData.AdeContext context)
                                                              throws CmsRpcException
Returns the context menu entries for the given URI.

Parameters:
structureId - the currently requested structure id
context - the ade context (sitemap or containerpage)
Returns:
the context menu entries
Throws:
CmsRpcException - if something goes wrong

getLinkForReturnCode

CmsReturnLinkInfo getLinkForReturnCode(java.lang.String returnCode)
                                       throws CmsRpcException
Given a return code, returns the link to the page which corresponds to the return code.

Parameters:
returnCode - the return code
Returns:
the link for the return code
Throws:
CmsRpcException - if something goes wrong

getResourceState

CmsResourceState getResourceState(CmsUUID structureId)
                                  throws CmsRpcException
Gets the resource state for a resource with a given path.

Parameters:
structureId - the resource structure id
Returns:
the resource state of the resource
Throws:
CmsRpcException - if something goes wrong

getUniqueFileName

java.lang.String getUniqueFileName(java.lang.String parentFolder,
                                   java.lang.String baseName)
                                   throws CmsRpcException
Returns a unique filename for the given base name and the parent folder.

Parameters:
parentFolder - the parent folder of the file
baseName - the proposed file name
Returns:
the unique file name
Throws:
CmsRpcException - if something goes wrong

getWorkplaceLink

java.lang.String getWorkplaceLink(CmsUUID structureId)
                                  throws CmsRpcException
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
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.
Throws:
CmsRpcException - if something goes wrong

lockTemp

java.lang.String lockTemp(CmsUUID structureId)
                          throws CmsRpcException
Locks the given resource with a temporary lock.

Parameters:
structureId - the structure id of the resource to lock
Returns:
null if successful, an error message if not
Throws:
CmsRpcException - if something goes wrong

lockTempAndCheckModification

CmsLockInfo lockTempAndCheckModification(CmsUUID structureId,
                                         long modification)
                                         throws CmsRpcException
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 structure id of the resource to lock
modification - the timestamp to check
Returns:
null if successful, an error message if not
Throws:
CmsRpcException - if something goes wrong

ping

void ping()
An RPC method which does nothing and is just used to keep the session alive.


prefetch

CmsCoreData prefetch()
                     throws CmsRpcException
Generates core data for prefetching in the host page.

Returns:
the core data
Throws:
CmsRpcException - if something goes wrong

setAvailabilityInfo

void setAvailabilityInfo(CmsUUID structureId,
                         CmsAvailabilityInfoBean bean)
                         throws CmsRpcException
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
Throws:
CmsRpcException - if the RPC call goes wrong

setAvailabilityInfo

void setAvailabilityInfo(java.lang.String vfsPath,
                         CmsAvailabilityInfoBean bean)
                         throws CmsRpcException
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
Throws:
CmsRpcException - if the RPC call goes wrong

setResourceCategories

void setResourceCategories(CmsUUID structureId,
                           java.util.List<java.lang.String> categories)
                           throws CmsRpcException
Sets the categories of the given resource. Will remove all other categories.

Parameters:
structureId - the resource structure id
categories - the categories to set
Throws:
CmsRpcException - if something goes wrong

setShowEditorHelp

void setShowEditorHelp(boolean showHelp)
                       throws CmsRpcException
Sets the show editor help flag.

Parameters:
showHelp - the show help flag
Throws:
CmsRpcException - if something goes wrong

setToolbarVisible

void setToolbarVisible(boolean visible)
                       throws CmsRpcException
Writes the tool-bar visibility into the session cache.

Parameters:
visible - true if the tool-bar is visible
Throws:
CmsRpcException - if something goes wrong

unlock

java.lang.String unlock(CmsUUID structureId)
                        throws CmsRpcException
Unlocks the given resource.

Parameters:
structureId - the structure id of the resource to unlock
Returns:
null if successful, an error message if not
Throws:
CmsRpcException - if something goes wrong

validate

java.util.Map<java.lang.String,CmsValidationResult> validate(java.util.Map<java.lang.String,CmsValidationQuery> validationQueries)
                                                             throws CmsRpcException
Performs a batch of validations and returns the results.

Parameters:
validationQueries - a map from field names to validation queries
Returns:
a map from field names to validation results
Throws:
CmsRpcException - if something goes wrong

validate

java.util.Map<java.lang.String,CmsValidationResult> 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)
                                                             throws CmsRpcException
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
Returns:
a map from field names to validation results
Throws:
CmsRpcException - if the RPC call goes wrong