public class CmsCoreService extends CmsGwtService implements I_CmsCoreService
CmsCoreService,
I_CmsCoreService,
I_CmsCoreServiceAsync,
序列化表格| 构造器和说明 |
|---|
CmsCoreService() |
| 限定符和类型 | 方法和说明 |
|---|---|
CmsUUID |
createUUID()
Creates a new UUID.
|
protected java.util.Map<java.lang.String,java.lang.String> |
getBuildIds()
Collect GWT build ids from the different ADE modules.
|
java.util.List<CmsCategoryTreeEntry> |
getCategories(java.lang.String fromPath,
boolean includeSubCats,
java.util.List<java.lang.String> refPaths)
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.
|
static java.util.List<CmsContextMenuEntryBean> |
getContextMenuEntries(CmsObject cms,
CmsUUID structureId,
CmsCoreData.AdeContext context)
Returns the context menu entries for the given URI.
|
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.
|
protected CmsLockInfo |
getLock(CmsUUID structureId)
Helper method for locking a resource which returns some information on whether the locking
failed, and why.
|
protected CmsLockInfo |
getLock(java.lang.String sitepath)
Helper method for locking a resource which returns some information on whether the locking
failed, and why.
|
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.
|
static I_CmsValidationService |
getValidationService(java.lang.String name)
Internal helper method for getting a validation service.
|
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.
|
static <T> T |
instantiate(java.lang.Class<T> anInterface,
java.lang.String className)
Instantiates a class given its name using its default constructor.
|
CmsReturnLinkInfo |
internalGetLinkForReturnCode(java.lang.String returnCode)
Implementation method for getting the link for a given return code.
|
java.lang.String |
lockIfExists(java.lang.String sitePath)
Locks the given resource with a temporary lock if it exists.
|
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.
|
static CmsCoreData |
prefetch(javax.servlet.http.HttpServletRequest request)
Fetches the core data.
|
void |
setAvailabilityInfo(CmsUUID structureId,
CmsAvailabilityInfoBean bean)
Applies the changes stored in the info bean to the vfs of OpenCms.
|
void |
setAvailabilityInfo(java.lang.String uri,
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 visible)
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.lang.String |
unlock(java.lang.String sitePath)
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.
|
checkPermissions, clearThreadStorage, doGetSerializationPolicy, doUnexpectedFailure, ensureLock, ensureLock, ensureLock, ensureSession, error, getCmsObject, getPropertiesByName, getRequest, getResponse, log, log, logError, service, setCms, setContext, setRequest, setResponse, tryUnlockcheckPermutationStrongName, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponsedoPost, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContentdoDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, servicepublic static java.util.List<CmsContextMenuEntryBean> getContextMenuEntries(CmsObject cms, CmsUUID structureId, CmsCoreData.AdeContext context)
cms - the cms contextstructureId - the currently requested structure idcontext - the ade context (sitemap or containerpage)public static I_CmsValidationService getValidationService(java.lang.String name) throws CmsException
name - the class name of the validation serviceCmsException - if something goes wrongpublic static <T> T instantiate(java.lang.Class<T> anInterface,
java.lang.String className)
throws CmsException
Also checks whether the class with the given name is the subclass of another class/interface.
T - the type of the interface/class passed as a parameteranInterface - the interface or class against which the class should be checkedclassName - the name of the classCmsException - if the instantiation failspublic static CmsCoreData prefetch(javax.servlet.http.HttpServletRequest request)
request - the current requestpublic CmsUUID createUUID()
I_CmsCoreServicecreateUUID 在接口中 I_CmsCoreServiceI_CmsCoreService.createUUID()public java.util.List<CmsCategoryTreeEntry> getCategories(java.lang.String fromPath, boolean includeSubCats, java.util.List<java.lang.String> refPaths) throws CmsRpcException
I_CmsCoreServicegetCategories 在接口中 I_CmsCoreServicefromPath - the category path to start with, can be null or empty to use the rootincludeSubCats - if to include all categories, or first level child categories onlyrefPaths - the reference paths, can be null to only use the system repositoryCmsRpcException - if something goes wrongI_CmsCoreService.getCategories(java.lang.String, boolean, java.util.List)public java.util.List<CmsCategoryTreeEntry> getCategoriesForSitePath(java.lang.String sitePath) throws CmsRpcException
I_CmsCoreServicegetCategoriesForSitePath 在接口中 I_CmsCoreServicesitePath - the reference site-pathCmsRpcException - if something goes wrongI_CmsCoreService.getCategoriesForSitePath(java.lang.String)public CmsResourceCategoryInfo getCategoryInfo(CmsUUID structureId) throws CmsRpcException
I_CmsCoreServicegetCategoryInfo 在接口中 I_CmsCoreServicestructureId - the resource structure idCmsRpcException - if something goes wrongI_CmsCoreService.getCategoryInfo(org.opencms.util.CmsUUID)public java.util.List<CmsContextMenuEntryBean> getContextMenuEntries(CmsUUID structureId, CmsCoreData.AdeContext context) throws CmsRpcException
I_CmsCoreServicegetContextMenuEntries 在接口中 I_CmsCoreServicestructureId - the currently requested structure idcontext - the ade context (sitemap or containerpage)CmsRpcException - if something goes wrongI_CmsCoreService.getContextMenuEntries(org.opencms.util.CmsUUID, org.opencms.gwt.shared.CmsCoreData.AdeContext)public CmsReturnLinkInfo getLinkForReturnCode(java.lang.String returnCode) throws CmsRpcException
I_CmsCoreServicegetLinkForReturnCode 在接口中 I_CmsCoreServicereturnCode - the return codeCmsRpcException - if something goes wrongI_CmsCoreService.getLinkForReturnCode(java.lang.String)public CmsResourceState getResourceState(CmsUUID structureId) throws CmsRpcException
I_CmsCoreServicegetResourceState 在接口中 I_CmsCoreServicestructureId - the resource structure idCmsRpcException - if something goes wrongI_CmsCoreService.getResourceState(org.opencms.util.CmsUUID)public java.lang.String getUniqueFileName(java.lang.String parentFolder,
java.lang.String baseName)
I_CmsCoreServicegetUniqueFileName 在接口中 I_CmsCoreServiceparentFolder - the parent folder of the filebaseName - the proposed file nameI_CmsCoreService.getUniqueFileName(java.lang.String, java.lang.String)public java.lang.String getWorkplaceLink(CmsUUID structureId) throws CmsRpcException
I_CmsCoreServicegetWorkplaceLink 在接口中 I_CmsCoreServicestructureId - the structure id of the resource for which to open the workplaceCmsRpcException - if something goes wrongI_CmsCoreService.getWorkplaceLink(org.opencms.util.CmsUUID)public CmsReturnLinkInfo internalGetLinkForReturnCode(java.lang.String returnCode) throws CmsException
returnCode - the return codeCmsException - if something goes wrongpublic java.lang.String lockIfExists(java.lang.String sitePath)
throws CmsRpcException
I_CmsCoreServiceIf the resource does not exist yet, the closest existing ancestor folder will check if it is lockable.
lockIfExists 在接口中 I_CmsCoreServicesitePath - the site path of the resource to locknull if successful, an error message if notCmsRpcException - if something goes wrongI_CmsCoreService.lockIfExists(java.lang.String)public java.lang.String lockTemp(CmsUUID structureId) throws CmsRpcException
I_CmsCoreServicelockTemp 在接口中 I_CmsCoreServicestructureId - the structure id of the resource to locknull if successful, an error message if notCmsRpcException - if something goes wrongI_CmsCoreService.lockTemp(org.opencms.util.CmsUUID)public CmsLockInfo lockTempAndCheckModification(CmsUUID structureId, long modification) throws CmsRpcException
I_CmsCoreServicelockTempAndCheckModification 在接口中 I_CmsCoreServicestructureId - the structure id of the resource to lockmodification - the timestamp to checknull if successful, an error message if notCmsRpcException - if something goes wrongI_CmsCoreService.lockTempAndCheckModification(org.opencms.util.CmsUUID, long)public void ping()
I_CmsCoreServiceping 在接口中 I_CmsCoreServiceI_CmsCoreService.ping()public CmsCoreData prefetch()
I_CmsCoreServiceprefetch 在接口中 I_CmsCoreServiceI_CmsCoreService.prefetch()public void setAvailabilityInfo(CmsUUID structureId, CmsAvailabilityInfoBean bean) throws CmsRpcException
I_CmsCoreServicesetAvailabilityInfo 在接口中 I_CmsCoreServicestructureId - the structure id of the modified resourcebean - the bean with the information of the dialogCmsRpcException - if the RPC call goes wrongI_CmsCoreService.setAvailabilityInfo(org.opencms.util.CmsUUID, org.opencms.gwt.shared.CmsAvailabilityInfoBean)public void setAvailabilityInfo(java.lang.String uri,
CmsAvailabilityInfoBean bean)
throws CmsRpcException
I_CmsCoreServicesetAvailabilityInfo 在接口中 I_CmsCoreServiceuri - the vfs path of the modified resourcebean - the bean with the information of the dialogCmsRpcException - if the RPC call goes wrongI_CmsCoreService.setAvailabilityInfo(java.lang.String, org.opencms.gwt.shared.CmsAvailabilityInfoBean)public void setResourceCategories(CmsUUID structureId, java.util.List<java.lang.String> categories) throws CmsRpcException
I_CmsCoreServicesetResourceCategories 在接口中 I_CmsCoreServicestructureId - the resource structure idcategories - the categories to setCmsRpcException - if something goes wrongI_CmsCoreService.setResourceCategories(org.opencms.util.CmsUUID, java.util.List)public void setShowEditorHelp(boolean visible)
throws CmsRpcException
I_CmsCoreServicesetShowEditorHelp 在接口中 I_CmsCoreServicevisible - the show help flagCmsRpcException - if something goes wrongI_CmsCoreService.setShowEditorHelp(boolean)public void setToolbarVisible(boolean visible)
throws CmsRpcException
I_CmsCoreServicesetToolbarVisible 在接口中 I_CmsCoreServicevisible - true if the tool-bar is visibleCmsRpcException - if something goes wrongI_CmsCoreService.setToolbarVisible(boolean)public java.lang.String unlock(CmsUUID structureId) throws CmsRpcException
I_CmsCoreServiceunlock 在接口中 I_CmsCoreServicestructureId - the structure id of the resource to unlocknull if successful, an error message if notCmsRpcException - if something goes wrongI_CmsCoreService.unlock(org.opencms.util.CmsUUID)public java.lang.String unlock(java.lang.String sitePath)
throws CmsRpcException
I_CmsCoreServiceunlock 在接口中 I_CmsCoreServicesitePath - the site path of the resource to unlocknull if successful, an error message if notCmsRpcException - if something goes wrongI_CmsCoreService.unlock(java.lang.String)public java.util.Map<java.lang.String,CmsValidationResult> validate(java.util.Map<java.lang.String,CmsValidationQuery> validationQueries) throws CmsRpcException
I_CmsCoreServicevalidate 在接口中 I_CmsCoreServicevalidationQueries - a map from field names to validation queriesCmsRpcException - if something goes wrongI_CmsCoreService.validate(java.util.Map)public 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
I_CmsCoreServicevalidate 在接口中 I_CmsCoreServiceformValidatorClass - the class name of the form validatorvalidationQueries - a map from field names to validation queriesvalues - the map of all field valuesconfig - the form validator configuration stringCmsRpcException - if the RPC call goes wrongI_CmsCoreService.validate(java.lang.String, java.util.Map, java.util.Map, java.lang.String)protected java.util.Map<java.lang.String,java.lang.String> getBuildIds()
protected CmsLockInfo getLock(CmsUUID structureId) throws CmsException
structureId - the structure id of the resourceCmsException - if something went wrongprotected CmsLockInfo getLock(java.lang.String sitepath) throws CmsException
sitepath - the site path of the resource to lockCmsException - if something went wrong