Class DescriptionModel
- java.lang.Object
-
- org.libreoffice.ide.eclipse.core.model.description.DescriptionModel
-
-
Constructor Summary
Constructors Constructor Description DescriptionModel()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDescription(java.util.Locale pLocale, java.lang.String pValue)Add or update a description.voidaddDisplayName(java.util.Locale pLocale, java.lang.String pValue)Add or update a display name.voidaddLicense(java.util.Locale pLocale, java.lang.String pValue)Add or update a license.voidaddListener(IModelChangedListener pListener)Add a model listener.voidaddPublisherInfo(java.util.Locale pLocale, PublisherInfos pValue)Add or update a publisherInfo.voidaddReleaseNote(java.util.Locale pLocale, java.lang.String pValue)Add or update a release note.voidaddUpdateInfo(java.lang.String pValue)Add or update a updateInfos.protected voidfireModelChanged()Tells everyone that the model has changed.protected voidfireModelSaved()Tells everyone that the model has been saved.java.util.ArrayList<java.util.Locale>getAllLocales()java.lang.StringgetDefaultIcon()java.util.Map<java.util.Locale,java.lang.String>getDescriptions()java.util.Map<java.util.Locale,java.lang.String>getDisplayNames()java.lang.StringgetHCIcon()java.lang.StringgetId()java.util.Map<java.util.Locale,java.lang.String>getLicenses()java.lang.StringgetMaxOOo()java.lang.StringgetMinOOo()java.lang.StringgetPlatforms()java.util.Map<java.util.Locale,PublisherInfos>getPublisherInfos()java.util.Map<java.util.Locale,java.lang.String>getReleaseNotes()java.util.ArrayList<java.lang.String>getUpdateInfos()java.lang.StringgetVersion()booleanisAcceptByUser()booleanisDirty()booleanisSuppressOnUpdate()voidremoveDescription(java.util.Locale pLocale)Remove a description.voidremoveDisplayName(java.util.Locale pLocale)Remove a display name.voidremoveLicense(java.util.Locale pLocale)Remove a license.voidremoveListener(IModelChangedListener pListener)Remove a model listener.voidremovePublisherInfo(java.util.Locale pLocale)Remove a publisherInfo.voidremoveReleaseNote(java.util.Locale pLocale)Remove a release note.voidremoveUpdateInfo(java.lang.String pValue)Remove a updateInfos.voidreplaceUpdateInfo(int pIndex, java.lang.String pValue)Replace an existing update info.voidserialize(java.io.OutputStream pOut)Serializes the data in XML to an output stream.voidsetAcceptByUser(boolean pAcceptByUser)voidsetDefaultIcon(java.lang.String pDefaultIcon)voidsetHCIcon(java.lang.String pHCIcon)voidsetId(java.lang.String pId)voidsetMaxOOo(java.lang.String pMaxOOo)voidsetMinOOo(java.lang.String pMinOOo)voidsetPlatforms(java.lang.String pPlatforms)voidsetSuppressOnUpdate(boolean pSuppressOnUpdate)voidsetSuspendEvent(boolean pSuspend)voidsetVersion(java.lang.String pVersion)
-
-
-
Method Detail
-
addListener
public void addListener(IModelChangedListener pListener)
Add a model listener.- Specified by:
addListenerin interfaceIModel- Parameters:
pListener- the listener to add
-
removeListener
public void removeListener(IModelChangedListener pListener)
Remove a model listener.- Specified by:
removeListenerin interfaceIModel- Parameters:
pListener- the listener to remove
-
isDirty
public boolean isDirty()
-
setSuspendEvent
public void setSuspendEvent(boolean pSuspend)
- Specified by:
setSuspendEventin interfaceIModel- Parameters:
pSuspend-trueto suspend the events for the model
-
getAllLocales
public java.util.ArrayList<java.util.Locale> getAllLocales()
- Returns:
- all the locales defined in the different parts of the model.
-
getId
public java.lang.String getId()
- Returns:
- the id
-
setId
public void setId(java.lang.String pId)
- Parameters:
pId- the id to set
-
getVersion
public java.lang.String getVersion()
- Returns:
- the version
-
setVersion
public void setVersion(java.lang.String pVersion)
- Parameters:
pVersion- the version to set
-
getDisplayNames
public java.util.Map<java.util.Locale,java.lang.String> getDisplayNames()
- Returns:
- the displayNames
-
addDisplayName
public void addDisplayName(java.util.Locale pLocale, java.lang.String pValue)Add or update a display name.- Parameters:
pLocale- the locale for the display name to add / updatepValue- the value to add / update.
-
removeDisplayName
public void removeDisplayName(java.util.Locale pLocale)
Remove a display name.- Parameters:
pLocale- the locale of the display name to remove
-
getMinOOo
public java.lang.String getMinOOo()
- Returns:
- the minOOo
-
setMinOOo
public void setMinOOo(java.lang.String pMinOOo)
- Parameters:
pMinOOo- the minOOo to set
-
getMaxOOo
public java.lang.String getMaxOOo()
- Returns:
- the maxOOo
-
setMaxOOo
public void setMaxOOo(java.lang.String pMaxOOo)
- Parameters:
pMaxOOo- the maxOOo to set
-
getPlatforms
public java.lang.String getPlatforms()
- Returns:
- the platforms
-
setPlatforms
public void setPlatforms(java.lang.String pPlatforms)
- Parameters:
pPlatforms- the platforms to set
-
getDefaultIcon
public java.lang.String getDefaultIcon()
- Returns:
- the defaultIcon
-
setDefaultIcon
public void setDefaultIcon(java.lang.String pDefaultIcon)
- Parameters:
pDefaultIcon- the defaultIcon to set
-
getHCIcon
public java.lang.String getHCIcon()
- Returns:
- the hCIcon
-
setHCIcon
public void setHCIcon(java.lang.String pHCIcon)
- Parameters:
pHCIcon- the hCIcon to set
-
getDescriptions
public java.util.Map<java.util.Locale,java.lang.String> getDescriptions()
- Returns:
- the descriptions
-
addDescription
public void addDescription(java.util.Locale pLocale, java.lang.String pValue)Add or update a description.- Parameters:
pLocale- the locale for the description to add / updatepValue- the value to add / update.
-
removeDescription
public void removeDescription(java.util.Locale pLocale)
Remove a description.- Parameters:
pLocale- the locale of the description to remove
-
getReleaseNotes
public java.util.Map<java.util.Locale,java.lang.String> getReleaseNotes()
- Returns:
- the releaseNotes
-
addReleaseNote
public void addReleaseNote(java.util.Locale pLocale, java.lang.String pValue)Add or update a release note.- Parameters:
pLocale- the locale for the release note to add / updatepValue- the value to add / update.
-
removeReleaseNote
public void removeReleaseNote(java.util.Locale pLocale)
Remove a release note.- Parameters:
pLocale- the locale of the release note to remove
-
getUpdateInfos
public java.util.ArrayList<java.lang.String> getUpdateInfos()
- Returns:
- the updateInfos
-
addUpdateInfo
public void addUpdateInfo(java.lang.String pValue)
Add or update a updateInfos.- Parameters:
pValue- the value to add / update.
-
replaceUpdateInfo
public void replaceUpdateInfo(int pIndex, java.lang.String pValue)Replace an existing update info.- Parameters:
pIndex- the index to changepValue- the new value
-
removeUpdateInfo
public void removeUpdateInfo(java.lang.String pValue)
Remove a updateInfos.- Parameters:
pValue- the value to remove
-
isAcceptByUser
public boolean isAcceptByUser()
- Returns:
- the acceptByUser
-
setAcceptByUser
public void setAcceptByUser(boolean pAcceptByUser)
- Parameters:
pAcceptByUser- 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 java.util.Map<java.util.Locale,java.lang.String> getLicenses()
- Returns:
- the licenses
-
addLicense
public void addLicense(java.util.Locale pLocale, java.lang.String pValue)Add or update a license.- Parameters:
pLocale- the locale for the license to add / updatepValue- the value to add / update.
-
removeLicense
public void removeLicense(java.util.Locale pLocale)
Remove a license.- Parameters:
pLocale- the locale of the license to remove
-
getPublisherInfos
public java.util.Map<java.util.Locale,PublisherInfos> getPublisherInfos()
- Returns:
- the publisherInfos
-
addPublisherInfo
public void addPublisherInfo(java.util.Locale pLocale, PublisherInfos pValue)Add or update a publisherInfo.- Parameters:
pLocale- the locale for the publisherInfo to add / updatepValue- the value to add / update.
-
removePublisherInfo
public void removePublisherInfo(java.util.Locale pLocale)
Remove a publisherInfo.- Parameters:
pLocale- the locale of the publisherInfo to remove
-
serialize
public void serialize(java.io.OutputStream pOut)
Serializes the data in XML to an output stream.- Parameters:
pOut- 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.
-
-