Class CmsNewResourceBuilder

java.lang.Object
org.opencms.ui.util.CmsNewResourceBuilder

public class CmsNewResourceBuilder extends Object
Helper class for creating a new resource using the New dialog.

  • Constructor Details

  • Method Details

    • addCallback

      Adds a callback to be notified when the resource is created.

      Parameters:
      callback - the callback
    • createResource

      Triggers the resource creation.

      Returns:
      the created resource
      Throws:
      CmsException - if something goes wrong
    • getCreatedResource

      Gets the created resource.

      This will null before the resource creation process.

      Returns:
      the created resource
    • getPropertyData

      Loads the property data with which the property dialog for the new resource should be initialized.

      Returns:
      the properties bean
    • safeCreateResource

      Creates a resource, but doesn't throw any exceptions.

      Exceptions will be passed to the onError method of registered callbacks.

      Returns:
      the created resource
    • setExplorerNameGeneration

      public void setExplorerNameGeneration(boolean explorerNameGenerationMode)
      Sets the Explorer name generation mode.

      Parameters:
      explorerNameGenerationMode - the explorer name generation mode
    • setLocale

      public void setLocale(Locale locale)
      Sets the locale.

      Parameters:
      locale - the locale
    • setModel

      public void setModel(CmsResource modelResource)
      Sets the model resource.

      Parameters:
      modelResource - the model resource
    • setPatternPath

      public void setPatternPath(String destination)
      Sets the creation path containing a number pattern.

      Parameters:
      destination - the creation path
    • setPropertyChanges

      public void setPropertyChanges(CmsPropertyChangeSet propertyChanges)
      Sets the property changes.

      Parameters:
      propertyChanges - the property changes
    • setSiteRoot

      public void setSiteRoot(String siteRoot)
      Sets the site root of the CMS context.

      Parameters:
      siteRoot - the site root
    • setType

      public void setType(String type)
      Sets the resource type name.

      Parameters:
      type - the resource type name