Class DescriptionModel

java.lang.Object
org.libreoffice.ide.eclipse.core.model.description.DescriptionModel
All Implemented Interfaces:
IModel

public class DescriptionModel extends Object implements IModel
Class representing the description.xml file.
  • Constructor Details

    • DescriptionModel

      public DescriptionModel()
      Default constructor.
  • Method Details

    • addListener

      public void addListener(IModelDataListener listener)
      Add a model listener.
      Specified by:
      addListener in interface IModel
      Parameters:
      listener - the listener to add
    • removeListener

      public void removeListener(IModelDataListener listener)
      Remove a model listener.
      Specified by:
      removeListener in interface IModel
      Parameters:
      listener - the listener to remove
    • isDirty

      public boolean isDirty()
      Specified by:
      isDirty in interface IModel
      Returns:
      whether the model has been changed without being saved or not.
    • setSuspendEvent

      public void setSuspendEvent(boolean pSuspend)
      Specified by:
      setSuspendEvent in interface IModel
      Parameters:
      pSuspend - true to suspend the events for the model
    • getAllLocales

      public ArrayList<Locale> getAllLocales()
      Returns:
      all the locales defined in the different parts of the model.
    • getId

      public String getId()
      Returns:
      the id
    • setId

      public void setId(String id)
      Parameters:
      id - the id to set
    • getVersion

      public String getVersion()
      Returns:
      the version
    • setVersion

      public void setVersion(String pVersion)
      Parameters:
      pVersion - the version to set
    • getDisplayNames

      public Map<Locale,String> getDisplayNames()
      Returns:
      the displayNames
    • addDisplayName

      public void addDisplayName(Locale locale, String value)
      Add or update a display name.
      Parameters:
      locale - the locale for the display name to add / update
      value - the value to add / update.
    • removeDisplayName

      public void removeDisplayName(Locale locale)
      Remove a display name.
      Parameters:
      locale - the locale of the display name to remove
    • getMinOOo

      public String getMinOOo()
      Returns:
      the minOOo
    • setMinOOo

      public void setMinOOo(String minOOo)
      Parameters:
      minOOo - the minOOo to set
    • getMaxOOo

      public String getMaxOOo()
      Returns:
      the maxOOo
    • setMaxOOo

      public void setMaxOOo(String maxOOo)
      Parameters:
      maxOOo - the maxOOo to set
    • getPlatforms

      public String getPlatforms()
      Returns:
      the platforms
    • setPlatforms

      public void setPlatforms(String pPlatforms)
      Parameters:
      pPlatforms - the platforms to set
    • getDefaultIcon

      public String getDefaultIcon()
      Returns:
      the defaultIcon
    • setDefaultIcon

      public void setDefaultIcon(String defaultIcon)
      Parameters:
      defaultIcon - the defaultIcon to set
    • getHCIcon

      public String getHCIcon()
      Returns:
      the hCIcon
    • setHCIcon

      public void setHCIcon(String hcIcon)
      Parameters:
      hcIcon - the hCIcon to set
    • getDescriptions

      public Map<Locale,String> getDescriptions()
      Returns:
      the descriptions
    • addDescription

      public void addDescription(Locale locale, String value)
      Add or update a description.
      Parameters:
      locale - the locale for the description to add / update
      value - the value to add / update.
    • removeDescription

      public void removeDescription(Locale locale)
      Remove a description.
      Parameters:
      locale - the locale of the description to remove
    • getReleaseNotes

      public Map<Locale,String> getReleaseNotes()
      Returns:
      the releaseNotes
    • addReleaseNote

      public void addReleaseNote(Locale locale, String value)
      Add or update a release note.
      Parameters:
      locale - the locale for the release note to add / update
      value - the value to add / update.
    • removeReleaseNote

      public void removeReleaseNote(Locale locale)
      Remove a release note.
      Parameters:
      locale - the locale of the release note to remove
    • getUpdateInfos

      public ArrayList<String> getUpdateInfos()
      Returns:
      the updateInfos
    • addUpdateInfo

      public void addUpdateInfo(String pValue)
      Add or update a updateInfos.
      Parameters:
      pValue - the value to add / update.
    • replaceUpdateInfo

      public void replaceUpdateInfo(int index, String value)
      Replace an existing update info.
      Parameters:
      index - the index to change
      value - the new value
    • removeUpdateInfo

      public void removeUpdateInfo(String pValue)
      Remove a updateInfos.
      Parameters:
      pValue - the value to remove
    • isAcceptByUser

      public boolean isAcceptByUser()
      Returns:
      the acceptByUser
    • setAcceptByUser

      public void setAcceptByUser(boolean acceptByUser)
      Parameters:
      acceptByUser - the acceptByUser to set
    • isSuppressOnUpdate

      public boolean isSuppressOnUpdate()
      Returns:
      the suppressOnUpdate
    • setSuppressOnUpdate

      public void setSuppressOnUpdate(boolean pSuppressOnUpdate)
      Parameters:
      pSuppressOnUpdate - the suppressOnUpdate to set
    • getLicenses

      public Map<Locale,String> getLicenses()
      Returns:
      the licenses
    • addLicense

      public void addLicense(Locale locale, String value)
      Add or update a license.
      Parameters:
      locale - the locale for the license to add / update
      value - the value to add / update.
    • removeLicense

      public void removeLicense(Locale locale)
      Remove a license.
      Parameters:
      locale - the locale of the license to remove
    • getPublisherInfos

      public Map<Locale,PublisherInfos> getPublisherInfos()
      Returns:
      the publisherInfos
    • addPublisherInfo

      public void addPublisherInfo(Locale locale, PublisherInfos value)
      Add or update a publisherInfo.
      Parameters:
      locale - the locale for the publisherInfo to add / update
      value - the value to add / update.
    • removePublisherInfo

      public void removePublisherInfo(Locale locale)
      Remove a publisherInfo.
      Parameters:
      locale - the locale of the publisherInfo to remove
    • serialize

      public void serialize(OutputStream out)
      Serializes the data in XML to an output stream.
      Parameters:
      out - the output stream where to write the data
    • fireModelChanged

      protected void fireModelChanged()
      Tells everyone that the model has changed.
    • fireModelSaved

      protected void fireModelSaved()
      Tells everyone that the model has been saved.