org.opencms.ade.sitemap
Class CmsVfsSitemapService

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.opencms.gwt.CmsGwtService
                      extended by org.opencms.ade.sitemap.CmsVfsSitemapService
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, I_CmsSitemapService

public class CmsVfsSitemapService
extends CmsGwtService
implements I_CmsSitemapService

Handles all RPC services related to the vfs sitemap.

Since:
8.0.0
See Also:
I_CmsSitemapService, I_CmsSitemapServiceAsync, Serialized Form

Nested Class Summary
protected  class CmsVfsSitemapService.LockInfo
          Helper class for representing information about a lock.
 
Field Summary
static String KEY_FUNCTION_DETAIL
          The configuration key for the functionDetail attribute in the container.info property.
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
CmsVfsSitemapService()
           
 
Method Summary
protected  CmsBrokenLinkBean createSitemapBrokenLinkBean(CmsResource resource)
          Creates a "broken link" bean based on a resource.
 CmsSubSitemapInfo createSubSitemap(CmsUUID entryId)
          Creates a sub-sitemap of the given sitemap starting from the given entry.
protected  CmsVfsSitemapService.LockInfo ensureLockAndGetInfo(CmsResource resource)
          Locks the given resource with a temporary, if not already locked by the current user.
 CmsAdditionalEntryInfo getAdditionalEntryInfo(CmsUUID structureId)
          Returns additional sitemap entry information.
 CmsClientSitemapEntry getChildren(String entryPointUri, String root, int levels)
          Returns the sitemap children for the given path.
 CmsSitemapMergeInfo mergeSubSitemap(String entryPoint, CmsUUID subSitemapId)
          Merges a sub-sitemap into it's parent sitemap.
static CmsVfsSitemapService newInstance(javax.servlet.http.HttpServletRequest request)
          Returns a new configured service instance.
 CmsSitemapData prefetch(String sitemapUri)
          Returns the initialization data for the given sitemap.
 List<CmsClientSitemapEntry> save(String entryPoint, CmsSitemapChange change)
          Saves the change to the given sitemap.
protected  List<CmsClientSitemapEntry> saveInternal(String entryPoint, CmsSitemapChange change)
          Internal method for saving a sitemap.
 List<CmsClientSitemapEntry> saveSync(String entryPoint, CmsSitemapChange change)
          Saves the change to the given sitemap.
 
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
 

Field Detail

KEY_FUNCTION_DETAIL

public static final String KEY_FUNCTION_DETAIL
The configuration key for the functionDetail attribute in the container.info property.

See Also:
Constant Field Values
Constructor Detail

CmsVfsSitemapService

public CmsVfsSitemapService()
Method Detail

newInstance

public static CmsVfsSitemapService newInstance(javax.servlet.http.HttpServletRequest request)
Returns a new configured service instance.

Parameters:
request - the current request
Returns:
a new service instance

createSubSitemap

public CmsSubSitemapInfo createSubSitemap(CmsUUID entryId)
                                   throws CmsRpcException
Description copied from interface: I_CmsSitemapService
Creates a sub-sitemap of the given sitemap starting from the given entry.

Specified by:
createSubSitemap in interface I_CmsSitemapService
Parameters:
entryId - the structure id of the sitemap entry to create a sub sitemap of
Returns:
the sub-sitemap creation result
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsSitemapService.createSubSitemap(org.opencms.util.CmsUUID)

getAdditionalEntryInfo

public CmsAdditionalEntryInfo getAdditionalEntryInfo(CmsUUID structureId)
                                              throws CmsRpcException
Description copied from interface: I_CmsSitemapService
Returns additional sitemap entry information.

Specified by:
getAdditionalEntryInfo in interface I_CmsSitemapService
Parameters:
structureId - the entry structure id
Returns:
the additional information
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsSitemapService.getAdditionalEntryInfo(org.opencms.util.CmsUUID)

getChildren

public CmsClientSitemapEntry getChildren(String entryPointUri,
                                         String root,
                                         int levels)
                                  throws CmsRpcException
Description copied from interface: I_CmsSitemapService
Returns the sitemap children for the given path.

Specified by:
getChildren in interface I_CmsSitemapService
Parameters:
entryPointUri - the URI of the sitemap entry point
root - the site relative root
levels - the count of child levels to read
Returns:
the sitemap children
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsSitemapService.getChildren(java.lang.String, java.lang.String, int)

mergeSubSitemap

public CmsSitemapMergeInfo mergeSubSitemap(String entryPoint,
                                           CmsUUID subSitemapId)
                                    throws CmsRpcException
Description copied from interface: I_CmsSitemapService
Merges a sub-sitemap into it's parent sitemap.

Specified by:
mergeSubSitemap in interface I_CmsSitemapService
Parameters:
entryPoint - the sitemap entry point
subSitemapId - the structure id of the sub sitemap folder
Returns:
the result of the merge operation
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsSitemapService.mergeSubSitemap(java.lang.String, org.opencms.util.CmsUUID)

prefetch

public CmsSitemapData prefetch(String sitemapUri)
                        throws CmsRpcException
Description copied from interface: I_CmsSitemapService
Returns the initialization data for the given sitemap.

Specified by:
prefetch in interface I_CmsSitemapService
Parameters:
sitemapUri - the site relative path
Returns:
the initialization data
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsSitemapService.prefetch(java.lang.String)

save

public List<CmsClientSitemapEntry> save(String entryPoint,
                                        CmsSitemapChange change)
                                 throws CmsRpcException
Description copied from interface: I_CmsSitemapService
Saves the change to the given sitemap.

Specified by:
save in interface I_CmsSitemapService
Parameters:
entryPoint - the sitemap URI
change - the change to save
Returns:
a list of changed sitemap entries
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsSitemapService.save(java.lang.String, org.opencms.ade.sitemap.shared.CmsSitemapChange)

saveSync

public List<CmsClientSitemapEntry> saveSync(String entryPoint,
                                            CmsSitemapChange change)
                                     throws CmsRpcException
Description copied from interface: I_CmsSitemapService
Saves the change to the given sitemap.

Specified by:
saveSync in interface I_CmsSitemapService
Parameters:
entryPoint - the sitemap URI
change - the change to save
Returns:
a list of changed sitemap entries
Throws:
CmsRpcException - if something goes wrong
See Also:
I_CmsSitemapService.saveSync(java.lang.String, org.opencms.ade.sitemap.shared.CmsSitemapChange)

createSitemapBrokenLinkBean

protected CmsBrokenLinkBean createSitemapBrokenLinkBean(CmsResource resource)
                                                 throws CmsException
Creates a "broken link" bean based on a resource.

Parameters:
resource - the resource
Returns:
the "broken link" bean with the data from the resource
Throws:
CmsException - if something goes wrong

ensureLockAndGetInfo

protected CmsVfsSitemapService.LockInfo ensureLockAndGetInfo(CmsResource resource)
                                                      throws CmsException
Locks the given resource with a temporary, if not already locked by the current user. Will throw an exception if the resource could not be locked for the current user.

Parameters:
resource - the resource to lock
Returns:
the assigned lock
Throws:
CmsException - if the resource could not be locked

saveInternal

protected List<CmsClientSitemapEntry> saveInternal(String entryPoint,
                                                   CmsSitemapChange change)
                                            throws CmsException
Internal method for saving a sitemap.

Parameters:
entryPoint - the URI of the sitemap to save
change - the change to save
Returns:
list of changed sitemap entries
Throws:
CmsException