Class CmsAliasTableController
- java.lang.Object
-
- org.opencms.ade.sitemap.client.alias.CmsAliasTableController
-
public class CmsAliasTableController extends java.lang.Object
This is the controller class for the alias editor which is responsible for reacting to edit operations on the client by triggering the corresponding validation or save actions on the server.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<org.opencms.util.CmsUUID>
m_deletedIds
The set of ids of deleted rows.protected CmsAliasView
m_view
The view.
-
Constructor Summary
Constructors Constructor Description CmsAliasTableController()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeRewriteSelection(java.util.Set<org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow> selectedSet)
Method which should be called when the selection of the rewrite table has been changed.void
changeSelection(java.util.Set<org.opencms.gwt.shared.alias.CmsAliasTableRow> selectedSet)
This method is called when the selection of the alias table changes.void
deleteRewrites(java.util.List<org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow> rowsToDelete)
This method is called when the user wants to delete rewrites aliases.void
deleteRows(java.util.List<org.opencms.gwt.shared.alias.CmsAliasTableRow> rowsToDelete)
This method is called when the user deletes a set of rows.void
download()
Triggers the download of the current aliases.void
editAliasMode(org.opencms.gwt.shared.alias.CmsAliasTableRow row, org.opencms.gwt.shared.alias.CmsAliasMode mode)
This method is called after the mode of an alias has been edited.void
editAliasPath(org.opencms.gwt.shared.alias.CmsAliasTableRow row, java.lang.String path)
This method is called after the alias path of an alias has been edited.void
editNewAlias(java.lang.String aliasPath, java.lang.String resourcePath, org.opencms.gwt.shared.alias.CmsAliasMode mode)
This method is called when the user wants to add a new alias entry.void
editNewRewrite(java.lang.String rewriteRegex, java.lang.String rewriteReplacement, org.opencms.gwt.shared.alias.CmsAliasMode mode)
This method is called when the user adds a new rewrite alias.void
editResourcePath(org.opencms.gwt.shared.alias.CmsAliasTableRow row, java.lang.String path)
This method is called when the user has edited the resource path of an alias.void
editRewriteAlias(org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow object)
This method is called when the user has edited a rewrite alias.protected static org.opencms.ade.sitemap.shared.rpc.I_CmsSitemapServiceAsync
getService()
Gets the service to use for validating/saving aliases.void
load(java.lang.Runnable afterLoad)
Loads the initial data from the server.void
save()
This method is called when the user wants to save the aliases.void
setView(CmsAliasView view)
Sets the alias editor view.protected void
updateValidationStatus()
Enables or disables the save button of the view depending on whether there are validation errors.protected void
validate()
Triggers server-side validatiom of the alias table.protected void
validateNew(org.opencms.gwt.shared.alias.CmsAliasTableRow newEntry)
Triggers server-side validation of the alias table and of a new entry which should be added to it.protected void
validateRewrite()
Triggers server-side validation for the rewrite aliases.
-
-
-
Field Detail
-
m_deletedIds
protected java.util.Set<org.opencms.util.CmsUUID> m_deletedIds
The set of ids of deleted rows.
-
m_view
protected CmsAliasView m_view
The view.
-
-
Constructor Detail
-
CmsAliasTableController
public CmsAliasTableController()
-
-
Method Detail
-
getService
protected static org.opencms.ade.sitemap.shared.rpc.I_CmsSitemapServiceAsync getService()
Gets the service to use for validating/saving aliases.- Returns:
- the service used for validating/saving aliases
-
changeRewriteSelection
public void changeRewriteSelection(java.util.Set<org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow> selectedSet)
Method which should be called when the selection of the rewrite table has been changed.- Parameters:
selectedSet
- the set of selected rewrite table entries
-
changeSelection
public void changeSelection(java.util.Set<org.opencms.gwt.shared.alias.CmsAliasTableRow> selectedSet)
This method is called when the selection of the alias table changes.- Parameters:
selectedSet
- the set of selected rows
-
deleteRewrites
public void deleteRewrites(java.util.List<org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow> rowsToDelete)
This method is called when the user wants to delete rewrites aliases.- Parameters:
rowsToDelete
- the rows the user wants to delete
-
deleteRows
public void deleteRows(java.util.List<org.opencms.gwt.shared.alias.CmsAliasTableRow> rowsToDelete)
This method is called when the user deletes a set of rows.- Parameters:
rowsToDelete
- the list of rows which should be deleted
-
download
public void download()
Triggers the download of the current aliases.
-
editAliasMode
public void editAliasMode(org.opencms.gwt.shared.alias.CmsAliasTableRow row, org.opencms.gwt.shared.alias.CmsAliasMode mode)
This method is called after the mode of an alias has been edited.- Parameters:
row
- the edited rowmode
- the new alias mode
-
editAliasPath
public void editAliasPath(org.opencms.gwt.shared.alias.CmsAliasTableRow row, java.lang.String path)
This method is called after the alias path of an alias has been edited.- Parameters:
row
- the edited rowpath
- the new alias path
-
editNewAlias
public void editNewAlias(java.lang.String aliasPath, java.lang.String resourcePath, org.opencms.gwt.shared.alias.CmsAliasMode mode)
This method is called when the user wants to add a new alias entry.- Parameters:
aliasPath
- the alias pathresourcePath
- the resource site pathmode
- the alias mode
-
editNewRewrite
public void editNewRewrite(java.lang.String rewriteRegex, java.lang.String rewriteReplacement, org.opencms.gwt.shared.alias.CmsAliasMode mode)
This method is called when the user adds a new rewrite alias.- Parameters:
rewriteRegex
- the rewrite patternrewriteReplacement
- the rewrite replacement stringmode
- the rewrite mode
-
editResourcePath
public void editResourcePath(org.opencms.gwt.shared.alias.CmsAliasTableRow row, java.lang.String path)
This method is called when the user has edited the resource path of an alias.- Parameters:
row
- the alias the table rowpath
- the new path
-
editRewriteAlias
public void editRewriteAlias(org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow object)
This method is called when the user has edited a rewrite alias.- Parameters:
object
- the edited rewrite alias
-
load
public void load(java.lang.Runnable afterLoad)
Loads the initial data from the server.- Parameters:
afterLoad
- the action that should be executed after loading
-
save
public void save()
This method is called when the user wants to save the aliases.
-
setView
public void setView(CmsAliasView view)
Sets the alias editor view.- Parameters:
view
- the view object
-
updateValidationStatus
protected void updateValidationStatus()
Enables or disables the save button of the view depending on whether there are validation errors.
-
validate
protected void validate()
Triggers server-side validatiom of the alias table.
-
validateNew
protected void validateNew(org.opencms.gwt.shared.alias.CmsAliasTableRow newEntry)
Triggers server-side validation of the alias table and of a new entry which should be added to it.- Parameters:
newEntry
- the new entry
-
validateRewrite
protected void validateRewrite()
Triggers server-side validation for the rewrite aliases.
-
-