|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
com.google.gwt.user.server.rpc.RemoteServiceServlet
org.opencms.gwt.CmsGwtService
org.opencms.gwt.CmsCoreService
public class CmsCoreService
Provides general core services.
CmsCoreService
,
I_CmsCoreService
,
I_CmsCoreServiceAsync
,
Serialized FormField Summary |
---|
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet |
---|
perThreadRequest, perThreadResponse |
Fields inherited from interface org.opencms.gwt.shared.rpc.I_CmsCoreService |
---|
CONTEXT_CONTAINERPAGE, CONTEXT_SITEMAP |
Constructor Summary | |
---|---|
CmsCoreService()
|
Method Summary | ||
---|---|---|
CmsUUID |
createUUID()
Creates a new UUID. |
|
List<CmsCategoryTreeEntry> |
getCategories(String fromPath,
boolean includeSubCats,
List<String> refPaths)
Returns the categories for the given search parameters. |
|
List<CmsCategoryTreeEntry> |
getCategoriesForSitePath(String sitePath)
Returns the categories for the given reference site-path. |
|
List<CmsContextMenuEntryBean> |
getContextMenuEntries(CmsUUID structureId,
CmsCoreData.AdeContext context)
Returns the context menu entries for the given URI. |
|
CmsReturnLinkInfo |
getLinkForReturnCode(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(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. |
|
String |
getUniqueFileName(String parentFolder,
String baseName)
Returns a unique filename for the given base name and the parent folder. |
|
static I_CmsValidationService |
getValidationService(String name)
Internal helper method for getting a validation service. |
|
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
|
instantiate(Class<T> anInterface,
String className)
Instantiates a class given its name using its default constructor. |
|
CmsReturnLinkInfo |
internalGetLinkForReturnCode(String returnCode)
Implementation method for getting the link for a given return code. |
|
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. |
|
static CmsCoreService |
newInstance(javax.servlet.http.HttpServletRequest request)
Returns a new configured service instance. |
|
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(String uri,
CmsAvailabilityInfoBean bean)
Applies the changes stored in the info bean to the vfs of OpenCms. |
|
void |
setToolbarVisible(boolean visible)
Writes the tool-bar visibility into the session cache. |
|
String |
unlock(CmsUUID structureId)
Unlocks the given resource. |
|
Map<String,CmsValidationResult> |
validate(Map<String,CmsValidationQuery> validationQueries)
Performs a batch of validations and returns the results. |
|
Map<String,CmsValidationResult> |
validate(String formValidatorClass,
Map<String,CmsValidationQuery> validationQueries,
Map<String,String> values,
String config)
Performs a batch of validations using a custom form validator class. |
Methods inherited from class org.opencms.gwt.CmsGwtService |
---|
checkPermissions, doGetSerializationPolicy, doUnexpectedFailure, ensureLock, ensureLock, ensureLock, ensureSession, error, getCmsObject, getPropertiesByName, getRequest, getResponse, log, log, logError, service, setCms, setContext, setRequest, tryUnlock |
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet |
---|
checkPermutationStrongName, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse |
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet |
---|
doPost, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsCoreService()
Method Detail |
---|
public static I_CmsValidationService getValidationService(String name) throws CmsException
name
- the class name of the validation service
CmsException
- if something goes wrongpublic static <T> T instantiate(Class<T> anInterface, 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 class
CmsException
- if the instantiation failspublic static CmsCoreService newInstance(javax.servlet.http.HttpServletRequest request)
request
- the current request
public CmsUUID createUUID()
I_CmsCoreService
createUUID
in interface I_CmsCoreService
I_CmsCoreService.createUUID()
public List<CmsCategoryTreeEntry> getCategories(String fromPath, boolean includeSubCats, List<String> refPaths) throws CmsRpcException
I_CmsCoreService
getCategories
in interface I_CmsCoreService
fromPath
- 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 repository
CmsRpcException
- if something goes wrongI_CmsCoreService.getCategories(java.lang.String, boolean, java.util.List)
public List<CmsCategoryTreeEntry> getCategoriesForSitePath(String sitePath) throws CmsRpcException
I_CmsCoreService
getCategoriesForSitePath
in interface I_CmsCoreService
sitePath
- the reference site-path
CmsRpcException
- if something goes wrongI_CmsCoreService.getCategoriesForSitePath(java.lang.String)
public List<CmsContextMenuEntryBean> getContextMenuEntries(CmsUUID structureId, CmsCoreData.AdeContext context) throws CmsRpcException
I_CmsCoreService
getContextMenuEntries
in interface I_CmsCoreService
structureId
- 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(String returnCode) throws CmsRpcException
I_CmsCoreService
getLinkForReturnCode
in interface I_CmsCoreService
returnCode
- the return code
CmsRpcException
- if something goes wrongI_CmsCoreService.getLinkForReturnCode(java.lang.String)
public CmsResourceState getResourceState(CmsUUID structureId) throws CmsRpcException
I_CmsCoreService
getResourceState
in interface I_CmsCoreService
structureId
- the resource structure id
CmsRpcException
- if something goes wrongI_CmsCoreService.getResourceState(org.opencms.util.CmsUUID)
public String getUniqueFileName(String parentFolder, String baseName)
I_CmsCoreService
getUniqueFileName
in interface I_CmsCoreService
parentFolder
- the parent folder of the filebaseName
- the proposed file name
I_CmsCoreService.getUniqueFileName(java.lang.String, java.lang.String)
public String getWorkplaceLink(CmsUUID structureId) throws CmsRpcException
I_CmsCoreService
getWorkplaceLink
in interface I_CmsCoreService
structureId
- the structure id of the resource for which to open the workplace
CmsRpcException
- if something goes wrongI_CmsCoreService.getWorkplaceLink(org.opencms.util.CmsUUID)
public CmsReturnLinkInfo internalGetLinkForReturnCode(String returnCode) throws CmsException
returnCode
- the return code
CmsException
- if something goes wrongpublic String lockTemp(CmsUUID structureId) throws CmsRpcException
I_CmsCoreService
lockTemp
in interface I_CmsCoreService
structureId
- the structure id of the resource to lock
null
if successful, an error message if not
CmsRpcException
- if something goes wrongI_CmsCoreService.lockTemp(org.opencms.util.CmsUUID)
public CmsLockInfo lockTempAndCheckModification(CmsUUID structureId, long modification) throws CmsRpcException
I_CmsCoreService
lockTempAndCheckModification
in interface I_CmsCoreService
structureId
- the structure id of the resource to lockmodification
- the timestamp to check
null
if successful, an error message if not
CmsRpcException
- if something goes wrongI_CmsCoreService.lockTempAndCheckModification(org.opencms.util.CmsUUID, long)
public void ping()
I_CmsCoreService
ping
in interface I_CmsCoreService
I_CmsCoreService.ping()
public CmsCoreData prefetch()
I_CmsCoreService
prefetch
in interface I_CmsCoreService
I_CmsCoreService.prefetch()
public void setAvailabilityInfo(CmsUUID structureId, CmsAvailabilityInfoBean bean) throws CmsRpcException
I_CmsCoreService
setAvailabilityInfo
in interface I_CmsCoreService
structureId
- the structure id of the modified resourcebean
- the bean with the information of the dialog
CmsRpcException
- if the RPC call goes wrongI_CmsCoreService.setAvailabilityInfo(org.opencms.util.CmsUUID, org.opencms.gwt.shared.CmsAvailabilityInfoBean)
public void setAvailabilityInfo(String uri, CmsAvailabilityInfoBean bean) throws CmsRpcException
I_CmsCoreService
setAvailabilityInfo
in interface I_CmsCoreService
uri
- the vfs path of the modified resourcebean
- the bean with the information of the dialog
CmsRpcException
- if the RPC call goes wrongI_CmsCoreService.setAvailabilityInfo(java.lang.String, org.opencms.gwt.shared.CmsAvailabilityInfoBean)
public void setToolbarVisible(boolean visible) throws CmsRpcException
I_CmsCoreService
setToolbarVisible
in interface I_CmsCoreService
visible
- true
if the tool-bar is visible
CmsRpcException
I_CmsCoreService.setToolbarVisible(boolean)
public String unlock(CmsUUID structureId) throws CmsRpcException
I_CmsCoreService
unlock
in interface I_CmsCoreService
structureId
- the structure id of the resource to unlock
null
if successful, an error message if not
CmsRpcException
- if something goes wrongI_CmsCoreService.unlock(org.opencms.util.CmsUUID)
public Map<String,CmsValidationResult> validate(Map<String,CmsValidationQuery> validationQueries) throws CmsRpcException
I_CmsCoreService
validate
in interface I_CmsCoreService
validationQueries
- a map from field names to validation queries
CmsRpcException
- if something goes wrongI_CmsCoreService.validate(java.util.Map)
public Map<String,CmsValidationResult> validate(String formValidatorClass, Map<String,CmsValidationQuery> validationQueries, Map<String,String> values, String config) throws CmsRpcException
I_CmsCoreService
validate
in interface I_CmsCoreService
formValidatorClass
- 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 string
CmsRpcException
- if the RPC call goes wrongI_CmsCoreService.validate(java.lang.String, java.util.Map, java.util.Map, java.lang.String)
protected CmsLockInfo getLock(CmsUUID structureId) throws CmsException
structureId
- the structure id of the resource
CmsException
- if something went wrongprotected CmsLockInfo getLock(String sitepath) throws CmsException
sitepath
- the site path of the resource to lock
CmsException
- if something went wrong
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |