Class SkinTemplateZone

java.lang.Object
org.ametys.web.skin.SkinTemplateZone

public class SkinTemplateZone extends Object
A zone definition in a template
  • Field Details

  • Constructor Details

    • SkinTemplateZone

      public SkinTemplateZone(String skinId, String templateId, String id, String type, I18nizableText label, I18nizableText description, String smallImage, String mediumImage, String largeImage, String inheritanceString, Optional<ViewParametersModel> viewParameters, Optional<ViewParametersModel> zoneItemViewParameters)
      Create a zone
      Parameters:
      skinId - The id of the skin owning the template owning the zone
      templateId - The id of the template owning the zone
      id - The id of the zone
      type - The zone type between primary and secondary.
      label - The label of the zone
      description - The description of the zone
      smallImage - The small image to represent the zone
      mediumImage - The medium image to represent the zone
      largeImage - The large image to represent the zone
      inheritanceString - The inheritance scheme following the pattern "TemplateName->,ZoneNameInThatTemplate,..." where TemplateName can be "*" or "". A completely empty string is equals to "*->CurrentZoneName". A blank string after the arrow means "no inheritance for this template".
      viewParameters - the zone view parameters model
      zoneItemViewParameters - the zone item view parameters model
  • Method Details

    • getId

      public String getId()
      The template id
      Returns:
      the id
    • getLabel

      The template label
      Returns:
      The label
    • getDescription

      The template description
      Returns:
      The description. Can not be null but can be empty
    • getSmallImage

      The small image file uri
      Returns:
      The small image file uri
    • getMediumImage

      The medium image file uri
      Returns:
      The medium image file uri
    • getLargeImage

      The large image file uri
      Returns:
      The large image file uri
    • hasInheritance

      public boolean hasInheritance()
      Determine if this zone inherits another one
      Returns:
      true if a inheritance is declared.
    • getType

      public String getType()
      Get the zone type (primary or secondary)
      Returns:
      the type
    • getInheritance

      public String getInheritance(String templateName)
      Get the name of the zone to inherit in the given template
      Parameters:
      templateName - The name of the template. Cannot be empty, null or a joker.
      Returns:
      The name of a zone in that template, or null is not applicable for this template.
    • getViewParameters

      Get the view parameters model for this zone
      Returns:
      the view parameters
    • getZoneItemViewParameters

      Get the view parameters model for zone item in this zone
      Returns:
      the view parameters