Interface PublishService


public interface PublishService
A service that can publish information, such as HTML or PDF.
  • Field Details

    • HTML_PUBLISH_TYPE_STRING

      @Deprecated static final String HTML_PUBLISH_TYPE_STRING
      Deprecated.
      v1 of the html publisher, soon to be deprecated (5.3)
      See Also:
    • HTML_V2_PUBLISH_TYPE_STRING

      @Deprecated static final String HTML_V2_PUBLISH_TYPE_STRING
      Deprecated.
      v1.5 of the html publisher, also called responsive publisher, only lived as a plugin
      See Also:
    • PAGES_PUBLISH_TYPE_STRING

      static final String PAGES_PUBLISH_TYPE_STRING
      v2 of the html publisher, scheduled to replace v1
      See Also:
    • REPORT_PUBLISH_TYPE_STRING

      static final String REPORT_PUBLISH_TYPE_STRING
      v1 of the report publisher (creates pdf/word reports)
      See Also:
    • CUSTOM_PUBLISH_TYPE_STRING

      static final String CUSTOM_PUBLISH_TYPE_STRING
      a helper service for v1 html publisher, also used by customers who did their own publisher (IFS)
      See Also:
  • Method Details

    • getName

      String getName()
      Returns the name of the service
      Returns:
      the name of the service
    • getDescription

      String getDescription()
      Returns a description of the service.
      Returns:
      a description of the service.
    • isCreatable

      boolean isCreatable()
      Returns true if this service can create new profiles.
      Returns:
      true if this service can create new profiles.
    • createProfile

      Creates a new profile, ready for editing.
      Parameters:
      name - The name of the profile.
      Returns:
      a new profile, ready for editing.
      Throws:
      PublishProfileException - If an exception occurs.
    • isImportCompatible

      boolean isImportCompatible(File zipFile) throws PublishProfileException
      Returns true if this service can import the given profile
      Parameters:
      zipFile - A zipFile.
      Returns:
      true if this service can import the given profile
      Throws:
      PublishProfileException - If an exception occurs.
    • importProfile

      PublishProfile importProfile(File zipFile) throws PublishProfileException
      Imports a profile.
      Parameters:
      zipFile - The zip to import.
      Returns:
      a profile
      Throws:
      PublishProfileException - If an exception occurs.
    • exportProfile

      void exportProfile(PublishProfile profile, File toFile) throws IOException, PublishProfileException
      Exports a profile.
      Parameters:
      profile - The profile
      toFile - The file.
      Throws:
      IOException - If an IOException occurs.
      PublishProfileException - If an exception occurs.
    • isEditable

      boolean isEditable()
      Returns true if profiles can be edited by this service
      Returns:
      true if profiles can be edited by this service
    • editProfile

      void editProfile(Window parent, MutablePublishProfile profile, Runnable editCallBack)
      Shows a GUI for editing the given profile.
      Parameters:
      parent - The parent window.
      profile - The profile.
      editCallBack - An edit callback.
    • editProfile

      default void editProfile(Window parent, MutablePublishProfile profile, PublishService.ProfileEditorKey key, Runnable editCallBack)
      Shows a GUI for editing a specific setting in the given profile.
      Parameters:
      parent - The parent window.
      profile - A profile.
      key - A key.
      editCallBack - An edit callback.
    • isCompatible

      boolean isCompatible(PublishProfile profile) throws PublishProfileException
      Returns true if this service can use the given profile.
      Parameters:
      profile - A profile.
      Returns:
      true if this service can use the given profile.
      Throws:
      PublishProfileException - If an exception occurs.
    • validateBeforePublish

      boolean validateBeforePublish(PublishProfile profile, PublishService.InvalidMessage msg, Map<String,Object> session) throws PublishProfileException
      Returns true if the profile is ready to be used. If the profile is not ready (information needed is missing) false is returned and the InvalidMessage object is updated.
      Parameters:
      profile - A profile.
      msg - A msg.
      Returns:
      true if the profile is ready to be used.
      Throws:
      PublishProfileException - If an exception occurs.
    • getProfileType

      String getProfileType()
      Returns this service's profile type
      Returns:
      this service's profile type
    • getSmallIcon

      Icon getSmallIcon()
      Returns an icon that represents this service
      Returns:
      an icon that represents this service
    • getSmallIconSelected

      Icon getSmallIconSelected()
    • isAlwaysOverwrite

      boolean isAlwaysOverwrite(PublishProfile profile)
      Returns true if the ui should ignore existing files
      Parameters:
      profile - A profile
      Returns:
      true if the ui should ignore existing files
    • getPublishSettingsEditor

      JComponent getPublishSettingsEditor(PublishProfile profile, UploadProfile target, Map<String,Object> properties)
      Returns an optional editor for modifying the properties sent to the publish method.
      Parameters:
      profile - A profile.
      target - A target.
      properties - A property map.
      Returns:
      an optional editor for modifying the properties sent to the publish method.
    • publish

      void publish(PublishProfile profile, UploadProfile target, ProgressCallback progress, Map<String,Object> properties, boolean notifySubscribers, Map<String,Object> session) throws PublishException, IOException
      Publish using this service.
      Parameters:
      profile - A profile.
      target - A target.
      progress - A callback.
      properties - A property map.
      notifySubscribers - True to notify subs, false otherwise.
      Throws:
      PublishException - If an exception occurs.
      IOException - If an exception occurs.
    • getDisplayPreference

      default int getDisplayPreference()
      Used to sort the display order on create new publish profile list