Class CmsAliasTableController

java.lang.Object
org.opencms.ade.sitemap.client.alias.CmsAliasTableController

public class CmsAliasTableController extends 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 Set<org.opencms.util.CmsUUID>
    The set of ids of deleted rows.
    protected CmsAliasView
    The view.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    changeRewriteSelection(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(Set<org.opencms.gwt.shared.alias.CmsAliasTableRow> selectedSet)
    This method is called when the selection of the alias table changes.
    void
    deleteRewrites(List<org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow> rowsToDelete)
    This method is called when the user wants to delete rewrites aliases.
    void
    deleteRows(List<org.opencms.gwt.shared.alias.CmsAliasTableRow> rowsToDelete)
    This method is called when the user deletes a set of rows.
    void
    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, String path)
    This method is called after the alias path of an alias has been edited.
    void
    editNewAlias(String aliasPath, 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(String rewriteRegex, 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, 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
    Gets the service to use for validating/saving aliases.
    void
    load(Runnable afterLoad)
    Loads the initial data from the server.
    void
    This method is called when the user wants to save the aliases.
    void
    Sets the alias editor view.
    protected void
    Enables or disables the save button of the view depending on whether there are validation errors.
    protected void
    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
    Triggers server-side validation for the rewrite aliases.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • 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(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(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(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(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 row
      mode - the new alias mode
    • editAliasPath

      public void editAliasPath(org.opencms.gwt.shared.alias.CmsAliasTableRow row, String path)
      This method is called after the alias path of an alias has been edited.

      Parameters:
      row - the edited row
      path - the new alias path
    • editNewAlias

      public void editNewAlias(String aliasPath, 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 path
      resourcePath - the resource site path
      mode - the alias mode
    • editNewRewrite

      public void editNewRewrite(String rewriteRegex, 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 pattern
      rewriteReplacement - the rewrite replacement string
      mode - the rewrite mode
    • editResourcePath

      public void editResourcePath(org.opencms.gwt.shared.alias.CmsAliasTableRow row, String path)
      This method is called when the user has edited the resource path of an alias.

      Parameters:
      row - the alias the table row
      path - 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(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.