org.opencms.gwt.shared.rpc
Interface I_CmsVfsService

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

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

A service interface for retrieving information about the VFS tree.

Since:
8.0.0

Method Summary
 void createPropertyDefinition(java.lang.String propDef)
          Creates a new property definition.
 void deleteResource(CmsUUID structureId)
          Deletes a resource from the VFS.
 void deleteResource(java.lang.String sitePath)
          Deletes a resource from the VFS.
 void forceUnlock(CmsUUID structureId)
          Forces a resource to be unlocked.
 java.util.List<CmsAliasBean> getAliasesForPage(CmsUUID uuid)
          Fetches the aliases for a given page.
 CmsAvailabilityInfoBean getAvailabilityInfo(CmsUUID structureId)
          Returns a CmsAvailabilityInfoBean for a given resource.
 CmsAvailabilityInfoBean getAvailabilityInfo(java.lang.String vfsPath)
          Returns a CmsAvailabilityInfoBean for a given resource.
 CmsDeleteResourceBean getBrokenLinks(CmsUUID structureId)
          Returns a list of potentially broken links, if the given resource was deleted.
 CmsDeleteResourceBean getBrokenLinks(java.lang.String sitePath)
          Returns a list of potentially broken links, if the given resource was deleted.
 java.util.List<CmsVfsEntryBean> getChildren(java.lang.String path)
          Fetches the list of children of a path.
 java.util.ArrayList<java.lang.String> getDefinedProperties()
          Gets the names of defined properties.
 CmsReplaceInfo getFileReplaceInfo(CmsUUID structureId)
          Returns the file replace info.
 CmsLockReportInfo getLockReportInfo(CmsUUID structureId)
          Returns the lock report info.
 CmsListInfoBean getPageInfo(CmsUUID structureId)
          Returns a CmsListInfoBean for a given resource.
 CmsListInfoBean getPageInfo(java.lang.String vfsPath)
          Returns a CmsListInfoBean for a given resource.
 CmsPreviewInfo getPreviewInfo(CmsUUID structureId, java.lang.String locale)
          Returns the preview info for the given resource.
 CmsPreviewInfo getPreviewInfo(java.lang.String sitePath, java.lang.String locale)
          Returns the preview info for the given resource.
 CmsRenameInfoBean getRenameInfo(CmsUUID structureId)
          Gets the information necessary for the rename dialog.
 CmsResourceStatusBean getResourceStatus(CmsUUID structureId, java.lang.String locale)
          Gets a bean containing status information for a given resource.
 CmsRestoreInfoBean getRestoreInfo(CmsUUID structureId)
          Gets the information which is necessary for opening the 'Restore' dialog for a resource.
 java.util.List<CmsVfsEntryBean> getRootEntries()
          Returns the root entries of the VFS.
 java.lang.String getSitePath(CmsUUID structureId)
          Returns the site-path for the resource with the given id.
 CmsPropertiesBean loadPropertyData(CmsUUID id)
          Load the data necessary to edit the properties of a resource.
 CmsPrepareEditResponse prepareEdit(CmsUUID currentPage, java.lang.String fileNameWithMacros)
          Prepares to edit a file in the XML content editor.
 java.lang.String renameResource(CmsUUID structureId, java.lang.String newName)
          Renames a resource.
 void saveAliases(CmsUUID structureId, java.util.List<CmsAliasBean> aliases)
          Saves aliases for a page.
 void saveProperties(CmsPropertyChangeSet changes)
          Saves a set of property changes.
 java.lang.String substituteLinkForRootPath(java.lang.String currentSiteRoot, java.lang.String rootPath)
          Returns the absolute link to the given root path.
 void syncDeleteResource(CmsUUID structureId)
          Deletes a resource from the VFS.
 void undoChanges(CmsUUID structureId, boolean undoMove)
          Undoes the changes to a given resource, i.e. restores its online content to its offline version.
 java.util.Map<java.lang.String,java.lang.String> validateAliases(CmsUUID uuid, java.util.Map<java.lang.String,java.lang.String> aliasPaths)
          Validates alias paths for a page.
 

Method Detail

createPropertyDefinition

void createPropertyDefinition(java.lang.String propDef)
                              throws CmsRpcException
Creates a new property definition.

Parameters:
propDef - the name of the property
Throws:
CmsRpcException - if something goes wrong

deleteResource

void deleteResource(CmsUUID structureId)
                    throws CmsRpcException
Deletes a resource from the VFS.

Parameters:
structureId - the structure id of the resource to delete
Throws:
CmsRpcException - if something goes wrong

deleteResource

void deleteResource(java.lang.String sitePath)
                    throws CmsRpcException
Deletes a resource from the VFS.

Parameters:
sitePath - the site path of the resource to delete
Throws:
CmsRpcException - if something goes wrong

forceUnlock

void forceUnlock(CmsUUID structureId)
                 throws CmsRpcException
Forces a resource to be unlocked. In case the given resource is a folder, all sub-resources are also unlocked.

Parameters:
structureId - the structure id of the resource to unlock
Throws:
CmsRpcException - if something goes wrong

getAliasesForPage

java.util.List<CmsAliasBean> getAliasesForPage(CmsUUID uuid)
                                               throws CmsRpcException
Fetches the aliases for a given page.

Parameters:
uuid - the structure id of the page
Returns:
the lists of aliases for the page
Throws:
CmsRpcException - if something goes wrong

getAvailabilityInfo

CmsAvailabilityInfoBean getAvailabilityInfo(CmsUUID structureId)
                                            throws CmsRpcException
Returns a CmsAvailabilityInfoBean for a given resource.

Parameters:
structureId - the structure id to create the CmsAvailabilityInfoBean for
Returns:
the CmsAvailabilityInfoBean for a given resource
Throws:
CmsRpcException - if the RPC call goes wrong

getAvailabilityInfo

CmsAvailabilityInfoBean getAvailabilityInfo(java.lang.String vfsPath)
                                            throws CmsRpcException
Returns a CmsAvailabilityInfoBean for a given resource.

Parameters:
vfsPath - the vfs path to create the CmsAvailabilityInfoBean for
Returns:
the CmsAvailabilityInfoBean for a given resource
Throws:
CmsRpcException - if the RPC call goes wrong

getBrokenLinks

CmsDeleteResourceBean getBrokenLinks(CmsUUID structureId)
                                     throws CmsRpcException
Returns a list of potentially broken links, if the given resource was deleted.

Parameters:
structureId - the resource structure id
Returns:
a list of potentially broken links
Throws:
CmsRpcException - if something goes wrong

getBrokenLinks

CmsDeleteResourceBean getBrokenLinks(java.lang.String sitePath)
                                     throws CmsRpcException
Returns a list of potentially broken links, if the given resource was deleted.

Parameters:
sitePath - the resource site-path
Returns:
a list of potentially broken links
Throws:
CmsRpcException - if something goes wrong

getChildren

java.util.List<CmsVfsEntryBean> getChildren(java.lang.String path)
                                            throws CmsRpcException
Fetches the list of children of a path.

Parameters:
path - the path for which the list of children should be retrieved
Returns:
the children of the path
Throws:
CmsRpcException - if something goes wrong

getDefinedProperties

java.util.ArrayList<java.lang.String> getDefinedProperties()
                                                           throws CmsRpcException
Gets the names of defined properties.

Returns:
the list of names for all defined properties
Throws:
CmsRpcException - if something goes wrong

getFileReplaceInfo

CmsReplaceInfo getFileReplaceInfo(CmsUUID structureId)
                                  throws CmsRpcException
Returns the file replace info.

Parameters:
structureId - the structure id of the file to replace
Returns:
the file replace info
Throws:
CmsRpcException - if the RPC call goes wrong

getLockReportInfo

CmsLockReportInfo getLockReportInfo(CmsUUID structureId)
                                    throws CmsRpcException
Returns the lock report info.

Parameters:
structureId - the structure id of the resource to get the report for
Returns:
the lock report info
Throws:
CmsRpcException - if something goes wrong

getPageInfo

CmsListInfoBean getPageInfo(CmsUUID structureId)
                            throws CmsRpcException
Returns a CmsListInfoBean for a given resource.

Parameters:
structureId - the structure id to create the CmsListInfoBean for
Returns:
the CmsListInfoBean for a given resource
Throws:
CmsRpcException - if the RPC call goes wrong

getPageInfo

CmsListInfoBean getPageInfo(java.lang.String vfsPath)
                            throws CmsRpcException
Returns a CmsListInfoBean for a given resource.

Parameters:
vfsPath - the vfs path to create the CmsListInfoBean for
Returns:
the CmsListInfoBean for a given resource
Throws:
CmsRpcException - if the RPC call goes wrong

getPreviewInfo

CmsPreviewInfo getPreviewInfo(CmsUUID structureId,
                              java.lang.String locale)
                              throws CmsRpcException
Returns the preview info for the given resource.

Parameters:
structureId - the resource structure id
locale - the requested locale
Returns:
the preview info
Throws:
CmsRpcException - if something goes wrong

getPreviewInfo

CmsPreviewInfo getPreviewInfo(java.lang.String sitePath,
                              java.lang.String locale)
                              throws CmsRpcException
Returns the preview info for the given resource.

Parameters:
sitePath - the resource site path
locale - the requested locale
Returns:
the preview info
Throws:
CmsRpcException - if something goes wrong

getRenameInfo

CmsRenameInfoBean getRenameInfo(CmsUUID structureId)
                                throws CmsRpcException
Gets the information necessary for the rename dialog.

Parameters:
structureId - the structure id of the resource to rename
Returns:
the information needed for the rename dialog
Throws:
CmsRpcException - if something goes wrong

getResourceStatus

CmsResourceStatusBean getResourceStatus(CmsUUID structureId,
                                        java.lang.String locale)
                                        throws CmsRpcException
Gets a bean containing status information for a given resource.

Parameters:
structureId - the structure id of a resource
locale - the locale for which we want the resource information
Returns:
the resource status
Throws:
CmsRpcException - if something goes wrong

getRestoreInfo

CmsRestoreInfoBean getRestoreInfo(CmsUUID structureId)
                                  throws CmsRpcException
Gets the information which is necessary for opening the 'Restore' dialog for a resource.

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

getRootEntries

java.util.List<CmsVfsEntryBean> getRootEntries()
                                               throws CmsRpcException
Returns the root entries of the VFS.

Returns:
a list of root entries
Throws:
CmsRpcException - if something goes wrong

getSitePath

java.lang.String getSitePath(CmsUUID structureId)
                             throws CmsRpcException
Returns the site-path for the resource with the given id.

Parameters:
structureId - the structure id
Returns:
the site-path or null if not available
Throws:
CmsRpcException - if something goes wrong

loadPropertyData

CmsPropertiesBean loadPropertyData(CmsUUID id)
                                   throws CmsRpcException
Load the data necessary to edit the properties of a resource.

Parameters:
id - the structure id of a resource
Returns:
the property information for that resource
Throws:
CmsRpcException

prepareEdit

CmsPrepareEditResponse prepareEdit(CmsUUID currentPage,
                                   java.lang.String fileNameWithMacros)
                                   throws CmsRpcException
Prepares to edit a file in the XML content editor.

Parameters:
currentPage - the current page from which the editor should be opened
fileNameWithMacros - the file name, which may contain macros
Returns:
a bean with more information about the file to edit
Throws:
CmsRpcException

renameResource

java.lang.String renameResource(CmsUUID structureId,
                                java.lang.String newName)
                                throws CmsRpcException
Renames a resource.

Parameters:
structureId - the structure id of the resource to rename
newName - the new resource name
Returns:
null or an error message
Throws:
CmsRpcException - if something goes wrong

saveAliases

void saveAliases(CmsUUID structureId,
                 java.util.List<CmsAliasBean> aliases)
                 throws CmsRpcException
Saves aliases for a page.

Parameters:
structureId - the structure id of the page
aliases - the aliases which should be saved for the page
Throws:
CmsRpcException

saveProperties

void saveProperties(CmsPropertyChangeSet changes)
                    throws CmsRpcException
Saves a set of property changes.

Parameters:
changes - a set of property changes
Throws:
CmsRpcException - if something goes wrong

substituteLinkForRootPath

java.lang.String substituteLinkForRootPath(java.lang.String currentSiteRoot,
                                           java.lang.String rootPath)
                                           throws CmsRpcException
Returns the absolute link to the given root path.

Parameters:
currentSiteRoot - the current site
rootPath - the root path
Returns:
the absolute link
Throws:
CmsRpcException - if something goes wrong processing the request

syncDeleteResource

void syncDeleteResource(CmsUUID structureId)
                        throws CmsRpcException
Deletes a resource from the VFS.

Parameters:
structureId - the structure id of the resource to delete
Throws:
CmsRpcException - if something goes wrong

undoChanges

void undoChanges(CmsUUID structureId,
                 boolean undoMove)
                 throws CmsRpcException
Undoes the changes to a given resource, i.e. restores its online content to its offline version.

Parameters:
structureId - the structure id of the resource to undo
undoMove - true if move operations should be undone
Throws:
CmsRpcException - if something goes wrong

validateAliases

java.util.Map<java.lang.String,java.lang.String> validateAliases(CmsUUID uuid,
                                                                 java.util.Map<java.lang.String,java.lang.String> aliasPaths)
                                                                 throws CmsRpcException
Validates alias paths for a page.

Parameters:
uuid - the structure id of the page
aliasPaths - a map from (arbitrary) id strings to alias paths
Returns:
a map which maps the same id strings to validation results
Throws:
CmsRpcException - if something goes wrong