Class EditLocalFontHandler

All Implemented Interfaces:
JcmsConstants, JaliosConstants

public class EditLocalFontHandler extends JcmsFormHandler
This handler allows super admin to manage site settings in Front Office.
Author:
Guillaume Derrien <guillaume.derrien@jalios.com>
  • Field Details

    • opCreate

      protected boolean opCreate
    • opDelete

      protected boolean opDelete
    • opUpload

      protected boolean opUpload
    • uploadFont

      public FontFamily uploadFont
  • Constructor Details

    • EditLocalFontHandler

      public EditLocalFontHandler()
  • Method Details

    • init

      protected void init()
      Description copied from class: JcmsFormHandler
      Method to implement if you need to initialize your handler from parameter received, prior to all security validation.

      You must absolutely not perform any action which modify data or site configuration.

      Therefore it is strongly recommend NOT TO implement this method, or use very wisely.

      Overrides:
      init in class JcmsFormHandler
    • processAction

      public boolean processAction() throws IOException
      Description copied from class: JcmsFormHandler
      Method to be implemented to check/validate action to be performed and process them.

      Default implementation is to return false. No need to call super method.

      This method may NOT be invoked at all if security validation are not met.

      You must ensure your handler and JSP can work properly without any code invoked in this method.

      Overrides:
      processAction in class JcmsFormHandler
      Returns:
      false if no redirection is needed, true otherwise
      Throws:
      IOException - IO Exception
    • validateUpload

      protected boolean validateUpload()
    • validateCreate

      protected boolean validateCreate()
    • setOpCreate

      public void setOpCreate(String opCreate)
    • setOpDelete

      public void setOpDelete(String opDelete)
    • setOpUpload

      public void setOpUpload(String opUpload)
    • getUploadFont

      public FontFamily getUploadFont()
    • setUploadFont

      public void setUploadFont(FontFamily uploadFont)
    • getUploadFontAsString

      public String getUploadFontAsString()
    • analyzeMultiple

      protected FontFamily analyzeMultiple(List<DocUploadInfo> files) throws FontImportException
      Analyzes one uploaded font file and returns a font family containing one variant.
      Parameters:
      files - the temporary font files
      Returns:
      detected font family with all variant
      Throws:
      FontImportException - if the file is invalid or cannot be analyzed